Sha256: a30d5dd17f1284f78b4eb1d6be1dc1ec514b32e4d49c6686376565bf6313607f

Contents?: true

Size: 817 Bytes

Versions: 12

Compression:

Stored size: 817 Bytes

Contents

import consumer from "./consumer"

consumer.subscriptions.create({ channel: "ExportChannel" }, {
  connected() {
    // Called when the subscription is ready for use on the server
    console.log('Export Channel Connected');
  },

  disconnected() {
    // Called when the subscription has been terminated by the server
    console.log('Export Channel Disconnected');
  },

  received(data) {
    console.log('Export Channel Received');
    console.log(data);

    if (data['progress']) {
      console.log(data['progress']);
    }

    if (data['actions']) {
      for (let index = 0; index < data.actions.length; ++index) {
        var fnstring = data.actions[index].method;
        var fn = window["GBLADMIN"][fnstring];
        if (typeof fn === "function") fn(data.actions[index].payload);
      }
    }
  }
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
geoblacklight_admin-0.6.0 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.5.1 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.5.0 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.4.2 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.4.1 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.4.0 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.3.2 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.3.1 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.3.0 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.2.1 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.1.0 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js
geoblacklight_admin-0.0.1 lib/generators/geoblacklight_admin/templates/javascript/channels/export_channel.js