mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
do not opent the first chart column in node/index stats if no query was specified. Also strip url params when checking navigation url for current page.
This commit is contained in:
parent
b029508331
commit
c3884919d3
3 changed files with 12 additions and 18 deletions
|
@ -66,13 +66,8 @@ if (!_.isUndefined(ARGS.queries)) {
|
|||
}];
|
||||
}));
|
||||
} else {
|
||||
// No queries passed? Initialize a single query to match everything
|
||||
queries = {
|
||||
0: {
|
||||
query: '*',
|
||||
id: 0
|
||||
}
|
||||
};
|
||||
// No queries passed
|
||||
queries = {};
|
||||
}
|
||||
|
||||
var show = (ARGS.show || "").split(',');
|
||||
|
@ -395,11 +390,11 @@ dashboard.rows = _.map(rows, function (r) {
|
|||
return r;
|
||||
});
|
||||
|
||||
if (!showedSomething && dashboard.rows.length > 0) {
|
||||
// open the first row if nothing was opened and we have queries (o.w. it's meaningless)
|
||||
if (!showedSomething && dashboard.rows.length > 0 && _.size(queries) > 0) {
|
||||
dashboard.rows[0].collapse = false;
|
||||
}
|
||||
|
||||
|
||||
dashboard.pulldowns = [
|
||||
{
|
||||
"type": "query",
|
||||
|
|
|
@ -68,13 +68,8 @@ if (!_.isUndefined(ARGS.queries)) {
|
|||
}));
|
||||
marker_query = "(" + _.pluck(queries, "query").join(") OR (") + ")";
|
||||
} else {
|
||||
// No queries passed? Initialize a single query to match everything
|
||||
queries = {
|
||||
0: {
|
||||
query: '*',
|
||||
id: 0
|
||||
}
|
||||
};
|
||||
// No queries passed
|
||||
queries = {};
|
||||
}
|
||||
|
||||
var annotate_config;
|
||||
|
@ -690,7 +685,8 @@ dashboard.rows = _.map(rows, function (r) {
|
|||
return r;
|
||||
});
|
||||
|
||||
if (!showedSomething && dashboard.rows.length > 0) {
|
||||
// open the first row if nothing was opened and we have queries (o.w. it's meaningless)
|
||||
if (!showedSomething && dashboard.rows.length > 0 && _.size(queries) > 0) {
|
||||
dashboard.rows[0].collapse = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,10 @@ function (angular, app, $, _) {
|
|||
|
||||
$scope.links = _.filter(response.data.links, function (link) {
|
||||
a.attr("href", link.url);
|
||||
return a[0].href !== window.location.href;
|
||||
var current = window.location.href;
|
||||
// remove parameters
|
||||
current = current.replace(/\?.*$/,'');
|
||||
return a[0].href !== current;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue