@red-hat-developer-hub/plugin-cost-management 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/config.schema.json +15 -0
- package/dist/Router.esm.js +14 -8
- package/dist/Router.esm.js.map +1 -1
- package/dist/components/BasePage.esm.js +8 -5
- package/dist/components/BasePage.esm.js.map +1 -1
- package/dist/components/InfoCardTitle.esm.js +2 -2
- package/dist/components/InfoCardTitle.esm.js.map +1 -1
- package/dist/components/PageLayout.esm.js +37 -30
- package/dist/components/PageLayout.esm.js.map +1 -1
- package/dist/components/icon/AnalyticsIcon.esm.js +3 -3
- package/dist/components/icon/AnalyticsIcon.esm.js.map +1 -1
- package/dist/components/icon/AnalyticsIconFilled.esm.js +2 -2
- package/dist/components/icon/AnalyticsIconFilled.esm.js.map +1 -1
- package/dist/components/icon/AnalyticsIconOutlined.esm.js +2 -2
- package/dist/components/icon/AnalyticsIconOutlined.esm.js.map +1 -1
- package/dist/components/icon/CostManagementIcon.esm.js +3 -3
- package/dist/components/icon/CostManagementIcon.esm.js.map +1 -1
- package/dist/components/icon/CostManagementIconFilled.esm.js +2 -2
- package/dist/components/icon/CostManagementIconFilled.esm.js.map +1 -1
- package/dist/components/icon/CostManagementIconOutlined.esm.js +2 -2
- package/dist/components/icon/CostManagementIconOutlined.esm.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/pages/openshift/OpenShiftPage.esm.js +255 -207
- package/dist/pages/openshift/OpenShiftPage.esm.js.map +1 -1
- package/dist/pages/openshift/components/AutocompleteComponent.esm.js +43 -40
- package/dist/pages/openshift/components/AutocompleteComponent.esm.js.map +1 -1
- package/dist/pages/openshift/components/DownloadIconButton.esm.js +11 -11
- package/dist/pages/openshift/components/DownloadIconButton.esm.js.map +1 -1
- package/dist/pages/openshift/components/Filters.esm.js +178 -161
- package/dist/pages/openshift/components/Filters.esm.js.map +1 -1
- package/dist/pages/openshift/components/PageHeader.esm.js +11 -6
- package/dist/pages/openshift/components/PageHeader.esm.js.map +1 -1
- package/dist/pages/openshift/components/SelectComponent.esm.js +30 -27
- package/dist/pages/openshift/components/SelectComponent.esm.js.map +1 -1
- package/dist/pages/openshift/components/TableToolbar.esm.js +187 -163
- package/dist/pages/openshift/components/TableToolbar.esm.js.map +1 -1
- package/dist/pages/optimizations/OptimizationsPage.esm.js +60 -56
- package/dist/pages/optimizations/OptimizationsPage.esm.js.map +1 -1
- package/dist/pages/optimizations/components/ComboBox.esm.js +37 -33
- package/dist/pages/optimizations/components/ComboBox.esm.js.map +1 -1
- package/dist/pages/optimizations/components/Filters.esm.js +35 -28
- package/dist/pages/optimizations/components/Filters.esm.js.map +1 -1
- package/dist/pages/optimizations/components/TableToolbar.esm.js +3 -2
- package/dist/pages/optimizations/components/TableToolbar.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/OptimizationsBreakdownPage.esm.js +51 -45
- package/dist/pages/optimizations-breakdown/OptimizationsBreakdownPage.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/OptimizationEngineTab.esm.js +79 -64
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/OptimizationEngineTab.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/CodeInfoCard.esm.js +4 -3
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/CodeInfoCard.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/ContainerInfoCard.esm.js +28 -20
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/ContainerInfoCard.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/ChartInfoCard.esm.js +4 -3
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/ChartInfoCard.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/components/IntlBreakdownChart.esm.js +3 -3
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/components/IntlBreakdownChart.esm.js.map +1 -1
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/components/intl-breakdown-chart/components/optimizations-breakdown-chart/components/optimizations-breakdown-chart/OptimizationsBreakdownChart.esm.js +29 -26
- package/dist/pages/optimizations-breakdown/components/optimization-engine-tab/components/chart-info-card/components/intl-breakdown-chart/components/optimizations-breakdown-chart/components/optimizations-breakdown-chart/OptimizationsBreakdownChart.esm.js.map +1 -1
- package/package.json +16 -15
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useMemo, useCallback } from 'react';
|
|
2
3
|
import { ResponseErrorPanel, InfoCard, Table } from '@backstage/core-components';
|
|
3
4
|
import Typography from '@material-ui/core/Typography';
|
|
4
5
|
import { BasePage } from '../../components/BasePage.esm.js';
|
|
@@ -391,7 +392,7 @@ function OpenShiftPage() {
|
|
|
391
392
|
};
|
|
392
393
|
const cols = [
|
|
393
394
|
{
|
|
394
|
-
title: /* @__PURE__ */
|
|
395
|
+
title: /* @__PURE__ */ jsx("div", { style: { marginLeft: 0, paddingLeft: 0 }, children: /* @__PURE__ */ jsx(
|
|
395
396
|
"input",
|
|
396
397
|
{
|
|
397
398
|
type: "checkbox",
|
|
@@ -411,7 +412,7 @@ function OpenShiftPage() {
|
|
|
411
412
|
padding: 0
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
)),
|
|
415
|
+
) }),
|
|
415
416
|
field: "checkbox",
|
|
416
417
|
sorting: false,
|
|
417
418
|
width: "40px",
|
|
@@ -423,7 +424,7 @@ function OpenShiftPage() {
|
|
|
423
424
|
paddingLeft: "4px",
|
|
424
425
|
paddingRight: "4px"
|
|
425
426
|
},
|
|
426
|
-
render: (data) => /* @__PURE__ */
|
|
427
|
+
render: (data) => /* @__PURE__ */ jsx("div", { style: { paddingRight: "4px" }, children: /* @__PURE__ */ jsx(
|
|
427
428
|
"input",
|
|
428
429
|
{
|
|
429
430
|
type: "checkbox",
|
|
@@ -437,47 +438,56 @@ function OpenShiftPage() {
|
|
|
437
438
|
padding: 0
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
|
-
))
|
|
441
|
+
) })
|
|
441
442
|
},
|
|
442
443
|
{
|
|
443
|
-
title: /* @__PURE__ */
|
|
444
|
+
title: /* @__PURE__ */ jsxs(Typography, { variant: "body2", style: { fontWeight: "bold" }, children: [
|
|
445
|
+
groupBy.charAt(0).toLocaleUpperCase("en-US") + groupBy.slice(1),
|
|
446
|
+
" ",
|
|
447
|
+
"name"
|
|
448
|
+
] }),
|
|
444
449
|
field: "projectName",
|
|
445
450
|
cellStyle: { minWidth: 350 },
|
|
446
451
|
headerStyle: { minWidth: 350 },
|
|
447
|
-
render: (data) => /* @__PURE__ */
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
452
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { children: [
|
|
453
|
+
/* @__PURE__ */ jsxs(
|
|
454
|
+
"div",
|
|
455
|
+
{
|
|
456
|
+
style: {
|
|
457
|
+
display: "flex",
|
|
458
|
+
alignItems: "center",
|
|
459
|
+
justifyContent: "space-between",
|
|
460
|
+
gap: "8px"
|
|
461
|
+
},
|
|
462
|
+
children: [
|
|
463
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: data.projectName }),
|
|
464
|
+
groupBy === "project" && data.includesOverhead && /* @__PURE__ */ jsx(
|
|
465
|
+
Typography,
|
|
466
|
+
{
|
|
467
|
+
variant: "caption",
|
|
468
|
+
style: {
|
|
469
|
+
padding: "2px 6px",
|
|
470
|
+
backgroundColor: "#F5F5F5",
|
|
471
|
+
border: "1px solid #D2D2D2",
|
|
472
|
+
borderRadius: "16px",
|
|
473
|
+
color: "black",
|
|
474
|
+
whiteSpace: "nowrap"
|
|
475
|
+
},
|
|
476
|
+
children: "Includes overhead"
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
]
|
|
455
480
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
groupBy === "project" && data.includesOverhead && /* @__PURE__ */ React.createElement(
|
|
481
|
+
),
|
|
482
|
+
groupBy === "cluster" && data.clusterId && /* @__PURE__ */ jsx(
|
|
459
483
|
Typography,
|
|
460
484
|
{
|
|
461
485
|
variant: "caption",
|
|
462
|
-
style: {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
border: "1px solid #D2D2D2",
|
|
466
|
-
borderRadius: "16px",
|
|
467
|
-
color: "black",
|
|
468
|
-
whiteSpace: "nowrap"
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
"Includes overhead"
|
|
486
|
+
style: { color: "#666", display: "block", marginTop: 10 },
|
|
487
|
+
children: data.clusterId
|
|
488
|
+
}
|
|
472
489
|
)
|
|
473
|
-
)
|
|
474
|
-
Typography,
|
|
475
|
-
{
|
|
476
|
-
variant: "caption",
|
|
477
|
-
style: { color: "#666", display: "block", marginTop: 10 }
|
|
478
|
-
},
|
|
479
|
-
data.clusterId
|
|
480
|
-
))
|
|
490
|
+
] })
|
|
481
491
|
}
|
|
482
492
|
];
|
|
483
493
|
if (showMonthOverMonthChange) {
|
|
@@ -485,68 +495,99 @@ function OpenShiftPage() {
|
|
|
485
495
|
title: "Month over month change",
|
|
486
496
|
field: "monthOverMonthChange",
|
|
487
497
|
sorting: false,
|
|
488
|
-
render: (data) => /* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
498
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { children: [
|
|
499
|
+
/* @__PURE__ */ jsxs(
|
|
500
|
+
"div",
|
|
501
|
+
{
|
|
502
|
+
style: {
|
|
503
|
+
color: getChangeColor(data.monthOverMonthChange)
|
|
504
|
+
},
|
|
505
|
+
children: [
|
|
506
|
+
Math.abs(data.monthOverMonthChange).toFixed(2),
|
|
507
|
+
"%",
|
|
508
|
+
data.monthOverMonthChange > 0 ? " \u25B2" : " \u25BC"
|
|
509
|
+
]
|
|
493
510
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: "0.75rem", color: "#666" }, children: [
|
|
513
|
+
formatCurrency(
|
|
514
|
+
data.monthOverMonthValue,
|
|
515
|
+
displayData?.currencyCode || ""
|
|
516
|
+
),
|
|
517
|
+
" ",
|
|
518
|
+
"for ",
|
|
519
|
+
getDateRangeText(timeRange)
|
|
520
|
+
] })
|
|
521
|
+
] })
|
|
502
522
|
});
|
|
503
523
|
}
|
|
504
524
|
cols.push({
|
|
505
525
|
title: "Cost",
|
|
506
526
|
field: "cost",
|
|
507
|
-
render: (data) => /* @__PURE__ */
|
|
527
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { children: [
|
|
528
|
+
/* @__PURE__ */ jsx("div", { children: formatCurrency(data.cost, displayData?.currencyCode || "") }),
|
|
529
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: "0.75rem", color: "#666" }, children: [
|
|
530
|
+
data.costPercentage.toFixed(2),
|
|
531
|
+
"% of cost"
|
|
532
|
+
] })
|
|
533
|
+
] })
|
|
508
534
|
});
|
|
509
535
|
if (showInfrastructureCost) {
|
|
510
536
|
cols.push({
|
|
511
537
|
title: "Infrastructure cost",
|
|
512
538
|
field: "infrastructureCost",
|
|
513
|
-
render: (data) => /* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
539
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { children: [
|
|
540
|
+
/* @__PURE__ */ jsx("div", { children: formatCurrency(
|
|
541
|
+
data.infrastructureCost,
|
|
542
|
+
displayData?.currencyCode || ""
|
|
543
|
+
) }),
|
|
544
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: "0.75rem", color: "#666" }, children: [
|
|
545
|
+
data.infrastructureCostPercentage.toFixed(2),
|
|
546
|
+
"% of cost"
|
|
547
|
+
] })
|
|
548
|
+
] })
|
|
517
549
|
});
|
|
518
550
|
}
|
|
519
551
|
if (showSupplementaryCost) {
|
|
520
552
|
cols.push({
|
|
521
553
|
title: "Supplementary cost",
|
|
522
554
|
field: "supplementaryCost",
|
|
523
|
-
render: (data) => /* @__PURE__ */
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
555
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { children: [
|
|
556
|
+
/* @__PURE__ */ jsx("div", { children: formatCurrency(
|
|
557
|
+
data.supplementaryCost,
|
|
558
|
+
displayData?.currencyCode || ""
|
|
559
|
+
) }),
|
|
560
|
+
/* @__PURE__ */ jsxs("div", { style: { fontSize: "0.75rem", color: "#666" }, children: [
|
|
561
|
+
data.supplementaryCostPercentage.toFixed(2),
|
|
562
|
+
"% of cost"
|
|
563
|
+
] })
|
|
564
|
+
] })
|
|
527
565
|
});
|
|
528
566
|
}
|
|
529
567
|
cols.push({
|
|
530
568
|
title: "Actions",
|
|
531
569
|
field: "actions",
|
|
532
570
|
sorting: false,
|
|
533
|
-
render: (data) => /* @__PURE__ */
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
571
|
+
render: (data) => /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
572
|
+
/* @__PURE__ */ jsx(
|
|
573
|
+
DownloadIconButton,
|
|
574
|
+
{
|
|
575
|
+
label: "CSV",
|
|
576
|
+
variant: isDarkMode ? "white" : "black",
|
|
577
|
+
onClick: () => handleRowDownload(data.projectName, "csv"),
|
|
578
|
+
disabled: isDownloading
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
/* @__PURE__ */ jsx(
|
|
582
|
+
DownloadIconButton,
|
|
583
|
+
{
|
|
584
|
+
label: "JSON",
|
|
585
|
+
variant: isDarkMode ? "white" : "black",
|
|
586
|
+
onClick: () => handleRowDownload(data.projectName, "json"),
|
|
587
|
+
disabled: isDownloading
|
|
588
|
+
}
|
|
589
|
+
)
|
|
590
|
+
] })
|
|
550
591
|
});
|
|
551
592
|
return cols;
|
|
552
593
|
}, [
|
|
@@ -581,145 +622,152 @@ function OpenShiftPage() {
|
|
|
581
622
|
[columns]
|
|
582
623
|
);
|
|
583
624
|
if (error) {
|
|
584
|
-
return /* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ jsx(ResponseErrorPanel, { error });
|
|
585
626
|
}
|
|
586
|
-
return /* @__PURE__ */
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
), /* @__PURE__ */ React.createElement(
|
|
596
|
-
Divider,
|
|
597
|
-
{
|
|
598
|
-
style: {
|
|
599
|
-
marginBottom: 24,
|
|
600
|
-
marginLeft: "-24px",
|
|
601
|
-
marginRight: "-24px",
|
|
602
|
-
width: "calc(100% + 48px)"
|
|
627
|
+
return /* @__PURE__ */ jsxs(BasePage, { pageTitle: "", withContentPadding: true, children: [
|
|
628
|
+
/* @__PURE__ */ jsx(
|
|
629
|
+
PageHeader,
|
|
630
|
+
{
|
|
631
|
+
totalCost: displayData.totalCost,
|
|
632
|
+
month: displayData.month,
|
|
633
|
+
endDate: displayData.endDate,
|
|
634
|
+
currencyCode: displayData.currencyCode,
|
|
635
|
+
customStyle: { marginTop: "-24px" }
|
|
603
636
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
filterOperation,
|
|
614
|
-
filterValue,
|
|
615
|
-
tags,
|
|
616
|
-
onGroupByChange: (value) => {
|
|
617
|
-
setGroupBy(value);
|
|
618
|
-
setCurrentPage(0);
|
|
619
|
-
if (value !== "tag") {
|
|
620
|
-
setSelectedTag("");
|
|
621
|
-
}
|
|
622
|
-
if (value !== "project") {
|
|
623
|
-
setShowPlatformSum(false);
|
|
624
|
-
}
|
|
625
|
-
setFilterBy(value);
|
|
626
|
-
setFilterValue("");
|
|
627
|
-
setSelectedTagKey("");
|
|
628
|
-
setSelectedTagValue("");
|
|
629
|
-
},
|
|
630
|
-
selectedTag,
|
|
631
|
-
onSelectedTagChange: (value) => {
|
|
632
|
-
setSelectedTag(value);
|
|
633
|
-
setCurrentPage(0);
|
|
634
|
-
},
|
|
635
|
-
onOverheadDistributionChange: (value) => {
|
|
636
|
-
setOverheadDistribution(value);
|
|
637
|
-
setCurrentPage(0);
|
|
638
|
-
},
|
|
639
|
-
onTimeRangeChange: (value) => {
|
|
640
|
-
setTimeRange(value);
|
|
641
|
-
setCurrentPage(0);
|
|
642
|
-
},
|
|
643
|
-
onCurrencyChange: (value) => {
|
|
644
|
-
setCurrency(value);
|
|
645
|
-
setCurrentPage(0);
|
|
646
|
-
},
|
|
647
|
-
onFilterByChange: (value) => {
|
|
648
|
-
setFilterBy(value);
|
|
649
|
-
setCurrentPage(0);
|
|
650
|
-
if (value !== "tag") {
|
|
651
|
-
setSelectedTagKey("");
|
|
652
|
-
setSelectedTagValue("");
|
|
637
|
+
),
|
|
638
|
+
/* @__PURE__ */ jsx(
|
|
639
|
+
Divider,
|
|
640
|
+
{
|
|
641
|
+
style: {
|
|
642
|
+
marginBottom: 24,
|
|
643
|
+
marginLeft: "-24px",
|
|
644
|
+
marginRight: "-24px",
|
|
645
|
+
width: "calc(100% + 48px)"
|
|
653
646
|
}
|
|
654
|
-
},
|
|
655
|
-
onFilterOperationChange: (value) => {
|
|
656
|
-
setFilterOperation(value);
|
|
657
|
-
setCurrentPage(0);
|
|
658
|
-
},
|
|
659
|
-
onFilterValueChange: (value) => {
|
|
660
|
-
setFilterValue(value);
|
|
661
|
-
setCurrentPage(0);
|
|
662
|
-
},
|
|
663
|
-
selectedTagKey,
|
|
664
|
-
selectedTagValue,
|
|
665
|
-
onSelectedTagKeyChange: (value) => {
|
|
666
|
-
setSelectedTagKey(value);
|
|
667
|
-
setSelectedTagValue("");
|
|
668
|
-
setCurrentPage(0);
|
|
669
|
-
},
|
|
670
|
-
onSelectedTagValueChange: (value) => {
|
|
671
|
-
setSelectedTagValue(value);
|
|
672
|
-
setCurrentPage(0);
|
|
673
647
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
648
|
+
),
|
|
649
|
+
/* @__PURE__ */ jsxs(PageLayout, { children: [
|
|
650
|
+
/* @__PURE__ */ jsx(PageLayout.Filters, { children: /* @__PURE__ */ jsx(
|
|
651
|
+
Filters,
|
|
652
|
+
{
|
|
653
|
+
groupBy,
|
|
654
|
+
overheadDistribution,
|
|
655
|
+
timeRange,
|
|
656
|
+
currency,
|
|
657
|
+
filterBy,
|
|
658
|
+
filterOperation,
|
|
659
|
+
filterValue,
|
|
660
|
+
tags,
|
|
661
|
+
onGroupByChange: (value) => {
|
|
662
|
+
setGroupBy(value);
|
|
663
|
+
setCurrentPage(0);
|
|
664
|
+
if (value !== "tag") {
|
|
665
|
+
setSelectedTag("");
|
|
666
|
+
}
|
|
667
|
+
if (value !== "project") {
|
|
668
|
+
setShowPlatformSum(false);
|
|
669
|
+
}
|
|
670
|
+
setFilterBy(value);
|
|
671
|
+
setFilterValue("");
|
|
672
|
+
setSelectedTagKey("");
|
|
673
|
+
setSelectedTagValue("");
|
|
674
|
+
},
|
|
675
|
+
selectedTag,
|
|
676
|
+
onSelectedTagChange: (value) => {
|
|
677
|
+
setSelectedTag(value);
|
|
678
|
+
setCurrentPage(0);
|
|
679
|
+
},
|
|
680
|
+
onOverheadDistributionChange: (value) => {
|
|
681
|
+
setOverheadDistribution(value);
|
|
682
|
+
setCurrentPage(0);
|
|
683
|
+
},
|
|
684
|
+
onTimeRangeChange: (value) => {
|
|
685
|
+
setTimeRange(value);
|
|
686
|
+
setCurrentPage(0);
|
|
687
|
+
},
|
|
688
|
+
onCurrencyChange: (value) => {
|
|
689
|
+
setCurrency(value);
|
|
690
|
+
setCurrentPage(0);
|
|
691
|
+
},
|
|
692
|
+
onFilterByChange: (value) => {
|
|
693
|
+
setFilterBy(value);
|
|
694
|
+
setCurrentPage(0);
|
|
695
|
+
if (value !== "tag") {
|
|
696
|
+
setSelectedTagKey("");
|
|
697
|
+
setSelectedTagValue("");
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
onFilterOperationChange: (value) => {
|
|
701
|
+
setFilterOperation(value);
|
|
702
|
+
setCurrentPage(0);
|
|
703
|
+
},
|
|
704
|
+
onFilterValueChange: (value) => {
|
|
705
|
+
setFilterValue(value);
|
|
706
|
+
setCurrentPage(0);
|
|
707
|
+
},
|
|
708
|
+
selectedTagKey,
|
|
709
|
+
selectedTagValue,
|
|
710
|
+
onSelectedTagKeyChange: (value) => {
|
|
711
|
+
setSelectedTagKey(value);
|
|
712
|
+
setSelectedTagValue("");
|
|
713
|
+
setCurrentPage(0);
|
|
714
|
+
},
|
|
715
|
+
onSelectedTagValueChange: (value) => {
|
|
716
|
+
setSelectedTagValue(value);
|
|
717
|
+
setCurrentPage(0);
|
|
697
718
|
}
|
|
698
|
-
)
|
|
699
|
-
},
|
|
700
|
-
columns,
|
|
701
|
-
options: {
|
|
702
|
-
paging: true,
|
|
703
|
-
pageSize,
|
|
704
|
-
pageSizeOptions: [5, 10, 25, 50],
|
|
705
|
-
search: false,
|
|
706
|
-
sorting: true,
|
|
707
|
-
padding: "dense",
|
|
708
|
-
thirdSortClick: false
|
|
709
|
-
},
|
|
710
|
-
totalCount,
|
|
711
|
-
page: currentPage,
|
|
712
|
-
onPageChange: handlePageChange,
|
|
713
|
-
onRowsPerPageChange: handleRowsPerPageChange,
|
|
714
|
-
onOrderChange: handleOrderChange,
|
|
715
|
-
style: { outline: "none" },
|
|
716
|
-
localization: {
|
|
717
|
-
pagination: {
|
|
718
|
-
labelRowsPerPage: "rows"
|
|
719
719
|
}
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
|
|
720
|
+
) }),
|
|
721
|
+
/* @__PURE__ */ jsx(PageLayout.Table, { children: /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx(InfoCard, { children: /* @__PURE__ */ jsx(
|
|
722
|
+
Table,
|
|
723
|
+
{
|
|
724
|
+
data: displayData?.projects || [],
|
|
725
|
+
isLoading: loading,
|
|
726
|
+
components: {
|
|
727
|
+
Toolbar: () => /* @__PURE__ */ jsx(
|
|
728
|
+
TableToolbar,
|
|
729
|
+
{
|
|
730
|
+
showPlatformSum,
|
|
731
|
+
setShowPlatformSum,
|
|
732
|
+
projectsCount: displayData?.projects?.length || 0,
|
|
733
|
+
groupBy,
|
|
734
|
+
showMonthOverMonthChange,
|
|
735
|
+
setShowMonthOverMonthChange,
|
|
736
|
+
showInfrastructureCost,
|
|
737
|
+
setShowInfrastructureCost,
|
|
738
|
+
showSupplementaryCost,
|
|
739
|
+
setShowSupplementaryCost,
|
|
740
|
+
onDownloadCsv: () => handleHeaderDownload("csv"),
|
|
741
|
+
onDownloadJson: () => handleHeaderDownload("json"),
|
|
742
|
+
isDownloading
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
},
|
|
746
|
+
columns,
|
|
747
|
+
options: {
|
|
748
|
+
paging: true,
|
|
749
|
+
pageSize,
|
|
750
|
+
pageSizeOptions: [5, 10, 25, 50],
|
|
751
|
+
search: false,
|
|
752
|
+
sorting: true,
|
|
753
|
+
padding: "dense",
|
|
754
|
+
thirdSortClick: false
|
|
755
|
+
},
|
|
756
|
+
totalCount,
|
|
757
|
+
page: currentPage,
|
|
758
|
+
onPageChange: handlePageChange,
|
|
759
|
+
onRowsPerPageChange: handleRowsPerPageChange,
|
|
760
|
+
onOrderChange: handleOrderChange,
|
|
761
|
+
style: { outline: "none" },
|
|
762
|
+
localization: {
|
|
763
|
+
pagination: {
|
|
764
|
+
labelRowsPerPage: "rows"
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
) }) }) })
|
|
769
|
+
] })
|
|
770
|
+
] });
|
|
723
771
|
}
|
|
724
772
|
OpenShiftPage.displayName = "OpenShiftPage";
|
|
725
773
|
|