mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
* Refactor: remove `scopes` from CentrifugeSrv, remove dependencies on window/config/user context * Refactor: add GrafanaLiveChannelConfigService to wrap direct access to *Scope classes * Refactor: added GrafanaLiveService acting like a proxy to GrafanaLiveSrv + LiveChannelConfigSrv * Refactor: live module instantiation * Refactor: import fixes * Fix: URL construction in centrifugeSrv
35 lines
949 B
TypeScript
35 lines
949 B
TypeScript
import { LiveChannelType } from '@grafana/data';
|
|
import { getDashboardChannelsFeature } from './dashboard/dashboardWatcher';
|
|
import { grafanaLiveCoreFeatures } from './channel-config/scope';
|
|
|
|
export function registerLiveFeatures() {
|
|
grafanaLiveCoreFeatures.register({
|
|
name: 'testdata',
|
|
support: {
|
|
getChannelConfig: (path: string) => {
|
|
return {
|
|
type: LiveChannelType.DataStream,
|
|
};
|
|
},
|
|
},
|
|
description: 'Test data generations',
|
|
});
|
|
|
|
grafanaLiveCoreFeatures.register({
|
|
name: 'broadcast',
|
|
support: {
|
|
getChannelConfig: (path: string) => {
|
|
return {
|
|
type: LiveChannelType.JSON,
|
|
canPublish: true,
|
|
description: 'Broadcast any messages to a channel',
|
|
};
|
|
},
|
|
},
|
|
description: 'Broadcast will send/receive any JSON object in a channel',
|
|
});
|
|
|
|
// dashboard/*
|
|
grafanaLiveCoreFeatures.register(getDashboardChannelsFeature());
|
|
}
|