riya_business_travel_8.0.0_.../public/app/features/live/features.ts
venbatechnologies@gmail.com 565484c22d Modified initial commit
2021-07-05 14:17:23 +05:30

35 lines
935 B
TypeScript

import { LiveChannelType } from '@grafana/data';
import { getDashboardChannelsFeature } from './dashboard/dashboardWatcher';
import { grafanaLiveCoreFeatures } from './scopes';
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());
}