cluedin-widget
Version:
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
28 lines (21 loc) • 766 B
JavaScript
import config from '../config';
import { receiveCrawlerStats } from '../action/provider';
let connection = $.hubConnection(config.url.api + '/signalr', { useDefaultPath: false });
$.connection.hub.transportConnectTimeout = 10000;
connection.logging = true;
connection.qs = { 'Bearer': config.getCurrentToken() };
let proxy = connection.createHubProxy('clientHub');
export function linkRealTimeWithStore(store) {
proxy.on('ProviderStats', function (messageName, crawlerInfo, typeId, integrationId) {
store.dispatch(receiveCrawlerStats({
crawlerInfo,
typeId,
integrationId,
}));
});
proxy.connection.error(function () {
console.log('error');
console.log(arguments);
});
connection.start({ waitForPageLoad: false });
}