NamespaceNavigatorPane.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 NamespaceNavigatorPane = ContentView.extend({
  13. init: function init(options) {
  14. NamespaceNavigatorPane.inherited('init', this, arguments);
  15. _.extend(this, options);
  16. },
  17. getTitle: function getTitle() {
  18. return StringResource.get('accountList_fullperspective');
  19. },
  20. getIcon: function getIcon() {
  21. return 'user_32_v6';
  22. },
  23. setFocus: function setFocus() {},
  24. render: function render() {
  25. var nsNavView = React.createElement(AdminReact.NamespaceNavigatorView, {
  26. glassContext: this.glassContext,
  27. parent: this
  28. });
  29. ReactDOM.render(nsNavView, this.$el[0]);
  30. return Promise.resolve();
  31. },
  32. remove: function remove() {
  33. NamespaceNavigatorPane.inherited('remove', this, arguments);
  34. ReactDOM.unmountComponentAtNode(this.$el[0]);
  35. }
  36. });
  37. return NamespaceNavigatorPane;
  38. });