Avoid using unnecessary checkbox for solr config
This commit is contained in:
+4
-4
@@ -226,17 +226,17 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
|
||||
$('#solrConfigModal').modal('show');
|
||||
},
|
||||
|
||||
submit: function () {
|
||||
submit: function (newState) {
|
||||
$scope.solrConfig.busy = true;
|
||||
|
||||
Client.setSolrConfig($scope.solrConfig.enabled, function (error) {
|
||||
Client.setSolrConfig(newState, function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$timeout(function () {
|
||||
$scope.solrConfig.busy = false;
|
||||
// FIXME: these values are fake. but cannot get current status from mail server since it might be restarting
|
||||
$scope.solrConfig.currentConfig.enabled = $scope.solrConfig.enabled;
|
||||
$scope.solrConfig.running = $scope.solrConfig.enabled;
|
||||
$scope.solrConfig.currentConfig.enabled = newState;
|
||||
$scope.solrConfig.running = newState;
|
||||
|
||||
$timeout(function () { $scope.solrConfig.refresh(); }, 20000); // get real values after 20 seconds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user