Merge "Remove age operator when drilling down from a dashboard to a query"
This commit is contained in:
@@ -70,7 +70,7 @@ public class DashboardTable extends ChangeTable2 {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for (String title : titles) {
|
for (String title : titles) {
|
||||||
Section s = new Section();
|
Section s = new Section();
|
||||||
String query = removeLimit(queries.get(i++));
|
String query = removeLimitAndAge(queries.get(i++));
|
||||||
s.setTitleWidget(new InlineHyperlink(title, PageLinks.toChangeQuery(query)));
|
s.setTitleWidget(new InlineHyperlink(title, PageLinks.toChangeQuery(query)));
|
||||||
addSection(s);
|
addSection(s);
|
||||||
sections.add(s);
|
sections.add(s);
|
||||||
@@ -84,11 +84,12 @@ public class DashboardTable extends ChangeTable2 {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private String removeLimit(String query) {
|
private String removeLimitAndAge(String query) {
|
||||||
StringBuilder unlimitedQuery = new StringBuilder();
|
StringBuilder unlimitedQuery = new StringBuilder();
|
||||||
String[] operators = query.split(" ");
|
String[] operators = query.split(" ");
|
||||||
for (String o : operators) {
|
for (String o : operators) {
|
||||||
if (!o.startsWith("limit:")) {
|
if (!o.startsWith("limit:")
|
||||||
|
&& !o.startsWith("age:") && !o.startsWith("-age:")) {
|
||||||
unlimitedQuery.append(o).append(" ");
|
unlimitedQuery.append(o).append(" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user