OPMAAS-4436, OPMAAS-4530 adding fold config to code
parent
0b6788bd07
commit
23fe701e62
|
|
@ -241,7 +241,7 @@ def get_DataExplorerTile_SingleValue(customName, metricSelector, remoteEnvironme
|
|||
"tableSettings": { "isThresholdBackgroundAppliedToCell": "false" },
|
||||
"graphChartSettings": { "connectNulls": "false" } },
|
||||
|
||||
"queriesSettings": { "resolution": "" }
|
||||
"queriesSettings": { "resolution": "","foldAggregation": "AVG" }
|
||||
}
|
||||
return dataExplorerTile_SingleValue
|
||||
|
||||
|
|
@ -333,20 +333,20 @@ def create_default_tiles():
|
|||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 65 , 4 , 1), "tileFilter": {} })
|
||||
else:
|
||||
# EMEA HUB
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 7 , 14 , 2), "tileFilter": {}, "markdown": "# EMEA" })
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 7 , 16 , 2), "tileFilter": {}, "markdown": "# EMEA" })
|
||||
newDashboardTiles.append({ "name": "Last 1 h" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 7 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 11 , 6 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 17 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 11 , 8 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 19 , 4 , 1), "tileFilter": {} })
|
||||
# NORTH AMERICA HUB
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 22 , 14 , 2), "tileFilter": {}, "markdown": "# NORTH AMERICA" })
|
||||
newDashboardTiles.append({ "name": "Last 1 h" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 22 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 26 , 6 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 32 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 24 , 16 , 2), "tileFilter": {}, "markdown": "# NORTH AMERICA" })
|
||||
newDashboardTiles.append({ "name": "Last 1 h" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 24 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 28 , 8 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 36 , 4 , 1), "tileFilter": {} })
|
||||
# CHINA HUB
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 37 , 14 , 2), "tileFilter": {}, "markdown": "# CHINA" })
|
||||
newDashboardTiles.append({ "name": "Last 1 h" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 37 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 41 , 6 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 47 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Header" ,"tileType": "MARKDOWN" , "configured": "true" , "bounds": get_bounds(0 , 41 , 16 , 2), "tileFilter": {}, "markdown": "# CHINA" })
|
||||
newDashboardTiles.append({ "name": "Last 1 h" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 41 , 4 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Graph (3 days)" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 45 , 8 , 1), "tileFilter": {} })
|
||||
newDashboardTiles.append({ "name": "Last 3 d" ,"tileType": "HEADER" , "configured": "true" , "bounds": get_bounds(2 , 53 , 4 , 1), "tileFilter": {} })
|
||||
return newDashboardTiles
|
||||
def getSloReqCountSelector(service_names):
|
||||
selector = ""
|
||||
|
|
@ -413,7 +413,7 @@ def main(slo_path):
|
|||
if(args.wall):
|
||||
offsets = [0,21,42]
|
||||
else:
|
||||
offsets = [0,15,30]
|
||||
offsets = [0,17,34]
|
||||
hub_config = {
|
||||
"euprod":
|
||||
{
|
||||
|
|
@ -488,12 +488,12 @@ def main(slo_path):
|
|||
if(args.wall):
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), remoteurl, get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 12 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
else:
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), remoteurl, get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 6 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), remoteurl, get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 8 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
if "ytd" in tiles["tiles"]:
|
||||
if(args.wall):
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 23 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
else:
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 17 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 19 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
boundindex = boundindex+1
|
||||
if rowcount > 0 and boundindex > rowcount:
|
||||
with open("dashboard_tiles_"+str(dahboardcount)+".json", "w") as file:
|
||||
|
|
|
|||
Loading…
Reference in New Issue