|
|
@@ -372,6 +372,7 @@ type CloudbrainsOptions struct { |
|
|
|
ComputeResource string |
|
|
|
BeginTimeUnix int64 |
|
|
|
EndTimeUnix int64 |
|
|
|
AiCenter string |
|
|
|
} |
|
|
|
|
|
|
|
type TaskPod struct { |
|
|
@@ -1403,6 +1404,11 @@ func Cloudbrains(opts *CloudbrainsOptions) ([]*CloudbrainInfo, int64, error) { |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
if (opts.AiCenter) != "" { |
|
|
|
cond = cond.And( |
|
|
|
builder.Like{"cloudbrain.ai_center", opts.AiCenter}, |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
if (opts.IsLatestVersion) != "" { |
|
|
|
cond = cond.And(builder.Or(builder.And(builder.Eq{"cloudbrain.is_latest_version": opts.IsLatestVersion}, builder.Eq{"cloudbrain.job_type": "TRAIN"}), builder.Neq{"cloudbrain.job_type": "TRAIN"})) |
|
|
@@ -1944,6 +1950,12 @@ func CloudbrainAll(opts *CloudbrainsOptions) ([]*CloudbrainInfo, int64, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (opts.AiCenter) != "" { |
|
|
|
cond = cond.And( |
|
|
|
builder.Like{"cloudbrain.ai_center", opts.AiCenter}, |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
if (opts.IsLatestVersion) != "" { |
|
|
|
cond = cond.And(builder.Or(builder.And(builder.Eq{"cloudbrain.is_latest_version": opts.IsLatestVersion}, |
|
|
|
builder.Eq{"cloudbrain.job_type": "TRAIN"}), builder.Neq{"cloudbrain.job_type": "TRAIN"})) |
|
|
|