Enable check config for System topic

This commit is contained in:
walking98
2019-05-09 20:26:29 +08:00
parent daa1cb6638
commit 68e9a7b6ca
2 changed files with 7 additions and 7 deletions

View File

@@ -265,7 +265,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
}); });
}; };
$scope.openUpdateDialog = function (topic) { $scope.openUpdateDialog = function (topic, sysFlag) {
$http({ $http({
method: "GET", method: "GET",
url: "topic/examineTopicConfig.query", url: "topic/examineTopicConfig.query",
@@ -274,16 +274,15 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
} }
}).success(function (resp) { }).success(function (resp) {
if(resp.status ==0){ if(resp.status ==0){
$scope.openCreateOrUpdateDialog(resp.data); $scope.openCreateOrUpdateDialog(resp.data, sysFlag);
}else { }else {
Notification.error({message: resp.errMsg, delay: 2000}); Notification.error({message: resp.errMsg, delay: 2000});
} }
}); });
}; };
$scope.openCreateOrUpdateDialog = function (request) { $scope.openCreateOrUpdateDialog = function (request, sysFlag) {
var bIsUpdate = true; var bIsUpdate = true;
if(request == null){ if(request == null){
request = [{ request = [{
writeQueueNums:16, writeQueueNums:16,
@@ -309,6 +308,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
template: 'topicModifyDialog', template: 'topicModifyDialog',
controller: 'topicModifyDialogController', controller: 'topicModifyDialogController',
data:{ data:{
sysFlag:sysFlag,
topicRequestList:request, topicRequestList:request,
allClusterNameList:Object.keys(resp.data.clusterInfo.clusterAddrTable), allClusterNameList:Object.keys(resp.data.clusterInfo.clusterAddrTable),
allBrokerNameList:Object.keys(resp.data.brokerServer), allBrokerNameList:Object.keys(resp.data.brokerServer),
@@ -320,7 +320,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
} }
$scope.openAddDialog = function () { $scope.openAddDialog = function () {
$scope.openCreateOrUpdateDialog(null); $scope.openCreateOrUpdateDialog(null, false);
} }
}]); }]);

View File

@@ -61,8 +61,7 @@
ng-click="consumerView(topic)">consumer {{'MANAGE' | translate}} ng-click="consumerView(topic)">consumer {{'MANAGE' | translate}}
</button> </button>
<button class="btn btn-raised btn-sm btn-primary" type="button" <button class="btn btn-raised btn-sm btn-primary" type="button"
ng-show="{{!sysFlag}}" ng-click="openUpdateDialog(topic, sysFlag)">topic {{'CONFIG' |translate}}
ng-click="openUpdateDialog(topic)">topic {{'CONFIG' |translate}}
</button> </button>
<button class="btn btn-raised btn-sm btn-primary" type="button" <button class="btn btn-raised btn-sm btn-primary" type="button"
ng-show="{{!sysFlag}}" ng-show="{{!sysFlag}}"
@@ -213,6 +212,7 @@
<div class="modal-footer"> <div class="modal-footer">
<div class="ngdialog-buttons"> <div class="ngdialog-buttons">
<button type="button" class="ngdialog-button ngdialog-button-primary" <button type="button" class="ngdialog-button ngdialog-button-primary"
ng-show="{{!ngDialogData.sysFlag}}"
ng-click="postTopicRequest(item)">{{ 'COMMIT' | translate }} ng-click="postTopicRequest(item)">{{ 'COMMIT' | translate }}
</button> </button>
<button type="button" class="ngdialog-button ngdialog-button-secondary" <button type="button" class="ngdialog-button ngdialog-button-secondary"