mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #4658 from w33ble/fix/redirect-links
Root path hash redirect
This commit is contained in:
commit
00afa44c4b
3 changed files with 14 additions and 3 deletions
|
@ -85,7 +85,10 @@ module.exports = function (kbnServer, server, config) {
|
|||
path: '/',
|
||||
method: 'GET',
|
||||
handler: function (req, reply) {
|
||||
reply.redirect(getDefaultRoute(kbnServer));
|
||||
return reply.view('rootRedirect', {
|
||||
hashRoute: '/app/kibana',
|
||||
defaultRoute: getDefaultRoute(kbnServer),
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ module.exports = async function (kbnServer, server, config) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
let path = [];
|
||||
let initialize = async id => {
|
||||
let plugin = enabledPlugins[id];
|
||||
|
@ -27,7 +26,6 @@ module.exports = async function (kbnServer, server, config) {
|
|||
|
||||
path.push(id);
|
||||
|
||||
|
||||
for (let reqId of plugin.requiredIds) {
|
||||
if (!enabledPlugins[reqId]) {
|
||||
if (plugins.byId[reqId]) {
|
||||
|
|
10
src/ui/views/rootRedirect.jade
Normal file
10
src/ui/views/rootRedirect.jade
Normal file
|
@ -0,0 +1,10 @@
|
|||
script.
|
||||
var hashRoute = '#{hashRoute}';
|
||||
var defaultRoute = '#{defaultRoute}';
|
||||
|
||||
var hash = window.location.hash;
|
||||
if (hash.length) {
|
||||
window.location = hashRoute + hash;
|
||||
} else {
|
||||
window.location = defaultRoute;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue