[ui] disabled cluster removal during validation running
This commit is contained in:
@@ -54,7 +54,6 @@ angular.module('rubick.controllers', []).
|
|||||||
}
|
}
|
||||||
|
|
||||||
$scope.showAddClusterModal = function() {
|
$scope.showAddClusterModal = function() {
|
||||||
$('#add-cluster-modal').modal();
|
|
||||||
$('#add-cluster-modal').modal('show');
|
$('#add-cluster-modal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,11 +93,19 @@ angular.module('rubick.controllers', []).
|
|||||||
$scope.diagnosticsFinished = false;
|
$scope.diagnosticsFinished = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.removeCluster = function(clusterId) {
|
$scope.unselectCluster = function() {
|
||||||
$('#remove-cluster-confirm-modal').modal();
|
if (!$scope.runningValidation) {
|
||||||
$('#remove-cluster-confirm-modal').modal('show');
|
$scope.selectedCluster = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$scope.clusterIdToRemove = clusterId;
|
|
||||||
|
$scope.removeCluster = function(clusterId) {
|
||||||
|
if (!$scope.runningValidation) {
|
||||||
|
$('#remove-cluster-confirm-modal').modal('show');
|
||||||
|
|
||||||
|
$scope.clusterIdToRemove = clusterId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.removeConfirm = function() {
|
$scope.removeConfirm = function() {
|
||||||
@@ -106,6 +113,7 @@ angular.module('rubick.controllers', []).
|
|||||||
$scope.clusterIdToRemove = undefined;
|
$scope.clusterIdToRemove = undefined;
|
||||||
|
|
||||||
$http.delete(url).success(function() {
|
$http.delete(url).success(function() {
|
||||||
|
$scope.selectedCluster = undefined;
|
||||||
$scope.fetchClusters();
|
$scope.fetchClusters();
|
||||||
$('#remove-cluster-confirm-modal').modal('hide');
|
$('#remove-cluster-confirm-modal').modal('hide');
|
||||||
}).error(function() {
|
}).error(function() {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<div class="ui pointing left red label" ng-show="selectedCluster">
|
<div class="ui pointing left red label" ng-show="selectedCluster">
|
||||||
Selected Cluster:
|
Selected Cluster:
|
||||||
<div class="detail">{{selectedCluster.name}}</div>
|
<div class="detail">{{selectedCluster.name}}</div>
|
||||||
<i class="delete icon" ng-click="selectedCluster = undefined"></i>
|
<i class="delete icon" ng-click="unselectCluster()"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
<div class="item" ng-repeat="cluster in clusters">
|
<div class="item" ng-repeat="cluster in clusters">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a class="remove ui corner label"
|
<a class="remove ui corner label"
|
||||||
|
ng-disabled="runningValidation"
|
||||||
ng-click="removeCluster(cluster.id)">
|
ng-click="removeCluster(cluster.id)">
|
||||||
<i class="remove icon"></i>
|
<i class="remove icon"></i>
|
||||||
</a>
|
</a>
|
||||||
@@ -106,7 +107,7 @@
|
|||||||
name="nodes"
|
name="nodes"
|
||||||
id="nodes"
|
id="nodes"
|
||||||
required
|
required
|
||||||
ng-pattern="/^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/"
|
ng-pattern="/(?:(\w+)@)?([^:]+)(?::(\d+))?/"
|
||||||
ng-model="newCluster.nodes">
|
ng-model="newCluster.nodes">
|
||||||
<i class="terminal icon"></i>
|
<i class="terminal icon"></i>
|
||||||
<div class="ui corner label">
|
<div class="ui corner label">
|
||||||
|
|||||||
Reference in New Issue
Block a user