"use strict"; /** * Licensed Materials - Property of IBM * IBM Cognos Products: admin * Copyright IBM Corp. 2015, 2017 * US Government Users Restricted Rights * Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['underscore', 'bi/admin/datasource/ui/MetaDataListView', 'bi/admin/nls/StringResource', 'text!bi/admin/datasource/templates/CubeListPaneTemplate.html', 'text!bi/admin/datasource/templates/CubeListTemplate.html'], function (_, MetaDataListView, StringResource, CubeListPaneTemplate, CubeListTemplate) { 'use strict'; //NOSONAR: meant to be strict var CubeListView = MetaDataListView.extend({ menuId: 'com.ibm.bi.admin.cubeMenu', _metaDataColName: 'cubeName', _displayLoadingToast: false, init: function init(options) { CubeListView.inherited('init', this, arguments); this._template = CubeListTemplate; this._paneTemplate = CubeListPaneTemplate; this.sortMap = { 'schemaName': 'defaultName' }; }, _buildItems: function _buildItems(schema) { schema.connId = this.conn.id; schema.databaseId = schema.defaultName; schema.typeName = StringResource.get('cube'); return schema; }, _handleSelection: function _handleSelection(e, contextMenuAction) { var $item = $(e.target).closest('.bi-admin-list-item'); var id = $item.attr('id').trim(); var selectedIndex = _.find(this.selectedRows, function (schema) { return schema.id === id; }); var dirtySelections = this._handleNormalSelect(id, $item, selectedIndex, [], contextMenuAction); this._applySelectionStyling(dirtySelections); }, _updateStatus: function _updateStatus(id, moserResponse) {//do nothing }, _handleBaseModuleError: function _handleBaseModuleError(task) { var msg = task.response && task.response.entity && task.response.entity.exceptionMsg || task.errorMessage || StringResource.get('internalErrorMsg'); this.glassContext.appController.showErrorMessage(msg, StringResource.get('error')); } }); return CubeListView; });