зеркало из https://github.com/mozilla/MozDef.git
Fixup kibanaurl for cloudy mozdef setup
This commit is contained in:
Родитель
18e12c47c2
Коммит
2c7181ccc8
|
@ -122,9 +122,7 @@ Resources:
|
|||
# Drives the configuration of variables for a variety of containers.
|
||||
OPTIONS_ESSERVERS=${ESURL}
|
||||
OPTIONS_KIBANAURL=${KibanaURL}
|
||||
# The OPTIONS_METEOR_KIBANAURL uses the reserved word "relative" which triggers MozDef
|
||||
# to use relative links to Kibana : https://github.com/mozilla/MozDef/pull/956
|
||||
OPTIONS_METEOR_KIBANAURL=https://relative:9090/_plugin/kibana/
|
||||
OPTIONS_METEOR_KIBANAURL=$OPTIONS_KIBANAURL
|
||||
OPTIONS_METEOR_ROOTURL=https://${DomainName}
|
||||
# See https://github.com/mozilla-iam/mozilla.oidc.accessproxy/blob/master/README.md#setup
|
||||
# Future support will be added for cognito backed authentication.
|
||||
|
|
|
@ -14,7 +14,7 @@ Copyright (c) 2014 Mozilla Corporation
|
|||
<li><img class="mozillalogo" src="/images/mozilla.svg"></li>
|
||||
<li><a class="mozdef" href="/" title="MOZDEF">MOZDEF</a></li>
|
||||
{{#if isFeature "kibana"}}
|
||||
<li> <a target="_blank" href={{ resolveKibanaURL mozdef.kibanaURL }}>Kibana</a>
|
||||
<li> <a target="_blank" href={{ mozdef.kibanaURL }}>Kibana</a>
|
||||
<ul>
|
||||
<li>
|
||||
{{#each kibanadashboards as item}}
|
||||
|
|
|
@ -12,21 +12,5 @@ Template.menu.helpers({
|
|||
haveFeatures: function(){
|
||||
//subscription has records?
|
||||
return features.find().count() >0;
|
||||
},
|
||||
resolveKibanaURL: function(url){
|
||||
// special function just for the menu
|
||||
// to adjust the kibana URL if we are told to make it 'relative'
|
||||
// to whatever DNS name we are running on
|
||||
// i.e. pass in http://relative:9090/app/kibana
|
||||
// when the running dns is something.com
|
||||
// and we will set the hostname to something.com instead of 'relative'
|
||||
var kibanaURL = new URL(url);
|
||||
if ( kibanaURL.hostname == 'relative' ){
|
||||
// we were passed something like OPTIONS_METEOR_KIBANAURL=http://relative:9090/app/kibana
|
||||
// so lets figure out where we should be
|
||||
dnsURL=new URL(document.URL);
|
||||
kibanaURL.hostname = dnsURL.hostname;
|
||||
}
|
||||
return kibanaURL;
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче