mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-24 17:15:22 +00:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
4cd9f77732 | |||
1619c3ec05 | |||
b33a01e225 | |||
353740376e | |||
9fe899e4df | |||
dd1f16c53d | |||
3fa52d3c9c | |||
bc5dd0271f | |||
81ca3e2af2 | |||
d7a0d2f69a | |||
8f0bbafa72 |
68
package.json
68
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gns3-web-ui",
|
||||
"version": "2.2.23",
|
||||
"version": "2.2.24",
|
||||
"author": {
|
||||
"name": "GNS3 Technology Inc.",
|
||||
"email": "developers@gns3.com"
|
||||
@ -41,26 +41,26 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^12.1.4",
|
||||
"@angular/cdk": "^12.1.4",
|
||||
"@angular/common": "^12.1.4",
|
||||
"@angular/compiler": "^12.1.4",
|
||||
"@angular/core": "^12.1.4",
|
||||
"@angular/forms": "^12.1.4",
|
||||
"@angular/material": "^12.1.4",
|
||||
"@angular/platform-browser": "^12.1.4",
|
||||
"@angular/platform-browser-dynamic": "^12.1.4",
|
||||
"@angular/router": "^12.1.4",
|
||||
"@sentry/browser": "^6.10.0",
|
||||
"@types/jest": "^26.0.24",
|
||||
"@angular/animations": "^12.2.2",
|
||||
"@angular/cdk": "^12.2.2",
|
||||
"@angular/common": "^12.2.2",
|
||||
"@angular/compiler": "^12.2.2",
|
||||
"@angular/core": "^12.2.2",
|
||||
"@angular/forms": "^12.2.2",
|
||||
"@angular/material": "^12.2.2",
|
||||
"@angular/platform-browser": "^12.2.2",
|
||||
"@angular/platform-browser-dynamic": "^12.2.2",
|
||||
"@angular/router": "^12.2.2",
|
||||
"@sentry/browser": "^6.11.0",
|
||||
"@types/jest": "^27.0.1",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/react": "^17.0.15",
|
||||
"@types/react": "^17.0.19",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
"angular-draggable-droppable": "^4.6.0",
|
||||
"angular-resizable-element": "^3.4.0",
|
||||
"bootstrap": "^5.0.2",
|
||||
"bootstrap": "^5.1.0",
|
||||
"command-exists": "^1.2.9",
|
||||
"core-js": "^3.16.0",
|
||||
"core-js": "^3.16.2",
|
||||
"d3-ng2-service": "^2.2.0",
|
||||
"eev": "^0.1.5",
|
||||
"ini": "^2.0.0",
|
||||
@ -74,36 +74,36 @@
|
||||
"node-fetch": "^2.6.1",
|
||||
"notosans-fontface": "1.2.2",
|
||||
"prettier-plugin-organize-imports": "^2.3.3",
|
||||
"rxjs": "^6.5.3",
|
||||
"rxjs-compat": "^6.5.3",
|
||||
"rxjs": "^6.6.7",
|
||||
"rxjs-compat": "^6.6.7",
|
||||
"save-svg-as-png": "^1.4.17",
|
||||
"snyk": "^1.671.0",
|
||||
"snyk": "^1.687.0",
|
||||
"spark-md5": "^3.0.1",
|
||||
"svg-crowbar": "^0.6.5",
|
||||
"svg-crowbar": "^0.7.0",
|
||||
"tree-kill": "^1.2.2",
|
||||
"tslib": "^2.3.0",
|
||||
"tslib": "^2.3.1",
|
||||
"typeface-roboto": "^1.1.13",
|
||||
"xterm": "^4.13.0",
|
||||
"xterm-addon-attach": "^0.6.0",
|
||||
"xterm-addon-fit": "^0.5.0",
|
||||
"yargs": "^17.0.1",
|
||||
"yargs": "^17.1.1",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^12.1.4",
|
||||
"@angular/cli": "^12.1.4",
|
||||
"@angular/compiler-cli": "^12.1.4",
|
||||
"@angular/language-service": "^12.1.4",
|
||||
"@sentry/cli": "^1.67.2",
|
||||
"@angular-devkit/build-angular": "^12.2.2",
|
||||
"@angular/cli": "^12.2.2",
|
||||
"@angular/compiler-cli": "^12.2.2",
|
||||
"@angular/language-service": "^12.2.2",
|
||||
"@sentry/cli": "^1.68.0",
|
||||
"@sentry/electron": "^2.5.1",
|
||||
"@types/jasmine": "^3.8.2",
|
||||
"@types/jasminewd2": "^2.0.10",
|
||||
"@types/node": "16.4.7",
|
||||
"@types/node": "16.7.1",
|
||||
"codelyzer": "^6.0.2",
|
||||
"electron": "^13.1.7",
|
||||
"electron-builder": "22.11.7",
|
||||
"electron": "^13.2.2",
|
||||
"electron-builder": "^22.9.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"jasmine-core": "~3.9.0",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"karma": "^6.3.4",
|
||||
@ -119,11 +119,11 @@
|
||||
"replace": "^1.2.1",
|
||||
"rxjs-tslint": "^0.1.8",
|
||||
"ts-mockito": "^2.6.1",
|
||||
"ts-node": "~10.1.0",
|
||||
"ts-node": "~10.2.1",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "4.3.5",
|
||||
"webpack": "5.47.1",
|
||||
"webpack": "5.51.1",
|
||||
"yarn-upgrade-all": "^0.5.4"
|
||||
},
|
||||
"greenkeeper": {
|
||||
@ -132,4 +132,4 @@
|
||||
]
|
||||
},
|
||||
"snyk": true
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
GNS3 WebUI is web implementation of user interface for GNS3 software.
|
||||
|
||||
Current version: 2.2.22
|
||||
Current version: 2.2.24
|
||||
|
||||
Bug Fixes & enhancements
|
||||
- security fixes
|
||||
|
||||
Current version: 2020.4.0-beta.1
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
<div>
|
||||
<mat-checkbox [(ngModel)]="settings.crash_reports">Send anonymous crash reports</mat-checkbox><br />
|
||||
<mat-checkbox [(ngModel)]="settings.anonymous_statistics">Send anonymous usage statistics</mat-checkbox><br />
|
||||
<mat-checkbox [(ngModel)]="integrateLinksLabelsToLinks">Integrate link labels to links</mat-checkbox><br />
|
||||
<mat-checkbox [(ngModel)]="openConsolesInWidget">Open consoles in the widget instead of in new tabs after clicking start consoles for all nodes</mat-checkbox>
|
||||
</div>
|
||||
|
@ -69,6 +69,7 @@ describe('SettingsComponent', () => {
|
||||
const settings = {
|
||||
crash_reports: true,
|
||||
experimental_features: true,
|
||||
anonymous_statistics: true,
|
||||
angular_map: false,
|
||||
console_command: '',
|
||||
};
|
||||
|
@ -1,14 +1,17 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { environment } from '../../environments/environment';
|
||||
import { SettingsService } from './settings.service';
|
||||
declare var gtag: Function;
|
||||
|
||||
@Injectable()
|
||||
export class GoogleAnalyticsService {
|
||||
constructor(router: Router) {
|
||||
private settingsService: SettingsService;
|
||||
|
||||
constructor(router: Router, settingsService: SettingsService) {
|
||||
if (!environment.production) return;
|
||||
router.events.subscribe((event) => {
|
||||
if (event instanceof NavigationEnd) {
|
||||
if (settingsService.getStatisticsSettings() && event instanceof NavigationEnd) {
|
||||
gtag('set', 'page', event.url);
|
||||
gtag('send', 'pageview');
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import { BehaviorSubject } from 'rxjs';
|
||||
export interface Settings {
|
||||
crash_reports: boolean;
|
||||
console_command: string;
|
||||
anonymous_statistics: boolean;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
@ -13,10 +14,12 @@ export class SettingsService {
|
||||
private settings: Settings = {
|
||||
crash_reports: true,
|
||||
console_command: undefined,
|
||||
anonymous_statistics: true
|
||||
};
|
||||
|
||||
private readonly reportsSettings: string = 'crash_reports';
|
||||
private readonly consoleSettings: string = 'console_command';
|
||||
private readonly statisticsSettings: string = 'statistics_command';
|
||||
|
||||
constructor() {
|
||||
if (this.getItem(this.reportsSettings))
|
||||
@ -24,6 +27,9 @@ export class SettingsService {
|
||||
|
||||
if (this.getItem(this.consoleSettings))
|
||||
this.settings.console_command = this.getItem(this.consoleSettings);
|
||||
|
||||
if (this.getItem(this.statisticsSettings))
|
||||
this.settings.anonymous_statistics = this.getItem(this.statisticsSettings) === 'true' ? true : false;
|
||||
}
|
||||
|
||||
setReportsSettings(value: boolean) {
|
||||
@ -36,10 +42,24 @@ export class SettingsService {
|
||||
}
|
||||
}
|
||||
|
||||
setStatisticsSettings(value: boolean) {
|
||||
this.settings.anonymous_statistics = value;
|
||||
this.removeItem(this.statisticsSettings);
|
||||
if (value) {
|
||||
this.setItem(this.statisticsSettings, 'true');
|
||||
} else {
|
||||
this.setItem(this.statisticsSettings, 'false');
|
||||
}
|
||||
}
|
||||
|
||||
getReportsSettings() {
|
||||
return this.getItem(this.reportsSettings) === 'true' ? true : false;
|
||||
}
|
||||
|
||||
getStatisticsSettings() {
|
||||
return this.getItem(this.statisticsSettings) === 'true' ? true : false;
|
||||
}
|
||||
|
||||
setConsoleSettings(value: string) {
|
||||
this.settings.console_command = value;
|
||||
this.removeItem(this.consoleSettings);
|
||||
@ -70,5 +90,6 @@ export class SettingsService {
|
||||
this.settings = settings;
|
||||
this.setConsoleSettings(settings.console_command);
|
||||
this.setReportsSettings(settings.crash_reports);
|
||||
this.setStatisticsSettings(settings.anonymous_statistics);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user