浏览代码

HUE-8533 [importer] Properly displayed failed import progress bar as red and not orange

Romain Rigaux 7 年之前
父节点
当前提交
d1fef53
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      desktop/core/src/desktop/templates/ko_components/ko_history_panel.mako

+ 4 - 3
desktop/core/src/desktop/templates/ko_components/ko_history_panel.mako

@@ -55,10 +55,11 @@ from desktop.views import _ko
         <!-- ko if: progress -->
         <div class="snippet-progress-container">
           <div class="progress-snippet progress" data-bind="css: {
+                    'progress-danger': progress() == 0 && errors().length > 0 || status() == 'failed',
                     'progress-starting': progress() == 0 && status() == 'running',
-                    'progress-warning': progress() > 0 && progress() < 100,
-                    'progress-success': progress() == 100,
-                    'progress-danger': progress() == 0 && errors().length > 0}" style="background-color: #FFF; width: 100%">
+                    'progress-warning': progress() > 0 && progress() < 100 && status() != 'failed',
+                    'progress-success': progress() == 100
+                    }" style="background-color: #FFF; width: 100%">
             <div class="bar" data-bind="style: {'width': (errors().length > 0 ? 100 : Math.max(2, progress())) + '%'}"></div>
           </div>
         </div>