diff --git a/docs/sources/developers/kinds/composable/canvas/panelcfg/schema-reference.md b/docs/sources/developers/kinds/composable/canvas/panelcfg/schema-reference.md index 7b97a1ab5fc..90b7312b126 100644 --- a/docs/sources/developers/kinds/composable/canvas/panelcfg/schema-reference.md +++ b/docs/sources/developers/kinds/composable/canvas/panelcfg/schema-reference.md @@ -28,7 +28,7 @@ title: CanvasPanelCfg kind | `ConnectionPath` | string | **Yes** | | Possible values are: `straight`. | | `Constraint` | [object](#constraint) | **Yes** | | | | `HorizontalConstraint` | string | **Yes** | | Possible values are: `left`, `right`, `leftright`, `center`, `scale`. | -| `HttpRequestMethod` | string | **Yes** | | Possible values are: `GET`, `POST`. | +| `HttpRequestMethod` | string | **Yes** | | Possible values are: `GET`, `POST`, `PUT`. | | `LineConfig` | [object](#lineconfig) | **Yes** | | | | `Options` | [object](#options) | **Yes** | | | | `Placement` | [object](#placement) | **Yes** | | | diff --git a/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts b/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts index b5835e56f0d..8a3eaf86e1b 100644 --- a/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts +++ b/packages/grafana-schema/src/raw/composable/canvas/panelcfg/x/CanvasPanelCfg_types.gen.ts @@ -65,6 +65,7 @@ export interface LineConfig { export enum HttpRequestMethod { GET = 'GET', POST = 'POST', + PUT = 'PUT', } export interface ConnectionCoordinates { diff --git a/public/app/plugins/panel/canvas/editor/element/APIEditor.tsx b/public/app/plugins/panel/canvas/editor/element/APIEditor.tsx index 5eb7b606a8e..dfab9004108 100644 --- a/public/app/plugins/panel/canvas/editor/element/APIEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/element/APIEditor.tsx @@ -33,6 +33,7 @@ type Props = StandardEditorProps; const httpMethodOptions = [ { label: HttpRequestMethod.GET, value: HttpRequestMethod.GET }, { label: HttpRequestMethod.POST, value: HttpRequestMethod.POST }, + { label: HttpRequestMethod.PUT, value: HttpRequestMethod.PUT }, ]; const contentTypeOptions: SelectableValue[] = [ @@ -157,7 +158,7 @@ export function APIEditor({ value, context, onChange }: Props) { - {value?.method === HttpRequestMethod.POST && ( + {value?.method !== HttpRequestMethod.GET && (