This repository has been archived by the owner on Aug 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
common.d.ts
215 lines (192 loc) · 5.41 KB
/
common.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/// <reference path="./es6-shim/es6-shim.d.ts" />
declare var System: any;
// dummy modules
declare module 'app/core/config' {
var config: any;
export default config;
}
declare module 'app/core/core_module' {
var coreModule: any;
export default coreModule;
}
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 'q' {
var q: any;
export default q;
}
declare module 'app/core/time_series2' {
var time_series2: any;
export default time_series2;
}
declare module 'app/core/table_model' {
var table_model: any;
export default table_model;
}
declare module 'app/core/utils/file_export' {
var file_export: any;
export default file_export;
}
declare module 'app/core/utils/flatten' {
var flatten: any;
export default flatten;
}
declare module 'app/core/utils/kbn' {
var kbn: any;
export default kbn;
// var interval_regex: string;
// var intervals_in_seconds: string;
// var formatBuilders: any;
// var valueFormats: any;
// export function round_interval(interval: number): number;
// export function secondsToHms(seconds: number): string;
// export function to_percent(number: number, outof: number): string;
// export function calculateInterval(range: any, resolution: any, userInterval: any);
// export function describe_interval(string: string): any;
// export function interval_to_ms(string: string): number;
// export function interval_to_seconds(string: string): number;
// export function query_color_dot(color: string, diameter: string|number): string;
// export function slugifyForUrl(str: string): string;
// export function stringToJsRegex(str: string): RegExp;
// export function toFixed(value: any, decimals: any): any;
// export function toFixedScaled(value: any, decimals: any, scaledDecimals: any, additionalDecimals: any, ext: any);
// export function roundValue(num: number, decimals: number): number;
// export function toDuration(size, decimals, timeScale): string;
// export function getUnitFormats(): any;
}
declare module 'app/core/store' {
var store: any;
export default store;
}
declare module 'app/core/app_events' {
var appEvents: any;
export default appEvents;
}
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 'app/core/utils/datemath' {
export function parse(text: any, roundUp?: any): any;
export function isValid(text: any): any;
export function parseDateMath(mathString: any, time: any, roundUp?: any): any;
}
declare module 'app/plugins/sdk' {
export class PanelCtrl{
constructor($scope:any, $injector: any);
panel: any;
error: any;
row: any;
dashboard: any;
editorTabIndex: number;
pluginName: string;
pluginId: string;
editorTabs: any;
$scope: any;
$injector: any;
$timeout: any;
fullscreen: boolean;
inspector: any;
editModeInitiated: boolean;
editorHelpIndex: number;
editMode: any;
height: any;
containerHeight: any;
events: any;
timing: any;
init(): void;
renderingCompleted(): void;
refresh(): void;
publishAppEvent(evtName: any, evt: any): void;
changeView(fullscreen: boolean, edit: boolean): void;
viewPanel(): void;
editPanel(): void;
exitFullscreen(): void;
initEditMode(): void;
changeTab(newIndex: any): void;
addEditorTab(title: any, directiveFn: any, index?: any): void;
getMenu(): any;
getExtendedMenu(): any;
otherPanelInFullscreenMode(): boolean;
calculatePanelHeight(): void;
render(payload?: any): void;
toggleEditorHelp(index: any): void;
duplicate(): void;
updateColumnSpan(span: any): void;
removePanel(): void;
editPanelJson(): void;
replacePanel(newPanel: any, oldPanel: any): void;
sharePanel(): void;
getInfoMode(): void;
getInfoContent(options: any): void;
openInspector(): void;
}
export class MetricsPanelCtrl extends PanelCtrl{
constructor($scope:any, $injector: any);
scope: any;
loading: boolean;
datasource: any;
datasourceName: any;
$q: any;
$timeout: any;
datasourceSrv: any;
timeSrv: any;
templateSrv: any;
timing: any;
range: any;
interval: any;
intervalMs: any;
resolution: any;
timeInfo: any;
skipDataOnInit: boolean;
dataStream: any;
dataSubscription: any;
dataList: any;
nextRefId: string;
setTimeQueryStart() :void
setTimeQueryEnd() :void
updateTimeRange(datasource?) :void
calculateInterval() :void
applyPanelTimeOverrides() :void
issueQueries(datasource) :void
handleQueryResult(result) :void
handleDataStream(stream) :void
setDatasource(datasource) :void
addQuery(target) :void
removeQuery(target) :void
moveQuery(target, direction) :void;
}
export class QueryCtrl{
constructor($scope:any, $injector: any);
target: any;
panelCtrl: any;
panel: any;
datasource: any;
hasRawMode: boolean;
error: string;
refresh(): void;
}
export function loadPluginCss(options: any): void;
}