AccountExplorer.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. "use strict";
  2. /**
  3. * Licensed Materials - Property of IBM
  4. * IBM Cognos Products: admin
  5. * Copyright IBM Corp. 2015, 2020
  6. * US Government Users Restricted Rights -
  7. * Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. */
  9. define(['underscore', 'bi/commons/ui/core/Class', 'bi/admin/nls/StringResource', 'bi/admin/common/utils/AJAXUtils', 'ba-react-admin/ba-react-admin.min'], function (_, Class, StringResource, AJAXUtils, AdminReact) {
  10. 'use strict'; //NOSONAR: meant to be strict
  11. var AccountExplorer = Class.extend({
  12. _searchTypes: {
  13. 0: 'contains',
  14. 1: 'startsExact',
  15. 2: 'matchExact'
  16. },
  17. _pathStack: [],
  18. _nameSpaces: [],
  19. _content: [],
  20. _accountTypes: {
  21. 'namespaceFolder': {
  22. svgIcon: 'common-folder',
  23. titleId: 'namespaceFolder'
  24. },
  25. 'group': {
  26. svgIcon: 'common-group',
  27. titleId: 'group'
  28. },
  29. 'account': {
  30. svgIcon: 'common-user',
  31. titleId: 'account'
  32. },
  33. 'role': {
  34. svgIcon: 'common-role',
  35. titleId: 'role'
  36. }
  37. },
  38. _rootDirectory: {
  39. type: 'directory',
  40. defaultName: StringResource.get('namespaces'),
  41. url: '#'
  42. },
  43. _defaultTypes: ['namespaceFolder', 'group'],
  44. _defaultNamespaceName: null,
  45. _selectedNamespace: null,
  46. init: function init(options) {
  47. AccountExplorer.inherited('init', this, arguments);
  48. this.glassContext = options.glassContext;
  49. this.logger = this.glassContext.services.logger;
  50. this.sortColumnName = 'defaultName';
  51. this.sortOrder = 'asc';
  52. this.isHandlingMorePage = false;
  53. this.searchPageFrom = 0;
  54. this.searchPageSize = 100;
  55. this.searchOffset = 0;
  56. this._filterType = {
  57. 'account': true,
  58. 'role': true,
  59. 'group': true
  60. };
  61. var options = {
  62. method: 'GET',
  63. contentType: 'application/json; charset=utf-8',
  64. dataType: 'json',
  65. url: 'v1/configuration/keys?keys=Admin.mtCloudBuild'
  66. };
  67. this._getTenantNsFolderId();
  68. },
  69. getAccount: function getAccount(objectInfo) {
  70. var options = {
  71. dataType: 'json',
  72. type: 'GET',
  73. data: {
  74. 'fields': 'email,surname,givenName,userName,format,options,contentLocale,productLocale,timeZoneID,searchPath,tenantID,ancestors,permissions,disabled,defaultName,defaultDescription,creationTime,modificationTime,owner.defaultName'
  75. },
  76. url: objectInfo._meta.links.self.url,
  77. cache: false
  78. };
  79. return this.glassContext.services.ajax.ajax(options);
  80. },
  81. getItem: function getItem(objectInfo) {
  82. var options = {
  83. dataType: 'json',
  84. type: 'GET',
  85. data: {
  86. 'fields': 'searchPath,tenantID,ancestors,permissions,disabled,defaultName,defaultDescription,creationTime,modificationTime,owner.defaultName,owner.id,hidden'
  87. },
  88. url: objectInfo._meta.links.self.url,
  89. cache: false
  90. };
  91. return this.glassContext.services.ajax.ajax(options);
  92. },
  93. _getChildren: function _getChildren(objType, id, queryString) {
  94. var contentURL = 'v1/' + objType + '/' + id + '/items?';
  95. this.currentRequest = contentURL;
  96. var options = {
  97. dataType: 'json',
  98. type: 'GET',
  99. data: {
  100. 'fields': 'searchPath,tenantID,ancestors,permissions,disabled,defaultName,creationTime,modificationTime,id,hasChildren,hidden'
  101. },
  102. url: contentURL + queryString,
  103. cache: false
  104. };
  105. if (id === 'xOg__' && !this.tenantNsFolderId) {
  106. this._getTenantNsFolderId();
  107. }
  108. if (!this.pagingEnabled) {
  109. //return this.glassContext.services.ajax.ajax(options);
  110. return this.glassContext.getCoreSvc('.Ajax').ajax(options);
  111. } else {
  112. return AdminReact.PaginationHelper.getDataWithLookAhead(0, this.pagingValueSet, this, this.glassContext);
  113. }
  114. },
  115. _getTenantNsFolderId: function _getTenantNsFolderId() {
  116. var upsUrl = 'v1/users/~/user_profile_settings';
  117. var upsSettingsPromise = this.glassContext.services.fetch.get(upsUrl);
  118. return upsSettingsPromise.then(function (response) {
  119. this.tenantNsFolderId = response.data.rootFolder_CognosNamespace;
  120. }.bind(this)).catch(function (e) {
  121. this.tenantNsFolderId = null;
  122. }.bind(this));
  123. },
  124. getFolderPermission: function getFolderPermission(folderId) {
  125. var folderUrl = 'v1/folders/' + folderId;
  126. var folderPromise = this.glassContext.services.fetch.get(folderUrl);
  127. return folderPromise.then(function (response) {
  128. return response.data.permissions;
  129. });
  130. },
  131. _getCurrentIdentity: function _getCurrentIdentity() {
  132. var identityURL = 'v1/identity';
  133. var options = {
  134. dataType: 'json',
  135. type: 'GET',
  136. data: {},
  137. url: identityURL,
  138. cache: false
  139. };
  140. return this.glassContext.services.ajax.ajax(options);
  141. },
  142. _getNameSpaces: function _getNameSpaces() {
  143. var namespaceURL = 'v1/namespaces';
  144. var options = {
  145. dataType: 'json',
  146. type: 'GET',
  147. data: {},
  148. url: namespaceURL,
  149. cache: false
  150. };
  151. return this.glassContext.services.ajax.ajax(options);
  152. },
  153. startUp: function startUp() {
  154. return this._getNameSpaces().then(function (response) {
  155. var items = _.map(response.data, function (item) {
  156. var ct = item.creationTime || StringResource.get('unknown');
  157. ct = ct.split('T')[0];
  158. var mt = item.modificationTime || "";
  159. mt = mt.split('T')[0];
  160. item.creationTime = ct;
  161. item.modificationTime = mt;
  162. item.owner = StringResource.get('none');
  163. item.description = item.description || item.defaultName;
  164. item.svgIcon = 'common-namespace';
  165. item.auth = this._isActiveNS(item);
  166. return item;
  167. }.bind(this));
  168. this._nameSpaces = items;
  169. return this.selectNamespace();
  170. }.bind(this));
  171. },
  172. _isActiveNS: function _isActiveNS(objData) {
  173. return _.contains(objData.permissions, 'traverse');
  174. },
  175. _hasMultipleNamespaces: function _hasMultipleNamespaces() {
  176. return true;
  177. },
  178. _pushStack: function _pushStack(item, ancestor) {
  179. var index = _.indexOf(this._pathStack, item);
  180. if (index >= 0) {
  181. this._pathStack = _.first(this._pathStack, index + 1);
  182. } else {
  183. if (item.ancestors) {
  184. if (ancestor && ancestor.defaultName && ancestor.ancestors) {
  185. this._buildPathStack(ancestor);
  186. } else {
  187. this._pathStack.push(item);
  188. }
  189. } else if (item.type === 'namespace') {
  190. this._pathStack.push(item);
  191. } else {
  192. this._pathStack = [item];
  193. }
  194. }
  195. this._patchLink(item);
  196. },
  197. _buildPathStack: function _buildPathStack(ancestor) {
  198. this._pathStack = [];
  199. _.each(ancestor.ancestors, function (member) {
  200. if (member.type === 'directory') {
  201. member.defaultName = StringResource.get('namespaces');
  202. }
  203. this._pathStack.push(member);
  204. }.bind(this));
  205. if (ancestor.type === 'directory') {
  206. ancestor.defaultName = StringResource.get('namespaces');
  207. }
  208. this._pathStack.push(ancestor);
  209. },
  210. _patchLink: function _patchLink(item) {
  211. if (item.label && item.url) {
  212. return;
  213. }
  214. item.label = item.label || item.defaultName;
  215. var objType = '';
  216. if (item.type === 'namespace') {
  217. objType = 'namespaces';
  218. } else if (item.type === 'namespaceFolder') {
  219. objType = 'folders';
  220. }
  221. item.url = 'v1/' + objType + '/' + item.id;
  222. },
  223. selectRootDirectory: function selectRootDirectory() {
  224. this._pushStack(this._rootDirectory);
  225. this._selectedNamespace = null;
  226. return Promise.resolve();
  227. },
  228. updateHasMoreData: function updateHasMoreData() {
  229. this.noMoreData = this._fullContent.length <= this._content.length;
  230. },
  231. selectNamespace: function selectNamespace(ns) {
  232. this._content = [];
  233. this.clearGroupedContent();
  234. this._pathStack = [];
  235. this.searchOffset = 0;
  236. if (this._hasMultipleNamespaces()) {
  237. this._pushStack(this._rootDirectory);
  238. }
  239. ns = ns || this._defaultNamespaceName;
  240. this._selectedNamespace = this._getNamespaceObj(ns);
  241. if (this._canTraverseNamespace()) {
  242. var nsId = this._selectedNamespace.id;
  243. return new Promise(function (resolve, reject) {
  244. this._getChildren('namespaces', nsId, this.getQueryString()).then(function (result) {
  245. this._fullContent = result.data.data;
  246. this._fullContent.parentId = nsId;
  247. if (!this.pagingEnabled) {
  248. this._content = result.data.data.slice(0, this.searchPageSize);
  249. if (this._content.length <= this._fullContent.length) {
  250. this.noMoreData = true;
  251. } else {
  252. this.noMoreData = false;
  253. }
  254. }
  255. ;
  256. var parentNamespace;
  257. if (nsId === 'xOg__') {
  258. parentNamespace = this.tenantNsFolderId;
  259. } else {
  260. parentNamespace = nsId;
  261. }
  262. this.getFolderPermission(parentNamespace).then(function (tenantNsFolderPermissions) {
  263. this.parentObjectPermissions = tenantNsFolderPermissions;
  264. }.bind(this)).catch(function (e) {
  265. this.parentObjectPermissions = null;
  266. }.bind(this));
  267. this._pushStack(this._selectedNamespace);
  268. resolve();
  269. }.bind(this)).catch(function (e) {
  270. reject(e);
  271. }.bind(this));
  272. }.bind(this));
  273. } else {
  274. this._fullContent = [];
  275. return Promise.resolve();
  276. }
  277. },
  278. _canTraverseNamespace: function _canTraverseNamespace() {
  279. return this._selectedNamespace && this._selectedNamespace.permissions.indexOf('traverse') > -1;
  280. },
  281. _getNamespaceObj: function _getNamespaceObj(ns) {
  282. if (_.isString(ns)) {
  283. return _.find(this._nameSpaces, function (item) {
  284. return item.defaultName === ns;
  285. });
  286. } else {
  287. return ns;
  288. }
  289. },
  290. selectGroup: function selectGroup(group) {
  291. this._content = [];
  292. this.clearGroupedContent();
  293. if (group.permissions) {
  294. this.parentObjectPermissions = group.permissions;
  295. }
  296. return new Promise(function (resolve, reject) {
  297. this._getChildren('groups', group.id, this.getQueryString()).then(function (result) {
  298. this._fullContent = result.data.data;
  299. this._fullContent.parentId = group.id;
  300. if (!this.pagingEnabled) {
  301. this._content = result.data.data.slice(0, this.searchPageSize);
  302. } else {
  303. this._content = result.data.data.slice(0, this.pagingValueSet);
  304. }
  305. if (result.data.length > 0) {
  306. this._pushStack(result.data[0], group);
  307. } else {
  308. this._pushStack(group);
  309. }
  310. resolve();
  311. }.bind(this)).catch(function (e) {
  312. reject(e);
  313. }.bind(this));
  314. }.bind(this));
  315. },
  316. selectRole: function selectRole(role) {
  317. this._content = [];
  318. this.clearGroupedContent();
  319. if (role.permissions) {
  320. this.parentObjectPermissions = role.permissions;
  321. }
  322. return new Promise(function (resolve, reject) {
  323. this._getChildren('roles', role.id, this.getQueryString()).then(function (result) {
  324. this._fullContent = result.data.data;
  325. this._fullContent.parentId = role.id;
  326. if (!this.pagingEnabled) {
  327. this._content = result.data.data.slice(0, this.searchPageSize);
  328. } else {
  329. this._content = result.data.data.slice(0, this.pagingValueSet);
  330. }
  331. if (result.data.length > 0) {
  332. this._pushStack(result.data[0], role);
  333. } else {
  334. this._pushStack(role);
  335. }
  336. resolve();
  337. }.bind(this)).catch(function (e) {
  338. reject(e);
  339. }.bind(this));
  340. }.bind(this));
  341. },
  342. selectFolder: function selectFolder(folder) {
  343. this._content = [];
  344. this.clearGroupedContent();
  345. if (folder.permissions) {
  346. this.parentObjectPermissions = folder.permissions;
  347. }
  348. return new Promise(function (resolve, reject) {
  349. this._getChildren('folders', folder.id, this.getQueryString()).then(function (result) {
  350. this._fullContent = result.data.data;
  351. this._fullContent.parentId = folder.id;
  352. if (!this.pagingEnabled) {
  353. this._content = result.data.data.slice(0, this.searchPageSize);
  354. } else {
  355. this._content = result.data.data.slice(0, this.pagingValueSet);
  356. }
  357. if (result.data.length > 0) {
  358. this._pushStack(result.data[0], folder);
  359. } else {
  360. this._pushStack(folder);
  361. }
  362. resolve();
  363. }.bind(this)).catch(function (e) {
  364. reject(e);
  365. }.bind(this));
  366. }.bind(this));
  367. },
  368. selectCurrentPath: function selectCurrentPath() {
  369. return this.selectPath(this.getCurrentPath());
  370. },
  371. selectPath: function selectPath(item) {
  372. //NOSONAR
  373. switch (item.type) {
  374. case 'directory':
  375. return this.selectRootDirectory();
  376. case 'namespace':
  377. return this.selectNamespace(item.defaultName || 'Cognos');
  378. case 'namespaceFolder':
  379. return this.selectFolder(item);
  380. case 'role':
  381. return this.selectRole(item);
  382. case 'group':
  383. return this.selectGroup(item);
  384. default:
  385. this.glassContext.services.logger.error("unknown object type for selection:", item);
  386. }
  387. return Promise.resolve();
  388. },
  389. isTopOfPage: function isTopOfPage() {
  390. return this.searchOffset === 0;
  391. },
  392. getNextBrowsePage: function getNextBrowsePage(isPageDown) {
  393. if (isPageDown) {
  394. this.searchOffset += this.searchPageSize;
  395. this._content = this._fullContent.slice(Math.max(0, this.searchOffset - 3), this.searchOffset + this.searchPageSize);
  396. } else {
  397. this.searchOffset -= this.searchPageSize;
  398. if (this.searchOffset < 0) {
  399. this.searchOffset = 0;
  400. }
  401. this._content = this._fullContent.slice(this.searchOffset, this.searchOffset + this.searchPageSize);
  402. }
  403. if (this.searchOffset + this.searchPageSize >= this._fullContent.length) {
  404. this.noMoreData = true;
  405. } else {
  406. this.noMoreData = false;
  407. }
  408. },
  409. getNextSearchPage: function getNextSearchPage(isPageDown) {
  410. var hasAllTheData = isPageDown ? this.isHandlingMorePage : this.isTopOfPage();
  411. if (!this.isHandlingMorePage && !hasAllTheData && !_.isUndefined(this.lastSearchedKeyword)) {
  412. this.isHandlingMorePage = true;
  413. this.searchOffset = isPageDown ? this.searchPageSize + this.searchOffset : this.searchOffset - this.searchPageSize;
  414. return this.search(this.lastSearchedKeyword).then(function (data) {
  415. this.isHandlingMorePage = false;
  416. return data;
  417. }.bind(this));
  418. } else {
  419. return Promise.resolve();
  420. }
  421. },
  422. newSearch: function newSearch() {
  423. this.searchOffset = 0;
  424. this.lastSearchedKeyword = null;
  425. },
  426. search: function search(searchWord, searchMethod) {
  427. var method = this._searchTypes[searchMethod];
  428. var text = decodeURI(searchWord);
  429. var hasMixed1 = text.indexOf('"') !== -1 && (text.indexOf("'") !== -1 || text.indexOf("`") !== -1);
  430. var hasMixed2 = text.indexOf("'") !== -1 && (text.indexOf('"') !== -1 || text.indexOf("`") !== -1);
  431. var hasMixed3 = text.indexOf("`") !== -1 && (text.indexOf('"') !== -1 || text.indexOf("'") !== -1);
  432. if (hasMixed1 || hasMixed2 || hasMixed3) {
  433. //don't bother searching for names with mixed quotest. It can't exist in cm
  434. if (this.searchOffset === 0) {
  435. this._content = [];
  436. } else {
  437. this._content = this.oldContent;
  438. this.searchOffset -= this.searchPageSize;
  439. }
  440. this.noMoreData = true;
  441. return Promise.resolve();
  442. }
  443. return new Promise(function (resolve, reject) {
  444. var keyword = searchWord.replace(/^\s+|\s+$/g, '');
  445. this.lastSearchedKeyword = keyword;
  446. var contextstoreid = _.last(this.getPathStack()).id;
  447. if (contextstoreid === 'xOg__' && this.tenantNsFolderId && this.tenantNsFolderId !== 'xOg__') {
  448. contextstoreid = this.tenantNsFolderId;
  449. }
  450. this.clearGroupedContent();
  451. var sortChar = (this.sortOrder || 'asc') === 'asc' ? '%2b' : '-';
  452. var options = {
  453. method: 'GET',
  454. contentType: 'application/json; charset=utf-8',
  455. dataType: 'json'
  456. };
  457. options.url = AJAXUtils.getAJAXURL("namespace") + "/" + contextstoreid + '/search?types=' + this._getTypeString() + "&method=" + method + '&fields=id,position,userName,searchPath,tenantID,ancestors,permissions,disabled,defaultName,creationTime,modificationTime,objectClass,hasChildren&filter=' + keyword;
  458. options.url += "&sort=" + sortChar + this.sortColumnName;
  459. this.currentRequest = options.url; //searchPageSize + 1 because we wanted the rest call to return 1 more entry than what is required
  460. //for the page so we can know if there was more entries overall
  461. options.url += "&limit=" + (this.searchPageSize + 1);
  462. options.url += "&offset=" + this.searchOffset;
  463. options.success = function (data) {
  464. this._content = data.data; //searchPageSize + 1 because we wanted the rest call to return 1 more entry than what is required
  465. //for the page so we can know if there was more entries overall
  466. this.noMoreData = data.data.length !== this.searchPageSize + 1;
  467. if (!this.noMoreData) {
  468. data.data.pop();
  469. }
  470. resolve(data);
  471. }.bind(this);
  472. options.error = function (jqXHR, textStatus, errorThrown) {
  473. if (jqXHR.status === 404) {
  474. if (this.searchOffset === 0) {
  475. this._content = [];
  476. } else {
  477. this._content = this.oldContent;
  478. this.searchOffset -= this.searchPageSize;
  479. }
  480. this.noMoreData = true;
  481. resolve();
  482. } else {
  483. reject(jqXHR, textStatus, errorThrown);
  484. }
  485. }.bind(this);
  486. this.glassContext.services.ajax.ajax(options);
  487. }.bind(this));
  488. },
  489. _getTypeString: function _getTypeString() {
  490. var typeString = "namespace,namespaceFolder";
  491. typeString = typeString.concat(this._filterType.account ? ',account' : '', this._filterType.role ? ',role' : '', this._filterType.group ? ',group' : '');
  492. return typeString;
  493. },
  494. cacheOldContent: function cacheOldContent() {
  495. this.oldContent = this._content;
  496. },
  497. clearGroupedContent: function clearGroupedContent() {
  498. this._groupedContent = null;
  499. },
  500. getContent: function getContent(types) {
  501. var items = [];
  502. if (!_.isEmpty(this._content)) {
  503. types = types || this._defaultTypes;
  504. items = _.filter(this._content, function (item) {
  505. return _.contains(types, item.type);
  506. });
  507. items = _.map(items, function (item) {
  508. return this._patchItem(item);
  509. }.bind(this));
  510. }
  511. return items;
  512. },
  513. _patchItem: function _patchItem(item) {
  514. var at = this._accountTypes[item.type];
  515. if (item.type === 'account' && item.givenName && item.surname) {
  516. item.defaultName = item.givenName + ' ' + item.surname;
  517. }
  518. item.title = item.defaultName;
  519. item.svgIcon = at.svgIcon || 'common-folder';
  520. item.toolTip = item.defaultName;
  521. item.disabled = !!item.disabled;
  522. return item;
  523. },
  524. getGroupedContent: function getGroupedContent() {
  525. if (!this._groupedContent) {
  526. this._groupedContent = {};
  527. if (!_.isEmpty(this.getContent())) {
  528. var items = _.map(this.getContent(), function (item) {
  529. return this._patchItem(item);
  530. }.bind(this));
  531. this._groupedContent = _.groupBy(items, function (item) {
  532. return item.type;
  533. });
  534. }
  535. _.each(this._accountTypes, function (value, key) {
  536. this._groupedContent[key] = this._groupedContent[key] || [];
  537. }.bind(this));
  538. }
  539. return this._groupedContent;
  540. },
  541. getNamespaces: function getNamespaces() {
  542. var namespacesArray = _.sortBy(this._nameSpaces, this.sortColumnName || 'defaultName');
  543. return (this.sortOrder || 'asc') === 'asc' ? namespacesArray : namespacesArray.reverse();
  544. },
  545. setPathStack: function setPathStack(newStack) {
  546. this._pathStack = newStack;
  547. },
  548. getPathStack: function getPathStack() {
  549. return this._pathStack;
  550. },
  551. getCurrentNamespace: function getCurrentNamespace() {
  552. return this._selectedNamespace;
  553. },
  554. isBuiltinNamespace: function isBuiltinNamespace() {
  555. return this._selectedNamespace && this._selectedNamespace.defaultName === 'Cognos';
  556. },
  557. isCognosUsersNamespace: function isCognosUsersNamespace() {
  558. return this._selectedNamespace && this._selectedNamespace.defaultName === 'Cognos Users';
  559. },
  560. isOidcNamespace: function isOidcNamespace() {
  561. var ns = this.getCurrentNamespace();
  562. if (ns) {
  563. if (_.contains(ns.capabilities, 'notBrowsable')) {
  564. return true;
  565. }
  566. }
  567. return false;
  568. },
  569. getCurrentPath: function getCurrentPath() {
  570. return _.last(this._pathStack);
  571. },
  572. getAccountType: function getAccountType(name) {
  573. return this._accountTypes[name];
  574. },
  575. getQueryString: function getQueryString() {
  576. var pageSize = 0;
  577. if (this.pagingEnabled) {
  578. pageSize = this.pagingValueSet;
  579. }
  580. var columnName = this.sortColumnName || 'defaultName';
  581. var order = this.sortOrder || 'asc';
  582. return 'page=0|' + pageSize + '&sorting=' + columnName + '|' + order;
  583. }
  584. });
  585. return AccountExplorer;
  586. });