Fixes in info pane and others
This commit is contained in:
parent
adba349c38
commit
5f97c58b52
21 changed files with 232 additions and 145 deletions
src/app
|
@ -12,6 +12,7 @@ import { Tag, TagAction } from './info-tags/tags.service'
|
||||||
|
|
||||||
import { ConfigService } from '../config.service'
|
import { ConfigService } from '../config.service'
|
||||||
import { DataService } from '../_services/data.service'
|
import { DataService } from '../_services/data.service'
|
||||||
|
import { ApiService, ModelInfo, FeatureInfo } from '../openapi'
|
||||||
|
|
||||||
// const getModelInfoQuery = gql`
|
// const getModelInfoQuery = gql`
|
||||||
// query modelInfo ($store: String!) {
|
// query modelInfo ($store: String!) {
|
||||||
|
@ -302,12 +303,12 @@ export class ModelValue {
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Downloader {
|
// export class Downloader {
|
||||||
constructor(
|
// constructor(
|
||||||
public name: string,
|
// public name: string,
|
||||||
public icon: string,
|
// public icon: string,
|
||||||
) {}
|
// ) {}
|
||||||
}
|
// }
|
||||||
|
|
||||||
export class LegendItem {
|
export class LegendItem {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -316,34 +317,34 @@ export class LegendItem {
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ModelInfo {
|
// export class ModelInfo {
|
||||||
constructor(
|
// constructor(
|
||||||
public store: string,
|
// public store: string,
|
||||||
public modelName: string,
|
// public modelName: string,
|
||||||
public symbol: string,
|
// public symbol: string,
|
||||||
public values: ModelValue[],
|
// public values: ModelValue[],
|
||||||
public actions: ModelAction[],
|
// public actions: ModelAction[],
|
||||||
public formName: string,
|
// public formName: string,
|
||||||
public formFields: FormField[],
|
// public formFields: FormField[],
|
||||||
public tagPlugins: String[],
|
// public tagPlugins: String[],
|
||||||
public tagActions: TagAction[],
|
// public tagActions: TagAction[],
|
||||||
public downloaders: Downloader[],
|
// public downloaders: Downloader[],
|
||||||
public legend: LegendItem[],
|
// public legend: LegendItem[],
|
||||||
) {}
|
// ) {}
|
||||||
|
|
||||||
getFormFields(formGroup: UntypedFormGroup, fullInfo: FullInfo): object[] {
|
// getFormFields(formGroup: UntypedFormGroup, fullInfo: FullInfo): object[] {
|
||||||
// Return the form fields and build the FormGroup controls accordingly
|
// // Return the form fields and build the FormGroup controls accordingly
|
||||||
let formFields = []
|
// let formFields = []
|
||||||
fullInfo.modelInfo.formFields.forEach(
|
// fullInfo.modelInfo.formFields.forEach(
|
||||||
field => {
|
// field => {
|
||||||
let control = new UntypedFormControl(field.name) //, field.validator)
|
// let control = new UntypedFormControl(field.name) //, field.validator)
|
||||||
formGroup.addControl(field.name, control)
|
// formGroup.addControl(field.name, control)
|
||||||
formFields.push(field)
|
// formFields.push(field)
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
return formFields
|
// return formFields
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
export class PlotBaseLine {
|
export class PlotBaseLine {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -414,24 +415,24 @@ export class FeatureWithField {
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FeatureInfo {
|
// export class FeatureInfo {
|
||||||
constructor(
|
// constructor(
|
||||||
public id: string,
|
// public id: string,
|
||||||
public itemName: string,
|
// public itemName: string,
|
||||||
public geoInfoItems: InfoItem[],
|
// public geoInfoItems: InfoItem[],
|
||||||
public surveyInfoItems: InfoItem[],
|
// public surveyInfoItems: InfoItem[],
|
||||||
public infoItems: InfoItem[],
|
// public infoItems: InfoItem[],
|
||||||
public categorizedInfoItems: InfoCategory[],
|
// public categorizedInfoItems: InfoCategory[],
|
||||||
public tags: Tag[],
|
// public tags: Tag[],
|
||||||
public graph?: string,
|
// public graph?: string,
|
||||||
public files?: Attachment[],
|
// public files?: Attachment[],
|
||||||
public images?: Attachment[],
|
// public images?: Attachment[],
|
||||||
public externalRecordUrl?: string
|
// public externalRecordUrl?: string
|
||||||
) {}
|
// ) {}
|
||||||
openExternalRecord() {
|
// openExternalRecord() {
|
||||||
window.open(this.externalRecordUrl)
|
// window.open(this.externalRecordUrl)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
export class FullInfo {
|
export class FullInfo {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -448,9 +449,9 @@ export class FullInfo {
|
||||||
export class InfoDataService {
|
export class InfoDataService {
|
||||||
constructor(
|
constructor(
|
||||||
public configService: ConfigService,
|
public configService: ConfigService,
|
||||||
// private apollo: Apollo,
|
|
||||||
public mapControlService: MapControlService,
|
public mapControlService: MapControlService,
|
||||||
protected dataService: DataService,
|
protected dataService: DataService,
|
||||||
|
private api: ApiService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public refresh = new Subject<boolean>()
|
public refresh = new Subject<boolean>()
|
||||||
|
@ -467,6 +468,7 @@ export class InfoDataService {
|
||||||
public taggedLayers$ = this.taggedLayers.asObservable()
|
public taggedLayers$ = this.taggedLayers.asObservable()
|
||||||
|
|
||||||
getModelInfo(store: string): Observable<ModelInfo> {
|
getModelInfo(store: string): Observable<ModelInfo> {
|
||||||
|
return this.api.getModelInfoApiModelInfoStoreGet({store: store})
|
||||||
console.warn('Migrate Graphql')
|
console.warn('Migrate Graphql')
|
||||||
return observableOf()
|
return observableOf()
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
|
@ -586,8 +588,10 @@ export class InfoDataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getFeatureInfo(store: string, id: string): Observable<FeatureInfo> {
|
getFeatureInfo(store: string, id: string): Observable<FeatureInfo> {
|
||||||
console.warn('Migrate Graphql')
|
return this.api.getFeatureInfoApiFeatureInfoStoreIdGet({
|
||||||
return observableOf()
|
store: store,
|
||||||
|
id: id
|
||||||
|
})
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
// query: getFeatureInfoQuery,
|
// query: getFeatureInfoQuery,
|
||||||
// variables: {
|
// variables: {
|
||||||
|
@ -677,7 +681,8 @@ export class InfoDataService {
|
||||||
// tag can be FeatureTree, but circular dependencies:
|
// tag can be FeatureTree, but circular dependencies:
|
||||||
// import { FeatureTree } from './info-selection/info-selection-tags.component'
|
// import { FeatureTree } from './info-selection/info-selection-tags.component'
|
||||||
let variables: Object
|
let variables: Object
|
||||||
if (tag instanceof Tag) {
|
if (!tag.id) {
|
||||||
|
// A Tag, really
|
||||||
variables = {
|
variables = {
|
||||||
'store': fullInfo.modelInfo.store,
|
'store': fullInfo.modelInfo.store,
|
||||||
'id': fullInfo.featureInfo.id,
|
'id': fullInfo.featureInfo.id,
|
||||||
|
@ -727,9 +732,7 @@ export class InfoDataService {
|
||||||
feature['id'],
|
feature['id'],
|
||||||
feature['lon'],
|
feature['lon'],
|
||||||
feature['lat'],
|
feature['lat'],
|
||||||
feature['tags'].map(
|
feature['tags']
|
||||||
tag => new Tag(tag['key'], tag['value'])
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngIf="source.featureInfo.externalRecordUrl">
|
<tr *ngIf="source.featureInfo.externalRecordUrl">
|
||||||
<td>External link</td>
|
<td>External link</td>
|
||||||
<span class='link' (click)='source.featureInfo.openExternalRecord()'>{{ source.featureInfo.externalRecordUrl }}</span>
|
<a class='link' href='window.open(source.featureInfo.externalRecordUrl)' target="_blank">{{ source.featureInfo.externalRecordUrl }}</a>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class TagActionComponent {
|
||||||
this.infoDataService.dataProviderService.next(this.source)
|
this.infoDataService.dataProviderService.next(this.source)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.source.featureInfo.tags.push(new Tag(tag.key, tag.value))
|
this.source.featureInfo.tags.push({key: tag.key, value: tag.value})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -82,9 +82,7 @@ export class TagComponent implements OnInit {
|
||||||
delete() {
|
delete() {
|
||||||
this.infoDataService.deleteTag(this.tag, this.source).subscribe({
|
this.infoDataService.deleteTag(this.tag, this.source).subscribe({
|
||||||
next: res => {
|
next: res => {
|
||||||
const tags = res['data']['deleteTag']['tags'].map(
|
const tags = res['data']['deleteTag']['tags']
|
||||||
ii => new Tag(ii['key'], ii['value'])
|
|
||||||
)
|
|
||||||
this.source.featureInfo.tags = tags
|
this.source.featureInfo.tags = tags
|
||||||
this.infoDataService.dataProviderService.next(this.source)
|
this.infoDataService.dataProviderService.next(this.source)
|
||||||
this.mapControlService.search.next(true)
|
this.mapControlService.search.next(true)
|
||||||
|
|
|
@ -66,11 +66,9 @@ import { map } from 'rxjs/operators'
|
||||||
// }
|
// }
|
||||||
// `
|
// `
|
||||||
|
|
||||||
export class Tag {
|
export type Tag = {
|
||||||
constructor(
|
key: string
|
||||||
public key: string,
|
value: string
|
||||||
public value: string,
|
|
||||||
) {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TagAction {
|
export class TagAction {
|
||||||
|
|
|
@ -2,7 +2,8 @@ import { Component, Input, OnInit } from '@angular/core'
|
||||||
|
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar'
|
import { MatSnackBar } from '@angular/material/snack-bar'
|
||||||
|
|
||||||
import { FullInfo, Downloader } from '../info-data.service'
|
import { FullInfo } from '../info-data.service'
|
||||||
|
import { Downloader } from '../../openapi'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'gisaf-downloader',
|
selector: 'gisaf-downloader',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, Input, Output, EventEmitter } from '@angular/core'
|
import { Component, Input, Output, EventEmitter } from '@angular/core'
|
||||||
|
|
||||||
import { UntypedFormGroup, FormControl } from '@angular/forms'
|
import { UntypedFormGroup, UntypedFormControl } from '@angular/forms'
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar'
|
import { MatSnackBar } from '@angular/material/snack-bar'
|
||||||
|
|
||||||
import { DataService } from '../../_services/data.service'
|
import { DataService } from '../../_services/data.service'
|
||||||
|
@ -39,7 +39,7 @@ export class ToolsComponent {
|
||||||
(source: FullInfo) => {
|
(source: FullInfo) => {
|
||||||
this._source = source
|
this._source = source
|
||||||
this.formGroup = new UntypedFormGroup({})
|
this.formGroup = new UntypedFormGroup({})
|
||||||
source.modelInfo.getFormFields(this.formGroup, source)
|
this.getFormFields(this.formGroup, source)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
this.actionsService.actionsProviderService$.subscribe(
|
this.actionsService.actionsProviderService$.subscribe(
|
||||||
|
@ -52,6 +52,19 @@ export class ToolsComponent {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFormFields(formGroup: UntypedFormGroup, fullInfo: FullInfo): object[] {
|
||||||
|
// Return the form fields and build the FormGroup controls accordingly
|
||||||
|
let formFields = []
|
||||||
|
fullInfo.modelInfo.formFields.forEach(
|
||||||
|
field => {
|
||||||
|
let control = new UntypedFormControl(field.name) //, field.validator)
|
||||||
|
formGroup.addControl(field.name, control)
|
||||||
|
formFields.push(field)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return formFields
|
||||||
|
}
|
||||||
|
|
||||||
get isAuthorized() {
|
get isAuthorized() {
|
||||||
return this.authenticationService.user.value
|
return this.authenticationService.user.value
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
(input)="filter()"
|
(input)="filter()"
|
||||||
(keydown.enter)="mapControlService.zoomToFeatures()"
|
(keydown.enter)="mapControlService.zoomToFeatures()"
|
||||||
[(ngModel)]="searchText"/>
|
[(ngModel)]="searchText"/>
|
||||||
<button mat-button matSuffix mat-icon-button
|
<button matSuffix mat-icon-button
|
||||||
*ngIf="searchText"
|
*ngIf="searchText"
|
||||||
aria-label="Clear"
|
aria-label="Clear"
|
||||||
(click)="searchText='';filter()"
|
(click)="searchText='';filter()"
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { map } from 'rxjs/operators'
|
||||||
|
|
||||||
import { StyleSpecification } from 'maplibre-gl'
|
import { StyleSpecification } from 'maplibre-gl'
|
||||||
|
|
||||||
// import { TreeData, PrimaryGroupNode, LayerNode } from './models'
|
|
||||||
import { MapControlService } from './map-control.service'
|
import { MapControlService } from './map-control.service'
|
||||||
import { MapService, MapInitData, BaseMapWithStores, BaseStyle as OApiBaseStyle } from '../openapi'
|
import { MapService, MapInitData, BaseMapWithStores, BaseStyle as OApiBaseStyle } from '../openapi'
|
||||||
|
|
||||||
|
@ -15,12 +14,6 @@ export class BaseStyle {
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// export class Store {
|
|
||||||
// constructor(
|
|
||||||
// public name: string,
|
|
||||||
// ) {}
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MapDataService {
|
export class MapDataService {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -46,57 +39,6 @@ export class MapDataService {
|
||||||
return this.mapService.getInitDataApiMapInitDataGet().pipe(map(
|
return this.mapService.getInitDataApiMapInitDataGet().pipe(map(
|
||||||
data => this.mapInitData = data
|
data => this.mapInitData = data
|
||||||
))
|
))
|
||||||
// return this.apollo.query({
|
|
||||||
// query: mapInitDataQuery,
|
|
||||||
// ).pipe(map(
|
|
||||||
// mid => {
|
|
||||||
// this.mapInitData = mid
|
|
||||||
// const baseMaps = mid.baseMaps.map(
|
|
||||||
// bm => new BaseMap(
|
|
||||||
// bm.name,
|
|
||||||
// bm.stores.map(
|
|
||||||
// (store: object) => new Store(store['name'])
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// const baseStyles = mid.baseStyles.map(
|
|
||||||
// baseStyle => new BaseStyle(baseStyle.name)
|
|
||||||
// )
|
|
||||||
// const groups = mid.groups.map(
|
|
||||||
// gg => new PrimaryGroupNode(
|
|
||||||
// gg.name,
|
|
||||||
// gg.title,
|
|
||||||
// gg.description
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// const stores = mid.stores.map(
|
|
||||||
// layer => new LayerNode(
|
|
||||||
// layer['name'],
|
|
||||||
// layer['group'],
|
|
||||||
// layer['icon'],
|
|
||||||
// layer['symbol'] || gisTypeSymbolMap[layer['gisType']],
|
|
||||||
// layer['store'],
|
|
||||||
// layer['rawSurveyStore'],
|
|
||||||
// layer['type'],
|
|
||||||
// layer['gisType'],
|
|
||||||
// layer.style,
|
|
||||||
// layer['zIndex'],
|
|
||||||
// layer['count'],
|
|
||||||
// layer['description'],
|
|
||||||
// layer['live'],
|
|
||||||
// layer['custom'],
|
|
||||||
// layer['tagPlugins'],
|
|
||||||
// layer['viewableRole']
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// return new MapInitData(
|
|
||||||
// baseStyles,
|
|
||||||
// baseMaps,
|
|
||||||
// groups,
|
|
||||||
// stores,
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
// ))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// getBaseMaps(): Observable<BaseMap[]> {
|
// getBaseMaps(): Observable<BaseMap[]> {
|
||||||
|
@ -118,7 +60,7 @@ export class MapDataService {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public createBaseMap(baseMapName: string, stores: string[]): Observable<BaseMapWithStores> {
|
public createBaseMap(baseMapName: string, stores: string[]): Observable<BaseMapWithStores> {
|
||||||
console.log('TODO: createBaseMap')
|
console.log('TODO: Migrate Graphql createBaseMap')
|
||||||
return of({name: '', stores:[]})
|
return of({name: '', stores:[]})
|
||||||
// return this.apollo.mutate({
|
// return this.apollo.mutate({
|
||||||
// mutation: createBaseMapQuery,
|
// mutation: createBaseMapQuery,
|
||||||
|
@ -147,19 +89,9 @@ export class MapDataService {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
getBaseStyle(styleName: string): Observable<BaseStyle> {
|
getBaseStyle(styleName: string): Observable<BaseStyle> {
|
||||||
console.log('TODO: getBaseStyle')
|
|
||||||
return this.mapService.getBaseStyleApiMapBaseStyleNameGet({name: styleName}).pipe(map(
|
return this.mapService.getBaseStyleApiMapBaseStyleNameGet({name: styleName}).pipe(map(
|
||||||
data => new BaseStyle(data.name, <any>data.style)
|
data => new BaseStyle(data.name, <any>data.style)
|
||||||
))
|
))
|
||||||
// return this.apollo.query({
|
|
||||||
// query: baseStyleQuery,
|
|
||||||
// variables: {
|
|
||||||
// name: styleName
|
|
||||||
// }
|
|
||||||
// }).pipe(map(
|
|
||||||
// data => new BaseStyle(data['data']['base_style']['name'],
|
|
||||||
// JSON.parse(data['data']['base_style']['style']))
|
|
||||||
// ))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// getStores(): Observable<LayerNode[]> {
|
// getStores(): Observable<LayerNode[]> {
|
||||||
|
|
|
@ -21,17 +21,23 @@ export type { DashboardGroup } from './models/DashboardGroup';
|
||||||
export type { DashboardHome } from './models/DashboardHome';
|
export type { DashboardHome } from './models/DashboardHome';
|
||||||
export type { DashboardPage_ } from './models/DashboardPage_';
|
export type { DashboardPage_ } from './models/DashboardPage_';
|
||||||
export type { DataProvider } from './models/DataProvider';
|
export type { DataProvider } from './models/DataProvider';
|
||||||
|
export type { Downloader } from './models/Downloader';
|
||||||
export type { Equipment } from './models/Equipment';
|
export type { Equipment } from './models/Equipment';
|
||||||
export type { FeatureInfo } from './models/FeatureInfo';
|
export type { FeatureInfo } from './models/FeatureInfo';
|
||||||
export type { FileImport } from './models/FileImport';
|
export type { FileImport } from './models/FileImport';
|
||||||
|
export type { FormField } from './models/FormField';
|
||||||
export type { Geo } from './models/Geo';
|
export type { Geo } from './models/Geo';
|
||||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
export type { HTTPValidationError } from './models/HTTPValidationError';
|
||||||
export type { InfoCategory } from './models/InfoCategory';
|
export type { InfoCategory } from './models/InfoCategory';
|
||||||
export type { InfoItem } from './models/InfoItem';
|
export type { InfoItem } from './models/InfoItem';
|
||||||
|
export type { LegendItem } from './models/LegendItem';
|
||||||
export type { Map } from './models/Map';
|
export type { Map } from './models/Map';
|
||||||
export type { MapInitData } from './models/MapInitData';
|
export type { MapInitData } from './models/MapInitData';
|
||||||
export type { MaplibreStyle } from './models/MaplibreStyle';
|
export type { MaplibreStyle } from './models/MaplibreStyle';
|
||||||
export type { Measures } from './models/Measures';
|
export type { Measures } from './models/Measures';
|
||||||
|
export type { ModelAction } from './models/ModelAction';
|
||||||
|
export type { ModelInfo } from './models/ModelInfo';
|
||||||
|
export type { ModelValue } from './models/ModelValue';
|
||||||
export type { PlotBaseLine } from './models/PlotBaseLine';
|
export type { PlotBaseLine } from './models/PlotBaseLine';
|
||||||
export type { PlotBgShape } from './models/PlotBgShape';
|
export type { PlotBgShape } from './models/PlotBgShape';
|
||||||
export type { PlotParams } from './models/PlotParams';
|
export type { PlotParams } from './models/PlotParams';
|
||||||
|
@ -44,6 +50,9 @@ export type { Store } from './models/Store';
|
||||||
export type { StoreNameOnly } from './models/StoreNameOnly';
|
export type { StoreNameOnly } from './models/StoreNameOnly';
|
||||||
export type { SurveyMeta } from './models/SurveyMeta';
|
export type { SurveyMeta } from './models/SurveyMeta';
|
||||||
export type { Surveyor } from './models/Surveyor';
|
export type { Surveyor } from './models/Surveyor';
|
||||||
|
export type { Tag } from './models/Tag';
|
||||||
|
export type { TagAction } from './models/TagAction';
|
||||||
|
export type { TagActions } from './models/TagActions';
|
||||||
export type { TileServer } from './models/TileServer';
|
export type { TileServer } from './models/TileServer';
|
||||||
export type { Token } from './models/Token';
|
export type { Token } from './models/Token';
|
||||||
export type { UserRead } from './models/UserRead';
|
export type { UserRead } from './models/UserRead';
|
||||||
|
|
10
src/app/openapi/models/Downloader.ts
Normal file
10
src/app/openapi/models/Downloader.ts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type Downloader = {
|
||||||
|
roles?: Array<string>;
|
||||||
|
name: string;
|
||||||
|
icon?: (string | null);
|
||||||
|
};
|
||||||
|
|
|
@ -6,14 +6,15 @@ import type { Attachment } from './Attachment';
|
||||||
import type { InfoCategory } from './InfoCategory';
|
import type { InfoCategory } from './InfoCategory';
|
||||||
import type { InfoItem } from './InfoItem';
|
import type { InfoItem } from './InfoItem';
|
||||||
import type { PlotParams } from './PlotParams';
|
import type { PlotParams } from './PlotParams';
|
||||||
|
import type { Tag } from './Tag';
|
||||||
export type FeatureInfo = {
|
export type FeatureInfo = {
|
||||||
id: string;
|
id: string;
|
||||||
itemName: string;
|
itemName: string;
|
||||||
geoInfoItems?: Array<InfoItem>;
|
geoInfoItems?: Array<InfoItem>;
|
||||||
surveyInfoItems?: Array<InfoItem>;
|
surveyInfoItems?: Array<InfoItem>;
|
||||||
infoItems?: Array<InfoItem>;
|
infoItems?: Array<InfoItem>;
|
||||||
categorizedInfoItems?: Array<InfoCategory>;
|
categorizedInfoItems?: (Array<InfoCategory> | null);
|
||||||
tags?: Array<InfoItem>;
|
tags?: Array<Tag>;
|
||||||
graph?: (string | null);
|
graph?: (string | null);
|
||||||
plotParams?: (PlotParams | null);
|
plotParams?: (PlotParams | null);
|
||||||
files?: Array<Attachment>;
|
files?: Array<Attachment>;
|
||||||
|
|
11
src/app/openapi/models/FormField.ts
Normal file
11
src/app/openapi/models/FormField.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type FormField = {
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
dflt?: (string | null);
|
||||||
|
value?: (string | null);
|
||||||
|
};
|
||||||
|
|
9
src/app/openapi/models/LegendItem.ts
Normal file
9
src/app/openapi/models/LegendItem.ts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type LegendItem = {
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
11
src/app/openapi/models/ModelAction.ts
Normal file
11
src/app/openapi/models/ModelAction.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { FormField } from './FormField';
|
||||||
|
export type ModelAction = {
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
formFields: Array<FormField>;
|
||||||
|
};
|
||||||
|
|
24
src/app/openapi/models/ModelInfo.ts
Normal file
24
src/app/openapi/models/ModelInfo.ts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { Downloader } from './Downloader';
|
||||||
|
import type { FormField } from './FormField';
|
||||||
|
import type { LegendItem } from './LegendItem';
|
||||||
|
import type { ModelAction } from './ModelAction';
|
||||||
|
import type { ModelValue } from './ModelValue';
|
||||||
|
import type { TagActions } from './TagActions';
|
||||||
|
export type ModelInfo = {
|
||||||
|
store: string;
|
||||||
|
modelName: string;
|
||||||
|
symbol?: (string | null);
|
||||||
|
values?: Array<ModelValue>;
|
||||||
|
actions?: Array<ModelAction>;
|
||||||
|
formName?: (string | null);
|
||||||
|
formFields?: Array<FormField>;
|
||||||
|
tagPlugins?: Array<string>;
|
||||||
|
tagActions?: Array<TagActions>;
|
||||||
|
downloaders?: Array<Downloader>;
|
||||||
|
legend?: Array<LegendItem>;
|
||||||
|
};
|
||||||
|
|
12
src/app/openapi/models/ModelValue.ts
Normal file
12
src/app/openapi/models/ModelValue.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type ModelValue = {
|
||||||
|
name: string;
|
||||||
|
title: string;
|
||||||
|
unit: string;
|
||||||
|
chartType?: string;
|
||||||
|
chartColor?: string;
|
||||||
|
};
|
||||||
|
|
9
src/app/openapi/models/Tag.ts
Normal file
9
src/app/openapi/models/Tag.ts
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type Tag = {
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
12
src/app/openapi/models/TagAction.ts
Normal file
12
src/app/openapi/models/TagAction.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
export type TagAction = {
|
||||||
|
name: string;
|
||||||
|
action: string;
|
||||||
|
roles?: (Array<string> | null);
|
||||||
|
link?: (string | null);
|
||||||
|
save?: boolean;
|
||||||
|
};
|
||||||
|
|
11
src/app/openapi/models/TagActions.ts
Normal file
11
src/app/openapi/models/TagActions.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
/* generated using openapi-typescript-codegen -- do no edit */
|
||||||
|
/* istanbul ignore file */
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
import type { TagAction } from './TagAction';
|
||||||
|
export type TagActions = {
|
||||||
|
domain: string;
|
||||||
|
key: string;
|
||||||
|
actions: Array<TagAction>;
|
||||||
|
};
|
||||||
|
|
|
@ -10,6 +10,7 @@ import type { BootstrapData } from '../models/BootstrapData';
|
||||||
import type { CategoryRead } from '../models/CategoryRead';
|
import type { CategoryRead } from '../models/CategoryRead';
|
||||||
import type { DataProvider } from '../models/DataProvider';
|
import type { DataProvider } from '../models/DataProvider';
|
||||||
import type { FeatureInfo } from '../models/FeatureInfo';
|
import type { FeatureInfo } from '../models/FeatureInfo';
|
||||||
|
import type { ModelInfo } from '../models/ModelInfo';
|
||||||
import type { Project } from '../models/Project';
|
import type { Project } from '../models/Project';
|
||||||
import type { RoleRead } from '../models/RoleRead';
|
import type { RoleRead } from '../models/RoleRead';
|
||||||
import type { Store } from '../models/Store';
|
import type { Store } from '../models/Store';
|
||||||
|
@ -190,7 +191,7 @@ export class ApiService {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get Feature Info
|
* Get Feature Info
|
||||||
* @returns FeatureInfo Successful Response
|
* @returns any Successful Response
|
||||||
* @throws ApiError
|
* @throws ApiError
|
||||||
*/
|
*/
|
||||||
public getFeatureInfoApiFeatureInfoStoreIdGet({
|
public getFeatureInfoApiFeatureInfoStoreIdGet({
|
||||||
|
@ -199,7 +200,7 @@ export class ApiService {
|
||||||
}: {
|
}: {
|
||||||
store: string,
|
store: string,
|
||||||
id: string,
|
id: string,
|
||||||
}): Observable<FeatureInfo> {
|
}): Observable<(FeatureInfo | null)> {
|
||||||
return __request(OpenAPI, this.http, {
|
return __request(OpenAPI, this.http, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/api/feature-info/{store}/{id}',
|
url: '/api/feature-info/{store}/{id}',
|
||||||
|
@ -213,4 +214,26 @@ export class ApiService {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Get Model Info
|
||||||
|
* @returns ModelInfo Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getModelInfoApiModelInfoStoreGet({
|
||||||
|
store,
|
||||||
|
}: {
|
||||||
|
store: string,
|
||||||
|
}): Observable<ModelInfo> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/model-info/{store}',
|
||||||
|
path: {
|
||||||
|
'store': store,
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue