Compare commits

..

No commits in common. "main" and "0.5.0-alpha.5" have entirely different histories.

18 changed files with 4295 additions and 3974 deletions

View file

@ -1,4 +1,3 @@
# Build: podman build -t code.philo.ydns.eu/philorg/gisaf-frontend -f Containerfile
FROM docker.io/library/nginx:alpine
EXPOSE 80

View file

@ -1,7 +1,31 @@
# Gisaf frontend
# GisafApp
The web app (front-end, user interface) for Gisaf,
a web based GIS initially developed for CSR Geomatics, Auroville.
This project was generated with [angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.24.
See the [Gisaf server repository](https://code.philo.ydns.eu/philorg/gisaf-backend)
for information about this project.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.
## Deploying to Github Pages
Run `ng github-pages:deploy` to deploy to Github Pages.
## Further help
To get more help on the `angular-cli` use `ng help` or go check out the [Angular-CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View file

@ -4,14 +4,14 @@ events {
http {
include /etc/nginx/mime.types;
upstream backend {
server gisaf-backend:8898 fail_timeout=0;
upstream aiohttp {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# Unix domain servers
# server unix:/tmp/backend-gisaf-1.sock fail_timeout=0;
# server unix:/tmp/aiohttp-gisaf-1.sock fail_timeout=0;
server 127.0.0.1:5000 fail_timeout=0;
}
map $http_upgrade $connection_upgrade {
@ -25,14 +25,14 @@ http {
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 8899;
gzip on;
gzip_types text/plain application/xml;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
server_name localhost;
charset utf-8;
client_max_body_size 4G;
@ -42,7 +42,7 @@ http {
location /tiles/ {
# proxy_pass http://localhost:8080/;
#proxy_pass http://127.0.0.1:3000/;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /api/ {
@ -50,11 +50,11 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /gj/live {
proxy_pass http://backend;
proxy_pass http://aiohttp;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
@ -74,7 +74,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /auth {
@ -83,7 +83,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
# location /admin {
@ -91,7 +91,7 @@ http {
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_http_version 1.1;
# proxy_buffering off;
# proxy_pass http://backend;
# proxy_pass http://aiohttp;
# }
location /import/ {
@ -99,7 +99,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /download/ {
@ -107,7 +107,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /upload/ {
@ -115,7 +115,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location /embed/ {
@ -123,7 +123,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://backend;
proxy_pass http://aiohttp;
}
location = /index.html {

View file

@ -12,12 +12,12 @@
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng serve --proxy-config proxy.conf.json --host 0.0.0.0 --watch",
"start": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng serve --proxy-config proxy.conf.json --watch",
"build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"openapi-ts": "openapi-ts -i http://127.0.0.1:5080/openapi.json -o src/app/openapi --client angular",
"openapi-ts": "openapi-ts -i http://127.0.0.1:5000/openapi.json -o src/app/openapi --client angular",
"source-map-explorer": "source-map-explorer dist/*.js",
"version": "echo \"{\\\"version\\\":\\\"$(git describe --tags --dirty --always)\\\"}\" > src/version.json"
},
@ -28,53 +28,54 @@
}
],
"dependencies": {
"@angular/animations": "^18.2.13",
"@angular/cdk": "^18.2.14",
"@angular/common": "^18.2.13",
"@angular/compiler": "^18.2.13",
"@angular/core": "^18.2.13",
"@angular/forms": "^18.2.13",
"@angular/material": "^18.2.14",
"@angular/platform-browser": "^18.2.13",
"@angular/platform-browser-dynamic": "^18.2.13",
"@angular/platform-server": "^18.2.13",
"@angular/router": "^18.2.13",
"@angular/animations": "^17.3.5",
"@angular/cdk": "^17.3.5",
"@angular/common": "^17.3.5",
"@angular/compiler": "^17.3.5",
"@angular/core": "^17.3.5",
"@angular/forms": "^17.3.5",
"@angular/material": "^17.3.5",
"@angular/platform-browser": "^17.3.5",
"@angular/platform-browser-dynamic": "^17.3.5",
"@angular/platform-server": "^17.3.5",
"@angular/router": "^17.3.5",
"@mapbox/point-geometry": "^0.1.0",
"@maplibre/ngx-maplibre-gl": "^18.1.4",
"@maplibre/ngx-maplibre-gl": "^17.4.3",
"@turf/bbox": "^7.1.0",
"@turf/distance": "^7.1.0",
"@turf/helpers": "^7.1.0",
"angular-plotly.js": "^5.2.2",
"maplibre-gl": "^4.7.1",
"ngx-flexible-layout": "~18.0.2",
"maplibre-gl": "^4.1.3",
"ngx-flexible-layout": "~17.0.4",
"plotly.js-basic-dist-min": "2.31.1",
"rxjs": "^7.8.1",
"ts-helpers": "^1.1.2",
"zone.js": "~0.14.10"
"zone.js": "~0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.12",
"@angular/cli": "^18.2.12",
"@angular/compiler-cli": "^18.2.13",
"@angular/language-service": "^18.2.13",
"@hey-api/openapi-ts": "^0.45.1",
"@types/geojson": "^7946.0.15",
"@types/jasmine": "~5.1.5",
"@angular-devkit/build-angular": "^17.3.5",
"@angular/cli": "^17.3.5",
"@angular/compiler-cli": "^17.3.5",
"@angular/language-service": "^17.3.5",
"@hey-api/openapi-ts": "^0.45",
"@types/geojson": "^7946.0.14",
"@types/jasmine": "~5.1.4",
"@types/jasminewd2": "^2.0.13",
"@types/node": "^20.17.10",
"@types/node": "^20.12.7",
"@types/plotly.js-dist-min": "^2.3.4",
"codelyzer": "^6.0.2",
"eslint": "^9.17.0",
"fontnik": "^0.7.2",
"jasmine-core": "~5.1.2",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.4",
"karma": "~6.4.3",
"karma-chrome-launcher": "~3.2.0",
"karma-cli": "^2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"source-map-explorer": "^2.5.3",
"ts-node": "^10.9.2",
"tslib": "^2.8.1",
"tslib": "^2.6.2",
"typescript": "~5.4.5"
},
"packageManager": "pnpm@9.15",

4744
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -7,7 +7,7 @@
"/docs",
"/api"
],
"target": "http://127.0.0.1:5080",
"target": "http://127.0.0.1:5000",
"secure": false,
"ws": true
},

View file

@ -2,7 +2,7 @@
<mat-toolbar fxFlex="2em" id='top-toolbar'>
<span
style='font-family:GisafSymbols'
matTooltip="Gisaf version: backend {{ version.backend }}, frontend {{ version.frontend }}"
matTooltip="Gisaf v. {{ (configService.conf | async).bsData?.version }}"
matTooltipPosition="below"
class='gisafIcon'
>

View file

@ -1,7 +1,5 @@
import {
Component, OnInit,
ChangeDetectionStrategy, ChangeDetectorRef
} from '@angular/core'
import { Component, OnInit,
ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core'
import { Title } from '@angular/platform-browser'
import { BootstrapService } from './_services/bootstrap.service'
import { ConfigService } from './_services/config.service'
@ -10,12 +8,6 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog'
import { AuthenticationService } from './_services/authentication.service'
import { LoginDialogComponent } from './login/login.component'
import versionJson from '../version.json'
export class Version {
public backend: string
public frontend: string
}
@Component({
selector: 'app-root',
@ -24,8 +16,8 @@ export class Version {
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent implements OnInit {
title: string = 'Gisaf'
version: Version = new Version()
title = 'Gisaf'
version: string
routes = [
{
@ -60,8 +52,7 @@ export class AppComponent implements OnInit {
// Bootstrap: set app wide configuration
this.bootstrapService.get().subscribe({
next: res => {
this.version.backend = res.version
this.version.frontend = versionJson["version"]
this.version = res.version
this.title = res.title || this.title
this.titleService.setTitle(res.windowTitle || this.title)
this.configService.setConf(res)

View file

@ -2,7 +2,7 @@ import { BrowserModule } from '@angular/platform-browser'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { NgModule, LOCALE_ID } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
import { HttpClientModule } from '@angular/common/http'
import { MatButtonModule } from '@angular/material/button'
import { MatIconModule } from '@angular/material/icon'
@ -32,26 +32,34 @@ import { HtmlSnackbarComponent } from './custom-snackbar/custom-snackbar.compone
import { AppRoutingModule } from './app-routing.module'
@NgModule({ declarations: [
@NgModule({
declarations: [
AppComponent,
PageNotFoundComponent,
HtmlSnackbarComponent,
],
bootstrap: [
AppComponent
], imports: [
imports: [
// ApolloModule,
BrowserModule,
BrowserAnimationsModule,
FormsModule,
HttpClientModule,
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatSnackBarModule,
MatTooltipModule,
FlexLayoutModule,
AppRoutingModule,
LoginModule], providers: [
LoginModule,
],
providers: [
ActionsService,
AuthenticationService,
BootstrapService,
@ -67,6 +75,9 @@ import { AppRoutingModule } from './app-routing.module'
provide: LOCALE_ID,
useValue: "en-IN"
},
provideHttpClient(withInterceptorsFromDi()),
] })
],
bootstrap: [
AppComponent
]
})
export class AppModule {}

View file

@ -1,7 +1,5 @@
import {
Component, OnInit, OnDestroy, Input, ViewChild, NgZone,
ChangeDetectionStrategy, ChangeDetectorRef, ElementRef
} from '@angular/core'
import { Component, OnInit, OnDestroy, Input, ViewChild, NgZone,
ChangeDetectionStrategy, ChangeDetectorRef, ElementRef } from '@angular/core'
import { ActivatedRoute, Params, Router } from '@angular/router'
import { Observable } from 'rxjs'
@ -10,11 +8,9 @@ import { WebSocketSubject } from 'rxjs/webSocket'
import { MatSnackBar } from '@angular/material/snack-bar'
import {
Map, MapMouseEvent, LayerSpecification,
import { Map, MapMouseEvent, LayerSpecification,
GeoJSONSourceSpecification, FitBoundsOptions,
ExpressionSpecification, Source, GeoJSONSource
} from 'maplibre-gl'
ExpressionSpecification, Source, GeoJSONSource } from 'maplibre-gl'
import Point from '@mapbox/point-geometry'
import * as bbox from '@turf/bbox'
@ -197,18 +193,9 @@ export class GisafMapboxComponent implements OnInit, OnDestroy {
}
_getNewSingleOpacity(layerId: string, originalOpacity: number | object): number | object {
if (originalOpacity === undefined) {
return undefined
}
else if (typeof originalOpacity === 'number') {
if (typeof(originalOpacity) === 'number') {
return originalOpacity * this._baseStyleOpacity
}
else if (typeof originalOpacity === 'object') { // Also matches array
if (originalOpacity[0] == 'interpolate') {
// Change the last interpolation point
originalOpacity[Object.values(originalOpacity).length - 1] = this._baseStyleOpacity
return originalOpacity
}
else {
let newOpacity = {}
for (const k in originalOpacity) {
@ -223,38 +210,28 @@ export class GisafMapboxComponent implements OnInit, OnDestroy {
return newOpacity
}
}
else {
console.log(`Cannot process opacity of layer ${layerId}, unknown type ${typeof originalOpacity}`)
return originalOpacity
}
}
_getNewOpacity(layer: object): object {
let originalStyle = this.originalBaseStyle.style['layers'].find(
(_layer: object) => layer['id'] == _layer['id']
)
let originalPaint = originalStyle['paint'] || {}
if (layer['type'] == 'symbol') {
let prop1 = 'text-opacity'
let prop2 = 'icon-opacity'
let newOpacity1 = this._getNewSingleOpacity(layer['id'], originalPaint[prop1] || 1.0)
let newOpacity2 = this._getNewSingleOpacity(layer['id'], originalPaint[prop2] || 1.0)
return {
[prop1]: newOpacity1,
[prop2]: newOpacity2,
if (!('paint' in originalStyle)) {
originalStyle['paint'] = {}
}
}
else if (layer['type'] == 'line') {
if (['raster', 'background', 'fill', 'line'].indexOf(layer['type']) != -1) {
let prop = layer['type'] + '-opacity'
return {
[prop]: this._getNewSingleOpacity(layer['id'], originalPaint[prop] || 1.0)
[prop]: this._getNewSingleOpacity(layer['id'], originalStyle['paint'][prop] || 1.0)
}
}
else {
// layer['type'] in ['raster', 'background', 'fill', 'line', 'fill-extrusion']
let prop = layer['type'] + '-opacity'
let prop1 = 'text-opacity'
let prop2 = 'icon-opacity'
let newOpacity1 = this._getNewSingleOpacity(layer['id'], originalStyle['paint'][prop1] || 1.0)
let newOpacity2 = this._getNewSingleOpacity(layer['id'], originalStyle['paint'][prop2] || 1.0)
return {
[prop]: this._getNewSingleOpacity(layer['id'], originalPaint[prop] || 1.0),
[prop1]: newOpacity1,
[prop2]: newOpacity2,
}
}
}
@ -266,12 +243,10 @@ export class GisafMapboxComponent implements OnInit, OnDestroy {
continue
}
for (const [key, value] of Object.entries(this._getNewOpacity(bsLayer))) {
if (value !== undefined) {
this.map.setPaintProperty(bsLayer.id, key, value)
}
}
}
}
/*
* For reference:

View file

@ -1,4 +1,6 @@
import { ElementRef, Input, ViewChild, Directive, HostListener, OutputRefSubscription } from '@angular/core'
import { ElementRef, Input, ViewChild, Directive, HostListener } from '@angular/core'
import { Subscription } from 'rxjs'
import { MatButton } from '@angular/material/button'
@ -39,7 +41,7 @@ export class GisafRulerDirective {
@Input() secondaryColor: string = 'white'
@Input() fontHalo: number = 2
@ViewChild(MatButton) button: MatButton
clickSubscription: OutputRefSubscription
clickSubscription: Subscription
lineDrawn: boolean
constructor(

View file

@ -90,7 +90,7 @@ export class MapDataService {
getBaseStyle(styleName: string): Observable<BaseStyle> {
return this.mapService.getBaseStyleApiMapBaseStyleNameGet({name: styleName}).pipe(map(
(data: OApiBaseStyle) => new BaseStyle(data.name, <any>data.style)
data => new BaseStyle(data.name, <any>data.style)
))
}

View file

@ -47,7 +47,7 @@ export const OpenAPI: OpenAPIConfig = {
PASSWORD: undefined,
TOKEN: undefined,
USERNAME: undefined,
VERSION: '0.6.0a0',
VERSION: '0.1.dev85+g41e92fa.d20240509',
WITH_CREDENTIALS: false,
interceptors: {
response: new Interceptors(),

View file

@ -259,26 +259,12 @@ export const $BaseStyle = {
title: 'Style'
},
mbtiles: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
type: 'string',
title: 'Mbtiles'
},
static_url: {
anyOf: [
{
type: 'string'
},
{
type: 'null'
}
],
title: 'Static Url'
static_tiles_url: {
type: 'string',
title: 'Static Tiles Url'
},
enabled: {
type: 'boolean',
@ -287,7 +273,7 @@ export const $BaseStyle = {
}
},
type: 'object',
required: ['name'],
required: ['name', 'style', 'mbtiles', 'static_tiles_url'],
title: 'BaseStyle'
} as const;
@ -325,6 +311,7 @@ export const $BasketDefault = {
title: 'Store'
}
},
additionalProperties: false,
type: 'object',
title: 'BasketDefault'
} as const;
@ -527,43 +514,52 @@ export const $BootstrapData = {
version: {
type: 'string',
title: 'Version',
default: '0.6.0a0'
default: '0.1.dev85+g41e92fa.d20240509'
},
title: {
type: 'string',
title: 'Title',
default: 'Gisaf'
default: 'Auroville Geomatics Studio (Me)'
},
windowTitle: {
type: 'string',
title: 'Windowtitle',
default: 'Gisaf'
default: 'AV Geomatics Studio (Me)'
},
map: {
'$ref': '#/components/schemas/Map',
allOf: [
{
'$ref': '#/components/schemas/Map'
}
],
default: {
tileServer: {
baseDir: '/home/phil/.local/share/gisaf/mbtiles_files_dir',
spriteBaseDir: '/home/phil/.local/share/gisaf/mbtiles_sprites_dir',
spriteBaseUrl: 'https://gisaf.example.org',
spriteUrl: '/tiles/sprite/sprite',
useRequestUrl: false
},
zoom: 14,
pitch: 45,
lat: 12,
lng: 79.8106,
attribution: '© Auroville CSR Geomatics',
bearing: 0,
style: 'OpenFreeMap',
opacity: 1,
attribution: '',
status: ['E', 'F', 'D'],
defaultStatus: ['E'],
tagKeys: ['source']
lat: 12.007,
lng: 79.8098,
opacity: 0.4,
pitch: 0,
status: ['E', 'F', 'D'],
style: 'No base map',
tagKeys: ['source'],
tileServer: {
baseDir: '/home/phil/gisaf_misc/map',
openMapTilesKey: 'cS3lrAfYXoM4MDooT6aS',
spriteBaseDir: '/home/phil/gisaf_misc/map/sprite',
spriteBaseUrl: 'https://gis.auroville.org.in',
spriteUrl: '/tiles/sprite/sprite',
useRequestUrl: true
},
zoom: 14
}
},
geo: {
'$ref': '#/components/schemas/Geo',
allOf: [
{
'$ref': '#/components/schemas/Geo'
}
],
default: {
raw_survey: {
spatial_sys_ref: {
@ -588,13 +584,19 @@ export const $BootstrapData = {
}
},
measures: {
'$ref': '#/components/schemas/Measures',
default: {}
allOf: [
{
'$ref': '#/components/schemas/Measures'
}
],
default: {
defaultStore: 'avsm_water.well'
}
},
redirect: {
type: 'string',
title: 'Redirect',
default: ''
default: 'http://gis.auroville.org.in'
},
user: {
anyOf: [
@ -1440,7 +1442,11 @@ export const $FormFieldInput = {
export const $Geo = {
properties: {
raw_survey: {
'$ref': '#/components/schemas/RawSurvey',
allOf: [
{
'$ref': '#/components/schemas/RawSurvey'
}
],
default: {
spatial_sys_ref: {
author: 'AVSM',
@ -1479,6 +1485,7 @@ export const $Geo = {
default: 32644
}
},
additionalProperties: false,
type: 'object',
title: 'Geo'
} as const;
@ -1561,13 +1568,17 @@ export const $LegendItem = {
export const $Map = {
properties: {
tileServer: {
'$ref': '#/components/schemas/TileServer',
allOf: [
{
'$ref': '#/components/schemas/TileServer'
}
],
default: {
baseDir: '/home/phil/.local/share/gisaf/mbtiles_files_dir',
useRequestUrl: false,
spriteBaseDir: '/home/phil/.local/share/gisaf/mbtiles_sprites_dir',
baseDir: '/path/to/mbtiles_files_dir',
spriteBaseDir: '/path/to/mbtiles_sprites_dir',
spriteBaseUrl: 'https://gisaf.example.org',
spriteUrl: '/tiles/sprite/sprite',
spriteBaseUrl: 'https://gisaf.example.org'
useRequestUrl: false
}
},
zoom: {
@ -1598,7 +1609,7 @@ export const $Map = {
style: {
type: 'string',
title: 'Style',
default: 'OpenFreeMap'
default: 'OSM (vector)'
},
opacity: {
type: 'number',
@ -1635,6 +1646,7 @@ export const $Map = {
default: ['source']
}
},
additionalProperties: false,
type: 'object',
title: 'Map'
} as const;
@ -1778,6 +1790,7 @@ export const $Measures = {
title: 'Defaultstore'
}
},
additionalProperties: false,
type: 'object',
title: 'Measures'
} as const;
@ -2096,7 +2109,11 @@ export const $Project = {
export const $RawSurvey = {
properties: {
spatial_sys_ref: {
'$ref': '#/components/schemas/SpatialSysRef',
allOf: [
{
'$ref': '#/components/schemas/SpatialSysRef'
}
],
default: {
author: 'AVSM',
ellps: 'WGS84',
@ -2117,6 +2134,7 @@ export const $RawSurvey = {
default: 910001
}
},
additionalProperties: false,
type: 'object',
title: 'RawSurvey'
} as const;
@ -2219,6 +2237,7 @@ export const $SpatialSysRef = {
default: 1328608.994
}
},
additionalProperties: false,
type: 'object',
title: 'SpatialSysRef'
} as const;
@ -2367,12 +2386,11 @@ export const $Store = {
},
z_index: {
type: 'integer',
title: 'Z Index',
default: 500
title: 'Z Index'
}
},
type: 'object',
required: ['name', 'auto_import', 'custom', 'description', 'gis_type', 'group', 'in_menu', 'is_db', 'is_line_work', 'is_live', 'long_name', 'type', 'minor_group_1', 'minor_group_2', 'status', 'style', 'symbol', 'title'],
required: ['name', 'auto_import', 'custom', 'description', 'gis_type', 'group', 'in_menu', 'is_db', 'is_line_work', 'is_live', 'long_name', 'type', 'minor_group_1', 'minor_group_2', 'status', 'style', 'symbol', 'title', 'viewable_role', 'z_index'],
title: 'Store'
} as const;
@ -2630,9 +2648,8 @@ export const $TileServer = {
properties: {
baseDir: {
type: 'string',
format: 'path',
title: 'Basedir',
default: '/home/phil/.local/share/gisaf/mbtiles_files_dir'
default: '/path/to/mbtiles_files_dir'
},
useRequestUrl: {
type: 'boolean',
@ -2641,9 +2658,8 @@ export const $TileServer = {
},
spriteBaseDir: {
type: 'string',
format: 'path',
title: 'Spritebasedir',
default: '/home/phil/.local/share/gisaf/mbtiles_sprites_dir'
default: '/path/to/mbtiles_sprites_dir'
},
spriteUrl: {
type: 'string',
@ -2667,6 +2683,7 @@ export const $TileServer = {
title: 'Openmaptileskey'
}
},
additionalProperties: false,
type: 'object',
title: 'TileServer'
} as const;

View file

@ -54,11 +54,11 @@ export type BaseMapWithStores = {
export type BaseStyle = {
id?: number | null;
name: string;
style?: {
style: {
[key: string]: unknown;
} | null;
mbtiles?: string | null;
static_url?: string | null;
mbtiles: string;
static_tiles_url: string;
enabled?: boolean;
};
@ -457,8 +457,8 @@ export type Store = {
style: string | null;
symbol: string | null;
title: string;
viewable_role?: string | null;
z_index?: number;
viewable_role: string | null;
z_index: number;
};
export type StoreNameOnly = {
@ -751,7 +751,9 @@ export type $OpenApiTs = {
};
'/api/token': {
post: {
req: LoginForAccessTokenApiTokenPostData;
req: {
formData: Body_login_for_access_token_api_token_post;
};
res: {
/**
* Successful Response
@ -868,7 +870,9 @@ export type $OpenApiTs = {
};
'/api/data-provider/{store}': {
get: {
req: GetModelListApiDataProviderStoreGetData;
req: {
store: string;
};
res: {
/**
* Successful Response
@ -887,7 +891,12 @@ export type $OpenApiTs = {
};
'/api/{store_name}/values/{value}': {
get: {
req: GetModelValuesApiStoreNameValuesValueGetData;
req: {
resample?: string | null;
storeName: string;
value: string;
where: string;
};
res: {
/**
* Successful Response
@ -948,7 +957,10 @@ export type $OpenApiTs = {
};
'/api/feature-info/{store}/{id}': {
get: {
req: GetFeatureInfoApiFeatureInfoStoreIdGetData;
req: {
id: string;
store: string;
};
res: {
/**
* Successful Response
@ -967,7 +979,9 @@ export type $OpenApiTs = {
};
'/api/model-info/{store}': {
get: {
req: GetModelInfoApiModelInfoStoreGetData;
req: {
store: string;
};
res: {
/**
* Successful Response
@ -986,7 +1000,11 @@ export type $OpenApiTs = {
};
'/api/plot-params/{store}': {
get: {
req: GetPlotParamsApiPlotParamsStoreGetData;
req: {
id: string;
store: string;
value: string;
};
res: {
/**
* Successful Response
@ -1019,7 +1037,9 @@ export type $OpenApiTs = {
};
'/api/execTagActions': {
post: {
req: ExecuteTagActionApiExecTagActionsPostData;
req: {
requestBody: Body_execute_tag_action_api_execTagActions_post;
};
res: {
/**
* Successful Response
@ -1038,7 +1058,12 @@ export type $OpenApiTs = {
};
'/api/gj/{store_name}': {
get: {
req: GetGeojsonApiGjStoreNameGetData;
req: {
ifNoneMatch?: string | null;
preserveTopology?: boolean | null;
simplify?: number | null;
storeName: unknown;
};
res: {
/**
* Successful Response
@ -1071,7 +1096,9 @@ export type $OpenApiTs = {
};
'/api/admin/basket/{name}': {
get: {
req: GetBasketApiAdminBasketNameGetData;
req: {
name: string;
};
res: {
/**
* Successful Response
@ -1090,7 +1117,14 @@ export type $OpenApiTs = {
};
'/api/admin/basket/upload/{name}': {
post: {
req: UploadBasketFileApiAdminBasketUploadNamePostData;
req: {
autoImport?: boolean;
equipmentId?: number | null;
formData: Body_upload_basket_file_api_admin_basket_upload__name__post;
name: string;
projectId?: number | null;
surveyorId?: number | null;
};
res: {
/**
* Successful Response
@ -1109,7 +1143,11 @@ export type $OpenApiTs = {
};
'/api/admin/basket/download/{name}/{file_id}/{file_name}': {
get: {
req: DownloadBasketFileApiAdminBasketDownloadNameFileIdFileNameGetData;
req: {
fileId: number;
fileName: string;
name: string;
};
res: {
/**
* Successful Response
@ -1128,7 +1166,11 @@ export type $OpenApiTs = {
};
'/api/admin/basket/import/{basket}/{file_id}': {
get: {
req: ImportBasketFileApiAdminBasketImportBasketFileIdGetData;
req: {
basket: string;
dryRun?: boolean;
fileId: number;
};
res: {
/**
* Successful Response
@ -1147,7 +1189,10 @@ export type $OpenApiTs = {
};
'/api/admin/basket/delete/{basket}/{file_id}': {
get: {
req: DeleteBasketFileApiAdminBasketDeleteBasketFileIdGetData;
req: {
basket: string;
fileId: number;
};
res: {
/**
* Successful Response
@ -1194,7 +1239,10 @@ export type $OpenApiTs = {
};
'/api/dashboard/page/{group}/{name}': {
get: {
req: GetDashboardPageApiDashboardPageGroupNameGetData;
req: {
group: string;
name: string;
};
res: {
/**
* Successful Response
@ -1223,7 +1271,9 @@ export type $OpenApiTs = {
};
'/api/map/base_style/{name}': {
get: {
req: GetBaseStyleApiMapBaseStyleNameGetData;
req: {
name: string;
};
res: {
/**
* Successful Response
@ -1238,7 +1288,9 @@ export type $OpenApiTs = {
};
'/api/map/layer_style/{store}': {
get: {
req: GetLayerStyleApiMapLayerStyleStoreGetData;
req: {
store: string;
};
res: {
/**
* Successful Response
@ -1253,7 +1305,12 @@ export type $OpenApiTs = {
};
'/api/download/csv/{store}/{model_id}/{value}/{resample}': {
get: {
req: DownloadCsvApiDownloadCsvStoreModelIdValueResampleGetData;
req: {
modelId: number;
resample: string;
store: string;
value: string;
};
res: {
/**
* Successful Response
@ -1272,7 +1329,11 @@ export type $OpenApiTs = {
};
'/api/download/geodata/{stores}': {
get: {
req: DownloadGeodataApiDownloadGeodataStoresGetData;
req: {
format?: string;
reproject?: boolean;
stores: string;
};
res: {
/**
* Successful Response
@ -1291,7 +1352,11 @@ export type $OpenApiTs = {
};
'/api/download/plugin/{name}/{store}/{id}': {
get: {
req: ExecuteActionApiDownloadPluginNameStoreIdGetData;
req: {
id: number;
name: string;
store: string;
};
res: {
/**
* Successful Response

View file

@ -1,3 +0,0 @@
{
"version": "0.0.0"
}

View file

@ -1,25 +1,24 @@
{
"compileOnSave": false,
"compilerOptions": {
"declaration": false,
"esModuleInterop": true,
"experimentalDecorators": true,
"importHelpers": true,
"lib": [
"es2019",
"dom",
"esnext.asynciterable"
],
"module": "es2020",
"moduleResolution": "node",
"resolveJsonModule": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"experimentalDecorators": true,
"target": "ES2022",
"typeRoots": [
"node_modules/@types",
"@types"
],
"lib": [
"es2019",
"dom",
"esnext.asynciterable"
],
"allowSyntheticDefaultImports": true,
"useDefineForClassFields": false
},
"angularCompilerOptions": {