QueryLibrary: Don't use description when generating name (#94236)

pull/94238/head
Haris Rozajac 10 months ago committed by GitHub
parent a4d919c157
commit 2ea662854a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      public/app/features/query-library/api/mappers.ts

@ -1,3 +1,5 @@
import { v4 as uuidv4 } from 'uuid';
import { AddQueryTemplateCommand, QueryTemplate } from '../types';
import { API_VERSION, QueryTemplateKinds } from './query';
@ -48,7 +50,11 @@ export const convertAddQueryTemplateCommandToDataQuerySpec = (
apiVersion: API_VERSION,
kind: QueryTemplateKinds.QueryTemplate,
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: {
title: title,

Loading…
Cancel
Save