Skip to content

Commit

Permalink
Merge pull request #570 from jumpserver/dev
Browse files Browse the repository at this point in the history
v2.21.0
  • Loading branch information
BaiJiangJie committed Apr 21, 2022
2 parents bd93430 + 465d1b6 commit 992f21e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/app/elements/iframe/iframe.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ export class ElementIframeComponent implements OnInit, AfterViewInit, OnDestroy
setTimeout(function () {
// 长时间未PING通, 则主动关闭
clearInterval(this.ping);
const msg = this._i18n.instant('Failed to open address');
alert(`${msg}:\n${this.src}`);
if (!this.show) {
const msg = this._i18n.instant('Failed to open address');
alert(`${msg}:\n${this.src}`);
}
}.bind(this), 500 * 20);
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const TYPE_DB_GUI: ConnectType = {
id: 'dbGUI',
requireXPack: true,
protocol: 'http',
client: true
client: false
};

export const TYPE_DB_CLIENT: ConnectType = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function getCookie(name: string): string {

export function getCsrfTokenFromCookie(): string {
let prefix = getCookie('SESSION_COOKIE_NAME_PREFIX');
if (!prefix) { prefix = ''; }
if (!prefix || [`""`, `''`].indexOf(prefix) > -1) { prefix = ''; }
const name = `${prefix}csrftoken`;
return getCookie(name);
}
Expand Down

0 comments on commit 992f21e

Please sign in to comment.