diff --git a/angular.json b/angular.json index bae3a62750..b68734845b 100644 --- a/angular.json +++ b/angular.json @@ -122,6 +122,22 @@ "vendorChunk": false, "buildOptimizer": false, "budgets": [] + }, + "staging-server": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.staging-server.ts" + } + ], + "optimization": false, + "sourceMap": true, + "namedChunks": true, + "aot": true, + "extractLicenses": false, + "vendorChunk": false, + "buildOptimizer": false, + "budgets": [] } } }, @@ -142,6 +158,9 @@ }, "ls-test-server": { "browserTarget": "dsp-app:build:ls-test-server" + }, + "staging-server": { + "browserTarget": "dsp-app:build:staging-server" } } }, @@ -198,6 +217,9 @@ }, "ls-test-server": { "devServerTarget": "dsp-app:serve:ls-test-server" + }, + "staging-server": { + "devServerTarget": "dsp-app:serve:staging-server" } } } diff --git a/package.json b/package.json index 2606aacca9..48ef9b4151 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "start": "ng serve", "start-with-test-server": "ng serve --configuration test-server", "start-with-ls-test-server": "ng serve --configuration ls-test-server", + "start-with-staging-server": "ng serve --configuration staging-server", "lint-ci": "eslint --color -c .eslintrc.js --ext .ts ./src/app", "lint-local": "eslint --color --fix -c .eslintrc.js --ext .ts ./src/app", "e2e": "ng e2e", diff --git a/src/app/workspace/resource/resource.component.ts b/src/app/workspace/resource/resource.component.ts index ed41cb47f5..0420b6a87b 100644 --- a/src/app/workspace/resource/resource.component.ts +++ b/src/app/workspace/resource/resource.component.ts @@ -550,6 +550,7 @@ export class ResourceComponent implements OnInit, OnChanges, OnDestroy { } else { this.loading = false; + this.representationsToDisplay = []; } }, (error: ApiResponseError) => { diff --git a/src/config/config.staging-server.json b/src/config/config.staging-server.json new file mode 100644 index 0000000000..11c0d25965 --- /dev/null +++ b/src/config/config.staging-server.json @@ -0,0 +1,29 @@ +{ + "dspRelease": "2022.01.01", + "apiProtocol": "https", + "apiHost": "api.staging.dasch.swiss", + "apiPort": 443, + "apiPath": "", + "iiifProtocol": "https", + "iiifHost": "iiif.staging.dasch.swiss", + "iiifPort": 443, + "iiifPath": "", + "geonameToken": "knora", + "jsonWebToken": "", + "logErrors": true, + "iriBase": "http://rdfh.ch", + "instrumentation": { + "environment": "staging-server", + "dataDog": { + "enabled": false, + "applicationId": "", + "clientToken": "", + "site": "", + "service": "" + }, + "rollbar": { + "enabled": false, + "accessToken": "" + } + } + } \ No newline at end of file diff --git a/src/environments/environment.staging-server.ts b/src/environments/environment.staging-server.ts new file mode 100644 index 0000000000..32da042267 --- /dev/null +++ b/src/environments/environment.staging-server.ts @@ -0,0 +1,19 @@ +/* +* This file can be replaced during build by using the `fileReplacements` array. +* `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. +* The list of file replacements can be found in `angular.json`. +*/ + +export const environment = { + name: 'staging-server', + production: false +}; + +/* +* For easier debugging in development mode, you can import the following file +* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. +* +* This import should be commented out in production mode because it will have a negative impact +* on performance if an error is thrown. +*/ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. \ No newline at end of file