Navigation Menu

Skip to content

Commit

Permalink
fix(resource): reinit representationsToDisplay array to fix undefined…
Browse files Browse the repository at this point in the history
… issue in template (#813)
  • Loading branch information
mdelez committed Sep 5, 2022
1 parent c97c569 commit 375166a
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
22 changes: 22 additions & 0 deletions angular.json
Expand Up @@ -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": []
}
}
},
Expand All @@ -142,6 +158,9 @@
},
"ls-test-server": {
"browserTarget": "dsp-app:build:ls-test-server"
},
"staging-server": {
"browserTarget": "dsp-app:build:staging-server"
}
}
},
Expand Down Expand Up @@ -198,6 +217,9 @@
},
"ls-test-server": {
"devServerTarget": "dsp-app:serve:ls-test-server"
},
"staging-server": {
"devServerTarget": "dsp-app:serve:staging-server"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/app/workspace/resource/resource.component.ts
Expand Up @@ -550,6 +550,7 @@ export class ResourceComponent implements OnInit, OnChanges, OnDestroy {

} else {
this.loading = false;
this.representationsToDisplay = [];
}
},
(error: ApiResponseError) => {
Expand Down
29 changes: 29 additions & 0 deletions 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": ""
}
}
}
19 changes: 19 additions & 0 deletions 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.

0 comments on commit 375166a

Please sign in to comment.