Compare commits

..

1 Commits

Author SHA1 Message Date
Jingjing Xie
3e273f5b78 fix: enable export as xls options on qcs 2021-06-22 13:33:50 +02:00
6 changed files with 19 additions and 45 deletions

View File

@@ -3,7 +3,7 @@ version: 2
defaults: &defaults
working_directory: ~/qlik-smart-pivot
docker:
- image: circleci/node:16.13.0
- image: circleci/node:stretch
environment:
GITHUB_ORG: "qlik-oss"
GITHUB_REPO: "PLSmartPivot"
@@ -12,12 +12,20 @@ defaults: &defaults
jobs:
test:
docker:
- image: circleci/node:16.13.0-browsers
- image: circleci/node:stretch-browsers
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- run:
name: BlackDuck scan
command: curl -s https://detect.synopsys.com/detect.sh | bash -s -- \
--blackduck.url="https://qliktech.blackducksoftware.com" \
--blackduck.trust.cert=true \
--blackduck.username="svc-blackduck" \
--blackduck.password=${svc_blackduck} \
--detect.project.name="viz-bundle-qlik-smart-pivot"
bump-version:
<<: *defaults
@@ -35,10 +43,6 @@ jobs:
<<: *defaults
steps:
- checkout
- run:
name: Setup environment
command: |
sudo chmod +x ./.circleci/upgrade-node.sh
- attach_workspace:
at: ~/qlik-smart-pivot
- run:

View File

@@ -1,17 +0,0 @@
#!/bin/bash
set -eo pipefail
NVM_DIR="/opt/circleci/.nvm"
NODE_VERSION="v16"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
echo "Installing Node $NODE_VERSION"
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
# Each step uses the same `$BASH_ENV`, so need to modify it
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV

View File

@@ -24,8 +24,7 @@ gulp.task('qext', function () {
repository: pkg.repository,
dependencies: {
'qlik-sense': '>=5.5.x'
},
__next: true
}
};
if (pkg.contributors) {
qext.contributors = pkg.contributors;

View File

@@ -143,13 +143,15 @@ class DataTable extends React.PureComponent {
}
// eslint-disable-next-line no-shadow
const { dimension1: dimension1Info, dimension2, measurement } = measurementData.parents;
const id = `${dimension1Info.elementNumber}-${dimension2 && dimension2.elementNumber}-${measurement.header}-${measurement.index}`;
return (
<DataCell
cellWidth={cellWidth}
component={component}
data={data}
general={general}
key={`${Math.random()}-${new Date().getTime()}`}
key={`${dimensionEntry.displayValue}-${id}`}
measurement={measurementData}
styleBuilder={styleBuilder}
styling={styling}

View File

@@ -12,7 +12,7 @@ if (!window._babelPolyfill) {
require("@babel/polyfill"); // eslint-disable-line global-require
}
export default ({ flags }) => ({
export default {
design: {
dimensions: {
max: 1,
@@ -104,22 +104,8 @@ export default ({ flags }) => ({
);
return snapshotLayout;
},
async getContextMenu (obj, menu) {
if (!this.$scope.layout.allowexportxls) {
return menu;
}
const app = this.backendApi.model.app;
const isPersonalResult = await app.global.isPersonalMode();
// Export as XLS option is removed from desktop because the desktop wrapper blocks downloads.
// Enabled for windows and QCS
// isPersonalMode returns true for both desktop and QCS
// By checking both if has download dialog and if is QCS can enable Export as XLS option on QCS
if (
(this.backendApi.model.layout.qMeta.privileges.includes('exportdata') && !isPersonalResult) ||
(flags.isEnabled('DOWNLOAD_USE_REPORTING') && isPersonalResult)
) {
getContextMenu (obj, menu) {
if (this.backendApi.model.layout.qMeta.privileges.indexOf('exportdata') !== -1) {
menu.addItem({
translation: 'Export as XLS',
tid: 'export-excel',
@@ -137,4 +123,4 @@ export default ({ flags }) => ({
return menu;
},
version: 1.0
});
};

View File

@@ -2,7 +2,7 @@ const StyleLintPlugin = require('stylelint-webpack-plugin');
const packageJSON = require('./package.json');
const path = require('path');
const DIST = path.resolve("./dist");
const DIST = path.resolve('./dist');
// eslint-disable-next-line no-process-env
const MODE = process.env.NODE_ENV || 'development';
const SOURCE_MAP = 'source-map';