X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/34a7e1ea48470ba540bc7d18de4836b0bb9197f8..0eb72b526bf8bbb011551ecf019f604e17a534f1:/apps/workbench/app/assets/javascripts/pipeline_instances.js diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js index e820ba978e..7570b2f8a5 100644 --- a/apps/workbench/app/assets/javascripts/pipeline_instances.js +++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js @@ -1,6 +1,10 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + 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 +48,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(); }); @@ -90,26 +105,6 @@ $(document).on('ready ajax:success', function() { }); }); -$(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){ - if (this != event.target) { - // Not interested in events sent to child nodes. - return; - } - var wasatbottom = ($(this).scrollTop() + $(this).height() >= this.scrollHeight); - - if (eventData.event_type == "stderr" || eventData.event_type == "stdout") { - if( eventData.prepend ) { - $(this).prepend(eventData.properties.text); - } else { - $(this).append(eventData.properties.text); - } - } - - if (wasatbottom) { - this.scrollTop = this.scrollHeight; - } -}); - // Set up all events for the pipeline instances compare button. (function() { var compare_form = '#compare';