Adding drilldown markdown URLs
parent
c8acf05bd7
commit
fb2b4bf4d9
|
|
@ -157,7 +157,7 @@ def get_dataExplorerTileSloThreshold(sloThresholdValuesAndColor):
|
||||||
dataExplorerTileThreshold = [ { "value": value1, "color": color1 }, { "value": value2, "color": color2 }, { "value": value3, "color": color3 } ]
|
dataExplorerTileThreshold = [ { "value": value1, "color": color1 }, { "value": value2, "color": color2 }, { "value": value3, "color": color3 } ]
|
||||||
return dataExplorerTileThreshold
|
return dataExplorerTileThreshold
|
||||||
|
|
||||||
def get_DataExplorerTile_Markdown(name_short, department, bounds, detailDashboardUrl_EMEA,detailDashboardUrl_NA, detailDashboardUrl_CN, docURL ):
|
def get_DataExplorerTile_Markdown(name_short, department, bounds, detailDashboardUrl_EMEA,detailDashboardUrl_NA, detailDashboardUrl_CN, docURL, slourl_EMEA, slourl_NA, slourl_CN ):
|
||||||
# dataExplorerTile_Markdown = {
|
# dataExplorerTile_Markdown = {
|
||||||
# "name": "Markdown",
|
# "name": "Markdown",
|
||||||
# "tileType": "MARKDOWN",
|
# "tileType": "MARKDOWN",
|
||||||
|
|
@ -167,13 +167,20 @@ def get_DataExplorerTile_Markdown(name_short, department, bounds, detailDashboar
|
||||||
# "markdown": "___________\n## " + name_short + "\n\n" + department + " | --> [EMEA](" + detailDashboardUrl_EMEA + ") [NA](" + detailDashboardUrl_NA + ") [CN](" + detailDashboardUrl_CN + ")\n [Documentation](" + docURL + ")"
|
# "markdown": "___________\n## " + name_short + "\n\n" + department + " | --> [EMEA](" + detailDashboardUrl_EMEA + ") [NA](" + detailDashboardUrl_NA + ") [CN](" + detailDashboardUrl_CN + ")\n [Documentation](" + docURL + ")"
|
||||||
# }
|
# }
|
||||||
#without team links
|
#without team links
|
||||||
|
markdown = "___________\n## " + name_short + "\n\n" + department + " [Documentation](" + docURL + ") \n"
|
||||||
|
if(slourl_EMEA):
|
||||||
|
markdown = markdown + "[EMEA]("+slourl_EMEA+") "
|
||||||
|
if(slourl_NA):
|
||||||
|
markdown = markdown + "[NA]("+slourl_NA+") "
|
||||||
|
if(slourl_CN):
|
||||||
|
markdown = markdown + "[CN]("+slourl_CN+") "
|
||||||
dataExplorerTile_Markdown = {
|
dataExplorerTile_Markdown = {
|
||||||
"name": "Markdown",
|
"name": "Markdown",
|
||||||
"tileType": "MARKDOWN",
|
"tileType": "MARKDOWN",
|
||||||
"configured": "true",
|
"configured": "true",
|
||||||
"bounds": bounds,
|
"bounds": bounds,
|
||||||
"tileFilter": {},
|
"tileFilter": {},
|
||||||
"markdown": "___________\n## " + name_short + "\n\n" + department + " \n[Documentation](" + docURL + ")"
|
"markdown": markdown
|
||||||
}
|
}
|
||||||
return dataExplorerTile_Markdown
|
return dataExplorerTile_Markdown
|
||||||
|
|
||||||
|
|
@ -329,9 +336,17 @@ def main(slo_path):
|
||||||
timeframe_ytd = "-3d"
|
timeframe_ytd = "-3d"
|
||||||
slo_graphThreshold_SingleValue = get_dataExplorerTileSloThreshold(configuration["thresholds"]["single_value"])
|
slo_graphThreshold_SingleValue = get_dataExplorerTileSloThreshold(configuration["thresholds"]["single_value"])
|
||||||
slo_graphThreshold_Graph = get_dataExplorerTileSloThreshold(configuration["thresholds"]["graph_value"])
|
slo_graphThreshold_Graph = get_dataExplorerTileSloThreshold(configuration["thresholds"]["graph_value"])
|
||||||
|
emeaslourl = ""
|
||||||
|
naslourl = ""
|
||||||
|
cnslourl = ""
|
||||||
if len(configuration["hubs"]) > 0:
|
if len(configuration["hubs"]) > 0:
|
||||||
dashboard_json.append(get_DataExplorerTile_Markdown(slo_display, slo_department, get_bounds(((boundindex)*(3)) , 0 , 7 , 3), configuration["ops_dashboard"]["emea"], configuration["ops_dashboard"]["na"], configuration["ops_dashboard"]["cn"],configuration["doc_url"]))
|
if(configuration["ids"]["emea"]):
|
||||||
|
emeaslourl = hub_config["euprod"]["remote_url"] + "/ui/slo?id="+configuration["ids"]["emea"]
|
||||||
|
if(configuration["ids"]["na"]):
|
||||||
|
naslourl = hub_config["naprod"]["remote_url"] + "/ui/slo?id="+configuration["ids"]["na"]
|
||||||
|
if(configuration["ids"]["cn"]):
|
||||||
|
cnslourl = hub_config["cnprod"]["remote_url"] + "/ui/slo?id="+configuration["ids"]["cn"]
|
||||||
|
dashboard_json.append(get_DataExplorerTile_Markdown(slo_display, slo_department, get_bounds(((boundindex)*(3)) , 0 , 7 , 3), configuration["ops_dashboard"]["emea"], configuration["ops_dashboard"]["na"], configuration["ops_dashboard"]["cn"],configuration["doc_url"],emeaslourl,naslourl,cnslourl))
|
||||||
for hub,tiles in configuration["hubs"].items():
|
for hub,tiles in configuration["hubs"].items():
|
||||||
if 'actual' in tiles["tiles"]:
|
if 'actual' in tiles["tiles"]:
|
||||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 7 + hub_config[hub]["offset"] , 4 , 3), timeframe_actual, slo_graphThreshold_SingleValue))
|
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 7 + hub_config[hub]["offset"] , 4 , 3), timeframe_actual, slo_graphThreshold_SingleValue))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue