Skip to content

Commit

Permalink
Add Changelog entry, remove unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
vej-ananas committed Nov 20, 2024
1 parent 58f1aff commit ac29e10
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

### Changed

- Config is loaded from the frontend at runtime now.

### Fixed
14 changes: 7 additions & 7 deletions ui/src/api/client-config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export interface ClientConfig {
'env': 'dev' | 'int' | 'prod',
'ion_default_access_token': string,
'auth': {
'cognito_client_id': string,
'cognito_pool_id': string,
'cognito_identity_pool_id': string,
'cognito_aws_region': string,
env: 'dev' | 'int' | 'prod',
ion_default_access_token: string,
auth: {
cognito_client_id: string,
cognito_pool_id: string,
cognito_identity_pool_id: string,
cognito_aws_region: string,
}
}
2 changes: 0 additions & 2 deletions ui/src/api/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ export class ConfigService {
}

async getConfig(): Promise<ClientConfig | null> {
const headers = {};
try {
const response = await fetch(`${this.apiUrl}/client-config`, {
method: 'GET',
headers: headers,
});
return await response.json() as ClientConfig;
} catch (e) {
Expand Down
13 changes: 6 additions & 7 deletions ui/src/layers/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import {getSwisstopoImagery} from '../swisstopoImagery';
import {LayerType} from '../constants';
import {isLabelOutlineEnabled} from '../permalink';
// import AmazonS3Resource from '../AmazonS3Resource.js';
import AmazonS3Resource from '../AmazonS3Resource.js';
import {getVoxelShader} from './voxels-helper';
import MainStore from '../store/main';
import {LayerConfig} from '../layertree';
Expand Down Expand Up @@ -89,13 +89,12 @@ export async function create3DVoxelsTilesetFromConfig(viewer: Viewer, config: La
return primitive;
}
export async function create3DTilesetFromConfig(viewer: Viewer, config: LayerConfig, tileLoadCallback) {
let resource: string | IonResource; // | AmazonS3Resource
let resource: string | IonResource | AmazonS3Resource;
if (config.aws_s3_bucket && config.aws_s3_key) {
throw new Error('Amazon S3 resources is not implemented');
// resource = new AmazonS3Resource({
// bucket: config.aws_s3_bucket,
// url: config.aws_s3_key,
// });
resource = new AmazonS3Resource({
bucket: config.aws_s3_bucket,
url: config.aws_s3_key,
});
} else if (config.url) {
resource = config.url;
} else {
Expand Down

0 comments on commit ac29e10

Please sign in to comment.