mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Primarily- moving majority of the types and utils from @grafana/ui to @grafana/data * Move types from grafana-ui to grafana-data * Move valueFormats to grafana-data * Move utils from grafana-ui to grafana-data * Update imports in grafana-ui * revert data's tsconfig change * Update imports in grafana-runtime * Fix import paths in grafana-ui * Move rxjs to devDeps * Core import updates batch 1 * Import updates batch 2 * Imports fix batch 3 * Imports fixes batch i don't know * Fix imorts in grafana-toolkit * Fix imports after master merge
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import InfluxDatasource from './datasource';
|
|
import { InfluxQueryCtrl } from './query_ctrl';
|
|
import { InfluxLogsQueryField } from './components/InfluxLogsQueryField';
|
|
import InfluxStartPage from './components/InfluxStartPage';
|
|
|
|
import {
|
|
createChangeHandler,
|
|
createResetHandler,
|
|
PasswordFieldEnum,
|
|
} from '../../../features/datasources/utils/passwordHandlers';
|
|
import { DataSourcePlugin } from '@grafana/data';
|
|
|
|
class InfluxConfigCtrl {
|
|
static templateUrl = 'partials/config.html';
|
|
current: any;
|
|
onPasswordReset: ReturnType<typeof createResetHandler>;
|
|
onPasswordChange: ReturnType<typeof createChangeHandler>;
|
|
|
|
constructor() {
|
|
this.onPasswordReset = createResetHandler(this, PasswordFieldEnum.Password);
|
|
this.onPasswordChange = createChangeHandler(this, PasswordFieldEnum.Password);
|
|
this.current.jsonData.httpMode = this.current.jsonData.httpMode || 'GET';
|
|
}
|
|
|
|
httpMode = [{ name: 'GET', value: 'GET' }, { name: 'POST', value: 'POST' }];
|
|
}
|
|
|
|
class InfluxAnnotationsQueryCtrl {
|
|
static templateUrl = 'partials/annotations.editor.html';
|
|
}
|
|
|
|
export const plugin = new DataSourcePlugin(InfluxDatasource)
|
|
.setConfigCtrl(InfluxConfigCtrl)
|
|
.setQueryCtrl(InfluxQueryCtrl)
|
|
.setAnnotationQueryCtrl(InfluxAnnotationsQueryCtrl)
|
|
.setExploreLogsQueryField(InfluxLogsQueryField)
|
|
.setExploreStartPage(InfluxStartPage);
|