浏览代码

YARN-5497. [YARN-3368] Use different color for Undefined and Succeeded for Final State in applications page. (Akhil P B Tan via Sunil G)

sunilg 8 年之前
父节点
当前提交
12ddbbc61d

+ 5 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/models/yarn-app.js

@@ -86,14 +86,17 @@ export default DS.Model.extend({
   }.property("progress"),
   }.property("progress"),
 
 
   finalStatusStyle: function() {
   finalStatusStyle: function() {
-    var style = "default";
     var finalStatus = this.get("finalStatus");
     var finalStatus = this.get("finalStatus");
+    var style = "";
+
     if (finalStatus == "KILLED") {
     if (finalStatus == "KILLED") {
       style = "warning";
       style = "warning";
     } else if (finalStatus == "FAILED") {
     } else if (finalStatus == "FAILED") {
       style = "danger";
       style = "danger";
-    } else {
+    } else if (finalStatus == "SUCCEEDED") {
       style = "success";
       style = "success";
+    } else {
+      style = "default";
     }
     }
 
 
     return "label label-" + style;
     return "label label-" + style;