From d6daf35071ffc2ffbfe85a691f8590507b5705ba Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Wed, 15 Feb 2023 17:30:49 +0000 Subject: [PATCH] Refactor YAMLEditor to be more reusable Remove PipelineRun-specific code and move that to the PipelineRun container. Update the YAMLEditor to act more like a pure UI component (may move it to components package in future), accepting props to control resource kind displayed, API to use, redirect logic, etc. Update error strings to be more generic or use a `kind` placeholder. --- .../CreatePipelineRun/CreatePipelineRun.js | 37 +++++- .../YAMLEditor.js | 124 +++++++----------- .../YAMLEditor.test.js | 78 ++++------- src/containers/YAMLEditor/index.js | 15 +++ src/containers/index.js | 1 + src/nls/messages_de.json | 6 +- src/nls/messages_en.json | 6 +- src/nls/messages_es.json | 6 +- src/nls/messages_fr.json | 6 +- src/nls/messages_it.json | 6 +- src/nls/messages_ja.json | 6 +- src/nls/messages_ko.json | 6 +- src/nls/messages_pt.json | 6 +- src/nls/messages_zh-Hans.json | 6 +- src/nls/messages_zh-Hant.json | 6 +- 15 files changed, 157 insertions(+), 158 deletions(-) rename src/containers/{CreatePipelineRun => YAMLEditor}/YAMLEditor.js (61%) rename src/containers/{CreatePipelineRun => YAMLEditor}/YAMLEditor.test.js (73%) create mode 100644 src/containers/YAMLEditor/index.js diff --git a/src/containers/CreatePipelineRun/CreatePipelineRun.js b/src/containers/CreatePipelineRun/CreatePipelineRun.js index 2e0693c6c..f336fa2a4 100644 --- a/src/containers/CreatePipelineRun/CreatePipelineRun.js +++ b/src/containers/CreatePipelineRun/CreatePipelineRun.js @@ -36,10 +36,12 @@ import { useIntl } from 'react-intl'; import { NamespacesDropdown, PipelinesDropdown, - ServiceAccountsDropdown + ServiceAccountsDropdown, + YAMLEditor } from '..'; import { createPipelineRun, + createPipelineRunRaw, generateNewPipelineRunPayload, getPipelineRunPayload, usePipeline, @@ -47,7 +49,6 @@ import { useSelectedNamespace } from '../../api'; import { isValidLabel } from '../../utils'; -import { CreateYAMLEditor } from './YAMLEditor'; const initialState = { creating: false, @@ -315,6 +316,24 @@ function CreatePipelineRun() { }); } + function handleCloseYAMLEditor() { + let url = urls.pipelineRuns.all(); + if (defaultNamespace && defaultNamespace !== ALL_NAMESPACES) { + url = urls.pipelineRuns.byNamespace({ namespace: defaultNamespace }); + } + navigate(url); + } + + function handleCreate({ resource }) { + const resourceNamespace = resource?.metadata?.namespace; + return createPipelineRunRaw({ + namespace: resourceNamespace, + payload: resource + }).then(() => { + navigate(urls.pipelineRuns.byNamespace({ namespace: resourceNamespace })); + }); + } + function handleNamespaceChange({ selectedItem }) { const { text = '' } = selectedItem || {}; // Reset pipeline and ServiceAccount when namespace changes @@ -456,8 +475,11 @@ function CreatePipelineRun() { }); return ( - @@ -485,7 +507,14 @@ function CreatePipelineRun() { timeoutsTasks }); - return ; + return ( + + ); } return ( diff --git a/src/containers/CreatePipelineRun/YAMLEditor.js b/src/containers/YAMLEditor/YAMLEditor.js similarity index 61% rename from src/containers/CreatePipelineRun/YAMLEditor.js rename to src/containers/YAMLEditor/YAMLEditor.js index 9a43a0206..bc76be7e1 100644 --- a/src/containers/CreatePipelineRun/YAMLEditor.js +++ b/src/containers/YAMLEditor/YAMLEditor.js @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ import { useIntl } from 'react-intl'; -import { ALL_NAMESPACES, urls } from '@tektoncd/dashboard-utils'; import { Button, Form, @@ -24,32 +23,25 @@ import React, { useEffect, useState } from 'react'; import CodeMirror from '@uiw/react-codemirror'; import { StreamLanguage } from '@codemirror/language'; import { yaml as codeMirrorYAML } from '@codemirror/legacy-modes/mode/yaml'; -import { useNavigate } from 'react-router-dom-v5-compat'; -import { createPipelineRunRaw, useSelectedNamespace } from '../../api'; -export function CreateYAMLEditor({ +export default function YAMLEditor({ code: initialCode, + handleClose, + handleCreate, + kind, loading = false, loadingMessage = '' }) { const intl = useIntl(); - const navigate = useNavigate(); - const { selectedNamespace } = useSelectedNamespace(); - const [{ code, isCreating, submitError, validationErrorMessage }, setState] = - useState({ - code: initialCode, - isCreating: false, - submitError: '', - validationErrorMessage: '' - }); + const [code, setCode] = useState(initialCode); + const [isCreating, setIsCreating] = useState(false); + const [submitError, setSubmitError] = useState(''); + const [validationErrorMessage, setValidationErrorMessage] = useState(''); useEffect(() => { if (!loading) { - setState(state => ({ - ...state, - code: initialCode - })); + setCode(initialCode); } }, [loading]); @@ -71,8 +63,8 @@ export function CreateYAMLEditor({ return { valid: false, message: intl.formatMessage({ - id: 'dashboard.createPipelineRun.empty', - defaultMessage: 'PipelineRun cannot be empty' + id: 'dashboard.editor.empty', + defaultMessage: 'Editor cannot be empty' }) }; } @@ -84,86 +76,57 @@ export function CreateYAMLEditor({ // Check form validation let validationResult = validateEmptyYaml(); if (validationResult && !validationResult.valid) { - setState(state => ({ - ...state, - validationErrorMessage: validationResult.message - })); + setValidationErrorMessage(validationResult.message); return; } - let pipelineRun; + let resource; try { - pipelineRun = yaml.load(code); + resource = yaml.load(code); } catch (e) { - setState(state => ({ - ...state, - validationErrorMessage: e.message - })); + setValidationErrorMessage(e.message); return; } - validationResult = validateNamespace(pipelineRun); + validationResult = validateNamespace(resource); if (validationResult && !validationResult.valid) { - setState(state => ({ - ...state, - validationErrorMessage: validationResult.message - })); + setValidationErrorMessage(validationResult.message); return; } - setState(state => ({ ...state, isCreating: true })); - const namespace = pipelineRun?.metadata?.namespace; - - createPipelineRunRaw({ - namespace, - payload: pipelineRun - }) - .then(() => { - navigate(urls.pipelineRuns.byNamespace({ namespace })); - }) - .catch(error => { - error.response.text().then(text => { - const statusCode = error.response.status; - let errorMessage = `error code ${statusCode}`; - if (text) { - errorMessage = `${text} (error code ${statusCode})`; - } - setState(state => ({ - ...state, - isCreating: false, - submitError: errorMessage - })); - }); + setIsCreating(true); + handleCreate({ resource }).catch(error => { + error.response.text().then(text => { + const statusCode = error.response.status; + let errorMessage = `error code ${statusCode}`; + if (text) { + errorMessage = `${text} (error code ${statusCode})`; + } + setIsCreating(false); + setSubmitError(errorMessage); }); + }); } function onChange(newValue, _viewUpdate) { - setState(state => ({ - ...state, - code: newValue - })); + setCode(newValue); } function resetError() { - setState(state => ({ ...state, submitError: '' })); - } - - function handleClose() { - let url = urls.pipelineRuns.all(); - if (selectedNamespace && selectedNamespace !== ALL_NAMESPACES) { - url = urls.pipelineRuns.byNamespace({ namespace: selectedNamespace }); - } - navigate(url); + setSubmitError(''); } return (

- {intl.formatMessage({ - id: 'dashboard.createPipelineRun.title', - defaultMessage: 'Create PipelineRun' - })} + {intl.formatMessage( + { + id: 'dashboard.editor.create.title', + defaultMessage: 'Create {kind}' + }, + { kind } + )}

@@ -171,7 +134,7 @@ export function CreateYAMLEditor({ allByText('Create')[0]; const cancelButton = allByText => allByText('Cancel')[0]; @@ -60,30 +59,6 @@ const pipelineRunWithoutNamespace = ` const pipelineRunIncorrectYaml = `a: b dddd;a`; -const pipelineRunRaw = { - apiVersion: 'tekton.dev/v1beta1', - kind: 'PipelineRun', - metadata: { name: 'test-pipeline-run-name', namespace: 'test-namespace' }, - spec: { - pipelineSpec: { - tasks: [ - { - name: 'hello', - taskSpec: { - steps: [ - { - image: 'busybox', - name: 'echo', - script: '#!/bin/ash\necho "Hello World!"\n' - } - ] - } - } - ] - } - } -}; - describe('YAMLEditor', () => { beforeEach(() => { jest.clearAllMocks(); @@ -105,15 +80,17 @@ describe('YAMLEditor', () => { }); }); it('handles onClose event', () => { - const { getByText } = renderWithRouter(); + const handleClose = jest.fn(); + const { getByText } = renderWithRouter( + + ); fireEvent.click(getByText(/cancel/i)); - // will be called once for render (from test utils) and once for navigation - expect(window.history.pushState).toHaveBeenCalledTimes(2); + expect(handleClose).toHaveBeenCalled(); }); - it('handle submit pipelinerun with empty pipelinerun', () => { + it('handle submit with empty editor', () => { const { queryAllByText, getByRole, getByText } = renderWithRouter( - + ); expect(getByRole(/textbox/)).toBeTruthy(); @@ -121,12 +98,12 @@ describe('YAMLEditor', () => { fireEvent.click(submitButton(queryAllByText)); expect(getByText(/Please fix errors, then resubmit/)).toBeTruthy(); - expect(getByText('PipelineRun cannot be empty')).toBeTruthy(); + expect(getByText('Editor cannot be empty')).toBeTruthy(); }); - it('handle submit pipelinerun without namespace', () => { + it('handle submit resource without namespace', () => { const { queryAllByText, getByRole, getByText } = renderWithRouter( - + ); fireEvent.paste(getByRole(/textbox/), { @@ -140,9 +117,9 @@ describe('YAMLEditor', () => { expect(getByText('Namespace cannot be empty')).toBeTruthy(); }); - it('handle submit pipelinerun incorrect yaml', () => { + it('handle submit resource incorrect yaml', () => { const { queryAllByText, getByRole, getByText } = renderWithRouter( - + ); fireEvent.paste(getByRole(/textbox/), { @@ -156,12 +133,12 @@ describe('YAMLEditor', () => { expect(getByText(/can not read a block mapping entry/)).toBeTruthy(); }); - it('handle submit pipelinerun', async () => { - jest - .spyOn(PipelineRunsAPI, 'createPipelineRunRaw') + it('handle submit', async () => { + const handleCreate = jest + .fn() .mockImplementation(() => Promise.resolve({ data: {} })); const { queryAllByText, getByText, getByRole } = renderWithRouter( - + ); fireEvent.paste(getByRole(/textbox/), { target: { textContent: pipelineRun } @@ -173,28 +150,19 @@ describe('YAMLEditor', () => { fireEvent.click(submitButton(queryAllByText)); await waitFor(() => { - expect(PipelineRunsAPI.createPipelineRunRaw).toHaveBeenCalledTimes(1); - }); - expect(PipelineRunsAPI.createPipelineRunRaw).toHaveBeenCalledWith( - expect.objectContaining({ - namespace: 'test-namespace', - payload: pipelineRunRaw - }) - ); - await waitFor(() => { - expect(window.history.pushState).toHaveBeenCalledTimes(2); + expect(handleCreate).toHaveBeenCalledTimes(1); }); }); - it('handle submit pipelinerun when error', async () => { + it('handle submit error', async () => { const errorResponseMock = { response: { status: 404, text: () => Promise.resolve('Whoops!') } }; - jest - .spyOn(PipelineRunsAPI, 'createPipelineRunRaw') + const handleCreate = jest + .fn() .mockImplementation(() => Promise.reject(errorResponseMock)); const { queryAllByText, getByText, getByRole } = renderWithRouter( - + ); fireEvent.paste(getByRole(/textbox/), { target: { textContent: pipelineRun } @@ -216,7 +184,7 @@ describe('YAMLEditor', () => { it('loading state', () => { const loadingMessage = 'wait. test is in progress'; const { getAllByText, queryAllByText } = renderWithRouter( - + ); expect(getAllByText(loadingMessage)).toBeTruthy(); expect(submitButton(queryAllByText).disabled).toBe(true); diff --git a/src/containers/YAMLEditor/index.js b/src/containers/YAMLEditor/index.js new file mode 100644 index 000000000..3ebd13be3 --- /dev/null +++ b/src/containers/YAMLEditor/index.js @@ -0,0 +1,15 @@ +/* +Copyright 2023 The Tekton Authors +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +/* istanbul ignore file */ + +export { default } from './YAMLEditor'; diff --git a/src/containers/index.js b/src/containers/index.js index 98a037ba1..b6be17b11 100644 --- a/src/containers/index.js +++ b/src/containers/index.js @@ -53,3 +53,4 @@ export { default as Trigger } from './Trigger'; export { default as Triggers } from './Triggers'; export { default as TriggerTemplate } from './TriggerTemplate'; export { default as TriggerTemplates } from './TriggerTemplates'; +export { default as YAMLEditor } from './YAMLEditor'; diff --git a/src/nls/messages_de.json b/src/nls/messages_de.json index 0571a49eb..ce3b5fa37 100644 --- a/src/nls/messages_de.json +++ b/src/nls/messages_de.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "{kind} löschen", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "{kind} nicht gefunden", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "{kind} nicht gefunden", diff --git a/src/nls/messages_en.json b/src/nls/messages_en.json index c39af84dc..241b73446 100644 --- a/src/nls/messages_en.json +++ b/src/nls/messages_en.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "No parameters found for this ClusterTriggerBinding.", "dashboard.createPipelineRun.createError": "Error creating PipelineRun", "dashboard.createPipelineRun.disabled": "Disabled", - "dashboard.createPipelineRun.empty": "PipelineRun cannot be empty", "dashboard.createPipelineRun.enabled": "Enabled", "dashboard.createPipelineRun.errorLoading": "Error retrieving Pipeline information", "dashboard.createPipelineRun.invalidPipeline": "Pipeline cannot be empty", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "TaskRun name", "dashboard.createRun.timeoutLabel": "Timeout", "dashboard.createRun.validationError": "Please fix the fields with errors, then resubmit", - "dashboard.createRun.yaml.validationError": "Please fix errors, then resubmit", "dashboard.createTaskRun.createError": "Error creating TaskRun", "dashboard.createTaskRun.errorLoading": "Error retrieving Task information", "dashboard.createTaskRun.invalidTask": "Task cannot be empty", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "Delete {kind}", "dashboard.deleteTaskRun.body": "Are you sure you would like to delete TaskRun {name}?", "dashboard.editAndRun.actionText": "Edit and run", + "dashboard.editor.create.title": "Create {kind}", + "dashboard.editor.createError": "Error creating {kind}", + "dashboard.editor.empty": "Editor cannot be empty", + "dashboard.editor.validationError": "Please fix errors, then resubmit", "dashboard.emptyState.allNamespaces": "No matching {kind} found", "dashboard.emptyState.clusterResource": "No matching {kind} found", "dashboard.emptyState.selectedNamespace": "No matching {kind} found in namespace {selectedNamespace}", diff --git a/src/nls/messages_es.json b/src/nls/messages_es.json index c48d7fdbe..3a7a51344 100644 --- a/src/nls/messages_es.json +++ b/src/nls/messages_es.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "Suprimir {kind}", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "No se ha encontrado ninguna {kind}", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "No se ha encontrado ninguna {kind}", diff --git a/src/nls/messages_fr.json b/src/nls/messages_fr.json index 12ac3cadf..eb20fa9fb 100644 --- a/src/nls/messages_fr.json +++ b/src/nls/messages_fr.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "Suppression des {kind}", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "{kind} introuvable", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "{kind} introuvable", diff --git a/src/nls/messages_it.json b/src/nls/messages_it.json index 9ca3fc8cb..2d91107b3 100644 --- a/src/nls/messages_it.json +++ b/src/nls/messages_it.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "Elimina {kind}", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "Nessun {kind} trovato", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "Nessun {kind} trovato", diff --git a/src/nls/messages_ja.json b/src/nls/messages_ja.json index 860dc7b0e..9888e5dd2 100644 --- a/src/nls/messages_ja.json +++ b/src/nls/messages_ja.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "このClusterTriggerBindingのパラメータが見つかりません", "dashboard.createPipelineRun.createError": "PipelineRunの作成中にエラーが発生しました", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "Pipeline情報の取得中にエラーが発生しました", "dashboard.createPipelineRun.invalidPipeline": "Pipelineは必須です", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "タイムアウト", "dashboard.createRun.validationError": "エラーのあるフィールドを修正してから再作成してください", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "TaskRunの作成中にエラーが発生しました", "dashboard.createTaskRun.errorLoading": "Task情報の取得中にエラーが発生しました", "dashboard.createTaskRun.invalidTask": "Taskを空にすることはできません", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "{kind}を削除", "dashboard.deleteTaskRun.body": "TaskRun {name}を削除してもよろしいですか?", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "すべてのNamespaceに{kind}がありません", "dashboard.emptyState.clusterResource": "{kind}がありません", "dashboard.emptyState.selectedNamespace": "{selectedNamespace} Namespaceに{kind}がありません", diff --git a/src/nls/messages_ko.json b/src/nls/messages_ko.json index 13564bfdc..9c27240f5 100644 --- a/src/nls/messages_ko.json +++ b/src/nls/messages_ko.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "{kind} 삭제", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "{kind}을(를) 찾을 수 없음", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "{kind}을(를) 찾을 수 없음", diff --git a/src/nls/messages_pt.json b/src/nls/messages_pt.json index c1338ce13..20ad39c19 100644 --- a/src/nls/messages_pt.json +++ b/src/nls/messages_pt.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "Excluir o {kind}", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "Nenhum {kind} localizado", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "Nenhum {kind} localizado", diff --git a/src/nls/messages_zh-Hans.json b/src/nls/messages_zh-Hans.json index 674d9d246..06bc6f4d6 100644 --- a/src/nls/messages_zh-Hans.json +++ b/src/nls/messages_zh-Hans.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "未找到该 ClusterTriggerBinding 的参数。", "dashboard.createPipelineRun.createError": "创建 PipelineRun 时失败", "dashboard.createPipelineRun.disabled": "禁用", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "启用", "dashboard.createPipelineRun.errorLoading": "检索 Pipeline 信息时失败", "dashboard.createPipelineRun.invalidPipeline": "Pipeline 不能为空", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "超时", "dashboard.createRun.validationError": "请修正有错误的字段,然后重新提交。", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "创建 TaskRun 时失败", "dashboard.createTaskRun.errorLoading": "检索 Task 信息时失败", "dashboard.createTaskRun.invalidTask": "Task 不能为空", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "删除 {kind}", "dashboard.deleteTaskRun.body": "您确定要删除 TaskRun {name} 吗", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "未找到 {kind}", "dashboard.emptyState.clusterResource": "未找到 {kind}", "dashboard.emptyState.selectedNamespace": "未找到 {kind}", diff --git a/src/nls/messages_zh-Hant.json b/src/nls/messages_zh-Hant.json index 3415c8ba9..5b7bd0ce1 100644 --- a/src/nls/messages_zh-Hant.json +++ b/src/nls/messages_zh-Hant.json @@ -51,7 +51,6 @@ "dashboard.clusterTriggerBinding.noParams": "", "dashboard.createPipelineRun.createError": "", "dashboard.createPipelineRun.disabled": "", - "dashboard.createPipelineRun.empty": "", "dashboard.createPipelineRun.enabled": "", "dashboard.createPipelineRun.errorLoading": "", "dashboard.createPipelineRun.invalidPipeline": "", @@ -71,7 +70,6 @@ "dashboard.createRun.taskRunNameLabel": "", "dashboard.createRun.timeoutLabel": "", "dashboard.createRun.validationError": "", - "dashboard.createRun.yaml.validationError": "", "dashboard.createTaskRun.createError": "", "dashboard.createTaskRun.errorLoading": "", "dashboard.createTaskRun.invalidTask": "", @@ -85,6 +83,10 @@ "dashboard.deleteResources.heading": "刪除 {kind}", "dashboard.deleteTaskRun.body": "", "dashboard.editAndRun.actionText": "", + "dashboard.editor.create.title": "", + "dashboard.editor.createError": "", + "dashboard.editor.empty": "", + "dashboard.editor.validationError": "", "dashboard.emptyState.allNamespaces": "找不到 {kind}", "dashboard.emptyState.clusterResource": "", "dashboard.emptyState.selectedNamespace": "找不到 {kind}",