Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am new to QlikSense and Dev-hub,I created one mashup which is very useful to me and a folder is created in Extensions directory which contains html,js,qext,wbl,css,jpg files,,
My question here is how can i deploy these to my application, what approach should i follow.
Best Regards
If you have already created the extension and embed the charts fro the app into ur extension.
Then zip the folder and import it to the srv via qmc
and follow my first reply.
If you haven't added the charts into the mashup then follow the links I have sent you.
Ok,,but while importing zip folder it is asking for password
But the file which i want to import is already there in the extensions in qmc.
How can i upload it!!!can u explain in brief
Open qmc
Under Manage Resources you can see the extensions tab.
Clik on it and import the zipfile and ignor the password bit.
----------------------------
After go to your hub and open dev hub.
Open your uploaded extension and change the app id.
Importing is over,,but i'm stuck in app-is,,do i go to dev-hub and add app-id in .js file
Finally i got a link,and i got chart through that link,,appid was previously there, i think it added automatically when we selected app in dev-hub
/*global require*/
/*
* Bootstrap-based responsive mashup
* @owner Erik Wetterberg (ewg)
*/
/*
* Fill in host and port for Qlik engine
*/
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:"
};
//to avoid errors in workbench: you can remove this when you have added an app
var app;
require.config( {
baseUrl: (config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "" ) + config.prefix + "resources"
} );
require( ["js/qlik"], function ( qlik ) {
$("#closeerr").on('click',function(){
$("#errmsg").html("").parent().hide();
});
qlik.setOnError( function ( error ) {
$("#errmsg").append("<div>"+error.message+"</div>").parent().show();
} );
//
function AppUi ( app ) {
var me = this;
this.app = app;
app.global.isPersonalMode( function ( reply ) {
me.isPersonalMode = reply.qReturn;
} );
app.getAppLayout( function ( layout ) {
$( "#title" ).html( layout.qTitle );
$( "#title" ).attr("title", "Last reload:" + layout.qLastReloadTime.replace( /T/, ' ' ).replace( /Z/, ' ' ) );
//TODO: bootstrap tooltip ??
} );
app.getList( 'SelectionObject', function ( reply ) {
$( "[data-qcmd='back']" ).parent().toggleClass( 'disabled', reply.qSelectionObject.qBackCount < 1 );
$( "[data-qcmd='forward']" ).parent().toggleClass( 'disabled', reply.qSelectionObject.qForwardCount < 1 );
} );
app.getList( "BookmarkList", function ( reply ) {
var str = "";
reply.qBookmarkList.qItems.forEach( function ( value ) {
if ( value.qData.title ) {
str += '<li><a href="#" data-id="' + value.qInfo.qId + '">' + value.qData.title + '</a></li>';
}
} );
str += '<li><a href="#" data-cmd="create">Create</a></li>';
$( '#qbmlist' ).html( str ).find( 'a' ).on( 'click', function () {
var id = $( this ).data( 'id' );
if ( id ) {
app.bookmark.apply( id );
} else {
var cmd = $( this ).data( 'cmd' );
if ( cmd === "create" ) {
$('#createBmModal' ).modal();
}
}
} );
} );
$( "[data-qcmd]" ).on( 'click', function () {
var $element = $( this );
switch ( $element.data( 'qcmd' ) ) {
//app level commands
case 'clearAll':
app.clearAll();
break;
case 'back':
app.back();
break;
case 'forward':
app.forward();
break;
case 'lockAll':
app.lockAll();
break;
case 'unlockAll':
app.unlockAll();
break;
case 'createBm':
var title = $("#bmtitle" ).val(), desc = $("#bmdesc" ).val();
app.bookmark.create( title, desc );
$('#createBmModal' ).modal('hide');
break;
case 'reload':
if ( me.isPersonalMode ) {
app.doReload().then( function () {
app.doSave();
} );
} else {
qlik.callRepository( '/qrs/app/' + app.id + '/reload', 'POST' ).success( function ( reply ) {
//TODO:handle errors, remove alert
alert( "App reloaded" );
} );
}
break;
}
} );
}
//callbacks -- inserted here --
//open apps -- inserted here --
var app = qlik.openApp('94ec58bc-fcc0-4d5a-b658-b54edbf82cde', config);
//get objects -- inserted here --
app.getObject('QV01','vnCdHwx');
app.getObject('QV02','aHsydp');
//create cubes and lists -- inserted here --
if(app) {
new AppUi( app );
}
} );
Final link which i got is enough??can i add that link in my application??will it update whenever i load the qliksense.
And appid was previously there in .js file, i didn't changed it
Yes change the app name to the id in js file.
You can get the app id from
qmc-> apps -> and in top right corner click on column selector and tick id.
Take this id and replace the app name to this id in .js file