jathanasiou commented on a change in pull request #228:
URL: https://github.com/apache/brooklyn-ui/pull/228#discussion_r669833866



##########
File path: ui-modules/home/app/views/about/about.controller.js
##########
@@ -55,17 +61,141 @@ export function aboutStateConfig($stateProvider) {
     $stateProvider.state(aboutState);
 }
 
-export function aboutStateController($scope, brBrandInfo, version, states) {
+export function aboutStateController($scope, $element, $q, $uibModal, 
brBrandInfo, version, states, serverApi) {
     $scope.$emit(HIDE_INTERSTITIAL_SPINNER_EVENT);
     $scope.getBrandedText = brBrandInfo.getBrandedText;
-
     $scope.serverVersion = version.data;
-    this.states = states.data;
-    this.buildInfo = {
+    $scope.states = states.data;
+    $scope.buildInfo = {
         buildVersion: BUILD_VERSION,
         buildName: BUILD_NAME,
         buildBranch: BUILD_BRANCH,
         buildCommitId: BUILD_COMMIT_ID,
         brooklynVersion: BROOKLYN_VERSION,
     };
+
+    $scope.container = $element[0];
+    $scope.now = Date.now();
+    $scope.expectedNodeCounter = Object.keys($scope.states.nodes).length;
+    $scope.template = 'haStatusTemplate';
+
+    let modalInstance = null;
+
+    $scope.openDialog = function (states, container) {
+        if (!modalInstance) {
+            modalInstance = $uibModal.open({
+                template: nodeManagementTemplate,
+                controller: ['$scope', '$uibModalInstance', 'node', 
nodeManagementModalController],
+                controllerAs: 'vm',
+                backdrop: 'static',
+                windowClass: 'quick-launch-modal',
+                size: 'md',
+                resolve: {
+                    node: function () {
+                        return states.nodes[states.ownId];
+                    }
+                }
+            });
+            modalInstance.result.then(
+                (promiseList) => {
+                    $scope.template = 'spinnerTemplate';
+                    Promise.allSettled(promiseList).then((values) => {
+                        let event = new CustomEvent('update-states', {});

Review comment:
       variable declarations aren't great for memory. If they don't add 
valuable clarity it might be better to be concise like
   ```
   container.dispatchEvent(new CustomEvent('update-states', {}));
   ```




-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to