CloudStoragePane.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. *
  5. * IBM Cognos Products: ADMIN
  6. *
  7. * Copyright IBM Corp. 2019
  8. *
  9. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  10. */
  11. define(['react', 'react-dom', 'jquery', 'underscore', 'bi/glass/app/ContentView', 'bi/admin/nls/StringResource', 'ba-react-admin/ba-react-admin.min'], function (React, ReactDOM, $, _, ContentView, StringResource, AdminReact) {
  12. var view = ContentView.extend({
  13. init: function init(options) {
  14. view.inherited('init', this, arguments);
  15. _.extend(this, options);
  16. },
  17. getTitle: function getTitle() {
  18. return StringResource.get('cloudStorage');
  19. },
  20. getIcon: function getIcon() {
  21. return 'ba_content_nav-cloud_16';
  22. },
  23. setFocus: function setFocus() {},
  24. render: function render() {
  25. var cloudStorageView = React.createElement(AdminReact.CloudStorageView, {
  26. StringResource: StringResource,
  27. glassContext: this.glassContext,
  28. parent: this
  29. });
  30. ReactDOM.render(cloudStorageView, this.$el[0]);
  31. return Promise.resolve();
  32. },
  33. remove: function remove() {
  34. view.inherited('remove', this, arguments);
  35. ReactDOM.unmountComponentAtNode(this.$el[0]);
  36. }
  37. });
  38. return view;
  39. });