Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Adding action url to liberty admin center #73

Merged
merged 3 commits into from
Feb 11, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion deploy/maps/action/configmap.action.deployment.liberty.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ data:
"description.nls":"action.url.liberty.klog.desc",
"url-pattern":"${snippet.create_kibana_log_url(${snippet.kibanaurl(${var.kibanahost,default.undefined},${builtin.liberty-problems-dashboard})},${func.podlist()})}",
"open-window": "tab"
},
{
"name": "console",
"text": "Access Admin Center",
"text.nls": "action.url.liberty.app.console.text",
"description": "Access Liberty Admin Center",
"description.nls": "action.url.liberty.app.console.desc",
{{ if or (eq .Spec.Env.KubeEnv "okd") (eq .Spec.Env.KubeEnv "ocp")}}
"url-pattern":"https://${snippet.get_route_host(${func.kubectlGet(Route,-n,${resource.$.metadata.namespace},-o,json)})}/adminCenter",
{{ else }}
"url-pattern":"",
{{ end }}
"open-window": "tab",
"menu-item": "true",
"enablement-label":"kappnav.actions.admincenter"
}
]
variables: |
Expand Down Expand Up @@ -84,5 +99,11 @@ data:
+ \"%5D%7D%7D'),query:(bool:(minimum_should_match:1,should:!(\"
+ matchPhrases
+ \"))))),options:(darkTheme:!f),panels:!((col:1,id:liberty_probleminfo,panelIndex:1,row:1,size_x:12,size_y:1,type:visualization),(col:1,id:liberty_topMessageIds,panelIndex:5,row:6,size_x:12,size_y:3,type:visualization),(col:1,id:liberty_messageGraph,panelIndex:6,row:9,size_x:4,size_y:2,type:visualization),(col:9,id:liberty_ffdcGraph,panelIndex:7,row:9,size_x:4,size_y:2,type:visualization),(col:5,id:liberty_traceGraph,panelIndex:8,row:9,size_x:4,size_y:2,type:visualization),(col:1,id:b1afa090-c266-11e8-b344-7d7a26e293da,panelIndex:19,row:2,size_x:4,size_y:2,type:visualization),(col:5,id:c1f2fce0-c266-11e8-b344-7d7a26e293da,panelIndex:20,row:2,size_x:4,size_y:2,type:visualization),(col:9,id:d29457b0-c266-11e8-b344-7d7a26e293da,panelIndex:21,row:2,size_x:4,size_y:2,type:visualization),(col:1,columns:!(loglevel,module,message,kubernetes.pod,ibm_sequence),id:liberty_messageSearch,panelIndex:25,row:11,size_x:12,size_y:4,sort:!('@timestamp',desc),type:search),(col:1,columns:!(loglevel,module,message,kubernetes.pod,ibm_sequence),id:liberty_traceSearch,panelIndex:26,row:15,size_x:12,size_y:4,sort:!('@timestamp',desc),type:search),(col:1,columns:!(ibm_className,ibm_probeID,ibm_exceptionName,kubernetes.pod,ibm_sequence),id:liberty_ffdcSearch,panelIndex:27,row:19,size_x:12,size_y:4,sort:!('@timestamp',desc),type:search),(col:1,id:bbdafb10-8a2e-11e9-bccd-ad683bf7518d,panelIndex:28,row:4,size_x:4,size_y:2,type:visualization),(col:5,id:f04cbb40-8a2e-11e9-bccd-ad683bf7518d,panelIndex:29,row:4,size_x:4,size_y:2,type:visualization),(col:9,id:'21ecbdd0-8a2f-11e9-bccd-ad683bf7518d',panelIndex:30,row:4,size_x:4,size_y:2,type:visualization)),query:(query_string:(analyze_wildcard:!t,query:'*')),timeRestore:!t,title:Liberty-Problems-K5-20190909,uiState:(P-19:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-20:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-21:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-28:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-29:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-30:(vis:(params:(sort:(columnIndex:!n,direction:!n)))),P-6:(vis:(colors:(AUDIT:%233F2B5B,INFO:%237EB26D,SEVERE:%23BF1B00,WARNING:%23F2C96D)))),viewMode:view)\";
}"
}",
"get_route_host": "function getRouteHost(route)
{
var routeJSON = JSON.parse(route);
var host = routeJSON.items[0].spec.host;
return host;
}"
}