瀏覽代碼

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"),
 
   finalStatusStyle: function() {
-    var style = "default";
     var finalStatus = this.get("finalStatus");
+    var style = "";
+
     if (finalStatus == "KILLED") {
       style = "warning";
     } else if (finalStatus == "FAILED") {
       style = "danger";
-    } else {
+    } else if (finalStatus == "SUCCEEDED") {
       style = "success";
+    } else {
+      style = "default";
     }
 
     return "label label-" + style;