tbouron commented on a change in pull request #241:
URL: https://github.com/apache/brooklyn-ui/pull/241#discussion_r666759479



##########
File path: ui-modules/blueprint-composer/app/components/quick-fix/quick-fix.js
##########
@@ -55,6 +55,31 @@ export function computeQuickFixes(blueprintService, 
allIssues) {
             computeQuickFixesForIssue(issue, issue.entity, blueprintService, 
v.quickFixes)
         });
     });
+
+    allIssues.warnings.byMessage = {};
+    Object.values(allIssues.warnings.byEntity).forEach(list => {
+        list.forEach(issue => {
+            let key = issue.group+":"+issue.ref+":"+issue.message;
+            let v = allIssues.warnings.byMessage[key];
+            if (!v) {
+                v = allIssues.warnings.byMessage[key] = {
+                    group: issue.group,
+                    ref: issue.ref,
+                    message: issue.message,
+                    issues: [],
+                    quickFixes: {},
+                };
+            }
+
+            let issueO = {
+                issue,
+                //quickFixes: {},
+            }
+            v.issues.push(issueO);
+
+            computeQuickFixesForIssue(issue, issue.entity, blueprintService, 
v.quickFixes)
+        });
+    });

Review comment:
       @algairim Yeah about that. This was the quickest and dirtiest way to 
make this work (the previous version supported only errors) 
   
   However, the way the quick fixes are implemented doesn't really follow the 
AngularJS best practices or "way". I plan du refactor that which would make 
this bit of code go away. That's why I didn't go for a DRY implementation just 
now.




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