Skip to content

Commit

Permalink
feat(qseow): Show app counter when exporting apps to QVF files
Browse files Browse the repository at this point in the history
  • Loading branch information
mountaindude committed Nov 17, 2024
1 parent 8b45d85 commit ff90297
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/lib/app/class_allapps.js
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ export class QlikSenseApps {
}
}

async exportAppStep2(resultStep1) {
async exportAppStep2(resultStep1, appCounter, appCountTotal) {
// resultStep.downloadPath has format
// /tempcontent/d989fffd-5310-43b5-b028-f313b53bb8e2/User%20retention.qvf?serverNodeId=80db9b97-8ea2-4208-a79a-c46b7e16c38c

Expand Down Expand Up @@ -1364,7 +1364,9 @@ export class QlikSenseApps {
axiosConfig.responseType = 'stream';

logger.info('------------------------------------');
logger.info(`App [${resultStep2.appId}] "${resultStep2.appName}.qvf", download starting`);
logger.info(
`${appCounter} of ${appCountTotal}: App [${resultStep2.appId}] "${resultStep2.appName}.qvf", download starting`
);
const result = await axios.request(axiosConfig);

result.data.pipe(writer);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/cmd/qseow/exportapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ export async function exportAppToFile(options) {

for (const app of appsToExport) {
try {
appCounter += 1;
const exportAppData = await qlikSenseApps.exportAppStep1(app);

const resultDownloadApp = await qlikSenseApps.exportAppStep2(exportAppData);
const resultDownloadApp = await qlikSenseApps.exportAppStep2(exportAppData, appCounter, appsToExport.length);

await sleep(options.sleepAppExport);

// keep track of app metadata
appCounter += 1;
appMetadata.push([
appCounter,
app.name,
Expand Down

0 comments on commit ff90297

Please sign in to comment.