Skip to content

Commit

Permalink
Merge pull request #1652 from TouK/process-scenario-rename
Browse files Browse the repository at this point in the history
Process -> Scenario labels rename
  • Loading branch information
arkadius authored Jul 14, 2021
2 parents 1aee704 + 19f8a9f commit 6635fb8
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions ui/client/common/DialogMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ProcessId} from "../types"
export const unsavedProcessChanges = () => {
return i18next.t(
"dialogMessages.unsavedProcessChanges",
"There are some unsaved process changes. Do you want to discard unsaved changes?",
"There are some unsaved scenario changes. Do you want to discard unsaved changes?",
)
}

Expand Down Expand Up @@ -39,7 +39,7 @@ export const deleteComment = () => {
export const cantArchiveRunningProcess = () => {
return i18next.t(
"dialogMessages.cantArchiveRunningProcess",
"You can't archive running process! Stop it first and then click 'archive' button again.",
"You can't archive running scenario! Stop it first and then click 'archive' button again.",
)
}

Expand Down
2 changes: 1 addition & 1 deletion ui/client/components/MenuBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function MenuBar({appPath, rightElement = null, leftElement = null, ...pr

function buildMenu() {
const defaultMenuItems: MenuItemData[] = [
{show: true, path: ProcessesTabData.path, title: t("menu.processes", "Processes")},
{show: true, path: ProcessesTabData.path, title: t("menu.processes", "Scenarios")},
{show: showSignals, path: Signals.path, title: t("menu.signals", "Signals")},
{show: showAdmin, path: AdminPage.path, title: t("menu.adminPage", "Admin")},
]
Expand Down
10 changes: 5 additions & 5 deletions ui/client/components/Process/messages.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import i18next from "i18next"

export const unknownTooltip = () => i18next.t("process.unknownTooltip","Unknown state of the process..")
export const unknownTooltip = () => i18next.t("process.unknownTooltip","Unknown state of the scenario..")

export const unknownDescription = () => i18next.t("process.unknownDescription","Unknown state of the process..")
export const unknownDescription = () => i18next.t("process.unknownDescription","Unknown state of the scenario..")

export const descriptionSubprocess = () => i18next.t("process.descriptionSubprocess","This is a subprocess")
export const descriptionSubprocess = () => i18next.t("process.descriptionSubprocess","This is a scenario fragment")

export const descriptionProcessArchived = () => i18next.t("process.descriptionProcessArchived","This process was archived")
export const descriptionProcessArchived = () => i18next.t("process.descriptionProcessArchived","This scenario was archived")

export const descriptionSubprocessArchived = () => i18next.t("process.descriptionSubprocessArchived","This subprocess was archived")
export const descriptionSubprocessArchived = () => i18next.t("process.descriptionSubprocessArchived","This scenario fragment was archived")
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ function CalculateCountsDialog(): JSX.Element {
header={t("calculateCounts.title", "counts")}
>
<Picker
label={t("calculateCounts.processCountsFrom", "Process counts from")}
label={t("calculateCounts.processCountsFrom", "Scenario counts from")}
onChange={setFrom}
value={from}
/>
<Picker
label={t("calculateCounts.processCountsTo", "Process counts to")}
label={t("calculateCounts.processCountsTo", "Scenario counts to")}
onChange={setTo}
value={to}
/>
Expand Down
4 changes: 2 additions & 2 deletions ui/client/components/modals/SaveProcessDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function SaveProcessDialog(): JSX.Element {
return (
<GenericModalDialog init={reset} confirm={confirm} type={Dialogs.types.saveProcess}>
<p>{isRenamed ?
t("saveProcess.renameTitle", "Save process and rename to {{name}}", {name: unsavedNewName}) :
t("saveProcess.title", "Save process {{name}}", {name: processName})
t("saveProcess.renameTitle", "Save scenario and rename to {{name}}", {name: unsavedNewName}) :
t("saveProcess.title", "Save scenario {{name}}", {name: processName})
}</p>
<CommentInput onChange={onInputChange} value={comment}/>
</GenericModalDialog>
Expand Down
4 changes: 2 additions & 2 deletions ui/client/components/table/AddProcessButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export function AddProcessButton(props: {isSubprocess: boolean, className?: stri
const clashedNames = useClashedNames(addOpened)
const {t} = useTranslation()

const message = isSubprocess ? t("addProcessButton.subprocess", "Create new subprocess") :
t("addProcessButton.process", "Create new process")
const message = isSubprocess ? t("addProcessButton.subprocess", "Create new fragment") :
t("addProcessButton.process", "Create new scenario")

return (
<>
Expand Down
6 changes: 3 additions & 3 deletions ui/client/components/table/StatusFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import TableSelect, {OptionType} from "./TableSelect"
import {useParseValue} from "./useParseValue"

const options: OptionType<boolean>[] = [
{label: "Show all processes"},
{label: "Show only deployed processes", value: true},
{label: "Show only not deployed processes", value: false},
{label: "Show all scenarios"},
{label: "Show only deployed scenarios", value: true},
{label: "Show only not deployed scenarios", value: false},
]

export function StatusFilter(props: ValueFieldProps<boolean>): JSX.Element {
Expand Down
6 changes: 3 additions & 3 deletions ui/client/components/table/SubprocessFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import TableSelect, {OptionType} from "./TableSelect"
import {useParseValue} from "./useParseValue"

const options: OptionType<boolean>[] = [
{label: "Show all types processes"},
{label: "Show only processes", value: false},
{label: "Show only subprocesses", value: true},
{label: "Show all types scenarios"},
{label: "Show only scenarios", value: false},
{label: "Show only fragments", value: true},
]

export function SubprocessFilter(props: ValueFieldProps<boolean>): JSX.Element {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function CancelDeployButton(props: ToolbarButtonProps) {
disabled={!available}
icon={<Icon/>}
onClick={() => dispatch(toggleProcessActionDialog(
t("panels.actions.deploy-canel.dialog", "Cancel process"),
t("panels.actions.deploy-canel.dialog", "Cancel scenario"),
(p, c) => HttpService.cancel(p, c).finally(() => dispatch(loadProcessState(processId))),
false,
))}
Expand Down
4 changes: 2 additions & 2 deletions ui/client/components/toolbars/status/buttons/DeployButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function DeployButton(props: ToolbarButtonProps) {

const {t} = useTranslation()
const deployToolTip = !capabilities.deploy ?
t("panels.actions.deploy.tooltips.forbidden", "Deploy forbidden for current process.") :
t("panels.actions.deploy.tooltips.forbidden", "Deploy forbidden for current scenario.") :
hasErrors ?
t("panels.actions.deploy.tooltips.error", "Cannot deploy due to errors. Please look at the left panel for more details.") :
!saveDisabled ?
Expand All @@ -40,7 +40,7 @@ export default function DeployButton(props: ToolbarButtonProps) {
icon={<Icon/>}
title={deployToolTip}
onClick={() => dispatch(toggleProcessActionDialog(
t("panels.actions.deploy.dialog", "Deploy process"),
t("panels.actions.deploy.dialog", "Deploy scenario"),
(p, c) => HttpService.deploy(p, c).finally(() => dispatch(loadProcessState(processId))),
true,
))}
Expand Down
2 changes: 1 addition & 1 deletion ui/client/containers/Processes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ function Processes() {

export const ProcessesTabData = {
path: `${nkPath}/processes`,
header: "Processes",
header: "Scenarios",
Component: Processes,
}
4 changes: 2 additions & 2 deletions ui/client/containers/SubProcesses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function ShowProcessIcon({process}: {process: ProcessType}) {
const {t} = useTranslation()
return (
<ProcessLink processId={process.name}>
<TableRowIcon glyph="edit" title={t("tableRowIcon-edit-subprocess", "Edit subprocess")}/>
<TableRowIcon glyph="edit" title={t("tableRowIcon-edit-subprocess", "Edit fragment")}/>
</ProcessLink>
)
}
Expand Down Expand Up @@ -66,6 +66,6 @@ function SubProcesses() {

export const SubProcessesTabData = {
path: `${ProcessesTabData.path}/subprocesses`,
header: "Subprocesses",
header: "Fragments",
Component: SubProcesses,
}
2 changes: 1 addition & 1 deletion ui/client/containers/admin/CancelIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export function CancelIcon({processState, onCancel, process}: {processState: any
if (!ProcessStateUtils.canCancel(processState)) {
return null
}
return <Glyphicon glyph="stop" title="Cancel process" onClick={cancel}/>
return <Glyphicon glyph="stop" title="Cancel scenario" onClick={cancel}/>
}
2 changes: 1 addition & 1 deletion ui/client/containers/admin/DeployIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ export function DeployIcon({processState, onDeploy, process}: {processState: any
if (!ProcessStateUtils.canDeploy(processState)) {
return null
}
return <Glyphicon glyph="play" title="Deploy process" onClick={onClick}/>
return <Glyphicon glyph="play" title="Deploy scenario" onClick={onClick}/>
}
6 changes: 3 additions & 3 deletions ui/client/containers/editItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function EditItem({process}: {process: ProcessType}) {
const {t} = useTranslation()
return (
<ProcessLink processId={process.name}>
<TableRowIcon glyph="edit" title={t("tableRowIcon-edit", "Edit process")}/>
<TableRowIcon glyph="edit" title={t("tableRowIcon-edit", "Edit scenario")}/>
</ProcessLink>
)
}
Expand All @@ -17,8 +17,8 @@ export function ShowItem({process}: {process: ProcessType}) {
const {t} = useTranslation()

const title = process.isSubprocess ?
t("tableRowIcon-show-subprocess", "Show subprocess") :
t("tableRowIcon-show", "Show process")
t("tableRowIcon-show-subprocess", "Show fragment") :
t("tableRowIcon-show", "Show scenario")

return (
<ProcessLink processId={process.name}>
Expand Down
2 changes: 1 addition & 1 deletion ui/client/cypress/integration/processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("Processes list", () => {
})

it("should allow creating new process", function() {
cy.contains(/^create new process$/i).should("be.visible").click()
cy.contains(/^create new scenario$/i).should("be.visible").click()
cy.get("#newProcessId").type(this.processName)
cy.contains(/^create$/i).should("be.enabled").click()
cy.url().should("contain", `visualization\/${this.processName}`)
Expand Down

0 comments on commit 6635fb8

Please sign in to comment.