Skip to content

Commit b0dff17

Browse files
committed
fix: remove unused import and update variable reference in chart and code editor components
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 0ed77fa commit b0dff17

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

frontend/src/app/graphic-builder/chart-builder/chart-builder.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {CodeEditorComponent, ConsoleOptions} from '../../shared/components/code-
2121
import {
2222
ElasticFilterDefaultTime
2323
} from '../../shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component';
24-
import {UTM_CHART_ICONS} from '../../shared/constants/icons-chart.const';
2524
import {ALERT_INDEX_PATTERN, LOG_INDEX_PATTERN} from '../../shared/constants/main-index-pattern.constant';
2625
import {MULTIPLE_METRIC_CHART} from '../../shared/constants/visualization-bucket-metric.constant';
2726
import {ChartBuilderQueryLanguageEnum} from '../../shared/enums/chart-builder-query-language.enum';
@@ -92,6 +91,7 @@ export class ChartBuilderComponent implements OnInit, AfterViewChecked {
9291
private localFieldService: LocalFieldService,
9392
private sqlValidationService: SqlValidationService,
9493
private indexPatternService: IndexPatternService) {
94+
9595
route.queryParams.subscribe(params => {
9696
this.chart = params[VisualizationQueryParamsEnum.CHART];
9797
this.mode = params[VisualizationQueryParamsEnum.MODE];

frontend/src/app/shared/components/code-editor/code-editor.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,12 @@ export class CodeEditorComponent implements OnInit, OnDestroy, ControlValueAcces
200200
}
201201
}
202202

203-
const originalFragment = sql.substring(start, end).trim();
203+
const originalFragment = normalized.substring(start, end).trim();
204204

205205
if (originalFragment.length > 0) {
206206
const indexPatternSelected = this.customKeywords.find(keyword => keyword === originalFragment);
207207

208208
if (indexPatternSelected) {
209-
console.log(indexPatternSelected);
210209
this.indexPatternChange.emit(indexPatternSelected);
211210
}
212211
}

0 commit comments

Comments
 (0)