Skip to content

Commit 640c56b

Browse files
authored
Merge pull request #6 from ernesgonzalez33/add-components-enabled
Add enabled field to CSV using containerImage
2 parents befc65d + 152d78f commit 640c56b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dashboard/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func AppConfigsToCSV(nsToAppconfigMaps NsToAppConfigs) error {
194194
defer w.Flush()
195195

196196
err = w.Write([]string{
197-
"Workspace", "AppName", "ComponentName", "IntegrationTests", "ReleasePlans",
197+
"Workspace", "AppName", "ComponentName", "Enabled?", "IntegrationTests", "ReleasePlans",
198198
})
199199

200200
if err != nil {
@@ -205,10 +205,15 @@ func AppConfigsToCSV(nsToAppconfigMaps NsToAppConfigs) error {
205205
for _, appConfigMap := range appConfigMaps {
206206
for appName, appConfig := range appConfigMap {
207207
for _, comp := range appConfig.Components {
208+
isEnabled := "No"
209+
if len(comp.Spec.ContainerImage) > 0 {
210+
isEnabled = "Yes"
211+
}
208212
err := w.Write([]string{
209213
ns,
210214
appName,
211215
comp.Name,
216+
isEnabled,
212217
appConfig.GetTestNames(),
213218
appConfig.GetReleasePlanNames(),
214219
})

0 commit comments

Comments
 (0)