Added a new LocalStorageUtil and using the setConfigMethod to set the local storage variables (#4575)

* added a new LocalStorageUtil and using the setConfigMethod to set the localstorage variables, instead of using hte settings ui page.

* linting fix

* fixing import paths

* update new path LocalStorageUtil

* fix problems after rebase

* fix async loadin and clear

* local storage fix

* fix lint

* fix cs tests

* fix tag navigation and rename file appNavigation to processTabNavigation

* fix lint

* fix process test

* fix lint

Signed-off-by: Eugenio Romano <eugenio.romano@alfresco.com>

* fix start process cloud

* inc timeout
This commit is contained in:
gmandakini
2019-04-21 23:42:59 +01:00
committed by Eugenio Romano
parent 97ad54a4f8
commit e85b57876e
69 changed files with 369 additions and 351 deletions

View File

@@ -17,12 +17,16 @@
import { Injectable } from '@angular/core';
import { AppConfigService } from '../app-config/app-config.service';
import { AlfrescoApiService } from '../services/alfresco-api.service';
import { StorageService } from './storage.service';
@Injectable({
providedIn: 'root'
})
export class CoreAutomationService {
constructor(private appConfigService: AppConfigService) {
constructor(private appConfigService: AppConfigService,
private alfrescoApiService: AlfrescoApiService,
private storageService: StorageService) {
}
setup() {
@@ -32,6 +36,18 @@ export class CoreAutomationService {
this.appConfigService.config[field] = JSON.parse(value);
};
adfProxy.setStorageItem = (key: string, data: string) => {
this.storageService.setItem(key, data);
};
adfProxy.clearStorage = () => {
this.storageService.clear();
};
adfProxy.apiReset = () => {
this.alfrescoApiService.reset();
};
window['adf'] = adfProxy;
}
}