X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/35336cd73e444534cb2eda20e3730464cc4e6553..86a02fd0842381002c46b590d774c561dbbaf19a:/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 ee14e3b781..d66cffcae1 100644 --- a/apps/workbench/app/assets/javascripts/pipeline_instances.js +++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js @@ -1,4 +1,3 @@ - (function() { var run_pipeline_button_state = function() { var a = $('a.editable.required.editable-empty'); @@ -43,4 +42,32 @@ run_pipeline_button_state(); } ); + $(document).on('ajax:complete ready', function() { + var a = $('.arv-log-event-listener'); + if (a.length > 0) { + $('.arv-log-event-listener').each(function() { + subscribeToEventLog(this.id, this.getAttribute('data-object-uuid')); + }); + } + }); + + $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){ + parsedData = JSON.parse(eventData); + summary = parsedData.summary; + properties = parsedData.properties; + updatedProperties = null; + if (properties !== null) { + new_attributes = properties.new_attributes; + if (new_attributes !== null) { + updatedProperties = JSON.stringify(properties.new_attributes); + } + } + + if (updatedProperties !== null) { + $(this).append(updatedProperties + "

"); + } else { + $(this).append(summary + "

"); + } + }); + })();