shore: cleanup unused stuff in common.d.ts

This commit is contained in:
Torkel Ödegaard 2017-10-03 18:27:25 +02:00
parent e1a86e63b8
commit a1b543aa35
4 changed files with 5 additions and 72 deletions

View File

@ -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';

View File

@ -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() {

View File

@ -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;
}

View File

@ -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);
}