Saiku更改導出文件的文件名

Saiku查询完数据之后,可以以excel,pdf,csv等格式将数据导出,这里我们来讲一下怎么更改导出的文件名。

找到对应的导出方法所在的js文件: saiku-server\tomcat\webapps\ROOT\js\saiku\views\WorkspaceToolbar.js

这里分别有三个方法导出不同形式的文件:

export_xls

export_csv

export_pdf

我们主要更改里面的filename即可啦!

可以自定义filename,我这里是需要将入参中的日期纳入文件名中,所以我的更改后的export_xls方法如下:(其余两种形式的导出方法也类似)

export_xls: function(event) {if(this.workspace.query.name!=undefined){var filename = this.workspace.query.name.substring(this.workspace.query.name.lastIndexOf('/')+1).slice(0, -5);var paramsURI = Saiku.URLParams.paramsURI(); //get the param from urlif(paramsURI.startdate != null && paramsURI.startdate != undefined && paramsURI.enddate != null && paramsURI.enddate != undefined){var datename = (paramsURI.startdate).substring(-1,10).replace(/-/g,'') +"-"+ (paramsURI.enddate).substring(-1,10).replace(/-/g,'');//获取参数中的日期filename = filename.replace('.','') + datename + ".";//将参数中的日期添加到的文件名中}window.location = Settings.REST_URL +this.workspace.query.url() + "/export/xls/" + this.workspace.query.getProperty('saiku.olap.result.formatter')+"?exportname=" + "\"" + encodeURIComponent(filename)+"xls" + "\"";}else{window.location = Settings.REST_URL +this.workspace.query.url() + "/export/xls/" + this.workspace.query.getProperty('saiku.olap.result.formatter');}},

需要注意的是我这里更改后的文件名与我的入参有关,主要是因为我这边是将saiku嵌入公司系统使用的,所以用到日期参数。

请求URl如下:(请求中携带入参 startdate与enddate)

http://10.22.33.44:8080/?username=test&password=111&startdate=2019-03-06&enddate=2019-03-18&plugin=false&mode=view#query/open//KPII/bb.saiku

最后这里给出修改后完整的WorkspaceToolbar.js文件

/**   Copyright 2012 OSBI Ltd**   Licensed under the Apache License, Version 2.0 (the "License");*   you may not use this file except in compliance with the License.*   You may obtain a copy of the License at**       http://www.apache.org/licenses/LICENSE-2.0**   Unless required by applicable law or agreed to in writing, software*   distributed under the License is distributed on an "AS IS" BASIS,*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*   See the License for the specific language governing permissions and*   limitations under the License.*//*** The workspace toolbar, and associated actions*/
var WorkspaceToolbar = Backbone.View.extend({enabled: false,events: {'click a': 'call'},initialize: function(args) {// Keep track of parent workspacethis.workspace = args.workspace;// Maintain `this` in callbacks_.bindAll(this, "call", "reflect_properties", "run_query","swap_axes_on_dropzones", "display_drillthrough","clicked_cell_drillthrough_export","clicked_cell_drillacross","clicked_cell_drillthrough","activate_buttons", "switch_to_mdx","post_mdx_transform", "toggle_fields_action", "group_parents");this.workspace.bind('workspace:toolbar:render', this.translate);// Redraw the toolbar to reflect propertiesthis.workspace.bind('properties:loaded', this.reflect_properties);// Fire off workspace eventthis.workspace.trigger('workspace:toolbar:render', {workspace: this.workspace});// Activate buttons when a new query is created or runthis.workspace.bind('query:new', this.activate_buttons);this.workspace.bind('query:result', this.activate_buttons);},activate_buttons: function(args) {if (args !== null && args.data && args.data.cellset && args.data.cellset.length > 0 ) {$(args.workspace.toolbar.el).find('.button').removeClass('disabled_toolbar');$(args.workspace.el).find("td.data").removeClass('cellhighlight').unbind('click');$(args.workspace.el).find(".table_mode").removeClass('on');} else {$(args.workspace.toolbar.el).find('.button').addClass('disabled_toolbar').removeClass('on');$(args.workspace.el).find('.fields_list .disabled_toolbar').removeClass('disabled_toolbar');$(args.workspace.toolbar.el).find('.about, .new, .open, .save, .edit, .run,.auto,.non_empty,.toggle_fields,.toggle_sidebar,.switch_to_mdx, .mdx').removeClass('disabled_toolbar');}this.reflect_properties();},template: function() {var template = $("#template-workspace-toolbar").html() || "";return _.template(template)();},render: function() {$(this.el).html(this.template());return this;},translate: function() {//Saiku.i18n.translate();},call: function(event) {// Determine callbackevent.preventDefault();var callback = event.target.hash.replace('#', '');// Attempt to call callbackif (! $(event.target).hasClass('disabled_toolbar') && this[callback]) {this[callback](event);}return false;},reflect_properties: function() {var properties = this.workspace.query.model.properties ?this.workspace.query.model.properties : Settings.QUERY_PROPERTIES;// Set properties appropriatelyif (properties['saiku.olap.query.nonempty'] === true) {$(this.el).find('.non_empty').addClass('on');}if (properties['saiku.olap.query.automatic_execution'] === true) {$(this.el).find('.auto').addClass('on');}if (properties['saiku.olap.query.drillthrough'] !== true) {$(this.el).find('.drillthrough, .drillthrough_export').addClass('disabled_toolbar');}if (properties['org.saiku.query.explain'] !== true) {$(this.el).find('.explain_query').addClass('disabled_toolbar');}if (properties['org.saiku.connection.scenario'] !== true) {$(this.el).find('.query_scenario').addClass('disabled_toolbar');} else {$(this.el).find('.query_scenario').removeClass('disabled_toolbar');$(this.el).find('.drillthrough, .drillthrough_export').addClass('disabled_toolbar');}if (properties['saiku.olap.query.limit'] == 'true' || properties['saiku.olap.query.filter'] === true) {$(this.workspace.el).find('.fields_list_header').addClass('limit');}if (this.workspace.query.getProperty('saiku.olap.result.formatter') !== "undefined" && this.workspace.query.getProperty('saiku.olap.result.formatter') == "flattened") {if (! $(this.el).find('.group_parents').hasClass('on')) {$(this.el).find('.group_parents').addClass('on');}}if ($(this.workspace.el).find( ".workspace_results tbody.ui-selectable" ).length > 0) {$(this.el).find('.zoom_mode').addClass('on');}$(this.el).find(".spark_bar, .spark_line").removeClass('on');$(this.el).find('a.edit').removeClass('disabled_toolbar');if (Settings.MODE == 'VIEW' || this.workspace.isReadOnly) {$(this.el).find('a.edit').hide();$(this.el).find('a.save').hide();} else {if (this.workspace.viewState == 'view') {$(this.el).find('a.edit').removeClass('on');} else {$(this.el).find('a.edit').addClass('on');}$(this.el).find('a.edit').show('normal');}},new_query: function(event) {if(typeof ga!= 'undefined'){ga('send', 'event', 'Toolbar', 'New Query');}this.workspace.switch_view_state('edit');this.workspace.new_query();return false;},edit_query: function(event) {$(event.target).toggleClass('on');if ($(event.target).hasClass('on')) {this.workspace.switch_view_state('edit');} else {this.workspace.switch_view_state('view');}},save_query: function(event) {var self = this;if (this.workspace.query) {if (typeof this.editor != "undefined") {var mdx = this.editor.getValue();this.workspace.query.model.mdx = mdx;}(new SaveQuery({ query: this.workspace.query })).render().open();}},open_query: function(event) {(new OpenDialog()).render().open();},run_query: function(event) {this.workspace.query.run(true);},automatic_execution: function(event) {// Change propertyvar newState = !this.workspace.query.getProperty('saiku.olap.query.automatic_execution');this.workspace.query.setProperty('saiku.olap.query.automatic_execution', newState);if (newState) {$(event.target).addClass('on');} else {$(event.target).removeClass('on');}},toggle_fields: function(event) {var self = this;if (event) {$(this.el).find('.toggle_fields').toggleClass('on');}if (!$(this.el).find('.toggle_fields').hasClass('on')) {this.toggle_fields_action('hide');} else {this.toggle_fields_action('show');}},toggle_fields_action: function(action, dontAnimate) {var self = this;if ( action == 'show' && $('.workspace_editor').is(':visible')) {return;} else if ( action == 'hide' && $('.workspace_editor').is(':hidden')) {return;}if (dontAnimate) {$('.workspace_editor').css('height','');if ($('.workspace_editor').is(':hidden')) {$('.workspace_editor').show();} else {$('.workspace_editor').hide();}return;}if (action == 'hide') {$(this.workspace.el).find('.workspace_editor').hide();} else {$(this.workspace.el).find('.workspace_editor').show();}// avoid scrollbar on the right/*var wf = $('.workspace_editor').height();if ( action == 'hide') {var wr = $('.workspace_results').height();$('.workspace_results').height(wr - wf);}$(this.workspace.el).find('.workspace_editor').slideToggle({queue: false,progress: function() {self.workspace.adjust();},complete: function() {if ($('.workspace_editor').is(':hidden')) {$('.workspace_editor').height(wf);} else {$('.workspace_editor').css('height','');}self.workspace.adjust();}});*/},about: function() {(new AboutModal()).render().open();return false;},toggle_sidebar: function() {this.workspace.toggle_sidebar();},// group_parents: function(event) {//     $(event.target).toggleClass('on');//     if ($(event.target).hasClass('on')) {//         this.workspace.query.setProperty('saiku.olap.result.formatter', 'flattened');//     } else {//         this.workspace.query.setProperty('saiku.olap.result.formatter', 'flat');//     }//     this.workspace.query.run();// },group_parents: function(event) {if (event) {$(event.target).toggleClass('on');}// this.$el.find('.group_parents').toggleClass('on')if (this.$el.find('.group_parents').hasClass('on')) {this.workspace.query.setProperty('saiku.olap.result.formatter', 'flattened');} else {this.workspace.query.setProperty('saiku.olap.result.formatter', 'flat');}this.workspace.query.run();},non_empty: function(event) {// Change propertyvar nonEmpty = !this.workspace.query.getProperty('saiku.olap.query.nonempty');this.workspace.query.helper.nonEmpty(nonEmpty);this.workspace.query.setProperty('saiku.olap.query.nonempty', nonEmpty);// Toggle state of button$(event.target).toggleClass('on');// Run querythis.workspace.query.run();},swap_axis: function(event) {// Swap axes$(this.workspace.el).find('.workspace_results table').html('');this.workspace.query.helper.swapAxes();this.workspace.sync_query();this.workspace.query.run(true);},check_modes: function(source) {if (typeof source === "undefined" || source === null)return;if ($(this.workspace.el).find( ".workspace_results tbody.ui-selectable" ).length > 0) {$(this.workspace.el).find( ".workspace_results tbody" ).selectable( "destroy" );}if (!$(source).hasClass('on')) {$(this.workspace.el).find("td.data").removeClass('cellhighlight').unbind('click');$(this.workspace.el).find(".table_mode").removeClass('on');this.workspace.query.run();} else {if ($(source).hasClass('drillthrough_export')) {$(this.workspace.el).find("td.data").addClass('cellhighlight').unbind('click').click(this.clicked_cell_drillthrough_export);$(this.workspace.el).find(".query_scenario, .drillthrough, .zoom_mode, .drillacross").removeClass('on');} else if ($(source).hasClass('drillthrough')) {$(this.workspace.el).find("td.data").addClass('cellhighlight').unbind('click').click(this.clicked_cell_drillthrough);$(this.workspace.el).find(".query_scenario, .drillthrough_export, .zoom_mode, .drillacross").removeClass('on');} else if ($(source).hasClass('query_scenario')) {this.workspace.query.scenario.activate();$(this.workspace.el).find(".drillthrough, .drillthrough_export, .zoom_mode, .drillacross").removeClass('on');} else if ($(source).hasClass('drillacross')) {$(this.workspace.el).find("td.data").addClass('cellhighlight').unbind('click').click(this.clicked_cell_drillacross);$(this.workspace.el).find(".query_scenario, .drillthrough, .drillthrough_export, .zoom_mode").removeClass('on');} else if ($(source).hasClass('zoom_mode')) {var self = this;$(self.workspace.el).find( ".workspace_results tbody" ).selectable({ filter: "td", stop: function( event, ui ) {var positions = [];$(self.workspace.el).find( ".workspace_results" ).find('td.ui-selected div').each(function(index, element) {var p = $(element).attr('rel');if (p) {positions.push(p);}});$(self.workspace.el).find( ".workspace_results" ).find('.ui-selected').removeClass('.ui-selected');positions = _.uniq(positions);if (positions.length > 0) {self.workspace.query.action.put("/zoomin", { success: function(model, response) {self.workspace.query.parse(response);self.workspace.unblock();self.workspace.sync_query();Saiku.ui.unblock();self.workspace.query.run();},data: { selections : JSON.stringify(positions) }});}} });$(this.workspace.el).find(".drillthrough, .drillthrough_export, .query_scenario, .drillacross, .about").removeClass('on');}}},query_scenario: function(event) {$(event.target).toggleClass('on');this.check_modes($(event.target));},zoom_mode: function(event) {$(event.target).toggleClass('on');this.check_modes($(event.target));},drillacross: function(event) {$(event.target).toggleClass('on');this.check_modes($(event.target));},drillthrough: function(event) {$(event.target).toggleClass('on');this.check_modes($(event.target));},display_drillthrough: function(model, response) {this.workspace.table.render({ data: response });Saiku.ui.unblock();},export_drillthrough: function(event) {$(event.target).toggleClass('on');this.check_modes($(event.target));},clicked_cell_drillacross: function(event) {$target = $(event.target).hasClass('data') ?$(event.target).find('div') : $(event.target);var pos = $target.attr('rel');(new DrillAcrossModal({workspace: this.workspace,title: "Drill Across",action: "export",position: pos,query: this.workspace.query})).open();},clicked_cell_drillthrough_export: function(event) {$target = $(event.target).hasClass('data') ?$(event.target).find('div') : $(event.target);var pos = $target.attr('rel');(new DrillthroughModal({workspace: this.workspace,maxrows: 10000,title: "Drill-Through to CSV",action: "export",position: pos,query: this.workspace.query})).open();},clicked_cell_drillthrough: function(event) {$target = $(event.target).hasClass('data') ?$(event.target).find('div') : $(event.target);var pos = $target.attr('rel');(new DrillthroughModal({workspace: this.workspace,maxrows: 200,title: "Drill-Through",action: "table",success: this.display_drillthrough,position: pos,query: this.workspace.query})).open();},swap_axes_on_dropzones: function(model, response) {this.workspace.query.parse(response);this.workspace.unblock();this.workspace.sync_query();Saiku.ui.unblock();/*$columns = $(this.workspace.drop_zones.el).find('.columns').children().detach();$rows = $(this.workspace.drop_zones.el).find('.rows').children().detach();$(this.workspace.drop_zones.el).find('.columns').append($rows);$(this.workspace.drop_zones.el).find('.rows').append($columns);var rowLimit = $(this.workspace).find('fields_list.ROWS .limit').hasClass('on') | false;var colLimit = $(this.workspace).find('fields_list.COLUMNS .limit').hasClass('on') | false;$(this.workspace).find('fields_list.ROWS .limit').removeClass('on');$(this.workspace).find('fields_list.COLUMNS .limit').removeClass('on');if (rowLimit) {$(this.workspace).find('fields_list.COLUMNS .limit').addClass('on');}if (colLimit) {$(this.workspace).find('fields_list.ROWS .limit').addClass('on');}*/this.workspace.unblock();this.workspace.sync_query();Saiku.ui.unblock();},show_mdx: function(event) {//this.workspace.query.enrich();(new MDXModal({ mdx: this.workspace.query.model.mdx })).render().open();},workspace_report_titles: function(event) {(new ReportTitlesModal({ query: this.workspace.query })).render().open();},export_xls: function(event) {if(this.workspace.query.name!=undefined){var filename = this.workspace.query.name.substring(this.workspace.query.name.lastIndexOf('/')+1).slice(0, -5);var paramsURI = Saiku.URLParams.paramsURI(); //get the param from urlif(paramsURI.startdate != null && paramsURI.startdate != undefined && paramsURI.enddate != null && paramsURI.enddate != undefined){var datename = (paramsURI.startdate).substring(-1,10).replace(/-/g,'') +"-"+ (paramsURI.enddate).substring(-1,10).replace(/-/g,'');//获取参数中的日期filename = filename.replace('.','') + datename + ".";//将参数中的日期添加到下载的文件名中}window.location = Settings.REST_URL +this.workspace.query.url() + "/export/xls/" + this.workspace.query.getProperty('saiku.olap.result.formatter')+"?exportname=" + "\"" + encodeURIComponent(filename)+"xls" + "\"";}else{window.location = Settings.REST_URL +this.workspace.query.url() + "/export/xls/" + this.workspace.query.getProperty('saiku.olap.result.formatter');}},export_csv: function(event) {if(this.workspace.query.name!=undefined){var filename = this.workspace.query.name.substring(this.workspace.query.name.lastIndexOf('/')+1).slice(0, -6);var paramsURI = Saiku.URLParams.paramsURI(); //get the param from urlif(paramsURI.startdate != null && paramsURI.startdate != undefined && paramsURI.enddate != null && paramsURI.enddate != undefined){var datename = (paramsURI.startdate).substring(-1,10).replace(/-/g,'') +"-"+ (paramsURI.enddate).substring(-1,10).replace(/-/g,'');//获取参数中的日期filename = filename.replace('.','') + datename + ".";//将参数中的日期添加到下载的文件名中}window.location = Settings.REST_URL +this.workspace.query.url() + "/export/csv/" + this.workspace.query.getProperty('saiku.olap.result.formatter')+"?exportname=" + "\"" + encodeURIComponent(filename) + "\"";}else{window.location = Settings.REST_URL +this.workspace.query.url() + "/export/csv/" + this.workspace.query.getProperty('saiku.olap.result.formatter');}},export_pdf: function(event) {if(this.workspace.query.name!=undefined){var filename = this.workspace.query.name.substring(this.workspace.query.name.lastIndexOf('/')+1).slice(0, -6);var paramsURI = Saiku.URLParams.paramsURI(); //get the param from urlif(paramsURI.startdate != null && paramsURI.startdate != undefined && paramsURI.enddate != null && paramsURI.enddate != undefined){var datename = (paramsURI.startdate).substring(-1,10).replace(/-/g,'') +"-"+ (paramsURI.enddate).substring(-1,10).replace(/-/g,'');//获取参数中的日期filename = filename.replace('.','') + datename + ".";//将参数中的日期添加到下载的文件名中}window.location = Settings.REST_URL +this.workspace.query.url() + "/export/pdf/" + this.workspace.query.getProperty('saiku.olap.result.formatter')+"?exportname=" + "\"" + encodeURIComponent(filename) + "\"";}else{window.location = Settings.REST_URL +this.workspace.query.url() + "/export/pdf/" + this.workspace.query.getProperty('saiku.olap.result.formatter');}},switch_to_mdx: function(event) {var self = this;$(this.workspace.el).find('.workspace_fields').addClass('hide');$(this.el).find('.auto, .query_scenario, .buckets, .non_empty, .swap_axis, .mdx, .switch_to_mdx, .zoom_mode, .drillacross').parent().hide();if ($(this.workspace.el).find( ".workspace_results tbody.ui-selectable" ).length > 0) {$(this.workspace.el).find( ".workspace_results tbody" ).selectable( "destroy" );}$(this.el).find('.run').attr('href','#run_mdx');$(this.el).find('.run, .save, .open, .new, .edit').removeClass('disabled_toolbar');if (Settings.MODE != "view" && Settings.MODE != "table" && !this.workspace.isReadOnly) {$mdx_editor = $(this.workspace.el).find('.mdx_input');//$mdx_editor.width($(this.el).width()-5);$(this.workspace.el).find('.workspace_editor .mdx_input, .workspace_editor .editor_info, .workspace_editor').removeClass('hide').show();this.editor = ace.edit("mdx_editor");this.editor.setShowPrintMargin(false);this.editor.setFontSize(11);this.editor.commands.addCommand({name: 'runmdx',bindKey: {win: 'Ctrl-Enter',  mac: 'Command-Enter'},exec: function(editor) {self.run_mdx();},readOnly: true // false if this command should not apply in readOnly mode});var showPosition = function() {var pos = self.editor.getCursorPosition();$mdx_editor.parent().find('.editor_info').html("  " + (pos.row +1) + ", " + pos.column);};this.editor.on('changeSelection', showPosition);showPosition();var heightUpdateFunction = function() {// http://stackoverflow.com/questions/11584061/var max_height = $(document).height() / 3;var height = Math.floor(max_height / self.editor.renderer.lineHeight);var screen_length = self.editor.getSession().getScreenLength() > height ? height : self.editor.getSession().getScreenLength();var newHeight =(screen_length + 1) *self.editor.renderer.lineHeight +self.editor.renderer.scrollBar.getWidth();$mdx_editor.height(newHeight.toString() + "px");self.editor.resize();self.workspace.adjust();};var resizeFunction = function() {var session = self.editor.session;//$mdx_editor.width($(self.el).width()-5);self.editor.resize();session.setUseWrapMode(true);if(session.getUseWrapMode()) {var characterWidth = self.editor.renderer.characterWidth;var contentWidth = self.editor.renderer.scroller.clientWidth;if(contentWidth > 0) {session.setWrapLimitRange(null, parseInt(contentWidth / characterWidth, 10));}}};resizeFunction();heightUpdateFunction();self.editor.focus();self.editor.clearSelection();self.editor.getSession().setValue("");self.editor.getSession().on('change', heightUpdateFunction);$(window).resize(resizeFunction);self.editor.on('changeSelection', heightUpdateFunction);self.editor.on('focus', function(e) { heightUpdateFunction(); return true; });self.editor.on('blur', function(e) {if ($(self.workspace.el).find(".mdx_input").height() > 100) {$(self.workspace.el).find(".mdx_input").height(100);}self.editor.resize();self.workspace.adjust();return true; });//this.editor.on('focusout', function(e) { alert('blur');  });//this.editor.setTheme("ace/theme/crimson_editor");this.editor.getSession().setMode("ace/mode/text");}if (this.workspace.dimension_list) {$(this.workspace.el).find('.sidebar_inner ul li a').css({fontWeight: "normal"}).parent('li').removeClass('ui-draggable ui-draggable-disabled ui-state-disabled');}this.activate_buttons({ workspace: this.workspace });$(this.workspace.toolbar.el).find('.run').removeClass('disabled_toolbar');$(this.workspace.table.el).empty();if (this.workspace.timeSeriesFilter) {$(this.workspace.timeSeriesFilter.el).empty();}this.workspace.adjust();this.post_mdx_transform();},post_mdx_transform: function() {var self = this;if (this.workspace.query.model.type !== "MDX") {//this.workspace.query.enrich();this.workspace.query.model.queryModel = {};this.workspace.query.model.type = "MDX";this.workspace.query.setProperty('saiku.olap.result.formatter', 'flat');self.workspace.query.helper.model().parameters = {};}var mdx = this.workspace.query.model.mdx;if (self.editor) {self.editor.setValue(mdx,0);self.editor.clearSelection();self.editor.focus();}$(self.el).find('.group_parents').removeClass('on');if (Settings.ALLOW_PARAMETERS) {var parameterDetector = function() {var mdx = self.editor.getValue();var parameters = [];if (mdx) {for (var i = 0, len = mdx.length; i < (len-1); i++ ) {if (mdx[i] === "$" && mdx[i+1] === "{") {var param = "";var closed = false;for(i = i + 2; i < len; i++) {if (mdx[i] !== '}') {param += mdx[i];} else {closed = true;i++;break;}}if (closed && param && param.length > 0) {parameters.push(param);}}}}var qParams = self.workspace.query.helper.model().parameters;var newParams = {};_.each(parameters, function(p) {if (!qParams[p]) {newParams[p] = "";} else {newParams[p] = qParams[p];}});self.workspace.query.helper.model().parameters = newParams;self.workspace.update_parameters();};var lazyDetector = function() { _.delay(parameterDetector, 1000); };if (self.editor) {self.editor.getSession().off('change', lazyDetector);self.editor.getSession().on('change', lazyDetector);}self.workspace.update_parameters();}},run_mdx: function(event) {//var mdx = $(this.workspace.el).find(".mdx_input").val();if ($(this.workspace.el).find(".mdx_input").height() > 100) {$(this.workspace.el).find(".mdx_input").height(100);}this.editor.resize();var mdx = this.editor.getValue();this.workspace.query.model.mdx = mdx;this.workspace.query.run(true);},explain_query: function(event) {var self = this;var explained = function(model, args) {var explainPlan = "<textarea style='width: " + ($("body").width() - 165) + "px;height:" + ($("body").height() - 175) + "px;'>";if (args !== null && args.error !== null) {explainPlan += args.error;} else if (args.cellset && args.cellset.length === 0) {explainPlan += "Empty explain plan!";} else {explainPlan += args.cellset[1][0].value;}explainPlan += "</textarea>";Saiku.ui.unblock();var html = '<div id="fancy_results" class="workspace_results" style="overflow:visible"><table>' +'<tr><th clas="row_header">Explain Plan</th></tr>' +'<tr><td>' + explainPlan + '</td></tr>' +'</table></div>';$.fancybox(html,{'autoDimensions'    : false,'autoScale'         : false,'height'            :  ($("body").height() - 100),'width'             :  ($("body").width() - 100),'transitionIn'      : 'none','transitionOut'     : 'none'});};self.workspace.query.action.gett("/explain", { success: explained } );return false;}
});

  

转载于:https://www.cnblogs.com/DFX339/p/10599374.html

Saiku更改導出文件的文件名(十九)相关推荐

  1. abp(net core)+easyui+efcore实现仓储管理系统——出库管理之一(四十九)

    abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...

  2. 网络知识入门,Web服务器的CGI程序,浏览器如何判断响应内容:文本,图片还是音频文件?(十九)

    目录 将请求的uri转换为实际的文件名 运行CGI程序 web服务器的访问控制 浏览器接受响应并返回内容 浏览器接受响应消息后如何显示内容 浏览器显示网页内容:访问完成 将请求的uri转换为实际的文件 ...

  3. 通配符 不是jpg 结尾文件_Struts(十九)- 使用使用通配符匹配

    学习到目前为止,add,show, list分别需要进行配置 通过通配符匹配可以把这3个配置整合在一个配置中实现 步骤1:先运行,看到效果,再学习步骤2:模仿和排错步骤3:struts.xml步骤4: ...

  4. python文件名按数字排序_用Python按照文件的名字中包含的数字排序出文件

    使用Python按照文件的名字中包含的数字排序出文件 原来的样式: file_list = ['第10周成绩.xlsx', '第11周成绩.xlsx', '第12周成绩.xlsx', '第13周成绩. ...

  5. 鸟哥的Linux私房菜(基础篇)- 第十九章、认识与分析登录文件

    第十九章.认识与分析登录文件 最近升级日期:2009/09/14 当你的 Linux 系统出现不明原因的问题时,很多人都告诉你,你要查阅一下登录文件才能够知道系统出了什么问题了,所以说,了解登录文件是 ...

  6. 批量修改文件夹/文件名的小技巧

    本文以  修改某文件夹内所有文件的文件名 为例 1.获取原文件名 法①:ctrl+A全选文件,鼠标右击,点击"复制文件地址",复制到excel表中,去掉地址前缀,仅保留文件名(保留 ...

  7. 如何列出更改了特定文件的所有提交?

    有没有办法列出所有更改了特定文件的提交? #1楼 使用以下命令获取特定文件的提交: git log -p filename #2楼 正如jackrabb1t所指出的,-- --follow更加强大,因 ...

  8. Bootstrap入门(二十九)JS插件6:弹出框

    Bootstrap入门(二十九)JS插件6:弹出框 加入小覆盖的内容,像在iPad上,用于存放非主要信息 弹出框是依赖于工具提示插件的,那它也和工具提示是一样的,是需要初始化才能够使用的 首先我们引入 ...

  9. 从命令行获取两个路径名称并找出文件一样内容一样的两个文件

    import os import sys import subprocess import hashlibdir1 = sys.argv[1] dir2 = sys.argv[2]class File ...

最新文章

  1. Android UI学习 - Linear Layout, RelativeLayout
  2. wxpython富文本_Python实例讲解 -- wxpython 基本的控件 (文本)
  3. DPM 2007升级到SP1的方法
  4. 手动安装K8s第六节:node节点部署-kubelet
  5. 设计企业网站大纲_哈尔滨企业网站设计费用,网站开发公司_华阳网络
  6. java 获取文件大小_阿里Java后端开发面经,面试官都替我感到绝望
  7. 怎么搭建服务器集成环境配置文件,怎么搭建服务器集成环境配置文件
  8. android8.0以上新增Camera(七)
  9. Linux系统提高编辑效率的vim工具重要知识
  10. w10计算机,打开win10自带计算器的多种方法
  11. 写DM9000网卡芯片驱动的预备知识
  12. 面试过阿里等互联网大公司,我知道了这些套路
  13. windows加载wim文件
  14. Tensorflow.keras小案例Mnist数字识别
  15. 2021年我与我家公主的五一小长假---游记
  16. 备抵附加账户的期末余额_会计账户
  17. 属性详解(@property/@dynamic/@synthesize)
  18. html箭头随着点击而移动,点击左右箭头,图片跟随移动,正中的图片始终最大...
  19. IAR Error[Pe020]: identifier 'FILE' is undefined 解决方法
  20. 用核显能跑matlab吗,5张图告诉你核显究竟能干嘛

热门文章

  1. 夜神模拟器运行flutter花屏,线条问题
  2. upstart 启动
  3. iOS获取健康步数从加速计到healthkit
  4. 水溶性/树枝状/PAMAM-β-CD/聚酰胺-胺修饰环糊精树枝状核壳聚合物
  5. PTA 7-137 出售金项链(误差修正版) (10分)(0.00001
  6. 地质灾害远程监测系统
  7. 2021年基金持有A股股票数量排行榜:药明康德基金覆盖家数骤减,抚顺特钢基金持股占股本比最高(附年榜TOP100详单)
  8. 小米口碑营销的五大秘诀
  9. Excel文件转换成.txt格式
  10. ​程序员离职后收到原公司 2400 元,被告违反竞业协议赔 18 万