[ARVADOS] updated: 38a55a1518838ea68cba69b4e8d1c27d2128328d
git at public.curoverse.com
git at public.curoverse.com
Thu Jun 5 16:31:21 EDT 2014
Summary of changes:
apps/workbench/app/assets/javascripts/event_log.js | 11 +++++++++--
apps/workbench/app/assets/javascripts/pipeline_instances.js | 9 ---------
2 files changed, 9 insertions(+), 11 deletions(-)
via 38a55a1518838ea68cba69b4e8d1c27d2128328d (commit)
from c4cfb4caca122ba09ab9153453650c308457e675 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 38a55a1518838ea68cba69b4e8d1c27d2128328d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jun 5 16:31:18 2014 -0400
2961: Removed spurious elementId from subscribeToEventLog(). Added arv-log-event-listener[data-object-type="xxxxx"] to
match on uuid types.
diff --git a/apps/workbench/app/assets/javascripts/event_log.js b/apps/workbench/app/assets/javascripts/event_log.js
index 0ebb999..6e0a47c 100644
--- a/apps/workbench/app/assets/javascripts/event_log.js
+++ b/apps/workbench/app/assets/javascripts/event_log.js
@@ -4,7 +4,7 @@
/* The subscribe method takes a window element id and object id.
Any log events for that particular object id are sent to that window element. */
-function subscribeToEventLog (elementId) {
+function subscribeToEventLog () {
// if websockets are not supported by browser, do not subscribe for events
websocketsSupported = ('WebSocket' in window);
if (websocketsSupported == false) {
@@ -40,6 +40,13 @@ function onEventLogDispatcherMessage(event) {
object_uuid = parsedData.object_uuid;
// if there are any listeners for this object uuid or "all", trigger the event
- matches = ".arv-log-event-listener[data-object-uuid=\"" + object_uuid + "\"],.arv-log-event-listener[data-object-uuids~=\"" + object_uuid + "\"],.arv-log-event-listener[data-object-uuid=\"all\"]";
+ matches = ".arv-log-event-listener[data-object-uuid=\"" + object_uuid + "\"],.arv-log-event-listener[data-object-uuids~=\"" + object_uuid + "\"],.arv-log-event-listener[data-object-uuid=\"all\"],.arv-log-event-listener[data-object-type=\"" + object_uuid.slice(6, 11) + "\"]";
$(matches).trigger('arv-log-event', event.data);
}
+
+$(document).on('ajax:complete ready', function() {
+ var a = $('.arv-log-event-listener');
+ if (a.length > 0) {
+ subscribeToEventLog();
+ }
+});
diff --git a/apps/workbench/app/assets/javascripts/pipeline_instances.js b/apps/workbench/app/assets/javascripts/pipeline_instances.js
index d23ced7..794585c 100644
--- a/apps/workbench/app/assets/javascripts/pipeline_instances.js
+++ b/apps/workbench/app/assets/javascripts/pipeline_instances.js
@@ -47,15 +47,6 @@ $(document).on('ready ajax:complete', function() {
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);
- });
- }
-});
-
$(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){
parsedData = JSON.parse(eventData);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list