Skip to content

Commit b2ce9b2

Browse files
authored
Merge pull request #1224 from jumpserver/dev
v4.6.0
2 parents 87b22d0 + ebbbbac commit b2ce9b2

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"license": "GPLv3",
55
"scripts": {
66
"ng": "ng",
7+
"dev": "NODE_OPTIONS=--openssl-legacy-provider ng serve --hmr --proxy-config proxy.conf.json --host 0.0.0.0 --base-href=/luna/ --disable-host-check",
78
"start": "NODE_OPTIONS=--openssl-legacy-provider ng serve --hmr --proxy-config proxy.conf.json --host 0.0.0.0 --base-href=/luna/ --disable-host-check",
89
"build": "NODE_OPTIONS=--openssl-legacy-provider ng build --prod --base-href=/luna/ --output-path 'luna'",
910
"extract": "ngx-translate-extract --input ./src --output ./src/assets/i18n/*.json --sort --format namespaced-json",

src/app/elements/content/content.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {ElementCommandDialogComponent} from '@app/elements/content/command-dialo
77
import {ElementSendCommandWithVariableDialogComponent} from '@app/elements/content/send-command-with-variable-dialog/send-command-with-variable-dialog.component';
88
import {fromEvent, Subscription} from 'rxjs';
99
import * as jQuery from 'jquery/dist/jquery.min.js';
10+
import * as _ from 'lodash';
1011

1112
@Component({
1213
selector: 'elements-content',
@@ -92,6 +93,10 @@ export class ElementContentComponent implements OnInit, OnDestroy {
9293
}
9394

9495
handleKeyDownTabChange() {
96+
const debouncedSwitch = _.debounce((key: string) => {
97+
this.viewSrv.keyboardSwitchTab(key);
98+
}, 500);
99+
95100
this.keyboardSubscription = fromEvent(window, 'keydown').subscribe((event: any) => {
96101
if (event.altKey && event.shiftKey && (event.key === 'ArrowRight' || event.key === 'ArrowLeft') && this.viewList.length > 1) {
97102
let key = '';
@@ -100,7 +105,7 @@ export class ElementContentComponent implements OnInit, OnDestroy {
100105
} else if (event.key === 'ArrowLeft') {
101106
key = 'alt+shift+left';
102107
}
103-
this.viewSrv.keyboardSwitchTab(key);
108+
debouncedSwitch(key);
104109
}
105110
});
106111
}

src/app/services/connect-token/acl-dialog/acl-dialog.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2 mat-dialog-title> {{ 'Login reminder' | translate }} </h2>
2323

2424
<div *ngSwitchCase="'acl_face_online_not_supported'">
2525
<mat-dialog-content>
26-
<div class="error-message">{{ 'ACL action "Face Online" not supported for this asset.' |translate }}</div>
26+
<div class="error-message">{{errorDetail }}</div>
2727
</mat-dialog-content>
2828
<mat-dialog-actions>
2929
<button (click)="closeDialog()" mat-raised-button>{{ "Close" | translate }}</button>

src/app/services/connect-token/acl-dialog/acl-dialog.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export class ElementACLDialogComponent implements OnInit {
4949
if (Array.isArray(error)) {
5050
error = error.join(' ');
5151
} else if (typeof error === 'object') {
52+
if (error.detail) {
53+
error = error.detail;
54+
}
5255
error = JSON.stringify(error);
5356
}
5457
return error;

0 commit comments

Comments
 (0)