Skip to content

Commit 9775a37

Browse files
author
rafriat
committed
--amend
1 parent 88d0e77 commit 9775a37

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

workspaces/backend/internal/models/workspacekinds/funcs.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func NewWorkspaceKindModelFromWorkspaceKind(wsk *kubefloworgv1beta1.WorkspaceKin
6262
Hidden: ptr.Deref(wsk.Spec.Spawner.Hidden, false),
6363
Icon: iconRef,
6464
Logo: logoRef,
65-
// TODO: add namespaceMetrics
65+
// TODO: in the future will need to support including exactly one of clusterMetrics or namespaceMetrics based on request context
6666
ClusterMetrics: clusterMetrics{
6767
Workspaces: wsk.Status.Workspaces,
6868
},
@@ -107,6 +107,7 @@ func buildImageConfigValues(imageConfig kubefloworgv1beta1.ImageConfig, statusIm
107107
Labels: buildOptionLabels(option.Spawner.Labels),
108108
Hidden: ptr.Deref(option.Spawner.Hidden, false),
109109
Redirect: buildOptionRedirect(option.Redirect),
110+
// TODO: in the future will need to support including exactly one of clusterMetrics or namespaceMetrics based on request context
110111
ClusterMetrics: clusterMetrics{
111112
Workspaces: statusImageConfigMap[option.Id],
112113
},
@@ -126,6 +127,7 @@ func buildPodConfigValues(podConfig kubefloworgv1beta1.PodConfig, statusPodConfi
126127
Labels: buildOptionLabels(option.Spawner.Labels),
127128
Hidden: ptr.Deref(option.Spawner.Hidden, false),
128129
Redirect: buildOptionRedirect(option.Redirect),
130+
// TODO: in the future will need to support including exactly one of clusterMetrics or namespaceMetrics based on request context
129131
ClusterMetrics: clusterMetrics{
130132
Workspaces: statusPodConfigMap[option.Id],
131133
},

workspaces/backend/internal/models/workspacekinds/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type ImageConfigValue struct {
6969
Labels []OptionLabel `json:"labels"`
7070
Hidden bool `json:"hidden"`
7171
Redirect *OptionRedirect `json:"redirect,omitempty"`
72-
ClusterMetrics clusterMetrics `json:"clusterMetrics"`
72+
ClusterMetrics clusterMetrics `json:"clusterMetrics,omitempty"`
7373
}
7474

7575
type PodConfig struct {
@@ -84,7 +84,7 @@ type PodConfigValue struct {
8484
Labels []OptionLabel `json:"labels"`
8585
Hidden bool `json:"hidden"`
8686
Redirect *OptionRedirect `json:"redirect,omitempty"`
87-
ClusterMetrics clusterMetrics `json:"clusterMetrics"`
87+
ClusterMetrics clusterMetrics `json:"clusterMetrics,omitempty"`
8888
}
8989

9090
type OptionLabel struct {

0 commit comments

Comments
 (0)