diff --git a/CHANGELOG.md b/CHANGELOG.md index 0547d50c..a0fb66df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## v2.2.1 - 2023.08.15 +- Update back link arrows + ## v2.1.3 - 2023.07.10 - fix link to parent task diff --git a/cassandra-distributed-task-queue-ui/package.json b/cassandra-distributed-task-queue-ui/package.json index 1c492150..63e43ff0 100644 --- a/cassandra-distributed-task-queue-ui/package.json +++ b/cassandra-distributed-task-queue-ui/package.json @@ -36,10 +36,10 @@ "test": "mocha **/*.test.ts" }, "peerDependencies": { - "@skbkontur/react-icons": ">=3 <=5", + "@skbkontur/icons": ">=1 <2", "@skbkontur/react-ui": ">=2 <=4", - "react": ">=16 <=17", - "react-dom": ">=16 <=17", + "react": ">=16 <=18", + "react-dom": ">=16 <=18", "react-router-dom": ">=6" }, "dependencies": { @@ -62,7 +62,7 @@ "@babel/preset-typescript": "^7.14.5", "@babel/runtime": "^7.14.8", "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", - "@skbkontur/react-icons": "^5.2.4", + "@skbkontur/icons": "^1.3.0", "@skbkontur/react-ui": "^4.1.0", "@storybook/addon-actions": "^6.3.5", "@storybook/addons": "^6.3.5", @@ -72,8 +72,8 @@ "@types/mocha": "^9.0.0", "@types/qs": "^6.9.7", "@types/react": "^17.0.15", - "@types/react-router-dom": "^5.1.8", "@types/react-dom": "^17.0.9", + "@types/react-router-dom": "^5.1.8", "@typescript-eslint/eslint-plugin": "^4.28.4", "@typescript-eslint/parser": "^4.28.4", "babel-loader": "^8.2.2", diff --git a/cassandra-distributed-task-queue-ui/src/components/Accordion/Accordion.tsx b/cassandra-distributed-task-queue-ui/src/components/Accordion/Accordion.tsx index 1a7b22a5..0a708aaf 100644 --- a/cassandra-distributed-task-queue-ui/src/components/Accordion/Accordion.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/Accordion/Accordion.tsx @@ -1,5 +1,5 @@ -import ArrowTriangleDownIcon from "@skbkontur/react-icons/ArrowTriangleDown"; -import ArrowTriangleRightIcon from "@skbkontur/react-icons/ArrowTriangleRight"; +import { ArrowShapeTriangleADownIcon16Regular } from "@skbkontur/icons/ArrowShapeTriangleADownIcon16Regular"; +import { ArrowShapeTriangleARightIcon16Regular } from "@skbkontur/icons/ArrowShapeTriangleARightIcon16Regular"; import { Fill, Fit, RowStack } from "@skbkontur/react-stack-layout"; import { ThemeContext, Hint, Link } from "@skbkontur/react-ui"; import { Theme } from "@skbkontur/react-ui/lib/theming/Theme"; @@ -208,7 +208,11 @@ export class Accordion extends React.Component - {collapsedSelf ? : } + {collapsedSelf ? ( + + ) : ( + + )} {title} diff --git a/cassandra-distributed-task-queue-ui/src/components/AllowCopyToClipboard.tsx b/cassandra-distributed-task-queue-ui/src/components/AllowCopyToClipboard.tsx index fcfebfc3..eb9e0b4a 100644 --- a/cassandra-distributed-task-queue-ui/src/components/AllowCopyToClipboard.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/AllowCopyToClipboard.tsx @@ -1,4 +1,4 @@ -import CopyIcon from "@skbkontur/react-icons/Copy"; +import { CopyIcon16Regular } from "@skbkontur/icons/CopyIcon16Regular"; import { Link, Toast } from "@skbkontur/react-ui"; import copy from "copy-to-clipboard"; import React, { PropsWithChildren } from "react"; @@ -19,7 +19,7 @@ export class AllowCopyToClipboard extends React.Component> return ( (this.children = x)}>{this.props.children}{" "} - } onClick={this.handleCopy} /> + } onClick={this.handleCopy} /> ); } diff --git a/cassandra-distributed-task-queue-ui/src/components/ErrorHandling/ErrorHandlingContainerModal.tsx b/cassandra-distributed-task-queue-ui/src/components/ErrorHandling/ErrorHandlingContainerModal.tsx index c39c5354..f6c49dae 100644 --- a/cassandra-distributed-task-queue-ui/src/components/ErrorHandling/ErrorHandlingContainerModal.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/ErrorHandling/ErrorHandlingContainerModal.tsx @@ -1,4 +1,4 @@ -import CopyIcon from "@skbkontur/react-icons/Copy"; +import { CopyIcon16Regular } from "@skbkontur/icons/CopyIcon16Regular"; import { Fit, RowStack } from "@skbkontur/react-stack-layout"; import { Button, Link, Modal, ThemeContext } from "@skbkontur/react-ui"; import { Theme } from "@skbkontur/react-ui/lib/theming/Theme"; @@ -87,7 +87,7 @@ export class ErrorHandlingContainerModal extends React.Component<

Client stack trace

- } onClick={() => this.copyData(stack)}> + } onClick={() => this.copyData(stack)}> Скопировать @@ -106,7 +106,9 @@ export class ErrorHandlingContainerModal extends React.Component<

Server stack trace

- } onClick={() => this.copyData(serverStack)}> + } + onClick={() => this.copyData(serverStack)}> Скопировать diff --git a/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.styles.ts b/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.styles.ts deleted file mode 100644 index 7cf2d341..00000000 --- a/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.styles.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { css } from "@skbkontur/react-ui/lib/theming/Emotion"; - -export const jsStyles = { - goBackLink(): string { - return css` - width: 35px; - height: 35px; - display: inline-block; - opacity: 0.7; - - &:hover { - opacity: 1; - } - `; - }, -}; diff --git a/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.tsx b/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.tsx deleted file mode 100644 index 00282492..00000000 --- a/cassandra-distributed-task-queue-ui/src/components/GoBack/GoBackLink.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; - -import { RouterLink } from "../RouterLink/RouterLink"; - -import { jsStyles } from "./GoBackLink.styles"; - -export const GoBackLink = ({ backUrl }: { backUrl?: Nullable }): JSX.Element => ( - - - - - - -); diff --git a/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.styles.ts b/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.styles.ts index 014d8513..8da476cb 100644 --- a/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.styles.ts +++ b/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.styles.ts @@ -21,6 +21,12 @@ export const jsStyles = { `; }, + withArrow(): string { + return css` + padding: ${globalVerticalPadding}px ${newBaseSize * 12}px 0; + `; + }, + topRightTools(): string { return css` position: absolute; @@ -30,20 +36,9 @@ export const jsStyles = { `; }, - greyLineHeader(t: Theme): string { - return css` - background-color: ${t.bgDisabled}; - padding: ${2 * baseSize}px ${globalHorizontalPadding}px; - margin-left: ${-globalHorizontalPadding}px; - margin-right: ${-globalHorizontalPadding}px; - margin-bottom: ${3 * baseSize}px; - word-break: break-all; - `; - }, - - greyContent(): string { + headerContent(): string { return css` - margin-top: ${2 * baseSize}px; + margin-top: ${3 * newBaseSize}px; `; }, @@ -52,7 +47,7 @@ export const jsStyles = { margin: 0; font-weight: 700; font-size: 29px; - line-height: 40px; + line-height: 48px; `; }, @@ -61,20 +56,42 @@ export const jsStyles = { display: flex; flex-direction: column; flex: 1 1 auto; - padding-bottom: ${globalVerticalPadding}px; + padding-bottom: ${newBaseSize * 5}px; `; }, header(): string { return css` - margin-bottom: ${3 * baseSize}px; + margin-bottom: ${5 * newBaseSize}px; `; }, - backLinkContainer(): string { + borderBottom(t: Theme): string { return css` - margin-bottom: ${3 * baseSize}px; - margin-left: -4px; + border-bottom: 2px solid ${t.grayXLight}; + `; + }, + + backLink(): string { + return css` + position: absolute; + left: 0; + height: ${newBaseSize * 12}px; + width: ${newBaseSize * 12}px; + display: flex; + align-items: center; + justify-content: center; + `; + }, + + backLinkIcon(t: Theme): string { + return css` + display: block; + color: #757575; + + &:hover { + color: ${t.textColorDefault}; + } `; }, diff --git a/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.tsx b/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.tsx index 5d007870..cfe96710 100644 --- a/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/Layouts/CommonLayout.tsx @@ -1,7 +1,8 @@ -import ArrowChevronLeftIcon from "@skbkontur/react-icons/ArrowChevronLeft"; +import { ArrowALeftIcon24Regular } from "@skbkontur/icons/ArrowALeftIcon24Regular"; import { Fill, Fit, RowStack } from "@skbkontur/react-stack-layout"; import { Loader, ThemeContext } from "@skbkontur/react-ui"; -import React from "react"; +import React, { CSSProperties } from "react"; +import { To } from "react-router-dom"; import { RouterLink } from "../RouterLink/RouterLink"; @@ -10,13 +11,14 @@ import { jsStyles } from "./CommonLayout.styles"; interface CommonLayoutProps { topRightTools?: Nullable | string; children?: React.ReactNode; - style?: any; + withArrow?: boolean; + style?: CSSProperties; } -export function CommonLayout({ children, topRightTools, ...restProps }: CommonLayoutProps): JSX.Element { +export function CommonLayout({ children, topRightTools, withArrow, ...restProps }: CommonLayoutProps): JSX.Element { const theme = React.useContext(ThemeContext); return ( -
+
{topRightTools &&
{topRightTools}
} {children}
@@ -38,66 +40,44 @@ CommonLayout.Content = function Content({ children, ...restProps }: CommonLayout interface CommonLayoutHeaderProps { title: string | JSX.Element; - tools?: JSX.Element; + tools?: JSX.Element | null; + children?: JSX.Element; + borderBottom?: boolean; } -CommonLayout.Header = function Header({ title, tools, ...restProps }: CommonLayoutHeaderProps): JSX.Element { - return ( -
- - -

- {title} -

-
- {tools && {tools}} -
-
- ); -}; - -interface CommonLayoutGreyLineHeaderProps { - "data-tid"?: Nullable; - children?: Nullable; - title: string | JSX.Element; - tools?: null | JSX.Element; -} - -CommonLayout.GreyLineHeader = function GreyLineHeader({ - children, +CommonLayout.Header = function Header({ title, tools, -}: CommonLayoutGreyLineHeaderProps): JSX.Element { + children, + borderBottom, + ...restProps +}: CommonLayoutHeaderProps): JSX.Element { const theme = React.useContext(ThemeContext); return ( -
+
- +

{title}

-
- {tools && {tools}} + + {tools && {tools}}
- {children &&
{children}
} + {children &&
{children}
}
); }; interface CommonLayoutGoBackProps { - children?: React.ReactNode; - to: string; + to: To; } -CommonLayout.GoBack = function CommonLayoutGoBack({ children, to }: CommonLayoutGoBackProps): JSX.Element { +CommonLayout.GoBack = function CommonLayoutGoBack({ to }: CommonLayoutGoBackProps): JSX.Element { + const theme = React.useContext(ThemeContext); return ( -
- - - {"\u00A0"} - {children} - -
+ + + ); }; diff --git a/cassandra-distributed-task-queue-ui/src/components/RouterLink/RouterLink.tsx b/cassandra-distributed-task-queue-ui/src/components/RouterLink/RouterLink.tsx index 0f88e9fe..e7d887f6 100644 --- a/cassandra-distributed-task-queue-ui/src/components/RouterLink/RouterLink.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/RouterLink/RouterLink.tsx @@ -1,11 +1,11 @@ import { ThemeContext } from "@skbkontur/react-ui"; import React from "react"; -import { Link, Location } from "react-router-dom"; +import { Link, To } from "react-router-dom"; import { jsStyles } from "./RouterLink.styles"; interface RouterLinkProps { - to: string | Partial; + to: To; children?: React.ReactNode; className?: string; } diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskChainTree/TaskStateIcon.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskChainTree/TaskStateIcon.tsx index fdf4d111..575124af 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskChainTree/TaskStateIcon.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskChainTree/TaskStateIcon.tsx @@ -1,8 +1,8 @@ -import ClearIcon from "@skbkontur/react-icons/Clear"; -import ClockIcon from "@skbkontur/react-icons/Clock"; -import DeleteIcon from "@skbkontur/react-icons/Delete"; -import HelpLiteIcon from "@skbkontur/react-icons/HelpLite"; -import OkIcon from "@skbkontur/react-icons/Ok"; +import { CheckAIcon16Regular } from "@skbkontur/icons/CheckAIcon16Regular"; +import { QuestionSquareIcon16Regular } from "@skbkontur/icons/QuestionSquareIcon16Regular"; +import { TimeClockIcon16Regular } from "@skbkontur/icons/TimeClockIcon16Regular"; +import { XCircleIcon16Regular } from "@skbkontur/icons/XCircleIcon16Regular"; +import { XIcon16Regular } from "@skbkontur/icons/XIcon16Regular"; import { ThemeContext } from "@skbkontur/react-ui"; import { Theme } from "@skbkontur/react-ui/lib/theming/Theme"; import React from "react"; @@ -33,22 +33,22 @@ export function TaskStateIcon({ taskState }: TaskStateIconProps): JSX.Element { switch (taskState) { case TaskState.Unknown: - return ; + return ; case TaskState.New: - return ; + return ; case TaskState.WaitingForRerun: - return ; + return ; case TaskState.WaitingForRerunAfterError: - return ; + return ; case TaskState.Finished: - return ; + return ; case TaskState.InProcess: - return ; + return ; case TaskState.Fatal: - return ; + return ; case TaskState.Canceled: - return ; + return ; default: - return ; + return ; } } diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskDetailsPage/TaskDetailsPage.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskDetailsPage/TaskDetailsPage.tsx index 2a0c74a0..ca1afa66 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskDetailsPage/TaskDetailsPage.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskDetailsPage/TaskDetailsPage.tsx @@ -1,6 +1,6 @@ -import DeleteIcon from "@skbkontur/react-icons/Delete"; -import ListRowsIcon from "@skbkontur/react-icons/ListRows"; -import RefreshIcon from "@skbkontur/react-icons/Refresh"; +import { ArrowRoundTimeForwardIcon16Regular } from "@skbkontur/icons/ArrowRoundTimeForwardIcon16Regular"; +import { TextAlignCenterJustifyIcon16Regular } from "@skbkontur/icons/TextAlignCenterJustifyIcon16Regular"; +import { XIcon16Regular } from "@skbkontur/icons/XIcon16Regular"; import { ColumnStack, Fill, Fit, RowStack } from "@skbkontur/react-stack-layout"; import { Button, Link, Modal, ThemeContext } from "@skbkontur/react-ui"; import React from "react"; @@ -11,7 +11,6 @@ import { ICustomRenderer } from "../../Domain/CustomRenderer"; import { cancelableStates, rerunableStates } from "../../Domain/TaskStateExtensions"; import { searchRequestMapping } from "../../containers/TasksPageContainer"; import { Accordion } from "../Accordion/Accordion"; -import { GoBackLink } from "../GoBack/GoBackLink"; import { CommonLayout } from "../Layouts/CommonLayout"; import { RouterLink } from "../RouterLink/RouterLink"; import { TaskDetailsMetaTable } from "../TaskDetailsMetaTable/TaskDetailsMetaTable"; @@ -71,9 +70,9 @@ export function TaskDetailsPage({ {relatedTasksRequest && ( - + {"\u00A0"} View related tasks tree @@ -81,16 +80,20 @@ export function TaskDetailsPage({ )} {isCancelable && ( - } use="danger" data-tid={"CancelButton"} onClick={cancel}> + } use="danger" data-tid="CancelButton" onClick={cancel}> Cancel task )} {isRerunable && ( - } data-tid={"RerunButton"} onClick={rerun}> + )} @@ -151,23 +154,20 @@ export function TaskDetailsPage({ return (
- + + {taskDetails && ( - - - Задача {taskDetails.taskMeta.name} - - } + title={`Задача ${taskDetails.taskMeta.name}`} tools={taskDetails && allowRerunOrCancel ? renderButtons() : null}> - + )} diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskNotFoundPage/TaskNotFoundPage.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskNotFoundPage/TaskNotFoundPage.tsx index ba5e8510..3c97791f 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskNotFoundPage/TaskNotFoundPage.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskNotFoundPage/TaskNotFoundPage.tsx @@ -3,7 +3,6 @@ import React from "react"; import { useLocation } from "react-router-dom"; import { RouteUtils } from "../../Domain/Utils/RouteUtils"; -import { GoBackLink } from "../GoBack/GoBackLink"; import { CommonLayout } from "../Layouts/CommonLayout"; import { CloudsFar, CloudsMed, CloudsNear } from "./Clouds"; @@ -14,8 +13,8 @@ export const TaskNotFoundPage = (): JSX.Element => { const theme = React.useContext(ThemeContext); return (
- - + +

Страница не найдена diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskStatesSelect/TaskStatesSelect.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskStatesSelect/TaskStatesSelect.tsx index 79d5b678..29e361b5 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskStatesSelect/TaskStatesSelect.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskStatesSelect/TaskStatesSelect.tsx @@ -1,4 +1,4 @@ -import ArrowTriangleDownIcon from "@skbkontur/react-icons/ArrowTriangleDown"; +import { ArrowShapeTriangleADownIcon16Regular } from "@skbkontur/icons/ArrowShapeTriangleADownIcon16Regular"; import { ColumnStack, Fit } from "@skbkontur/react-stack-layout"; import { Button, Checkbox, Tooltip } from "@skbkontur/react-ui"; import React from "react"; @@ -34,7 +34,7 @@ export class TaskStatesSelect extends React.Component { {value.length ? `Выбрано состояний: ${value.length}` : "Выбрать состояние"} - + diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskTable/TaskDetails/TaskDetails.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskTable/TaskDetails/TaskDetails.tsx index cd201232..50e64314 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskTable/TaskDetails/TaskDetails.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskTable/TaskDetails/TaskDetails.tsx @@ -1,5 +1,5 @@ -import DeleteIcon from "@skbkontur/react-icons/Delete"; -import RefreshIcon from "@skbkontur/react-icons/Refresh"; +import { ArrowRoundTimeForwardIcon16Regular } from "@skbkontur/icons/ArrowRoundTimeForwardIcon16Regular"; +import { XIcon16Regular } from "@skbkontur/icons/XIcon16Regular"; import { ColumnStack, Fill, Fit, RowStack } from "@skbkontur/react-stack-layout"; import { Link, ThemeContext } from "@skbkontur/react-ui"; import React from "react"; @@ -88,7 +88,7 @@ export function TaskDetails(props: TaskDetailsProps): JSX.Element { data-tid="Cancel" disabled={!cancelableStates.includes(taskInfo.state)} onClick={onCancel} - icon={}> + icon={}> Cancel @@ -97,7 +97,7 @@ export function TaskDetails(props: TaskDetailsProps): JSX.Element { data-tid="Rerun" disabled={!rerunableStates.includes(taskInfo.state)} onClick={onRerun} - icon={}> + icon={}> Rerun diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskTimeLine/TaskTimeLine.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskTimeLine/TaskTimeLine.tsx index bfdd5a28..2814afee 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskTimeLine/TaskTimeLine.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskTimeLine/TaskTimeLine.tsx @@ -1,13 +1,13 @@ -import { ArrowBoldDown } from "@skbkontur/react-icons"; -import ArrowBoldUpIcon from "@skbkontur/react-icons/ArrowBoldUp"; -import ArrowCorner1Icon from "@skbkontur/react-icons/ArrowCorner1"; -import ArrowTriangleDownIcon from "@skbkontur/react-icons/ArrowTriangleDown"; -import ClearIcon from "@skbkontur/react-icons/Clear"; -import ClockIcon from "@skbkontur/react-icons/Clock"; -import DeleteIcon from "@skbkontur/react-icons/Delete"; -import DownloadIcon from "@skbkontur/react-icons/Download"; -import OkIcon from "@skbkontur/react-icons/Ok"; -import RefreshIcon from "@skbkontur/react-icons/Refresh"; +import { ArrowADownIcon16Regular } from "@skbkontur/icons/ArrowADownIcon16Regular"; +import { ArrowAUpIcon16Regular } from "@skbkontur/icons/ArrowAUpIcon16Regular"; +import { ArrowDCornerDownRightIcon16Regular } from "@skbkontur/icons/ArrowDCornerDownRightIcon16Regular"; +import { ArrowRoundTimeForwardIcon16Regular } from "@skbkontur/icons/ArrowRoundTimeForwardIcon16Regular"; +import { ArrowShapeTriangleADownIcon16Regular } from "@skbkontur/icons/ArrowShapeTriangleADownIcon16Regular"; +import { CheckAIcon16Regular } from "@skbkontur/icons/CheckAIcon16Regular"; +import { NetDownloadIcon16Regular } from "@skbkontur/icons/NetDownloadIcon16Regular"; +import { TimeClockIcon16Regular } from "@skbkontur/icons/TimeClockIcon16Regular"; +import { XCircleIcon16Regular } from "@skbkontur/icons/XCircleIcon16Regular"; +import { XIcon16Regular } from "@skbkontur/icons/XIcon16Regular"; import { Link, ThemeContext } from "@skbkontur/react-ui"; import React from "react"; import { Location } from "react-router-dom"; @@ -61,7 +61,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime } return createSimpleEntry({ title: "Started", - icon: , + icon: , date: taskMeta.startExecutingTicks, }); }; @@ -77,7 +77,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime getStartedEntry(), createSimpleEntry({ title: "Finished", - icon: , + icon: , date: taskMeta.finishExecutingTicks, }) ); @@ -87,7 +87,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime getStartedEntry(), createSimpleEntry({ title: "Failed", - icon: , + icon: , color: color, date: taskMeta.finishExecutingTicks, }) @@ -101,7 +101,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ } + icon={} content={`Restarted for ${taskMeta.attempts} times`}> {shouldStartAndStartEntries} , @@ -113,7 +113,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime const getShouldStartedEntry = (): null | JSX.Element => { return createSimpleEntry({ title: "Start scheduled", - icon: , + icon: , date: taskMeta.minimalStartTicks, }); }; @@ -124,7 +124,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ createSimpleEntry({ title: "Finished", - icon: , + icon: , color: color, date: taskMeta.finishExecutingTicks, }), @@ -135,7 +135,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ createSimpleEntry({ title: "Failed", - icon: , + icon: , color: color, date: taskMeta.finishExecutingTicks, }), @@ -146,7 +146,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ createSimpleEntry({ title: "Canceled", - icon: , + icon: , color: color, date: taskMeta.finishExecutingTicks || taskMeta.lastModificationTicks, }), @@ -158,7 +158,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime getShouldStartedEntry(), createSimpleEntry({ title: "Waiting for next run", - icon: , + icon: , color: color, }), ]; @@ -168,7 +168,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ createSimpleEntry({ title: "Waiting for complete", - icon: , + icon: , color: color, }), ]; @@ -178,7 +178,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime return [ createSimpleEntry({ title: "Waiting for start", - icon: , + icon: , color: color, }), ]; @@ -192,7 +192,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime const getEnqueuedEntry = (): null | JSX.Element => { return createSimpleEntry({ title: "Enqueued", - icon: , + icon: , date: taskMeta.ticks, }); }; @@ -203,7 +203,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime const hiddenTaskIdsCount = childTaskIds.length - visibleTaskIdsCount; const color = getIconColor(theme, "waiting"); return ( - }> + }>
Enqueued tasks:
{childTaskIds.slice(0, visibleTaskIdsCount).map(x => ( @@ -218,7 +218,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime setShowAllErrors(true)}> ...and {hiddenTaskIdsCount} more {"\u00A0"} - + )}
@@ -234,7 +234,7 @@ export function TaskTimeLine({ taskMeta, childTaskIds, getHrefToTask }: TaskTime } const color = getIconColor(theme, "waiting"); return ( - }> + }>
Parent:{" "} diff --git a/cassandra-distributed-task-queue-ui/src/components/TaskTypesSelect/TaskTypesSelect.tsx b/cassandra-distributed-task-queue-ui/src/components/TaskTypesSelect/TaskTypesSelect.tsx index 0a7bb2c5..ab8d125e 100644 --- a/cassandra-distributed-task-queue-ui/src/components/TaskTypesSelect/TaskTypesSelect.tsx +++ b/cassandra-distributed-task-queue-ui/src/components/TaskTypesSelect/TaskTypesSelect.tsx @@ -1,5 +1,5 @@ -import ArrowTriangleDownIcon from "@skbkontur/react-icons/ArrowTriangleDown"; -import SearchIcon from "@skbkontur/react-icons/Search"; +import { ArrowShapeTriangleADownIcon16Regular } from "@skbkontur/icons/ArrowShapeTriangleADownIcon16Regular"; +import { SearchLoupeIcon16Regular } from "@skbkontur/icons/SearchLoupeIcon16Regular"; import { ColumnStack, Fit, RowStack } from "@skbkontur/react-stack-layout"; import { Button, Checkbox, Input, Tooltip } from "@skbkontur/react-ui"; import React from "react"; @@ -31,7 +31,7 @@ export class TaskTypesSelect extends React.Component {value.length ? `Выбрано задач: ${value.length}` : "Выбрать тип задач"} - + @@ -85,7 +85,7 @@ export class TaskTypesSelect extends React.Component } + rightIcon={} onValueChange={val => this.setState({ query: val })} /> diff --git a/cassandra-distributed-task-queue-ui/src/containers/TaskChainsTreeContainer.tsx b/cassandra-distributed-task-queue-ui/src/containers/TaskChainsTreeContainer.tsx index 74b07713..08ec3775 100644 --- a/cassandra-distributed-task-queue-ui/src/containers/TaskChainsTreeContainer.tsx +++ b/cassandra-distributed-task-queue-ui/src/containers/TaskChainsTreeContainer.tsx @@ -1,4 +1,3 @@ -import { RowStack } from "@skbkontur/react-stack-layout"; import { Loader } from "@skbkontur/react-ui"; import _ from "lodash"; import React, { useEffect, useState } from "react"; @@ -13,7 +12,6 @@ import { } from "../Domain/RtqMonitoringSearchRequestUtils"; import { RouteUtils } from "../Domain/Utils/RouteUtils"; import { ErrorHandlingContainer } from "../components/ErrorHandling/ErrorHandlingContainer"; -import { GoBackLink } from "../components/GoBack/GoBackLink"; import { CommonLayout } from "../components/Layouts/CommonLayout"; import { TaskChainTree } from "../components/TaskChainTree/TaskChainTree"; @@ -66,15 +64,9 @@ export const TaskChainsTreeContainer = ({ const getTaskLocation = (id: string): string | Partial => ({ pathname: `../${id}` }); return ( - - - - Дерево задач - - } - /> + + +
diff --git a/cassandra-distributed-task-queue-ui/stories/TimeLine.stories.tsx b/cassandra-distributed-task-queue-ui/stories/TimeLine.stories.tsx index 989cbf64..16284ca5 100644 --- a/cassandra-distributed-task-queue-ui/stories/TimeLine.stories.tsx +++ b/cassandra-distributed-task-queue-ui/stories/TimeLine.stories.tsx @@ -1,6 +1,6 @@ -import DeleteIcon from "@skbkontur/react-icons/Delete"; -import OkIcon from "@skbkontur/react-icons/Ok"; -import RefreshIcon from "@skbkontur/react-icons/Refresh"; +import { ArrowRoundTimeForwardIcon16Regular } from "@skbkontur/icons/ArrowRoundTimeForwardIcon16Regular"; +import { CheckAIcon16Regular } from "@skbkontur/icons/CheckAIcon16Regular"; +import { XIcon16Regular } from "@skbkontur/icons/XIcon16Regular"; import React from "react"; import { TimeLine } from "../src/components/TaskTimeLine/TimeLine/TimeLine"; @@ -12,15 +12,15 @@ export default { export const Direct = () => ( - }> + }>
Started
Now
- }> + }>
Started
Now
- }> + }>
Started 2
Now
@@ -29,27 +29,27 @@ export const Direct = () => ( export const WithOneBranching = () => ( - }> + }>
Started
Now
- }> + }>
Started
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
@@ -60,33 +60,33 @@ export const WithOneBranching = () => ( export const WithOneBranchingOnManyBranches = () => ( - }> + }>
Started
Now
- }> + }>
Started
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
@@ -97,49 +97,49 @@ export const WithOneBranchingOnManyBranches = () => ( export const WithManyBranchings = () => ( - }> + }>
Started
Now
- }> + }>
Started
Now
- }> + }>
Started 2
Now
- }> + }>
Started
Now
- }> + }>
Started
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
- }> + }>
Started 2
Now
@@ -147,7 +147,7 @@ export const WithManyBranchings = () => (
- }> + }>
Started 2
Now
@@ -158,7 +158,7 @@ export const WithManyBranchings = () => ( export const WithCycles = () => ( - }> + }>
Started
Now
@@ -169,20 +169,20 @@ export const WithCycles = () => (
Now
}> - }> + }>
Started
Now
- }> + }>
Started 2
Now
- }> + }>
Started 4
Now
- }> + }>
Started 5
Now
@@ -191,7 +191,7 @@ export const WithCycles = () => ( export const WithCyclesAndLongText = () => ( - }> + }>
Started
Now
@@ -202,11 +202,11 @@ export const WithCyclesAndLongText = () => (
Now
}> - }> + }>
Started text text text text text text text
Now
- }> + }>
Started 2
Now
@@ -216,23 +216,23 @@ export const WithCyclesAndLongText = () => ( export const WithCyclesAndIcon = () => ( - }> + }>
Started
Now
} + icon={} content={
Some cycle info
Now
}> - }> + }>
Started text text text text text text text
Now
- }> + }>
Started 2
Now
diff --git a/cassandra-distributed-task-queue-ui/yarn.lock b/cassandra-distributed-task-queue-ui/yarn.lock index ec718476..7d07551b 100644 --- a/cassandra-distributed-task-queue-ui/yarn.lock +++ b/cassandra-distributed-task-queue-ui/yarn.lock @@ -1265,11 +1265,10 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.6.1.tgz#3a3a408481a3796f45223a549c2571517bc8af2d" integrity sha512-YUkWj+xs0oOzBe74OgErsuR3wVn+efrFhXBWrit50kOiED+pvQe2r6MWY0iJMQU/mSVKxvNzL4ZaYvjdX+G7ZA== -"@skbkontur/react-icons@^5.2.4": - version "5.2.4" - resolved "https://registry.yarnpkg.com/@skbkontur/react-icons/-/react-icons-5.2.4.tgz#29a4fedffe034f2ce97950494f558a356cdaa6c0" - dependencies: - tslib "^1.9.2" +"@skbkontur/icons@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@skbkontur/icons/-/icons-1.3.0.tgz#c955ce44209a4358c5045e0aae4398c5d0723581" + integrity sha512-+N43h5WXlW8KV8KI5kdIu9Gul6Ijl+AncgivF23OIQr9p1cDaZZS44lJltAh35sWGX5uXOrSQy4QQNcbh37M0w== "@skbkontur/react-stack-layout@^1.0.3": version "1.0.3" @@ -8796,7 +8795,7 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.8.1, tslib@^1.9.2: +tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" diff --git a/version.json b/version.json index 432462a8..91b7693c 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "2.1", + "version": "2.2", "assemblyVersion": { "precision": "build" },