@@ -45,10 +45,11 @@ def status():
45
45
table .add_column ("Component" , style = "cyan" )
46
46
table .add_column ("Name" , style = "green" )
47
47
table .add_column ("Status" , style = "yellow" )
48
+ table .add_column ("Namespace" , style = "green" )
48
49
49
50
# Add tanks to the table
50
51
for tank in tanks :
51
- table .add_row ("Tank" , tank ["name" ], tank ["status" ])
52
+ table .add_row ("Tank" , tank ["name" ], tank ["status" ], tank [ "namespace" ] )
52
53
53
54
# Add a separator if there are both tanks and scenarios
54
55
if tanks and scenarios :
@@ -58,7 +59,7 @@ def status():
58
59
active = 0
59
60
if scenarios :
60
61
for scenario in scenarios :
61
- table .add_row ("Scenario" , scenario ["name" ], scenario ["status" ])
62
+ table .add_row ("Scenario" , scenario ["name" ], scenario ["status" ], scenario [ "namespace" ] )
62
63
if scenario ["status" ] == "running" or scenario ["status" ] == "pending" :
63
64
active += 1
64
65
else :
@@ -86,9 +87,23 @@ def status():
86
87
87
88
def _get_tank_status ():
88
89
tanks = get_mission ("tank" )
89
- return [{"name" : tank .metadata .name , "status" : tank .status .phase .lower ()} for tank in tanks ]
90
+ return [
91
+ {
92
+ "name" : tank .metadata .name ,
93
+ "status" : tank .status .phase .lower (),
94
+ "namespace" : tank .metadata .namespace ,
95
+ }
96
+ for tank in tanks
97
+ ]
90
98
91
99
92
100
def _get_deployed_scenarios ():
93
101
commanders = get_mission ("commander" )
94
- return [{"name" : c .metadata .name , "status" : c .status .phase .lower ()} for c in commanders ]
102
+ return [
103
+ {
104
+ "name" : c .metadata .name ,
105
+ "status" : c .status .phase .lower (),
106
+ "namespace" : c .metadata .namespace ,
107
+ }
108
+ for c in commanders
109
+ ]
0 commit comments