tbouron commented on a change in pull request #140: Icons on app inspector
URL: https://github.com/apache/brooklyn-ui/pull/140#discussion_r324552645
##########
File path:
ui-modules/app-inspector/app/views/main/inspect/summary/summary.controller.js
##########
@@ -51,14 +51,14 @@ export function summaryController($scope, $state,
$stateParams, $q, $http, brSna
let observers = [];
entityApi.entity(applicationId, entityId).then((response)=> {
- vm.entity = response.data;
- vm.name = response.data.name;
- vm.error.entity = undefined;
- observers.push(response.subscribe((response)=> {
+ let set = (response) => {
vm.entity = response.data;
vm.name = response.data.name;
vm.error.entity = undefined;
- }));
+ iconService.get(response.data, true).then(value => vm.iconUrl =
value);
Review comment:
Should set the `entity.iconUrl` instead of adding this into the scope, so
the icon will be saved on the model which is propagated everywhere.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services