-
Notifications
You must be signed in to change notification settings - Fork 44
/
ConfigNodeChartsModel.js
55 lines (53 loc) · 1.86 KB
/
ConfigNodeChartsModel.js
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
/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
define([
'contrail-list-model'
], function (ContrailListModel) {
var ConfigNodeChartsModel = function () {
var queryPostData = {
"autoSort": true,
"async": false,
"formModelAttrs": {
"table_name": "StatTable.VncApiStatsLog.api_stats",
"table_type": "STAT",
"query_prefix": "stat",
"time_range": "3600",
"from_time": Date.now() - (2 * 60 * 60 * 1000),
"from_time_utc": Date.now() - (2 * 60 * 60 * 1000),
"to_time": Date.now(),
"to_time_utc": Date.now(),
"select": "Source, T, UUID, api_stats.operation_type," +
" api_stats.user, api_stats.useragent, api_stats.remote_ip," +
" api_stats.domain_name, api_stats.project_name, api_stats.object_type," +
" api_stats.response_time_in_usec, api_stats.response_size," +
" api_stats.resp_code, name",
"time_granularity_unit": "secs",
"where": "",
"where_json": null,
"filter_json": null,
"direction": "1",
"filters": "",
"limit": "150000"
},
};
var listModelConfig = {
remote : {
ajaxConfig : {
url : "/api/qe/query",
type: 'POST',
data: JSON.stringify(queryPostData)
},
dataParser : function (response) {
return response['data'];
}
},
cacheConfig : {
ucid: ctwl.CACHE_CONFIGNODE_CHARTS
}
};
return ContrailListModel(listModelConfig);
};
return ConfigNodeChartsModel;
}
);