Bläddra i källkod

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

Romain Rigaux 7 år sedan
förälder
incheckning
d1fef53e1b

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