diff --git a/src/components/pac/PacOverview.tsx b/src/components/pac/PacOverview.tsx index 1499264e..e6a5a8ce 100644 --- a/src/components/pac/PacOverview.tsx +++ b/src/components/pac/PacOverview.tsx @@ -59,7 +59,8 @@ const PacOverview: React.FC = ({ return ( <> - @@ -88,7 +89,8 @@ const PacOverview: React.FC = ({ return ( <> - diff --git a/src/components/pipelines-overview/NamespaceDropdown.tsx b/src/components/pipelines-overview/NamespaceDropdown.tsx index b2f43dd3..19df0037 100644 --- a/src/components/pipelines-overview/NamespaceDropdown.tsx +++ b/src/components/pipelines-overview/NamespaceDropdown.tsx @@ -10,7 +10,6 @@ import { import { alphanumericCompare } from './utils'; import { useTranslation } from 'react-i18next'; -import './PipelinesOverview.scss'; import { useFlag, useK8sWatchResource, @@ -65,8 +64,10 @@ const NameSpaceDropdown: React.FC = ({ }, [projects, projectsLoaded]); return ( - <> - +
+
+ +
setValue(isOpen)} @@ -80,7 +81,6 @@ const NameSpaceDropdown: React.FC = ({ {selected !== ALL_NAMESPACES_KEY ? selected : allNamespacesTitle} )} - className="pipeline-overview__variable-dropdown" isScrollable > @@ -96,7 +96,7 @@ const NameSpaceDropdown: React.FC = ({ ))} - +
); }; diff --git a/src/components/pipelines-overview/PipelineRunsDurationCard.scss b/src/components/pipelines-overview/PipelineRunsDurationCard.scss deleted file mode 100644 index 1918b3c5..00000000 --- a/src/components/pipelines-overview/PipelineRunsDurationCard.scss +++ /dev/null @@ -1,7 +0,0 @@ -.pipeline-overview { - &__duration-card { - &__value { - text-align: right; - } - } -} diff --git a/src/components/pipelines-overview/PipelineRunsDurationCard.tsx b/src/components/pipelines-overview/PipelineRunsDurationCard.tsx index 2ac79042..b1c76f43 100644 --- a/src/components/pipelines-overview/PipelineRunsDurationCard.tsx +++ b/src/components/pipelines-overview/PipelineRunsDurationCard.tsx @@ -15,6 +15,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; +import { t_chart_color_blue_300 as blueColor } from '@patternfly/react-tokens/dist/js/t_chart_color_blue_300'; import { useFlag } from '@openshift-console/dynamic-plugin-sdk'; import { SummaryProps, getFilter, useInterval } from './utils'; import { getResultsSummary } from '../utils/summary-api'; @@ -23,8 +24,6 @@ import { ALL_NAMESPACES_KEY } from '../../consts'; import { formatTime, getDropDownDate } from './dateTime'; import { LoadingInline } from '../Loading'; -import './PipelineRunsDurationCard.scss'; - interface PipelinesRunsDurationProps { namespace: string; timespan: number; @@ -111,7 +110,7 @@ const PipelinesRunsDurationCard: React.FC = ({ return ( <> @@ -129,19 +128,17 @@ const PipelinesRunsDurationCard: React.FC = ({ /> ) : ( <> - - + + - + {t('Average duration')} {loaded ? ( summaryData?.['avg_duration'] ? ( @@ -154,19 +151,20 @@ const PipelinesRunsDurationCard: React.FC = ({ )} - - + + - + {t('Maximum')} {loaded ? ( summaryData?.['max_duration'] ? ( @@ -180,15 +178,16 @@ const PipelinesRunsDurationCard: React.FC = ({ - + - + {t('Total duration')} {loaded ? ( summaryData?.['total_duration'] ? ( diff --git a/src/components/pipelines-overview/PipelineRunsDurationCardK8s.tsx b/src/components/pipelines-overview/PipelineRunsDurationCardK8s.tsx index 166b28c2..f9f244fc 100644 --- a/src/components/pipelines-overview/PipelineRunsDurationCardK8s.tsx +++ b/src/components/pipelines-overview/PipelineRunsDurationCardK8s.tsx @@ -6,6 +6,7 @@ import { InfoCircleIcon, MonitoringIcon, } from '@patternfly/react-icons'; +import { t_chart_color_blue_300 as blueColor } from '@patternfly/react-tokens/dist/js/t_chart_color_blue_300'; import { Alert, Card, @@ -24,7 +25,6 @@ import { import { ALL_NAMESPACES_KEY } from '../../consts'; -import './PipelineRunsDurationCard.scss'; import { usePipelineMetricsForAllNamespacePoll, usePipelineMetricsForNamespaceForPipelinePoll, @@ -183,15 +183,16 @@ const PipelineRunsDurationCardK8s: React.FC = ({ return ( <> - + {t('Duration')} - + {pipelineRunsDurationError ? ( = ({ <> - - - + + + {t('Average duration')} {loadingPipelineRunsCount ? ( @@ -224,31 +227,37 @@ const PipelineRunsDurationCardK8s: React.FC = ({ - - - + + + {t('Maximum')} {loadingPipelineRunsCount ? : '-'} - - - - + + + + {t('Total duration')} {loadingPipelineRunsDuration ? ( diff --git a/src/components/pipelines-overview/PipelineRunsNumbersChart.tsx b/src/components/pipelines-overview/PipelineRunsNumbersChart.tsx index 4ff8e864..0b1b614c 100644 --- a/src/components/pipelines-overview/PipelineRunsNumbersChart.tsx +++ b/src/components/pipelines-overview/PipelineRunsNumbersChart.tsx @@ -237,16 +237,30 @@ const PipelinesRunsNumbersChart: React.FC = ({ className={classNames({ 'pipeline-overview__number-of-plr-card': !pipelineRunsChartError, 'card-border': bordered, + 'pf-v6-u-h-100': !pipelineRunsChartError, })} + style={{ + minHeight: '220px', + overflow: 'hidden', + display: 'flex', + flexDirection: 'column', + }} > - + {t('Number of PipelineRuns')} {pipelineRunsChartError ? ( = ({ className="pf-v6-u-mb-md pf-v6-u-ml-lg pf-v6-u-mt-lg" /> ) : ( -
+
{loaded ? ( = ({ padding={{ top: 10, bottom: 55, - left: 50, + left: 40, + right: 50, }} themeColor={ChartThemeColor.blue} > @@ -289,7 +309,7 @@ const PipelinesRunsNumbersChart: React.FC = ({ ) : ( -
+
)} diff --git a/src/components/pipelines-overview/PipelineRunsNumbersChartK8s.tsx b/src/components/pipelines-overview/PipelineRunsNumbersChartK8s.tsx index ce712878..01c9f3a0 100644 --- a/src/components/pipelines-overview/PipelineRunsNumbersChartK8s.tsx +++ b/src/components/pipelines-overview/PipelineRunsNumbersChartK8s.tsx @@ -256,18 +256,35 @@ const PipelineRunsNumbersChartK8s: React.FC = ({ <> - + {t('Number of PipelineRuns')} {pipelineRunsChartError ? ( = ({ className="pf-v6-u-ml-lg" /> ) : ( -
+
{loadingRunSuccessRatioData ? ( ) : ( @@ -297,6 +319,7 @@ const PipelineRunsNumbersChartK8s: React.FC = ({ top: 10, bottom: 55, left: 50, + right: 50, }} themeColor={ChartThemeColor.blue} > diff --git a/src/components/pipelines-overview/PipelineRunsStatusCard.tsx b/src/components/pipelines-overview/PipelineRunsStatusCard.tsx index 56d90039..302f6edf 100644 --- a/src/components/pipelines-overview/PipelineRunsStatusCard.tsx +++ b/src/components/pipelines-overview/PipelineRunsStatusCard.tsx @@ -25,9 +25,7 @@ import { import { chart_color_black_200 as othersColor } from '@patternfly/react-tokens/dist/js/chart_color_black_200'; import { chart_color_black_500 as cancelledColor } from '@patternfly/react-tokens/dist/js/chart_color_black_500'; import { chart_color_green_400 as successColor } from '@patternfly/react-tokens/dist/js/chart_color_green_400'; -import { - t_chart_global_danger_color_100 as failureColor, -} from '@patternfly/react-tokens/dist/js/t_chart_global_danger_color_100'; +import { t_chart_global_danger_color_100 as failureColor } from '@patternfly/react-tokens/dist/js/t_chart_global_danger_color_100'; import { chart_color_blue_300 as runningColor } from '@patternfly/react-tokens/dist/js/chart_color_blue_300'; import { useFlag } from '@openshift-console/dynamic-plugin-sdk'; import { @@ -40,7 +38,6 @@ import { } from './dateTime'; import { getFilter, useInterval } from './utils'; import { getResultsSummary } from '../utils/summary-api'; -import './PipelinesOverview.scss'; import { LoadingInline } from '../Loading'; import { ALL_NAMESPACES_KEY } from '../../consts'; import { DataType, FLAGS, SummaryResponse } from '../../types'; @@ -399,7 +396,7 @@ const PipelinesRunsStatusCard: React.FC = ({ 'card-border': bordered, })} > - + {t('PipelineRun status')}{' '} = ({ - + {pipelineRunsStatusError ? ( = ({ className="pf-v6-u-mb-md" /> ) : ( - + {loaded ? ( -
+
= ({ colorScale={colorScale} legendOrientation="vertical" legendPosition="right" + height={200} padding={{ bottom: 30, right: 140, // Adjusted to accommodate legend @@ -486,7 +484,7 @@ const PipelinesRunsStatusCard: React.FC = ({ )} -
+
{loaded ? ( = ({ - + {pipelineRunsStatusError ? ( = ({ className="pf-v6-u-mb-md" /> ) : ( - + {loadingRunSuccessRatioData ? ( ) : ( -
+
= ({ colorScale={colorScale} legendOrientation="vertical" legendPosition="right" + height={200} padding={{ bottom: 30, right: 140, // Adjusted to accommodate legend @@ -623,7 +621,7 @@ const PipelineRunsStatusCardK8s: React.FC = ({ )} -
+
{loadingTotalPipelineRunsData ? ( ) : ( diff --git a/src/components/pipelines-overview/PipelineRunsTotalCard.scss b/src/components/pipelines-overview/PipelineRunsTotalCard.scss deleted file mode 100644 index 4b7b82cf..00000000 --- a/src/components/pipelines-overview/PipelineRunsTotalCard.scss +++ /dev/null @@ -1,7 +0,0 @@ -.pipeline-overview { - &__totals-card { - &__value { - text-align: right; - } - } -} diff --git a/src/components/pipelines-overview/PipelineRunsTotalCard.tsx b/src/components/pipelines-overview/PipelineRunsTotalCard.tsx index 71dc56ce..98fbb4bb 100644 --- a/src/components/pipelines-overview/PipelineRunsTotalCard.tsx +++ b/src/components/pipelines-overview/PipelineRunsTotalCard.tsx @@ -20,8 +20,7 @@ import { ALL_NAMESPACES_KEY } from '../../consts'; import { getDropDownDate } from './dateTime'; import { LoadingInline } from '../Loading'; import { DataType, FLAGS } from '../../types'; - -import './PipelineRunsTotalCard.scss'; +import { t_chart_color_blue_300 as blueColor } from '@patternfly/react-tokens/dist/js/t_chart_color_blue_300'; interface PipelinesRunsDurationProps { namespace: string; @@ -151,7 +150,7 @@ const PipelinesRunsTotalCard: React.FC = ({ return ( <> @@ -169,13 +168,10 @@ const PipelinesRunsTotalCard: React.FC = ({ /> ) : ( <> - - + + - {loaded ? plrRun : } - + - {loaded ? repoRun : } - + - + {t('Total runs')} {loaded ? totalRun : } diff --git a/src/components/pipelines-overview/PipelineRunsTotalCardK8s.tsx b/src/components/pipelines-overview/PipelineRunsTotalCardK8s.tsx index ad5dfd02..75360446 100644 --- a/src/components/pipelines-overview/PipelineRunsTotalCardK8s.tsx +++ b/src/components/pipelines-overview/PipelineRunsTotalCardK8s.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { CheckIcon } from '@patternfly/react-icons'; +import { t_chart_color_blue_300 as blueColor } from '@patternfly/react-tokens/dist/js/t_chart_color_blue_300'; import { Alert, Card, @@ -16,7 +17,6 @@ import { SummaryProps, getTotalPipelineRuns } from './utils'; import { PipelineModel, RepositoryModel } from '../../models'; import { ALL_NAMESPACES_KEY } from '../../consts'; -import './PipelineRunsTotalCard.scss'; import { MetricsQueryPrefix, PipelineQuery } from '../pipelines-metrics/utils'; import { usePipelineMetricsForAllNamespacePoll, @@ -86,15 +86,16 @@ const PipelineRunsTotalCardK8s: React.FC = ({ return ( <> - + {t('Total runs')} - + {pipelineRunsTotalError ? ( = ({ /> ) : ( <> - - - + + + @@ -118,17 +123,22 @@ const PipelineRunsTotalCardK8s: React.FC = ({ {loadingTotalPipelineRunsData ? : '-'} - + - + @@ -137,21 +147,23 @@ const PipelineRunsTotalCardK8s: React.FC = ({ {loadingTotalPipelineRunsData ? : '-'} - + - - + + {t('Total runs')} {loadingTotalPipelineRunsData ? ( diff --git a/src/components/pipelines-overview/PipelinesOverview.scss b/src/components/pipelines-overview/PipelinesOverview.scss deleted file mode 100644 index 7e1fab30..00000000 --- a/src/components/pipelines-overview/PipelinesOverview.scss +++ /dev/null @@ -1,157 +0,0 @@ -.card-border { - border: var(--pf-t--global--border--width--sm) solid - var(--pf-t--global--border--color--default); -} - -.pipelines-overview__cards { - margin-top: var(--pf-t--global--spacer--lg); - margin-bottom: var(--pf-t--global--spacer--lg); -} - -.pipeline-overview__pipelinerun-status-card { - &__title { - padding-bottom: 0 !important; - } - - &__list-page { - padding-bottom: 0 !important; - } - - &__donut-chart-div { - height: 200px; - float: left; - } - - &__bar-chart-div { - height: 200px; - } -} - -.project-dropdown-label { - display: block; - - &__flex { - margin-left: var(--pf-t--global--spacer--md); - } -} - -.pipeline-overview__duration-card { - &__grid { - margin-bottom: var(--pf-t--global--spacer--sm); - } - - &__icon { - margin-right: var(--pf-t--global--spacer--sm); - } - - &__info-icon { - margin-right: var(--pf-t--global--spacer--sm); - color: var(--pf-t--global--color--brand--default); - } - - &__value { - color: var(--pf-t--global--color--brand--default); - } -} - -.pipeline-overview__totals-card { - margin-left: var(--pf-t--global--spacer--md); - margin-right: var(--pf-t--global--spacer--md); - - &__grid { - margin-bottom: var(--pf-t--global--spacer--sm); - } - - &__label { - margin-right: var(--pf-t--global--spacer--sm); - height: var(--pf-t--global--spacer--md); - } - - &__repo-label { - margin-right: var(--pf-t--global--spacer--md); - height: var(--pf-t--global--spacer--md); - } - - &__icon { - margin-right: var(--pf-t--global--spacer--md); - margin-left: var(--pf-t--global--spacer--sm); - } - - &__value { - color: var(--pf-t--global--color--brand--default); - } -} - -.pipeline-overview__number-of-plr-card { - .pf-v6-c-card__title { - padding-bottom: 0; - } - - &__title { - padding-bottom: 0 !important; - } - - &__body { - padding: 0; - height: 145px; - width: 530px; - } - - &__bar-chart-div { - height: 145px; - } - - &__loading { - padding-left: var(--pf-t--global--spacer--md); - } -} - -.pipeline-overview__listpage { - &__button { - float: right; - } - - &__grid { - margin-bottom: var(--pf-t--global--spacer--md); - } - - &__table { - border-top: inset; - } - - &__griditem { - display: flex; - } -} - -.pipeline-overview__dropdown-button { - max-width: 280px !important; // allow truncation - min-width: 100px; -} - -.pipeline-overview__search-input { - height: fit-content; - width: 220px; - margin-left: var(--pf-t--global--spacer--sm); -} - -.pipeline-overview__duration-total-plr-grid { - padding-left: var(--pf-t--global--spacer--md); - padding-right: var(--pf-t--global--spacer--md); - padding-top: var(--pf-t--global--spacer--md); - padding-bottom: var(--pf-t--global--spacer--md); -} - -.pipelines-metrics__background { - background-color: var(--pf-t--global--background--color--secondary--default); - padding-left: var(--pf-t--global--spacer--md); - padding-right: var(--pf-t--global--spacer--md); - padding-top: var(--pf-t--global--spacer--md); - padding-bottom: var(--pf-t--global--spacer--sm); -} - -.k8s-overview-info-alert { - margin-bottom: var(--pf-t--global--spacer--md); - margin-left: var(--pf-t--global--spacer--md); - margin-right: var(--pf-t--global--spacer--md); -} diff --git a/src/components/pipelines-overview/PipelinesOverviewPage.tsx b/src/components/pipelines-overview/PipelinesOverviewPage.tsx index b70a2611..05681882 100644 --- a/src/components/pipelines-overview/PipelinesOverviewPage.tsx +++ b/src/components/pipelines-overview/PipelinesOverviewPage.tsx @@ -54,10 +54,10 @@ const PipelinesOverviewPage: React.FC = () => { return ( <> - + {t('Overview')} - + { -
+
{ interval={interval} /> - - + + { bordered={true} /> - + { bordered={true} /> - + { - +
+ +
); diff --git a/src/components/pipelines-overview/PipelinesOverviewPageK8s.tsx b/src/components/pipelines-overview/PipelinesOverviewPageK8s.tsx index 25031a60..336ffa90 100644 --- a/src/components/pipelines-overview/PipelinesOverviewPageK8s.tsx +++ b/src/components/pipelines-overview/PipelinesOverviewPageK8s.tsx @@ -23,7 +23,6 @@ import { usePersistedTimespanWithUrl, usePersistedIntervalWithUrl, } from '../hooks/usePersistedFiltersForPipelineOverview'; -import './PipelinesOverview.scss'; const PipelinesOverviewPageK8s: React.FC = () => { const { t } = useTranslation('plugin__pipelines-console-plugin'); @@ -56,13 +55,13 @@ const PipelinesOverviewPageK8s: React.FC = () => { return ( <> - + {t('Overview')}
- + { -
+
{ interval={interval} /> - - + + { bordered={true} /> - + { bordered={true} /> - + { /> - +
+ +
); diff --git a/src/components/pipelines-overview/RefreshIntervalDropdown.tsx b/src/components/pipelines-overview/RefreshIntervalDropdown.tsx index 3a947f05..6aad33a9 100644 --- a/src/components/pipelines-overview/RefreshIntervalDropdown.tsx +++ b/src/components/pipelines-overview/RefreshIntervalDropdown.tsx @@ -10,8 +10,6 @@ import { import { IntervalOptions } from './utils'; import { formatPrometheusDuration, parsePrometheusDuration } from './dateTime'; -import './PipelinesOverview.scss'; - const OFF_KEY = 'OFF_KEY'; type Props = { @@ -50,7 +48,6 @@ const IntervalDropdown: React.FC = ({ id, interval, setInterval }) => { {intervalOptions[selectedKey]} )} - className="pipeline-overview__variable-dropdown" > {_.map(intervalOptions, (name, key) => ( diff --git a/src/components/pipelines-overview/SearchInput.tsx b/src/components/pipelines-overview/SearchInput.tsx index b7716b20..c613da30 100644 --- a/src/components/pipelines-overview/SearchInput.tsx +++ b/src/components/pipelines-overview/SearchInput.tsx @@ -17,7 +17,7 @@ const SearchInputField: React.FC = ({ return ( = ({ /> - +