From 336396436aa49de730887456028e3daa1465e500 Mon Sep 17 00:00:00 2001
From: Shao Wang <77665902+Electronic-Waste@users.noreply.github.com>
Date: Wed, 4 Dec 2024 16:28:00 +0800
Subject: [PATCH] fix(ui): update None Collector with Push Collector. (#2418)
* fix(ui): update None Collector with Push Collector.
Signed-off-by: Electronic-Waste <2690692950@qq.com>
* fix(ui): replace some remaining None MC.
Signed-off-by: Electronic-Waste <2690692950@qq.com>
---------
Signed-off-by: Electronic-Waste <2690692950@qq.com>
---
.../v1beta1/frontend/src/app/enumerations/metrics-collector.ts | 2 +-
pkg/ui/v1beta1/frontend/src/app/models/experiment.k8s.model.ts | 2 +-
pkg/ui/v1beta1/frontend/src/app/models/trial.k8s.model.ts | 2 +-
.../metrics-collector/metrics-collector.component.html | 2 +-
.../frontend/src/app/services/experiment-form.service.ts | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pkg/ui/v1beta1/frontend/src/app/enumerations/metrics-collector.ts b/pkg/ui/v1beta1/frontend/src/app/enumerations/metrics-collector.ts
index 06e54d3a712..4b49076d5ba 100644
--- a/pkg/ui/v1beta1/frontend/src/app/enumerations/metrics-collector.ts
+++ b/pkg/ui/v1beta1/frontend/src/app/enumerations/metrics-collector.ts
@@ -4,5 +4,5 @@ export enum CollectorKind {
TFEVENT = 'TensorFlowEvent',
PROMETHEUS = 'PrometheusMetric',
CUSTOM = 'Custom',
- NONE = 'None',
+ PUSH = 'Push',
}
diff --git a/pkg/ui/v1beta1/frontend/src/app/models/experiment.k8s.model.ts b/pkg/ui/v1beta1/frontend/src/app/models/experiment.k8s.model.ts
index 6552928169a..a0a6af473c4 100644
--- a/pkg/ui/v1beta1/frontend/src/app/models/experiment.k8s.model.ts
+++ b/pkg/ui/v1beta1/frontend/src/app/models/experiment.k8s.model.ts
@@ -110,7 +110,7 @@ export type CollectorKind =
| 'TensorFlowEvent'
| 'PrometheusMetric'
| 'Custom'
- | 'None';
+ | 'Push';
export interface HttpGet {
host?: string;
diff --git a/pkg/ui/v1beta1/frontend/src/app/models/trial.k8s.model.ts b/pkg/ui/v1beta1/frontend/src/app/models/trial.k8s.model.ts
index 0c3f82bb351..274c7004b09 100644
--- a/pkg/ui/v1beta1/frontend/src/app/models/trial.k8s.model.ts
+++ b/pkg/ui/v1beta1/frontend/src/app/models/trial.k8s.model.ts
@@ -37,7 +37,7 @@ export type CollectorKind =
| 'TensorFlowEvent'
| 'PrometheusMetric'
| 'Custom'
- | 'None';
+ | 'Push';
export interface Objective {
type: ObjectiveType;
diff --git a/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.html b/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.html
index 4addd8cf258..602ffd50e6f 100644
--- a/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.html
+++ b/pkg/ui/v1beta1/frontend/src/app/pages/experiment-creation/metrics-collector/metrics-collector.component.html
@@ -9,7 +9,7 @@
TensorFlow Event
Prometheus
Custom
- None
+ Push
diff --git a/pkg/ui/v1beta1/frontend/src/app/services/experiment-form.service.ts b/pkg/ui/v1beta1/frontend/src/app/services/experiment-form.service.ts
index 383bdac81c6..771d780068e 100644
--- a/pkg/ui/v1beta1/frontend/src/app/services/experiment-form.service.ts
+++ b/pkg/ui/v1beta1/frontend/src/app/services/experiment-form.service.ts
@@ -360,7 +360,7 @@ export class ExperimentFormService {
collector: { kind },
};
- if (kind === 'StdOut' || kind === 'None') {
+ if (kind === 'StdOut' || kind === 'Push') {
delete metrics.source;
return metrics;
}