-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1)Replaced the database reads stack bar chart with analytics database usage in analytics summary page 2)Fixed the issue last bar is hidden in all summary page stack charts. Unit test results ---------------- Web Controller ------------- PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 376 of 376 SUCCESS (3 mins 19.735 secs / 3 mins 7.889 secs) Change-Id: I6df650b41955a0e3fa01a140b10662edca0be9d1
- Loading branch information
Showing
6 changed files
with
118 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
webroot/monitor/infrastructure/common/ui/js/models/DatabaseUsageModel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. | ||
*/ | ||
|
||
define([ | ||
'contrail-list-model' | ||
], function (ContrailListModel) { | ||
var DatabaseUsageModel = function () { | ||
var queryPostData = { | ||
"autoSort": true, | ||
"async": false, | ||
"formModelAttrs": { | ||
"table_name": "StatTable.DatabaseUsageInfo.database_usage", | ||
"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, MAX(database_usage.analytics_db_size_1k)", | ||
"time_granularity_unit": "secs", | ||
"limit": "150000" | ||
}, | ||
}; | ||
var listModelConfig = { | ||
remote : { | ||
ajaxConfig : { | ||
url : "/api/qe/query", | ||
type: 'POST', | ||
data: JSON.stringify(queryPostData) | ||
}, | ||
dataParser : function (response) { | ||
var stats = getValueByJsonPath(response, 'data', []); | ||
$.each(stats, function(idx, obj) { | ||
obj['MAX(database_usage.analytics_db_size_1k)'] = | ||
ifNull(obj['MAX(database_usage.analytics_db_size_1k)'],0) * 1024; //Converting KB to Bytes | ||
}); | ||
listModel.queryJSON = response['queryJSON']; | ||
return stats; | ||
} | ||
}, | ||
cacheConfig : { | ||
|
||
} | ||
}; | ||
var listModel = new ContrailListModel(listModelConfig) | ||
return listModel; | ||
}; | ||
return DatabaseUsageModel; | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters