RunAsJobOptionsView.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Content Explorer
  5. *| (C) Copyright IBM Corp. 2018
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or disclosure
  8. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  9. * + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +
  10. */
  11. define(['underscore',
  12. 'bi/content_apps/RunAsOptionsView',
  13. 'bacontentnav/lib/@waca/core-client/js/core-client/ui/properties/PropertyUIControl',
  14. 'bi/content_apps/nls/StringResource'
  15. ], function(_, RunAsOptionsView, PropertyUIControl, StringResource) {
  16. 'use strict';
  17. var RunAsJobOptionsView = RunAsOptionsView.extend({
  18. init: function(options) {
  19. RunAsJobOptionsView.inherited('init', this, arguments);
  20. _.extend(this, options);
  21. },
  22. _getRunAsItemsSpec: function() {
  23. return [this._getBannerSpec(),
  24. this._getSeparatorSpec(),
  25. this._getRunNowOrLaterOptions(),
  26. this._getExecutionTimePicker(),
  27. this._getSeparatorSpec(),
  28. this._getFooterSpec()
  29. ];
  30. },
  31. _onRun: function() {
  32. _.extend(this._selections, this._runOptionsControl.getModifiedProperties());
  33. this.logger.debug('RunAsJobOptionsView._onRun', this._selections);
  34. this._executeRequest();
  35. this.glassContext.appController.showToast(StringResource.get('toastRunRequestWasSubmitted'));
  36. },
  37. _getRequestParams: function() {
  38. return this._appController.hideSlideOut().then(function() {
  39. this._setExecutionTimeRequestParams();
  40. }.bind(this));
  41. }
  42. });
  43. return RunAsJobOptionsView;
  44. });