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(['d3'], function (d3) { | |
const ANIMATION_DURATION = 300; | |
var viz = { | |
x: d3.scale.ordinal(), | |
y: d3.scale.linear(), | |
xAxis: function () { return d3.svg.axis().scale(viz.x).orient('bottom') }, | |
yAxis: function () { return d3.svg.axis().scale(viz.y).orient('left') } | |
}; |
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
qsocks.Connect(config) | |
.then(global => global.getActiveDoc()) // Or open a doc, in this scenario we already had a scoped app. | |
.then(doc => { | |
// bar chart | |
doc.getObject(objectid[0]) | |
.then(model => { | |
var margin = {top: 20, right: 20, bottom: 30, left: 40}, | |
width = 650 - margin.left - margin.right, |
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 prefix = window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 ); | |
var config = { | |
host: window.location.hostname, | |
prefix: prefix, | |
port: window.location.port, | |
isSecure: window.location.protocol === "https:" | |
}; | |
require.config( { | |
baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources" | |
} ); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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'); | |
// Get a global reference | |
var global = qsocks.Connect(); | |
global.then(function(global) { | |
return global.createApp('This is my app3'); | |
}) | |
.then(function(reply) { | |
// Establish a new connection so we don't pollute the current engine session. |
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'); | |
// Our Qlik Sense Certificates | |
const client = fs.readFileSync('C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\client.pem'); | |
const client_key = fs.readFileSync('C:\\ProgramData\\Qlik\\Sense\\Repository\\Exported Certificates\\.Local Certificates\\client_key.pem'); | |
const config = { | |
host: 'localhost', | |
port: 4747, // Standard Engine port |
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'); | |
// ConnectOpenApp requires a appname property. | |
// Returns an array of [globalhandle, apphandle] | |
var connection = qsocks.ConnectOpenApp({ | |
host: 'localhost', | |
isSecure: true, | |
rejectUnauthorized: false, | |
appname: '7c876a9a-d62d-49ea-b21c-aaccda76c067', | |
debug: true |
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 Promise = require('bluebird'); | |
var fs = require('fs-extra'); | |
var config = { | |
isSecure: true, | |
host: '<HOSTNAME>', | |
port: 4747, | |
headers: { | |
'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository' |
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'); | |
qsocks.Connect({ | |
host: 'branch.qlik.com', | |
prefix: 'anon', | |
isSecure: true | |
}) | |
.then(function(global) { | |
return global.openDoc('3f3a866b-238f-4d1a-8aeb-81e97756af7a') | |
}) |
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 request = require('request'); | |
const qsocks = require('qsocks'); | |
const fs = require('fs'); | |
// Qlik Sense App ids | |
const appIds = ['efdf4130-7b89-45f6-8639-179666f3e35c', | |
'87c2d436-b9b0-4414-8fa1-f5289627b34e', | |
'b0d3a00d-798b-4e34-8e7c-ab06caa54567', | |
'69a8c183-8bc7-4aa4-8ad1-192dbf4d60f8', | |
'1158e903-446f-4092-bed1-beb748a209b3', |