@@ -84,17 +84,17 @@ def main():
8484 if site := target .pop ("site" , None ):
8585 config_set (target , ["context" , "siteopt" , "site" ], site )
8686
87- if combined := target .pop ("combinedgraph" , None ):
88- config_set (target , ["params" , "graph_name" ], combined )
89-
9087 mode = target .pop ("mode" , "" )
88+ metric_id = target .pop ("metric" , "" )
89+ graph_id = str (target .pop ("graph" , "0" ))
90+ combined_graph_name = target .pop ("combinedgraph" , None )
9191 if mode == "metric" :
9292 nested_set (target , ["params" , "graphMode" ], "metric" )
93-
94- # if mode == "graph":
95- # nested_set(
96- # target, ["params", "graph_name"], str(target.pop("graph", "0"))
97- # )
93+ nested_set ( target , [ "params" , "graph_name" ], metric_id )
94+ elif mode == "graph" :
95+ nested_set (target , [ "params" , "graph_name" ], graph_id )
96+ elif combined_graph_name :
97+ config_set ( target , [ "params" , "graph_name" ], combined_graph_name )
9898
9999 if presentation := target .pop ("presentiation" , None ):
100100 target ["params" ]["presentation" ] = presentation
0 commit comments