mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
shore: cleanup unused stuff in common.d.ts
This commit is contained in:
parent
e1a86e63b8
commit
a1b543aa35
@ -1,11 +1,9 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import _ from 'lodash';
|
||||
import moment from 'moment';
|
||||
|
||||
declare var window: any;
|
||||
|
||||
const DEFAULT_DATETIME_FORMAT: String = 'YYYY-MM-DDTHH:mm:ssZ';
|
||||
const DEFAULT_DATETIME_FORMAT = 'YYYY-MM-DDTHH:mm:ssZ';
|
||||
|
||||
export function exportSeriesListToCsv(seriesList, dateTimeFormat = DEFAULT_DATETIME_FORMAT, excel = false) {
|
||||
var text = excel ? 'sep=;\n' : '' + 'Series;Time;Value\n';
|
||||
|
@ -1,5 +1,3 @@
|
||||
///<reference path="../../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import * as fileExport from 'app/core/utils/file_export';
|
||||
import appEvents from 'app/core/app_events';
|
||||
@ -8,7 +6,7 @@ export class ExportDataModalCtrl {
|
||||
private data: any[];
|
||||
private panel: string;
|
||||
asRows: Boolean = true;
|
||||
dateTimeFormat: String = 'YYYY-MM-DDTHH:mm:ssZ';
|
||||
dateTimeFormat = 'YYYY-MM-DDTHH:mm:ssZ';
|
||||
excel: false;
|
||||
|
||||
export() {
|
||||
|
62
public/app/headers/common.d.ts
vendored
62
public/app/headers/common.d.ts
vendored
@ -1,74 +1,12 @@
|
||||
|
||||
declare var System: any;
|
||||
|
||||
// dummy modules
|
||||
declare module 'app/core/config' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'lodash' {
|
||||
var lodash: any;
|
||||
export default lodash;
|
||||
}
|
||||
|
||||
declare module 'moment' {
|
||||
var moment: any;
|
||||
export default moment;
|
||||
}
|
||||
|
||||
declare module 'angular' {
|
||||
var angular: any;
|
||||
export default angular;
|
||||
}
|
||||
|
||||
declare module 'jquery' {
|
||||
var jquery: any;
|
||||
export default jquery;
|
||||
}
|
||||
|
||||
declare module 'app/core/utils/kbn' {
|
||||
var kbn: any;
|
||||
export default kbn;
|
||||
}
|
||||
|
||||
declare module 'app/core/store' {
|
||||
var store: any;
|
||||
export default store;
|
||||
}
|
||||
|
||||
declare module 'tether' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'tether-drop' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'eventemitter3' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'mousetrap' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'remarkable' {
|
||||
var config: any;
|
||||
export default config;
|
||||
}
|
||||
|
||||
declare module 'd3' {
|
||||
var d3: any;
|
||||
export default d3;
|
||||
}
|
||||
|
||||
declare module 'ace' {
|
||||
var ace: any;
|
||||
export default ace;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
///<reference path="../../../headers/common.d.ts" />
|
||||
|
||||
import moment from 'moment';
|
||||
|
||||
const intervalMap = {
|
||||
@ -29,10 +27,11 @@ export class IndexPattern {
|
||||
|
||||
var intervalInfo = intervalMap[this.interval];
|
||||
var start = moment(from).utc().startOf(intervalInfo.startOf);
|
||||
var end = moment(to).utc().startOf(intervalInfo.startOf).valueOf();
|
||||
var startEpoch = start.valueOf();
|
||||
var endEpoch = moment(to).utc().startOf(intervalInfo.startOf).valueOf();
|
||||
var indexList = [];
|
||||
|
||||
while (start <= end) {
|
||||
while (startEpoch <= endEpoch) {
|
||||
indexList.push(start.format(this.pattern));
|
||||
start.add(1, intervalInfo.amount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user