diff --git a/v2/assets/css/style.css b/v2/assets/css/style.css index cde3535..4b22064 100644 --- a/v2/assets/css/style.css +++ b/v2/assets/css/style.css @@ -132,34 +132,39 @@ button.btn-clte:hover, button.btn-clstre:active { } th { background-color: #FFFFFF !important; - color: #000000 !important; + color: #000000; } a.darkfont:link: { font color: #000000 !important; } -/* visited link */ -h1.cluster { - float: left !important; - line-height: 1.4 !important; -} -.header-margins{ - margin-left: 0px !important; - margin-right: 0px !important; - margin-bottom: 15px !important; -} a.darkfont:visited { color: #000000 !important; } +/* visited link */ + +h1.blue-header { + float: left !important; + line-height: 1.4 !important; + color: #2679b5; + font-size: 24px; + font-weight: lighter; + padding: 0; +} +.header-margins { + margin-left: 0px !important; + margin-right: 0px !important; + margin-bottom: 15px !important; +} a:active { color: #0000FF; } .page-header { - padding-left: 20px; - padding-right: 20px; + padding-left: 15px; + padding-right: 15px; } .label { border-radius: 0.25em !important; - line-height: 80% !important; + line-height: 80% !important; text-transform: lowercase !important; font-size: 100% !important; padding: 0.2em 0 0 0 !important; @@ -171,14 +176,13 @@ a:active { position: relative !important; float: right !important; } - .btn-cltd { padding: 1px 3px 1px 4px !important; } .btn-create { line-height: 1.1 !important; } -.input-icon{ +.input-icon { margin-top: 5px !important; } .ng-table th.sortable { @@ -197,7 +201,7 @@ a:active { right: 8px; top: 50%; position: absolute; - /* opacity: .3; */ + opacity: .3; margin-top: -4px } .ng-table th.sortable div:before { @@ -208,7 +212,7 @@ a:active { border-top: 4px solid #000 } .ng-table th.sortable div:hover:after, .ng-table th.sortable div:hover:before { - opacity: 1; + opacity: 0.8; visibility: visible } .ng-table th.sortable.sort-desc, .ng-table th.sortable.sort-asc { @@ -242,3 +246,67 @@ a:active { -moz-opacity: .6; /* opacity: .6 */ } +.ng-table-pager { + display: none; +} +.btn-previous { + background-color: #abbac3 !important; + border-color: #abbac3 !important; +} +.first-prev { + cursor: not-allowed !important; + /* padding: 10px !important; */ +} +.btn-light { + cursor: not-allowed !important; +} +.btn-prev-spacing { + margin-right: 10px; +} +.networkDeleteView { + border-bottom-color: #f3cdc6 !important; + background-color: #f5f5f5 !important; +} +.networkDeleteButton { + color: #dd5a43 !important; +} +.th-inhert { + vertical-align: auto; +} +.eth-width { + width: 13%; +} +.max-width-150 { + max-width: 150px !important; +} +.margin-bottom-8 { + margin-bottom: 0px; +} +td.center-align { + vertical-align: inherit !important; +} +.side-padding-30 { + padding-left: 30px !important; + padding-right: 30px !important; + padding-top: 10px; +} +.side-padding-40 { + padding-left: 40px !important; + padding-right: 40px !important; +} +.side-padding-10 { + padding-left: 10px !important; + padding-right: 10px !important; +} +.top-margin-14 { + margin-top: 14px; +} +table { + margin-bottom: 0px !important; +} +div.center-align { + vertical-align: center !important; +} +.margin-right-5 { + margin-right: 10px; +} diff --git a/v2/src/app/cluster/cluster-list.tpl.html b/v2/src/app/cluster/cluster-list.tpl.html index 2c6c11c..83629af 100644 --- a/v2/src/app/cluster/cluster-list.tpl.html +++ b/v2/src/app/cluster/cluster-list.tpl.html @@ -2,7 +2,7 @@
-

+

My Clusters

@@ -94,4 +94,3 @@
- diff --git a/v2/src/app/server/server-list.tpl.html b/v2/src/app/server/server-list.tpl.html index 03e6ff0..733127f 100644 --- a/v2/src/app/server/server-list.tpl.html +++ b/v2/src/app/server/server-list.tpl.html @@ -1 +1,163 @@ -server list \ No newline at end of file +
+
+
+

Discovered Servers

+
+
+ + + + + + +
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
InterfaceSubnetIs Mgmt NetworkAction
+ + + + - + +
+ {{name}} + + + {{sub.name}} + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + +
+ + + {{column.title}} +
+ + + + + + + + - + + + + {{server[column.field]}} + +
+
+
diff --git a/v2/src/app/server/server.js b/v2/src/app/server/server.js index c39e023..c9b15d7 100644 --- a/v2/src/app/server/server.js +++ b/v2/src/app/server/server.js @@ -1,12 +1,107 @@ angular.module('compass.server', [ 'ui.router', - 'ui.bootstrap' + 'ui.bootstrap', + 'compass.charts', + 'ngTable', ]) .config(function config($stateProvider) { $stateProvider .state('serverList', { url: '/serverlist', + controller: 'serverCtrl', templateUrl: 'src/app/server/server-list.tpl.html' }); -}) \ No newline at end of file +}) + +.controller('serverCtrl', function($scope, ngTableParams, wizardFactory, dataService, $filter, ngTableParams) { + $scope.hideunselected = ''; + $scope.search = {}; + + dataService.getAllMachineHosts().success(function(data) { + $scope.allservers = data; + //wizardFactory.setAllMachinesHost(data); + + $scope.tableParams = new ngTableParams({ + page: 1, // show first page + count: $scope.allservers.length // count per page + }, { + counts: [], // hide count-per-page box + total: $scope.allservers.length, // length of data + getData: function($defer, params) { + // use build-in angular filter + var orderedData = params.sorting() ? + $filter('orderBy')($scope.allservers, params.orderBy()) : $scope.allservers; + + $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); + } + }); + + + }); + + //$scope.allservers = wizardFactory.getAllMachinesHost(); + + $scope.selectAllServers = function(flag) { + if (flag) { + angular.forEach($scope.allservers, function(sv) { + sv.selected = true; + }) + } else { + angular.forEach($scope.allservers, function(sv) { + sv.selected = false; + }) + } + }; + + //servers = [] + dataService.getServerColumns().success(function(data) { + //clusters = data; + $scope.server_columns = data.showall; + }); + + $scope.hideUnselected = function() { + if ($scope.hideunselected) { + $scope.search.selected = true; + } else { + delete $scope.search.selected; + } + }; + + + + $scope.$watch(function() { + return wizardFactory.getCommitState() + }, function(newCommitState, oldCommitState) { + if (newCommitState !== undefined) { + if (newCommitState.name == "sv_selection" && newCommitState.state == "triggered") { + $scope.commit(); + } + } + }); + + $scope.commit = function() { + var selectedServers = []; + var noSelection = true; + angular.forEach($scope.allservers, function(sv) { + if (sv.selected) { + noSelection = false; + selectedServers.push(sv); + } + }) + if (noSelection) { + alert("Please select at least one server"); + wizardFactory.setCommitState({}); + } else { + wizardFactory.setServers(selectedServers); + wizardFactory.setAllMachinesHost($scope.allservers); + + var commitState = { + "name": "sv_selection", + "state": "success", + "message": "" + }; + wizardFactory.setCommitState(commitState); + } + }; +}) diff --git a/v2/src/app/wizard/network.tpl.html b/v2/src/app/wizard/network.tpl.html index 0ec84c3..71931a1 100644 --- a/v2/src/app/wizard/network.tpl.html +++ b/v2/src/app/wizard/network.tpl.html @@ -153,32 +153,31 @@ - {{column.title}} + 'sort-asc': tableParams.isSortBy(column.field, 'asc'), + 'sort-desc': tableParams.isSortBy(column.field, 'desc') + }" ng-click="tableParams.sorting(column.field, tableParams.isSortBy(column.field, 'asc') ? 'desc' : 'asc')"> +
{{column.title}}
- + {{name}} - + + - - + - + {{server[column.field]}} - - - + + diff --git a/v2/src/app/wizard/review.tpl.html b/v2/src/app/wizard/review.tpl.html index 0a0ec1a..77c1ae8 100644 --- a/v2/src/app/wizard/review.tpl.html +++ b/v2/src/app/wizard/review.tpl.html @@ -22,7 +22,7 @@ - {{column.title}} +
{{column.title}}
{{key}} @@ -65,7 +65,7 @@ - +
@@ -140,7 +140,7 @@
  • {{tab.title}}
  • - +
    @@ -148,30 +148,30 @@
    diff --git a/v2/src/app/wizard/role_assignment.tpl.html b/v2/src/app/wizard/role_assignment.tpl.html index a7a2f1b..0a9d7f8 100644 --- a/v2/src/app/wizard/role_assignment.tpl.html +++ b/v2/src/app/wizard/role_assignment.tpl.html @@ -85,7 +85,7 @@ - {{column.title}} +
    {{column.title}}
    Roles diff --git a/v2/src/app/wizard/server_selection.tpl.html b/v2/src/app/wizard/server_selection.tpl.html index d7fd13f..df35c70 100644 --- a/v2/src/app/wizard/server_selection.tpl.html +++ b/v2/src/app/wizard/server_selection.tpl.html @@ -47,7 +47,7 @@ - {{column.title}} +
    {{column.title}}
    diff --git a/v2/src/app/wizard/wizard.tpl.html b/v2/src/app/wizard/wizard.tpl.html index 59efd6d..f24ddb0 100644 --- a/v2/src/app/wizard/wizard.tpl.html +++ b/v2/src/app/wizard/wizard.tpl.html @@ -30,10 +30,12 @@
    - +
    + +