manage_alert_notifications_controller.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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. var validator = require('utils/validator');
  20. App.ManageAlertNotificationsController = Em.Controller.extend({
  21. name: 'manageAlertNotificationsController',
  22. /**
  23. * Are alert notifications loaded
  24. * @type {boolean}
  25. */
  26. isLoaded: false,
  27. /**
  28. * Create/Edit modal popup object
  29. * used to hide popup
  30. * @type {App.ModalPopup}
  31. */
  32. createEditPopup: null,
  33. /**
  34. * Map of edit inputs shown in Create/Edit Notification popup
  35. * @type {Object}
  36. */
  37. inputFields: Em.Object.create({
  38. name: {
  39. label: Em.I18n.t('common.name'),
  40. value: '',
  41. defaultValue: ''
  42. },
  43. groups: {
  44. label: Em.I18n.t('common.groups'),
  45. value: [],
  46. defaultValue: []
  47. },
  48. global: {
  49. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.global'),
  50. value: false,
  51. defaultValue: false,
  52. disabled: false
  53. },
  54. method: {
  55. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.method'),
  56. value: '',
  57. defaultValue: ''
  58. },
  59. email: {
  60. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.email'),
  61. value: '',
  62. defaultValue: ''
  63. },
  64. SMTPServer: {
  65. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPServer'),
  66. value: '',
  67. defaultValue: ''
  68. },
  69. SMTPPort: {
  70. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPPort'),
  71. value: '',
  72. defaultValue: ''
  73. },
  74. SMTPUseAuthentication: Em.Object.create({
  75. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUseAuthentication'),
  76. value: false,
  77. defaultValue: false,
  78. inversedValue: function () {
  79. return !this.get('value');
  80. }.property('value')
  81. }),
  82. SMTPUsername: {
  83. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUsername'),
  84. value: '',
  85. defaultValue: ''
  86. },
  87. SMTPPassword: {
  88. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPPassword'),
  89. value: '',
  90. defaultValue: ''
  91. },
  92. SMTPSTARTTLS: {
  93. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPSTARTTLS'),
  94. value: false,
  95. defaultValue: false
  96. },
  97. emailFrom: {
  98. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.emailFrom'),
  99. value: '',
  100. defaultValue: ''
  101. },
  102. version: {
  103. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.version'),
  104. value: '',
  105. defaultValue: ''
  106. },
  107. OIDs: {
  108. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.OIDs'),
  109. value: '',
  110. defaultValue: ''
  111. },
  112. community: {
  113. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.community'),
  114. value: '',
  115. defaultValue: ''
  116. },
  117. port: {
  118. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.port'),
  119. value: '',
  120. defaultValue: ''
  121. },
  122. severityFilter: {
  123. label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.severityFilter'),
  124. value: [],
  125. defaultValue: []
  126. },
  127. description: {
  128. label: Em.I18n.t('common.description'),
  129. value: '',
  130. defaultValue: ''
  131. },
  132. customProperties: Em.A([])
  133. }),
  134. /**
  135. * List of available Notification types
  136. * used in Type combobox
  137. * @type {Array}
  138. */
  139. methods: ['EMAIL', 'SNMP'],
  140. /**
  141. * List of available value for Severity Filter
  142. * used in Severity Filter combobox
  143. * @type {Array}
  144. */
  145. severities: ['OK', 'WARNING', 'CRITICAL', 'UNKNOWN'],
  146. /**
  147. * List of available SNMP versions
  148. * @type {Array}
  149. */
  150. SNMPVersions: ['SNMPv1', 'SNMPv2c', 'SNMPv3'],
  151. /**
  152. * List of all Alert Notifications
  153. * @type {App.AlertNotification[]}
  154. */
  155. alertNotifications: function () {
  156. return this.get('isLoaded') ? App.AlertNotification.find().toArray() : [];
  157. }.property('isLoaded'),
  158. /**
  159. * List of all Alert Groups
  160. * @type {App.AlertGroup[]}
  161. */
  162. allAlertGroups: function () {
  163. return this.get('isLoaded') ? App.AlertGroup.find().toArray() : [];
  164. }.property('isLoaded'),
  165. /**
  166. * Selected Alert Notification
  167. * @type {App.AlertNotification}
  168. */
  169. selectedAlertNotification: null,
  170. /**
  171. * Addable to <code>selectedAlertNotification.properties</code> custom property
  172. * @type {{name: string, value: string}}
  173. */
  174. newCustomProperty: {name: '', value: ''},
  175. /**
  176. * List custom property names that shouldn't be displayed on Edit page
  177. * @type {string[]}
  178. */
  179. ignoredCustomProperties: [
  180. 'ambari.dispatch.credential.password',
  181. 'ambari.dispatch.credential.username',
  182. 'ambari.dispatch.recipients',
  183. 'ambari.dispatch.snmp.community',
  184. 'ambari.dispatch.snmp.oids.trap',
  185. 'ambari.dispatch.snmp.port',
  186. 'ambari.dispatch.snmp.version',
  187. 'mail.smtp.auth',
  188. 'mail.smtp.from',
  189. 'mail.smtp.host',
  190. 'mail.smtp.port',
  191. 'mail.smtp.starttls.enable'
  192. ],
  193. /**
  194. * Load all Alert Notifications from server
  195. * @method loadAlertNotifications
  196. */
  197. loadAlertNotifications: function () {
  198. var self = this;
  199. this.set('isLoaded', false);
  200. App.router.get('updateController').updateAlertGroups(function () {
  201. App.ajax.send({
  202. name: 'alerts.notifications',
  203. sender: self,
  204. success: 'getAlertNotificationsSuccessCallback',
  205. error: 'getAlertNotificationsErrorCallback'
  206. });
  207. });
  208. },
  209. /**
  210. * Success-callback for load alert notifications request
  211. * @param {object} json
  212. * @method getAlertNotificationsSuccessCallback
  213. */
  214. getAlertNotificationsSuccessCallback: function (json) {
  215. App.alertNotificationMapper.map(json);
  216. this.set('isLoaded', true);
  217. },
  218. /**
  219. * Error-callback for load alert notifications request
  220. * @method getAlertNotificationsErrorCallback
  221. */
  222. getAlertNotificationsErrorCallback: function () {
  223. this.set('isLoaded', true);
  224. },
  225. /**
  226. * Add Notification button handler
  227. * @method addAlertNotification
  228. */
  229. addAlertNotification: function () {
  230. var inputFields = this.get('inputFields');
  231. inputFields.set('global.disabled', false);
  232. Em.keys(inputFields).forEach(function (key) {
  233. inputFields.set(key + '.value', inputFields.get(key + '.defaultValue'));
  234. });
  235. this.showCreateEditPopup(false);
  236. },
  237. /**
  238. * Edit Notification button handler
  239. * @method editAlertNotification
  240. */
  241. editAlertNotification: function () {
  242. this.fillEditCreateInputs();
  243. this.showCreateEditPopup(true);
  244. },
  245. /**
  246. * Fill inputs of Create/Edit popup form
  247. * @param addCopyToName define whether add 'Copy of ' to name
  248. * @method fillEditCreateInputs
  249. */
  250. fillEditCreateInputs: function (addCopyToName) {
  251. var inputFields = this.get('inputFields');
  252. var selectedAlertNotification = this.get('selectedAlertNotification');
  253. inputFields.set('name.value', (addCopyToName ? 'Copy of ' : '') + selectedAlertNotification.get('name'));
  254. inputFields.set('groups.value', selectedAlertNotification.get('groups').toArray());
  255. inputFields.set('email.value', selectedAlertNotification.get('properties')['ambari.dispatch.recipients'] ?
  256. selectedAlertNotification.get('properties')['ambari.dispatch.recipients'].join(', ') : '');
  257. inputFields.set('SMTPServer.value', selectedAlertNotification.get('properties')['mail.smtp.host']);
  258. inputFields.set('SMTPPort.value', selectedAlertNotification.get('properties')['mail.smtp.port']);
  259. inputFields.set('SMTPUseAuthentication.value', selectedAlertNotification.get('properties')['mail.smtp.auth']);
  260. inputFields.set('SMTPUsername.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.username']);
  261. inputFields.set('SMTPPassword.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.password']);
  262. inputFields.set('SMTPSTARTTLS.value', selectedAlertNotification.get('properties')['mail.smtp.starttls.enable']);
  263. inputFields.set('emailFrom.value', selectedAlertNotification.get('properties')['mail.smtp.from']);
  264. inputFields.set('version.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.version']);
  265. inputFields.set('OIDs.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.oids.trap']);
  266. inputFields.set('community.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.community']);
  267. inputFields.set('port.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.port']);
  268. inputFields.set('severityFilter.value', selectedAlertNotification.get('alertStates'));
  269. inputFields.set('global.value', selectedAlertNotification.get('global'));
  270. // not allow to edit global field
  271. inputFields.set('global.disabled', true);
  272. inputFields.set('description.value', selectedAlertNotification.get('description'));
  273. inputFields.set('method.value', selectedAlertNotification.get('type'));
  274. inputFields.get('customProperties').clear();
  275. var properties = selectedAlertNotification.get('properties');
  276. var ignoredCustomProperties = this.get('ignoredCustomProperties');
  277. Em.keys(properties).forEach(function (k) {
  278. if (ignoredCustomProperties.contains(k)) return;
  279. inputFields.get('customProperties').pushObject({
  280. name: k,
  281. value: properties[k],
  282. defaultValue: properties[k]
  283. });
  284. });
  285. },
  286. /**
  287. * Show Edit or Create Notification popup
  288. * @param {boolean} isEdit true - edit, false - create
  289. * @returns {App.ModalPopup}
  290. * @method showCreateEditPopup
  291. */
  292. showCreateEditPopup: function (isEdit) {
  293. var self = this;
  294. var createEditPopup = App.ModalPopup.show({
  295. header: isEdit ? Em.I18n.t('alerts.actions.manage_alert_notifications_popup.editHeader') : Em.I18n.t('alerts.actions.manage_alert_notifications_popup.addHeader'),
  296. classNames: ['create-edit-alert-notification-popup'],
  297. bodyClass: Em.View.extend({
  298. controller: this,
  299. templateName: require('templates/main/alerts/create_alert_notification'),
  300. /**
  301. * @type {string}
  302. */
  303. tooltipForGlobalCheckbox: function () {
  304. return isEdit ? '' : Em.I18n.t('alerts.actions.manage_alert_notifications_popup.global.tooltip');
  305. }.property(),
  306. didInsertElement: function () {
  307. App.tooltip($('.checkbox-tooltip'));
  308. this.nameValidation();
  309. },
  310. isEmailMethodSelected: function () {
  311. return this.get('controller.inputFields.method.value') === 'EMAIL';
  312. }.property('controller.inputFields.method.value'),
  313. nameValidation: function () {
  314. this.set('parentView.hasErrors', !this.get('controller.inputFields.name.value').trim());
  315. }.observes('controller.inputFields.name.value'),
  316. groupsSelectView: Em.Select.extend({
  317. attributeBindings: ['disabled'],
  318. init: function () {
  319. this._super();
  320. this.set('parentView.groupSelect', this);
  321. }
  322. }),
  323. groupSelect: null,
  324. selectAllGroups: function () {
  325. if (!this.get('controller.inputFields.global.value')) {
  326. this.set('groupSelect.selection', this.get('groupSelect.content').slice());
  327. }
  328. },
  329. clearAllGroups: function () {
  330. if (!this.get('controller.inputFields.global.value')) {
  331. this.set('groupSelect.selection', []);
  332. }
  333. },
  334. severitySelectView: Em.Select.extend({
  335. init: function () {
  336. this._super();
  337. this.set('parentView.severitySelect', this);
  338. }
  339. }),
  340. severitySelect: null,
  341. selectAllSeverity: function () {
  342. this.set('severitySelect.selection', this.get('severitySelect.content').slice());
  343. },
  344. clearAllSeverity: function () {
  345. this.set('severitySelect.selection', []);
  346. }
  347. }),
  348. isSaving: false,
  349. hasErrors: false,
  350. primary: Em.I18n.t('common.save'),
  351. disablePrimary: function () {
  352. return this.get('isSaving') || this.get('hasErrors');
  353. }.property('isSaving', 'hasErrors'),
  354. onPrimary: function () {
  355. this.set('isSaving', true);
  356. var apiObject = self.formatNotificationAPIObject();
  357. if (isEdit) {
  358. self.updateAlertNotification(apiObject);
  359. } else {
  360. self.createAlertNotification(apiObject);
  361. }
  362. }
  363. });
  364. this.set('createEditPopup', createEditPopup);
  365. return createEditPopup;
  366. },
  367. /**
  368. * Create API-formatted object from data populate by user
  369. * @returns {Object}
  370. * @method formatNotificationAPIObject
  371. */
  372. formatNotificationAPIObject: function () {
  373. var inputFields = this.get('inputFields');
  374. var properties = {};
  375. if (inputFields.get('method.value') === 'EMAIL') {
  376. properties['ambari.dispatch.recipients'] = inputFields.get('email.value').replace(/\s/g, '').split(',');
  377. properties['mail.smtp.host'] = inputFields.get('SMTPServer.value');
  378. properties['mail.smtp.port'] = inputFields.get('SMTPPort.value');
  379. properties['mail.smtp.from'] = inputFields.get('emailFrom.value');
  380. properties['mail.smtp.auth'] = inputFields.get('SMTPUseAuthentication.value');
  381. if (inputFields.get('SMTPUseAuthentication.value')) {
  382. properties['ambari.dispatch.credential.username'] = inputFields.get('SMTPUsername.value');
  383. properties['ambari.dispatch.credential.password'] = inputFields.get('SMTPPassword.value');
  384. properties['mail.smtp.starttls.enable'] = inputFields.get('SMTPSTARTTLS.value');
  385. }
  386. } else {
  387. properties['ambari.dispatch.snmp.version'] = inputFields.get('version.value');
  388. properties['ambari.dispatch.snmp.oids.trap'] = inputFields.get('OIDs.value');
  389. properties['ambari.dispatch.snmp.community'] = inputFields.get('community.value');
  390. properties['ambari.dispatch.snmp.port'] = inputFields.get('port.value');
  391. }
  392. inputFields.get('customProperties').forEach(function (customProperty) {
  393. properties[customProperty.name] = customProperty.value;
  394. });
  395. var apiObject = {
  396. AlertTarget: {
  397. name: inputFields.get('name.value'),
  398. description: inputFields.get('description.value'),
  399. global: inputFields.get('global.value'),
  400. notification_type: inputFields.get('method.value'),
  401. alert_states: inputFields.get('severityFilter.value'),
  402. properties: properties
  403. }
  404. };
  405. if (!inputFields.get('global.value')) {
  406. apiObject.AlertTarget.groups = inputFields.get('groups.value').mapProperty('id');
  407. }
  408. return apiObject;
  409. },
  410. /**
  411. * Send request to server to create Alert Notification
  412. * @param {object} apiObject (@see formatNotificationAPIObject)
  413. * @returns {$.ajax}
  414. * @method createAlertNotification
  415. */
  416. createAlertNotification: function (apiObject) {
  417. return App.ajax.send({
  418. name: 'alerts.create_alert_notification',
  419. sender: this,
  420. data: {
  421. data: apiObject
  422. },
  423. success: 'createAlertNotificationSuccessCallback',
  424. error: 'saveErrorCallback'
  425. });
  426. },
  427. /**
  428. * Success callback for <code>createAlertNotification</code>
  429. * @method createAlertNotificationSuccessCallback
  430. */
  431. createAlertNotificationSuccessCallback: function () {
  432. this.loadAlertNotifications();
  433. var createEditPopup = this.get('createEditPopup');
  434. if (createEditPopup) {
  435. createEditPopup.hide();
  436. }
  437. },
  438. /**
  439. * Send request to server to update Alert Notification
  440. * @param {object} apiObject (@see formatNotificationAPIObject)
  441. * @returns {$.ajax}
  442. * @method updateAlertNotification
  443. */
  444. updateAlertNotification: function (apiObject) {
  445. return App.ajax.send({
  446. name: 'alerts.update_alert_notification',
  447. sender: this,
  448. data: {
  449. data: apiObject,
  450. id: this.get('selectedAlertNotification.id')
  451. },
  452. success: 'updateAlertNotificationSuccessCallback',
  453. error: 'saveErrorCallback'
  454. });
  455. },
  456. /**
  457. * Success callback for <code>updateAlertNotification</code>
  458. * @method updateAlertNotificationSuccessCallback
  459. */
  460. updateAlertNotificationSuccessCallback: function () {
  461. this.loadAlertNotifications();
  462. var createEditPopup = this.get('createEditPopup');
  463. if (createEditPopup) {
  464. createEditPopup.hide();
  465. }
  466. },
  467. /**
  468. * Error callback for <code>createAlertNotification</code> and <code>updateAlertNotification</code>
  469. * @method saveErrorCallback
  470. */
  471. saveErrorCallback: function () {
  472. this.set('createEditPopup.isSaving', false);
  473. },
  474. /**
  475. * Delete Notification button handler
  476. * @return {App.ModalPopup}
  477. * @method deleteAlertNotification
  478. */
  479. deleteAlertNotification: function () {
  480. var self = this;
  481. return App.showConfirmationPopup(function () {
  482. App.ajax.send({
  483. name: 'alerts.delete_alert_notification',
  484. sender: self,
  485. data: {
  486. id: self.get('selectedAlertNotification.id')
  487. },
  488. success: 'deleteAlertNotificationSuccessCallback'
  489. });
  490. }, Em.I18n.t('alerts.actions.manage_alert_notifications_popup.confirmDeleteBody').format(this.get('selectedAlertNotification.name')),
  491. null, Em.I18n.t('alerts.actions.manage_alert_notifications_popup.confirmDeleteHeader'), Em.I18n.t('common.delete'));
  492. },
  493. /**
  494. * Success callback for <code>deleteAlertNotification</code>
  495. * @method deleteAlertNotificationSuccessCallback
  496. */
  497. deleteAlertNotificationSuccessCallback: function () {
  498. this.loadAlertNotifications();
  499. var selectedAlertNotification = this.get('selectedAlertNotification');
  500. selectedAlertNotification.deleteRecord();
  501. this.set('selectedAlertNotification', null);
  502. },
  503. /**
  504. * Duplicate Notification button handler
  505. * @method duplicateAlertNotification
  506. */
  507. duplicateAlertNotification: function () {
  508. this.fillEditCreateInputs(true);
  509. this.showCreateEditPopup();
  510. },
  511. /**
  512. * Show popup with form for new custom property
  513. * @method addCustomPropertyHandler
  514. * @return {App.ModalPopup}
  515. */
  516. addCustomPropertyHandler: function () {
  517. var self = this;
  518. return App.ModalPopup.show({
  519. header: Em.I18n.t('alerts.notifications.addCustomPropertyPopup.header'),
  520. primary: Em.I18n.t('common.add'),
  521. bodyClass: Em.View.extend({
  522. /**
  523. * If some error with new custom property
  524. * @type {boolean}
  525. */
  526. isError: false,
  527. controller: this,
  528. /**
  529. * Error message for new custom property (invalid name, existed name etc)
  530. * @type {string}
  531. */
  532. errorMessage: '',
  533. /**
  534. * Check new custom property for errors with its name
  535. * @method errorHandler
  536. */
  537. errorsHandler: function () {
  538. var name = this.get('controller.newCustomProperty.name');
  539. var flag = validator.isValidConfigKey(name);
  540. if (flag) {
  541. if (this.get('controller.inputFields.customProperties').mapProperty('name').contains(name) ||
  542. this.get('controller.ignoredCustomProperties').contains(name)) {
  543. this.set('errorMessage', Em.I18n.t('alerts.notifications.addCustomPropertyPopup.error.propertyExists'));
  544. flag = false;
  545. }
  546. }
  547. else {
  548. this.set('errorMessage', Em.I18n.t('alerts.notifications.addCustomPropertyPopup.error.invalidPropertyName'));
  549. }
  550. this.set('isError', !flag);
  551. this.set('parentView.disablePrimary', !flag);
  552. }.observes('controller.newCustomProperty.name'),
  553. templateName: require('templates/main/alerts/add_custom_config_to_alert_notification_popup')
  554. }),
  555. disablePrimary: true,
  556. onPrimary: function () {
  557. self.addCustomProperty();
  558. self.set('newCustomProperty', {name: '', value: ''}); // cleanup
  559. this.hide();
  560. }
  561. });
  562. },
  563. /**
  564. * Add Custom Property to <code>selectedAlertNotification</code> (push it to <code>properties</code>-field)
  565. * @method addCustomProperty
  566. */
  567. addCustomProperty: function () {
  568. var newCustomProperty = this.get('newCustomProperty');
  569. this.get('inputFields.customProperties').pushObject({
  570. name: newCustomProperty.name,
  571. value: newCustomProperty.value,
  572. defaultValue: newCustomProperty.value
  573. });
  574. },
  575. /**
  576. * "Remove"-button click handler
  577. * Delete customProperty from <code>inputFields.customProperties</code>
  578. * @param {object} e
  579. * @method removeCustomProperty
  580. */
  581. removeCustomPropertyHandler: function (e) {
  582. var customProperties = this.get('inputFields.customProperties');
  583. this.set('inputFields.customProperties', customProperties.without(e.context));
  584. }
  585. });