mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 20:59:35 +08:00
prettier: change to single quoting
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
///<reference path="../../../headers/common.d.ts" />
|
||||
|
||||
import _ from "lodash";
|
||||
import { QueryCtrl } from "app/plugins/sdk";
|
||||
import _ from 'lodash';
|
||||
import { QueryCtrl } from 'app/plugins/sdk';
|
||||
|
||||
export interface PostgresQuery {
|
||||
refId: string;
|
||||
@ -24,7 +24,7 @@ WHERE
|
||||
`;
|
||||
|
||||
export class PostgresQueryCtrl extends QueryCtrl {
|
||||
static templateUrl = "partials/query.editor.html";
|
||||
static templateUrl = 'partials/query.editor.html';
|
||||
|
||||
showLastQuerySQL: boolean;
|
||||
formats: any[];
|
||||
@ -37,29 +37,29 @@ export class PostgresQueryCtrl extends QueryCtrl {
|
||||
constructor($scope, $injector) {
|
||||
super($scope, $injector);
|
||||
|
||||
this.target.format = this.target.format || "time_series";
|
||||
this.target.alias = "";
|
||||
this.target.format = this.target.format || 'time_series';
|
||||
this.target.alias = '';
|
||||
this.formats = [
|
||||
{ text: "Time series", value: "time_series" },
|
||||
{ text: "Table", value: "table" }
|
||||
{ text: 'Time series', value: 'time_series' },
|
||||
{ text: 'Table', value: 'table' },
|
||||
];
|
||||
|
||||
if (!this.target.rawSql) {
|
||||
// special handling when in table panel
|
||||
if (this.panelCtrl.panel.type === "table") {
|
||||
this.target.format = "table";
|
||||
this.target.rawSql = "SELECT 1";
|
||||
if (this.panelCtrl.panel.type === 'table') {
|
||||
this.target.format = 'table';
|
||||
this.target.rawSql = 'SELECT 1';
|
||||
} else {
|
||||
this.target.rawSql = defaultQuery;
|
||||
}
|
||||
}
|
||||
|
||||
this.panelCtrl.events.on(
|
||||
"data-received",
|
||||
'data-received',
|
||||
this.onDataReceived.bind(this),
|
||||
$scope
|
||||
);
|
||||
this.panelCtrl.events.on("data-error", this.onDataError.bind(this), $scope);
|
||||
this.panelCtrl.events.on('data-error', this.onDataError.bind(this), $scope);
|
||||
}
|
||||
|
||||
onDataReceived(dataList) {
|
||||
|
Reference in New Issue
Block a user