Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions redisinsight/ui/src/i18n/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,86 @@
"rdi.instance.stop.ariaLabel": "Спиране на конвейера",
"rdi.instance.stop.button": "Стоп",
"rdi.instance.stop.tooltip": "Спрете конвейера, за да предотвратите обработката на нови постъпващи данни.",
"rdi.pipeline.config.description": "Конфигурирайте <docsLink>детайлите за връзка</docsLink> и настройките за прилагане на целевата инстанция.",
"rdi.pipeline.config.testButton": "Тест на връзката",
"rdi.pipeline.config.title": "Конфигурация на целевата база данни",
"rdi.pipeline.download.body": "При изтегляне на конфигурацията на конвейера от сървъра, тя ще замени съществуващата, показана в Redis Insight.",
"rdi.pipeline.download.cancel": "Отказ",
"rdi.pipeline.download.confirm": "Изтегляне от сървъра",
"rdi.pipeline.download.saveToFile": "Запазване във файл",
"rdi.pipeline.download.title": "Изтегляне на конвейер от сървъра",
"rdi.pipeline.dryRun.closeAria": "затваряне на панела за пробно изпълнение",
"rdi.pipeline.dryRun.fullscreenAria": "превключване на цял екран за панела за пробно изпълнение",
"rdi.pipeline.dryRun.inputHelp": "Добавете входни данни, за да тествате логиката на трансформация.",
"rdi.pipeline.dryRun.inputInvalid": "Входните данни трябва да са във формат JSON",
"rdi.pipeline.dryRun.inputTitle": "Вход",
"rdi.pipeline.dryRun.jobOutput": "Изход на задачата",
"rdi.pipeline.dryRun.jobOutputTooltip": "Показва списъка с Redis команди, които ще бъдат генерирани въз основа на детайлите на вашата задача.<break/>Не се записват данни в целевата база данни.",
"rdi.pipeline.dryRun.noCommands": "Сървърът не предостави Redis команди.",
"rdi.pipeline.dryRun.noTransformation": "Сървърът не предостави резултати от трансформация.",
"rdi.pipeline.dryRun.runButton": "Пробно изпълнение",
"rdi.pipeline.dryRun.title": "Тестване на логиката на трансформация",
"rdi.pipeline.dryRun.transformationOutput": "Изход на трансформацията",
"rdi.pipeline.dryRun.transformationTooltip": "Показва резултатите от трансформациите, които сте дефинирали. Данните са представени във формат JSON.<break/>Не се записват данни в целевата база данни.",
"rdi.pipeline.error.defaultMsg": "Неуспешно преобразуване на YAML в JSON структура",
"rdi.pipeline.error.defaultName": "Стойността",
"rdi.pipeline.invalidStructure": "{{name}} има невалидна структура.",
"rdi.pipeline.job.dedicatedEditorButton": "SQL и JMESPath редактор",
"rdi.pipeline.job.description": "Създайте задача за всяка таблица източник, за да филтрирате, трансформирате и <docsLink>съпоставите данни</docsLink> към Redis.",
"rdi.pipeline.job.dryRunButton": "Пробно изпълнение",
"rdi.pipeline.jobName.inUse": "Името на задачата вече се използва",
"rdi.pipeline.jobName.placeholder": "Въведете име на задача",
"rdi.pipeline.jobName.required": "Името на задачата е задължително",
"rdi.pipeline.loading": "Зареждане...",
"rdi.pipeline.nav.addJobAria": "добавяне на нов файл на задача",
"rdi.pipeline.nav.addJobTooltip": "Добавяне на файл на задача",
"rdi.pipeline.nav.configFile": "Конфигурационен файл",
"rdi.pipeline.nav.configTitle": "Конфигурация",
"rdi.pipeline.nav.deleteConfirm": "Изтриване",
"rdi.pipeline.nav.deleteJobAria": "изтриване на задача",
"rdi.pipeline.nav.deleteJobBody": "Промените няма да бъдат приложени, докато конвейерът не бъде внедрен.",
"rdi.pipeline.nav.deleteJobTitle": "Изтриване на {{name}}",
"rdi.pipeline.nav.deleteJobTooltip": "Изтриване на задача",
"rdi.pipeline.nav.editJobAria": "редактиране на името на файла на задачата",
"rdi.pipeline.nav.editJobTooltip": "Редактиране на името на файла на задачата",
"rdi.pipeline.nav.jobsTitle": "Трансформиране и валидиране",
"rdi.pipeline.nav.title": "Управление на конвейера",
"rdi.pipeline.nav.undeployedChanges": "Този файл съдържа невнедрени промени.",
"rdi.pipeline.pageTitle": "{{name}} - Управление на конвейера",
"rdi.pipeline.source.createNew": "Създаване на нов конвейер",
"rdi.pipeline.source.importZip": "Импортиране на конвейер от ZIP файл",
"rdi.pipeline.source.subtitle": "за да започнете с вашия конвейер",
"rdi.pipeline.source.title": "Изберете опция",
"rdi.pipeline.template.apply": "Прилагане",
"rdi.pipeline.template.cancel": "Отказ",
"rdi.pipeline.template.dbType": "Тип база данни",
"rdi.pipeline.template.editorOnly": "Шаблоните са достъпни само с празен редактор, за да се предотврати потенциална загуба на данни.",
"rdi.pipeline.template.insertAria": "Вмъкване на шаблон",
"rdi.pipeline.template.insertButton": "Вмъкване на шаблон",
"rdi.pipeline.template.noTemplateLabel": "Без шаблон",
"rdi.pipeline.template.noneAvailableLine1": "Няма наличен шаблон.",
"rdi.pipeline.template.noneAvailableLine2": "Затворете формата и опитайте отново.",
"rdi.pipeline.template.pipelineType": "Тип конвейер",
"rdi.pipeline.template.title": "Изберете шаблон",
"rdi.pipeline.testConn.closeAria": "затваряне на панела за тест на връзките",
"rdi.pipeline.testConn.colEndpoint": "Крайна точка",
"rdi.pipeline.testConn.colResults": "Резултати",
"rdi.pipeline.testConn.loading": "Зареждане на резултатите...",
"rdi.pipeline.testConn.noResults": "Няма намерени резултати. Моля, опитайте отново.",
"rdi.pipeline.testConn.source": "Връзки към източника",
"rdi.pipeline.testConn.successful": "Успешно",
"rdi.pipeline.testConn.target": "Връзки към целта",
"rdi.pipeline.testConn.title": "Тест на връзката",
"rdi.pipeline.upload.errorNoConfig": "config.yaml липсва",
"rdi.pipeline.upload.errorNoJobs": "Не е намерена папка jobs",
"rdi.pipeline.upload.errorZip": "Възникна проблем с .zip файла",
"rdi.pipeline.upload.resultFail": "Неуспешно качване на конвейера",
"rdi.pipeline.upload.resultSuccess": "Конвейерът е качен",
"rdi.pipeline.upload.submitButton": "Качване",
"rdi.pipeline.upload.submitResults": "Нов конвейер беше успешно качен.",
"rdi.pipeline.upload.titleArchive": "Качете архив с RDI конвейер",
"rdi.pipeline.upload.titleNew": "Качване на нов конвейер",
"rdi.pipeline.upload.warning": "Ако бъде качен нов конвейер, съществуващата конфигурация на конвейера и задачите за трансформация ще бъдат презаписани. Промените няма да бъдат приложени, докато конвейерът не бъде внедрен.",
"rdi.statistics.empty.addButton": "Добавяне на конвейер",
"rdi.statistics.empty.description": "Създайте първия си конвейер, за да започнете!",
"rdi.statistics.empty.title": "Все още няма разгърнат конвейер",
Expand Down
80 changes: 80 additions & 0 deletions redisinsight/ui/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,86 @@
"rdi.instance.stop.ariaLabel": "Stop running pipeline",
"rdi.instance.stop.button": "Stop",
"rdi.instance.stop.tooltip": "Stop the pipeline to prevent processing of new data arrivals.",
"rdi.pipeline.config.description": "Configure target instance <docsLink>connection details</docsLink> and applier settings.",
"rdi.pipeline.config.testButton": "Test Connection",
"rdi.pipeline.config.title": "Target database configuration",
"rdi.pipeline.download.body": "When downloading the pipeline configuration from the server, it will overwrite the existing one displayed in Redis Insight.",
"rdi.pipeline.download.cancel": "Cancel",
"rdi.pipeline.download.confirm": "Download from server",
"rdi.pipeline.download.saveToFile": "Save to file",
"rdi.pipeline.download.title": "Download a pipeline from the server",
"rdi.pipeline.dryRun.closeAria": "close dry run panel",
"rdi.pipeline.dryRun.fullscreenAria": "toggle fullscrenn dry run panel",
"rdi.pipeline.dryRun.inputHelp": "Add input data to test the transformation logic.",
"rdi.pipeline.dryRun.inputInvalid": "Input should have JSON format",
"rdi.pipeline.dryRun.inputTitle": "Input",
"rdi.pipeline.dryRun.jobOutput": "Job output",
"rdi.pipeline.dryRun.jobOutputTooltip": "Displays the list of Redis commands that will be generated based on your job details.<break/>No data is written to the target database.",
"rdi.pipeline.dryRun.noCommands": "No Redis commands provided by the server.",
"rdi.pipeline.dryRun.noTransformation": "No transformation results provided by the server.",
"rdi.pipeline.dryRun.runButton": "Dry run",
"rdi.pipeline.dryRun.title": "Test transformation logic",
"rdi.pipeline.dryRun.transformationOutput": "Transformation output",
"rdi.pipeline.dryRun.transformationTooltip": "Displays the results of the transformations you defined. The data is presented in JSON format.<break/>No data is written to the target database.",
"rdi.pipeline.error.defaultMsg": "Failed to convert YAML to JSON structure",
"rdi.pipeline.error.defaultName": "Value",
"rdi.pipeline.invalidStructure": "{{name}} has an invalid structure.",
"rdi.pipeline.job.dedicatedEditorButton": "SQL and JMESPath Editor",
"rdi.pipeline.job.description": "Create a job per source table to filter, transform, and <docsLink>map data</docsLink> to Redis.",
"rdi.pipeline.job.dryRunButton": "Dry Run",
"rdi.pipeline.jobName.inUse": "Job name is already in use",
"rdi.pipeline.jobName.placeholder": "Enter job name",
"rdi.pipeline.jobName.required": "Job name is required",
"rdi.pipeline.loading": "Loading...",
"rdi.pipeline.nav.addJobAria": "add new job file",
"rdi.pipeline.nav.addJobTooltip": "Add a job file",
"rdi.pipeline.nav.configFile": "Configuration file",
"rdi.pipeline.nav.configTitle": "Configuration",
"rdi.pipeline.nav.deleteConfirm": "Delete",
"rdi.pipeline.nav.deleteJobAria": "delete job",
"rdi.pipeline.nav.deleteJobBody": "Changes will not be applied until the pipeline is deployed.",
"rdi.pipeline.nav.deleteJobTitle": "Delete {{name}}",
"rdi.pipeline.nav.deleteJobTooltip": "Delete job",
"rdi.pipeline.nav.editJobAria": "edit job file name",
"rdi.pipeline.nav.editJobTooltip": "Edit job file name",
"rdi.pipeline.nav.jobsTitle": "Transform and Validate",
"rdi.pipeline.nav.title": "Pipeline management",
"rdi.pipeline.nav.undeployedChanges": "This file contains undeployed changes.",
"rdi.pipeline.pageTitle": "{{name}} - Pipeline Management",
"rdi.pipeline.source.createNew": "Create new pipeline",
"rdi.pipeline.source.importZip": "Import pipeline from ZIP file",
"rdi.pipeline.source.subtitle": "to start with your pipeline",
"rdi.pipeline.source.title": "Select an option",
"rdi.pipeline.template.apply": "Apply",
"rdi.pipeline.template.cancel": "Cancel",
"rdi.pipeline.template.dbType": "Database type",
"rdi.pipeline.template.editorOnly": "Templates can be accessed only with the empty Editor to prevent potential data loss.",
"rdi.pipeline.template.insertAria": "Insert template",
"rdi.pipeline.template.insertButton": "Insert template",
"rdi.pipeline.template.noTemplateLabel": "No template",
"rdi.pipeline.template.noneAvailableLine1": "No template is available.",
"rdi.pipeline.template.noneAvailableLine2": "Close the form and try again.",
"rdi.pipeline.template.pipelineType": "Pipeline type",
"rdi.pipeline.template.title": "Select a template",
"rdi.pipeline.testConn.closeAria": "close test connections panel",
"rdi.pipeline.testConn.colEndpoint": "Endpoint",
"rdi.pipeline.testConn.colResults": "Results",
"rdi.pipeline.testConn.loading": "Loading results...",
"rdi.pipeline.testConn.noResults": "No results found. Please try again.",
"rdi.pipeline.testConn.source": "Source connections",
"rdi.pipeline.testConn.successful": "Successful",
"rdi.pipeline.testConn.target": "Target connections",
"rdi.pipeline.testConn.title": "Test connection",
"rdi.pipeline.upload.errorNoConfig": "config.yaml is missing",
"rdi.pipeline.upload.errorNoJobs": "No jobs folder found",
"rdi.pipeline.upload.errorZip": "There was a problem with the .zip file",
"rdi.pipeline.upload.resultFail": "Failed to upload pipeline",
"rdi.pipeline.upload.resultSuccess": "Pipeline has been uploaded",
"rdi.pipeline.upload.submitButton": "Upload",
"rdi.pipeline.upload.submitResults": "A new pipeline has been successfully uploaded.",
"rdi.pipeline.upload.titleArchive": "Upload an archive with an RDI pipeline",
"rdi.pipeline.upload.titleNew": "Upload a new pipeline",
"rdi.pipeline.upload.warning": "If a new pipeline is uploaded, existing pipeline configuration and transformation jobs will be overwritten. Changes will not be applied until the pipeline is deployed.",
"rdi.statistics.empty.addButton": "Add Pipeline",
"rdi.statistics.empty.description": "Create your first pipeline to get started!",
"rdi.statistics.empty.title": "No pipeline deployed yet",
Expand Down
7 changes: 4 additions & 3 deletions redisinsight/ui/src/pages/rdi/constants/errors.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { upperFirst } from 'lodash'
import React from 'react'
import i18n from 'uiSrc/i18n'

export const rdiErrorMessages = {
invalidStructure: (
name = 'Value',
msg = 'Failed to convert YAML to JSON structure',
name: string = i18n.t('rdi.pipeline.error.defaultName'),

Check warning on line 7 in redisinsight/ui/src/pages/rdi/constants/errors.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
msg: string = i18n.t('rdi.pipeline.error.defaultMsg'),

Check warning on line 8 in redisinsight/ui/src/pages/rdi/constants/errors.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
) => (
<>
{`${upperFirst(name)} has an invalid structure.`}
{i18n.t('rdi.pipeline.invalidStructure', { name: upperFirst(name) })}
<br />
{msg}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
setLastPipelineManagementPage,
} from 'uiSrc/slices/app/context'
import { formatLongName, setTitle } from 'uiSrc/utils'
import { useTranslation } from 'uiSrc/i18n'
import SourcePipelineDialog from 'uiSrc/pages/rdi/pipeline-management/components/source-pipeline-dialog'
import Navigation from 'uiSrc/pages/rdi/pipeline-management/components/navigation'

Expand All @@ -32,6 +33,7 @@ export interface Props {
}

const PipelineManagementPage = ({ routes = [] }: Props) => {
const { t } = useTranslation()
const { rdiInstanceId } = useParams<{ rdiInstanceId: string }>()
const { lastViewedPage } = useAppSelector(appContextPipelineManagement)
const { name: connectedRdiInstanceName } = useAppSelector(
Expand All @@ -45,7 +47,7 @@ const PipelineManagementPage = ({ routes = [] }: Props) => {
const { pathname } = useLocation()

const rdiInstanceName = formatLongName(connectedRdiInstanceName, 33, 0, '...')
setTitle(`${rdiInstanceName} - Pipeline Management`)
setTitle(t('rdi.pipeline.pageTitle', { name: rdiInstanceName }))

useEffect(() => {
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import {
} from 'uiSrc/slices/rdi/pipeline'
import { useParams } from 'react-router-dom'
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
import { useTranslation } from 'uiSrc/i18n'

export interface Props {
trigger?: React.ReactElement
onClose?: () => void
}

const DownloadFromServerModal = (props: Props) => {
const { t } = useTranslation()
const { trigger, onClose } = props

const { loading, data } = useAppSelector(rdiPipelineSelector)
Expand Down Expand Up @@ -70,32 +72,31 @@ const DownloadFromServerModal = (props: Props) => {
{button && <Modal.Trigger>{button}</Modal.Trigger>}
<Modal.Content.Compose persistent>
<Modal.Content.Close />
<Modal.Content.Header title="Download a pipeline from the server" />
<Modal.Content.Header title={t('rdi.pipeline.download.title')} />
<Modal.Content.Body.Compose>
When downloading the pipeline configuration from the server, it will
overwrite the existing one displayed in Redis Insight.
{t('rdi.pipeline.download.body')}
</Modal.Content.Body.Compose>
<Modal.Content.Footer.Compose>
<Download
onClose={onClose}
trigger={
<TextButton>
<Button.Icon icon={SaveIcon} />
Save to file
{t('rdi.pipeline.download.saveToFile')}
</TextButton>
}
/>
<Modal.Content.Footer.Group>
<SecondaryButton size="l" onClick={onClose}>
Cancel
{t('rdi.pipeline.download.cancel')}
</SecondaryButton>
<PrimaryButton
size="l"
onClick={handleDownloadFromServer}
loading={loading}
data-testid="upload-confirm-btn"
>
Download from server
{t('rdi.pipeline.download.confirm')}
</PrimaryButton>
</Modal.Content.Footer.Group>
</Modal.Content.Footer.Compose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { monaco } from 'react-monaco-editor'
import { CodeBlock } from 'uiSrc/components'
import { rdiDryRunJobSelector } from 'uiSrc/slices/rdi/dryRun'
import { MonacoLanguage } from 'uiSrc/constants'
import { useTranslation } from 'uiSrc/i18n'

export interface Props {
target?: string
}

const NO_COMMANDS_MESSAGE = 'No Redis commands provided by the server.'

const DryRunJobCommands = ({ target }: Props) => {
const { t } = useTranslation()
const { results } = useAppSelector(rdiDryRunJobSelector)
const [commands, setCommands] = useState<string>('')

Expand All @@ -22,13 +22,15 @@ const DryRunJobCommands = ({ target }: Props) => {
return
}

const noCommandsMessage = t('rdi.pipeline.dryRun.noCommands')

try {
const targetCommands = results?.output?.find(
(el) => el.connection === target,
)?.commands

if (!targetCommands) {
setCommands(NO_COMMANDS_MESSAGE)
setCommands(noCommandsMessage)
return
}
monaco.editor
Expand All @@ -41,9 +43,9 @@ const DryRunJobCommands = ({ target }: Props) => {
setCommands(data)
})
} catch (e) {
setCommands(NO_COMMANDS_MESSAGE)
setCommands(noCommandsMessage)
}
}, [results, target])
}, [results, target, t])

return (
<div className="rdi-dry-run__codeBlock" data-testid="commands-output">
Expand Down
Loading
Loading