Check if passwords match on OS Global Config page
Change-Id: Ia4d2ccb57687595e0efb13f5783f8a4ebc8819be
This commit is contained in:
@@ -709,8 +709,8 @@ compassAppDev.run(function($httpBackend, settings, $http) {
|
||||
var config = {
|
||||
"os_config": {
|
||||
"server_credentials": {
|
||||
"username": "admin",
|
||||
"password": "admin"
|
||||
"username": "root",
|
||||
"password": "huawei"
|
||||
},
|
||||
"partition": {
|
||||
"/var": {
|
||||
|
||||
@@ -203,11 +203,13 @@
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="password" class="col-xs-10 col-sm-5" placeholder="Confirm Password" ng-model="confirmPassword" name="server-confirmpassword" required>
|
||||
<input type="password" class="col-xs-10 col-sm-5" placeholder="Confirm Password" ng-model="confirmPassword" data-match="server_credentials.password" name="confirmPassword" required>
|
||||
<div class="margin-left-14 inline">
|
||||
<span class="text-danger" data-ng-show="generalForm.confirmPassword.$error.match">Passwords do not match</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<!--table class="table table-hover nowrap">
|
||||
|
||||
@@ -10,6 +10,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
'angularSpinner',
|
||||
'ngAnimate'
|
||||
]);
|
||||
|
||||
wizardModule.config(function config($stateProvider) {
|
||||
$stateProvider
|
||||
.state('wizard', {
|
||||
@@ -74,8 +75,6 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// get pre-config data for wizard and set wizard steps based on different adapters
|
||||
var oldConfig = clusterConfigData;
|
||||
$scope.steps = [];
|
||||
@@ -611,9 +610,16 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
wizardFactory.setCommitState(commitState);
|
||||
});
|
||||
} else {
|
||||
var message = {
|
||||
var message = {};
|
||||
if ($scope.generalForm.$error.required) {
|
||||
message = {
|
||||
"message": "The required(*) fields can not be empty !"
|
||||
};
|
||||
} else if ($scope.generalForm.$error.match) {
|
||||
message = {
|
||||
"message": "The passwords do not match"
|
||||
};
|
||||
}
|
||||
var commitState = {
|
||||
"name": "os_global",
|
||||
"state": "error",
|
||||
@@ -880,7 +886,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
var ip_start = $("#" + key + "-ipstart").val();
|
||||
var interval = parseInt($("#" + key + "-increase-num").val());
|
||||
$scope.fillIPBySequence(ip_start, interval, key);
|
||||
})
|
||||
});
|
||||
// Autofill hostname
|
||||
var hostname_rule = $("#hostname-rule").val();
|
||||
$scope.fillHostname(hostname_rule);
|
||||
@@ -1726,7 +1732,7 @@ define(['uiRouter', 'angularTable', 'angularDragDrop', 'angularTouch', 'ngSpinne
|
||||
});
|
||||
}).error(function(data) {
|
||||
console.warn("Review hosts error: ", data);
|
||||
})
|
||||
});
|
||||
//TODO: error handling
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user