2021-04-23 16:21:38 -05:00
|
|
|
import { LiveChannelType } from '@grafana/data';
|
2020-10-01 12:46:14 -05:00
|
|
|
import { getDashboardChannelsFeature } from './dashboard/dashboardWatcher';
|
2021-10-28 12:48:57 -05:00
|
|
|
import { grafanaLiveCoreFeatures } from './channel-config/scope';
|
2020-09-23 10:02:01 -05:00
|
|
|
|
|
|
|
export function registerLiveFeatures() {
|
2020-10-01 12:46:14 -05:00
|
|
|
grafanaLiveCoreFeatures.register({
|
|
|
|
name: 'testdata',
|
|
|
|
support: {
|
2020-09-23 10:02:01 -05:00
|
|
|
getChannelConfig: (path: string) => {
|
2021-04-23 16:21:38 -05:00
|
|
|
return {
|
|
|
|
type: LiveChannelType.DataStream,
|
|
|
|
};
|
2020-09-23 10:02:01 -05:00
|
|
|
},
|
|
|
|
},
|
2020-10-01 12:46:14 -05:00
|
|
|
description: 'Test data generations',
|
|
|
|
});
|
2020-09-23 10:02:01 -05:00
|
|
|
|
2020-10-01 12:46:14 -05:00
|
|
|
grafanaLiveCoreFeatures.register({
|
|
|
|
name: 'broadcast',
|
|
|
|
support: {
|
2020-09-23 10:02:01 -05:00
|
|
|
getChannelConfig: (path: string) => {
|
2021-04-23 16:21:38 -05:00
|
|
|
return {
|
|
|
|
type: LiveChannelType.JSON,
|
|
|
|
canPublish: true,
|
|
|
|
description: 'Broadcast any messages to a channel',
|
|
|
|
};
|
2020-09-23 10:02:01 -05:00
|
|
|
},
|
|
|
|
},
|
2020-10-22 02:10:26 -05:00
|
|
|
description: 'Broadcast will send/receive any JSON object in a channel',
|
|
|
|
});
|
|
|
|
|
2020-10-01 12:46:14 -05:00
|
|
|
// dashboard/*
|
|
|
|
grafanaLiveCoreFeatures.register(getDashboardChannelsFeature());
|
2020-09-23 10:02:01 -05:00
|
|
|
}
|