Skip to content

Commit

Permalink
Custom scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
mproch committed Jul 23, 2021
1 parent 53c79cd commit 25db02c
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions ui/client/containers/admin/CustomProcesses.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable i18next/no-literal-string */
import React from "react"
import {Td, Tr} from "reactable"
import Date from "../../components/common/Date"
Expand All @@ -10,6 +9,7 @@ import {Page} from "../Page"
import {Filterable, getProcessState, ProcessesList, RowsRenderer} from "../ProcessesList"
import {CancelIcon} from "./CancelIcon"
import {DeployIcon} from "./DeployIcon"
import {useTranslation} from "react-i18next"

const ElementsRenderer: RowsRenderer = ({processes, getProcesses, statuses}) => {
const processState = getProcessState(statuses)
Expand All @@ -36,17 +36,20 @@ const ElementsRenderer: RowsRenderer = ({processes, getProcesses, statuses}) =>

const sortable = ["name", "category", "modifyDate", "createdAt"]
const filterable: Filterable = ["name", "processCategory"]
const columns = [
{key: "name", label: "Process name"},
{key: "category", label: "Category"},
{key: "createdAt", label: "Created at"},
{key: "modifyDate", label: "Last modification"},
{key: "status", label: "Status"},
{key: "deploy", label: "Deploy"},
{key: "cancel", label: "Cancel"},
]


export function CustomProcesses(): JSX.Element {
const {t} = useTranslation()

const columns = [
{key: "name", label: t("customScenario.name", "Name")},
{key: "category", label: t("customScenario.category", "Category")},
{key: "createdAt", label: t("customScenario.createdAt", "Created at")},
{key: "modifyDate", label: t("customScenario.modifyDate", "Last modification")},
{key: "status", label: t("customScenario.status", "Status")},
{key: "deploy", label: t("customScenario.deploy", "Deploy")},
{key: "cancel", label: t("customScenario.cancel", "Cancel")},
]

return (
<Page className={tabStyles.tabContentPage}>
Expand All @@ -67,7 +70,7 @@ export function CustomProcesses(): JSX.Element {
}

export const CustomProcessesTabData = {
header: "Custom Processes",
header: "Custom scenarios",
key: "custom-processes",
Component: CustomProcesses,
}

0 comments on commit 25db02c

Please sign in to comment.