Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process -> Scenario labels rename #1652

Merged
merged 5 commits into from
Jul 14, 2021
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
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
2 changes: 1 addition & 1 deletion ui/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"start:backend-docker": "npm run clean-translations && start-server-and-test start-backend:docker http-get://localhost:8080/static/main.html start",
"start:backend-staging": "npm run clean-translations && BACKEND_DOMAIN=https://staging.nussknacker.io webpack serve",
"start:backend-demo": "npm run clean-translations && BACKEND_DOMAIN=https://demo.nussknacker.io webpack serve",
"start-backend:docker": "docker run -i -p 8080:8080 -e CONFIG_FORCE_processTypes_streaming_engineConfig_type=stub -e NUSSKNACKER_CONFIG_FILE=/opt/nussknacker/conf/dev-application.conf -P touk/nussknacker:staging-latest --pull always",
"start-backend:docker": "docker run -i -p 8080:8080 -e CONFIG_FORCE_processTypes_streaming_engineConfig_type=stub -e NUSSKNACKER_CONFIG_FILE=/opt/nussknacker/conf/dev-application.conf --pull always -P touk/nussknacker:staging-latest",
"pretest": "npm run check",
"test:unit": "jest",
"test:e2e": "cypress run",
Expand Down