Improved regex highlighting in query editor (using custom css).

Removed unused fields from targets ('isRegex' and 'style').
This commit is contained in:
Alexander Zobnin
2016-03-30 21:41:37 +03:00
parent 98f77ee661
commit 2ffc5ca297
5 changed files with 16 additions and 11 deletions

View File

@@ -19,13 +19,9 @@ export function isGrafana2target(target) {
export function migrateFrom2To3version(target) {
target.group.filter = target.group.name === "*" ? "/.*/" : target.group.name;
target.group.isRegex = target.group.name === "*";
target.host.filter = target.host.name === "*" ? convertToRegex(target.hostFilter) : target.host.name;
target.host.isRegex = target.host.name === "*";
target.application.filter = target.application.name === "*" ? "" : target.application.name;
target.application.isRegex = target.application.name === "*";
target.item.filter = target.item.name === "All" ? convertToRegex(target.itemFilter) : target.item.name;
target.item.isRegex = target.item.name === "All";
return target;
}