Merge pull request #1 from zaro0508/red-for-cycles

zuul dependency cycle indicator
diff --git a/src/main/java/com/googlesource/gerrit/plugins/chound/client/LabelPanel.java b/src/main/java/com/googlesource/gerrit/plugins/chound/client/LabelPanel.java
index 5a49614..a0c0364 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/chound/client/LabelPanel.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/chound/client/LabelPanel.java
@@ -36,6 +36,8 @@
     }
   }
 
+  private final static String COLOR_RED = "#F00";
+
   LabelPanel(final Panel panel) {
     final ChangeInfo change =
         panel.getObject(GerritUiExtensionPoint.Key.CHANGE_INFO).cast();
@@ -72,7 +74,11 @@
       Label label = new Label("Depends-on");
       label.setWidth("72px");
       p.add(label);
-      p.add(new CopyableLabel(result.dependsOn().get(i)));
+      CopyableLabel cl = new CopyableLabel(result.dependsOn().get(i));
+      if (result.cycle()) {
+        cl.getElement().getStyle().setColor(COLOR_RED);
+      }
+      p.add(cl);
       grid.insertRow(row);
       grid.setWidget(row, 0, p);
       row++;
@@ -84,7 +90,11 @@
       Label label = new Label("Needed-by");
       label.setWidth("72px");
       p.add(label);
-      p.add(new CopyableLabel(result.neededBy().get(i)));
+      CopyableLabel cl = new CopyableLabel(result.neededBy().get(i));
+      if (result.cycle()) {
+        cl.getElement().getStyle().setColor(COLOR_RED);
+      }
+      p.add(cl);
       grid.insertRow(row);
       grid.setWidget(row, 0, p);
       row++;