updates for meeting commented items.

This commit is contained in:
kunw 2016-06-28 07:58:38 +08:00
parent d1b7df6817
commit a5a121d784
12 changed files with 102 additions and 75 deletions

View File

@ -78,6 +78,10 @@ body {
width: 100%;
}
.long-line-margin-right {
margin-right: 30px;
}
.down-table-pane {
overflow-y: auto;
height: 260px;

View File

@ -14,7 +14,7 @@
margin-top: 20px;
background-color: #FFFFFF;
width: 100%;
min-height: 490px;
min-height: 579px;
}
.search-pane {
@ -27,6 +27,15 @@
vertical-align: middle;
}
.table-header {
margin-bottom: 0;
}
.table-body-full-width {
overflow-y: auto;
width: 1075px;
}
.gutter {
margin: 0 1em 0 1em;
}
@ -42,7 +51,7 @@
.sub-pane {
margin: 15px;
min-height: 1px;
min-height: 380px;
overflow-y: auto;
}

View File

@ -10,7 +10,7 @@
function ListLogController($scope, ListLogService, getParameterByName, $location) {
$scope.subsTabPane = 20;
$scope.subsTabPane = 30;
var vm = this;
vm.isOpen = false;

View File

@ -1,5 +1,5 @@
<ng-switch on="vm.editMode">
<span ng-switch-default>//vm.currentRole.name//</span>
<select ng-switch-when="true" ng-model="vm.currentRole" ng-options="role as role.name for role in vm.roles track by role.roleName" ng-click="vm.selectRole(vm.currentRole)">
<select ng-switch-when="true" ng-model="vm.currentRole" ng-options="role as role.name for role in vm.roles track by role.roleName" ng-change="vm.selectRole(vm.currentRole)">
</select>
</ng-switch>

View File

@ -16,7 +16,7 @@
<div class="form-group col-md-12 form-group-custom">
<label for="name" class="col-md-3 control-label">// 'name' | tr //:</label>
<div class="col-md-9">
<input type="text" class="form-control form-control-custom" id="name" ng-model="replication.policy.name" name="uName" required maxlength="20">
<input type="text" class="form-control form-control-custom" id="name" ng-model="replication.policy.name" name="uName" required maxlength="20" ng-disabled="!vm.targetEditable">
<div ng-messages="form.$submitted && form.uName.$error">
<span ng-message="required">// 'name_is_required' | tr //</span>
<span ng-message="maxlength">// 'name_is_too_long' | tr //</span>
@ -26,7 +26,7 @@
<div class="form-group col-md-12 form-group-custom">
<label for="description" class="col-md-3 control-label">// 'description' | tr //:</label>
<div class="col-md-9">
<textarea class="form-control form-control-custom" id="description" ng-model="replication.policy.description" name="uDescription" maxlength="20"></textarea>
<textarea class="form-control form-control-custom" id="description" ng-model="replication.policy.description" name="uDescription" ng-disabled="!vm.targetEditable"></textarea>
<div ng-messages="form.$submitted && form.uDescription.$error">
<span ng-message="maxlength">// 'description_is_too_long' | tr //</span>
</div>
@ -35,7 +35,7 @@
<div class="form-group col-md-12 form-group-custom">
<label for="enable" class="col-md-3 control-label">// 'enable' | tr //:</label>
<div class="col-md-9">
<input type="checkbox" class="form-control" style="margin-top: 10px; height: auto;" ng-model="replication.policy.enabled">
<input type="checkbox" class="form-control" style="margin-top: 10px; height: auto;" ng-model="replication.policy.enabled" ng-disabled="!vm.targetEditable">
</div>
</div>
<div class="col-md-12">
@ -43,16 +43,17 @@
<div class="col-md-8" style="padding-left: 0;">
<h4 class="h4-custom">// 'destination_setting' | tr //</h4>
</div>
<div class="col-md-4 h4-custom pull-right"><input type="checkbox" ng-model="vm.checkedAddTarget" ng-checked="vm.checkedAddTarget"> // 'add_new_destination' | tr //</div>
</div>
<hr class="hr-line"/>
</div>
<div class="form-group col-md-12 form-group-custom">
<label for="destinationName" class="col-md-3 control-label">// 'name' | tr //:</label>
<div class="col-md-7">
<input type="text" ng-if="vm.checkedAddTarget" class="form-control form-control-custom" ng-model="replication.destination.name">
<select ng-if="!vm.checkedAddTarget" class="form-control form-control-custom" ng-model="replication.destination.selection" ng-options="d as d.name for d in vm.destinations track by d.id" ng-click="vm.selectDestination(replication.destination.selection)" ng-disabled="!vm.targetEditable"></select>
<div class="col-md-7">
<input type="text" ng-if="vm.checkedAddTarget" class="form-control form-control-custom" style="width: 50% !important;" ng-model="replication.destination.name">
<select ng-if="!vm.checkedAddTarget" class="form-control form-control-custom" ng-model="replication.destination.selection" ng-options="d as d.name for d in vm.destinations track by d.id" ng-change="vm.selectDestination(replication.destination.selection)" style="width: 50% !important;" ng-disabled="!vm.targetEditable"></select>
<div class="display-inline-block" ng-show="vm.targetEditable">&nbsp;&nbsp;<input type="checkbox" ng-model="vm.checkedAddTarget" ng-checked="vm.checkedAddTarget">// 'add_new_destination' | tr //</div>
</div>
</div>
<div class="form-group col-md-12 form-group-custom">

View File

@ -47,6 +47,9 @@
}
if(!angular.isDefined(vm1.selection)) {
vm1.selection = current[0];
vm1.endpoint = current[0].endpoint;
vm1.username = current[0].username;
vm1.password = current[0].password;
}
}
});
@ -96,7 +99,7 @@
vm.targetEditable = true;
vm0.name = '';
vm0.description = '';
vm0.enabled = true;
vm0.enabled = true;
}
function edit(policyId) {

View File

@ -12,7 +12,7 @@
</div>
<div class="pane-split" id="upon-pane">
<div class="sub-pane-split">
<table class="table table-pane">
<table class="table table-pane table-header">
<thead>
<th width="10%">// 'name' | tr //</th>
<th width="18%">// 'description' | tr //</th>
@ -21,32 +21,36 @@
<th width="14%">// 'activation' | tr// </th>
<th width="15%">// 'actions' | tr //</th>
</thead>
<tbody>
<tr ng-if="vm.replicationPolicies.length == 0">
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replication_policies' | tr //</h3></td>
</tr>
<tr policy_id="//r.id//" ng-if="vm.replicationPolicies.length > 0" ng-repeat="r in vm.replicationPolicies" value="//vm.last = $last//">
<td>//r.name//</td>
<td>//r.description//</td>
<td>//r.target_name//</td>
<td>//r.start_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td ng-switch on="//r.enabled//">
<span ng-switch-when="1">// 'enabled' | tr //</span>
<span ng-switch-when="0">// 'disabled' | tr //</span>
</td>
<td>
<div class="display-inline-block" ng-switch on="//r.enabled//">
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 0)"><span ng-switch-when="1" class="glyphicon glyphicon-play color-success"></span></a>
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 1)"><span ng-switch-when="0" class="glyphicon glyphicon-stop color-danger"></span></a>
</div>
&nbsp;
<a href="javascript:void(0);" data-toggle="modal" data-target="#createPolicyModal" ng-click="vm.editReplication(r.id)"><span class="glyphicon glyphicon-pencil"></span></a>
&nbsp;
<!--a href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a -->
</td>
</tr>
</tbody>
</table>
</table>
<div class="table-body-full-width" style="height: 200px;">
<table class="table table-pane">
<tbody>
<tr ng-if="vm.replicationPolicies.length == 0">
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replication_policies' | tr //</h3></td>
</tr>
<tr policy_id="//r.id//" ng-if="vm.replicationPolicies.length > 0" ng-repeat="r in vm.replicationPolicies" value="//vm.last = $last//">
<td width="10%">//r.name//</td>
<td width="18%">//r.description//</td>
<td width="18%">//r.target_name//</td>
<td width="18%">//r.start_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td width="14%" ng-switch on="//r.enabled//">
<span ng-switch-when="1">// 'enabled' | tr //</span>
<span ng-switch-when="0">// 'disabled' | tr //</span>
</td>
<td width="15%">
<div class="display-inline-block" ng-switch on="//r.enabled//">
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 0)"><span ng-switch-when="1" class="glyphicon glyphicon-stop color-danger"></span></a>
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 1)"><span ng-switch-when="0" class="glyphicon glyphicon-play color-success"></span></a>
</div>
&nbsp;
<a href="javascript:void(0);" data-toggle="modal" data-target="#createPolicyModal" ng-click="vm.editReplication(r.id)"><span class="glyphicon glyphicon-pencil"></span></a>
&nbsp;
<!--a href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a -->
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-4 col-md-12 well well-sm well-custom well-split"><div class="col-md-offset-10">//vm.replicationPolicies ? vm.replicationPolicies.length : 0// // 'items' | tr //</div></div>
@ -60,33 +64,39 @@
<button class="btn btn-primary" type="button" ng-click="vm.searchReplicationJob()"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
<div class="input-group pull-right">
<a class="btn btn-link" ng-click="vm.searchReplicationJob()"><span class="glyphicon glyphicon-refresh"></span>&nbsp;&nbsp;// 'refresh' | tr //</a>
<div class="input-group">
<button class="btn btn-success" ng-click="vm.searchReplicationJob()"><span class="glyphicon glyphicon-refresh"></span></button>
</div>
</div>
<div class="pane-split" id="down-pane">
<div class="sub-pane-split">
<table class="table table-pane" width="98%">
<table class="table table-pane table-header">
<thead>
<th width="20%">// 'name' | tr //</th>
<th width="25%">// 'operation' | tr //</th>
<th width="25%">// 'start_time' | tr //</th>
<th width="15%">// 'operation' | tr //</th>
<th width="20%">// 'start_time' | tr //</th>
<th width="20%">// 'end_time' | tr //</th>
<th width="15%">// 'status' | tr //</th>
<th width="15%">// 'logs' | tr //</th>
<th width="10%">// 'logs' | tr //</th>
</thead>
<tbody>
<tr ng-if="vm.replicationJobs.length == 0">
<td colspan="4" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replication_jobs' | tr //</h3></td>
</tr>
<tr ng-if="vm.replicationJobs.length > 0" ng-repeat="r in vm.replicationJobs">
<td>//r.repository//</td>
<td>//r.operation//</td>
<td>//r.update_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td>//r.status//</td>
<td><a href="javascript:void(0);" ng-click="vm.downloadLog(r.id)"><span style="margin-left: 10px;" class="glyphicon glyphicon-file"></span></a></td>
</tr>
</tbody>
</table>
</table>
<div class="table-body-full-width" style="height: 200px;">
<table class="table table-pane">
<tbody>
<tr ng-if="vm.replicationJobs.length == 0">
<td colspan="4" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replication_jobs' | tr //</h3></td>
</tr>
<tr ng-if="vm.replicationJobs.length > 0" ng-repeat="r in vm.replicationJobs">
<td width="20%">//r.repository//</td>
<td width="15%">//r.operation//</td>
<td width="20%">//r.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td width="20%">//r.update_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
<td width="15%">//r.status//</td>
<td width="10%"><a href="javascript:void(0);" ng-click="vm.downloadLog(r.id)"><span style="margin-left: 10px;" class="glyphicon glyphicon-file"></span></a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -62,8 +62,6 @@
.on('shown.bs.popover', function(e){
var self = jQuery(this);
$('[type="text"]:input', self.parent())
.select()
.end()
.on('click', function() {
$(this).select();
});
@ -74,24 +72,24 @@
}
});
function generateContent() {
var content = '<form class="form-horizontal">' +
var content = '<form class="form-horizontal" width="100%">' +
'<div class="form-group">' +
'<label class="col-sm-3 control-label">Id</label>' +
'<div class="col-sm-9"><p class="form-control-static long-line"><input type="text" id="txtImageId" value="' + ctrl.manifest['Id'] + '" readonly size="40"></p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line long-line-margin-right"><input type="text" id="txtImageId" value="' + ctrl.manifest['Id'] + '" readonly size="32"></p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Parent</label>' +
'<div class="col-sm-9"><p class="form-control-static long-line">' + ctrl.manifest['Parent'] + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line long-line-margin-right"><input type="text" id="txtImageId" value="' + ctrl.manifest['Parent'] + '" readonly size="32"></p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Created</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + ctrl.manifest['Created'] + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + ctrl.manifest['Created'] + '</p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Duration Days</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + (ctrl.manifest['Duration Days'] === '' ? 'N/A' : ctrl.manifest['Duration Days']) + ' days</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + (ctrl.manifest['Duration Days'] === '' ? 'N/A' : ctrl.manifest['Duration Days']) + ' days</p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Author</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + (ctrl.manifest['Author'] === '' ? 'N/A' : ctrl.manifest['Author']) + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + (ctrl.manifest['Author'] === '' ? 'N/A' : ctrl.manifest['Author']) + '</p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Architecture</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + (ctrl.manifest['Architecture'] === '' ? 'N/A' : ctrl.manifest['Architecture']) + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + (ctrl.manifest['Architecture'] === '' ? 'N/A' : ctrl.manifest['Architecture']) + '</p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">Docker Version</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + (ctrl.manifest['Docker Version'] === '' ? 'N/A' : ctrl.manifest['Docker Version']) + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + (ctrl.manifest['Docker Version'] === '' ? 'N/A' : ctrl.manifest['Docker Version']) + '</p></div></div>' +
'<div class="form-group"><label class="col-sm-3 control-label">OS</label>' +
'<div class="col-sm-9"><p class="form-control-static">' + (ctrl.manifest['OS'] === '' ? 'N/A' : ctrl.manifest['OS']) + '</p></div></div>' +
'<div class="col-sm-9"><p class="form-control-static long-line-margin-right">' + (ctrl.manifest['OS'] === '' ? 'N/A' : ctrl.manifest['OS']) + '</p></div></div>' +
'</form>';
return content;
}

View File

@ -26,7 +26,7 @@
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replications' | tr //</h3></td>
</tr>
<tr ng-if="vm.replications.length > 0" ng-repeat="r in vm.replications">
<td>//r.name//</td>
<td><a href="repository#/replication?project_id=//r.project_id//">//r.name//</a></td>
<td>//r.description//</td>
<td>//r.project_name//</td>
<td>//r.target_name//</td>
@ -37,16 +37,16 @@
</td>
<td>
<div class="display-inline-block" ng-switch on="//r.enabled//">
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 0)"><span ng-switch-when="1" class="glyphicon glyphicon-play color-success"></span></a>
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 1)"><span ng-switch-when="0" class="glyphicon glyphicon-stop color-danger"></span></a>
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 0)"><span ng-switch-when="1" class="glyphicon glyphicon-stop color-danger"></span></a>
<a href="javascript:void(0);" ng-click="vm.togglePolicy(r.id, 1)"><span ng-switch-when="0" class="glyphicon glyphicon-play color-success"></span></a>
</div>
&nbsp;
<a href="javascript:void(0);" data-toggle="modal" data-target="#createPolicyModal" ng-click="vm.editReplication(r.id)"><span class="glyphicon glyphicon-pencil"></span></a>
&nbsp;
<a href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a>
<!--a href="javascript:void(0);"><span class="glyphicon glyphicon-trash"></span></a-->
</td>
</tr>
</tbody>well-split
</tbody>
</table>
</div>
</div>

View File

@ -21,7 +21,7 @@
'email': user.email,
'password': user.password,
'realname': user.fullName,
'comment': user.comments
'comment': user.comment
};
SignUpService(userObject)
.success(signUpSuccess)

View File

@ -144,6 +144,7 @@ var locale_messages = {
'description': 'Description',
'destination': 'Destination',
'start_time': 'Start Time',
'end_time': 'End Time',
'activation': 'Activation',
'replication_jobs': 'Replication Jobs',
'actions': 'Actions',

View File

@ -142,6 +142,7 @@ var locale_messages = {
'description': '描述',
'destination': '目标',
'start_time': '起始时间',
'end_time': '结束时间',
'activation': '活动状态',
'replication_jobs': '复制任务',
'actions': '操作',