diff --git a/src/app/_services/actions.service.ts b/src/app/_services/actions.service.ts index 5c50b6f..2002409 100644 --- a/src/app/_services/actions.service.ts +++ b/src/app/_services/actions.service.ts @@ -7,6 +7,7 @@ import { map } from 'rxjs/operators' import { Tag } from '../info/info-tags/tags.service' import { TaggedLayer, TaggedFeature, FormFieldInput } from '../info/info-data.service' +import { ApiService, ActionsStore, ActionResults } from '../openapi' export class ActionParam { constructor( @@ -24,12 +25,12 @@ export class Action { ) {} } -export class ActionsStore { - constructor( - public store: string, - public actions: Action[], - ) {} -} +// export class ActionsStore { +// constructor( +// public store: string, +// public actions: Action[], +// ) {} +// } export class ActionResult { constructor( @@ -39,13 +40,13 @@ export class ActionResult { ) {} } -export class ActionResults { - constructor( - public name: string, - public message: string, - public actionResults: ActionResult[], - ) {} -} +// export class ActionResults { +// constructor( +// public name: string, +// public message: string, +// public actionResults: ActionResult[], +// ) {} +// } export class ActionsResults { constructor( @@ -137,7 +138,7 @@ export class ActionsService { public actionsProviderService$ = this.actionsProviderService.asObservable() constructor( - // private apollo: Apollo, + private apiService: ApiService, ) { this.getTagsActionsStores().subscribe( actionsStores => { @@ -147,8 +148,7 @@ export class ActionsService { } public getTagsActionsStores(): Observable { - console.warn('Migrate Graphql') - return observableOf() + return this.apiService.getActionsApiActionsGet() // return this.apollo.query({ // query: getTagsActionsQuery, // }).pipe(map( @@ -183,18 +183,14 @@ export class ActionsService { actionNames: string[], params: ActionParam[], formFields?: FormFieldInput[] - ): Observable { - console.warn('Migrate Graphql') - return observableOf() - // return this.apollo.mutate({ - // mutation: executeTagsActionsQuery, - // variables: { - // stores: stores, - // ids: ids, - // names: actionNames, - // params: params, - // formFields: formFields - // } + ): Observable { + return this.apiService.executeTagActionApiExecTagActionActionPost({ + "stores": stores, + "ids": ids, + "actionNames": actionNames, + "params": params, + "formFields": formFields + }) // }).pipe(map( // result => result['data']['executeAction']['result'].map( // res => new ActionsResults( diff --git a/src/app/info/info-tools/tools.component.html b/src/app/info/info-tools/tools.component.html index 55cdb9c..ea85513 100644 --- a/src/app/info/info-tools/tools.component.html +++ b/src/app/info/info-tools/tools.component.html @@ -1,5 +1,6 @@ - + {{ action.icon }} diff --git a/src/app/map/controls/map-controls.component.html b/src/app/map/controls/map-controls.component.html index fa49215..633e349 100644 --- a/src/app/map/controls/map-controls.component.html +++ b/src/app/map/controls/map-controls.component.html @@ -162,7 +162,7 @@ Download Shapefiles of selected layers (EPSG {{ (configService.conf | async).bsData?.geo.srid }}) [Deprecated: use Geopackage] -