Skip to content

Commit

Permalink
Add 'with_credentials' into URL when call 'Draw in new tab' menu cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed May 5, 2023
1 parent 2518ead commit cb073c5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/gui/HierarchyPainter.mjs
Expand Up @@ -1797,8 +1797,12 @@ class HierarchyPainter extends BasePainter {
filepath += `&item=${name}`;
}

let arg0 = 'nobrowser';
if (settings.WithCredentials)
arg0 += '&with_credentials';

menu.addDrawMenu('Draw in new tab', sett.opts,
arg => window.open(`${source_dir}index.htm?nobrowser&${filepath}&opt=${arg}`));
arg => window.open(`${source_dir}?${arg0}&${filepath}&opt=${arg}`));
}

if ((sett.expand || sett.get_expand) && !('_childs' in hitem) && (hitem._more || !('_more' in hitem)))
Expand Down Expand Up @@ -2878,9 +2882,9 @@ class HierarchyPainter extends BasePainter {

if (sett.opts && (node._can_draw !== false))
menu.addDrawMenu('Draw in new window', sett.opts,
arg => window.open(onlineprop.server + '?nobrowser&item=' + onlineprop.itemname +
(this.isMonitoring() ? '&monitoring=' + this.getMonitoringInterval() : '') +
(arg ? '&opt=' + arg : '')));
arg => window.open(onlineprop.server + `?nobrowser&item=${onlineprop.itemname}` +
(this.isMonitoring() ? `&monitoring=${this.getMonitoringInterval()}` : '') +
(arg ? `&opt=${arg}` : '')));

if (sett.opts && (sett.opts.length > 0) && root_type && (node._can_draw !== false))
menu.addDrawMenu('Draw as png', sett.opts,
Expand Down

0 comments on commit cb073c5

Please sign in to comment.