diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index 4c37c5c467010..49068a590f14d 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -5915,12 +5915,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "32b28ffe-4df3-4257-a976-71ff7ba811b2", "description": "The unique ID of the control.", "type": "string" }, @@ -6229,7 +6228,6 @@ "type": "number" }, "i": { - "default": "199505bf-cee4-4ba4-bf12-8dfff6d57d2e", "description": "The unique identifier of the panel", "type": "string" }, @@ -6290,14 +6288,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -6589,12 +6579,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "32b28ffe-4df3-4257-a976-71ff7ba811b2", "description": "The unique ID of the control.", "type": "string" }, @@ -6903,7 +6892,6 @@ "type": "number" }, "i": { - "default": "199505bf-cee4-4ba4-bf12-8dfff6d57d2e", "description": "The unique identifier of the panel", "type": "string" }, @@ -6964,14 +6952,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -7137,12 +7117,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "32b28ffe-4df3-4257-a976-71ff7ba811b2", "description": "The unique ID of the control.", "type": "string" }, @@ -7451,7 +7430,6 @@ "type": "number" }, "i": { - "default": "199505bf-cee4-4ba4-bf12-8dfff6d57d2e", "description": "The unique identifier of the panel", "type": "string" }, @@ -7512,14 +7490,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -7783,12 +7753,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "32b28ffe-4df3-4257-a976-71ff7ba811b2", "description": "The unique ID of the control.", "type": "string" }, @@ -8097,7 +8066,6 @@ "type": "number" }, "i": { - "default": "199505bf-cee4-4ba4-bf12-8dfff6d57d2e", "description": "The unique identifier of the panel", "type": "string" }, @@ -8158,14 +8126,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -8325,12 +8285,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "32b28ffe-4df3-4257-a976-71ff7ba811b2", "description": "The unique ID of the control.", "type": "string" }, @@ -8639,7 +8598,6 @@ "type": "number" }, "i": { - "default": "199505bf-cee4-4ba4-bf12-8dfff6d57d2e", "description": "The unique identifier of the panel", "type": "string" }, @@ -8700,14 +8658,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index 01e92675f82e8..51bd143ddb5c9 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -5915,12 +5915,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "edc483da-2dcf-4469-8d36-c99ca8f699a7", "description": "The unique ID of the control.", "type": "string" }, @@ -6229,7 +6228,6 @@ "type": "number" }, "i": { - "default": "49de787f-528f-47bd-a3f5-616351ccbc43", "description": "The unique identifier of the panel", "type": "string" }, @@ -6290,14 +6288,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -6589,12 +6579,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "edc483da-2dcf-4469-8d36-c99ca8f699a7", "description": "The unique ID of the control.", "type": "string" }, @@ -6903,7 +6892,6 @@ "type": "number" }, "i": { - "default": "49de787f-528f-47bd-a3f5-616351ccbc43", "description": "The unique identifier of the panel", "type": "string" }, @@ -6964,14 +6952,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -7137,12 +7117,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "edc483da-2dcf-4469-8d36-c99ca8f699a7", "description": "The unique ID of the control.", "type": "string" }, @@ -7451,7 +7430,6 @@ "type": "number" }, "i": { - "default": "49de787f-528f-47bd-a3f5-616351ccbc43", "description": "The unique identifier of the panel", "type": "string" }, @@ -7512,14 +7490,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -7783,12 +7753,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "edc483da-2dcf-4469-8d36-c99ca8f699a7", "description": "The unique ID of the control.", "type": "string" }, @@ -8097,7 +8066,6 @@ "type": "number" }, "i": { - "default": "49de787f-528f-47bd-a3f5-616351ccbc43", "description": "The unique identifier of the panel", "type": "string" }, @@ -8158,14 +8126,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, @@ -8325,12 +8285,11 @@ "type": "object" }, "grow": { - "default": true, + "default": false, "description": "Expand width of the control panel to fit available space.", "type": "boolean" }, "id": { - "default": "edc483da-2dcf-4469-8d36-c99ca8f699a7", "description": "The unique ID of the control.", "type": "string" }, @@ -8639,7 +8598,6 @@ "type": "number" }, "i": { - "default": "49de787f-528f-47bd-a3f5-616351ccbc43", "description": "The unique identifier of the panel", "type": "string" }, @@ -8700,14 +8658,6 @@ "type": "object" }, "panelIndex": { - "default": { - "ref": { - "path": [ - "gridData", - "i" - ] - } - }, "description": "The unique ID of the panel.", "type": "string" }, diff --git a/src/plugins/dashboard/server/content_management/v3/cm_services.ts b/src/plugins/dashboard/server/content_management/v3/cm_services.ts index e086d1cc1460a..f4a4d902355f5 100644 --- a/src/plugins/dashboard/server/content_management/v3/cm_services.ts +++ b/src/plugins/dashboard/server/content_management/v3/cm_services.ts @@ -7,7 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { v4 as uuidv4 } from 'uuid'; import { schema, Type } from '@kbn/config-schema'; import { createOptionsSchemas, updateOptionsSchema } from '@kbn/content-management-utils'; import type { ContentManagementServicesDefinition as ServicesDefinition } from '@kbn/object-versioning'; @@ -50,10 +49,11 @@ export const controlGroupInputSchema = schema.object({ { type: schema.string({ meta: { description: 'The type of the control panel.' } }), controlConfig: schema.maybe(schema.recordOf(schema.string(), schema.any())), - id: schema.string({ - defaultValue: uuidv4(), - meta: { description: 'The unique ID of the control.' }, - }), + id: schema.maybe( + schema.string({ + meta: { description: 'The unique ID of the control.' }, + }) + ), order: schema.number({ meta: { description: 'The order of the control panel in the control group.', @@ -243,10 +243,11 @@ export const gridDataSchema = schema.object({ min: 1, meta: { description: 'The height of the panel in grid units' }, }), - i: schema.string({ - meta: { description: 'The unique identifier of the panel' }, - defaultValue: uuidv4(), - }), + i: schema.maybe( + schema.string({ + meta: { description: 'The unique identifier of the panel' }, + }) + ), }); export const panelSchema = schema.object({ @@ -284,10 +285,11 @@ export const panelSchema = schema.object({ type: schema.string({ meta: { description: 'The embeddable type' } }), panelRefName: schema.maybe(schema.string()), gridData: gridDataSchema, - panelIndex: schema.string({ - meta: { description: 'The unique ID of the panel.' }, - defaultValue: schema.siblingRef('gridData.i'), - }), + panelIndex: schema.maybe( + schema.string({ + meta: { description: 'The unique ID of the panel.' }, + }) + ), title: schema.maybe(schema.string({ meta: { description: 'The title of the panel' } })), version: schema.maybe( schema.string({