This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "apptofiles", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Tests?\" && exit 1" | |
}, | |
"keywords": [], | |
"author": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jwt = require('jsonwebtoken') | |
const fs = require('fs') | |
const path = require('path') | |
const request = require('request-promise') //Peer-dep to request | |
const QLIK_HOST = 'usrad-aklprobook' | |
const QLIK_VIRTUAL_PROXY_PREFIX = 'stratsys' | |
/** | |
* In this case we re-use the private cert from Qlik to sign our token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['qlik', 'qvangular'], function (qlik, qv) { | |
return { | |
initialProperties: { | |
version: 1, | |
qHyperCubeDef: { | |
qSuppressZero: true, | |
qSuppressMissing: true, | |
qInitialDataFetch: [{qTop: 0, qLeft: 0, qWidth: 2, qHeight: 200}] | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['qlik', 'qvangular'], function (qlik, qv) { | |
return { | |
initialProperties: { | |
version: 1, | |
qHyperCubeDef: { | |
qSuppressZero: true, | |
qSuppressMissing: true, | |
qInitialDataFetch: [{qTop: 0, qLeft: 0, qWidth: 2, qHeight: 200}] | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('click', function(e) { | |
(function recurse(scope) { | |
if(!scope.model) return recurse(scope.$parent); | |
scope.model.getProperties().then(properties => { | |
delete properties['qInfo']; | |
delete properties['qMetaDef']; | |
window.qliksenseobject = JSON.stringify(properties, null, 4); | |
console.log( JSON.stringify(properties, null, 4) ) | |
}) | |
})(angular.element(e.target).scope()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['jquery', './mp3source'], function($, defaultsound) { | |
return { | |
initialProperties: { | |
sound: [{ label: 'Default', value: defaultsound}] | |
}, | |
paint: function($element, layout) { | |
$element.empty(); | |
let audio = $(`<audio controls="controls" autobuffer="autobuffer"><source src="data:audio/mp3;base64,${layout.sound[0].value}"/></audio>`); | |
audio.appendTo($element) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const enigma = require('enigma.js'); | |
const qixSchema = require('../node_modules/enigma.js/schemas/qix/3.1/schema.json'); | |
const WebSocket = require('ws'); | |
const config = { | |
schema: qixSchema, | |
session: { | |
unsecure: true, | |
port: 4848 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function() { | |
return { | |
initialProperties: { | |
version: 1.0, | |
qHyperCubeDef: { | |
qDimensions: [], | |
qMode: 'P', | |
qMeasures: [], | |
qInitialDataFetch: [{ | |
qWidth: 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qsocks = require('qsocks'); | |
var fs = require('fs'); | |
var request = require('request'); | |
// Set our request defaults, ignore unauthorized cert warnings as default QS certs are self-signed. | |
// Export the certificates from your Qlik Sense installation and refer to them | |
var r = request.defaults({ | |
rejectUnauthorized: false, | |
host: 'localhost', | |
pfx: fs.readFileSync(__dirname + '\\client.pfx') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const qsocks = require('qsocks'); | |
const fs = require('fs'); | |
const Promise = require('bluebird'); | |
var config = { | |
host: 'localhost', | |
port: 4747, | |
headers: { | |
'X-Qlik-User': 'UserDirectory=INTERNAL;UserId=sa_repository' | |
}, |
NewerOlder