Commit a1b543aa by Torkel Ödegaard

shore: cleanup unused stuff in common.d.ts

parent e1a86e63
///<reference path="../../headers/common.d.ts" />
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment'; import moment from 'moment';
declare var window: any; 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) { export function exportSeriesListToCsv(seriesList, dateTimeFormat = DEFAULT_DATETIME_FORMAT, excel = false) {
var text = excel ? 'sep=;\n' : '' + 'Series;Time;Value\n'; var text = excel ? 'sep=;\n' : '' + 'Series;Time;Value\n';
......
///<reference path="../../../headers/common.d.ts" />
import angular from 'angular'; import angular from 'angular';
import * as fileExport from 'app/core/utils/file_export'; import * as fileExport from 'app/core/utils/file_export';
import appEvents from 'app/core/app_events'; import appEvents from 'app/core/app_events';
...@@ -8,7 +6,7 @@ export class ExportDataModalCtrl { ...@@ -8,7 +6,7 @@ export class ExportDataModalCtrl {
private data: any[]; private data: any[];
private panel: string; private panel: string;
asRows: Boolean = true; asRows: Boolean = true;
dateTimeFormat: String = 'YYYY-MM-DDTHH:mm:ssZ'; dateTimeFormat = 'YYYY-MM-DDTHH:mm:ssZ';
excel: false; excel: false;
export() { export() {
......
declare var System: any; 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' { declare module 'eventemitter3' {
var config: any; var config: any;
export default config; export default config;
} }
declare module 'mousetrap' {
var config: any;
export default config;
}
declare module 'remarkable' {
var config: any;
export default config;
}
declare module 'd3' { declare module 'd3' {
var d3: any; var d3: any;
export default d3; export default d3;
} }
declare module 'ace' {
var ace: any;
export default ace;
}
///<reference path="../../../headers/common.d.ts" />
import moment from 'moment'; import moment from 'moment';
const intervalMap = { const intervalMap = {
...@@ -29,10 +27,11 @@ export class IndexPattern { ...@@ -29,10 +27,11 @@ export class IndexPattern {
var intervalInfo = intervalMap[this.interval]; var intervalInfo = intervalMap[this.interval];
var start = moment(from).utc().startOf(intervalInfo.startOf); 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 = []; var indexList = [];
while (start <= end) { while (startEpoch <= endEpoch) {
indexList.push(start.format(this.pattern)); indexList.push(start.format(this.pattern));
start.add(1, intervalInfo.amount); start.add(1, intervalInfo.amount);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment