closes #9498
[arvados.git] / apps / workbench / app / assets / javascripts / pipeline_instances.js
index e820ba978ec3dddf07dcec83f08fb9573d6a7727..1617a929928689def96afdba4f3c5f8e3aa48767 100644 (file)
@@ -1,6 +1,6 @@
 function run_pipeline_button_state() {
     var a = $('a.editable.required.editable-empty,input.form-control.required[value=""]');
-    if (a.length > 0) {
+    if ((a.length > 0) || ($('.unreadable-inputs-present').length)) {
         $(".run-pipeline-button").addClass("disabled");
     }
     else {
@@ -44,6 +44,17 @@ $(document).on('ready ajax:complete', function() {
             $tag.parent().prev().css("background-color", "");
         }
     });
+    $('input.required').each(function() {
+        var $tag = $(this);
+        if ($tag.hasClass("unreadable-input")) {
+            $tag.parent().parent().css("background-color", "#ffdddd");
+            $tag.parent().parent().prev().css("background-color", "#ffdddd");
+        }
+        else {
+            $tag.parent().parent().css("background-color", "");
+            $tag.parent().parent().prev().css("background-color", "");
+        }
+    });
     run_pipeline_button_state();
 });
 
@@ -97,7 +108,7 @@ $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(e
     }
     var wasatbottom = ($(this).scrollTop() + $(this).height() >= this.scrollHeight);
 
-    if (eventData.event_type == "stderr" || eventData.event_type == "stdout") {
+    if (eventData.properties != null && eventData.properties.text != null) {
         if( eventData.prepend ) {
             $(this).prepend(eventData.properties.text);
         } else {