Avoid using unnecessary checkbox for solr config

This commit is contained in:
Johannes Zellner
2022-02-09 16:22:44 +01:00
parent 12fa9731b8
commit 7fc92101d5
2 changed files with 10 additions and 14 deletions
+4 -4
View File
@@ -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