From 7516e98c9ec031d29975e616ced989d6832b74b4 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 20 Jun 2018 19:52:46 +0100 Subject: [PATCH] migrate to adf debug app config --- src/app/app.module.ts | 5 +-- .../services/hybrid-app-config.service.ts | 37 ------------------- 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 src/app/common/services/hybrid-app-config.service.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d3b59831a..d7fe07e74 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,7 +28,7 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, PageTitleService } from '@alfresco/adf-core'; +import { TRANSLATION_PROVIDER, CoreModule, AppConfigService, PageTitleService, DebugAppConfigService } from '@alfresco/adf-core'; import { ContentModule } from '@alfresco/adf-content-services'; import { ElectronModule } from '@ngstack/electron'; @@ -68,7 +68,6 @@ import { NodeActionsService } from './common/services/node-actions.service'; import { NodePermissionService } from './common/services/node-permission.service'; import { SearchComponent } from './components/search/search.component'; import { SettingsComponent } from './components/settings/settings.component'; -import { HybridAppConfigService } from './common/services/hybrid-app-config.service'; import { PageTitleService as AcaPageTitleService } from './common/services/page-title.service'; import { ProfileResolver } from './common/services/profile.resolver'; @@ -137,7 +136,7 @@ import { MaterialModule } from './material.module'; ], providers: [ { provide: PageTitleService, useClass: AcaPageTitleService }, - { provide: AppConfigService, useClass: HybridAppConfigService }, + { provide: AppConfigService, useClass: DebugAppConfigService }, { provide: TRANSLATION_PROVIDER, multi: true, diff --git a/src/app/common/services/hybrid-app-config.service.ts b/src/app/common/services/hybrid-app-config.service.ts deleted file mode 100644 index 9aa53e017..000000000 --- a/src/app/common/services/hybrid-app-config.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * @license - * Copyright 2016 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { AppConfigService, StorageService } from '@alfresco/adf-core'; - -@Injectable() -export class HybridAppConfigService extends AppConfigService { - - constructor(private storage: StorageService, http: HttpClient) { - super(http); - } - - /** @override */ - get(key: string, defaultValue?: T): T { - if (key === 'ecmHost' || key === 'bpmHost') { - return ( this.storage.getItem(key) || super.get(key)); - } - return super.get(key, defaultValue); - } - -}