From eb969e4b618cb24d04760b5fd457ee1a90f6f81b Mon Sep 17 00:00:00 2001 From: Vadzim Hvazdovich Date: Thu, 9 May 2024 03:32:32 +0300 Subject: [PATCH] EPMRPP-90473 || Report Launch as Important --- app/src/common/constants/retentionPolicy.js | 20 +++++++++++++++++++ app/src/common/img/star-inline.svg | 5 +++++ .../pages/inside/common/itemInfo/itemInfo.jsx | 8 ++++++++ .../inside/common/itemInfo/itemInfo.scss | 16 +++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 app/src/common/constants/retentionPolicy.js create mode 100644 app/src/common/img/star-inline.svg diff --git a/app/src/common/constants/retentionPolicy.js b/app/src/common/constants/retentionPolicy.js new file mode 100644 index 0000000000..cdfa0b2ab6 --- /dev/null +++ b/app/src/common/constants/retentionPolicy.js @@ -0,0 +1,20 @@ +/* + * Copyright 2024 EPAM Systems + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const RETENTION_POLICY = { + REGULAR: 'REGULAR', + IMPORTANT: 'IMPORTANT', +}; diff --git a/app/src/common/img/star-inline.svg b/app/src/common/img/star-inline.svg new file mode 100644 index 0000000000..8c87092520 --- /dev/null +++ b/app/src/common/img/star-inline.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/pages/inside/common/itemInfo/itemInfo.jsx b/app/src/pages/inside/common/itemInfo/itemInfo.jsx index e78ef0efd4..2b830ced08 100644 --- a/app/src/pages/inside/common/itemInfo/itemInfo.jsx +++ b/app/src/pages/inside/common/itemInfo/itemInfo.jsx @@ -30,6 +30,7 @@ import { } from 'controllers/plugins'; import { IN_PROGRESS } from 'common/constants/testStatuses'; import { ANALYZER_TYPES } from 'common/constants/analyzerTypes'; +import { RETENTION_POLICY } from 'common/constants/retentionPolicy'; import { MarkdownViewer } from 'components/main/markdown'; import { LAUNCHES_PAGE_EVENTS } from 'components/main/analytics/events'; import { PLUGIN_NAME_TITLES } from 'components/integrations'; @@ -37,6 +38,7 @@ import { getSauceLabsConfig } from 'components/integrations/integrationProviders import { formatMethodType, formatStatus } from 'common/utils/localizationUtils'; import PencilIcon from 'common/img/pencil-icon-inline.svg'; import RetryIcon from 'common/img/retry-inline.svg'; +import StarIcon from 'common/img/star-inline.svg'; import SauceLabsIcon from 'common/img/plugins/sauce-labs-gray.png'; import { NameLink } from 'pages/inside/common/nameLink'; import { DurationBlock } from 'pages/inside/common/durationBlock'; @@ -195,6 +197,12 @@ export class ItemInfo extends Component {
+ {value.retentionPolicy === RETENTION_POLICY.IMPORTANT && ( + +
{Parser(StarIcon)}
+ Important +
+ )} {value.status !== IN_PROGRESS && customProps.withExtensions && extensions.map((extension) => ( diff --git a/app/src/pages/inside/common/itemInfo/itemInfo.scss b/app/src/pages/inside/common/itemInfo/itemInfo.scss index b8bb301d66..da71da19e3 100644 --- a/app/src/pages/inside/common/itemInfo/itemInfo.scss +++ b/app/src/pages/inside/common/itemInfo/itemInfo.scss @@ -165,6 +165,22 @@ } } +.retention-policy { + height: 18px; + padding-right: 20px; + color: $COLOR--gray-60; + font-size: 12px; + font-family: $FONT-REGULAR; +} + +.star-icon { + display: inline-block; + height: 16px; + width: 16px; + padding-right: 4px; + vertical-align: text-bottom; +} + .retry-icon { display: inline-block; height: 15px;