Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.frontend into SI-444
diff --git a/hooks/pre-build.js b/hooks/pre-build.js
index 52b813e..1cc7fc8 100644
--- a/hooks/pre-build.js
+++ b/hooks/pre-build.js
@@ -13,22 +13,16 @@
var fs = require('fs-extra');
var jsonConcat = require('json-concat');
-var localizationSourceFilesDE = [
- './i18n/general.de.json',
- './i18n/components.de.json',
- './i18n/logout.de.json',
- './i18n/grid-failure.de.json',
- './i18n/imported-grid-failure.de.json',
-];
+var localizationSourceFilesDE = ['./i18n/general.de.json', './i18n/components.de.json', './i18n/logout.de.json', './i18n/grid-failure.de.json'];
function mergeAndSaveJsonFiles(src, dest) {
- jsonConcat({ src: src, dest: dest }, function(res) {
+ jsonConcat({ src: src, dest: dest }, function (res) {
console.log('Localization files successfully merged!');
});
}
function setEnvironment(configPath, environment) {
- fs.writeJson(configPath, { env: environment }, function(res) {
+ fs.writeJson(configPath, { env: environment }, function (res) {
console.log('Environment variable set to ' + environment);
});
}
diff --git a/hooks/pre-start.js b/hooks/pre-start.js
index bcb589c..9da138f 100644
--- a/hooks/pre-start.js
+++ b/hooks/pre-start.js
@@ -13,22 +13,16 @@
var fs = require('fs-extra');
var jsonConcat = require('json-concat');
-var localizationSourceFilesDE = [
- './i18n/general.de.json',
- './i18n/components.de.json',
- './i18n/logout.de.json',
- './i18n/grid-failure.de.json',
- './i18n/imported-grid-failure.de.json',
-];
+var localizationSourceFilesDE = ['./i18n/general.de.json', './i18n/components.de.json', './i18n/logout.de.json', './i18n/grid-failure.de.json'];
function mergeAndSaveJsonFiles(src, dest) {
- jsonConcat({ src: src, dest: dest }, function(res) {
+ jsonConcat({ src: src, dest: dest }, function (res) {
console.log('Localization files successfully merged!');
});
}
function setEnvironment(configPath, environment) {
- fs.writeJson(configPath, { env: environment }, function(res) {
+ fs.writeJson(configPath, { env: environment }, function (res) {
console.log('Environment variable set to ' + environment);
});
}
diff --git a/i18n/imported-grid-failure.de.json b/i18n/imported-grid-failure.de.json
deleted file mode 100644
index bd49a8a..0000000
--- a/i18n/imported-grid-failure.de.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ImportedGridFailures": {
- "Title": "Übersicht importierter Meldungen"
- },
- "ImportedGridFailure": {
- "Description": "Beschreibung",
- "Source": "Quelle",
- "MessageContent": "Meldungsinhalt"
- }
-}
diff --git a/package.json b/package.json
index 3ae73d5..b84c707 100644
--- a/package.json
+++ b/package.json
@@ -37,77 +37,77 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "^8.2.14",
- "@angular/cdk": "^8.2.3",
- "@angular/common": "^8.2.14",
- "@angular/compiler": "^8.2.14",
- "@angular/core": "^8.2.14",
- "@angular/elements": "^8.2.14",
- "@angular/forms": "^8.2.14",
- "@angular/http": "^7.2.15",
- "@angular/platform-browser": "^8.2.14",
- "@angular/platform-browser-dynamic": "^8.2.14",
- "@angular/router": "^8.2.14",
- "@auth0/angular-jwt": "^3.0.1",
- "@ng-bootstrap/ng-bootstrap": "^5.1.5",
- "@fortawesome/fontawesome-free-webfonts": "^1.0.9",
- "@ngrx/core": "^1.2.0",
- "@ngrx/effects": "^8.6.0",
- "@ngrx/store": "^8.6.0",
- "@ngrx/store-devtools": "^8.6.0",
- "@ngx-translate/core": "^11.0.1",
- "@ngx-translate/http-loader": "^4.0.0",
- "ag-grid-angular": "^21.2.2",
- "ag-grid-community": "^21.2.2",
- "angular-font-awesome": "^3.1.2",
- "angular2-notifications": "^2.0.0",
- "bootstrap": "^4.4.1",
- "classlist.js": "^1.1.20150312",
+ "@angular/animations": "8.2.14",
+ "@angular/cdk": "8.2.3",
+ "@angular/common": "8.2.14",
+ "@angular/compiler": "8.2.14",
+ "@angular/core": "8.2.14",
+ "@angular/elements": "8.2.14",
+ "@angular/forms": "8.2.14",
+ "@angular/http": "7.2.16",
+ "@angular/platform-browser": "8.2.14",
+ "@angular/platform-browser-dynamic": "8.2.14",
+ "@angular/router": "8.2.14",
+ "@auth0/angular-jwt": "3.0.1",
+ "@ng-bootstrap/ng-bootstrap": "5.3.0",
+ "@fortawesome/fontawesome-free-webfonts": "1.0.9",
+ "@ngrx/core": "1.2.0",
+ "@ngrx/effects": "8.6.0",
+ "@ngrx/store": "8.6.0",
+ "@ngrx/store-devtools": "8.6.0",
+ "@ngx-translate/core": "11.0.1",
+ "@ngx-translate/http-loader": "4.0.0",
+ "ag-grid-angular": "21.2.2",
+ "ag-grid-community": "21.2.2",
+ "angular-font-awesome": "3.1.2",
+ "angular2-notifications": "2.0.0",
+ "bootstrap": "4.4.1",
+ "classlist.js": "1.1.20150312",
"core-js": "3.2.1",
- "document-register-element": "^1.7.2",
- "font-awesome": "^4.7.0",
- "jquery": "^3.4.1",
+ "document-register-element": "1.14.3",
+ "font-awesome": "4.7.0",
+ "jquery": "3.4.1",
"leaflet": "1.5.1",
- "moment": "^2.24.0",
- "ngrx-forms": "^5.2.3",
- "npm": "^6.14.2",
- "npm-install-peers": "^1.2.1",
- "popper.js": "^1.16.0",
- "reselect": "^4.0.0",
- "rxjs": "^6.5.4",
- "rxjs-compat": "^6.5.4",
- "tslib": "^1.11.0",
- "web-animations-js": "^2.3.2",
- "zone.js": "^0.10.2"
+ "moment": "2.24.0",
+ "ngrx-forms": "5.2.3",
+ "npm": "6.14.4",
+ "npm-install-peers": "1.2.1",
+ "popper.js": "1.16.0",
+ "reselect": "4.0.0",
+ "rxjs": "6.5.4",
+ "rxjs-compat": "6.5.4",
+ "tslib": "1.11.1",
+ "web-animations-js": "2.3.2",
+ "zone.js": "0.10.3"
},
"devDependencies": {
- "@angular-devkit/build-angular": "^0.803.21",
- "@angular-devkit/build-ng-packagr": "~0.803.25",
- "@angular/cli": "^8.3.21",
- "@angular/compiler-cli": "^8.2.14",
+ "@angular-devkit/build-angular": "0.803.25",
+ "@angular-devkit/build-ng-packagr": "0.803.25",
+ "@angular/cli": "8.3.25",
+ "@angular/compiler-cli": "8.2.14",
"@types/jasmine": "3.4.0",
- "@types/node": "^12.12.28",
- "codelyzer": "^5.2.1",
+ "@types/node": "12.12.32",
+ "codelyzer": "5.2.2",
"concat": "1.0.3",
- "fs-extra": "^8.1.0",
- "http-server": "^0.12.1",
- "jasmine-core": "^3.5.0",
+ "fs-extra": "8.1.0",
+ "http-server": "0.12.1",
+ "jasmine-core": "3.5.0",
"json-concat": "0.0.1",
- "karma": "^4.4.1",
- "karma-chrome-launcher": "^3.1.0",
- "karma-cli": "^2.0.0",
- "karma-coverage-istanbul-reporter": "^2.1.1",
- "karma-jasmine": "^2.0.1",
- "karma-jasmine-html-reporter": "^1.5.1",
+ "karma": "4.4.1",
+ "karma-chrome-launcher": "3.1.0",
+ "karma-cli": "2.0.0",
+ "karma-coverage-istanbul-reporter": "2.1.1",
+ "karma-jasmine": "2.0.1",
+ "karma-jasmine-html-reporter": "1.5.3",
"karma-junit-reporter": "1.2.0",
- "ng-packagr": "^5.4.0",
- "protractor": "^5.1.1",
- "puppeteer": "^2.1.1",
- "sw-toolbox": "^3.6.0",
- "ts-node": "^8.5.4",
- "tsconfig-paths": "^3.9.0",
- "tsickle": "^0.37.0",
- "typescript": "~3.5.3",
+ "ng-packagr": "5.7.1",
+ "protractor": "5.4.3",
+ "puppeteer": "2.1.1",
+ "sw-toolbox": "3.6.0",
+ "ts-node": "8.8.1",
+ "tsconfig-paths": "3.9.0",
+ "tsickle": "0.37.1",
+ "typescript": "3.5.3",
"webdriver-manager": "12.1.6"
}
}
diff --git a/projects/grid-failure-information-app/src/app/app-routing.module.ts b/projects/grid-failure-information-app/src/app/app-routing.module.ts
index 2271841..b8d1ce6 100644
--- a/projects/grid-failure-information-app/src/app/app-routing.module.ts
+++ b/projects/grid-failure-information-app/src/app/app-routing.module.ts
@@ -15,15 +15,10 @@
import { PageNotFoundComponent } from '@grid-failure-information-app/shared/components/page-not-found/pageNotFound.component';
import { LogoutPageComponent } from '@grid-failure-information-app/pages/logout/logout/logout.component';
import { LoggedOutPageComponent } from '@grid-failure-information-app/pages/logout/logged-out/logged-out.component';
-import { ImportedGridFailureListComponent } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component';
const appRoutes: Routes = [
{ path: '', redirectTo: '/grid-failures', pathMatch: 'full' },
{
- path: 'imported-grid-failures',
- component: ImportedGridFailureListComponent,
- },
- {
path: 'logout',
component: LogoutPageComponent,
},
diff --git a/projects/grid-failure-information-app/src/app/app.module.ts b/projects/grid-failure-information-app/src/app/app.module.ts
index b966b31..4833eaa 100644
--- a/projects/grid-failure-information-app/src/app/app.module.ts
+++ b/projects/grid-failure-information-app/src/app/app.module.ts
@@ -28,7 +28,6 @@
//Feature Modules
import { GridFailureModule } from '@grid-failure-information-app/pages/grid-failure/grid-failure.module';
import { LogoutModule } from '@grid-failure-information-app/pages/logout/logout.module';
-import { ImportedGridFailureModule } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure.module';
// Store
import { reducers } from '@grid-failure-information-app/shared/store';
@@ -107,7 +106,6 @@
AppRoutingModule,
NgbModalModule,
LogoutModule,
- ImportedGridFailureModule,
],
providers: [
AdminGuard,
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts
index 65e09dc..1437f76 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.spec.ts
@@ -215,12 +215,6 @@
expect(service.showQualifyButton).toBeTruthy();
});
- it('should show qualify button state is scheduled', () => {
- const state = StateEnum.PLANNED;
- (service as any)._showButtonsByState(state);
- expect(service.showQualifyButton).toBeTruthy();
- });
-
it('should show storno button state is applied', () => {
const state = StateEnum.CREATED;
(service as any)._showButtonsByState(state);
@@ -233,12 +227,6 @@
expect(service.showStornoButton).toBeTruthy();
});
- it('should show storno button state is scheduled', () => {
- const state = StateEnum.PLANNED;
- (service as any)._showButtonsByState(state);
- expect(service.showStornoButton).toBeTruthy();
- });
-
it('should set the state in form to qualify and call save fuction', () => {
service.gridFailureInternalStates$ = { pipe: () => of({}), map: () => of({}) } as any;
spyOn(service.gridFailureInternalStates$, 'pipe').and.returnValue(of([{ status: StateEnum.QUALIFIED, id: '123' }]));
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
index d1d073a..2f9d56b 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
@@ -271,7 +271,6 @@
switch (state) {
case StateEnum.CREATED:
case StateEnum.UPDATED:
- case StateEnum.PLANNED:
this.showQualifyButton = true;
this.showStornoButton = true;
break;
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-api-client.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-api-client.ts
deleted file mode 100644
index dd6d777..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-api-client.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { Injectable } from '@angular/core';
-import { HttpService, GET, Adapter, DefaultHeaders } from '@grid-failure-information-app/shared/async-services/http';
-import { Observable } from 'rxjs';
-import { ImportData } from '@grid-failure-information-app/shared/models';
-import { ImportedGridFailureService } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure.service';
-
-@Injectable()
-@DefaultHeaders({
- Accept: 'application/json',
- 'Content-Type': 'application/json',
-})
-export class ImportedGridFailureApiClient extends HttpService {
- @GET('/import-data')
- @Adapter(ImportedGridFailureService.gridAdapter)
- public getImportedGridFailures(): Observable<ImportData[]> {
- return null;
- }
-}
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list-column-definition.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list-column-definition.ts
deleted file mode 100644
index 52827c6..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list-column-definition.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-export const IMPORTED_GRID_FAILURE_COLDEF = [
- {
- field: 'description',
- headerName: 'ImportedGridFailure.Description',
- sortable: true,
- filter: 'setFilterComponent',
- },
- {
- field: 'source',
- headerName: 'ImportedGridFailure.Source',
- sortable: true,
- filter: 'setFilterComponent',
- },
- {
- field: 'messageContent',
- headerName: 'ImportedGridFailure.MessageContent',
- sortable: true,
- filter: 'setFilterComponent',
- },
-];
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.html b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.html
deleted file mode 100644
index 5d242ad..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- /********************************************************************************
-* Copyright (c) 2020 Contributors to the Eclipse Foundation
-*
-* See the NOTICE file(s) distributed with this work for additional
-* information regarding copyright ownership.
-*
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v. 2.0 which is available at
-* http://www.eclipse.org/legal/epl-2.0.
-*
-* SPDX-License-Identifier: EPL-2.0
-********************************************************************************/ -->
-<app-card-layout>
- <div header>
- <div class="d-flex flex-row header">
- <span>{{ 'ImportedGridFailures.Title' | translate }}</span>
- </div>
- </div>
- <div class="grid-failures-grid-wrapper" body>
- <ag-grid-angular
- autoResizeColumns
- class="ag-theme-balham"
- [gridOptions]="gridOptions"
- [columnDefs]="columnDefinition"
- [rowSelection]="'single'"
- [frameworkComponents]="frameworkComponents"
- [rowData]="sandbox.importedGridFailureList$ | async"
- [overlayNoRowsTemplate]="noRowsTemplate"
- >
- </ag-grid-angular>
- <div class="row justify-content-between">
- <div>
- <button type="button" class="btn btn-primary cancel-button" id="cancel-btn" (click)="sandbox.cancel()">
- {{ 'CancelBtn' | translate }}
- </button>
- </div>
- </div>
- </div>
-</app-card-layout>
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.scss b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.scss
deleted file mode 100644
index 1363479..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-.grid-failures-grid-wrapper {
- position: relative;
- height: 100%;
-}
-
-.header {
- justify-content: space-between;
-}
-
-#cancel-btn {
- margin: 10px 0 0 16px;
-}
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.spec.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.spec.ts
deleted file mode 100644
index a37d4f2..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.spec.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { ImportedGridFailureListComponent } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component';
-import { ImportedGridFailureListSandbox } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox';
-
-describe('ImportedGridFailureListComponent ', () => {
- let component: ImportedGridFailureListComponent;
- let sandbox: ImportedGridFailureListSandbox;
-
- beforeEach(() => {
- sandbox = { loadImportedGridFailures() {} } as any;
- component = new ImportedGridFailureListComponent(sandbox);
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-
- it('should call appropriate functions for edit event', () => {
- const spy: any = spyOn(sandbox, 'loadImportedGridFailures');
- component.ngOnInit();
- expect(spy).toHaveBeenCalled();
- });
-});
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.ts
deleted file mode 100644
index 6083df7..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { Component, OnInit } from '@angular/core';
-import { IMPORTED_GRID_FAILURE_COLDEF } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list-column-definition';
-import { ImportedGridFailureListSandbox } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox';
-import { BaseList } from '@grid-failure-information-app/shared/components/base-components/base.list';
-import { SetFilterComponent } from '@grid-failure-information-app/shared/filters/ag-grid/set-filter/set-filter.component';
-
-@Component({
- selector: 'app-imported-grid-failure-list',
- templateUrl: './imported-grid-failure-list.component.html',
- styleUrls: ['./imported-grid-failure-list.component.scss'],
-})
-export class ImportedGridFailureListComponent extends BaseList implements OnInit {
- public columnDefinition: any = IMPORTED_GRID_FAILURE_COLDEF;
- public frameworkComponents: { setFilterComponent: any };
-
- constructor(public sandbox: ImportedGridFailureListSandbox) {
- super();
- this.frameworkComponents = { setFilterComponent: SetFilterComponent };
- }
-
- ngOnInit() {
- this.sandbox.loadImportedGridFailures();
- }
-}
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.spec.ts
deleted file mode 100644
index 30ef446..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.spec.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { Router } from '@angular/router';
-import { ImportedGridFailureListSandbox } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox';
-import { State } from '@grid-failure-information-app/shared/store';
-import { Store } from '@ngrx/store';
-import { of } from 'rxjs';
-import { ImportData } from '@grid-failure-information-app/shared/models';
-
-describe('ImportedGridFailureListSandbox', () => {
- let service: ImportedGridFailureListSandbox;
- let appState: Store<State>;
- let router: Router;
- let apiClient: any;
-
- beforeEach(() => {
- appState = { dispatch: () => {}, pipe: () => of(true), select: () => of(true) } as any;
- router = { navigateByUrl() {} } as any;
- apiClient = { getImportedGridFailures() {} } as any;
-
- service = new ImportedGridFailureListSandbox(appState, router, apiClient);
- });
-
- it('should create ImportedMessagesListSandbox service', () => {
- expect(service).toBeTruthy();
- });
-
- it('should load imported grid failures after calling loadImportedGridFailures()', () => {
- let spy = spyOn(apiClient, 'getImportedGridFailures').and.returnValue(of(new ImportData()));
- service.loadImportedGridFailures();
- expect(service.importedGridFailureList$).toBeDefined();
- expect(spy).toHaveBeenCalled();
- });
-
- it('should navigate to home after click cancel', () => {
- let spy = spyOn(router, 'navigateByUrl');
- service.cancel();
- expect(spy).toHaveBeenCalledWith('/grid-failures');
- });
-});
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.ts
deleted file mode 100644
index 4a22c2b..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { Injectable } from '@angular/core';
-import { Router } from '@angular/router';
-import { BaseSandbox } from '@grid-failure-information-app/shared/sandbox/base.sandbox';
-import * as store from '@grid-failure-information-app/shared/store';
-import { Store } from '@ngrx/store';
-import { Observable } from 'rxjs';
-import { ImportedGridFailureApiClient } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-api-client';
-import { navigateHome } from '@grid-failure-information-app/shared/utility';
-import { ImportData } from '@grid-failure-information-app/shared/models';
-
-@Injectable()
-export class ImportedGridFailureListSandbox extends BaseSandbox {
- public importedGridFailureList$: Observable<ImportData[]> = new Observable<ImportData[]>();
-
- constructor(protected appState$: Store<store.State>, private _router: Router, private _importedGridFailureApiClient: ImportedGridFailureApiClient) {
- super(appState$);
- }
-
- public loadImportedGridFailures(): void {
- this.importedGridFailureList$ = this._importedGridFailureApiClient.getImportedGridFailures();
- }
-
- public cancel(): void {
- navigateHome(this._router);
- }
-}
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.module.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.module.ts
deleted file mode 100644
index 522b139..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.module.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { RouterModule } from '@angular/router';
-import { ComponentsModule } from '@grid-failure-information-app/shared/components/components.module';
-import { TranslateModule } from '@ngx-translate/core';
-import { FormsModule } from '@angular/forms';
-import { DirectivesModule } from '@grid-failure-information-app/shared/directives/directives.module';
-import { ContainersModule } from '@grid-failure-information-app/shared/containers/containers.module';
-import { ImportedGridFailureListComponent } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.component';
-import { ImportedGridFailureListSandbox } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-list/imported-grid-failure-list.sandbox';
-import { ImportedGridFailureApiClient } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure-api-client';
-import { ImportedGridFailureService } from '@grid-failure-information-app/app/pages/imported-grid-failure/imported-grid-failure.service';
-import { AgGridModule } from 'ag-grid-angular';
-import { SetFilterComponent } from '@grid-failure-information-app/shared/filters/ag-grid/set-filter/set-filter.component';
-
-@NgModule({
- imports: [
- CommonModule,
- ComponentsModule,
- TranslateModule,
- DirectivesModule,
- RouterModule,
- FormsModule,
- ContainersModule,
- AgGridModule.withComponents([SetFilterComponent]),
- ],
- declarations: [ImportedGridFailureListComponent],
- providers: [ImportedGridFailureListSandbox, ImportedGridFailureApiClient, ImportedGridFailureService],
-})
-export class ImportedGridFailureModule {}
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.spec.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.spec.ts
deleted file mode 100644
index 18ca728..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.spec.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-
-import { ImportedGridFailureService } from './imported-grid-failure.service';
-import { ImportData } from '@grid-failure-information-app/shared/models';
-
-describe(' ImportedGridFailureService', () => {
- beforeEach(() => {});
-
- it('should transform list', () => {
- const response = [new ImportData()];
- response[0].id = 'X';
-
- expect(ImportedGridFailureService.gridAdapter(response)[0].id).toBe('X');
- });
-
- it('should transform details', () => {
- const response: any = { id: 'X' };
- const item = ImportedGridFailureService.itemAdapter(response);
-
- expect(item.id).toBe(response.id);
- });
-});
diff --git a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.ts b/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.ts
deleted file mode 100644
index 976c67a..0000000
--- a/projects/grid-failure-information-app/src/app/pages/imported-grid-failure/imported-grid-failure.service.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2020 Contributors to the Eclipse Foundation
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information regarding copyright ownership.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- ********************************************************************************/
-import { Injectable } from '@angular/core';
-import { ImportData } from '@grid-failure-information-app/shared/models';
-
-@Injectable()
-export class ImportedGridFailureService {
- static gridAdapter(response: any): Array<ImportData> {
- return response.map(responseItem => new ImportData(responseItem));
- }
-
- static itemAdapter(responseItem: any): ImportData {
- return new ImportData(responseItem);
- }
-}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html
index 2498de8..faf6ecd 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html
+++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html
@@ -26,9 +26,6 @@
<fa name="question-circle"></fa>
</a>
<span class="divider"></span>
- <a class="btn btn-link navbar-btn" (click)="navigateToImportedGridFailures()">
- <fa name="inbox"></fa>
- </a>
<div class="dropdown-open nav-user nav-overview-user">
<a class="btn btn-logout dropdown-toggle" style="min-width: 160px;" data-toggle="dropdown" href="#" aria-expanded="true">
{{ userName }}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts
index 671e6c8..05138f5 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts
@@ -32,12 +32,6 @@
expect(spy).toHaveBeenCalledWith('/grid-failures');
});
- it('should navigate to imported-grid-failures after call navigateToImportedGridFailures', () => {
- const spy = spyOn(router, 'navigateByUrl').and.returnValue({ then: () => of(true) });
- component.navigateToImportedGridFailures();
- expect(spy).toHaveBeenCalledWith('/imported-grid-failures');
- });
-
it('should navigate to logout after call navigateToLogout', () => {
const spy = spyOn(router, 'navigateByUrl').and.returnValue({ then: () => of(true) });
component.navigateToLogout();
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts
index 652b897..fa08727 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts
@@ -34,10 +34,6 @@
navigateHome(this.router).then(this._winLocReload);
}
- public navigateToImportedGridFailures(): void {
- this.router.navigateByUrl(`/imported-grid-failures`);
- }
-
public navigateToLogout(): void {
this.router.navigateByUrl(`/logout`);
}