Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

korsikov
Valued Contributor II

how to open the application in the same window as the hub?

simple question but i can't find answer

how to open the application in the same window as the hub?

1 Solution

Accepted Solutions
Not applicable

Re: how to open the application in the same window as the hub?

Confirmed resolution for Sense 3.1.4 (have not tested other versions).  As modification to the hub.js file is required to make this work, this is of course not a supported resolution, and should only be done at your own discretion.  This modification is likely to be reverted back to default at each upgrade, and may have to be completed again afterwards or may even be rendered obsolete depending on what was done in the upgrade.

To stop Sense from opening a new tab, the js command "window.open" must be removed from the file hub.js.  From the Sense Central node:

  1. Go to C:\Program Files\Qlik\Sense\Client\hub and make a backup copy of the file hub.js
  2. Right click on notepad.exe and open as an Administrator (must be opened as an admin in order to same modifications; if not you will be asked to rename and save as a different file)
  3. Open the original hub.js file and make the following modification
    1. ctrl + f to find the words "window.open" in the line "openApp:function(a,b,c){var d;d=c?e.buildUrl(!0,"sense","app",a,"noData","true"):e.buildUrl(!0,"sense","app",a),b?window.open(d):e.setUrl(d)},openItem:function(a,b){b?window.open(a):e.setUrl(a)"
    2. Remove "b?window.open(d):" and "b?window.open(a):" and save the file
    3. The line should read "openApp:function(a,b,c){var d;d=c?e.buildUrl(!0,"sense","app",a,"noData","true"):e.buildUrl(!0,"sense","app",a),e.setUrl(d)},openItem:function(a,b){e.setUrl(a)}" after the modification
  4. Restart the Sense services, clear the internet browser cache, and then test

NOTE:  When opening the Hub from within the app (Navigation > Open hub), the hub will still open in a new window.  This is because a different call/method is used to open the Hub, and this same call/method is used to open it when doing so from the app as well.

13 Replies
Employee
Employee

Re: how to open the application in the same window as the hub?

Hi,

I have looked and I don't think this is possible in Sense.

Bill

korsikov
Valued Contributor II

Re: how to open the application in the same window as the hub?

any ideas how to do it another way?

vikasmahajan
Honored Contributor III

Re: how to open the application in the same window as the hub?

We have option in Qlikview open qvw in another tab find whether it available in Sense .

Vikas

korsikov
Valued Contributor II

Re: how to open the application in the same window as the hub?

I first tried to find a similar opportunity. Where there is such a choice, to open in the same or in a new window have appropriate labels

Employee
Employee

Re: how to open the application in the same window as the hub?

I have look at the HTML code and I don't see a way. Yes, this is available in QlikView but not in Slik Sense.

Bill

Not applicable

Re: how to open the application in the same window as the hub?

It's late, but here is my solution:

find file c:\Program Files\Qlik\Sense\Client\assets\hub.hub.js.

Backup it and open it with your preferred text editor.

Search for line

"

!m.isSmallDevice||b.$rootScope.isPersonalMode?window.open(d):c.setUrl(d)

"

change it to

"

c.setUrl(d)

"

Clear Browser cache and go

korsikov
Valued Contributor II

Re: how to open the application in the same window as the hub?

Hello Michael

Help me please. I'm not found line "!m.isSmallDevice||b.$rootScope.isPersonalMode?window.open(d):c.setUrl(d)"

in hub.js file

My qlik sense server 2.1.1

Hub.js file in attach.

richbyard
New Contributor III

Re: how to open the application in the same window as the hub?

That fix works well when opening an app from the hub. However, when I open the hub from the app (with the dropdown in the top left corner) I create a new tab... Any thoughts on this?

Not applicable

Re: how to open the application in the same window as the hub?

Confirmed resolution for Sense 3.1.4 (have not tested other versions).  As modification to the hub.js file is required to make this work, this is of course not a supported resolution, and should only be done at your own discretion.  This modification is likely to be reverted back to default at each upgrade, and may have to be completed again afterwards or may even be rendered obsolete depending on what was done in the upgrade.

To stop Sense from opening a new tab, the js command "window.open" must be removed from the file hub.js.  From the Sense Central node:

  1. Go to C:\Program Files\Qlik\Sense\Client\hub and make a backup copy of the file hub.js
  2. Right click on notepad.exe and open as an Administrator (must be opened as an admin in order to same modifications; if not you will be asked to rename and save as a different file)
  3. Open the original hub.js file and make the following modification
    1. ctrl + f to find the words "window.open" in the line "openApp:function(a,b,c){var d;d=c?e.buildUrl(!0,"sense","app",a,"noData","true"):e.buildUrl(!0,"sense","app",a),b?window.open(d):e.setUrl(d)},openItem:function(a,b){b?window.open(a):e.setUrl(a)"
    2. Remove "b?window.open(d):" and "b?window.open(a):" and save the file
    3. The line should read "openApp:function(a,b,c){var d;d=c?e.buildUrl(!0,"sense","app",a,"noData","true"):e.buildUrl(!0,"sense","app",a),e.setUrl(d)},openItem:function(a,b){e.setUrl(a)}" after the modification
  4. Restart the Sense services, clear the internet browser cache, and then test

NOTE:  When opening the Hub from within the app (Navigation > Open hub), the hub will still open in a new window.  This is because a different call/method is used to open the Hub, and this same call/method is used to open it when doing so from the app as well.