[WIP] Updated packages #162-2
This commit is contained in:
parent
667b9fa87e
commit
4266db7e35
@ -1,16 +0,0 @@
|
|||||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
|
||||||
# For additional information regarding the format and rule options, please see:
|
|
||||||
# https://github.com/browserslist/browserslist#queries
|
|
||||||
|
|
||||||
# For the full list of supported browsers by the Angular framework, please see:
|
|
||||||
# https://angular.io/guide/browser-support
|
|
||||||
|
|
||||||
# You can see what browsers were selected by your queries by running:
|
|
||||||
# npx browserslist
|
|
||||||
|
|
||||||
last 1 Chrome version
|
|
||||||
last 1 Firefox version
|
|
||||||
last 2 Edge major versions
|
|
||||||
last 2 Safari major versions
|
|
||||||
last 2 iOS major versions
|
|
||||||
Firefox ESR
|
|
8407
kdb-web/package-lock.json
generated
8407
kdb-web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,32 +16,29 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^14.0.0",
|
"@angular/animations": "^15.1.4",
|
||||||
"@angular/common": "^14.0.0",
|
"@angular/common": "^15.1.4",
|
||||||
"@angular/compiler": "^14.0.0",
|
"@angular/compiler": "^15.1.4",
|
||||||
"@angular/core": "^14.0.0",
|
"@angular/core": "^15.1.4",
|
||||||
"@angular/forms": "^14.0.0",
|
"@angular/forms": "^15.1.4",
|
||||||
"@angular/platform-browser": "^14.0.0",
|
"@angular/platform-browser": "^15.1.4",
|
||||||
"@angular/platform-browser-dynamic": "^14.0.0",
|
"@angular/platform-browser-dynamic": "^15.1.4",
|
||||||
"@angular/router": "^14.0.0",
|
"@angular/router": "^15.1.4",
|
||||||
"@auth0/angular-jwt": "^5.1.0",
|
"@auth0/angular-jwt": "^5.1.0",
|
||||||
"@microsoft/signalr": "^6.0.9",
|
"@microsoft/signalr": "^6.0.9",
|
||||||
"@ngx-translate/core": "^14.0.0",
|
"@ngx-translate/core": "^14.0.0",
|
||||||
"@ngx-translate/http-loader": "^7.0.0",
|
"@ngx-translate/http-loader": "^7.0.0",
|
||||||
"@types/socket.io-client": "^3.0.0",
|
"@types/socket.io-client": "^3.0.0",
|
||||||
"apollo-angular": "^4.2.0",
|
|
||||||
"primeicons": "^6.0.1",
|
"primeicons": "^6.0.1",
|
||||||
"primeng": "^14.1.2",
|
"primeng": "^15.2.0",
|
||||||
"rxjs": "~7.5.0",
|
"rxjs": "~7.5.0",
|
||||||
"socket.io-client": "^4.5.3",
|
"socket.io-client": "^4.5.3",
|
||||||
"zone.js": "~0.11.4",
|
"zone.js": "~0.11.4"
|
||||||
"@apollo/client": "^3.0.0",
|
|
||||||
"graphql": "^16"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^14.0.0",
|
"@angular-devkit/build-angular": "^15.1.5",
|
||||||
"@angular/cli": "~14.0.0",
|
"@angular/cli": "~15.1.5",
|
||||||
"@angular/compiler-cli": "^14.0.0",
|
"@angular/compiler-cli": "^15.1.4",
|
||||||
"@types/jasmine": "~4.0.0",
|
"@types/jasmine": "~4.0.0",
|
||||||
"@types/node": "^18.11.9",
|
"@types/node": "^18.11.9",
|
||||||
"jasmine-core": "~4.1.0",
|
"jasmine-core": "~4.1.0",
|
||||||
@ -51,6 +48,6 @@
|
|||||||
"karma-jasmine": "~5.0.0",
|
"karma-jasmine": "~5.0.0",
|
||||||
"karma-jasmine-html-reporter": "~1.7.0",
|
"karma-jasmine-html-reporter": "~1.7.0",
|
||||||
"tslib": "^2.4.1",
|
"tslib": "^2.4.1",
|
||||||
"typescript": "~4.7.2"
|
"typescript": "~4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,7 +17,6 @@ import { SpinnerComponent } from './components/spinner/spinner.component';
|
|||||||
import { SharedModule } from './modules/shared/shared.module';
|
import { SharedModule } from './modules/shared/shared.module';
|
||||||
import { ErrorHandlerService } from './services/error-handler/error-handler.service';
|
import { ErrorHandlerService } from './services/error-handler/error-handler.service';
|
||||||
import { SettingsService } from './services/settings/settings.service';
|
import { SettingsService } from './services/settings/settings.service';
|
||||||
import { GraphQLModule } from './graphql.module';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +48,6 @@ import { GraphQLModule } from './graphql.module';
|
|||||||
deps: [HttpClient]
|
deps: [HttpClient]
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
GraphQLModule,
|
|
||||||
HttpClientModule
|
HttpClientModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {ApolloModule, APOLLO_OPTIONS} from 'apollo-angular';
|
|
||||||
import {ApolloClientOptions, InMemoryCache} from '@apollo/client/core';
|
|
||||||
import {HttpLink} from 'apollo-angular/http';
|
|
||||||
import { environment } from "../environments/environment";
|
|
||||||
|
|
||||||
const uri = `${environment.apiURL}/api/graphql/`; // <-- add the URL of the GraphQL server here
|
|
||||||
|
|
||||||
export function createApollo(httpLink: HttpLink): ApolloClientOptions<any> {
|
|
||||||
return {
|
|
||||||
link: httpLink.create({uri}),
|
|
||||||
cache: new InMemoryCache(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
exports: [ApolloModule],
|
|
||||||
providers: [
|
|
||||||
{
|
|
||||||
provide: APOLLO_OPTIONS,
|
|
||||||
useFactory: createApollo,
|
|
||||||
deps: [HttpLink],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class GraphQLModule {}
|
|
@ -2,7 +2,6 @@ import { Component, OnInit } from "@angular/core";
|
|||||||
import { FormBuilder, FormControl, FormGroup } from "@angular/forms";
|
import { FormBuilder, FormControl, FormGroup } from "@angular/forms";
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
import { Apollo } from "apollo-angular";
|
|
||||||
import { LazyLoadEvent } from "primeng/api";
|
import { LazyLoadEvent } from "primeng/api";
|
||||||
import { debounceTime } from "rxjs";
|
import { debounceTime } from "rxjs";
|
||||||
import { ConfirmationDialogService } from "src/app/services/confirmation-dialog/confirmation-dialog.service";
|
import { ConfirmationDialogService } from "src/app/services/confirmation-dialog/confirmation-dialog.service";
|
||||||
@ -36,8 +35,7 @@ export class DashboardComponent implements OnInit {
|
|||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private serverService: ServerService,
|
private serverService: ServerService
|
||||||
private apollo: Apollo
|
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
async ngOnInit(): Promise<void> {
|
||||||
|
@ -217,7 +217,7 @@ export class AuthService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getDecodedToken(): { [key: string]: any } {
|
getDecodedToken(): { [key: string]: any } | null{
|
||||||
return this.jwtHelper.decodeToken(this.getToken().token);
|
return this.jwtHelper.decodeToken(this.getToken().token);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,10 +288,11 @@ export class AuthService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const token = this.getDecodedToken();
|
const token = this.getDecodedToken();
|
||||||
|
if (!token) return false;
|
||||||
return AuthRoles[token['role']] === AuthRoles[role];
|
return AuthRoles[token['role']] === AuthRoles[role];
|
||||||
}
|
}
|
||||||
|
|
||||||
getEMailFromDecodedToken(token: { [key: string]: any }): string | null {
|
getEMailFromDecodedToken(token: { [key: string]: any } | null): string | null {
|
||||||
if (!token) {
|
if (!token) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,28 @@
|
|||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { SettingsService } from "../settings/settings.service";
|
import { SettingsService } from "../settings/settings.service";
|
||||||
import { Apollo, gql } from "apollo-angular";
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DataService {
|
export class DataService {
|
||||||
|
|
||||||
serverQuery = this.apollo.watchQuery({
|
// serverQuery = this.apollo.watchQuery({
|
||||||
query: gql`
|
// query: gql`
|
||||||
{
|
// {
|
||||||
serverCount
|
// serverCount
|
||||||
servers {
|
// servers {
|
||||||
id
|
// id
|
||||||
name
|
// name
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
`
|
// `
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private appsettings: SettingsService,
|
private appsettings: SettingsService,
|
||||||
private http: HttpClient,
|
private http: HttpClient
|
||||||
private apollo: Apollo
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,20 +7,8 @@ import {
|
|||||||
platformBrowserDynamicTesting
|
platformBrowserDynamicTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
declare const require: {
|
|
||||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
||||||
<T>(id: string): T;
|
|
||||||
keys(): string[];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(
|
getTestBed().initTestEnvironment(
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
platformBrowserDynamicTesting(),
|
platformBrowserDynamicTesting(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Then we find all the tests.
|
|
||||||
const context = require.context('./', true, /\.spec\.ts$/);
|
|
||||||
// And load the modules.
|
|
||||||
context.keys().forEach(context);
|
|
||||||
|
@ -20,14 +20,15 @@
|
|||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
"target": "es2020",
|
"target": "ES2022",
|
||||||
"module": "es2020",
|
"module": "es2020",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2020",
|
"es2020",
|
||||||
"dom",
|
"dom",
|
||||||
"esnext.asynciterable"
|
"esnext.asynciterable"
|
||||||
],
|
],
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"useDefineForClassFields": false
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"enableI18nLegacyMessageIdFormat": false,
|
"enableI18nLegacyMessageIdFormat": false,
|
||||||
|
Loading…
Reference in New Issue
Block a user