mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-02-05 18:49:54 +00:00
Fix typos
This commit is contained in:
parent
a465133ba3
commit
6dfe28ec8f
@ -24,7 +24,7 @@
|
|||||||
</form>
|
</form>
|
||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
[disabled]="!isRememberMe"
|
[disabled]="!isRememberMe"
|
||||||
[checked]="isRememberMeCheked"
|
[checked]="isRememberMeChecked"
|
||||||
class="margin-left"
|
class="margin-left"
|
||||||
color="primary"
|
color="primary"
|
||||||
(change)="rememberMe($event)"
|
(change)="rememberMe($event)"
|
||||||
|
@ -24,7 +24,7 @@ export class LoginComponent implements OnInit, DoCheck {
|
|||||||
public loginError: boolean = false;
|
public loginError: boolean = false;
|
||||||
public returnUrl: string = '';
|
public returnUrl: string = '';
|
||||||
public isRememberMe: boolean = false;
|
public isRememberMe: boolean = false;
|
||||||
public isRememberMeCheked: boolean = false;
|
public isRememberMeChecked: boolean = false;
|
||||||
|
|
||||||
loginForm = new UntypedFormGroup({
|
loginForm = new UntypedFormGroup({
|
||||||
username: new UntypedFormControl('', [Validators.required]),
|
username: new UntypedFormControl('', [Validators.required]),
|
||||||
@ -65,7 +65,7 @@ export class LoginComponent implements OnInit, DoCheck {
|
|||||||
if (getCurrentUser && getCurrentUser.isRememberMe) {
|
if (getCurrentUser && getCurrentUser.isRememberMe) {
|
||||||
this.loginForm.get('username').setValue(getCurrentUser.username);
|
this.loginForm.get('username').setValue(getCurrentUser.username);
|
||||||
this.loginForm.get('password').setValue(getCurrentUser.password);
|
this.loginForm.get('password').setValue(getCurrentUser.password);
|
||||||
this.isRememberMeCheked = getCurrentUser.isRememberMe;
|
this.isRememberMeChecked = getCurrentUser.isRememberMe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,13 +101,13 @@ export class LoginComponent implements OnInit, DoCheck {
|
|||||||
|
|
||||||
rememberMe(ev) {
|
rememberMe(ev) {
|
||||||
if (ev.checked) {
|
if (ev.checked) {
|
||||||
let curren_user = {
|
let current_user = {
|
||||||
username: this.loginForm.get('username').value,
|
username: this.loginForm.get('username').value,
|
||||||
password: this.loginForm.get('password').value,
|
password: this.loginForm.get('password').value,
|
||||||
isRememberMe: ev.checked,
|
isRememberMe: ev.checked,
|
||||||
};
|
};
|
||||||
this.isRememberMeCheked = ev.checked;
|
this.isRememberMeChecked = ev.checked;
|
||||||
localStorage.setItem(`isRememberMe`, JSON.stringify(curren_user));
|
localStorage.setItem(`isRememberMe`, JSON.stringify(current_user));
|
||||||
} else {
|
} else {
|
||||||
localStorage.removeItem(`isRememberMe`);
|
localStorage.removeItem(`isRememberMe`);
|
||||||
this.loginForm.reset();
|
this.loginForm.reset();
|
||||||
|
@ -64,7 +64,7 @@ export class ContextConsoleMenuComponent implements OnInit {
|
|||||||
|
|
||||||
public openMenu(node: Node, top: number, left: number) {
|
public openMenu(node: Node, top: number, left: number) {
|
||||||
this.node = node;
|
this.node = node;
|
||||||
let action = this.mapSettingsService.getConsoleContextManuAction();
|
let action = this.mapSettingsService.getConsoleContextMenuAction();
|
||||||
if (action) {
|
if (action) {
|
||||||
if (action === 'web console') {
|
if (action === 'web console') {
|
||||||
this.openWebConsole();
|
this.openWebConsole();
|
||||||
@ -97,7 +97,6 @@ export class ContextConsoleMenuComponent implements OnInit {
|
|||||||
this.componentBrowserRef = this.container.createComponent(factory);
|
this.componentBrowserRef = this.container.createComponent(factory);
|
||||||
this.componentBrowserRef.instance.controller = this.controller;
|
this.componentBrowserRef.instance.controller = this.controller;
|
||||||
this.componentBrowserRef.instance.node = this.node;
|
this.componentBrowserRef.instance.node = this.node;
|
||||||
|
|
||||||
this.componentBrowserRef.instance.openConsole();
|
this.componentBrowserRef.instance.openConsole();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,11 @@ export class ConsoleDeviceActionBrowserComponent {
|
|||||||
@Input() controller:Controller ;
|
@Input() controller:Controller ;
|
||||||
@Input() node: Node;
|
@Input() node: Node;
|
||||||
|
|
||||||
constructor(private toasterService: ToasterService, private nodeService: NodeService, private deviceService: DeviceDetectorService) {}
|
constructor(
|
||||||
|
private toasterService: ToasterService,
|
||||||
|
private nodeService: NodeService,
|
||||||
|
private deviceService: DeviceDetectorService
|
||||||
|
) {}
|
||||||
|
|
||||||
openConsole() {
|
openConsole() {
|
||||||
this.nodeService.getNode(this.controller, this.node).subscribe((node: Node) => {
|
this.nodeService.getNode(this.controller, this.node).subscribe((node: Node) => {
|
||||||
@ -36,6 +40,7 @@ export class ConsoleDeviceActionBrowserComponent {
|
|||||||
|
|
||||||
if (!iframe) {
|
if (!iframe) {
|
||||||
iframe = this.createHiddenIframe(document.body, "about:blank");
|
iframe = this.createHiddenIframe(document.body, "about:blank");
|
||||||
|
//setTimeout(() => { iframe.parentNode.removeChild(iframe); }, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -76,6 +81,7 @@ export class ConsoleDeviceActionBrowserComponent {
|
|||||||
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
|
this.toasterService.error('Supported console types are: telnet, vnc, spice and spice+agent.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Opening external console using " + device.browser + " browser");
|
||||||
if (device.browser === "Firefox") {
|
if (device.browser === "Firefox") {
|
||||||
// Use a hidden iframe otherwise Firefox will disconnect
|
// Use a hidden iframe otherwise Firefox will disconnect
|
||||||
// from the GNS3 controller websocket if we use location.assign()
|
// from the GNS3 controller websocket if we use location.assign()
|
||||||
|
@ -60,7 +60,7 @@ export class MapSettingsService {
|
|||||||
localStorage.setItem('consoleContextMenu', action);
|
localStorage.setItem('consoleContextMenu', action);
|
||||||
}
|
}
|
||||||
|
|
||||||
getConsoleContextManuAction(): string {
|
getConsoleContextMenuAction(): string {
|
||||||
return localStorage.getItem('consoleContextMenu');
|
return localStorage.getItem('consoleContextMenu');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user