)}
diff --git a/ngui/ui/src/components/Environments/Environments.tsx b/ngui/ui/src/components/Environments/Environments.tsx
index b34afaaf1..0863c3d47 100644
--- a/ngui/ui/src/components/Environments/Environments.tsx
+++ b/ngui/ui/src/components/Environments/Environments.tsx
@@ -52,7 +52,7 @@ const ButtonsGroupWithLabel = ({ labelId, buttons, activeButtonIndex, isMobile }
const ENVIRONMENTS_VIEWS = Object.freeze({
TABLE: "table",
- CALENDAR: "calendar"
+ CALENDAR: "calendar",
});
const ENVIRONMENTS_VIEW_QUERY_PARAMETER = "view";
@@ -65,7 +65,7 @@ const Environments = ({
onUpdateActivity,
entityId,
isLoadingProps = {},
- startEnvironmentsTour
+ startEnvironmentsTour,
}) => {
const isMobile = useIsDownMediaQuery("sm");
const isTourAvailableForCurrentBreakpoint = useIsTourAvailableForCurrentBreakpoint();
@@ -75,7 +75,7 @@ const Environments = ({
title: {
messageId: "environments",
dataTestId: "lbl_environments",
- dataProductTourId: ENVIRONMENTS_TOUR_IDS.HEADER
+ dataProductTourId: ENVIRONMENTS_TOUR_IDS.HEADER,
},
items: [
{
@@ -84,18 +84,18 @@ const Environments = ({
action: startEnvironmentsTour,
tooltip: {
show: true,
- value:
}} />
+ value:
}} />,
},
show: isTourAvailableForCurrentBreakpoint,
- type: "iconButton"
- }
- ]
+ type: "iconButton",
+ },
+ ],
};
const {
[ENVIRONMENTS_STATUS_QUERY_PARAMETER]: filterByStatusQuery,
[ENVIRONMENTS_ACCESS_QUERY_PARAMETER]: accessGrantedQuery,
- [ENVIRONMENTS_VIEW_QUERY_PARAMETER]: view
+ [ENVIRONMENTS_VIEW_QUERY_PARAMETER]: view,
} = getSearchParams();
const [showAccessGranted, setShowAccessGranted] = useState(() => accessGrantedQuery ?? true);
@@ -114,7 +114,7 @@ const Environments = ({
updateSearchParams({
[ENVIRONMENTS_STATUS_QUERY_PARAMETER]: activeStatusFilter,
[ENVIRONMENTS_ACCESS_QUERY_PARAMETER]: showAccessGranted,
- [ENVIRONMENTS_VIEW_QUERY_PARAMETER]: activeViewFilter
+ [ENVIRONMENTS_VIEW_QUERY_PARAMETER]: activeViewFilter,
});
}, [activeStatusFilter, activeViewFilter, showAccessGranted]);
@@ -127,7 +127,7 @@ const Environments = ({
const environmentsWithBookingPermissionIds = useFilterByPermissions({
entitiesIds: environments.map(({ id }) => id),
entitiesType: SCOPE_TYPES.RESOURCE,
- permissions: ["BOOK_ENVIRONMENTS"]
+ permissions: ["BOOK_ENVIRONMENTS"],
});
const filteredEnvironments = useMemo(() => {
@@ -143,7 +143,7 @@ const Environments = ({
({
[ENVIRONMENTS_STATUS_FILTERS.UNAVAILABLE]: !environment.active,
[ENVIRONMENTS_STATUS_FILTERS.AVAILABLE]: environment.active && !getActiveBooking(environment, nowSecondsTimestamp),
- [ENVIRONMENTS_STATUS_FILTERS.IN_USE]: environment.active && !!getActiveBooking(environment, nowSecondsTimestamp)
+ [ENVIRONMENTS_STATUS_FILTERS.IN_USE]: environment.active && !!getActiveBooking(environment, nowSecondsTimestamp),
})[activeStatusFilter] ?? true
)
.filter((environment) => (showAccessGranted ? environmentsWithBookingPermissionIds.includes(environment.id) : true));
@@ -155,7 +155,7 @@ const Environments = ({
id: filter,
messageId: filter,
action: () => setActiveViewFilter(filter),
- dataTestId: `filter_${filter}_access`
+ dataTestId: `filter_${filter}_access`,
}));
const activeViewIndex = viewButtonsGroup.findIndex((button) => button.id === activeViewFilter);
@@ -242,7 +242,7 @@ const Environments = ({
position="bottom"
alertProps={{
messageId: "environmentsDescription",
- messageDataTestId: "p_environments_list"
+ messageDataTestId: "p_environments_list",
}}
/>
diff --git a/ngui/ui/src/components/Environments/EnvironmentsMocked.tsx b/ngui/ui/src/components/Environments/EnvironmentsMocked.tsx
index f061e93bd..f24612097 100644
--- a/ngui/ui/src/components/Environments/EnvironmentsMocked.tsx
+++ b/ngui/ui/src/components/Environments/EnvironmentsMocked.tsx
@@ -16,15 +16,15 @@ const liveDemoData = [
{
id: "5dcc90a7-8923-4530-9fdd-891ea66ae1d1",
name: "Rule for Environment_1629717445",
- pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd"
- }
+ pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd",
+ },
],
first_seen: 1629676800,
tags: {},
env_properties: {
[ENVIRONMENT_SOFTWARE_FIELD]: "SunWare 1.3.423-integration",
[ENVIRONMENT_JIRA_TICKETS_FIELD]:
- "[NGUI-1242](https://jira.com.example/NGUI-1242) \n[NGUI-3214](jira.com.example/NGUI-3214)"
+ "[NGUI-1242](https://jira.com.example/NGUI-1242) \n[NGUI-3214](jira.com.example/NGUI-3214)",
},
shareable: true,
created_at: 1629787458,
@@ -41,9 +41,9 @@ const liveDemoData = [
released_at: 0,
acquired_by: {
id: "58f99e3b-a480-4e12-944d-d0d91b260407",
- name: "William Williams"
- }
- }
+ name: "William Williams",
+ },
+ },
],
id: "efd9cb03-5e14-4222-bc59-2e55dfaff985",
meta: {},
@@ -55,7 +55,7 @@ const liveDemoData = [
cloud_account_name: "Environment",
cloud_account_type: "environment",
pool_name: "Environment",
- pool_purpose: "budget"
+ pool_purpose: "budget",
},
{
name: "feature-1",
@@ -71,15 +71,15 @@ const liveDemoData = [
{
id: "5dcc90a7-8923-4530-9fdd-891ea66ae1d1",
name: "Rule for Environment_1629717445",
- pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd"
- }
+ pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd",
+ },
],
first_seen: 1629676800,
tags: {},
shareable: true,
env_properties: {
[ENVIRONMENT_SOFTWARE_FIELD]: "SunWare 1.3.232-hotfix/support-fix",
- [ENVIRONMENT_JIRA_TICKETS_FIELD]: "[TCS-2214](https://jira.com.example/TCS-2214)"
+ [ENVIRONMENT_JIRA_TICKETS_FIELD]: "[TCS-2214](https://jira.com.example/TCS-2214)",
},
created_at: 1629787513,
last_seen: 1632896806,
@@ -95,9 +95,9 @@ const liveDemoData = [
released_at: 0,
acquired_by: {
id: "58f99e3b-a480-4e12-944d-d0d91b260407",
- name: "William Williams"
- }
- }
+ name: "William Williams",
+ },
+ },
],
id: "6b9a6d53-5131-4431-a0b8-8077ca713914",
meta: {},
@@ -109,7 +109,7 @@ const liveDemoData = [
cloud_account_name: "Environment",
cloud_account_type: "environment",
pool_name: "Environment",
- pool_purpose: "budget"
+ pool_purpose: "budget",
},
{
name: "dev-2",
@@ -125,8 +125,8 @@ const liveDemoData = [
{
id: "5dcc90a7-8923-4530-9fdd-891ea66ae1d1",
name: "Rule for Environment_1629717445",
- pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd"
- }
+ pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd",
+ },
],
first_seen: 1629676800,
tags: {},
@@ -134,7 +134,7 @@ const liveDemoData = [
env_properties: {
[ENVIRONMENT_SOFTWARE_FIELD]: "SunWare 1.3.424-feature/sunrise_control",
[ENVIRONMENT_JIRA_TICKETS_FIELD]:
- "[TCS-1674](https://jira.com.example/TCS-1674) \n[TCS-2161](https://jira.com.example/TCS-2161)"
+ "[TCS-1674](https://jira.com.example/TCS-1674) \n[TCS-2161](https://jira.com.example/TCS-2161)",
},
created_at: 1629787475,
last_seen: 1632896806,
@@ -150,8 +150,8 @@ const liveDemoData = [
released_at: 1633023063,
acquired_by: {
id: "58f99e3b-a480-4e12-944d-d0d91b260407",
- name: "William Williams"
- }
+ name: "William Williams",
+ },
},
{
deleted_at: 0,
@@ -163,9 +163,9 @@ const liveDemoData = [
released_at: 1633970896,
acquired_by: {
id: "58f99e3b-a480-4e12-944d-d0d91b260407",
- name: "William Williams"
- }
- }
+ name: "William Williams",
+ },
+ },
],
id: "b4053a50-13ab-4d7d-8279-537a2e5a5614",
meta: {},
@@ -177,7 +177,7 @@ const liveDemoData = [
cloud_account_name: "Environment",
cloud_account_type: "environment",
pool_name: "Environment",
- pool_purpose: "budget"
+ pool_purpose: "budget",
},
{
name: "pre-release",
@@ -193,15 +193,15 @@ const liveDemoData = [
{
id: "5dcc90a7-8923-4530-9fdd-891ea66ae1d1",
name: "Rule for Environment_1629717445",
- pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd"
- }
+ pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd",
+ },
],
first_seen: 1629676800,
tags: {},
shareable: true,
env_properties: {
[ENVIRONMENT_SOFTWARE_FIELD]: "SunWare 1.2.161-master",
- [ENVIRONMENT_JIRA_TICKETS_FIELD]: "[QA-617](https://jira.com.example/QA-617)"
+ [ENVIRONMENT_JIRA_TICKETS_FIELD]: "[QA-617](https://jira.com.example/QA-617)",
},
created_at: 1629787492,
last_seen: 1632896806,
@@ -217,7 +217,7 @@ const liveDemoData = [
cloud_account_name: "Environment",
cloud_account_type: "environment",
pool_name: "Environment",
- pool_purpose: "budget"
+ pool_purpose: "budget",
},
{
name: "feature-2",
@@ -233,8 +233,8 @@ const liveDemoData = [
{
id: "5dcc90a7-8923-4530-9fdd-891ea66ae1d1",
name: "Rule for Environment_1629717445",
- pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd"
- }
+ pool_id: "3f6aa54c-bc90-4145-b351-34284bd5c4cd",
+ },
],
first_seen: 1629676800,
tags: {},
@@ -242,7 +242,7 @@ const liveDemoData = [
env_properties: {
[ENVIRONMENT_SOFTWARE_FIELD]: "SunWare 1.2.162-master",
[ENVIRONMENT_JIRA_TICKETS_FIELD]:
- "[NGUI-2617](https://jira.com.example/NGUI-2617) \n[NGUI-2600](https://jira.com.example/NGUI-2600) \n[NGUI-2620](https://jira.com.example/NGUI-2620) \n[TCS-1355](https://jira.com.example/TCS-1355) \n[TCS-1558](https://jira.com.example/TCS-1558)"
+ "[NGUI-2617](https://jira.com.example/NGUI-2617) \n[NGUI-2600](https://jira.com.example/NGUI-2600) \n[NGUI-2620](https://jira.com.example/NGUI-2620) \n[TCS-1355](https://jira.com.example/TCS-1355) \n[TCS-1558](https://jira.com.example/TCS-1558)",
},
created_at: 1629787527,
last_seen: 1632896806,
@@ -258,8 +258,8 @@ const liveDemoData = [
cloud_account_name: "Environment",
cloud_account_type: "environment",
pool_name: "Environment",
- pool_purpose: "budget"
- }
+ pool_purpose: "budget",
+ },
];
const EnvironmentsMocked = () =>
;
diff --git a/ngui/ui/src/components/EnvironmentsTable/EnvironmentsTable.tsx b/ngui/ui/src/components/EnvironmentsTable/EnvironmentsTable.tsx
index 4bf60c6d1..c231f938e 100644
--- a/ngui/ui/src/components/EnvironmentsTable/EnvironmentsTable.tsx
+++ b/ngui/ui/src/components/EnvironmentsTable/EnvironmentsTable.tsx
@@ -19,7 +19,7 @@ import {
BookEnvironmentModal,
DeleteEnvironmentBookingModal,
DeleteEnvironmentModal,
- ReleaseEnvironmentModal
+ ReleaseEnvironmentModal,
} from "components/SideModalManager/SideModals";
import Table from "components/Table";
import TableCellActions from "components/TableCellActions";
@@ -96,7 +96,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
const {
isGetEnvironmentsLoading = false,
isUpdateEnvironmentLoading = false,
- isGetResourceAllowedActionsLoading = false
+ isGetResourceAllowedActionsLoading = false,
} = isLoadingProps;
const tableData = useMemo(() => data, [data]);
@@ -109,7 +109,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
color: "error",
requiredActions: ["MANAGE_RESOURCES"],
dataTestId: `btn_delete_${index}`,
- action: () => openSideModal(DeleteEnvironmentModal, { id, name })
+ action: () => openSideModal(DeleteEnvironmentModal, { id, name }),
});
const getActivityAction = ({ id, isActive }, index) => {
@@ -118,13 +118,13 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
key: "deactivate",
messageId: "deactivate",
dataTestId: "btn_deactivate",
- color: "error"
+ color: "error",
}
: {
key: "activate",
messageId: "activate",
dataTestId: "btn_activate",
- color: "success"
+ color: "success",
};
return {
key,
@@ -140,8 +140,8 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
disabled: isRestricted,
tooltip: {
show: isRestricted,
- value: restrictionReasonMessage
- }
+ value: restrictionReasonMessage,
+ },
};
};
@@ -161,7 +161,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
allBookings,
index,
isSshRequired,
- isEnvironmentAvailable
+ isEnvironmentAvailable,
}) => ({
key: "book",
messageId: "book",
@@ -174,11 +174,11 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
upcomingBookings,
allBookings,
isSshRequired,
- isEnvironmentAvailable
+ isEnvironmentAvailable,
});
},
dataTestId: `btn_book_${index}`,
- requiredActions: ["BOOK_ENVIRONMENTS"]
+ requiredActions: ["BOOK_ENVIRONMENTS"],
});
const getReleaseAction = (activeBooking, index) => ({
@@ -188,10 +188,10 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
action: () =>
openSideModal(ReleaseEnvironmentModal, {
bookingId: activeBooking.id,
- bookedSince: activeBooking.acquired_since
+ bookedSince: activeBooking.acquired_since,
}),
dataTestId: `btn_release_${index}`,
- requiredActions: ["MANAGE_RESOURCES", "MANAGE_OWN_RESOURCES"]
+ requiredActions: ["MANAGE_RESOURCES", "MANAGE_OWN_RESOURCES"],
});
const getDeleteBookingAction = (id, index) => ({
@@ -201,7 +201,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
color: "error",
action: () => openSideModal(DeleteEnvironmentBookingModal, { bookingId: id }),
dataTestId: `btn_delete_booking_${index}`,
- requiredActions: ["MANAGE_RESOURCES", "MANAGE_OWN_RESOURCES"]
+ requiredActions: ["MANAGE_RESOURCES", "MANAGE_OWN_RESOURCES"],
});
const defaultColumns = [
@@ -217,9 +217,9 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
cell: ({ row: { original, index } }) =>
renderEnvironmentCell({
resource: original,
- index
+ index,
}),
- defaultSort: "asc"
+ defaultSort: "asc",
},
{
header: (
@@ -236,7 +236,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
name={original.pool_name}
type={original.pool_purpose}
/>
- )
+ ),
},
{
header: (
@@ -274,7 +274,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
index: rowIndex,
allBookings: shareableBookings,
isSshRequired,
- isEnvironmentAvailable: !activeBooking
+ isEnvironmentAvailable: !activeBooking,
})
: null;
@@ -309,7 +309,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
)}
);
- }
+ },
},
{
header: (
@@ -322,13 +322,13 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
enableHiding: false,
enableSorting: false,
style: {
- minWidth: "200px"
+ minWidth: "200px",
},
cell: ({
cell,
row: {
- original: { id }
- }
+ original: { id },
+ },
}) => {
const value = cell.getValue() ?? [];
@@ -346,7 +346,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
id: bookingId,
acquired_since: acquiredSince,
released_at: releasedAt,
- resource_id: resourceId
+ resource_id: resourceId,
} = upcomingBooking;
return (
@@ -365,8 +365,8 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
})}
);
- }
- }
+ },
+ },
];
const envPropertiesColumns = getUniqueSortedEnvironmentProperties(tableData).map((field) => ({
@@ -376,7 +376,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
columnSelector: {
accessor: `env_properties.${field}`,
title: field,
- dataTestId: `btn_toggle_column_${field}`
+ dataTestId: `btn_toggle_column_${field}`,
},
dataProductTourId: getProductTourIdForDynamicField(field),
style: {
@@ -385,7 +385,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
* The maximum width is set to prevent the table from becoming too wide when the content is long
* The value of 550 is selected to match the maximum width based on the environment property name length, which is limited to 64 characters
*/
- maxWidth: 550
+ maxWidth: 550,
},
cell: ({ cell }) => {
const value = cell.getValue();
@@ -399,7 +399,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
{cell.getValue()}
);
- }
+ },
}));
return [
@@ -420,8 +420,8 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
entityId={id}
items={[...(isEnvironment ? getManuallyCreatedEnvironmentActions({ id, name, isActive }, index) : [])]}
/>
- )
- }
+ ),
+ },
];
}, [
entityId,
@@ -431,7 +431,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
onUpdateActivity,
openSideModal,
restrictionReasonMessage,
- tableData
+ tableData,
]);
return isGetEnvironmentsLoading ? (
@@ -453,10 +453,10 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
dataTestId: "btn_add",
dataProductTourId: ENVIRONMENTS_TOUR_IDS.ADD_BUTTON,
requiredActions: ["MANAGE_RESOURCES"],
- isLoading: isGetResourceAllowedActionsLoading
- }
- ]
- }
+ isLoading: isGetResourceAllowedActionsLoading,
+ },
+ ],
+ },
}}
data={tableData}
columns={columns}
@@ -466,7 +466,7 @@ const EnvironmentsTable = ({ data, onUpdateActivity, entityId, isLoadingProps =
dataTestIds={{
searchInput: "input_search",
searchButton: "btn_search",
- deleteSearchButton: "btn_delete_search"
+ deleteSearchButton: "btn_delete_search",
}}
localization={{ emptyMessageId: "noEnvironments" }}
/>
diff --git a/ngui/ui/src/components/Error/Error.tsx b/ngui/ui/src/components/Error/Error.tsx
index b6ba6c26d..0536ae9f9 100644
--- a/ngui/ui/src/components/Error/Error.tsx
+++ b/ngui/ui/src/components/Error/Error.tsx
@@ -11,7 +11,7 @@ const Error = ({ messageId }) => (
left: 0,
display: "flex",
alignItems: "center",
- pointerEvents: "none"
+ pointerEvents: "none",
}}
>
diff --git a/ngui/ui/src/components/Events/Events.tsx b/ngui/ui/src/components/Events/Events.tsx
index d3847eb18..2ce5eed59 100644
--- a/ngui/ui/src/components/Events/Events.tsx
+++ b/ngui/ui/src/components/Events/Events.tsx
@@ -39,7 +39,7 @@ const Picker = ({ onApply }) => {
onApply={(startDate, endDate) =>
onApply({
timeStart: startDate,
- timeEnd: endDate
+ timeEnd: endDate,
})
}
notSetMessageId="latest"
@@ -54,26 +54,26 @@ const EVENT_LEVEL_ITEMS = [
name: "all",
value: EVENT_LEVEL.ALL,
type: "text",
- dataTestId: "event_lvl_all"
+ dataTestId: "event_lvl_all",
},
{
name: "info",
value: EVENT_LEVEL.INFO,
type: "text",
- dataTestId: "event_lvl_info"
+ dataTestId: "event_lvl_info",
},
{
name: "warning",
value: EVENT_LEVEL.WARNING,
type: "text",
- dataTestId: "event_lvl_warning"
+ dataTestId: "event_lvl_warning",
},
{
name: "error",
value: EVENT_LEVEL.ERROR,
type: "text",
- dataTestId: "event_lvl_error"
- }
+ dataTestId: "event_lvl_error",
+ },
];
const DEFAULT_EVENT_LEVEL = EVENT_LEVEL_ITEMS.find(({ value: itemValue }) => itemValue === EVENT_LEVEL.ALL);
@@ -86,7 +86,7 @@ const EventLevelSelector = ({ eventLevel, onApply }) => {
return {
name,
- value
+ value,
};
};
@@ -96,7 +96,7 @@ const EventLevelSelector = ({ eventLevel, onApply }) => {
label={
}
onChange={({ value }) =>
onApply({
- level: value
+ level: value,
})
}
items={EVENT_LEVEL_ITEMS}
@@ -109,7 +109,7 @@ const getEventsGroupedByTime = (events) =>
const groupKey = formatUTC(event.time);
return {
...resultObject,
- [groupKey]: [...(resultObject[groupKey] || []), event]
+ [groupKey]: [...(resultObject[groupKey] || []), event],
};
}, {});
@@ -118,7 +118,7 @@ const EventIcon = ({ eventLevel }) =>
[EVENT_LEVEL.INFO]:
,
[EVENT_LEVEL.WARNING]:
,
[EVENT_LEVEL.ERROR]:
,
- [EVENT_LEVEL.DEBUG]:
+ [EVENT_LEVEL.DEBUG]:
,
})[eventLevel];
const Events = ({
@@ -129,13 +129,13 @@ const Events = ({
applyFilter,
events,
isLoading = false,
- isFetchingMore = false
+ isFetchingMore = false,
}) => {
const actionBarDefinition = {
title: {
messageId: "events",
- dataTestId: "lbl_events"
- }
+ dataTestId: "lbl_events",
+ },
};
const [expanded, setExpanded] = useState("");
@@ -166,12 +166,12 @@ const Events = ({
accessorKey: "name",
cell: ({ row: { original } }) =>
{original.name}
,
style: {
- whiteSpace: "nowrap"
- }
+ whiteSpace: "nowrap",
+ },
},
{
- accessorKey: "value"
- }
+ accessorKey: "value",
+ },
],
[]
);
@@ -187,30 +187,30 @@ const Events = ({
{
name:
,
dataTestId: "lbl_date",
- value: formatEventTime(event.time)
+ value: formatEventTime(event.time),
},
{
name:
,
dataTestId: "lbl_object_name",
- value: event.object_name
+ value: event.object_name,
},
{
name:
,
dataTestId: "lbl_object_type",
- value: event.object_type
+ value: event.object_type,
},
{
name:
,
dataTestId: "lbl_description",
- value: event.description
- }
+ value: event.description,
+ },
];
// adding resolve by at second row
if (event.acknowledged_user) {
eventDataRaw.splice(1, 0, {
name:
,
- value: event.acknowledged_user
+ value: event.acknowledged_user,
});
}
@@ -225,10 +225,10 @@ const Events = ({
localization={{ emptyMessageId: "noEvents" }}
withHeader={false}
dataTestIds={{
- container: "div_event_details"
+ container: "div_event_details",
}}
counters={{
- show: false
+ show: false,
}}
/>
) : null;
@@ -314,7 +314,7 @@ const Events = ({
checked={includeDebugEvents}
onChange={() => {
applyFilter({
- includeDebugEvents: !includeDebugEvents
+ includeDebugEvents: !includeDebugEvents,
});
}}
/>
@@ -329,21 +329,21 @@ const Events = ({
justifyContent="flex-end"
flexWrap={{
sm: "nowrap",
- xs: "wrap"
+ xs: "wrap",
}}
>
{
applyFilter({
- descriptionLike: text
+ descriptionLike: text,
});
}}
initialSearchText={descriptionLike}
@@ -354,8 +354,8 @@ const Events = ({
sx={{
flexGrow: {
sm: 0,
- xs: 1
- }
+ xs: 1,
+ },
}}
>
diff --git a/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.styles.ts b/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.styles.ts
index 95fcb3287..6811b7c52 100644
--- a/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.styles.ts
+++ b/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.styles.ts
@@ -4,26 +4,26 @@ const useStyles = makeStyles()((theme) => ({
wrapper: {
width: theme.spacing(40),
[theme.breakpoints.up("sm")]: {
- width: theme.spacing(64)
- }
+ width: theme.spacing(64),
+ },
},
customContainer: {
- textAlign: "center"
+ textAlign: "center",
},
customTypography: {
fontWeight: "bold",
- fontSize: "1rem"
+ fontSize: "1rem",
},
listContainer: {
paddingBottom: 0,
- paddingTop: 0
+ paddingTop: 0,
},
buttonLink: {
"&:hover": {
- textDecoration: "none"
+ textDecoration: "none",
},
- color: "black"
- }
+ color: "black",
+ },
}));
export default useStyles;
diff --git a/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.tsx b/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.tsx
index 1bc665920..ddb6d96af 100644
--- a/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.tsx
+++ b/ngui/ui/src/components/EventsOverviewList/EventsOverviewList.tsx
@@ -37,7 +37,7 @@ const EventsOverviewList = ({ events, isLoading }) => {
- { }
+
diff --git a/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.styles.ts b/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.styles.ts
index f387a0ea8..6e327d963 100644
--- a/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.styles.ts
+++ b/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.styles.ts
@@ -2,33 +2,33 @@ import { makeStyles } from "tss-react/mui";
const useStyles = makeStyles()((theme) => ({
listItem: {
- padding: "0"
+ padding: "0",
},
warning: {
- backgroundColor: theme.palette.warning.main
+ backgroundColor: theme.palette.warning.main,
},
error: {
- backgroundColor: theme.palette.error.main
+ backgroundColor: theme.palette.error.main,
},
success: {
- backgroundColor: theme.palette.success.main
+ backgroundColor: theme.palette.success.main,
},
info: {
- backgroundColor: theme.palette.info.main
+ backgroundColor: theme.palette.info.main,
},
level: {
width: ".5rem",
- minHeight: "100%"
+ minHeight: "100%",
},
title: {
- fontWeight: "bold"
+ fontWeight: "bold",
},
timeAgo: {
- fontWeight: "bold"
+ fontWeight: "bold",
},
description: {
- wordBreak: "break-word"
- }
+ wordBreak: "break-word",
+ },
}));
export default useStyles;
diff --git a/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.tsx b/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.tsx
index 6b8bb9d3b..bf3bd8ef4 100644
--- a/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.tsx
+++ b/ngui/ui/src/components/EventsOverviewListItem/EventsOverviewListItem.tsx
@@ -19,14 +19,14 @@ const EventsOverviewListItem = (props) => {
-
+
{title}
{sliceByLimitWithEllipsis(description, 350)}
diff --git a/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludePoolsFromRecommendation.tsx b/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludePoolsFromRecommendation.tsx
index d5c4ef619..4e22c9da5 100644
--- a/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludePoolsFromRecommendation.tsx
+++ b/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludePoolsFromRecommendation.tsx
@@ -34,14 +34,14 @@ const ExcludePoolsFromRecommendation = ({ recommendationType, onSuccess }: Exclu
const onSubmit = () => {
const newOptions = {
...options,
- excluded_pools: selectedPools
+ excluded_pools: selectedPools,
};
updateRecommendationOptions(
recommendationType,
{
settingType: SETTINGS_TYPE_SUCCESS_MESSAGE.EXCLUSIONS,
- options: newOptions
+ options: newOptions,
},
onSuccess
);
@@ -71,7 +71,7 @@ const ExcludePoolsFromRecommendation = ({ recommendationType, onSuccess }: Exclu
disabled={!isChangeSettingsAllowed}
tooltip={{
show: !isChangeSettingsAllowed,
- messageId: "youDoNotHaveEnoughPermissions"
+ messageId: "youDoNotHaveEnoughPermissions",
}}
type="submit"
onClick={onSubmit}
diff --git a/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludedPoolsTable.tsx b/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludedPoolsTable.tsx
index 2cf6fccc4..c9737adad 100644
--- a/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludedPoolsTable.tsx
+++ b/ngui/ui/src/components/ExcludePoolsFromRecommendation/ExcludedPoolsTable.tsx
@@ -21,7 +21,7 @@ const ExcludedPoolsTable = ({
isChangeSettingsAllowed,
isLoading = false,
selectedPools,
- onSelectedPoolChange
+ onSelectedPoolChange,
}: ExcludedPoolsTableType) => {
const tableData = useMemo(() => {
const excludedPoolsIds = Object.keys(selectedPools);
@@ -36,8 +36,8 @@ const ExcludedPoolsTable = ({
cell: ({ row: { original } }) => (
),
- defaultSort: "asc"
- }
+ defaultSort: "asc",
+ },
],
[]
);
@@ -45,7 +45,7 @@ const ExcludedPoolsTable = ({
const getRowSelectionProps = () => ({
withSelection: true,
rowSelection: selectedPools,
- onRowSelectionChange: (pools: SelectedPoolType) => onSelectedPoolChange(pools)
+ onRowSelectionChange: (pools: SelectedPoolType) => onSelectedPoolChange(pools),
});
return isLoading ? (
@@ -55,7 +55,7 @@ const ExcludedPoolsTable = ({
data={tableData}
columns={columns}
localization={{
- emptyMessageId: "noExclusions"
+ emptyMessageId: "noExclusions",
}}
withSearch
pageSize={50}
diff --git a/ngui/ui/src/components/ExecutionBreakdown/Chart/Chart.tsx b/ngui/ui/src/components/ExecutionBreakdown/Chart/Chart.tsx
index 83978824c..353c20bac 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/Chart/Chart.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/Chart/Chart.tsx
@@ -21,7 +21,7 @@ const Chart = ({
breakdownLines,
highlightedStage,
milestonesLine,
- colors
+ colors,
}) => {
const renderMilestonesLayer = useRenderMilestonesLayer();
const renderStagesLayer = useRenderStagesLayer();
@@ -40,12 +40,12 @@ const Chart = ({
const filteredMilestonesLine = {
...milestonesLine,
- data: filterLineData(milestonesLine.data)
+ data: filterLineData(milestonesLine.data),
};
const filteredBreakdownLines = breakdownLines.map((line) => ({
...line,
- data: filterLineData(line.data)
+ data: filterLineData(line.data),
}));
const filteredLines = [filteredMilestonesLine, ...filteredBreakdownLines].filter(({ data }) => !isEmptyArray(data));
@@ -55,18 +55,18 @@ const Chart = ({
data={filteredLines}
{...(isEmptyArray(breakdownLines)
? {
- emptyMessageId: "noDataToDisplay"
+ emptyMessageId: "noDataToDisplay",
}
: {
emptyMessageId: "noDataIsAvailableWithinTheSelectedBrushRange",
- emptyMessageValues: { br: }
+ emptyMessageValues: { br: },
})}
xScale={{
type: "linear",
- min: "auto"
+ min: "auto",
}}
yScale={{
- max: 1
+ max: 1,
}}
renderTooltipBody={({ slice: { points: allPoints = [] } = {} }) => {
const { milestonePoints = [], ...restPoints } = createGroupsObjectFromArray(allPoints, (point) =>
@@ -134,7 +134,7 @@ const Chart = ({
}}
colors={colors}
style={{
- margin: CHART_MARGIN_STYLES
+ margin: CHART_MARGIN_STYLES,
}}
overlayLayers={[
showMilestones
@@ -142,8 +142,8 @@ const Chart = ({
key: "milestonesLayer",
renderCanvasContent: renderMilestonesLayer({
milestones: filteredMilestonesGroupedByTimeTuples,
- shouldShowMilestoneLabels
- })
+ shouldShowMilestoneLabels,
+ }),
}
: undefined,
highlightedStage
@@ -151,28 +151,28 @@ const Chart = ({
key: "stagesHighlightLayer",
renderCanvasContent: renderStagesLayer({
highlightedStage,
- withHeader: true
- })
+ withHeader: true,
+ }),
}
- : undefined
+ : undefined,
].filter(Boolean)}
axisLeft={
[1, 2].includes(breakdownLines.length)
? {
- format: breakdownLines[0].formatAxis
+ format: breakdownLines[0].formatAxis,
}
: null
}
axisRight={
breakdownLines.length === 2
? {
- format: breakdownLines[1].formatAxis
+ format: breakdownLines[1].formatAxis,
}
: null
}
axisBottom={{
format: (value) => formatSecondsToHHMMSS(value),
- formatString: (value) => formatSecondsToHHMMSS(value)
+ formatString: (value) => formatSecondsToHHMMSS(value),
}}
/>
);
diff --git a/ngui/ui/src/components/ExecutionBreakdown/ChartContainer/ChartContainer.tsx b/ngui/ui/src/components/ExecutionBreakdown/ChartContainer/ChartContainer.tsx
index 49d44d862..caae24390 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/ChartContainer/ChartContainer.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/ChartContainer/ChartContainer.tsx
@@ -11,7 +11,7 @@ import ChartDataSelector from "../ChartDataSelector";
const CHART_X_MARGINS = {
mr: { xs: 0, md: `${CHART_MARGIN_STYLES.right}px` },
- ml: { xs: 0, md: `${CHART_MARGIN_STYLES.left}px` }
+ ml: { xs: 0, md: `${CHART_MARGIN_STYLES.left}px` },
};
const BREAKDOWN_BY_QUERY_PARAMETER = "breakdownBy";
@@ -33,12 +33,12 @@ const ChartContainer = ({
selectedBreakdowns,
onSelectedBreakdownsChange,
name,
- showMilestones
+ showMilestones,
}) => {
const breakdownLines = useMlBreakdownLines({
breakdown,
breakdownConfig,
- selectedBreakdowns
+ selectedBreakdowns,
});
return (
@@ -49,7 +49,7 @@ const ChartContainer = ({
display: "flex",
flexDirection: "row",
justifyContent: "flex-start",
- alignItems: "center"
+ alignItems: "center",
}}
>
{name}
diff --git a/ngui/ui/src/components/ExecutionBreakdown/ChartDataSelector/ChartDataSelector.tsx b/ngui/ui/src/components/ExecutionBreakdown/ChartDataSelector/ChartDataSelector.tsx
index 5d35017c4..48021153a 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/ChartDataSelector/ChartDataSelector.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/ChartDataSelector/ChartDataSelector.tsx
@@ -12,7 +12,7 @@ const ChartDataSelector = ({ selectedBreakdowns, colorsMap, breakdownConfig, onC
const breakdownsColored = breakdownConfig
.map((item) => ({
color: colorsMap[item.name] || theme.palette.common.black,
- ...item
+ ...item,
}))
.sort(({ isNotImplemented: a = false }, { isNotImplemented: b = false }) => a - b);
diff --git a/ngui/ui/src/components/ExecutionBreakdown/ChartLayers/useRenderMilestonesLayer.ts b/ngui/ui/src/components/ExecutionBreakdown/ChartLayers/useRenderMilestonesLayer.ts
index 50e90ffdd..0fd791932 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/ChartLayers/useRenderMilestonesLayer.ts
+++ b/ngui/ui/src/components/ExecutionBreakdown/ChartLayers/useRenderMilestonesLayer.ts
@@ -40,7 +40,7 @@ export const useRenderMilestonesLayer = () => {
milestoneX + SPACING_BETWEEN_MILESTONE_LINE_AND_NAME + milestoneNameWidth > linesAreaRectangle.xEnd
? milestoneX - SPACING_BETWEEN_MILESTONE_LINE_AND_NAME - milestoneNameWidth
: milestoneX + SPACING_BETWEEN_MILESTONE_LINE_AND_NAME,
- y: linesAreaRectangle.yStart + namesCounter * Y_AXIS_SHIFT_COEFFICIENT
+ y: linesAreaRectangle.yStart + namesCounter * Y_AXIS_SHIFT_COEFFICIENT,
};
ctx.fillText(milestoneName, position.x, position.y);
diff --git a/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/DashboardControls.tsx b/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/DashboardControls.tsx
index 09b76630a..3ee93a40a 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/DashboardControls.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/DashboardControls.tsx
@@ -17,7 +17,7 @@ const DashboardControls = ({
createDashboard,
removeDashboard,
isPublicRun,
- isLoadingProps = {}
+ isLoadingProps = {},
}) => {
const isOwnedDashboard = currentEmployeeId === dashboard.ownerId;
@@ -28,7 +28,7 @@ const DashboardControls = ({
dashboard,
updateDashboard,
isOwnedDashboard,
- createDashboard
+ createDashboard,
});
};
diff --git a/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/NameSelector.tsx b/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/NameSelector.tsx
index f6d10e484..92e6af23f 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/NameSelector.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/DashboardControls/NameSelector.tsx
@@ -42,7 +42,7 @@ const NameSelector = ({ dashboards, currentEmployeeId, selected, onChange, saved
? {
placement: "end",
IconComponent: ShareOutlinedIcon,
- tooltipTitle:
+ tooltipTitle: ,
}
: undefined;
@@ -60,7 +60,7 @@ const NameSelector = ({ dashboards, currentEmployeeId, selected, onChange, saved
? {
placement: "end",
IconComponent: ShareOutlinedIcon,
- tooltipTitle:
+ tooltipTitle: ,
}
: undefined;
diff --git a/ngui/ui/src/components/ExecutionBreakdown/ExecutionBreakdown.tsx b/ngui/ui/src/components/ExecutionBreakdown/ExecutionBreakdown.tsx
index 211c52d1d..b74b0b8db 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/ExecutionBreakdown.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/ExecutionBreakdown.tsx
@@ -33,7 +33,7 @@ const MILESTONES_LINE_ID = "milestones";
const MUI_GRID_VALUES = Object.freeze({
[GRID_TYPES.ONE_COLUMN]: 12,
[GRID_TYPES.TWO_COLUMN]: 6,
- [GRID_TYPES.THREE_COLUMNS]: 4
+ [GRID_TYPES.THREE_COLUMNS]: 4,
});
const GridButton = ({ gridType, onClick }) => (
@@ -67,7 +67,7 @@ const ExecutionBreakdown = ({
stages,
milestones,
reachedGoals = {},
- taskId
+ taskId,
}) => {
const milestonesGroupedByTimeTuples = getMilestoneTuplesGroupedByTime(milestones);
@@ -87,9 +87,9 @@ const ExecutionBreakdown = ({
formatDigitalUnit({
value,
baseUnit: IEC_UNITS.MEBIBYTE,
- maximumFractionDigits: 2
+ maximumFractionDigits: 2,
}),
- unit: BREAKDOWN_LINE_UNIT.MEBIBYTE
+ unit: BREAKDOWN_LINE_UNIT.MEBIBYTE,
},
{
name: "host_cpu",
@@ -98,9 +98,9 @@ const ExecutionBreakdown = ({
formatValue: (value) => ,
formatAxis: (value) =>
intl.formatNumber(value / 100, {
- format: "percentage2"
+ format: "percentage2",
}),
- unit: BREAKDOWN_LINE_UNIT.PERCENT
+ unit: BREAKDOWN_LINE_UNIT.PERCENT,
},
{
name: "process_cpu",
@@ -109,9 +109,9 @@ const ExecutionBreakdown = ({
formatValue: (value) => ,
formatAxis: (value) =>
intl.formatNumber(value / 100, {
- format: "percentage2"
+ format: "percentage2",
}),
- unit: BREAKDOWN_LINE_UNIT.PERCENT
+ unit: BREAKDOWN_LINE_UNIT.PERCENT,
},
{
name: "process_ram",
@@ -122,9 +122,9 @@ const ExecutionBreakdown = ({
formatDigitalUnit({
value,
baseUnit: IEC_UNITS.MEBIBYTE,
- maximumFractionDigits: 2
+ maximumFractionDigits: 2,
}),
- unit: BREAKDOWN_LINE_UNIT.MEBIBYTE
+ unit: BREAKDOWN_LINE_UNIT.MEBIBYTE,
},
{
name: "gpu_load",
@@ -133,9 +133,9 @@ const ExecutionBreakdown = ({
formatValue: (value) => ,
formatAxis: (value) =>
intl.formatNumber(value / 100, {
- format: "percentage2"
+ format: "percentage2",
}),
- unit: BREAKDOWN_LINE_UNIT.PERCENT
+ unit: BREAKDOWN_LINE_UNIT.PERCENT,
},
{
name: "gpu_memory_used",
@@ -146,9 +146,9 @@ const ExecutionBreakdown = ({
formatDigitalUnit({
value,
baseUnit: IEC_UNITS.MEBIBYTE,
- maximumFractionDigits: 2
+ maximumFractionDigits: 2,
}),
- unit: BREAKDOWN_LINE_UNIT.MEBIBYTE
+ unit: BREAKDOWN_LINE_UNIT.MEBIBYTE,
},
{
name: "disc_read",
@@ -156,7 +156,7 @@ const ExecutionBreakdown = ({
renderBreakdownName: () => intl.formatMessage({ id: "diskRead" }),
getPointValue: (data) => data.metrics?.disc_read ?? null,
formatValue: (value) => value,
- formatAxis: (value) => value
+ formatAxis: (value) => value,
},
{
name: "disc_write",
@@ -164,7 +164,7 @@ const ExecutionBreakdown = ({
renderBreakdownName: () => intl.formatMessage({ id: "diskWrite" }),
getPointValue: (data) => data.metrics?.disc_write ?? null,
formatValue: (value) => value,
- formatAxis: (value) => value
+ formatAxis: (value) => value,
},
{
name: "network_input",
@@ -172,7 +172,7 @@ const ExecutionBreakdown = ({
renderBreakdownName: () => intl.formatMessage({ id: "networkReceive" }),
getPointValue: (data) => data.metrics?.network_input ?? null,
formatValue: (value) => value,
- formatAxis: (value) => value
+ formatAxis: (value) => value,
},
{
name: "network_output",
@@ -180,8 +180,8 @@ const ExecutionBreakdown = ({
renderBreakdownName: () => intl.formatMessage({ id: "networkSend" }),
getPointValue: (data) => data.metrics?.network_output ?? null,
formatValue: (value) => value,
- formatAxis: (value) => value
- }
+ formatAxis: (value) => value,
+ },
],
[intl]
);
@@ -199,8 +199,8 @@ const ExecutionBreakdown = ({
formatDynamicFractionDigitsValue({
value,
maximumFractionDigits: 2,
- notation: "compact"
- })
+ notation: "compact",
+ }),
})),
[formatDynamicFractionDigitsValue, reachedGoals]
);
@@ -223,7 +223,7 @@ const ExecutionBreakdown = ({
const colorsMap = {
[MILESTONES_LINE_ID]: "transparent",
- ...getColorsMap(breakdownNames, theme.palette.chart)
+ ...getColorsMap(breakdownNames, theme.palette.chart),
};
const breakdownSeconds = Object.keys(breakdown).map(Number);
@@ -236,8 +236,8 @@ const ExecutionBreakdown = ({
data: milestonesGroupedByTimeTuples.map(([time, milestoneNames]) => ({
x: Number(time),
y: 0,
- names: milestoneNames
- }))
+ names: milestoneNames,
+ })),
};
const openSideModal = useOpenSideModal();
@@ -253,7 +253,7 @@ const ExecutionBreakdown = ({
secondsTimeRange: xValuesRange,
stages,
milestones,
- milestonesGroupedByTimeTuples
+ milestonesGroupedByTimeTuples,
});
const getSelectedSegment = () => selectedSegment ?? xValuesRange;
@@ -279,18 +279,18 @@ const ExecutionBreakdown = ({
enableTooltipSync,
disableTooltipSync,
updateGridType,
- isLoadingProps
+ isLoadingProps,
} = useTaskRunChartState({
organizationId,
arceeToken,
taskId,
implementedMetricsBreakdownNames,
breakdownNames,
- isPublicRun
+ isPublicRun,
});
const {
- data: { charts, show_milestones: showMilestones, sync_tooltips: syncTooltips, grid_type: gridType }
+ data: { charts, show_milestones: showMilestones, sync_tooltips: syncTooltips, grid_type: gridType },
} = dashboard;
const [mousePosition, setMousePosition] = useState(undefined);
@@ -303,7 +303,7 @@ const ExecutionBreakdown = ({
display: "flex",
alignItems: "flex-start",
justifyContent: "space-between",
- flexDirection: { md: "row", xs: "column" }
+ flexDirection: { md: "row", xs: "column" },
}}
>
@@ -347,7 +347,7 @@ const ExecutionBreakdown = ({
onClick={addChart}
tooltip={{
show: true,
- messageId: "addChart"
+ messageId: "addChart",
}}
/>
{
updateChartName(chartId, newName);
- }
+ },
})
}
selectedBreakdowns={breakdowns}
diff --git a/ngui/ui/src/components/ExecutionBreakdown/TimerangeSlider/TimerangeSlider.tsx b/ngui/ui/src/components/ExecutionBreakdown/TimerangeSlider/TimerangeSlider.tsx
index 7e0f98903..52e728a41 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/TimerangeSlider/TimerangeSlider.tsx
+++ b/ngui/ui/src/components/ExecutionBreakdown/TimerangeSlider/TimerangeSlider.tsx
@@ -31,8 +31,8 @@ const CustomMarkComponent = (props) => {
opacity: 0.38,
"&.MuiSlider-markActive": {
opacity: 1,
- backgroundColor: theme.palette.primary.dark
- }
+ backgroundColor: theme.palette.primary.dark,
+ },
}}
onMouseEnter={() => getMarkTooltipText()}
className={className}
@@ -53,10 +53,10 @@ const TimerangeSlider = ({ milestonesGroupedByTimeTuples, selectedSegment, setSe
return (
chartsTimerangeMessage}
diff --git a/ngui/ui/src/components/ExecutionBreakdown/utils.ts b/ngui/ui/src/components/ExecutionBreakdown/utils.ts
index 4dae11ecc..a53bf9691 100644
--- a/ngui/ui/src/components/ExecutionBreakdown/utils.ts
+++ b/ngui/ui/src/components/ExecutionBreakdown/utils.ts
@@ -5,7 +5,7 @@ export const getMilestoneTuplesGroupedByTime = (milestones) => {
const milestonesTuplesGroupedByTime = Object.entries(milestonesGroupedByTime).map((el) => [
Number(el[0]),
- el[1].map(({ milestone }) => milestone)
+ el[1].map(({ milestone }) => milestone),
]);
return milestonesTuplesGroupedByTime;
diff --git a/ngui/ui/src/components/ExecutorLabel/ExecutorLabel.tsx b/ngui/ui/src/components/ExecutorLabel/ExecutorLabel.tsx
index 3b3309670..843faea57 100644
--- a/ngui/ui/src/components/ExecutorLabel/ExecutorLabel.tsx
+++ b/ngui/ui/src/components/ExecutorLabel/ExecutorLabel.tsx
@@ -6,7 +6,7 @@ import { AWS_CNR, AZURE_CNR } from "utils/constants";
// ML profiling: map cloud types to OptScale data source types
const PLATFORM_TYPE_TO_DATA_SOURCE_TYPE = Object.freeze({
azure: AZURE_CNR,
- aws: AWS_CNR
+ aws: AWS_CNR,
});
const DiscoveredExecutorLabel = ({ resource, disableLink }) => {
diff --git a/ngui/ui/src/components/ExecutorsPanel/ExecutorsPanel.tsx b/ngui/ui/src/components/ExecutorsPanel/ExecutorsPanel.tsx
index 8f79a6eb4..63a3f1c98 100644
--- a/ngui/ui/src/components/ExecutorsPanel/ExecutorsPanel.tsx
+++ b/ngui/ui/src/components/ExecutorsPanel/ExecutorsPanel.tsx
@@ -8,7 +8,7 @@ import useDateRanges, {
oneWeekRange,
twoWeeksRange,
oneMonthRange,
- customRange
+ customRange,
} from "hooks/useDateRanges";
import { SPACING_1 } from "utils/layouts";
@@ -19,7 +19,7 @@ const ExecutorsPanel = () => {
oneWeekRange(true),
twoWeeksRange(true),
oneMonthRange(true),
- customRange(true)
+ customRange(true),
]);
return (
diff --git a/ngui/ui/src/components/ExpandableList/ExpandableList.tsx b/ngui/ui/src/components/ExpandableList/ExpandableList.tsx
index 0fbab2af3..2ff001a57 100644
--- a/ngui/ui/src/components/ExpandableList/ExpandableList.tsx
+++ b/ngui/ui/src/components/ExpandableList/ExpandableList.tsx
@@ -40,7 +40,7 @@ const ExpandableList = ({
items,
render,
maxRows = undefined,
- stopPropagationOnShowMore = false
+ stopPropagationOnShowMore = false,
}: ExpandableListProps) => {
if (maxRows && items.length > maxRows) {
return ;
diff --git a/ngui/ui/src/components/ExpenseCell/ExpenseCell.tsx b/ngui/ui/src/components/ExpenseCell/ExpenseCell.tsx
index 6b73a661e..8a0994daf 100644
--- a/ngui/ui/src/components/ExpenseCell/ExpenseCell.tsx
+++ b/ngui/ui/src/components/ExpenseCell/ExpenseCell.tsx
@@ -26,7 +26,7 @@ const SavingsMessage = ({ saving, clusterTypeId, resourceId }: SavingsMessagePro
+ value: ,
}}
/>
);
diff --git a/ngui/ui/src/components/ExpensesBreakdown/ActionBar/ExpensesBreakdownActionBar.tsx b/ngui/ui/src/components/ExpensesBreakdown/ActionBar/ExpensesBreakdownActionBar.tsx
index 774010ddc..1ef36865c 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/ActionBar/ExpensesBreakdownActionBar.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/ActionBar/ExpensesBreakdownActionBar.tsx
@@ -8,28 +8,28 @@ import { COST_EXPLORER, CLOUD_DETAILS, OWNER_DETAILS, POOL_DETAILS, EXPENSES_FIL
const ENTITY_TYPES = Object.freeze({
CLOUD: "cloud",
OWNER: "owner",
- POOL: "pool"
+ POOL: "pool",
});
const getEntityTypeByBreakdownType = (expensesBreakdownType) =>
({
[CLOUD_DETAILS]: ENTITY_TYPES.CLOUD,
[OWNER_DETAILS]: ENTITY_TYPES.OWNER,
- [POOL_DETAILS]: ENTITY_TYPES.POOL
+ [POOL_DETAILS]: ENTITY_TYPES.POOL,
})[expensesBreakdownType];
const getEntityTypeByFilter = (filterBy) =>
({
[EXPENSES_FILTERBY_TYPES.EMPLOYEE]: ENTITY_TYPES.OWNER,
[EXPENSES_FILTERBY_TYPES.CLOUD]: ENTITY_TYPES.CLOUD,
- [EXPENSES_FILTERBY_TYPES.POOL]: ENTITY_TYPES.POOL
+ [EXPENSES_FILTERBY_TYPES.POOL]: ENTITY_TYPES.POOL,
})[filterBy];
const getCostExplorerExpensesBreakdownTitle = (entityType) => (
);
@@ -39,7 +39,7 @@ const getExpensesBreakdownTitle = (name, entityType) => (
id="expensesBreakdownForTitle"
values={{
name,
- entityType
+ entityType,
}}
/>
);
@@ -57,8 +57,8 @@ const ExpensesBreakdownActionBar = ({ expensesBreakdownType, filterBy, name, isL
breadcrumbs: [
-
- ]
+ ,
+ ],
};
}
@@ -77,14 +77,14 @@ const ExpensesBreakdownActionBar = ({ expensesBreakdownType, filterBy, name, isL
{
[ENTITY_TYPES.OWNER]: EXPENSES_BY_OWNER,
[ENTITY_TYPES.CLOUD]: EXPENSES_BY_CLOUD,
- [ENTITY_TYPES.POOL]: EXPENSES_BY_POOL
+ [ENTITY_TYPES.POOL]: EXPENSES_BY_POOL,
}[entityType]
}
component={RouterLink}
>
{getCostExplorerExpensesBreakdownTitle(entityType)}
-
- ]
+ ,
+ ],
};
};
@@ -94,8 +94,8 @@ const ExpensesBreakdownActionBar = ({ expensesBreakdownType, filterBy, name, isL
breadcrumbs,
title: {
text: titleText,
- isLoading
- }
+ isLoading,
+ },
};
return ;
diff --git a/ngui/ui/src/components/ExpensesBreakdown/BarChart/ExpensesBreakdownBarChart.tsx b/ngui/ui/src/components/ExpensesBreakdown/BarChart/ExpensesBreakdownBarChart.tsx
index 0d90108f1..486ec5eab 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/BarChart/ExpensesBreakdownBarChart.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/BarChart/ExpensesBreakdownBarChart.tsx
@@ -14,8 +14,8 @@ const ExpensesBreakdownBarChart = ({ periodType, pdfId, breakdownData, fieldTool
sourceData: {
[EXPENSES_SPLIT_PERIODS.DAILY]: breakdownData.daily,
[EXPENSES_SPLIT_PERIODS.WEEKLY]: breakdownData.weekly,
- [EXPENSES_SPLIT_PERIODS.MONTHLY]: breakdownData.monthly
- }[periodType]
+ [EXPENSES_SPLIT_PERIODS.MONTHLY]: breakdownData.monthly,
+ }[periodType],
});
const onClickHandler =
diff --git a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByButtonsGroup/ExpensesBreakdownBreakdownByButtonsGroup.tsx b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByButtonsGroup/ExpensesBreakdownBreakdownByButtonsGroup.tsx
index 5a0a50057..83c060930 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByButtonsGroup/ExpensesBreakdownBreakdownByButtonsGroup.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByButtonsGroup/ExpensesBreakdownBreakdownByButtonsGroup.tsx
@@ -11,14 +11,14 @@ const filters = [
id: EXPENSES_FILTERBY_TYPES.REGION,
messageId: "region",
forTypes: [CLOUD_DETAILS],
- excludeFor: [KUBERNETES_CNR]
+ excludeFor: [KUBERNETES_CNR],
},
{ id: EXPENSES_FILTERBY_TYPES.NODE, messageId: "node", forTypes: [CLOUD_DETAILS], showOnlyFor: [KUBERNETES_CNR] },
{ id: EXPENSES_FILTERBY_TYPES.NAMESPACE, messageId: "namespace", forTypes: [CLOUD_DETAILS], showOnlyFor: [KUBERNETES_CNR] },
{ id: EXPENSES_FILTERBY_TYPES.POOL, messageId: "pool", forTypes: [POOL_DETAILS, CLOUD_DETAILS, OWNER_DETAILS] },
{ id: EXPENSES_FILTERBY_TYPES.CLOUD, messageId: "source", forTypes: [POOL_DETAILS, OWNER_DETAILS] },
{ id: EXPENSES_FILTERBY_TYPES.EMPLOYEE, messageId: "owner", forTypes: [POOL_DETAILS, CLOUD_DETAILS] },
- { id: EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE, messageId: "resourceType", forTypes: [CLOUD_DETAILS] }
+ { id: EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE, messageId: "resourceType", forTypes: [CLOUD_DETAILS] },
];
const getButtonsGroup = (type, onClick, dataSourceType) =>
diff --git a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/ExpensesBreakdownByPeriodWidget.tsx b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/ExpensesBreakdownByPeriodWidget.tsx
index 492594045..75ffc2e7d 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/ExpensesBreakdownByPeriodWidget.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/ExpensesBreakdownByPeriodWidget.tsx
@@ -18,20 +18,20 @@ const breakdownLinearSelectorItems = [
name: EXPENSES_SPLIT_PERIODS.DAILY,
value: EXPENSES_SPLIT_PERIODS.DAILY,
type: LINEAR_SELECTOR_ITEMS_TYPES.TEXT,
- dataTestId: "breakdown_ls_item_daily"
+ dataTestId: "breakdown_ls_item_daily",
},
{
name: EXPENSES_SPLIT_PERIODS.WEEKLY,
value: EXPENSES_SPLIT_PERIODS.WEEKLY,
type: LINEAR_SELECTOR_ITEMS_TYPES.TEXT,
- dataTestId: "breakdown_ls_item_weekly"
+ dataTestId: "breakdown_ls_item_weekly",
},
{
name: EXPENSES_SPLIT_PERIODS.MONTHLY,
value: EXPENSES_SPLIT_PERIODS.MONTHLY,
type: LINEAR_SELECTOR_ITEMS_TYPES.TEXT,
- dataTestId: "breakdown_ls_item_monthly"
- }
+ dataTestId: "breakdown_ls_item_monthly",
+ },
];
// todo: unify with resources selector
@@ -64,7 +64,7 @@ const ExpensesBreakdownByPeriodWidget = ({ render }) => {
useEffect(() => {
updateSearchParams({
- [PERIOD_TYPE_QUERY_PARAMETER_NAME]: periodType.value
+ [PERIOD_TYPE_QUERY_PARAMETER_NAME]: periodType.value,
});
dispatch(changePeriodType(periodType.value));
}, [dispatch, periodType]);
@@ -88,9 +88,9 @@ const ExpensesBreakdownByPeriodWidget = ({ render }) => {
text: {
[EXPENSES_SPLIT_PERIODS.DAILY]: "dailyExpenses",
[EXPENSES_SPLIT_PERIODS.WEEKLY]: "weeklyExpenses",
- [EXPENSES_SPLIT_PERIODS.MONTHLY]: "monthlyExpenses"
+ [EXPENSES_SPLIT_PERIODS.MONTHLY]: "monthlyExpenses",
}[periodType.value],
- elementType: PDF_ELEMENTS.basics.H2
+ elementType: PDF_ELEMENTS.basics.H2,
})}
/>
{render(periodType.value)}
diff --git a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/actionCreator.ts b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/actionCreator.ts
index ecc01df74..b18ae9a45 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/actionCreator.ts
+++ b/ngui/ui/src/components/ExpensesBreakdown/BreakdownByPeriodWidget/actionCreator.ts
@@ -2,5 +2,5 @@ import { CHANGE_PERIOD_TYPE } from "./actionTypes";
export const changePeriodType = (type) => ({
type: CHANGE_PERIOD_TYPE,
- payload: type
+ payload: type,
});
diff --git a/ngui/ui/src/components/ExpensesBreakdown/ExpensesBreakdown.test.tsx b/ngui/ui/src/components/ExpensesBreakdown/ExpensesBreakdown.test.tsx
index 2defc83a9..1460761d6 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/ExpensesBreakdown.test.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/ExpensesBreakdown.test.tsx
@@ -13,7 +13,7 @@ it("renders without crashing", () => {
root.render(
{
const navigate = useNavigate();
const theme = useTheme();
@@ -62,7 +62,7 @@ const ExpensesBreakdown = ({
const colorsMap = getColorsMapByIds({
data: filteredBreakdown,
- colors: theme.palette.chart
+ colors: theme.palette.chart,
});
const getEntityExpensesUrl = (targetEntityId, targetEntityType) => {
@@ -77,24 +77,24 @@ const ExpensesBreakdown = ({
[EXPENSES_FILTERBY_TYPES.POOL]:
type === POOL_DETAILS
? entityId !== targetEntityId && `${getPoolExpensesUrl(targetEntityId)}?filterBy=${EXPENSES_FILTERBY_TYPES.POOL}`
- : `${getPoolExpensesUrl(targetEntityId)}?filterBy=${EXPENSES_FILTERBY_TYPES.POOL}`
+ : `${getPoolExpensesUrl(targetEntityId)}?filterBy=${EXPENSES_FILTERBY_TYPES.POOL}`,
}[filterBy];
};
const getFilterByEntity = (isTableWrapper = false) =>
({
[OWNER_DETAILS]: {
- [OWNER_ID_FILTER]: entityId
+ [OWNER_ID_FILTER]: entityId,
},
[CLOUD_DETAILS]: {
- [CLOUD_ACCOUNT_ID_FILTER]: entityId
+ [CLOUD_ACCOUNT_ID_FILTER]: entityId,
},
[POOL_DETAILS]: isTableWrapper
? {
- [POOL_ID_FILTER]: entityId
+ [POOL_ID_FILTER]: entityId,
}
: {},
- [COST_EXPLORER]: {}
+ [COST_EXPLORER]: {},
})[type];
const getComputedParams = (details) =>
@@ -114,7 +114,7 @@ const ExpensesBreakdown = ({
// When/if a different type is added to calculations (e.g. 'cluster'), the API will have to return it.
[EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE]: `${RESOURCE_TYPE_FILTER}=${details.name}:${OPTSCALE_RESOURCE_TYPES.REGULAR}`,
[EXPENSES_FILTERBY_TYPES.NODE]: `${K8S_NODE_FILTER}=${details.id}`,
- [EXPENSES_FILTERBY_TYPES.NAMESPACE]: `${K8S_NAMESPACE_FILTER}=${details.id}`
+ [EXPENSES_FILTERBY_TYPES.NAMESPACE]: `${K8S_NAMESPACE_FILTER}=${details.id}`,
})[filterBy];
const renderHeading = () => (
@@ -172,7 +172,7 @@ const ExpensesBreakdown = ({
...getFilterByEntity(),
computedParams: getComputedParams(bandDetails),
sStartDate: bandDetails.startDate,
- sEndDate: bandDetails.endDate
+ sEndDate: bandDetails.endDate,
})
);
}
@@ -219,7 +219,7 @@ const ExpensesBreakdown = ({
}
}
getCustomDetails={({ id, type: sectionEntityType }) => ({
- link: getEntityExpensesUrl(id, sectionEntityType)
+ link: getEntityExpensesUrl(id, sectionEntityType),
})}
getShouldApplyHoverStyles={(node) => {
const { data: { details: { link = "" } = {} } = {} } = node;
@@ -247,7 +247,7 @@ const ExpensesBreakdown = ({
getResourcesExpensesUrl({
...getFilterByEntity(true),
sStartDate: startDateTimestamp,
- sEndDate: endDateTimestamp
+ sEndDate: endDateTimestamp,
})
)
}
@@ -259,7 +259,7 @@ const ExpensesBreakdown = ({
...getFilterByEntity(),
computedParams: getComputedParams(rowData),
sStartDate: startDateTimestamp,
- sEndDate: endDateTimestamp
+ sEndDate: endDateTimestamp,
})
)
}
@@ -274,7 +274,7 @@ const ExpensesBreakdown = ({
top={renderHeading()}
center={{
left: renderBarChartWidget(),
- right: renderPieChartWidget()
+ right: renderPieChartWidget(),
}}
bottom={renderTableWidget()}
/>
diff --git a/ngui/ui/src/components/ExpensesBreakdown/LayoutWrapper/ExpensesBreakdownLayoutWrapper.test.tsx b/ngui/ui/src/components/ExpensesBreakdown/LayoutWrapper/ExpensesBreakdownLayoutWrapper.test.tsx
index abcf38b5e..228918dc4 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/LayoutWrapper/ExpensesBreakdownLayoutWrapper.test.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/LayoutWrapper/ExpensesBreakdownLayoutWrapper.test.tsx
@@ -12,7 +12,7 @@ it("renders without crashing", () => {
top={Child 1 }
center={{
left: Child 2 ,
- right: Child 3
+ right: Child 3 ,
}}
bottom={Child 4 }
/>
diff --git a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForCloudMocked.tsx b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForCloudMocked.tsx
index 038fe4def..30d87ade4 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForCloudMocked.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForCloudMocked.tsx
@@ -11,267 +11,267 @@ const ExpensesBreakdownForCloudMocked = () => {
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 4627.2909333465
+ expense: 4627.2909333465,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 3541.3401215294
+ expense: 3541.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 989.3401215294
+ expense: 989.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 780.3401215294
+ expense: 780.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 540.3401215294
+ expense: 540.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 26.627527999999998
- }
+ expense: 26.627527999999998,
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 1)]: [
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 1950.3397350166
+ expense: 1950.3397350166,
},
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 4172.6371212522
+ expense: 4172.6371212522,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 1230.3401215294
+ expense: 1230.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 1009.3401215294
+ expense: 1009.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 230.3401215294
+ expense: 230.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 26.829112
- }
+ expense: 26.829112,
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 2)]: [
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 4720.8836990961
+ expense: 4720.8836990961,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 2031.3381313975
+ expense: 2031.3381313975,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 510.3401215294
+ expense: 510.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 678.3401215294
+ expense: 678.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 642.3401215294
+ expense: 642.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 26.825112
- }
+ expense: 26.825112,
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 3)]: [
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 920.3376729567
+ expense: 920.3376729567,
},
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 3344.6967370416
+ expense: 3344.6967370416,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 1441.3401215294
+ expense: 1441.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 550.3401215294
+ expense: 550.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 123.3401215294
+ expense: 123.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 26.452244
- }
+ expense: 26.452244,
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 4)]: [
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 1088.337899628
+ expense: 1088.337899628,
},
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 3321.0078451299
+ expense: 3321.0078451299,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 996.3401215294
+ expense: 996.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 503.3401215294
+ expense: 503.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 242.3401215294
+ expense: 242.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 2.201825
- }
+ expense: 2.201825,
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 5)]: [
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 3778.0220649843004
+ expense: 3778.0220649843004,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 2801.3387691288
+ expense: 2801.3387691288,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 647.3401215294
+ expense: 647.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 624.3401215294
+ expense: 624.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 581.3401215294
+ expense: 581.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 2.192313
- }
+ expense: 2.192313,
+ },
],
[lastDateRangePoint]: [
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure trial",
- expense: 454.3387909872
+ expense: 454.3387909872,
},
{
id: "8c63e980-6572-4b36-be82-a2bc59705888",
type: "aws_cnr",
name: "AWS HQ",
- expense: 3743.3238728661
+ expense: 3743.3238728661,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "AWS Marketing",
- expense: 289.3401215294
+ expense: 289.3401215294,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
name: "Azure enterprise agreement",
- expense: 190.3401215294
+ expense: 190.3401215294,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
name: "K8s cluster",
- expense: 154.3401215294
+ expense: 154.3401215294,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
- expense: 3.367908
- }
- ]
+ expense: 3.367908,
+ },
+ ],
};
const filteredBreakdown = [
@@ -280,43 +280,43 @@ const ExpensesBreakdownForCloudMocked = () => {
type: "aws_cnr",
total: 28385.5937818932,
name: "AWS HQ",
- previous_total: 28159.6970880297
+ previous_total: 28159.6970880297,
},
{
id: "11fddd0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
total: 12785.473881506799,
name: "Azure trial",
- previous_total: 4.779527628233333
+ previous_total: 4.779527628233333,
},
{
id: "11fsa5d0e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
total: 6102.093881506799,
name: "AWS Marketing",
- previous_total: 4.779527628233333
+ previous_total: 4.779527628233333,
},
{
id: "11fdd77e-3ece-410c-8e68-003abcc44576",
type: "azure_cnr",
total: 4334.183881506799,
name: "Azure enterprise agreement",
- previous_total: 4.779527628233333
+ previous_total: 4.779527628233333,
},
{
id: "528e7e01-cf63-4041-980a-fd92a50da65d",
type: "kubernetes_cnr",
total: 2514.38085071,
name: "K8s cluster",
- previous_total: 612.38085071
+ previous_total: 612.38085071,
},
{
id: "71ecf26d-ccae-4b0a-81dd-8f0ab56314c8",
name: "Ali dev",
type: "alibaba_cnr",
total: 56.07,
- previous_total: 0
- }
+ previous_total: 0,
+ },
];
return (
diff --git a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForOwnerMocked.tsx b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForOwnerMocked.tsx
index b7e92443e..f41be842f 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForOwnerMocked.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForOwnerMocked.tsx
@@ -10,306 +10,306 @@ const ExpensesBreakdownForOwnerMocked = () => {
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 1613.2313672838,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 24.639862891499998,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 1280.9187834066,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 936.8585263726,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 77.228119044,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 35.26463332349999,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 24.6338124912,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
- }
+ name: "Aaron Simmons",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 1)]: [
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 1366.7838405633004,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 222.8572994751,
id: "c4c3a518-ab9c-4aba-912c-708cc51d9b5e",
- name: "Oscar Walsh"
+ name: "Oscar Walsh",
},
{
expense: 24.6390672303,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 1168.06019992,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 37.100665025100014,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 24.6462867189,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 1613.4434233713,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 83.489296734,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
- }
+ name: "Katy Ali",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 2)]: [
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 422.4723890391,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 974.2399681978,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 24.6378574134,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 27.929266884000004,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 24.641445997800002,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 77.78021599440001,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 1613.1315150162,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
- }
+ name: "Taylor Everett",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 3)]: [
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 29.083829960699994,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 420.2256436632,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 24.651374382,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 1613.2712527926,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 24.643465261200003,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 79.2107590635,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 950.0576681791,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
- }
+ name: "(not set)",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 4)]: [
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 24.6567928158,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 1613.0356802379,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 24.639400433700004,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 85.79208305699999,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 44.339432420700014,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 582.9494233653002,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 194.50590291359998,
id: "c4c3a518-ab9c-4aba-912c-708cc51d9b5e",
- name: "Oscar Walsh"
+ name: "Oscar Walsh",
},
{
expense: 1028.2403674135,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
- }
+ name: "(not set)",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 5)]: [
{
expense: 180.2017514556,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
expense: 24.641806221,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 37.541113392599996,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 24.640616003399998,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 81.3030821055,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 812.5805639798999,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 1612.8339342696,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 969.9197964257,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
- }
+ name: "(not set)",
+ },
],
[lastDateRangePoint]: [
{
expense: 2.8161423576,
id: "c4c3a518-ab9c-4aba-912c-708cc51d9b5e",
- name: "Oscar Walsh"
+ name: "Oscar Walsh",
},
{
expense: 31.0973209002,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
expense: 15.409309717800001,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
expense: 57.1035847473,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
expense: 273.35516935140004,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
expense: 3.4420872366,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
expense: 15.3958764096,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
+ name: "Aaron Simmons",
},
{
expense: 279.2147783186,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
- }
- ]
+ name: "(not set)",
+ },
+ ],
};
const filteredBreakdown = [
@@ -317,56 +317,56 @@ const ExpensesBreakdownForOwnerMocked = () => {
total: 9682.389260208,
previous_total: 12904.245314669699,
id: "ab9f39d4-d486-429a-814e-9717a1e12ac7",
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
total: 6306.5913048273,
previous_total: 7008.8069736144325,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
total: 5159.2858133688005,
previous_total: 5199.219195685199,
id: "9c458a6d-13b4-47d5-b921-b75ee8bf8101",
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
total: 1081.2105087336001,
previous_total: 1489.5603028008002,
id: "5153cb97-94e4-403b-ac9a-8f1343f1fbc5",
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
total: 541.9071407457,
previous_total: 559.1013787575,
id: "8886a4df-37f1-4598-aa92-c39eae9567d4",
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
total: 420.1793447463,
previous_total: 1310.0575567382998,
id: "c4c3a518-ab9c-4aba-912c-708cc51d9b5e",
- name: "Oscar Walsh"
+ name: "Oscar Walsh",
},
{
total: 242.35626190680006,
previous_total: 183.1998652812,
id: "29019351-df21-4a3b-84c3-42acb086317b",
- name: "Ella Price"
+ name: "Ella Price",
},
{
total: 163.2856885272,
previous_total: 197.1577110465,
id: "015c36f9-5c05-4da8-b445-932560a00191",
- name: "Haris Price"
+ name: "Haris Price",
},
{
total: 163.2312854604,
previous_total: 197.1877353687,
id: "87812acf-48f3-47ce-ac7d-0623ae3405ed",
- name: "Aaron Simmons"
- }
+ name: "Aaron Simmons",
+ },
];
return (
diff --git a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForPoolMocked.tsx b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForPoolMocked.tsx
index f4dd50835..5b2d074b6 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForPoolMocked.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/Mockups/ExpensesBreakdownForPoolMocked.tsx
@@ -10,261 +10,261 @@ const ExpensesBreakdownForPoolMocked = () => {
{
expense: 1019.3258221514999,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 180.2017514556,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
+ name: "QA",
},
{
expense: 1613.2313672838,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
expense: 276.1523412237,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 74.4906655197,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 72.7163822619,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 936.8585263726,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
- }
+ name: "(not set)",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 1)]: [
{
expense: 1102.6585871711998,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 280.91775902850003,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 1390.8918817483,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 1613.4434233713,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
expense: 76.9318762518,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 76.15093382010001,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 180.2273691024,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
- }
+ name: "QA",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 2)]: [
{
expense: 67.1536310895,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 974.2399681978,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 72.6631623288,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 1613.1315150162,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
expense: 161.9679362166,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 275.6764456938,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 180.2017514556,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
- }
+ name: "QA",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 3)]: [
{
expense: 158.44384362690002,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 950.0576681791,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 276.3570788622,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 74.7105337719,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 1613.2712527926,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
expense: 68.3036160696,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 180.2017514556,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
- }
+ name: "QA",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 4)]: [
{
expense: 274.10609124,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 1613.0356802379,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
expense: 80.08177620599999,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 180.2027137797,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
+ name: "QA",
},
{
expense: 1222.745308003,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 84.7720109736,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 323.4172536729001,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
- }
+ name: "Operations",
+ },
],
[addDaysToTimestamp(firstDateRangePoint, 5)]: [
{
expense: 180.2017514556,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
+ name: "QA",
},
{
expense: 555.2347831983001,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 271.9155268215,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 969.9197964257,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 77.3725232439,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 76.1843484387,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 1612.8339342696,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
- }
+ name: "Ops",
+ },
],
[lastDateRangePoint]: [
{
expense: 14.12412918,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
+ name: "QA",
},
{
expense: 1534.1528748738,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
expense: 310.1512353771,
id: "2a03382a-a036-4881-b6b5-68c08192cc44",
- name: "Sunflower corporation"
+ name: "Sunflower corporation",
},
{
expense: 5.089296,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
expense: 326.4942996365,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
+ name: "Dev",
},
{
expense: 229.7063507977,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
expense: 1612.8339342696,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
- }
- ]
+ name: "Ops",
+ },
+ ],
};
const filteredBreakdown = [
@@ -272,44 +272,44 @@ const ExpensesBreakdownForPoolMocked = () => {
total: 11295.2231945,
previous_total: 12904.245314669699,
id: "e445ee8b-f062-4b45-9baf-05e11cf5635f",
- name: "Ops"
+ name: "Ops",
},
{
total: 6731.8333656,
previous_total: 8318.801227306532,
id: "00000000-0000-0000-0000-000000000000",
- name: "(not set)"
+ name: "(not set)",
},
{
total: 5066.33862881,
previous_total: 3112.1316210275995,
id: "a466e029-82cf-439d-b641-e4f65cfaaf71",
- name: "Operations"
+ name: "Operations",
},
{
total: 2034.16025902,
previous_total: 2205.0221313149996,
id: "31622be0-00f9-4138-b033-eee45aefb558",
- name: "Sunflower corp"
+ name: "Sunflower corp",
},
{
total: 1095.36121788,
previous_total: 1443.270115071,
id: "a7dade94-0877-4213-8aed-02be2030886e",
- name: "QA"
+ name: "QA",
},
{
total: 741.972982236,
previous_total: 521.3964424356,
id: "8ce779dc-cc2a-4210-9770-00a2ce7ccf39",
- name: "Marketing"
+ name: "Marketing",
},
{
total: 336.40631981,
previous_total: 497.3156913609,
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
- name: "Dev"
- }
+ name: "Dev",
+ },
];
return (
diff --git a/ngui/ui/src/components/ExpensesBreakdown/PieChart/ExpensesBreakdownPieChart.tsx b/ngui/ui/src/components/ExpensesBreakdown/PieChart/ExpensesBreakdownPieChart.tsx
index 40ae191c6..4d017d7ca 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/PieChart/ExpensesBreakdownPieChart.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/PieChart/ExpensesBreakdownPieChart.tsx
@@ -9,7 +9,7 @@ const ExpensesBreakdownPieChart = ({
filterBy,
getCustomDetails,
getShouldApplyHoverStyles,
- onClick
+ onClick,
}) => {
const theme = useTheme();
@@ -18,14 +18,14 @@ const ExpensesBreakdownPieChart = ({
onClick,
customDetails: getCustomDetails,
shouldApplyHoverStyles: getShouldApplyHoverStyles,
- colors: theme.palette.chart
+ colors: theme.palette.chart,
});
const renderTooltipBody = (sectionData) => {
const {
value,
label,
- data: { details }
+ data: { details },
} = sectionData;
return ;
};
diff --git a/ngui/ui/src/components/ExpensesBreakdown/SummaryCards/ExpensesBreakdownSummaryCards.tsx b/ngui/ui/src/components/ExpensesBreakdown/SummaryCards/ExpensesBreakdownSummaryCards.tsx
index 64dc62200..cc17d42dd 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/SummaryCards/ExpensesBreakdownSummaryCards.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/SummaryCards/ExpensesBreakdownSummaryCards.tsx
@@ -11,23 +11,23 @@ const ExpensesBreakdownSummaryCards = ({ total = 0, previousTotal = 0, isLoading
key: "totalExpensesForSelectedPeriod",
valueComponentType: SUMMARY_VALUE_COMPONENT_TYPES.FormattedMoney,
valueComponentProps: {
- value: total
+ value: total,
},
color: getPoolColorStatus(percent),
isLoading,
captionMessageId: "totalExpensesForSelectedPeriod",
- pdfId: pdfIds.totalExpensesForSelectedPeriod
+ pdfId: pdfIds.totalExpensesForSelectedPeriod,
},
{
key: "totalExpensesForPreviousPeriod",
valueComponentType: SUMMARY_VALUE_COMPONENT_TYPES.FormattedMoney,
valueComponentProps: {
- value: previousTotal
+ value: previousTotal,
},
isLoading,
captionMessageId: "totalExpensesForPreviousPeriod",
- pdfId: pdfIds.totalExpensesForPreviousPeriod
- }
+ pdfId: pdfIds.totalExpensesForPreviousPeriod,
+ },
];
return ;
};
diff --git a/ngui/ui/src/components/ExpensesBreakdown/Table/ExpensesBreakdownTable.tsx b/ngui/ui/src/components/ExpensesBreakdown/Table/ExpensesBreakdownTable.tsx
index 3bef3f4e5..b0b7e99fb 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/Table/ExpensesBreakdownTable.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/Table/ExpensesBreakdownTable.tsx
@@ -44,7 +44,7 @@ const getNameCellContentGetter = (filterBy) => {
return (
{
[EXPENSES_FILTERBY_TYPES.CLOUD]: getDataSourceNameCellContent,
- [EXPENSES_FILTERBY_TYPES.POOL]: getPoolNameCellContent
+ [EXPENSES_FILTERBY_TYPES.POOL]: getPoolNameCellContent,
}[filterBy] || getDefaultSourceNameCellContent
);
};
@@ -65,7 +65,7 @@ const ExpensesBreakdownTable = ({
filterBy,
isLoading = false,
startDateTimestamp,
- endDateTimestamp
+ endDateTimestamp,
}) => {
const tableData = useMemo(() => data, [data]);
const columns = useMemo(
@@ -73,18 +73,18 @@ const ExpensesBreakdownTable = ({
{
accessorKey: "name",
header: ,
- cell: ({ row }) => renderNameCell(row, filterBy)
+ cell: ({ row }) => renderNameCell(row, filterBy),
},
{
accessorKey: "total",
header: ,
cell: ({ cell }) => ,
- defaultSort: "desc"
+ defaultSort: "desc",
},
{
accessorKey: "percent",
header: ,
- cell: ({ cell }) =>
+ cell: ({ cell }) => ,
},
{
id: "actions",
@@ -97,12 +97,12 @@ const ExpensesBreakdownTable = ({
icon={icon}
tooltip={{
show: true,
- value:
+ value: ,
}}
/>
)),
- enableSorting: false
- }
+ enableSorting: false,
+ },
],
[endDateTimestamp, filterBy, rowActions, startDateTimestamp]
);
diff --git a/ngui/ui/src/components/ExpensesBreakdown/TableWidget/ExpensesBreakdownTableWidget.tsx b/ngui/ui/src/components/ExpensesBreakdown/TableWidget/ExpensesBreakdownTableWidget.tsx
index 9be79eb4b..7b77b9f5d 100644
--- a/ngui/ui/src/components/ExpensesBreakdown/TableWidget/ExpensesBreakdownTableWidget.tsx
+++ b/ngui/ui/src/components/ExpensesBreakdown/TableWidget/ExpensesBreakdownTableWidget.tsx
@@ -21,7 +21,7 @@ const getTableWrapperCardTitleName = (filterBy) =>
[EXPENSES_FILTERBY_TYPES.EMPLOYEE]: OWNER,
[EXPENSES_FILTERBY_TYPES.SERVICE]: SERVICE,
[EXPENSES_FILTERBY_TYPES.REGION]: REGION,
- [EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE]: RESOURCE_TYPE
+ [EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE]: RESOURCE_TYPE,
})[filterBy];
const getTableEmptyMessageId = (filterBy) =>
@@ -31,7 +31,7 @@ const getTableEmptyMessageId = (filterBy) =>
[EXPENSES_FILTERBY_TYPES.SERVICE]: "noServiceExpenses",
[EXPENSES_FILTERBY_TYPES.REGION]: "noRegionExpenses",
[EXPENSES_FILTERBY_TYPES.EMPLOYEE]: "noOwnerExpenses",
- [EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE]: "noResourceTypeExpenses"
+ [EXPENSES_FILTERBY_TYPES.RESOURCE_TYPE]: "noResourceTypeExpenses",
})[filterBy];
const getExpensesTableData = ({ filteredBreakdown, totalExpenses, urlGetter, colorsMap }) =>
@@ -39,7 +39,7 @@ const getExpensesTableData = ({ filteredBreakdown, totalExpenses, urlGetter, col
percent: percentXofY(value.total, totalExpenses),
link: urlGetter(value.id, value.type),
color: colorsMap[value.name],
- ...value
+ ...value,
}));
const ExpensesBreakdownTableWidget = ({
@@ -52,13 +52,13 @@ const ExpensesBreakdownTableWidget = ({
onTitleButtonClick,
onRowActionClick,
startDateTimestamp,
- endDateTimestamp
+ endDateTimestamp,
}) => {
const title = (
);
@@ -68,10 +68,10 @@ const ExpensesBreakdownTableWidget = ({
filteredBreakdown,
totalExpenses: total,
urlGetter: getEntityExpensesUrl,
- colorsMap
+ colorsMap,
}),
localization: {
- emptyMessageId: getTableEmptyMessageId(filterBy)
+ emptyMessageId: getTableEmptyMessageId(filterBy),
},
rowActions: [
{
@@ -80,9 +80,9 @@ const ExpensesBreakdownTableWidget = ({
onClick: (rowData) => {
onRowActionClick(rowData);
},
- icon:
- }
- ]
+ icon: ,
+ },
+ ],
};
return (
diff --git a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownBy.tsx b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownBy.tsx
index b1ced8eb1..cb90b46a2 100644
--- a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownBy.tsx
+++ b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownBy.tsx
@@ -40,20 +40,20 @@ const ExpensesDailyBreakdownBy = ({
breakdown,
breakdownByValue,
onBreakdownByChange,
- isLoading = false
+ isLoading = false,
}: ExpensesDailyBreakdownByProps) => {
const chartWrapperRef: RefObject = useRef(null);
const [split, setSplit] = useSyncQueryParamWithState({
queryParamName: DAILY_EXPENSES_SPLIT_PARAMETER_NAME,
possibleStates: SPLITS,
- defaultValue: EXPENSES_SPLIT_PERIODS.DAILY
+ defaultValue: EXPENSES_SPLIT_PERIODS.DAILY,
});
const [withLegend, setWithLegend] = useSyncQueryParamWithState({
queryParamName: WITH_LEGEND_QUERY_PARAMETER_NAME,
possibleStates: [true, false],
- defaultValue: true
+ defaultValue: true,
});
return (
diff --git a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByBarChart.tsx b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByBarChart.tsx
index df3144306..3c8b7e3f9 100644
--- a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByBarChart.tsx
+++ b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByBarChart.tsx
@@ -27,7 +27,7 @@ const getChartDataAndKeys = ({ breakdown, counts, split = EXPENSES_SPLIT_PERIODS
const chartData = Object.entries(breakdown).map(([date, data]) => {
const entry = {
date,
- ...Object.fromEntries(topKeys.map((id) => [id, getCostById(data, id)]))
+ ...Object.fromEntries(topKeys.map((id) => [id, getCostById(data, id)])),
};
if (!isEmptyArray(otherKeys)) {
@@ -42,14 +42,14 @@ const getChartDataAndKeys = ({ breakdown, counts, split = EXPENSES_SPLIT_PERIODS
...(isEmptyArray(otherKeys)
? {}
: {
- [OTHER_EXPENSES_NAME]: otherKeys.reduce((sum, key) => sum + counts[key].total, 0)
- })
+ [OTHER_EXPENSES_NAME]: otherKeys.reduce((sum, key) => sum + counts[key].total, 0),
+ }),
};
return {
keys: chartKeys,
data: getResourceExpensesSplits(chartData)[split],
- totals
+ totals,
};
};
@@ -61,7 +61,7 @@ const ExpensesDailyBreakdownByBarChart = ({
split = EXPENSES_SPLIT_PERIODS.DAILY,
isLoading = false,
dataTestId,
- showLegend = false
+ showLegend = false,
}) => {
const theme = useTheme();
@@ -70,7 +70,7 @@ const ExpensesDailyBreakdownByBarChart = ({
const { keys, data, totals } = getChartDataAndKeys({
breakdown,
counts,
- split
+ split,
});
const moneyFormatter = useMoneyFormatter();
@@ -84,10 +84,10 @@ const ExpensesDailyBreakdownByBarChart = ({
}
return getBreakdownLabelText({
id: legendItem.id,
- ...counts[legendItem.id]
+ ...counts[legendItem.id],
});
},
- getTotalLabel: (legendItem) => moneyFormatter(FORMATTED_MONEY_TYPES.COMPACT, totals[legendItem.id])
+ getTotalLabel: (legendItem) => moneyFormatter(FORMATTED_MONEY_TYPES.COMPACT, totals[legendItem.id]),
});
return (
@@ -103,7 +103,7 @@ const ExpensesDailyBreakdownByBarChart = ({
const details = {
id: sectionData.id,
- ...counts[sectionData.id]
+ ...counts[sectionData.id],
};
const text =
diff --git a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByMockup.tsx b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByMockup.tsx
index b76957d14..9b2357fa7 100644
--- a/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByMockup.tsx
+++ b/ngui/ui/src/components/ExpensesDailyBreakdownBy/ExpensesDailyBreakdownByMockup.tsx
@@ -7,130 +7,130 @@ const getBreakdown = (startDateSecondsTimestamp) => ({
{
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
cost: 9.3,
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
id: "11111111-d146-4932-adb0-20c4222c1e6f",
cost: 2.1,
- name: "Ella Price"
+ name: "Ella Price",
},
{
id: "21111111-d146-4932-adb0-20c4222c1e6f",
cost: 3.21,
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
id: "31111111-d146-4932-adb0-20c4222c1e6f",
cost: 6,
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
id: "41111111-d146-4932-adb0-20c4222c1e6f",
cost: 1.6,
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
id: "51111111-d146-4932-adb0-20c4222c1e6f",
cost: 9.9,
- name: "Marie Briggs"
- }
+ name: "Marie Briggs",
+ },
],
[addDaysToTimestamp(startDateSecondsTimestamp, 1)]: [
{
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
cost: 9.41,
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
id: "11111111-d146-4932-adb0-20c4222c1e6f",
cost: 10.2,
- name: "Ella Price"
+ name: "Ella Price",
},
{
id: "21111111-d146-4932-adb0-20c4222c1e6f",
cost: 5.02,
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
id: "31111111-d146-4932-adb0-20c4222c1e6f",
cost: 15.2,
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
id: "41111111-d146-4932-adb0-20c4222c1e6f",
cost: 13.6,
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
id: "51111111-d146-4932-adb0-20c4222c1e6f",
cost: 2.3,
- name: "Marie Briggs"
- }
+ name: "Marie Briggs",
+ },
],
[addDaysToTimestamp(startDateSecondsTimestamp, 2)]: [
{
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
cost: 7,
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
id: "11111111-d146-4932-adb0-20c4222c1e6f",
cost: 4.02,
- name: "Ella Price"
+ name: "Ella Price",
},
{
id: "21111111-d146-4932-adb0-20c4222c1e6f",
cost: 12.32,
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
id: "31111111-d146-4932-adb0-20c4222c1e6f",
cost: 2.43,
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
id: "41111111-d146-4932-adb0-20c4222c1e6f",
cost: 4.16,
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
id: "51111111-d146-4932-adb0-20c4222c1e6f",
cost: 1.98,
- name: "Marie Briggs"
- }
+ name: "Marie Briggs",
+ },
],
[addDaysToTimestamp(startDateSecondsTimestamp, 3)]: [
{
id: "65846b0e-d146-4932-adb0-20c4222c1e6f",
cost: 3,
- name: "Katy Ali"
+ name: "Katy Ali",
},
{
id: "11111111-d146-4932-adb0-20c4222c1e6f",
cost: 8.32,
- name: "Ella Price"
+ name: "Ella Price",
},
{
id: "21111111-d146-4932-adb0-20c4222c1e6f",
cost: 4.12,
- name: "Sally Wong"
+ name: "Sally Wong",
},
{
id: "31111111-d146-4932-adb0-20c4222c1e6f",
cost: 1,
- name: "Taylor Everett"
+ name: "Taylor Everett",
},
{
id: "41111111-d146-4932-adb0-20c4222c1e6f",
cost: 3.21,
- name: "Amy Smith"
+ name: "Amy Smith",
},
{
id: "51111111-d146-4932-adb0-20c4222c1e6f",
cost: 1.98,
- name: "Marie Briggs"
- }
- ]
+ name: "Marie Briggs",
+ },
+ ],
});
const getCounts = (breakdown) =>
@@ -142,8 +142,8 @@ const getCounts = (breakdown) =>
[id]: {
id,
name,
- total: (counts[id]?.total || 0) + cost
- }
+ total: (counts[id]?.total || 0) + cost,
+ },
}),
{}
);
diff --git a/ngui/ui/src/components/ExpensesFilters/ExpensesFilters.tsx b/ngui/ui/src/components/ExpensesFilters/ExpensesFilters.tsx
index 15e32bbd6..1bf1584f3 100644
--- a/ngui/ui/src/components/ExpensesFilters/ExpensesFilters.tsx
+++ b/ngui/ui/src/components/ExpensesFilters/ExpensesFilters.tsx
@@ -13,7 +13,7 @@ const ExpensesFilters = ({ items, appliedValues, onFilterAdd, onFilterDelete, on
onChange={({ name: filterName, value, checked }) => {
if ([POOL_ID_FILTER].includes(filterName)) {
onFilterAdd({
- [filterName]: checked ? getPoolIdWithSubPools(value) : value
+ [filterName]: checked ? getPoolIdWithSubPools(value) : value,
});
} else {
onFilterAdd({ [filterName]: value });
@@ -21,7 +21,7 @@ const ExpensesFilters = ({ items, appliedValues, onFilterAdd, onFilterDelete, on
}}
onApply={({ name, value }) => {
onFilterAdd({
- [name]: value
+ [name]: value,
});
}}
onClear={({ filterName, filterValue }) => {
diff --git a/ngui/ui/src/components/FilterComponents/RangeFilter.tsx b/ngui/ui/src/components/FilterComponents/RangeFilter.tsx
index 66970ed00..208747a82 100644
--- a/ngui/ui/src/components/FilterComponents/RangeFilter.tsx
+++ b/ngui/ui/src/components/FilterComponents/RangeFilter.tsx
@@ -45,14 +45,14 @@ const RangeFilter: React.FC = ({
label,
buttonIcon = ,
onChange,
- appliedRange
+ appliedRange,
}) => {
const intl = useIntl();
const [anchorEl, setAnchorEl] = React.useState(null);
const [selectedRange, setSelectedRange] = React.useState({
from: undefined,
- to: undefined
+ to: undefined,
});
const popoverId = React.useId();
@@ -77,28 +77,28 @@ const RangeFilter: React.FC = ({
const handleFromChange = (value: Date) => {
setSelectedRange((prev) => ({
...prev,
- from: +value
+ from: +value,
}));
};
const handleToChange = (value: Date) => {
setSelectedRange((prev) => ({
...prev,
- to: +value
+ to: +value,
}));
};
const handleResetFrom = () => {
setSelectedRange((prev) => ({
...prev,
- from: undefined
+ from: undefined,
}));
};
const handleResetTo = () => {
setSelectedRange((prev) => ({
...prev,
- to: undefined
+ to: undefined,
}));
};
@@ -137,7 +137,7 @@ const RangeFilter: React.FC = ({
onClose={handleCancel}
anchorOrigin={{
vertical: "bottom",
- horizontal: "left"
+ horizontal: "left",
}}
>
diff --git a/ngui/ui/src/components/FilterComponents/SelectionFilter.tsx b/ngui/ui/src/components/FilterComponents/SelectionFilter.tsx
index ae15db5ea..aa4f9bd0e 100644
--- a/ngui/ui/src/components/FilterComponents/SelectionFilter.tsx
+++ b/ngui/ui/src/components/FilterComponents/SelectionFilter.tsx
@@ -9,7 +9,7 @@ import {
Popover,
TextField,
Typography,
- Divider
+ Divider,
} from "@mui/material";
import Button from "@mui/material/Button";
import { FormattedMessage, useIntl } from "react-intl";
@@ -78,7 +78,7 @@ const SelectionFilter = ({
searchPredicate,
onChange,
appliedItems,
- settings = []
+ settings = [],
}: FiltersProps) => {
const intl = useIntl();
@@ -122,14 +122,14 @@ const SelectionFilter = ({
onChange?.({
values: selectedValues,
- settings: selectedSettings
+ settings: selectedSettings,
});
};
const handleSettingChange = (name: string) => (event: React.ChangeEvent) => {
setSelectedSettings((prev) => ({
...prev,
- [name]: event.target.checked
+ [name]: event.target.checked,
}));
};
@@ -243,7 +243,7 @@ const SelectionFilter = ({
- )
+ ),
}}
/>
@@ -276,7 +276,7 @@ const SelectionFilter = ({
sx={{
px: 2,
width: "100%",
- overflowWrap: "anywhere"
+ overflowWrap: "anywhere",
}}
/>
))}
@@ -329,7 +329,7 @@ const SelectionFilter = ({
onClose={handleCancel}
anchorOrigin={{
vertical: "bottom",
- horizontal: "left"
+ horizontal: "left",
}}
>
diff --git a/ngui/ui/src/components/FilterComponents/SuggestionFilter.tsx b/ngui/ui/src/components/FilterComponents/SuggestionFilter.tsx
index 75e62530c..41437599c 100644
--- a/ngui/ui/src/components/FilterComponents/SuggestionFilter.tsx
+++ b/ngui/ui/src/components/FilterComponents/SuggestionFilter.tsx
@@ -80,7 +80,7 @@ const SuggestionFilter = ({ suggestionGroups, label, onApplySuggestion, appliedF
return [
type,
// Keep non-suggested values and add selected suggested values
- [...nonSuggestedValues, ...selectedValues]
+ [...nonSuggestedValues, ...selectedValues],
];
})
);
@@ -97,7 +97,7 @@ const SuggestionFilter = ({ suggestionGroups, label, onApplySuggestion, appliedF
...prev,
[groupId]: currentValues.includes(suggestion)
? currentValues.filter((item) => item !== suggestion)
- : [...currentValues, suggestion]
+ : [...currentValues, suggestion],
};
});
};
@@ -129,7 +129,7 @@ const SuggestionFilter = ({ suggestionGroups, label, onApplySuggestion, appliedF
onClose={handleCancel}
anchorOrigin={{
vertical: "bottom",
- horizontal: "left"
+ horizontal: "left",
}}
>
diff --git a/ngui/ui/src/components/FilterComponents/constants.ts b/ngui/ui/src/components/FilterComponents/constants.ts
index 7975620a2..53331430b 100644
--- a/ngui/ui/src/components/FilterComponents/constants.ts
+++ b/ngui/ui/src/components/FilterComponents/constants.ts
@@ -1,4 +1,4 @@
export const FILTER_TYPE = Object.freeze({
SELECTION: "selection",
- RANGE: "range"
+ RANGE: "range",
});
diff --git a/ngui/ui/src/components/Filters/DataSourceFilter/DataSourceFilter.tsx b/ngui/ui/src/components/Filters/DataSourceFilter/DataSourceFilter.tsx
index 157fd8d73..f699e8a90 100644
--- a/ngui/ui/src/components/Filters/DataSourceFilter/DataSourceFilter.tsx
+++ b/ngui/ui/src/components/Filters/DataSourceFilter/DataSourceFilter.tsx
@@ -22,21 +22,21 @@ class DataSourceFilter extends Filter {
additionalProperties: false,
properties: {
id: {
- type: "string"
+ type: "string",
},
name: {
- type: "string"
+ type: "string",
},
type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -59,10 +59,10 @@ class DataSourceFilter extends Filter {
disableLink: false,
dataTestId: `${this.constructor.filterName}_filter_link`,
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -70,7 +70,7 @@ class DataSourceFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/Filter.ts b/ngui/ui/src/components/Filters/Filter.ts
index 58f331a7c..2c69f892d 100644
--- a/ngui/ui/src/components/Filters/Filter.ts
+++ b/ngui/ui/src/components/Filters/Filter.ts
@@ -63,7 +63,7 @@ class Filter {
return this._sortFilterValues().map((filterValue) => ({
name: this.constructor.getName(filterValue),
value: this.constructor.getValue(filterValue),
- label: this.constructor.getDisplayedValueRenderer(filterValue)
+ label: this.constructor.getDisplayedValueRenderer(filterValue),
}));
}
@@ -80,7 +80,7 @@ class Filter {
const commonData = {
name: this.constructor.filterName,
displayedName: this.constructor.displayedName,
- displayedNameString: this.constructor.displayedNameString
+ displayedNameString: this.constructor.displayedNameString,
};
if (filterItem === undefined) {
@@ -88,13 +88,13 @@ class Filter {
...commonData,
value: appliedFilter,
displayedValue: intl.formatMessage({ id: "notFound" }),
- displayedValueString: intl.formatMessage({ id: "notFound" })
+ displayedValueString: intl.formatMessage({ id: "notFound" }),
};
}
return {
...commonData,
- ...this._getAppliedFilterItem(appliedFilter, filterItem)
+ ...this._getAppliedFilterItem(appliedFilter, filterItem),
};
}
diff --git a/ngui/ui/src/components/Filters/Filters.ts b/ngui/ui/src/components/Filters/Filters.ts
index df87ca308..208726fcd 100644
--- a/ngui/ui/src/components/Filters/Filters.ts
+++ b/ngui/ui/src/components/Filters/Filters.ts
@@ -16,10 +16,10 @@ class Filters {
getFilterSelectors() {
const suggestionsFilter = new Suggestions({
filterValues: {
- suggestions: this.filters.flatMap((filter) => filter.getSuggestionValues())
+ suggestions: this.filters.flatMap((filter) => filter.getSuggestionValues()),
},
appliedFilters: [],
- scopeInfo: this.scopeInfo
+ scopeInfo: this.scopeInfo,
});
const selectors = [suggestionsFilter, ...this.filters].map((filter) => this.constructor._getSelector(filter));
@@ -34,7 +34,7 @@ class Filters {
type: filter.constructor.type,
items: filter.getFilterItems(),
enablePopoverCheckbox: filter.constructor.enablePopoverCheckbox,
- checkboxLabel: filter.constructor.checkboxLabel
+ checkboxLabel: filter.constructor.checkboxLabel,
};
}
@@ -54,7 +54,7 @@ class Filters {
displayedNameString: filter.constructor.displayedNameString,
value: appliedFilterItem.value,
displayedValue: appliedFilterItem.displayedValue,
- displayedValueString: appliedFilterItem.displayedValueString
+ displayedValueString: appliedFilterItem.displayedValueString,
}));
});
}
@@ -76,7 +76,7 @@ class Filters {
this.filters
.map((filter) => [
filter.constructor.apiName,
- filter.appliedFilters.map((applied) => filter.findFilterValue(applied)).filter((el) => el !== undefined)
+ filter.appliedFilters.map((applied) => filter.findFilterValue(applied)).filter((el) => el !== undefined),
])
.filter(([, values]) => !isEmptyArray(values))
);
diff --git a/ngui/ui/src/components/Filters/GoalsFilter/GoalsFilter.tsx b/ngui/ui/src/components/Filters/GoalsFilter/GoalsFilter.tsx
index 1eadb0974..6429385cf 100644
--- a/ngui/ui/src/components/Filters/GoalsFilter/GoalsFilter.tsx
+++ b/ngui/ui/src/components/Filters/GoalsFilter/GoalsFilter.tsx
@@ -21,7 +21,7 @@ class GoalsFilter extends Filter {
_getAppliedFilterItem(appliedFilter, filterItem) {
return {
value: appliedFilter,
- displayedValue: this.constructor.getDisplayedValueRenderer(filterItem)
+ displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
};
}
@@ -29,7 +29,7 @@ class GoalsFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/K8sNamespaceFilter/K8sNamespaceFilter.tsx b/ngui/ui/src/components/Filters/K8sNamespaceFilter/K8sNamespaceFilter.tsx
index 2a8823aef..3bf48aa69 100644
--- a/ngui/ui/src/components/Filters/K8sNamespaceFilter/K8sNamespaceFilter.tsx
+++ b/ngui/ui/src/components/Filters/K8sNamespaceFilter/K8sNamespaceFilter.tsx
@@ -22,18 +22,18 @@ class K8sNamespaceFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -53,10 +53,10 @@ class K8sNamespaceFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -64,7 +64,7 @@ class K8sNamespaceFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/K8sNodeFilter/K8sNodeFilter.tsx b/ngui/ui/src/components/Filters/K8sNodeFilter/K8sNodeFilter.tsx
index 9bcc320f9..9cb0a2613 100644
--- a/ngui/ui/src/components/Filters/K8sNodeFilter/K8sNodeFilter.tsx
+++ b/ngui/ui/src/components/Filters/K8sNodeFilter/K8sNodeFilter.tsx
@@ -22,18 +22,18 @@ class K8sNodeFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -53,10 +53,10 @@ class K8sNodeFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -64,7 +64,7 @@ class K8sNodeFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/K8sServiceFilter/K8sServiceFilter.tsx b/ngui/ui/src/components/Filters/K8sServiceFilter/K8sServiceFilter.tsx
index bcbb954dd..373b7bdd9 100644
--- a/ngui/ui/src/components/Filters/K8sServiceFilter/K8sServiceFilter.tsx
+++ b/ngui/ui/src/components/Filters/K8sServiceFilter/K8sServiceFilter.tsx
@@ -22,24 +22,24 @@ class K8sServiceFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
constructor({ filterValues, appliedFilters }) {
super({
filterValues,
- appliedFilters
+ appliedFilters,
});
}
@@ -60,10 +60,10 @@ class K8sServiceFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -71,7 +71,7 @@ class K8sServiceFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/NetworkTrafficFromFilter/NetworkTrafficFromFilter.tsx b/ngui/ui/src/components/Filters/NetworkTrafficFromFilter/NetworkTrafficFromFilter.tsx
index 1d474a600..cbb5536b7 100644
--- a/ngui/ui/src/components/Filters/NetworkTrafficFromFilter/NetworkTrafficFromFilter.tsx
+++ b/ngui/ui/src/components/Filters/NetworkTrafficFromFilter/NetworkTrafficFromFilter.tsx
@@ -7,7 +7,7 @@ import {
CLOUD_ACCOUNT_TYPES_LIST,
LINEAR_SELECTOR_ITEMS_TYPES,
NETWORK_TRAFFIC_FROM_BE_FILTER,
- NETWORK_TRAFFIC_FROM_FILTER
+ NETWORK_TRAFFIC_FROM_FILTER,
} from "utils/constants";
import Filter from "../Filter";
@@ -31,24 +31,24 @@ class NetworkTrafficFromFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
},
{
type: "string",
- const: "ANY"
- }
- ]
+ const: "ANY",
+ },
+ ],
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -82,10 +82,10 @@ class NetworkTrafficFromFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -94,7 +94,7 @@ class NetworkTrafficFromFilter extends Filter {
sortObjects({
array: values,
field: "name",
- type: "asc"
+ type: "asc",
});
const anyNetworkTrafficLocationValueIndex = items.findIndex(
@@ -106,7 +106,7 @@ class NetworkTrafficFromFilter extends Filter {
return isAnyNetworkTrafficLocationValueExist
? [
items[anyNetworkTrafficLocationValueIndex],
- ...sortItems(items.filter((_, index) => index !== anyNetworkTrafficLocationValueIndex))
+ ...sortItems(items.filter((_, index) => index !== anyNetworkTrafficLocationValueIndex)),
]
: sortItems(items);
}
diff --git a/ngui/ui/src/components/Filters/NetworkTrafficToFilter/NetworkTrafficToFilter.tsx b/ngui/ui/src/components/Filters/NetworkTrafficToFilter/NetworkTrafficToFilter.tsx
index 1428a6644..7c8666edd 100644
--- a/ngui/ui/src/components/Filters/NetworkTrafficToFilter/NetworkTrafficToFilter.tsx
+++ b/ngui/ui/src/components/Filters/NetworkTrafficToFilter/NetworkTrafficToFilter.tsx
@@ -7,7 +7,7 @@ import {
CLOUD_ACCOUNT_TYPES_LIST,
LINEAR_SELECTOR_ITEMS_TYPES,
NETWORK_TRAFFIC_TO_BE_FILTER,
- NETWORK_TRAFFIC_TO_FILTER
+ NETWORK_TRAFFIC_TO_FILTER,
} from "utils/constants";
import Filter from "../Filter";
@@ -31,24 +31,24 @@ class NetworkTrafficToFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
},
{
type: "string",
- const: "ANY"
- }
- ]
+ const: "ANY",
+ },
+ ],
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -82,10 +82,10 @@ class NetworkTrafficToFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -94,7 +94,7 @@ class NetworkTrafficToFilter extends Filter {
sortObjects({
array: values,
field: "name",
- type: "asc"
+ type: "asc",
});
const anyNetworkTrafficLocationValueIndex = items.findIndex(
@@ -106,7 +106,7 @@ class NetworkTrafficToFilter extends Filter {
return isAnyNetworkTrafficLocationValueExist
? [
items[anyNetworkTrafficLocationValueIndex],
- ...sortItems(items.filter((_, index) => index !== anyNetworkTrafficLocationValueIndex))
+ ...sortItems(items.filter((_, index) => index !== anyNetworkTrafficLocationValueIndex)),
]
: sortItems(items);
}
diff --git a/ngui/ui/src/components/Filters/OwnerFilter/OwnerFilter.tsx b/ngui/ui/src/components/Filters/OwnerFilter/OwnerFilter.tsx
index f7d24c2ab..efca31596 100644
--- a/ngui/ui/src/components/Filters/OwnerFilter/OwnerFilter.tsx
+++ b/ngui/ui/src/components/Filters/OwnerFilter/OwnerFilter.tsx
@@ -20,25 +20,25 @@ class OwnerFilter extends Filter {
additionalProperties: false,
properties: {
id: {
- type: "string"
+ type: "string",
},
name: {
- type: "string"
- }
- }
+ type: "string",
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
suggestions = [
{
name: this.constructor.filterName,
value: this.scopeInfo.currentEmployeeId,
- label:
- }
+ label: ,
+ },
];
static _getValue(filterItem) {
@@ -57,7 +57,7 @@ class OwnerFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -65,7 +65,7 @@ class OwnerFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/PoolFilter/PoolFilter.tsx b/ngui/ui/src/components/Filters/PoolFilter/PoolFilter.tsx
index 6a362366e..0f47ae07b 100644
--- a/ngui/ui/src/components/Filters/PoolFilter/PoolFilter.tsx
+++ b/ngui/ui/src/components/Filters/PoolFilter/PoolFilter.tsx
@@ -26,21 +26,21 @@ class PoolFilter extends Filter {
additionalProperties: false,
properties: {
id: {
- type: "string"
+ type: "string",
},
name: {
- type: "string"
+ type: "string",
},
purpose: {
type: "string",
- enum: POOL_TYPES_LIST
- }
- }
+ enum: POOL_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -76,13 +76,13 @@ class PoolFilter extends Filter {
disableLink: false,
dataTestId: `${this.constructor.filterName}_filter_link`,
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
},
- withSubpools: isPoolIdWithSubPools(appliedFilter)
+ withSubpools: isPoolIdWithSubPools(appliedFilter),
})),
displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem, () => ({
- withSubPools: isPoolIdWithSubPools(appliedFilter)
- }))
+ withSubPools: isPoolIdWithSubPools(appliedFilter),
+ })),
};
}
@@ -90,7 +90,7 @@ class PoolFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/RegionFilter/RegionFilter.tsx b/ngui/ui/src/components/Filters/RegionFilter/RegionFilter.tsx
index fa48b5afb..ac741338a 100644
--- a/ngui/ui/src/components/Filters/RegionFilter/RegionFilter.tsx
+++ b/ngui/ui/src/components/Filters/RegionFilter/RegionFilter.tsx
@@ -22,18 +22,18 @@ class RegionFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -53,10 +53,10 @@ class RegionFilter extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -64,7 +64,7 @@ class RegionFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/ResourceStateFilter/ResourceStateFilter.tsx b/ngui/ui/src/components/Filters/ResourceStateFilter/ResourceStateFilter.tsx
index 64ffbdb33..02be22954 100644
--- a/ngui/ui/src/components/Filters/ResourceStateFilter/ResourceStateFilter.tsx
+++ b/ngui/ui/src/components/Filters/ResourceStateFilter/ResourceStateFilter.tsx
@@ -14,20 +14,20 @@ class ResourceStateFilter extends Filter {
// TODO: Use ajv TS integration to create schema based on types def
static filterItemSchema = {
- type: "boolean"
+ type: "boolean",
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "boolean"
+ type: "boolean",
};
suggestions = [
{
name: this.constructor.filterName,
value: true,
- label: this.constructor._getDisplayedValueRenderer(true)
- }
+ label: this.constructor._getDisplayedValueRenderer(true),
+ },
];
static _getValue(filterItem) {
@@ -46,7 +46,7 @@ class ResourceStateFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
}
diff --git a/ngui/ui/src/components/Filters/ResourceTypeFilter/ResourceTypeFilter.tsx b/ngui/ui/src/components/Filters/ResourceTypeFilter/ResourceTypeFilter.tsx
index c045149be..0fcb7bc8d 100644
--- a/ngui/ui/src/components/Filters/ResourceTypeFilter/ResourceTypeFilter.tsx
+++ b/ngui/ui/src/components/Filters/ResourceTypeFilter/ResourceTypeFilter.tsx
@@ -29,18 +29,18 @@ class ResourceTypeFilter extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
type: {
type: "string",
- enum: Object.values(OPTSCALE_RESOURCE_TYPES)
- }
- }
+ enum: Object.values(OPTSCALE_RESOURCE_TYPES),
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -53,7 +53,7 @@ class ResourceTypeFilter extends Filter {
resourceInfo={{
resourceType: filterItem.name,
clusterTypeId: filterItem.type === OPTSCALE_RESOURCE_TYPES.CLUSTER,
- isEnvironment: filterItem.type === OPTSCALE_RESOURCE_TYPES.ENVIRONMENT
+ isEnvironment: filterItem.type === OPTSCALE_RESOURCE_TYPES.ENVIRONMENT,
}}
/>
);
@@ -75,24 +75,24 @@ class ResourceTypeFilter extends Filter {
value: INSTANCE_REGULAR,
label: this.constructor._getDisplayedValueRenderer({
name: INSTANCE,
- type: OPTSCALE_RESOURCE_TYPES.REGULAR
- })
+ type: OPTSCALE_RESOURCE_TYPES.REGULAR,
+ }),
},
{
name: this.constructor.filterName,
value: VOLUME_REGULAR,
label: this.constructor._getDisplayedValueRenderer({
name: VOLUME,
- type: OPTSCALE_RESOURCE_TYPES.REGULAR
- })
- }
+ type: OPTSCALE_RESOURCE_TYPES.REGULAR,
+ }),
+ },
];
_getAppliedFilterItem(appliedFilter, filterItem) {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -100,7 +100,7 @@ class ResourceTypeFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/ServiceType/ServiceFilter.tsx b/ngui/ui/src/components/Filters/ServiceType/ServiceFilter.tsx
index 6b52cc0ee..7eeeb369a 100644
--- a/ngui/ui/src/components/Filters/ServiceType/ServiceFilter.tsx
+++ b/ngui/ui/src/components/Filters/ServiceType/ServiceFilter.tsx
@@ -22,18 +22,18 @@ class ServiceType extends Filter {
additionalProperties: false,
properties: {
name: {
- type: "string"
+ type: "string",
},
cloud_type: {
type: "string",
- enum: CLOUD_ACCOUNT_TYPES_LIST
- }
- }
+ enum: CLOUD_ACCOUNT_TYPES_LIST,
+ },
+ },
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -53,10 +53,10 @@ class ServiceType extends Filter {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem, () => ({
iconProps: {
- dataTestId: `${this.constructor.filterName}_filter_logo`
- }
+ dataTestId: `${this.constructor.filterName}_filter_logo`,
+ },
})),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
@@ -64,7 +64,7 @@ class ServiceType extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/StatusFilter/StatusFilter.tsx b/ngui/ui/src/components/Filters/StatusFilter/StatusFilter.tsx
index 15f1d38cf..9c6cfacaa 100644
--- a/ngui/ui/src/components/Filters/StatusFilter/StatusFilter.tsx
+++ b/ngui/ui/src/components/Filters/StatusFilter/StatusFilter.tsx
@@ -21,7 +21,7 @@ class StatusFilter extends Filter {
_getAppliedFilterItem(appliedFilter, filterItem) {
return {
value: appliedFilter,
- displayedValue: this.constructor.getDisplayedValueRenderer(filterItem)
+ displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
};
}
@@ -29,7 +29,7 @@ class StatusFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/TagFilter/TagFilter.tsx b/ngui/ui/src/components/Filters/TagFilter/TagFilter.tsx
index b9e03b146..cb592f797 100644
--- a/ngui/ui/src/components/Filters/TagFilter/TagFilter.tsx
+++ b/ngui/ui/src/components/Filters/TagFilter/TagFilter.tsx
@@ -14,12 +14,12 @@ class TagFilter extends Filter {
// TODO: Use ajv TS integration to create schema based on types def
static filterItemSchema = {
- type: "string"
+ type: "string",
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -38,7 +38,7 @@ class TagFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
}
diff --git a/ngui/ui/src/components/Filters/TasksFilter/TasksFilter.tsx b/ngui/ui/src/components/Filters/TasksFilter/TasksFilter.tsx
index 11989cc96..f740e19e5 100644
--- a/ngui/ui/src/components/Filters/TasksFilter/TasksFilter.tsx
+++ b/ngui/ui/src/components/Filters/TasksFilter/TasksFilter.tsx
@@ -23,7 +23,7 @@ class TasksFilter extends Filter {
_getAppliedFilterItem(appliedFilter, filterItem) {
return {
value: appliedFilter,
- displayedValue: this.constructor.getDisplayedValueRenderer(filterItem)
+ displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
};
}
@@ -31,7 +31,7 @@ class TasksFilter extends Filter {
return sortObjects({
array: items,
field: "name",
- type: "asc"
+ type: "asc",
});
}
}
diff --git a/ngui/ui/src/components/Filters/WithRecommendationsFilter/WithRecommendationsFilter.tsx b/ngui/ui/src/components/Filters/WithRecommendationsFilter/WithRecommendationsFilter.tsx
index a39a1bab9..7647b2ef4 100644
--- a/ngui/ui/src/components/Filters/WithRecommendationsFilter/WithRecommendationsFilter.tsx
+++ b/ngui/ui/src/components/Filters/WithRecommendationsFilter/WithRecommendationsFilter.tsx
@@ -14,12 +14,12 @@ class WithRecommendationsFilter extends Filter {
// TODO: Use ajv TS integration to create schema based on types def
static filterItemSchema = {
- type: "boolean"
+ type: "boolean",
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "boolean"
+ type: "boolean",
};
static _getValue(filterItem) {
@@ -38,7 +38,7 @@ class WithRecommendationsFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
}
diff --git a/ngui/ui/src/components/Filters/WithViolatedConstraintsFilter/WithViolatedConstraintsFilter.tsx b/ngui/ui/src/components/Filters/WithViolatedConstraintsFilter/WithViolatedConstraintsFilter.tsx
index 73ff00128..05c8b45e9 100644
--- a/ngui/ui/src/components/Filters/WithViolatedConstraintsFilter/WithViolatedConstraintsFilter.tsx
+++ b/ngui/ui/src/components/Filters/WithViolatedConstraintsFilter/WithViolatedConstraintsFilter.tsx
@@ -14,20 +14,20 @@ class WithViolatedConstraintsFilter extends Filter {
// TODO: Use ajv TS integration to create schema based on types def
static filterItemSchema = {
- type: "boolean"
+ type: "boolean",
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "boolean"
+ type: "boolean",
};
suggestions = [
{
name: this.constructor.filterName,
value: true,
- label:
- }
+ label: ,
+ },
];
static _getValue(filterItem) {
@@ -46,7 +46,7 @@ class WithViolatedConstraintsFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
}
diff --git a/ngui/ui/src/components/Filters/WithoutTagFilter/WithoutTagFilter.tsx b/ngui/ui/src/components/Filters/WithoutTagFilter/WithoutTagFilter.tsx
index 9693eb1fa..f10e4995d 100644
--- a/ngui/ui/src/components/Filters/WithoutTagFilter/WithoutTagFilter.tsx
+++ b/ngui/ui/src/components/Filters/WithoutTagFilter/WithoutTagFilter.tsx
@@ -14,12 +14,12 @@ class WithoutTagFilter extends Filter {
// TODO: Use ajv TS integration to create schema based on types def
static filterItemSchema = {
- type: "string"
+ type: "string",
};
// TODO: Use ajv TS integration to create schema based on types def
static appliedFilterSchema = {
- type: "string"
+ type: "string",
};
static _getValue(filterItem) {
@@ -38,7 +38,7 @@ class WithoutTagFilter extends Filter {
return {
value: appliedFilter,
displayedValue: this.constructor.getDisplayedValueRenderer(filterItem),
- displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem)
+ displayedValueString: this.constructor.getDisplayedValueStringRenderer(filterItem),
};
}
}
diff --git a/ngui/ui/src/components/Filters/constants.ts b/ngui/ui/src/components/Filters/constants.ts
index e824912ff..51e16e4bd 100644
--- a/ngui/ui/src/components/Filters/constants.ts
+++ b/ngui/ui/src/components/Filters/constants.ts
@@ -27,7 +27,7 @@ export const SECURITY_CATEGORY = "security";
export const CATEGORIES = Object.freeze({
[ALL_CATEGORY]: "all",
[COST_CATEGORY]: "costOptimization",
- [SECURITY_CATEGORY]: "security"
+ [SECURITY_CATEGORY]: "security",
});
export const SUPPORTED_CATEGORIES = Object.freeze(Object.keys(CATEGORIES));
@@ -50,7 +50,7 @@ export const RESOURCE_FILTERS = [
TagFilter,
WithoutTagFilter,
NetworkTrafficFromFilter,
- NetworkTrafficToFilter
+ NetworkTrafficToFilter,
];
export const RESOURCE_FILTERS_NAMES = RESOURCE_FILTERS.map((ResourceFilter) => ResourceFilter.filterName);
diff --git a/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.styles.ts b/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.styles.ts
index 558bbcb91..be3556899 100644
--- a/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.styles.ts
+++ b/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.styles.ts
@@ -6,16 +6,16 @@ const useStyles = makeStyles()((theme) => ({
display: "flex",
flexDirection: "column",
alignItems: "center",
- padding: theme.spacing(SPACING_2)
+ padding: theme.spacing(SPACING_2),
},
badge: {
position: "relative",
display: "inline-flex",
- marginTop: theme.spacing(SPACING_1)
+ marginTop: theme.spacing(SPACING_1),
},
circleBack: {
position: "absolute",
- opacity: 0.2
+ opacity: 0.2,
},
scoreContainer: {
position: "absolute",
@@ -25,8 +25,8 @@ const useStyles = makeStyles()((theme) => ({
right: 0,
display: "flex",
alignItems: "center",
- justifyContent: "center"
- }
+ justifyContent: "center",
+ },
}));
export default useStyles;
diff --git a/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.tsx b/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.tsx
index 4c850c025..bb956e10a 100644
--- a/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.tsx
+++ b/ngui/ui/src/components/FinOpsChecklist/AdoptionScore/AdoptionScore.tsx
@@ -48,7 +48,7 @@ const AdoptionScore = ({ isLoading, fraction }) => {
{!isLoading && (
diff --git a/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.styles.ts b/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.styles.ts
index b7a958611..8fad0d235 100644
--- a/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.styles.ts
+++ b/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.styles.ts
@@ -4,44 +4,44 @@ const useStyles = makeStyles()((theme) => ({
root: {
height: 230,
transition: theme.transitions.create("height", {
- duration: theme.transitions.duration.shortest
- })
+ duration: theme.transitions.duration.shortest,
+ }),
},
fullHeight: {
- height: "100%"
+ height: "100%",
},
title: {
- justifyContent: "center"
+ justifyContent: "center",
},
titleContainer: {
- textAlign: "center"
+ textAlign: "center",
},
descriptionContainer: {
- wordBreak: "break-word"
+ wordBreak: "break-word",
},
illustrationContainer: {
display: "flex",
- justifyContent: "center"
+ justifyContent: "center",
},
illustration: {
maxWidth: "120px",
marginTop: "-60px",
transition: theme.transitions.create("filter", {
easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.standard
- })
+ duration: theme.transitions.duration.standard,
+ }),
},
blackAndWhite: {
- filter: "grayscale(1)"
+ filter: "grayscale(1)",
},
subtitle: {
display: "inline",
borderBottom: "1px dashed",
width: "fit-content",
"&:hover": {
- cursor: "pointer"
- }
- }
+ cursor: "pointer",
+ },
+ },
}));
export default useStyles;
diff --git a/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.tsx b/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.tsx
index f27a6f6d3..c32e3ff3f 100644
--- a/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.tsx
+++ b/ngui/ui/src/components/FinOpsChecklist/ChecklistCard/ChecklistCard.tsx
@@ -18,7 +18,7 @@ const ChecklistCard = ({ title, description, checked, canUpdate, onClick, dataTe
return (
} />
@@ -27,7 +27,7 @@ const ChecklistCard = ({ title, description, checked, canUpdate, onClick, dataTe
diff --git a/ngui/ui/src/components/FinOpsChecklist/FinOpsChecklist.tsx b/ngui/ui/src/components/FinOpsChecklist/FinOpsChecklist.tsx
index 33feb906d..468221d1c 100644
--- a/ngui/ui/src/components/FinOpsChecklist/FinOpsChecklist.tsx
+++ b/ngui/ui/src/components/FinOpsChecklist/FinOpsChecklist.tsx
@@ -36,7 +36,7 @@ const FinOpsChecklist = ({ items, update, isLoading = false }) => {
5: createPoolsForAllTheDepartments,
6: inviteTeammates,
7: setTTLRulesForAllTheResources,
- 8: tagAllTheResources
+ 8: tagAllTheResources,
}[id];
return (
@@ -56,7 +56,7 @@ const FinOpsChecklist = ({ items, update, isLoading = false }) => {
{text}
);
- }
+ },
}}
/>
}
diff --git a/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.styles.ts b/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.styles.ts
index cddbc1034..30c68d9e4 100644
--- a/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.styles.ts
+++ b/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.styles.ts
@@ -5,10 +5,10 @@ const useStyles = makeStyles()((theme) => ({
"& > *": {
marginRight: theme.spacing(1),
"&:last-child": {
- marginRight: 0
- }
- }
- }
+ marginRight: 0,
+ },
+ },
+ },
}));
export default useStyles;
diff --git a/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.tsx b/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.tsx
index f1e7afefa..dc15060c8 100644
--- a/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.tsx
+++ b/ngui/ui/src/components/FormButtonsWrapper/FormButtonsWrapper.tsx
@@ -15,7 +15,7 @@ const FormButtonsWrapper = ({
justifyContent = "flex-start",
alignItems,
mt = 2,
- mb = 0
+ mb = 0,
}: FormButtonsWrapperProps) => {
const { classes } = useStyles();
return (
diff --git a/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.test.tsx b/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.test.tsx
index 83980f5e1..78d3ac716 100644
--- a/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.test.tsx
+++ b/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.test.tsx
@@ -16,7 +16,7 @@ it("Common format IEC byte unit without crashing", () => {
{ value: 0.5, expected: "0.5 B" },
{ value: 1023, expected: "1,023 B" },
{ value: 1024, expected: "1 KiB" },
- { value: 312312312, expected: "297.844 MiB" }
+ { value: 312312312, expected: "297.844 MiB" },
];
testCases.forEach(({ value, expected }) => {
@@ -37,7 +37,7 @@ it("Common format SI byte unit without crashing", () => {
{ value: 0.5, expected: "0.5 B" },
{ value: 1023, expected: "1.023 KB" },
{ value: 1024, expected: "1.024 KB" },
- { value: 312312312, expected: "312.312 MB" }
+ { value: 312312312, expected: "312.312 MB" },
];
testCases.forEach(({ value, expected }) => {
diff --git a/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.ts b/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.ts
index 07fdd4c1b..dd748f83a 100644
--- a/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.ts
+++ b/ngui/ui/src/components/FormattedDigitalUnit/FormattedDigitalUnit.ts
@@ -7,7 +7,7 @@ export const IEC_UNITS = Object.freeze({
MEBIBYTE: "mebibyte",
GIBIBYTE: "gibibyte",
TEBIBYTE: "tebibyte",
- PEBIBYTE: "pebibyte"
+ PEBIBYTE: "pebibyte",
});
export const SI_UNITS = Object.freeze({
@@ -16,7 +16,7 @@ export const SI_UNITS = Object.freeze({
MEGABYTE: "megabyte",
GIGABYTE: "gigabyte",
TERABYTE: "terabyte",
- PETABYTE: "petabyte"
+ PETABYTE: "petabyte",
});
type IecUnitType = (typeof IEC_UNITS)[keyof typeof IEC_UNITS];
@@ -33,12 +33,12 @@ type FormattedDigitalUnitProps = {
const IEC_SYSTEM_OF_UNITS = Object.freeze({
BASE: 1024,
- UNITS: Object.values(IEC_UNITS) as readonly IecUnitType[]
+ UNITS: Object.values(IEC_UNITS) as readonly IecUnitType[],
});
const SI_SYSTEM_OF_UNITS = Object.freeze({
BASE: 1000,
- UNITS: Object.values(SI_UNITS) as readonly SiUnitType[]
+ UNITS: Object.values(SI_UNITS) as readonly SiUnitType[],
});
const getSystemOfUnits = (unitName: UnitType) => {
diff --git a/ngui/ui/src/components/FormattedDuration/FormattedDuration.ts b/ngui/ui/src/components/FormattedDuration/FormattedDuration.ts
index 1f21c1641..e520763c9 100644
--- a/ngui/ui/src/components/FormattedDuration/FormattedDuration.ts
+++ b/ngui/ui/src/components/FormattedDuration/FormattedDuration.ts
@@ -15,12 +15,12 @@ const FormattedDuration = ({ durationInSeconds }) => {
INTERVAL_DURATION_VALUE_TYPES.DAYS,
INTERVAL_DURATION_VALUE_TYPES.HOURS,
INTERVAL_DURATION_VALUE_TYPES.MINUTES,
- INTERVAL_DURATION_VALUE_TYPES.SECONDS
+ INTERVAL_DURATION_VALUE_TYPES.SECONDS,
],
duration: intervalToDuration({
start: 0,
- end: durationInSeconds * 1000
- })
+ end: durationInSeconds * 1000,
+ }),
});
};
diff --git a/ngui/ui/src/components/FormattedMoney/FormattedMoney.test.tsx b/ngui/ui/src/components/FormattedMoney/FormattedMoney.test.tsx
index e9ee4b3cd..45dd21140 100644
--- a/ngui/ui/src/components/FormattedMoney/FormattedMoney.test.tsx
+++ b/ngui/ui/src/components/FormattedMoney/FormattedMoney.test.tsx
@@ -14,44 +14,44 @@ it("Common renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10,000"
+ expected: "-$10,000",
},
{
value: -10.005,
- expected: "-$10.01"
+ expected: "-$10.01",
},
{
value: -0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 10.005,
- expected: "$10.01"
+ expected: "$10.01",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10,000"
- }
+ expected: "$10,000",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -67,44 +67,44 @@ it("Compact renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10k"
+ expected: "-$10k",
},
{
value: -10.005,
- expected: "-$10.01"
+ expected: "-$10.01",
},
{
value: -0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 10.005,
- expected: "$10.01"
+ expected: "$10.01",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10k"
- }
+ expected: "$10k",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -121,44 +121,44 @@ it("Tiny renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10,000"
+ expected: "-$10,000",
},
{
value: -10.005,
- expected: "-$10.005"
+ expected: "-$10.005",
},
{
value: -0.001,
- expected: "-$0.001"
+ expected: "-$0.001",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "$0.001"
+ expected: "$0.001",
},
{
value: 10.005,
- expected: "$10.005"
+ expected: "$10.005",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10,000"
- }
+ expected: "$10,000",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -175,44 +175,44 @@ it("Tiny compact renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10k"
+ expected: "-$10k",
},
{
value: -10.005,
- expected: "-$10.005"
+ expected: "-$10.005",
},
{
value: -0.001,
- expected: "-$0.001"
+ expected: "-$0.001",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "$0.001"
+ expected: "$0.001",
},
{
value: 10.005,
- expected: "$10.005"
+ expected: "$10.005",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10k"
- }
+ expected: "$10k",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
diff --git a/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.test.tsx b/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.test.tsx
index e8edd9528..5fcd4b51b 100644
--- a/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.test.tsx
+++ b/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.test.tsx
@@ -20,44 +20,44 @@ it("Common renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10,000"
+ expected: "-$10,000",
},
{
value: -10.005,
- expected: "-$10.01"
+ expected: "-$10.01",
},
{
value: -0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 10.005,
- expected: "$10.01"
+ expected: "$10.01",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10,000"
- }
+ expected: "$10,000",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -74,44 +74,44 @@ it("Compact renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10k"
+ expected: "-$10k",
},
{
value: -10.005,
- expected: "-$10.01"
+ expected: "-$10.01",
},
{
value: -0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "\u2248$0"
+ expected: "\u2248$0",
},
{
value: 10.005,
- expected: "$10.01"
+ expected: "$10.01",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10k"
- }
+ expected: "$10k",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -128,44 +128,44 @@ it("Tiny renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10,000"
+ expected: "-$10,000",
},
{
value: -10.005,
- expected: "-$10.005"
+ expected: "-$10.005",
},
{
value: -0.001,
- expected: "-$0.001"
+ expected: "-$0.001",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "$0.001"
+ expected: "$0.001",
},
{
value: 10.005,
- expected: "$10.005"
+ expected: "$10.005",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10,000"
- }
+ expected: "$10,000",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
@@ -182,44 +182,44 @@ it("Tiny compact renders without crashing", () => {
const cases = [
{
value: undefined,
- expected: "$0"
+ expected: "$0",
},
{
value: null,
- expected: "$0"
+ expected: "$0",
},
{
value: -10000,
- expected: "-$10k"
+ expected: "-$10k",
},
{
value: -10.005,
- expected: "-$10.005"
+ expected: "-$10.005",
},
{
value: -0.001,
- expected: "-$0.001"
+ expected: "-$0.001",
},
{
value: 0,
- expected: "$0"
+ expected: "$0",
},
{
value: 0.001,
- expected: "$0.001"
+ expected: "$0.001",
},
{
value: 10.005,
- expected: "$10.005"
+ expected: "$10.005",
},
{
value: 10.05,
- expected: "$10.05"
+ expected: "$10.05",
},
{
value: 10000,
- expected: "$10k"
- }
+ expected: "$10k",
+ },
];
const div = document.createElement("div");
const root = createRoot(div);
diff --git a/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.ts b/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.ts
index 910ad03f1..cbc8451c5 100644
--- a/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.ts
+++ b/ngui/ui/src/components/FormattedMoney/useMoneyFormatter.ts
@@ -58,7 +58,7 @@ export const useMoneyFormatter = () => {
[FORMATTED_MONEY_TYPES.COMMON]: formatCommon,
[FORMATTED_MONEY_TYPES.COMPACT]: formatCompact,
[FORMATTED_MONEY_TYPES.TINY_COMPACT]: formatTinyCompact,
- [FORMATTED_MONEY_TYPES.TINY]: formatTiny
+ [FORMATTED_MONEY_TYPES.TINY]: formatTiny,
}[type];
return formatter(intl.formatNumber)({ value, absoluteValue: Math.abs(value), format: calculatedFormat, ...rest });
diff --git a/ngui/ui/src/components/GenerateLiveDemo/Loading.tsx b/ngui/ui/src/components/GenerateLiveDemo/Loading.tsx
index ac6d8c7d2..442d1a36f 100644
--- a/ngui/ui/src/components/GenerateLiveDemo/Loading.tsx
+++ b/ngui/ui/src/components/GenerateLiveDemo/Loading.tsx
@@ -15,7 +15,7 @@ const Loading = () => (
diff --git a/ngui/ui/src/components/GenerateLiveDemo/Retry.tsx b/ngui/ui/src/components/GenerateLiveDemo/Retry.tsx
index ee3a98227..70892b04d 100644
--- a/ngui/ui/src/components/GenerateLiveDemo/Retry.tsx
+++ b/ngui/ui/src/components/GenerateLiveDemo/Retry.tsx
@@ -26,7 +26,7 @@ const Retry = ({ retry }: RetryProps) => {
+ email: ,
}}
/>
diff --git a/ngui/ui/src/components/GoalLabel/GoalLabel.tsx b/ngui/ui/src/components/GoalLabel/GoalLabel.tsx
index 50e84462c..b37cd08eb 100644
--- a/ngui/ui/src/components/GoalLabel/GoalLabel.tsx
+++ b/ngui/ui/src/components/GoalLabel/GoalLabel.tsx
@@ -33,7 +33,7 @@ const GoalLabel = ({ name, goalValue, targetGoalValue, reached, unit, displayInO
id="value / value"
values={{
value1: ,
- value2:
+ value2: ,
}}
/>
@@ -49,7 +49,7 @@ const GoalLabel = ({ name, goalValue, targetGoalValue, reached, unit, displayInO
style={{
display: "flex",
alignItems: "center",
- ...(displayInOneLine ? { flexWrap: "nowrap", whiteSpace: "nowrap" } : { flexWrap: "wrap" })
+ ...(displayInOneLine ? { flexWrap: "nowrap", whiteSpace: "nowrap" } : { flexWrap: "wrap" }),
}}
>
diff --git a/ngui/ui/src/components/GoogleAuthButton/GoogleAuthButton.tsx b/ngui/ui/src/components/GoogleAuthButton/GoogleAuthButton.tsx
index d662742d1..7c1726640 100644
--- a/ngui/ui/src/components/GoogleAuthButton/GoogleAuthButton.tsx
+++ b/ngui/ui/src/components/GoogleAuthButton/GoogleAuthButton.tsx
@@ -13,7 +13,7 @@ const GoogleAuthButton = ({ handleSignIn, isLoading, disabled }) => {
const { message = "", type = "", ...rest } = response;
console.warn(`Google response failure ${message}: ${type}`, rest);
},
- clientId
+ clientId,
});
const environmentNotSet = !clientId;
@@ -30,7 +30,7 @@ const GoogleAuthButton = ({ handleSignIn, isLoading, disabled }) => {
fullWidth
tooltip={{
show: environmentNotSet,
- messageId: "signInWithGoogleIsNotConfigured"
+ messageId: "signInWithGoogleIsNotConfigured",
}}
/>
);
diff --git a/ngui/ui/src/components/GoogleAuthButton/hooks.ts b/ngui/ui/src/components/GoogleAuthButton/hooks.ts
index 1cdb8fd89..2c369c532 100644
--- a/ngui/ui/src/components/GoogleAuthButton/hooks.ts
+++ b/ngui/ui/src/components/GoogleAuthButton/hooks.ts
@@ -42,7 +42,7 @@ const useGoogleLogin = ({ onSuccess, onError, clientId }) => {
},
error_callback: (nonOAuthError) => {
onErrorRef.current?.(nonOAuthError);
- }
+ },
});
clientRef.current = client;
diff --git a/ngui/ui/src/components/Greeter/Greeter.styles.ts b/ngui/ui/src/components/Greeter/Greeter.styles.ts
index ce14ea6a7..9b74f475e 100644
--- a/ngui/ui/src/components/Greeter/Greeter.styles.ts
+++ b/ngui/ui/src/components/Greeter/Greeter.styles.ts
@@ -3,29 +3,29 @@ import { makeStyles } from "tss-react/mui";
const getFormAndMapWrapperClasses = (theme) => {
const wrapperClass = {
[theme.breakpoints.down("xl")]: {
- width: 400
+ width: 400,
},
[theme.breakpoints.down("sm")]: {
maxWidth: 400,
- width: "100%"
+ width: "100%",
},
- width: 600
+ width: 600,
};
return {
- wrapper: wrapperClass
+ wrapper: wrapperClass,
};
};
const useStyles = makeStyles()((theme) => ({
root: {
- height: "100vh"
+ height: "100vh",
},
centeredFlexColumnDirection: {
display: "flex",
alignItems: "center",
justifyContent: "center",
flexDirection: "column",
- textAlign: "center"
+ textAlign: "center",
},
linkWrapper: {
width: "100%",
@@ -33,46 +33,46 @@ const useStyles = makeStyles()((theme) => ({
justifyContent: "space-between",
alignItems: "center",
[theme.breakpoints.down("md")]: {
- justifyContent: "space-around"
- }
+ justifyContent: "space-around",
+ },
},
imagesWithCaptions: {
maxWidth: "590px",
[theme.breakpoints.down("md")]: {
- justifyContent: "center"
+ justifyContent: "center",
},
[theme.breakpoints.up("xl")]: {
- maxWidth: "690px"
- }
+ maxWidth: "690px",
+ },
},
imageWithCaptionWrapper: {
alignItems: "center",
display: "flex",
flexDirection: "column",
- width: "100%"
+ width: "100%",
},
image: {
maxWidth: "122px",
width: "80%",
marginBottom: theme.spacing(1.5),
[theme.breakpoints.down("md")]: {
- width: "50%"
- }
+ width: "50%",
+ },
},
caption: {
textAlign: "center",
- lineHeight: 1.25
+ lineHeight: 1.25,
},
webIconMargin: {
- marginRight: "0.5rem"
+ marginRight: "0.5rem",
},
leftSideGrid: {
- backgroundColor: theme.palette.common.white
+ backgroundColor: theme.palette.common.white,
},
rightSideGrid: {
- backgroundColor: "#333F53"
+ backgroundColor: "#333F53",
},
- ...getFormAndMapWrapperClasses(theme)
+ ...getFormAndMapWrapperClasses(theme),
}));
export default useStyles;
diff --git a/ngui/ui/src/components/Greeter/Greeter.tsx b/ngui/ui/src/components/Greeter/Greeter.tsx
index c48ff1d62..0110406b3 100644
--- a/ngui/ui/src/components/Greeter/Greeter.tsx
+++ b/ngui/ui/src/components/Greeter/Greeter.tsx
@@ -75,7 +75,7 @@ const ImagesWithCaptions = () => {
{ caption: "optscale.welcome.caption3", src: anomalyDetectionToAvoidBudgetOverruns },
{ caption: "optscale.welcome.caption4", src: finopsReadinessMaturityAssessment },
{ caption: "optscale.welcome.caption5", src: itEnvironmentManagement },
- { caption: "optscale.welcome.caption6", src: geoNetworkTrafficCostMap }
+ { caption: "optscale.welcome.caption6", src: geoNetworkTrafficCostMap },
].map(({ caption, src }, index) => (
{
const { [OPTSCALE_CAPABILITY_QUERY_PARAMETER_NAME]: capability } = getSearchParams();
const url = buildQueryParameters(LIVE_DEMO, [
- capability ? `${OPTSCALE_CAPABILITY_QUERY_PARAMETER_NAME}=${capability}` : ""
+ capability ? `${OPTSCALE_CAPABILITY_QUERY_PARAMETER_NAME}=${capability}` : "",
]);
navigate(url);
@@ -158,7 +158,7 @@ const Greeter = ({ content }: GreeterProps) => {
const gridDefinition = [
{
- key: "empty"
+ key: "empty",
},
{
key: "link",
@@ -167,7 +167,7 @@ const Greeter = ({ content }: GreeterProps) => {
- )
+ ),
},
{
key: "form",
@@ -179,23 +179,23 @@ const Greeter = ({ content }: GreeterProps) => {