AccountListPane.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: Cognos Analytics
  5. * Copyright IBM Corp. 2015, 2017
  6. * US Government Users Restricted Rights - Use, duplication or disclosure
  7. * restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['underscore', 'bi/admin/common/slideout/BasePane', 'bi/admin/account/ui/SecurityObjectExplorerView', 'react-dom', 'react', 'bi/admin/account/services/SecurityObjectExplorerAdaptor'], function (_, BasePane, SecurityObjectExplorerView, ReactDOM, React, SecurityObjectExplorerAdaptor) {
  10. 'use strict'; //NOSONAR: meant to be strict
  11. var AccountListPane = BasePane.extend({
  12. init: function init(options) {
  13. AccountListPane.inherited('init', this, arguments);
  14. this.explorerView = this._getNewSecurityObjectExplorerView();
  15. },
  16. _getNewSecurityObjectExplorerView: function _getNewSecurityObjectExplorerView() {
  17. return new SecurityObjectExplorerView({
  18. glassContext: this.glassContext,
  19. showBreadcrumbs: true,
  20. listAdaptor: new SecurityObjectExplorerAdaptor({
  21. glassContext: this.glassContext
  22. }),
  23. parent: this,
  24. includeToolbar: true
  25. });
  26. },
  27. renderBody: function renderBody($body) {
  28. this.explorerView.$el = $body;
  29. return this.explorerView.render($body);
  30. },
  31. remove: function remove() {
  32. AccountListPane.inherited('remove', this, arguments);
  33. ReactDOM.unmountComponentAtNode(this.explorerView.$el.find('.bi-admin-account-pagingBar')[0]);
  34. ReactDOM.unmountComponentAtNode(this.explorerView.$el.find('.bi-admin-account-createNewBar')[0]);
  35. ReactDOM.unmountComponentAtNode(this.explorerView.$el.find(".bi-admin-filterbar-leading")[0]);
  36. }
  37. });
  38. return AccountListPane;
  39. });