aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshentao <shentao@chinamobile.com>2017-09-20 18:39:35 +0800
committershentao <shentao@chinamobile.com>2017-09-20 18:39:43 +0800
commit443ce34bafc3e7aa716728a7b8cd0288bf923287 (patch)
treeee1d96de7f24aa3aee913de5c6b687ea4a642657
parent290e9b481168cbb753758ffbe95765e77233ebd6 (diff)
Upload alarm display pages
Change-Id: I1dce4ae37288adc57bce21845c6f9469b6defa77 Issue-Id: USECASEUI-33 Signed-off-by: shentao <shentao@chinamobile.com>
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/css/UUImain.css18
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js14
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/chartLoad.js46
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js109
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/left-menuController.js15
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js21
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performanceController.js103
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html53
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/left-menu.html15
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-details.html117
-rw-r--r--usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html22
11 files changed, 420 insertions, 113 deletions
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/css/UUImain.css b/usecaseui-monitor/src/main/webapp/app/uui/fusion/css/UUImain.css
index 3a8636a4..33840f1c 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/css/UUImain.css
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/css/UUImain.css
@@ -1,4 +1,20 @@
-/*
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
1. CSS Imports
2. General Styles
3. Sidebar
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js
index c5558eca..ee1533cf 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/appUUI.js
@@ -1,5 +1,19 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
//$(document).ready( function() {
//
// // sidebar menu click
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/chartLoad.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/chartLoad.js
index 44025e92..a402dd56 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/chartLoad.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/chartLoad.js
@@ -1,11 +1,25 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
historicalBarChart = [
{ "type":"bar", "key": "memory", "yAxis": "1", "values": [{ "x":1388552400000 , "y":10},
{ "x":1391230800000 , "y":4}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":12},
{ "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.93},
{ "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":19.04},
- { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.62333333333333},
- { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":16.1166666666667} ] } ];
+ { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":15.73}
+ ] } ];
var chart1,chart2,chart3,chart4;
nv.addGraph(function() {
chart1 = nv.models.multiBarChart()
@@ -19,13 +33,16 @@ nv.addGraph(function() {
.legendPos('top')
.color(d3.scale.category10().range());
chart1.xAxis
- .tickValues([1388552400000,1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000,1420088400000,1422766800000])
+ .tickValues([1388552400000, 1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,
+ 1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000])
.staggerLabels(false)
.showMaxMin(false)
.rotateLabels(90)
- .axisLabel('Timestamp')
+ //.axisLabel('Timestamp')
.tickFormat(function(d) {
- return d3.time.format('%b %y')(new Date(d)) });
+ return d3.time.format('%b %y')(new Date(d))
+ }
+ );
chart1.yAxis
.logScale(false)
.axisLabel('')
@@ -77,7 +94,7 @@ nv.addGraph(function() {
.stacked(false)
.logScale(false)
.legendPos('top')
- .color(d3.scale.category20c().range());
+ .color(d3.scale.category50().range());
chart3.xAxis
.tickValues([1388552400000,1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000,1420088400000,1422766800000])
.staggerLabels(false)
@@ -90,7 +107,7 @@ nv.addGraph(function() {
.logScale(false)
.axisLabel('')
.tickFormat(d3.format(',.1f'));
- d3.select('#Diskchart svg')
+ d3.select('#Networkchart svg')
.datum(historicalBarChart)
.transition().duration(1000)
.call(chart3);
@@ -127,6 +144,7 @@ nv.addGraph(function() {
nv.utils.windowResize(chart4.update);
return chart4;
});
+
function redraw() {
d3.select('#CPUchart svg')
.datum(historicalBarChart)
@@ -149,10 +167,10 @@ function redraw() {
setInterval(function () {
redraw();
}, 1500);
-if(historicalBarChart.length <= 0 ) {
- document.getElementById("CPUchart").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
- document.getElementById("CPUchart").className="nodatadiv";
- document.getElementById("Memorychart").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
- document.getElementById("Memorychart").className="nodatadiv";
- document.getElementById("nodata").className="nodatainner";
-} \ No newline at end of file
+//if(historicalBarChart.length <= 0 ) {
+// document.getElementById("CPUchart").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
+// document.getElementById("CPUchart").className="nodatadiv";
+// document.getElementById("Memorychart").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
+// document.getElementById("Memorychart").className="nodatadiv";
+// document.getElementById("nodata").className="nodatainner";
+//} \ No newline at end of file
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js
index 6ca18ac6..b268ed31 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/alarmController.js
@@ -1,3 +1,18 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
app.controller('perCtrl', function ($scope) {
});
@@ -66,10 +81,10 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
field: 'name',
displayName: 'name',
width: '8%',
- enableColumnMenu: false,// 是否显示列头部菜单按钮
+ enableColumnMenu: false,
enableHiding: false,
suppressRemoveSort: true,
- enableCellEdit: false // 是否可编辑
+ enableCellEdit: false
},
{field: "Id"},
{field: "State",cellFilter:'mapGender'},
@@ -78,55 +93,53 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
{field: "Disk"},
{field: "Network"},
{field: "Action", cellTemplate :
- '<div uib-dropdown style="position: absolute;padding-left: 4%;"><button id="btn-append-to-single-button" type="button" style="padding:0;" class="btn btn-primary" uib-dropdown-toggle>Action<span class="caret"></span></button><ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="btn-append-to-single-button"><li role="menuitem"><a href="#">1</a></li><li role="menuitem"><a href="#">2</a></li><li role="menuitem"><a href="#">3</a></li></ul></div>'
+ '<div uib-dropdown style="position: absolute;padding-left: 4%;"><button id="btn-append-to-single-button" type="button" style="padding:0;" class="btn btn-primary" uib-dropdown-toggle>Action<span class="caret"></span></button><ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="btn-append-to-single-button"><li role="menuitem"><a href="#">clear</a></li><li role="menuitem"><a href="#">2</a></li><li role="menuitem"><a href="#">3</a></li></ul></div>'
, enableCellEdit:false},
],
- enableSorting: true, //是否排序
- useExternalSorting: false, //是否使用自定义排序规则
- enableGridMenu: true, //是否显示grid 菜单
- showGridFooter: true, //是否显示grid footer
- enableHorizontalScrollbar: 1, //grid水平滚动条是否显示, 0-不显示 1-显示
- enableVerticalScrollbar: 0, //grid垂直滚动条是否显示, 0-不显示 1-显示
+ enableSorting: true,
+ useExternalSorting: false,
+ enableGridMenu: true,
+ showGridFooter: true,
+ enableHorizontalScrollbar: 1,
+ enableVerticalScrollbar: 0,
enableFiltering: true,
- //-------- 分页属性 ----------------
- enablePagination: true, //是否分页,默认为true
- enablePaginationControls: true, //使用默认的底部分页
- paginationPageSizes: [10, 15, 20], //每页显示个数可选项
- paginationCurrentPage: 1, //当前页码
- paginationPageSize: 10, //每页显示个数
- //paginationTemplate:"<div></div>", //自定义底部分页代码
- totalItems: 0, // 总数量
- useExternalPagination: true,//是否使用分页按钮
-
-
- //----------- 选中 ----------------------
- enableFooterTotalSelected: true, // 是否显示选中的总数,默认为true, 如果显示,showGridFooter 必须为true
- enableFullRowSelection: true, //是否点击行任意位置后选中,默认为false,当为true时,checkbox可以显示但是不可选中
- enableRowHeaderSelection: true, //是否显示选中checkbox框 ,默认为true
- enableRowSelection: false, // 行选择是否可用,默认为true;
- enableSelectAll: true, // 选择所有checkbox是否可用,默认为true;
- enableSelectionBatchEvent: true, //默认true
- isRowSelectable: function (row) { //GridRow
+
+ enablePagination: true,
+ enablePaginationControls: true,
+ paginationPageSizes: [10, 15, 20],
+ paginationCurrentPage: 1,
+ paginationPageSize: 10,
+ //paginationTemplate:"<div></div>",
+ totalItems: 0,
+ useExternalPagination: true,
+
+ enableFooterTotalSelected: true,
+ enableFullRowSelection: true,
+ enableRowHeaderSelection: true,
+ enableRowSelection: false,
+ enableSelectAll: true,
+ enableSelectionBatchEvent: true,
+ isRowSelectable: function (row) {
/* if(row.entity.age > 45){
- row.grid.api.selection.selectRow(row.entity); // 选中行
+ row.grid.api.selection.selectRow(row.entity);
}*/
},
- modifierKeysToMultiSelect: false,//默认false,为true时只能 按ctrl或shift键进行多选, multiSelect 必须为true;
- multiSelect: true,// 是否可以选择多个,默认为true;
- noUnselect: false,//默认false,选中后是否可以取消选中
- selectionRowHeaderWidth: 20,//默认30 ,设置选择列的宽度;
+ modifierKeysToMultiSelect: false,
+ multiSelect: true,
+ noUnselect: false,
+ selectionRowHeaderWidth: 20,
//---------------api---------------------
onRegisterApi: function (gridApi) {
$scope.gridApi = gridApi;
- //分页按钮事件
+
gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
if (getPage) {
getPage(newPage, pageSize);
}
});
- //行选中事件
+
$scope.gridApi.selection.on.rowSelectionChanged($scope, function (row, event) {
if (row) {
var num = $.inArray(row.entity.Id, $scope.selectedRows);
@@ -146,7 +159,7 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
var firstRow = (curPage - 1) * pageSize;
$scope.gridOptions.totalItems = mydefalutData.length;
$scope.gridOptions.data = mydefalutData.slice(firstRow, firstRow + pageSize);
- //或者像下面这种写法
+
//$scope.myData = mydefalutData.slice(firstRow, firstRow + pageSize);
};
getPage(1, $scope.gridOptions.paginationPageSize);
@@ -157,13 +170,11 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
$scope.status = [
{id: 1, name: 'danger', count: 10},
- {id: 2, name: 'alarm', count: 8},
+ {id: 2, name: 'warming', count: 8},
{id: 3, name: 'normal', count: 7},
{id: undefined, name: 'All', count: 7}
];
-
-
$scope.selectStatus = function (v) {
$scope.selectedStatus = v;
$scope.gridApi.grid.refresh();
@@ -172,6 +183,20 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
return status_id == $scope.selectedStatus;
};
+ $scope.open = [
+ {id: 1, name: 'open', count: 10},
+ {id: 2, name: 'close', count: 8},
+ {id: undefined, name: 'All', count: 7}
+ ];
+
+ $scope.selectOpen = function (v) {
+ $scope.selectedOpen = v;
+ $scope.gridApi.grid.refresh();
+ };
+ $scope.activeOpen = function (open_id) {
+
+ return open_id == $scope.selectedOpen;
+ };
$scope.singleFilter = function (renderableRows) {
var matcher = new RegExp($scope.selectedStatus);
@@ -188,20 +213,20 @@ app.controller('alarmGridCtrl', ['$scope','$log', '$http', '$timeout', '$interva
});
return renderableRows;
};
-//input框
+//input
$scope.menuState={show: false}
$scope.toggleMenu=function()
{
$scope.menuState.show=!$scope.menuState.show;
}
- //切换框
+
$scope.singleModel = 1;
$scope.radioModel = 'Middle';
$scope.checkModel = {
open: false,
- close: true,
+ close: true
};
$scope.checkResults = [];
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/left-menuController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/left-menuController.js
index 0f776b03..07935836 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/left-menuController.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/left-menuController.js
@@ -1,3 +1,18 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
app.controller('cmCtrl',['$scope',function ($scope) {
$scope.routeData = [
{name : 'Alarm' , url : 'app/uui/fusion/scripts/view-models/alarm.html' , nclass : 'fa fa-users'},
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js
index 4c38bf35..64ee382e 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performance-detailsController.js
@@ -1,9 +1,24 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
app.controller('pertabCtrl',['$scope',function ($scope) {
$scope.tabes = [
{ title:'one hour'},
- { title:'one day', content:'' },
- { title:'one month', content:'Dynamic content 2' },
- { title:'one year', content:'Dynamic content 2' }
+ { title:'one day' },
+ { title:'one month' },
+ { title:'one year' }
];
}]);
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performanceController.js b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performanceController.js
index e16673d0..02e74c98 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performanceController.js
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/controller/performanceController.js
@@ -1,3 +1,18 @@
+/*
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
app.controller('perCtrl',function ($scope) {
});
@@ -13,17 +28,20 @@ app.controller('perGridCtrl', ['$scope', '$http', '$timeout', '$interval', 'uiG
{ name: "shebei1", State: 50, Cpu: "40%", Memory: "60,000", Disk: "60,000", Network: "60,000" },
{ name: "shebei1", State: 50, Cpu: "40%", Memory: "60,000", Disk: "60,000", Network: "60,000" }
];
-
+ $scope.jump = function (){
+ console.log(1);
+ $scope.currentTab = '#/pre-details';
+ };
$scope.gridOptions = {
data: 'myData',
columnDefs: [{ field: 'name',
displayName: 'name',
width: '10%',
- enableColumnMenu: false,// 是否显示列头部菜单按钮
+ enableColumnMenu: false,
enableHiding: false,
suppressRemoveSort: true,
- enableCellEdit: false ,// 是否可编辑
- cellTemplate:'<a href ng-repeat=" data in mydefalutData">{{data.name}}</a>',
+ enableCellEdit: false ,
+ cellTemplate:'<a ng-click="jump()">shebei1</a>'
},
{ field: "Id",},
{ field: "State"},
@@ -33,76 +51,79 @@ app.controller('perGridCtrl', ['$scope', '$http', '$timeout', '$interval', 'uiG
{ field: "Network"}
],
- enableSorting: true, //是否排序
- useExternalSorting: false, //是否使用自定义排序规则
- enableGridMenu: true, //是否显示grid 菜单
- showGridFooter: true, //是否显示grid footer
- enableHorizontalScrollbar : 1, //grid水平滚动条是否显示, 0-不显示 1-显示
- enableVerticalScrollbar : 0, //grid垂直滚动条是否显示, 0-不显示 1-显示
+ enableSorting: true,
+ useExternalSorting: false,
+ enableGridMenu: true,
+ showGridFooter: true,
+ enableHorizontalScrollbar : 1,
+ enableVerticalScrollbar : 0,
enableFiltering: true,
- //-------- 分页属性 ----------------
- enablePagination: true, //是否分页,默认为true
- enablePaginationControls: true, //使用默认的底部分页
- paginationPageSizes: [10, 15, 20], //每页显示个数可选项
- paginationCurrentPage:1, //当前页码
- paginationPageSize: 10, //每页显示个数
- //paginationTemplate:"<div></div>", //自定义底部分页代码
- totalItems : 0, // 总数量
- useExternalPagination: true,//是否使用分页按钮
-
-
- //----------- 选中 ----------------------
- enableFooterTotalSelected: true, // 是否显示选中的总数,默认为true, 如果显示,showGridFooter 必须为true
- enableFullRowSelection : true, //是否点击行任意位置后选中,默认为false,当为true时,checkbox可以显示但是不可选中
- enableRowHeaderSelection : true, //是否显示选中checkbox框 ,默认为true
- enableRowSelection : true, // 行选择是否可用,默认为true;
- enableSelectAll : true, // 选择所有checkbox是否可用,默认为true;
- enableSelectionBatchEvent : true, //默认true
- isRowSelectable: function(row){ //GridRow
+ //
+ enablePagination: true,
+ enablePaginationControls: true,
+ paginationPageSizes: [10, 15, 20],
+ paginationCurrentPage:1,
+ paginationPageSize: 10,
+ //paginationTemplate:"<div></div>",
+ totalItems : 0,
+ useExternalPagination: true,
+
+
+ //-
+ enableFooterTotalSelected: true,
+ enableFullRowSelection : true,
+ enableRowHeaderSelection : true,
+ enableRowSelection : false,
+ enableSelectAll : true,
+ enableSelectionBatchEvent : true,
+ isRowSelectable: function(row){
if(row.entity.age > 45){
- row.grid.api.selection.selectRow(row.entity); // 选中行
+ row.grid.api.selection.selectRow(row.entity);
}
},
- modifierKeysToMultiSelect: false ,//默认false,为true时只能 按ctrl或shift键进行多选, multiSelect 必须为true;
- multiSelect: true ,// 是否可以选择多个,默认为true;
- noUnselect: false,//默认false,选中后是否可以取消选中
- selectionRowHeaderWidth:30 ,//默认30 ,设置选择列的宽度;
+ modifierKeysToMultiSelect: false ,
+ multiSelect: true ,
+ noUnselect: false,
+ selectionRowHeaderWidth:30 ,
//---------------api---------------------
onRegisterApi: function(gridApi) {
$scope.gridApi = gridApi;
- //分页按钮事件
+
gridApi.pagination.on.paginationChanged($scope,function(newPage, pageSize) {
if(getPage) {
getPage(newPage, pageSize);
}
});
- //行选中事件
- $scope.gridApi.selection.on.rowSelectionChanged($scope,function(row,event){
+
+ /*$scope.gridApi.selection.on.rowSelectionChanged($scope,function(row,event){
if(row){
$scope.testRow = row.entity;
}
- });
+ });*/
}
};
+
var getPage = function(curPage, pageSize) {
var firstRow = (curPage - 1) * pageSize;
$scope.gridOptions.totalItems = mydefalutData.length;
$scope.gridOptions.data = mydefalutData.slice(firstRow, firstRow + pageSize);
- //或者像下面这种写法
+
//$scope.myData = mydefalutData.slice(firstRow, firstRow + pageSize);
};
getPage(1, $scope.gridOptions.paginationPageSize);
- //input框
+ //input
$scope.menuState={show: false}
$scope.toggleMenu=function()
{
$scope.menuState.show=!$scope.menuState.show;
}
- }]); \ No newline at end of file
+ }]);
+
+ \ No newline at end of file
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html
index b40e8520..9fc1e38c 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/alarm.html
@@ -1,12 +1,30 @@
+<!--
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<div class="templatemo-content" ng-controller="alarmGridCtrl">
<h1>Alarm</h1>
- <div class="btn-group" style="margin-top:10px;margin-bottom:10px;">
- <label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'open'" uncheckable>OPEN</label>
- <label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'close'" uncheckable>CLOSE</label>
+ <!--<div class="btn-group" style="margin-top:10px;margin-bottom:10px;">-->
+ <!--<label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'open'" uncheckable>OPEN</label>-->
+ <!--<label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'close'" uncheckable>CLOSE</label>-->
+ <!--</div>-->
+
+ <div class="row margin-bottom-20">
+
</div>
<div class="row margin-bottom-10">
- <div class="col-md-6">
+ <div class="col-md-5">
<ul class="nav nav-pills">
<li ng-repeat="s in status"
ng-click="selectStatus(s.id)"
@@ -19,6 +37,25 @@
<input type="hidden" ng-model="selectedStatus" />
</ul>
</div>
+
+ <div class="col-md-4">
+ <ul class="nav nav-pills">
+ <li ng-repeat="o in open"
+ ng-click="selectOpen(s.id)"
+ ng-class="{active:activeOpen(o.id)}" >
+ <a href="">
+ {{o.name}}
+ <span class="badge">{{o.count}}</span>
+ </a>
+ </li>
+ <input type="hidden" ng-model="selectedOpen" />
+ </ul>
+ </div>
+ <div class="col-md-3">
+ <button ng-click="trashcan()" class="glyphicon glyphicon-trash btn btn-primary"></button>
+ <button ng-click="" class=" btn btn-primary">remove</button>
+ <button ng-click="" class="btn btn-primary">CSV</button>
+ </div>
</div>
<ul id="list">
<li>cpu <input type="text" /></li>
@@ -43,14 +80,12 @@
<div class="col-md-4">
<h4 class="margin-bottom-15">Another Table of Existing Users</h4>
</div>
- <div class="col-md-7">
- </div>
- <div class="col-md-1">
- <button ng-click="trashcan()" class="glyphicon glyphicon-trash btn btn-primary"></button>
+ <div class="col-md-5">
</div>
+
</div>
<div>
- <div ui-grid="gridOptions" style="width: 100%; height: 500px; text-align: center;" ui-grid-edit
+ <div ui-grid="gridOptions" style="width: 100%; min-height: 320px; text-align: center;" ui-grid-edit
ui-grid-pagination
ui-grid-selection ui-grid-resize-columns ui-grid-auto-resize>
</div>
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/left-menu.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/left-menu.html
index a67d8456..390b2015 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/left-menu.html
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/left-menu.html
@@ -1,3 +1,18 @@
+<!--
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<div ng-controller="cmCtrl">
<div id="main-wrapper">
<div id="navbar" role="navigation">
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-details.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-details.html
index a5ecfd06..6dc12726 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-details.html
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance-details.html
@@ -1,3 +1,18 @@
+<!--
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<style>
body {
overflow-y:scroll;
@@ -35,7 +50,8 @@
<div class="row" style="min-height: 500px" ng-controller="pertabCtrl">
<div class="col-md-12 col-sm-12" ng-controller="pertabCtrl">
<uib-tabset active="active" >
- <uib-tab index="$index + 1" ng-repeat="tab in tabes" heading="{{tab.title}}" disable="tab.disabled">
+ <!--<uib-tab index="$index + 1" ng-repeat="tab in tabes" heading="{{tab.title}}" disable="tab.disabled">-->
+ <uib-tab heading="one hour">
<div class="templatemo-charts">
<div class="row">
<div class="col-md-5 col-sm-6">
@@ -67,13 +83,110 @@
</div>
</div>
</uib-tab>
+ <uib-tab heading="one day">
+ <div class="templatemo-charts">
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">CPU</div>
+ <div align="center"><H3></H3></div><div id="CPUchart1"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Memory</div>
+ <div align="center"><H3></H3></div><div id="Memorychart1"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Disk</div>
+ <div align="center"><H3></H3></div><div id="Diskchart1"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-primary">
+ <div class="panel-heading">Network</div>
+ <div align="center"><H3></H3></div><div id="Networkchart1"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </uib-tab>
+ <uib-tab heading="one month">
+ <div class="templatemo-charts">
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">CPU</div>
+ <div align="center"><H3></H3></div><div id="CPUchart2"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Memory</div>
+ <div align="center"><H3></H3></div><div id="Memorychart2"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Disk</div>
+ <div align="center"><H3></H3></div><div id="Diskchart2"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-primary">
+ <div class="panel-heading">Network</div>
+ <div align="center"><H3></H3></div><div id="Networkchart2"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </uib-tab>
+ <uib-tab heading="one year">
+ <div class="templatemo-charts">
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">CPU</div>
+ <div align="center"><H3></H3></div><div id="CPUchart3"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Memory</div>
+ <div align="center"><H3></H3></div><div id="Memorychart3"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-success">
+ <div class="panel-heading">Disk</div>
+ <div align="center"><H3></H3></div><div id="Diskchart3"> <svg></svg> </div>
+ </div>
+ </div>
+ <div class="col-md-5 col-sm-6">
+ <div class="panel panel-primary">
+ <div class="panel-heading">Network</div>
+ <div align="center"><H3></H3></div><div id="Networkchart3"> <svg></svg> </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </uib-tab>
</uib-tabset>
+
</div>
<br />
<br />
<br />
<br />
</div>
-
+
</div>
</div> \ No newline at end of file
diff --git a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html
index f2ae7b44..43e27022 100644
--- a/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html
+++ b/usecaseui-monitor/src/main/webapp/app/uui/fusion/scripts/view-models/performance.html
@@ -1,3 +1,18 @@
+<!--
+ Copyright (C) 2017 CMCC, Inc. and others. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<div class="templatemo-content-wrapper">
<div class="templatemo-content">
<h1>Performance</h1>
@@ -7,6 +22,11 @@
<h4 class="margin-bottom-15">Another Table of Existing Users</h4>
</div>
</div>
+ <div class="col-md-3">
+ <button ng-click="trashcan()" class="glyphicon glyphicon-trash btn btn-primary"></button>
+ <button ng-click="" class=" btn btn-primary">remove</button>
+ <button ng-click="" class="btn btn-primary">CSV</button>
+ </div>
</div>
<div ng-controller="perGridCtrl">
@@ -29,7 +49,7 @@
<div class="col-md-5" style="border-top:1px dotted #ddd">
</div>
</div>
- <div ui-grid="gridOptions" style="width: 100%;margin-top:10px; height: 500px; text-align: center;" ui-grid-edit ui-grid-pagination
+ <div ui-grid="gridOptions" style="width: 100%;margin-top:10px; min-height: 350px; text-align: center;" ui-grid-edit ui-grid-pagination
ui-grid-selection ui-grid-resize-columns ui-grid-auto-resize>
</div>
</div>