summaryrefslogtreecommitdiffstats
path: root/openo-portal/portal-performance
diff options
context:
space:
mode:
author“shentao” <shentao@chinamobile.com>2016-11-07 13:30:31 +0800
committer“shentao” <shentao@chinamobile.com>2016-11-07 13:30:31 +0800
commit1799c18416ccb7e2bac1fd6aabcb74521f65da24 (patch)
treecb8a28f29d2cf52fab37219ed5cb630a58267613 /openo-portal/portal-performance
parentcf298fc4149e52135d5a712b345ac206abfc88cb (diff)
GSO-102
Change-Id: Iabd63832ff4682eff83b37fa07481bcdd91c6b30 Signed-off-by: “shentao” <shentao@chinamobile.com>
Diffstat (limited to 'openo-portal/portal-performance')
-rw-r--r--openo-portal/portal-performance/src/main/webapp/performance/alarm_view.html4
-rw-r--r--openo-portal/portal-performance/src/main/webapp/performance/js/alarmsUtil.js8
-rw-r--r--openo-portal/portal-performance/src/main/webapp/performance/js/curAlarmsController.js2
-rw-r--r--openo-portal/portal-performance/src/main/webapp/performance/js/performanceQueryController.js98
-rw-r--r--openo-portal/portal-performance/src/main/webapp/performance/performance_view.html4
5 files changed, 34 insertions, 82 deletions
diff --git a/openo-portal/portal-performance/src/main/webapp/performance/alarm_view.html b/openo-portal/portal-performance/src/main/webapp/performance/alarm_view.html
index 2e883ee6..6ec7048e 100644
--- a/openo-portal/portal-performance/src/main/webapp/performance/alarm_view.html
+++ b/openo-portal/portal-performance/src/main/webapp/performance/alarm_view.html
@@ -301,7 +301,7 @@
<script src="../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js" type="text/javascript"></script>
<script src="../common/thirdparty/bootbox/bootbox.min.js" type="text/javascript"></script>
<script src="../common/thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
- <script src="../common/thirdparty/data-tables/jquery.dataTables.js" type="text/javascript"></script>
+ <script src="../common/thirdparty/data-tables/jquery.dataTables-1.9.4.js"></script>
<script src="../common/thirdparty/bootstrap-daterangepicker/moment.js" type="text/javascript"></script>
<script src="../common/thirdparty/bootstrap-daterangepicker/daterangepicker.js" type="text/javascript"></script>
<script src="../common/js/international/loadi18n.js" type="text/javascript"></script>
@@ -333,7 +333,7 @@
<script src="js/alarmsServerPageTable.js" type="text/javascript"></script>
<script src="js/alarmsUtil.js" type="text/javascript"></script>
<script src="js/alarmConds.js" type="text/javascript"></script>
- <script src="js/performanceUtil.js" type="text/javascript"></script>
+ <script src="js/commonUtil.js" type="text/javascript"></script>
<script src="js/curAlarmsController.js" type="text/javascript"></script>
</body>
</html>
diff --git a/openo-portal/portal-performance/src/main/webapp/performance/js/alarmsUtil.js b/openo-portal/portal-performance/src/main/webapp/performance/js/alarmsUtil.js
index b0633cf2..c9e15206 100644
--- a/openo-portal/portal-performance/src/main/webapp/performance/js/alarmsUtil.js
+++ b/openo-portal/portal-performance/src/main/webapp/performance/js/alarmsUtil.js
@@ -173,7 +173,7 @@ alarmsUtil.loopDelAralms = function () {
if (aidArr.length > 0) {
bootbox.confirm('Are you sure to delete alarm(s)', function (result) {
if (result) {
- var sSource = "/api/umcfm/v1/curalarms?request={\"ids\":["+ aidArr +"]}";
+ var sSource = "/openoapi/umc/v1/fm/curalarms?request={\"ids\":["+ aidArr +"]}";
$.ajax({
type : "DELETE",
dataType : "json",
@@ -204,7 +204,7 @@ alarmsUtil.affirm = function (alarmIdArr,tableId,divId) {
if (vm.ruleType == 1) { //当前告警
request.ackState=1;
getData.request = JSON.stringify(request);
- url = "/api/umcfm/v1/curalarms";
+ url = "/openoapi/umc/v1/fm/curalarms";
} else { //历史告警
url = "/ngict/rest/fm/hisalarms"
}
@@ -240,7 +240,7 @@ alarmsUtil.unaffirm = function (alarmIdArr,tableId,divId) {
getData.request = JSON.stringify(request);
var url = "";
if (vm.ruleType == 1) { //当前告警
- url = "/api/umcfm/v1/curalarms";
+ url = "/openoapi/umc/v1/fm/curalarms";
$.ajax({
"type" : "PUT",
"contentType" : 'application/json; charset=utf-8',
@@ -356,7 +356,7 @@ alarmsUtil.initProbableCausesTree = function () {
async : false,
"dataType" : 'json',
"type" : "GET",
- "url" : "/api/umcfm/v1/probablecausestree",
+ "url" : "/openoapi/umc/v1/fm/probablecausestree",
"data" : getData,
"contentType" : 'application/json; charset=utf-8',
"success" : function (res, textStatus, jqXHR) {
diff --git a/openo-portal/portal-performance/src/main/webapp/performance/js/curAlarmsController.js b/openo-portal/portal-performance/src/main/webapp/performance/js/curAlarmsController.js
index 9711e760..9d7a29e7 100644
--- a/openo-portal/portal-performance/src/main/webapp/performance/js/curAlarmsController.js
+++ b/openo-portal/portal-performance/src/main/webapp/performance/js/curAlarmsController.js
@@ -128,7 +128,7 @@ var vm = avalon.define({
}
},
- $queryAlarmsInfoUrl: '/api/umcfm/v1/curalarms',
+ $queryAlarmsInfoUrl: '/openoapi/umc/v1/fm/curalarms',
$saveCondUrl: '/web/rest/web/fm/rules?isc_dataFormat=json',
fmConds: {},
$sunburstSetting: {width: 450, height: 400},
diff --git a/openo-portal/portal-performance/src/main/webapp/performance/js/performanceQueryController.js b/openo-portal/portal-performance/src/main/webapp/performance/js/performanceQueryController.js
index d0d6b2eb..93d5ef07 100644
--- a/openo-portal/portal-performance/src/main/webapp/performance/js/performanceQueryController.js
+++ b/openo-portal/portal-performance/src/main/webapp/performance/js/performanceQueryController.js
@@ -79,8 +79,7 @@ pm.query.vmPmQuery = avalon.define({
async: false,
"dataType": 'json',
"type": "GET",
- //"url": "/api/umcpm/v1/resources/" + resourceTypeId,
- "url": "/api/umcpm/v1/resources/",
+ "url": "/openoapi/umc/v1/pm/resources",
"contentType": 'application/json; charset=utf-8',
"success": function (res, textStatus, jqXHR) {
//var nodes = res.content;
@@ -161,7 +160,7 @@ pm.query.vmPmQuery = avalon.define({
async: false,
"dataType": 'json',
"type": "GET",
- "url": "/api/umcpm/v1/meatasks/" + el.id,
+ "url": "/openoapi/umc/v1/pm/meatasks/" + el.id,
"data": null,
"contentType": 'application/json; charset=utf-8',
"success": function (res, textStatus, jqXHR) {
@@ -256,7 +255,7 @@ pm.query.vmPmQuery = avalon.define({
});
});
//国际化
- var i18nItems = $("[name_i18n=com_zte_ums_ict_pm_query]");
+ var i18nItems = $("[name_i18n=openo_performance_i18n]");
for(var i=0;i<i18nItems.length;i++){
var $item = $(i18nItems.eq(i));
var itemId = $item.attr('id');
@@ -284,29 +283,32 @@ pm.query.vmPmQuery = avalon.define({
for(var i=0;i<pm.query.vmPmQuery.resourceSlected.length;i++){
for(var j=0;j<pm.query.vmPmQuery.resources.length;j++){
if(pm.query.vmPmQuery.resourceSlected[i] == pm.query.vmPmQuery.resources[j].id){
- resourcesToPut.push(pm.query.vmPmQuery.resources[j]);
+ var resource = {};
+ resource.id = pm.query.vmPmQuery.resources[j].id;
+ resource.name = pm.query.vmPmQuery.resources[j].name;
+ resource.resType = pm.query.vmPmQuery.resources[j].resType;
+ resourcesToPut.push(resource);
break;
}
}
}
var postData = {
- "resourceTypeId": pm.query.vmPmQuery.selectedResourceTypeId,
- "moTypeId": pm.query.vmPmQuery.selectedMoTypeId,
- //"resources": pm.query.vmPmQuery.resourceSlected,
- "resources": resourcesToPut,
- "counterOrIndexId": pm.query.vmPmQuery.selectedCounter,
- "granularity": pm.query.vmPmQuery.granularity,
- "beginTime": pm.query.vmPmQuery.beginTime,
- "endTime": pm.query.vmPmQuery.endTime,
- "pageNo": 0,
- "pageSize": 10
+ "resourceTypeId": pm.query.vmPmQuery.selectedResourceTypeId,
+ "moTypeId": pm.query.vmPmQuery.selectedMoTypeId,
+ "resources": resourcesToPut,
+ "counterOrIndexId": pm.query.vmPmQuery.selectedCounter,
+ "granularity": pm.query.vmPmQuery.granularity,
+ "beginTime": pm.query.vmPmQuery.beginTime,
+ "endTime": pm.query.vmPmQuery.endTime,
+ "pageNo": 0,
+ "pageSize": 10
}
pm.query.vmPmQuery.$postData = postData;
$.ajax({
//async:false,
"type": 'post',
- "url": "/api/umcpm/v1/historydataqueries",
+ "url": "/openoapi/umc/v1/pm/historydataqueries",
"dataType": "json",
"data": JSON.stringify(postData),
"contentType": 'application/json; charset=utf-8',
@@ -338,7 +340,7 @@ pm.query.vmPmQuery = avalon.define({
async: false,
"dataType": 'json',
"type": "GET",
- "url": "/api/umcpm/v1/meatasks/" + el.id,
+ "url": "/openoapi/umc/v1/pm/meatasks/" + el.id,
"data": null,
"contentType": 'application/json; charset=utf-8',
"success": function (res, textStatus, jqXHR) {
@@ -368,23 +370,7 @@ pm.query.vmPmQuery = avalon.define({
});
var counterOrIndexId = [];
var MoTypeId = modelItem.moType.id;
- /* $.ajax({
- async: false,
- "dataType": 'json',
- "type": "GET",
- //"url": "/api/umcpm/v1/motypes/indexes",
- "url": "/api/umcpm/v1/indexes",
- "data": getData,
- "contentType": 'application/json; charset=utf-8',
- "success": function (res, textStatus, jqXHR) {
- for(var i=0;i<res.length;i++){
- counterOrIndexId.push(res[i].id);
- }
- },
- "error": function () {
- }
- }); */
- var url="/api/umcpm/v1/motypes/" + MoTypeId + "/counters";
+ var url="/openoapi/umc/v1/pm/motypes/" + MoTypeId + "/counters";
var data={};
data.moTypeId=MoTypeId;
$.ajax({
@@ -426,7 +412,7 @@ pm.query.vmPmQuery = avalon.define({
$.ajax({
//async:false,
"type": 'post',
- "url": "/api/umcpm/v1/historydataqueries",
+ "url": "/openoapi/umc/v1/pm/historydataqueries",
"dataType": "json",
"data": JSON.stringify(postData),
"contentType": 'application/json; charset=utf-8',
@@ -517,9 +503,7 @@ pm.query.vmPmQuery = avalon.define({
setting.language = this.$language;
setting.columns = this.$queryDataTableFields;
setting.pageHtml="r<'table-scrollable't><'row page-info-bottom'<'col-md-12 col-sm-12'lip>>>";
- //setting.restUrl ="/api/umcpm/v1/indexes";
- //setting.restUrl ="../../json/thresholdList.json";
- setting.restUrl = "/api/umcpm/v1/historydataqueries";
+ setting.restUrl = "/openoapi/umc/v1/pm/historydataqueries";
setting.tableId = "ict_pm_data";
serverPageTable.initDataTable(setting, 'ict_pm_data_div' );
}
@@ -559,8 +543,7 @@ $.ajax({
async: false,
"dataType": 'json',
"type": "GET",
- "url": "/api/umcpm/v1/meatasks",
- //"url": "../../js/meatask/testList.json",
+ "url": "/openoapi/umc/v1/pm/meatasks",
"data": null,
"contentType": 'application/json; charset=utf-8',
"success": function (res, textStatus, jqXHR) {
@@ -633,9 +616,7 @@ function fnServerData(sSource, aoData, fnCallback, oSettings) {
oSettings.jqXHR = $.ajax({
"type": 'post',
- //"type": 'get',
"url": sSource,
- //"url": "../../js/meatask/testMulti1.json",
"dataType": "json",
"data": JSON.stringify(pm.query.vmPmQuery.$postData),
"contentType": 'application/json; charset=utf-8',
@@ -729,7 +710,6 @@ setTimeout(function(){
newIndexWizard = function (idx,action) {
//获取资源类型
- //getResTypeArray();
var resourceTypeId;
var moTypeId;
@@ -743,27 +723,10 @@ newIndexWizard = function (idx,action) {
} */
}();
-function getResTypeArray(){
- var url="/api/umcpm/v1/resourcetypes";
- $.ajax({
- "type": 'get',
- "url": url,
- "dataType": "json",
- "async": false,
- "success": function (resp) {
- //pm.query.vmPmQuery.resTypeArray= resp.content;
- pm.query.vmPmQuery.resTypeArray= resp;
- },
- "error":function(resp){
- // pm.index.vm.ResTypeArray=resp;
- }
- });
-}
-
function getMoTypeArray(resourceTypeId){
if(resourceTypeId){
//获取测量类型
- var url="/api/umcpm/v1/motypes";
+ var url="/openoapi/umc/v1/pm/motypes";
var data={};
data.resourceTypeId=resourceTypeId;
$.ajax({
@@ -788,7 +751,7 @@ function getMoTypeArray(resourceTypeId){
function getCounterArray(MoTypeId){
if(MoTypeId){
- var url="/api/umcpm/v1/motypes/"+MoTypeId+"/counters";
+ var url="/openoapi/umc/v1/pm/motypes/"+MoTypeId+"/counters";
var data={};
data.moTypeId=MoTypeId;
$.ajax({
@@ -845,14 +808,3 @@ function getObjFromName(name,array){
}
}
}
-
-/* function allCheckbox(obj) {
- var isChecked = obj.checked;
- var tableId = $(obj).parents(".table").attr("id");
- $('td.checkBoxInFirstCol', $("#" + tableId)).each(function() {
- var temp = $(this).children('input');
- temp[0].checked = isChecked;
- });
-} */
-
-
diff --git a/openo-portal/portal-performance/src/main/webapp/performance/performance_view.html b/openo-portal/portal-performance/src/main/webapp/performance/performance_view.html
index 4b192c25..9f730159 100644
--- a/openo-portal/portal-performance/src/main/webapp/performance/performance_view.html
+++ b/openo-portal/portal-performance/src/main/webapp/performance/performance_view.html
@@ -104,12 +104,12 @@
<script>
loadi18n_WebFramework('web-performance-i18n', 'i18n/', 'openo_performance_i18n');
</script>
- <script src="../common/thirdparty/data-tables/jquery.dataTables.js"></script>
+ <script src="../common/thirdparty/data-tables/jquery.dataTables-1.9.4.js"></script>
<script src="../common/thirdparty/bootbox/bootbox.min.js"type="text/javascript"></script>
<script src="../common/thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="../common/thirdparty/jquery-validation/js/jquery.validate.js"></script>
<script src="../common/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
- <script src="../common/thirdparty/echarts/echarts-all.js" type="text/javascript"></script>
+ <script src="../common/thirdparty/echarts/echarts.js" type="text/javascript"></script>
<script src="../common/thirdparty/bootstrap-daterangepicker/moment.js"></script>
<script src="../common/thirdparty/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="../common/thirdparty/avalon/avalon.js"></script>