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

@@ -7,6 +7,8 @@ import * as migrations from './migrations';
import './add-metric-function.directive';
import './metric-function-editor.directive';
import './css/query-editor.css!';
export class ZabbixQueryController extends QueryCtrl {
// ZabbixQueryCtrl constructor
@@ -171,9 +173,13 @@ export class ZabbixQueryController extends QueryCtrl {
}
onTargetPartChange(targetPart) {
var regexStyle = {'color': '#CCA300'};
/*var regexStyle = {'color': '#CCA300'};
targetPart.isRegex = utils.isRegex(targetPart.filter);
targetPart.style = targetPart.isRegex ? regexStyle : {};
targetPart.style = targetPart.isRegex ? regexStyle : {};*/
}
isRegex(str) {
return utils.isRegex(str);
}
onTargetBlur() {