add name and tags config
This commit is contained in:
parent
4356ac4ddf
commit
97731564c1
|
@ -105,6 +105,7 @@ func buildTask(config *migration_model.ClusterComparisonTaskConfig, creator *rba
|
|||
"source_total_docs": sourceTotalDocs,
|
||||
"target_total_docs": targetTotalDocs,
|
||||
"permit_nodes": config.Settings.Execution.Nodes.Permit,
|
||||
"name": config.Name,
|
||||
},
|
||||
},
|
||||
Cancellable: true,
|
||||
|
@ -112,6 +113,9 @@ func buildTask(config *migration_model.ClusterComparisonTaskConfig, creator *rba
|
|||
Status: task.StatusInit,
|
||||
ConfigString: util.MustToJSON(config),
|
||||
}
|
||||
if len(config.Tags) > 0 {
|
||||
t.Metadata.Labels["tags"] = config.Tags
|
||||
}
|
||||
t.ID = util.GetUUID()
|
||||
return &t, nil
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import (
|
|||
)
|
||||
|
||||
type ClusterComparisonTaskConfig struct {
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags"`
|
||||
Cluster struct {
|
||||
Source ClusterInfo `json:"source"`
|
||||
Target ClusterInfo `json:"target"`
|
||||
|
@ -31,6 +33,7 @@ type ClusterComparisonIndexConfig struct {
|
|||
// only used in API
|
||||
ScrollPercent float64 `json:"scroll_percent,omitempty"`
|
||||
ErrorPartitions int `json:"error_partitions,omitempty"`
|
||||
RunningChildren int `json:"running_children,omitempty"`
|
||||
}
|
||||
|
||||
type IndexComparisonTaskConfig struct {
|
||||
|
|
Loading…
Reference in New Issue