mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
QueryLibrary: Don't use description when generating name (#94236)
This commit is contained in:
parent
a4d919c157
commit
2ea662854a
@ -1,3 +1,5 @@
|
|||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
import { AddQueryTemplateCommand, QueryTemplate } from '../types';
|
import { AddQueryTemplateCommand, QueryTemplate } from '../types';
|
||||||
|
|
||||||
import { API_VERSION, QueryTemplateKinds } from './query';
|
import { API_VERSION, QueryTemplateKinds } from './query';
|
||||||
@ -48,7 +50,11 @@ export const convertAddQueryTemplateCommandToDataQuerySpec = (
|
|||||||
apiVersion: API_VERSION,
|
apiVersion: API_VERSION,
|
||||||
kind: QueryTemplateKinds.QueryTemplate,
|
kind: QueryTemplateKinds.QueryTemplate,
|
||||||
metadata: {
|
metadata: {
|
||||||
generateName: 'A' + title.replaceAll(' ', '-'),
|
/**
|
||||||
|
* Server will append to whatever is passed here, but just to be safe we generate a uuid
|
||||||
|
* More info https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency
|
||||||
|
*/
|
||||||
|
generateName: uuidv4(),
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
title: title,
|
title: title,
|
||||||
|
Loading…
Reference in New Issue
Block a user