review page

Change-Id: I760e58a105f2bd684902a9fb73e09877d86bf8d6
This commit is contained in:
CongLu 2015-03-04 11:56:28 -08:00
parent 1e078e788c
commit bcf491e313
4 changed files with 414 additions and 3 deletions

View File

@ -1039,6 +1039,7 @@ div.toc ul li a {
vertical-align: baseline; vertical-align: baseline;
white-space: nowrap; white-space: nowrap;
margin-right: 2px; margin-right: 2px;
width: 120px;
} }
.autofill-success { .autofill-success {
margin-top: 20px; margin-top: 20px;
@ -1056,6 +1057,31 @@ h4.widget-title:hover {
.loadingMask .mask{ .loadingMask .mask{
opacity: 0.5; opacity: 0.5;
} }
.tab-panel {
z-index: 10;
margin-left: 30px;
}
.tab-panel.stick {
position: fixed;
z-index: 10000;
top: 10px;
}
.review-padding{
padding-left: 60px;
padding-right: 60px;
}
.review-network-badge{
width:130px;
}
.review-targetconfig{
background:#7E6EB0;
}
.review-host{
background:#307ECC;
}
.review-osconfig{
background:#69AA46;
}
.centerLoading{ .centerLoading{
padding-top: 20%; padding-top: 20%;
padding-left: 45%; padding-left: 45%;

View File

@ -257,11 +257,17 @@ define(['./baseController'], ()->
$scope.commit = (sendRequest) -> $scope.commit = (sendRequest) ->
wizardService.networkMappingCommit($scope, sendRequest) wizardService.networkMappingCommit($scope, sendRequest)
] ]
.controller 'reviewCtrl', ['$scope', 'wizardService', 'ngTableParams', '$filter', .controller 'reviewCtrl', ['$scope', 'wizardService', 'ngTableParams', '$filter', '$location', '$anchorScroll'
($scope, wizardService, ngTableParams, $filter) -> ($scope, wizardService, ngTableParams, $filter, $location, $anchorScroll) ->
wizardService.reviewInit($scope) wizardService.reviewInit($scope)
wizardService.watchingTriggeredStep($scope) wizardService.watchingTriggeredStep($scope)
$scope.scrollTo = (id) ->
old = $location.hash();
$location.hash(id);
$anchorScroll();
$location.hash(old);
$scope.commit = (sendRequest) -> $scope.commit = (sendRequest) ->
wizardService.reviewCommit(sendRequest) wizardService.reviewCommit(sendRequest)

View File

@ -1,4 +1,365 @@
<div ng-controller="reviewCtrl"> <div ng-controller="reviewCtrl" data-spy="scroll" data-target="#side-nav">
<div id="side-nav">
<ul class="nav nav-list affix" id="myTab">
<li>
<a ng-click="scrollTo('osconfig')">
<i class="green ace-icon fa fa-globe bigger-110"></i> OS Config
</a>
</li>
<li>
<a ng-click="scrollTo('hosts')">
<i class="blue ace-icon fa fa-list bigger-110"></i> Host
</a>
</li>
<li>
<a ng-click="scrollTo('targetconfig')">
<i class="purple ace-icon fa fa-lock"></i> Target Config
</a>
</li>
</ul>
</div>
<div style="margin-left: 180px;">
<div id="osconfig">
<div class="widget-box transparent margin-top-minus10" style="border-color:#CCC">
<div class="widget-header widget-header-flat">
<h4 class="widget-title lighter green">
OS Config
</h4>
</div>
<div class="widget-body">
<div class="widget-body-inner" style="display: block;">
<div class="widget-main review-padding">
<div class="widget-header widget-header-flat review-osconfig">
<h5 class="widget-title white" ng-click="returnStep('os_global')">
OS Global Configurations
</h5>
</div>
<table class="table table-striped table-border-grey">
<tbody>
<tr ng-repeat="(key, value) in global_config">
<td class="table-review-padding"><strong>{{key}}</strong>
</td>
<td>{{value}}</td>
</tr>
<tr>
<td class="table-review-padding"><strong>Server Credentials</strong>
</td>
<td></td>
</tr>
<tr>
<td class="table-review-padding"><strong>Username</strong>
</td>
<td>{{server_credentials.username}}</td>
</tr>
<tr>
<td class="table-review-padding"><strong>Password</strong>
</td>
<td>{{server_credentials.password}}</td>
</tr>
</tbody>
</table>
<br>
<br>
<div class="widget-header widget-header-flat review-osconfig">
<h5 class="widget-title white" ng-click="returnStep('partition')">
Partition
</h5>
</div>
<table class="table table-striped table-border-grey">
<thead>
<tr>
<th>Mount Point</th>
<th>Size Percentage (%)</th>
<th>Max Size (G)</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, value) in partition">
<td class="table-review-padding">{{key}}</td>
<td>{{value.percentage}}</td>
<td>{{value.max_size}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br>
<div id="hosts">
<div class="widget-box transparent margin-top-minus10" style="border-color:#CCC">
<div class="widget-header widget-header-flat">
<h4 class="widget-title lighter blue">
Host
</h4>
</div>
<div class="widget-body">
<div class="widget-body">
<div class="widget-body-inner" style="display: block;">
<div class="widget-main review-padding">
<div class="widget-header widget-header-flat review-host">
<h5 class="widget-title white" ng-click="returnStep('role_assign')">
Hosts
</h5>
</div>
<table ng-table="tableParams" class="table table-striped table-border-grey">
<thead>
<tr>
<th ng-repeat="column in server_columns" ng-show="column.visible" class="sortable" ng-class="{'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')" ng-if="column.title!='Roles'">
<div>{{column.title}}</div>
</th>
<th ng-repeat="(key, value) in interfaces">
{{key}}
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="server in $data | filter: search">
<td ng-repeat="column in server_columns" ng-show="column.visible" sortable="column.field">
<span ng-switch on="column.field">
<span ng-switch-when="os_installed">
<span ng-if="server['os']">
<label>
<input ng-model="server.reinstallos" type="checkbox" class="ace">
<span class="lbl"></span>
</label>
</span>
<span ng-if="!server['os']">
-
</span>
</span>
<span ng-switch-when="clusters">
<span ng-repeat="cluster in server.clusters">
{{cluster.name}}&nbsp;
</span>
</span>
<!-- <span ng-switch-when="roles">
<span ng-repeat="role in server['roles']" class="role-badge" ng-style="{'background-color': role.color}">
{{role.display_name}}
</span>
</span> -->
<span ng-switch-default ng-if="column.field!='roles'">
{{server[column.field]}}
</span>
</span>
</td>
<td ng-repeat="(key, value) in interfaces">
{{server.networks[key].ip}}
</td>
</tr>
</tbody>
</table>
<br>
<br>
<div class="widget-header widget-header-flat review-host">
<h5 class="widget-title white" ng-click="returnStep('role_assign')">
Roles
</h5>
</div>
<table class="table table-striped table-border-grey">
<thead>
<tr>
<th>Hostname</th>
<th>Roles</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="server in servers">
<td>
{{server.hostname}}
</td>
<td>
<span ng-repeat="role in server['roles']" class="role-badge" ng-style="{'background-color': role.color}">
{{role.display_name}}
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div id="targetconfig">
<div class="widget-box transparent margin-top-minus10" style="border-color:#CCC">
<div class="widget-header widget-header-flat">
<h4 class="widget-title lighter purple" ng-click="returnStep('network_mapping')">
Target Config
</h4>
</div>
<div class="widget-body">
<div class="widget-body">
<div class="widget-body-inner" style="display: block;">
<div class="widget-main review-padding" collapse="isMappingCollapsed">
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('network_mapping')">
Network Mapping
</h5>
</div>
<table class="table table-striped table-border-grey">
<thead>
<tr>
<th>Network</th>
<th>Interface</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, value) in network_mapping">
<td class="capitalize">
<div class="label review-network-badge" ng-class="{'label-pink': key == 'management', 'label-success': key == 'tenant', 'label-purple': key == 'external', 'label-warning': key == 'storage', 'label-info': key == 'public_network', 'label-red': key == 'cluster_network'}">
{{key}}
</div>
</td>
<td>{{value}}</td>
</tr>
</tbody>
</table>
<br>
<br>
<span ng-if="currentAdapterName == 'ceph_openstack_icehouse' || currentAdapterName == 'ceph_firefly'">
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('security')">
Target System Configurations - cephConfig
</h5>
</div>
<table class="table table-striped table-border-grey">
<tbody>
<tr ng-repeat="(key, value) in cephConfig.global_config">
<td>{{key}}</td>
<td>{{value}}</td>
</tr>
<tr ng-repeat="(key, value) in cephConfig.osd_config">
<td>{{key}}</td>
<td>{{value}}</td>
</tr>
</tbody>
</table>
<br>
<br>
</span>
<span ng-if="currentAdapterName == 'ceph_openstack_icehouse' || currentAdapterName == 'openstack_icehouse'">
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('security')">
Target System Configurations - NeutronConfig
</h5>
</div>
<table class="table table-striped table-border-grey">
<tbody>
<tr>
<td>tenent_network_type</td>
<td>{{neutronConfig.openvswitch.tenant_network_type}}</td>
</tr>
<tr ng-if="neutronConfig.openvswitch.tenant_network_type=='gre'" ng-repeat="(key, value) in neutronConfig.openvswitch.tunnel_id_ranges">
<td>tunnel_id_ranges_{{key}}</td>
<td>{{value}}</td>
</tr>
<tr ng-if="neutronConfig.openvswitch.tenant_network_type=='vlan'" ng-repeat="(key, value) in neutronConfig.openvswitch.network_vlan_ranges">
<td>network_vlan_ranges_{{key}}</td>
<td>{{value}}</td>
</tr>
<tr ng-if="neutronConfig.openvswitch.tenant_network_type=='vlan'" ng-repeat="(key, value) in neutronConfig.openvswitch.bridge_mappings">
<td>bridge_mappins_{{key}}</td>
<td>{{value}}</td>
</tr>
</tbody>
</table>
<br>
<br>
</span>
<span ng-if="currentFlavor == 'HA-multinodes'">
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('security')">
Target System Configurations - High Availability Config
</h5>
</div>
<table class="table table-striped table-border-grey">
<tbody>
<tr>
<td>VIP</td>
<td>{{haConfig.ha_proxy.vip}}</td>
</tr>
</tbody>
</table>
<br>
<br>
</span>
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('security')">
Target System Configurations - console_credentials
</h5>
</div>
<table class="table table-striped table-border-grey">
<thead>
<tr>
<th>Service</th>
<th>Username</th>
<th>Password</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, value) in console_credentials">
<td>{{key}}</td>
<td>{{value.username}}</td>
<td>{{value.password}}</td>
</tr>
</tbody>
</table>
<br>
<br>
<div class="widget-header widget-header-flat review-targetconfig">
<h5 class="widget-title white" ng-click="returnStep('security')">
Target System Configurations - service_credentials
</h5>
</div>
<table class="table table-striped table-border-grey">
<thead>
<tr>
<th>Service</th>
<th>Username</th>
<th>Password</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, value) in service_credentials">
<td>{{key}}</td>
<td>{{value.username}}</td>
<td>{{value.password}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="widget-body">
<div class="widget-body-inner" style="display: block;">
<div class="widget-main review-padding">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div ng-controller="reviewCtrl">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="widget-box transparent margin-top-minus10"> <div class="widget-box transparent margin-top-minus10">
@ -269,3 +630,4 @@
</div> </div>
</div> </div>
</div> </div>
-->

View File

@ -326,6 +326,23 @@ define(['./baseService'], ()->
@getServerColumns().success (data) -> @getServerColumns().success (data) ->
$scope.server_columns = data.review $scope.server_columns = data.review
for value, index in data.review
if value.title == "Hostname"
temp = $scope.server_columns[0];
$scope.server_columns[0] = value;
$scope.server_columns[index] = temp;
if value.title == "Host MAC Addr"
temp = $scope.server_columns[1];
$scope.server_columns[1] = value;
$scope.server_columns[index] = temp;
if value.title == "Switch IP"
temp = $scope.server_columns[2];
$scope.server_columns[2] = value;
$scope.server_columns[index] = temp;
if value.title == "Port"
temp = $scope.server_columns[3];
$scope.server_columns[3] = value;
$scope.server_columns[index] = temp;
$scope.tabs =[{ $scope.tabs =[{
"title": "Database & Queue" "title": "Database & Queue"