Skip to content

Commit

Permalink
ft - add refresh function to grafana context
Browse files Browse the repository at this point in the history
  • Loading branch information
vitPinchuk committed Feb 7, 2024
1 parent 81fac77 commit 5e329d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/EchartsPanel/EchartsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export const EchartsPanel: React.FC<Props> = ({ options, data, width, height, re
locationService,
notifySuccess,
notifyError,
refresh: () => appEvents.publish({ type: 'variables-changed', payload: { refreshAll: true } }),
},
panel: {
data,
Expand Down
5 changes: 5 additions & 0 deletions src/constants/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ const EDITOR_BASE_CONTEXT_SUGGESTIONS: CodeEditorSuggestionItem[] = [
kind: CodeEditorSuggestionItemKind.Method,
detail: 'Show error notification.',
},
{
label: 'context.grafana.refresh',
kind: CodeEditorSuggestionItemKind.Method,
detail: 'Interpolate all variables.',
},

/**
* Echarts
Expand Down

0 comments on commit 5e329d3

Please sign in to comment.