Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-46522 Grafana 10 grafana on call disable and remove from UI #50

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const GrafanaReceiverForm = ({ existing, alertManagerSourceName, config,
}

const notifiers: Notifier[] = grafanaNotifiers
.filter(n => n.type !== 'oncall') // LOGZ.IO CHANGE :: DEV-46522 hide oncall notifier
.filter(n => n.type !== 'oncall') // LOGZ.IO CHANGE :: DEV-46522 disable the oncall grafana plugin
.map((n) => {
if (n.type === 'oncall') {
return {
Expand Down
3 changes: 3 additions & 0 deletions public/app/features/alerting/unified/hooks/usePluginBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { PluginMeta } from '@grafana/data';
import { getPluginSettings } from 'app/features/plugins/pluginSettings';

import { PluginID } from '../components/PluginBridge';
// LOGZ.IO CHANGE :: DEV-46522 disable the oncall grafana plugin
import { SupportedPlugin } from '../types/pluginBridges';
interface PluginBridgeHookResponse {
loading: boolean;
Expand All @@ -13,9 +14,11 @@ interface PluginBridgeHookResponse {
}

export function usePluginBridge(plugin: PluginID): PluginBridgeHookResponse {
// LOGZ.IO CHANGE :: DEV-46522 disable the oncall grafana plugin
if (plugin === SupportedPlugin.OnCall) {
return { loading: false, installed: false};
}
// LOGZ.IO CHANGE :: DEV-46522 disable the oncall grafana plugin. END
const { loading, error, value } = useAsync(() => getPluginSettings(plugin, { showErrorAlert: false }));

const installed = value && !error && !loading;
Expand Down