Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Nov 27, 2023
1 parent a465133 commit 6dfe28e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/components/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h6>v{{ version }}</h6>
</form>
<mat-checkbox
[disabled]="!isRememberMe"
[checked]="isRememberMeCheked"
[checked]="isRememberMeChecked"
class="margin-left"
color="primary"
(change)="rememberMe($event)"
Expand Down
10 changes: 5 additions & 5 deletions src/app/components/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class LoginComponent implements OnInit, DoCheck {
public loginError: boolean = false;
public returnUrl: string = '';
public isRememberMe: boolean = false;
public isRememberMeCheked: boolean = false;
public isRememberMeChecked: boolean = false;

loginForm = new UntypedFormGroup({
username: new UntypedFormControl('', [Validators.required]),
Expand Down Expand Up @@ -65,7 +65,7 @@ export class LoginComponent implements OnInit, DoCheck {
if (getCurrentUser && getCurrentUser.isRememberMe) {
this.loginForm.get('username').setValue(getCurrentUser.username);
this.loginForm.get('password').setValue(getCurrentUser.password);
this.isRememberMeCheked = getCurrentUser.isRememberMe;
this.isRememberMeChecked = getCurrentUser.isRememberMe;
}
}

Expand Down Expand Up @@ -101,13 +101,13 @@ export class LoginComponent implements OnInit, DoCheck {

rememberMe(ev) {
if (ev.checked) {
let curren_user = {
let current_user = {
username: this.loginForm.get('username').value,
password: this.loginForm.get('password').value,
isRememberMe: ev.checked,
};
this.isRememberMeCheked = ev.checked;
localStorage.setItem(`isRememberMe`, JSON.stringify(curren_user));
this.isRememberMeChecked = ev.checked;
localStorage.setItem(`isRememberMe`, JSON.stringify(current_user));
} else {
localStorage.removeItem(`isRememberMe`);
this.loginForm.reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class ContextConsoleMenuComponent implements OnInit {

public openMenu(node: Node, top: number, left: number) {
this.node = node;
let action = this.mapSettingsService.getConsoleContextManuAction();
let action = this.mapSettingsService.getConsoleContextMenuAction();
if (action) {
if (action === 'web console') {
this.openWebConsole();
Expand Down Expand Up @@ -97,7 +97,6 @@ export class ContextConsoleMenuComponent implements OnInit {
this.componentBrowserRef = this.container.createComponent(factory);
this.componentBrowserRef.instance.controller = this.controller;
this.componentBrowserRef.instance.node = this.node;

this.componentBrowserRef.instance.openConsole();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, Input } from '@angular/core';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Node } from '../../../../../cartography/models/node';
import{ Controller } from '../../../../../models/controller';
import { Controller } from '../../../../../models/controller';
import { NodeService } from '../../../../../services/node.service';
import { ToasterService } from '../../../../../services/toaster.service';

Expand All @@ -13,7 +13,11 @@ export class ConsoleDeviceActionBrowserComponent {
@Input() controller:Controller ;
@Input() node: Node;

constructor(private toasterService: ToasterService, private nodeService: NodeService, private deviceService: DeviceDetectorService) {}
constructor(
private toasterService: ToasterService,
private nodeService: NodeService,
private deviceService: DeviceDetectorService
) {}

openConsole() {
this.nodeService.getNode(this.controller, this.node).subscribe((node: Node) => {
Expand All @@ -36,6 +40,7 @@ export class ConsoleDeviceActionBrowserComponent {

if (!iframe) {
iframe = this.createHiddenIframe(document.body, "about:blank");
//setTimeout(() => { iframe.parentNode.removeChild(iframe); }, 0);
}

try {
Expand Down Expand Up @@ -76,6 +81,7 @@ export class ConsoleDeviceActionBrowserComponent {
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") {
// Use a hidden iframe otherwise Firefox will disconnect
// from the GNS3 controller websocket if we use location.assign()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
import { ElectronService } from 'ngx-electron';
import { NodesDataSource } from '../../../cartography/datasources/nodes-datasource';
import { Project } from '../../../models/project';
import{ Controller } from '../../../models/controller';
import { Controller } from '../../../models/controller';
import { MapSettingsService } from '../../../services/mapsettings.service';
import { NodeService } from '../../../services/node.service';
import { NodeConsoleService } from '../../../services/nodeConsole.service';
Expand Down
2 changes: 1 addition & 1 deletion src/app/filters/authImageFilter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Console } from 'console';
import{ Controller } from '../models/controller';
import { Controller } from '../models/controller';
import { HttpController } from '../services/http-controller.service';
import { DomSanitizer } from '@angular/platform-browser';
import { environment } from 'environments/environment';
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/mapsettings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class MapSettingsService {
localStorage.setItem('consoleContextMenu', action);
}

getConsoleContextManuAction(): string {
getConsoleContextMenuAction(): string {
return localStorage.getItem('consoleContextMenu');
}

Expand Down

0 comments on commit 6dfe28e

Please sign in to comment.