disable_controller.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. require('controllers/main/admin/kerberos/progress_controller');
  20. require('controllers/main/admin/security/security_progress_controller');
  21. App.KerberosDisableController = App.KerberosProgressPageController.extend(App.WizardEnableDone, {
  22. name: 'kerberosDisableController',
  23. clusterDeployState: 'DEFAULT',
  24. commands: ['stopServices', 'unkerberize', 'deleteKerberos', 'startAllServices'],
  25. tasksMessagesPrefix: 'admin.kerberos.disable.step',
  26. loadStep: function() {
  27. this.set('content.controllerName', 'kerberosDisableController');
  28. this.loadTasksStatuses();
  29. this.loadTasksRequestIds();
  30. this.loadRequestIds();
  31. this._super();
  32. },
  33. unkerberize: function () {
  34. return App.ajax.send({
  35. name: 'admin.unkerberize.cluster',
  36. sender: this,
  37. success: 'startPolling',
  38. error: 'onTaskErrorWithSkip'
  39. });
  40. },
  41. skipTask: function () {
  42. return App.ajax.send({
  43. name: 'admin.unkerberize.cluster.skip',
  44. sender: this,
  45. success: 'startPolling',
  46. error: 'onTaskError'
  47. });
  48. },
  49. deleteKerberos: function () {
  50. return App.ajax.send({
  51. name: 'common.delete.service',
  52. sender: this,
  53. data: {
  54. serviceName: 'KERBEROS'
  55. },
  56. success: 'onTaskCompleted',
  57. error: 'onTaskCompleted'
  58. });
  59. },
  60. startAllServices: function () {
  61. this.startServices(true);
  62. }
  63. });