Sha256: 2d989556292fe637cc4f691848f5c929091b2b17d7d134118f9017d2dab2ecc3

Contents?: true

Size: 851 Bytes

Versions: 7

Compression:

Stored size: 851 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("GBL Admin - ExportChannel connected");
  },

  disconnected() {
    // Called when the subscription has been terminated by the server
    console.log("GBL Admin - ExportChannel disconnected");
  },

  received(data) {
    console.log('GBL Admin - ExportChannel 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

7 entries across 7 versions & 1 rubygems

Version Path
geoblacklight_admin-0.8.0 app/javascript/channels/export_channel.js
geoblacklight_admin-0.7.1 app/javascript/channels/export_channel.js
geoblacklight_admin-0.7.0 app/javascript/channels/export_channel.js
geoblacklight_admin-0.6.3 app/javascript/channels/export_channel.js
geoblacklight_admin-0.6.2 app/javascript/channels/export_channel.js
geoblacklight_admin-0.6.1 app/javascript/channels/export_channel.js
geoblacklight_admin-0.6.0 app/javascript/channels/export_channel.js