diff --git a/locales/data.json b/locales/data.json index 28e272f8d..822fe105b 100644 --- a/locales/data.json +++ b/locales/data.json @@ -3663,43 +3663,14 @@ "value": "value" } ], - "distributeUnallocatedCapacity": [ + "distributePlatformCosts": [ { "options": { "false": { "value": [ { "type": 0, - "value": "Do not distribute " - }, - { - "options": { - "other": { - "value": [] - }, - "platform": { - "value": [ - { - "type": 0, - "value": "platform" - } - ] - }, - "worker": { - "value": [ - { - "type": 0, - "value": "worker" - } - ] - } - }, - "type": 5, - "value": "type" - }, - { - "type": 0, - "value": " unallocated capacity" + "value": "Do not distribute platform costs" } ] }, @@ -3710,36 +3681,34 @@ "value": [ { "type": 0, - "value": "Distribute " - }, + "value": "Distribute platform costs" + } + ] + } + }, + "type": 5, + "value": "value" + } + ], + "distributeUnallocatedCapacity": [ + { + "options": { + "false": { + "value": [ { - "options": { - "other": { - "value": [] - }, - "platform": { - "value": [ - { - "type": 0, - "value": "platform" - } - ] - }, - "worker": { - "value": [ - { - "type": 0, - "value": "worker" - } - ] - } - }, - "type": 5, - "value": "type" - }, + "type": 0, + "value": "Do not distribute worker unallocated capacity" + } + ] + }, + "other": { + "value": [] + }, + "true": { + "value": [ { "type": 0, - "value": " unallocated capacity" + "value": "Distribute worker unallocated capacity" } ] } diff --git a/locales/translations.json b/locales/translations.json index 707544d7d..dd0b1a2ac 100644 --- a/locales/translations.json +++ b/locales/translations.json @@ -247,7 +247,8 @@ "discountMinus": "Discount (-)", "distribute": "Distribute", "distributeCosts": "{value, select, true {Distribute {type, select, network {network} storage {storage} other {}} costs}false {Do not distribute {type, select, network {network} storage {storage} other {}} costs}other {}}", - "distributeUnallocatedCapacity": "{value, select, true {Distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}false {Do not distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}other {}}", + "distributePlatformCosts": "{value, select, true {Distribute platform costs}false {Do not distribute platform costs}other {}}", + "distributeUnallocatedCapacity": "{value, select, true {Distribute worker unallocated capacity}false {Do not distribute worker unallocated capacity}other {}}", "distributionModelDesc": "Choose how your raw costs are distributed at the project level.", "distributionType": "Distribution type", "distributionTypeDesc": "{type, select, cpu {Distribute costs based on CPU usage}memory {Distribute costs based on memory usage}other {}}", diff --git a/package-lock.json b/package-lock.json index 7af60a2b2..a207a8b63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,16 +12,16 @@ "dependencies": { "@patternfly/patternfly": "5.3.1", "@patternfly/react-charts": "7.3.0", - "@patternfly/react-component-groups": "^5.1.0", + "@patternfly/react-component-groups": "^5.2.0", "@patternfly/react-core": "5.3.3", "@patternfly/react-icons": "5.3.2", "@patternfly/react-table": "5.3.3", "@patternfly/react-tokens": "5.3.1", - "@redhat-cloud-services/frontend-components": "^4.2.10", + "@redhat-cloud-services/frontend-components": "^4.2.11", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.7", "@redhat-cloud-services/frontend-components-utilities": "^4.0.11", - "@redhat-cloud-services/rbac-client": "^1.4.4", + "@redhat-cloud-services/rbac-client": "^2.0.2", "@reduxjs/toolkit": "^2.2.5", "@unleash/proxy-client-react": "^4.2.4", "axios": "^1.7.2", @@ -44,12 +44,12 @@ "@formatjs/ecma402-abstract": "^2.0.0", "@formatjs/icu-messageformat-parser": "^2.7.8", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^2.0.4", - "@redhat-cloud-services/frontend-components-config": "^6.0.14", - "@redhat-cloud-services/tsc-transform-imports": "^1.0.10", - "@swc/core": "^1.5.7", + "@redhat-cloud-services/frontend-components-config": "^6.0.15", + "@redhat-cloud-services/tsc-transform-imports": "^1.0.11", + "@swc/core": "^1.5.28", "@swc/jest": "^0.2.36", - "@testing-library/jest-dom": "^6.4.5", - "@testing-library/react": "^15.0.7", + "@testing-library/jest-dom": "^6.4.6", + "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.15", @@ -57,14 +57,14 @@ "@types/react-dom": "^18.3.0", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7.13.0", + "@typescript-eslint/parser": "^7.13.0", "aphrodite": "^2.4.0", "copy-webpack-plugin": "^12.0.2", "eslint": "^8.57.0", "eslint-plugin-formatjs": "^4.13.3", "eslint-plugin-jest-dom": "^5.4.0", - "eslint-plugin-jsdoc": "^48.2.7", + "eslint-plugin-jsdoc": "^48.2.9", "eslint-plugin-markdown": "^5.0.0", "eslint-plugin-patternfly-react": "^5.3.0", "eslint-plugin-prettier": "^5.1.3", @@ -80,11 +80,11 @@ "jest-transform-stub": "^2.0.0", "jws": "^4.0.0", "npm-run-all": "^4.1.5", - "prettier": "^3.2.5", + "prettier": "^3.3.2", "rimraf": "^5.0.7", "swc_mut_cjs_exports": "^0.90.24", "ts-jest": "^29.1.4", - "ts-patch": "^3.1.2", + "ts-patch": "^3.2.0", "typescript": "^5.4.5", "webpack-bundle-analyzer": "^4.10.2" }, @@ -103,9 +103,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", - "integrity": "sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz", + "integrity": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==", "dev": true }, "node_modules/@ampproject/remapping": { @@ -2296,9 +2296,9 @@ } }, "node_modules/@patternfly/react-component-groups": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-5.1.0.tgz", - "integrity": "sha512-DCEKc7Iyuf/7prI2a6mWyM/qwgBBtEzxDnNSpkZyes+Q3os0F5lUxW5qZVrg3JcNp0/J1183vwLdp1VoJRmcJw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@patternfly/react-component-groups/-/react-component-groups-5.2.0.tgz", + "integrity": "sha512-kb57OOVJ9L5fbY/kiil8awPWuJVops8Rz1ZNFtkEb72mF3lhmRadYNheLBeaD8T9GE1dOaVJRMMf133ZSKN87g==", "dependencies": { "@patternfly/react-core": "^5.1.1", "@patternfly/react-icons": "^5.1.1", @@ -2497,9 +2497,9 @@ } }, "node_modules/@redhat-cloud-services/frontend-components": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.10.tgz", - "integrity": "sha512-4pAmnoVRkFS4h21KNnGmOZn1co4m4y8/GcCFxbnEp8nh8OWSyD2r16DPS95wG9mjcSYmPn9OQ+Ooh+PE6+/wWQ==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components/-/frontend-components-4.2.11.tgz", + "integrity": "sha512-Mp8hksPvUOcTtybKGjaZoE6Pwl68Z1T7raKzDpIqoFgwz6T/KRzyRGNy5JD1QpB6lR/kN3QIw8CXAfZEvSe+Qw==", "dependencies": { "@patternfly/react-component-groups": "^5.0.0", "@redhat-cloud-services/frontend-components-utilities": "^4.0.0", @@ -2507,7 +2507,7 @@ "@scalprum/core": "^0.7.0", "@scalprum/react-core": "^0.7.0", "classnames": "^2.2.5", - "sanitize-html": "^2.7.2" + "sanitize-html": "^2.12.1" }, "peerDependencies": { "@patternfly/react-core": "^5.0.0", @@ -2523,9 +2523,9 @@ } }, "node_modules/@redhat-cloud-services/frontend-components-config": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config/-/frontend-components-config-6.0.14.tgz", - "integrity": "sha512-VBa2lFClKgrUdJVY/SsqYPIHzao0tf/j4hln6K1wxl9DmYH1D7mXSJaypnytuBjvQBYC5pRiScuLrmYBwUDRcA==", + "version": "6.0.15", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/frontend-components-config/-/frontend-components-config-6.0.15.tgz", + "integrity": "sha512-j3BZAc8M+8R53fPqj9MYHI2lLgvwzLUNvPp4g0DXMViKXEWkP3/Vnguvt3tTlqIQ139KUL43MNEli+T4NSdZlA==", "dev": true, "dependencies": { "@pmmmwh/react-refresh-webpack-plugin": "^0.5.8", @@ -2869,6 +2869,17 @@ "react-router-dom": "^5.0.0 || ^6.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/@redhat-cloud-services/rbac-client": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/rbac-client/-/rbac-client-1.4.5.tgz", + "integrity": "sha512-7kryZfzEYuw1V7c8bO5esXnfeYQO4Skz1XhluJ2whZNji8HcVbwDjBsQxy0+ndaSVirh5d86fufb00vK6fyUjw==", + "optional": true, + "peer": true, + "dependencies": { + "axios": "^0.27.2", + "tslib": "^2.6.2" + } + }, "node_modules/@redhat-cloud-services/frontend-components-translations/node_modules/attr-accept": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", @@ -2965,6 +2976,24 @@ "react-router-dom": "^5.0.0 || ^6.0.0" } }, + "node_modules/@redhat-cloud-services/frontend-components-utilities/node_modules/@redhat-cloud-services/rbac-client": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/rbac-client/-/rbac-client-1.4.5.tgz", + "integrity": "sha512-7kryZfzEYuw1V7c8bO5esXnfeYQO4Skz1XhluJ2whZNji8HcVbwDjBsQxy0+ndaSVirh5d86fufb00vK6fyUjw==", + "dependencies": { + "axios": "^0.27.2", + "tslib": "^2.6.2" + } + }, + "node_modules/@redhat-cloud-services/frontend-components-utilities/node_modules/@redhat-cloud-services/rbac-client/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/@redhat-cloud-services/frontend-components-utilities/node_modules/@redhat-cloud-services/types": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-1.0.9.tgz", @@ -2985,11 +3014,30 @@ "resolved": "https://registry.npmjs.org/@redhat-cloud-services/types/-/types-1.0.9.tgz", "integrity": "sha512-dKYYSLU0cwNkOSq5kSvdKWzgwFGBk45uwAwoHGi44PMQdWkuz+tXhYLrKKAXoSXVahR6VFjBDONlaxok8Lzkcw==" }, + "node_modules/@redhat-cloud-services/javascript-clients-shared": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/javascript-clients-shared/-/javascript-clients-shared-1.2.2.tgz", + "integrity": "sha512-Sr2HIAL+3WM6L3iEXzaukMbF/AwgaSkW9ftYPUWS/GuocFY8MbbSMZQwRAWplk4+jS71I+vz0G4f9PhhBzBtUg==", + "dependencies": { + "axios": "^0.27.2", + "tslib": "^2.6.2" + } + }, + "node_modules/@redhat-cloud-services/javascript-clients-shared/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, "node_modules/@redhat-cloud-services/rbac-client": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/rbac-client/-/rbac-client-1.4.4.tgz", - "integrity": "sha512-I5NE+Xllg8x1qxAorHK4s1CBairnLi4wq3kSIhMinlYrKWZRu/0j2JlDBTTWGmZfsVXAi1Tca0Z0N6u553iRTw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/rbac-client/-/rbac-client-2.0.2.tgz", + "integrity": "sha512-xI6KssmZzz76dWbBVaDsJROfbbEBAy/66SVChbLGzqAYaIPVeB2LVjfT7K512vhieoReKBA5u9mZPsNUdsbVHg==", "dependencies": { + "@redhat-cloud-services/javascript-clients-shared": "^1.2.2", "axios": "^0.27.2", "tslib": "^2.6.2" } @@ -3004,9 +3052,9 @@ } }, "node_modules/@redhat-cloud-services/tsc-transform-imports": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@redhat-cloud-services/tsc-transform-imports/-/tsc-transform-imports-1.0.10.tgz", - "integrity": "sha512-IzZsgGrpE3XaGk7UBVryjUftL/Pd2FKsjf92MhzD6z7FnvtKiQsx7CnLBi6wcaAAT1VWi5HuWIIziS6wVmLGbQ==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@redhat-cloud-services/tsc-transform-imports/-/tsc-transform-imports-1.0.11.tgz", + "integrity": "sha512-ARk+V8G3tkM4iT4WUkwwyOPnLy6YQJBEMzPQO+RXvNFyzCqGc1h1vkGU4F/4nVhc9kC/Gt5RfBUJ5e2YbYaBfA==", "dev": true, "dependencies": { "glob": "10.3.3" @@ -3234,14 +3282,14 @@ } }, "node_modules/@swc/core": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.7.tgz", - "integrity": "sha512-U4qJRBefIJNJDRCCiVtkfa/hpiZ7w0R6kASea+/KLp+vkus3zcLSB8Ub8SvKgTIxjWpwsKcZlPf5nrv4ls46SQ==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.28.tgz", + "integrity": "sha512-muCdNIqOTURUgYeyyOLYE3ShL8SZO6dw6bhRm6dCvxWzCZOncPc5fB0kjcPXTML+9KJoHL7ks5xg+vsQK+v6ig==", "dev": true, "hasInstallScript": true, "dependencies": { - "@swc/counter": "^0.1.2", - "@swc/types": "0.1.7" + "@swc/counter": "^0.1.3", + "@swc/types": "^0.1.8" }, "engines": { "node": ">=10" @@ -3251,19 +3299,19 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.5.7", - "@swc/core-darwin-x64": "1.5.7", - "@swc/core-linux-arm-gnueabihf": "1.5.7", - "@swc/core-linux-arm64-gnu": "1.5.7", - "@swc/core-linux-arm64-musl": "1.5.7", - "@swc/core-linux-x64-gnu": "1.5.7", - "@swc/core-linux-x64-musl": "1.5.7", - "@swc/core-win32-arm64-msvc": "1.5.7", - "@swc/core-win32-ia32-msvc": "1.5.7", - "@swc/core-win32-x64-msvc": "1.5.7" + "@swc/core-darwin-arm64": "1.5.28", + "@swc/core-darwin-x64": "1.5.28", + "@swc/core-linux-arm-gnueabihf": "1.5.28", + "@swc/core-linux-arm64-gnu": "1.5.28", + "@swc/core-linux-arm64-musl": "1.5.28", + "@swc/core-linux-x64-gnu": "1.5.28", + "@swc/core-linux-x64-musl": "1.5.28", + "@swc/core-win32-arm64-msvc": "1.5.28", + "@swc/core-win32-ia32-msvc": "1.5.28", + "@swc/core-win32-x64-msvc": "1.5.28" }, "peerDependencies": { - "@swc/helpers": "^0.5.0" + "@swc/helpers": "*" }, "peerDependenciesMeta": { "@swc/helpers": { @@ -3272,9 +3320,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.7.tgz", - "integrity": "sha512-bZLVHPTpH3h6yhwVl395k0Mtx8v6CGhq5r4KQdAoPbADU974Mauz1b6ViHAJ74O0IVE5vyy7tD3OpkQxL/vMDQ==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.28.tgz", + "integrity": "sha512-sP6g63ybzIdOWNDbn51tyHN8EMt7Mb4RMeHQEsXB7wQfDvzhpWB+AbfK6Gs3Q8fwP/pmWIrWW9csKOc1K2Mmkg==", "cpu": [ "arm64" ], @@ -3288,9 +3336,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.7.tgz", - "integrity": "sha512-RpUyu2GsviwTc2qVajPL0l8nf2vKj5wzO3WkLSHAHEJbiUZk83NJrZd1RVbEknIMO7+Uyjh54hEh8R26jSByaw==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.28.tgz", + "integrity": "sha512-Bd/agp/g7QocQG5AuorOzSC78t8OzeN+pCN/QvJj1CvPhvppjJw6e1vAbOR8vO2vvGi2pvtf3polrYQStJtSiA==", "cpu": [ "x64" ], @@ -3304,9 +3352,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.7.tgz", - "integrity": "sha512-cTZWTnCXLABOuvWiv6nQQM0hP6ZWEkzdgDvztgHI/+u/MvtzJBN5lBQ2lue/9sSFYLMqzqff5EHKlFtrJCA9dQ==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.28.tgz", + "integrity": "sha512-Wr3TwPGIveS9/OBWm0r9VAL8wkCR0zQn46J8K01uYCmVhUNK3Muxjs0vQBZaOrGu94mqbj9OXY+gB3W7aDvGdA==", "cpu": [ "arm" ], @@ -3320,9 +3368,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.7.tgz", - "integrity": "sha512-hoeTJFBiE/IJP30Be7djWF8Q5KVgkbDtjySmvYLg9P94bHg9TJPSQoC72tXx/oXOgXvElDe/GMybru0UxhKx4g==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.28.tgz", + "integrity": "sha512-8G1ZwVTuLgTAVTMPD+M97eU6WeiRIlGHwKZ5fiJHPBcz1xqIC7jQcEh7XBkobkYoU5OILotls3gzjRt8CMNyDQ==", "cpu": [ "arm64" ], @@ -3336,9 +3384,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.7.tgz", - "integrity": "sha512-+NDhK+IFTiVK1/o7EXdCeF2hEzCiaRSrb9zD7X2Z7inwWlxAntcSuzZW7Y6BRqGQH89KA91qYgwbnjgTQ22PiQ==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.28.tgz", + "integrity": "sha512-0Ajdzb5Fzvz+XUbN5ESeHAz9aHHSYiQcm+vmsDi0TtPHmsalfnqEPZmnK0zPALPJPLQP2dDo4hELeDg3/c3xgA==", "cpu": [ "arm64" ], @@ -3352,9 +3400,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.7.tgz", - "integrity": "sha512-25GXpJmeFxKB+7pbY7YQLhWWjkYlR+kHz5I3j9WRl3Lp4v4UD67OGXwPe+DIcHqcouA1fhLhsgHJWtsaNOMBNg==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.28.tgz", + "integrity": "sha512-ueQ9VejnQUM2Pt+vT0IAKoF4vYBWUP6n1KHGdILpoGe3LuafQrqu7RoyQ15C7/AYii7hAeNhTFdf6gLbg8cjFg==", "cpu": [ "x64" ], @@ -3368,9 +3416,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.7.tgz", - "integrity": "sha512-0VN9Y5EAPBESmSPPsCJzplZHV26akC0sIgd3Hc/7S/1GkSMoeuVL+V9vt+F/cCuzr4VidzSkqftdP3qEIsXSpg==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.28.tgz", + "integrity": "sha512-G5th8Mg0az8CbY4GQt9/m5hg2Y0kGIwvQBeVACuLQB6q2Y4txzdiTpjmFqUUhEvvl7Klyx1IHvNhfXs3zpt7PA==", "cpu": [ "x64" ], @@ -3384,9 +3432,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.7.tgz", - "integrity": "sha512-RtoNnstBwy5VloNCvmvYNApkTmuCe4sNcoYWpmY7C1+bPR+6SOo8im1G6/FpNem8AR5fcZCmXHWQ+EUmRWJyuA==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.28.tgz", + "integrity": "sha512-JezwCGavZ7CkNXx4yInI4kpb71L0zxzxA9BFlmnsGKEEjVQcKc3hFpmIzfFVs+eotlBUwDNb0+Yo9m6Cb7lllA==", "cpu": [ "arm64" ], @@ -3400,9 +3448,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.7.tgz", - "integrity": "sha512-Xm0TfvcmmspvQg1s4+USL3x8D+YPAfX2JHygvxAnCJ0EHun8cm2zvfNBcsTlnwYb0ybFWXXY129aq1wgFC9TpQ==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.28.tgz", + "integrity": "sha512-q8tW5J4RkOkl7vYShnWS//VAb2Ngolfm9WOMaF2GRJUr2Y/Xeb/+cNjdsNOqea2BzW049D5vdP7XPmir3/zUZw==", "cpu": [ "ia32" ], @@ -3416,9 +3464,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.7.tgz", - "integrity": "sha512-tp43WfJLCsKLQKBmjmY/0vv1slVywR5Q4qKjF5OIY8QijaEW7/8VwPyUyVoJZEnDgv9jKtUTG5PzqtIYPZGnyg==", + "version": "1.5.28", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.28.tgz", + "integrity": "sha512-jap6EiB3wG1YE1hyhNr9KLPpH4PGm+5tVMfN0l7fgKtV0ikgpcEN/YF94tru+z5m2HovqYW009+Evq9dcVGmpg==", "cpu": [ "x64" ], @@ -3455,32 +3503,32 @@ } }, "node_modules/@swc/types": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.7.tgz", - "integrity": "sha512-scHWahbHF0eyj3JsxG9CFJgFdFNaVQCNAimBlT6PzS3n/HptxqREjsm4OH6AN3lYcffZYSPxXW8ua2BEHp0lJQ==", + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.8.tgz", + "integrity": "sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==", "dev": true, "dependencies": { "@swc/counter": "^0.1.3" } }, "node_modules/@testing-library/dom": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", - "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.1.0.tgz", + "integrity": "sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA==", "dev": true, "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", - "aria-query": "5.1.3", + "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/@testing-library/dom/node_modules/ansi-styles": { @@ -3560,12 +3608,12 @@ } }, "node_modules/@testing-library/jest-dom": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.5.tgz", - "integrity": "sha512-AguB9yvTXmCnySBP1lWjfNNUwpbElsaQ567lt2VdGqAdHtpieLgjmcVyv1q7PMIvLbgpDdkWV5Ydv3FEejyp2A==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz", + "integrity": "sha512-8qpnGVincVDLEcQXWaHOf6zmlbwTKc6Us6PPu4CRnPXCzo2OGBS5cwgMMOWdxDpEz1mkbvXHpEy99M5Yvt682w==", "dev": true, "dependencies": { - "@adobe/css-tools": "^4.3.2", + "@adobe/css-tools": "^4.4.0", "@babel/runtime": "^7.9.2", "aria-query": "^5.0.0", "chalk": "^3.0.0", @@ -3678,127 +3726,32 @@ } }, "node_modules/@testing-library/react": { - "version": "15.0.7", - "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-15.0.7.tgz", - "integrity": "sha512-cg0RvEdD1TIhhkm1IeYMQxrzy0MtUNfa3minv4MjbgcYzJAZ7yD0i0lwoPOTPr+INtiXFezt2o8xMSnyHhEn2Q==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.0.0.tgz", + "integrity": "sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.12.5", - "@testing-library/dom": "^10.0.0", - "@types/react-dom": "^18.0.0" + "@babel/runtime": "^7.12.5" }, "engines": { "node": ">=18" }, "peerDependencies": { + "@testing-library/dom": "^10.0.0", "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, "peerDependenciesMeta": { "@types/react": { "optional": true + }, + "@types/react-dom": { + "optional": true } } }, - "node_modules/@testing-library/react/node_modules/@testing-library/dom": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.0.0.tgz", - "integrity": "sha512-PmJPnogldqoVFf+EwbHvbBJ98MmqASV8kLrBYgsDNxQcFMeIS7JFL48sfyXvuMtgmWO/wMhh25odr+8VhDmn4g==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/runtime": "^7.12.5", - "@types/aria-query": "^5.0.1", - "aria-query": "5.3.0", - "chalk": "^4.1.0", - "dom-accessibility-api": "^0.5.9", - "lz-string": "^1.5.0", - "pretty-format": "^27.0.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@testing-library/react/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@testing-library/react/node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, - "node_modules/@testing-library/react/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@testing-library/react/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/react/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@testing-library/react/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/react/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@testing-library/user-event": { "version": "14.5.2", "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz", @@ -3825,7 +3778,8 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@types/babel__core": { "version": "7.20.5", @@ -4476,16 +4430,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz", - "integrity": "sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.0.tgz", + "integrity": "sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/type-utils": "7.11.0", - "@typescript-eslint/utils": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", + "@typescript-eslint/scope-manager": "7.13.0", + "@typescript-eslint/type-utils": "7.13.0", + "@typescript-eslint/utils": "7.13.0", + "@typescript-eslint/visitor-keys": "7.13.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -4509,15 +4463,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.11.0.tgz", - "integrity": "sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.13.0.tgz", + "integrity": "sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/typescript-estree": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", + "@typescript-eslint/scope-manager": "7.13.0", + "@typescript-eslint/types": "7.13.0", + "@typescript-eslint/typescript-estree": "7.13.0", + "@typescript-eslint/visitor-keys": "7.13.0", "debug": "^4.3.4" }, "engines": { @@ -4537,13 +4491,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.11.0.tgz", - "integrity": "sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz", + "integrity": "sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0" + "@typescript-eslint/types": "7.13.0", + "@typescript-eslint/visitor-keys": "7.13.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4554,13 +4508,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.11.0.tgz", - "integrity": "sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.13.0.tgz", + "integrity": "sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.11.0", - "@typescript-eslint/utils": "7.11.0", + "@typescript-eslint/typescript-estree": "7.13.0", + "@typescript-eslint/utils": "7.13.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -4581,9 +4535,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.11.0.tgz", - "integrity": "sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.0.tgz", + "integrity": "sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4594,13 +4548,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.11.0.tgz", - "integrity": "sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz", + "integrity": "sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/visitor-keys": "7.11.0", + "@typescript-eslint/types": "7.13.0", + "@typescript-eslint/visitor-keys": "7.13.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4649,15 +4603,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.11.0.tgz", - "integrity": "sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.0.tgz", + "integrity": "sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.11.0", - "@typescript-eslint/types": "7.11.0", - "@typescript-eslint/typescript-estree": "7.11.0" + "@typescript-eslint/scope-manager": "7.13.0", + "@typescript-eslint/types": "7.13.0", + "@typescript-eslint/typescript-estree": "7.13.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4671,12 +4625,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz", - "integrity": "sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==", + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz", + "integrity": "sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.11.0", + "@typescript-eslint/types": "7.13.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -5196,12 +5150,12 @@ "dev": true }, "node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, "dependencies": { - "deep-equal": "^2.0.5" + "dequal": "^2.0.3" } }, "node_modules/array-buffer-byte-length": { @@ -7859,38 +7813,6 @@ } } }, - "node_modules/deep-equal": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", - "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.5", - "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.2", - "is-arguments": "^1.1.1", - "is-array-buffer": "^3.0.2", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "isarray": "^2.0.5", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "side-channel": "^1.0.4", - "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -8195,7 +8117,8 @@ "version": "0.5.16", "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz", "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==", - "dev": true + "dev": true, + "peer": true }, "node_modules/dom-converter": { "version": "0.2.0", @@ -8535,26 +8458,6 @@ "node": ">= 0.4" } }, - "node_modules/es-get-iterator": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", - "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", - "has-symbols": "^1.0.3", - "is-arguments": "^1.1.1", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.7", - "isarray": "^2.0.5", - "stop-iteration-iterator": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-iterator-helpers": { "version": "1.0.19", "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", @@ -9413,9 +9316,9 @@ "dev": true }, "node_modules/eslint-plugin-jsdoc": { - "version": "48.2.7", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.7.tgz", - "integrity": "sha512-fYj3roTnkFL9OFFTB129rico8lerC5G8Vp2ZW9SjO9RNWG0exVvI+i/Y8Bpm1ufjR0uvT38xtoab/U0Hp8Ybog==", + "version": "48.2.9", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.9.tgz", + "integrity": "sha512-ErpKyr2mEUEkcdZ4nwW/cvDjClvAcvJMEXkGGll0wf8sro8h6qeQ3qlZyp1vM1dRk8Ap6rMdke8FnP94QBIaVQ==", "dev": true, "dependencies": { "@es-joy/jsdoccomment": "~0.43.1", @@ -9488,15 +9391,6 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", - "dev": true, - "dependencies": { - "dequal": "^2.0.3" - } - }, "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -16081,6 +15975,7 @@ "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", "dev": true, + "peer": true, "bin": { "lz-string": "bin/bin.js" } @@ -17726,9 +17621,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -17780,6 +17675,7 @@ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, + "peer": true, "dependencies": { "ansi-regex": "^5.0.1", "ansi-styles": "^5.0.0", @@ -17794,6 +17690,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, + "peer": true, "engines": { "node": ">=10" }, @@ -17805,7 +17702,8 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true + "dev": true, + "peer": true }, "node_modules/process": { "version": "0.11.10", @@ -19415,18 +19313,6 @@ "node": ">= 0.8" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", - "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", - "dev": true, - "dependencies": { - "internal-slot": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/stream-browserify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", @@ -20294,9 +20180,9 @@ "dev": true }, "node_modules/ts-patch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/ts-patch/-/ts-patch-3.1.2.tgz", - "integrity": "sha512-n58F5AqjUMdp9RAKq+E1YBkmONltPVbt1nN+wrmZXoYZek6QcvaTuqvKMhYhr5BxtC53kD/exxIPA1cP1RQxsA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ts-patch/-/ts-patch-3.2.0.tgz", + "integrity": "sha512-fUGMkjGIlD4BFibDM+6pLYLXRguzCUY6fhP1KQzSnFJfAtTDT7DKyX0yHn3CJqfBv4mia/o3ZRte31UVf9Dl1A==", "dev": true, "dependencies": { "chalk": "^4.1.2", diff --git a/package.json b/package.json index f76f4345d..5e0acd44d 100644 --- a/package.json +++ b/package.json @@ -52,16 +52,16 @@ "dependencies": { "@patternfly/patternfly": "5.3.1", "@patternfly/react-charts": "7.3.0", - "@patternfly/react-component-groups": "^5.1.0", + "@patternfly/react-component-groups": "^5.2.0", "@patternfly/react-core": "5.3.3", "@patternfly/react-icons": "5.3.2", "@patternfly/react-table": "5.3.3", "@patternfly/react-tokens": "5.3.1", - "@redhat-cloud-services/frontend-components": "^4.2.10", + "@redhat-cloud-services/frontend-components": "^4.2.11", "@redhat-cloud-services/frontend-components-notifications": "^4.1.0", "@redhat-cloud-services/frontend-components-translations": "^3.2.7", "@redhat-cloud-services/frontend-components-utilities": "^4.0.11", - "@redhat-cloud-services/rbac-client": "^1.4.4", + "@redhat-cloud-services/rbac-client": "^2.0.2", "@reduxjs/toolkit": "^2.2.5", "@unleash/proxy-client-react": "^4.2.4", "axios": "^1.7.2", @@ -84,12 +84,12 @@ "@formatjs/ecma402-abstract": "^2.0.0", "@formatjs/icu-messageformat-parser": "^2.7.8", "@redhat-cloud-services/eslint-config-redhat-cloud-services": "^2.0.4", - "@redhat-cloud-services/frontend-components-config": "^6.0.14", - "@redhat-cloud-services/tsc-transform-imports": "^1.0.10", - "@swc/core": "^1.5.7", + "@redhat-cloud-services/frontend-components-config": "^6.0.15", + "@redhat-cloud-services/tsc-transform-imports": "^1.0.11", + "@swc/core": "^1.5.28", "@swc/jest": "^0.2.36", - "@testing-library/jest-dom": "^6.4.5", - "@testing-library/react": "^15.0.7", + "@testing-library/jest-dom": "^6.4.6", + "@testing-library/react": "^16.0.0", "@testing-library/user-event": "^14.5.2", "@types/jest": "^29.5.12", "@types/qs": "^6.9.15", @@ -97,14 +97,14 @@ "@types/react-dom": "^18.3.0", "@types/react-redux": "^7.1.33", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7.13.0", + "@typescript-eslint/parser": "^7.13.0", "aphrodite": "^2.4.0", "copy-webpack-plugin": "^12.0.2", "eslint": "^8.57.0", "eslint-plugin-formatjs": "^4.13.3", "eslint-plugin-jest-dom": "^5.4.0", - "eslint-plugin-jsdoc": "^48.2.7", + "eslint-plugin-jsdoc": "^48.2.9", "eslint-plugin-markdown": "^5.0.0", "eslint-plugin-patternfly-react": "^5.3.0", "eslint-plugin-prettier": "^5.1.3", @@ -120,11 +120,11 @@ "jest-transform-stub": "^2.0.0", "jws": "^4.0.0", "npm-run-all": "^4.1.5", - "prettier": "^3.2.5", + "prettier": "^3.3.2", "rimraf": "^5.0.7", "swc_mut_cjs_exports": "^0.90.24", "ts-jest": "^29.1.4", - "ts-patch": "^3.1.2", + "ts-patch": "^3.2.0", "typescript": "^5.4.5", "webpack-bundle-analyzer": "^4.10.2" }, diff --git a/src/api/costModels.ts b/src/api/costModels.ts index bfe3d15cf..256e44cd1 100644 --- a/src/api/costModels.ts +++ b/src/api/costModels.ts @@ -15,9 +15,9 @@ export interface CostModel { description: string; distribution_info?: { distribution_type?: string; - network_cost?: boolean; + network_unattributed?: boolean; platform_cost?: boolean; - storage_cost?: boolean; + storage_unattributed?: boolean; worker_cost?: boolean; }; markup: { value: string; unit: string }; @@ -34,9 +34,9 @@ export interface CostModelRequest { description: string; distribution_info?: { distribution_type?: string; - network_cost?: boolean; + network_unattributed?: boolean; platform_cost?: boolean; - storage_cost?: boolean; + storage_unattributed?: boolean; worker_cost?: boolean; }; markup: { value: string; unit: string }; diff --git a/src/api/reports/report.ts b/src/api/reports/report.ts index 9506fa601..e4884fce3 100644 --- a/src/api/reports/report.ts +++ b/src/api/reports/report.ts @@ -1,12 +1,15 @@ import type { PagedMetaData, PagedResponse } from 'api/api'; export interface ReportValue { + units?: string; + value?: number; +} + +export interface ReportUsageValue extends ReportValue { count?: number; count_units?: string; - units?: string; unused?: number; unused_percent?: number; - value?: number; } export interface ReportItemValue { @@ -73,14 +76,14 @@ export interface ReportAzureItem extends ReportItem { } export interface ReportOcpItem extends ReportItem { - capacity: ReportValue; + capacity: ReportUsageValue; cluster?: string; clusters?: string[]; limit: ReportValue; node?: string; persistentvolumeclaim?: string; project?: string; - request: ReportValue; + request: ReportUsageValue; usage: ReportValue; } @@ -145,12 +148,12 @@ export interface ReportMeta extends PagedMetaData { }; others?: number; total?: { - capacity?: ReportValue; + capacity?: ReportUsageValue; cost?: ReportItemValue; count?: ReportValue; // Workaround for https://github.com/project-koku/koku/issues/1395 infrastructure?: ReportItemValue; limit?: ReportValue; - request?: ReportValue; + request?: ReportUsageValue; supplementary?: ReportItemValue; usage?: ReportValue; }; diff --git a/src/locales/messages.ts b/src/locales/messages.ts index fcd0578c9..cb9f0d991 100644 --- a/src/locales/messages.ts +++ b/src/locales/messages.ts @@ -1455,13 +1455,22 @@ export default defineMessages({ description: 'distribute costs', id: 'distributeCosts', }, + distributePlatformCosts: { + defaultMessage: + '{value, select, ' + + 'true {Distribute platform costs}' + + 'false {Do not distribute platform costs}' + + 'other {}}', + description: 'Distribute platform costs', + id: 'distributePlatformCosts', + }, distributeUnallocatedCapacity: { defaultMessage: '{value, select, ' + - 'true {Distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}' + - 'false {Do not distribute {type, select, platform {platform} worker {worker} other {}} unallocated capacity}' + + 'true {Distribute worker unallocated capacity}' + + 'false {Do not distribute worker unallocated capacity}' + 'other {}}', - description: 'distribute unallocated capacity', + description: 'Distribute unallocated capacity', id: 'distributeUnallocatedCapacity', }, distributionModelDesc: { diff --git a/src/routes/components/charts/common/chartDatum.ts b/src/routes/components/charts/common/chartDatum.ts index bbfae5121..d398c3b43 100644 --- a/src/routes/components/charts/common/chartDatum.ts +++ b/src/routes/components/charts/common/chartDatum.ts @@ -76,18 +76,18 @@ export function transformReport( const val = d[reportItem][reportItemValue] ? d[reportItem][reportItemValue].value : d[reportItem].value; return [...acc, createReportDatum(prevValue + val, d, idKey, reportItem, reportItemValue)]; } else { - const val = d[reportItem] ? d[reportItem].value : d[reportItem].value; + const val = d[reportItem]?.value !== undefined ? d[reportItem].value : d[reportItem]; return [...acc, createReportDatum(prevValue + val, d, idKey, reportItem, undefined)]; } }, []); } else { chartDatums = computedItems.map(i => { - if (i[reportItem]) { + if (i[reportItem] !== undefined) { if (reportItemValue) { const val = i[reportItem][reportItemValue] ? i[reportItem][reportItemValue].value : i[reportItem].value; return createReportDatum(val, i, idKey, reportItem, reportItemValue); } else { - const val = i[reportItem] ? i[reportItem].value : i[reportItem].value; + const val = i[reportItem]?.value !== undefined ? i[reportItem].value : i[reportItem]; return createReportDatum(val, i, idKey, reportItem, undefined); } } @@ -361,7 +361,7 @@ export function isInt(n) { return result && n >= 0; } -// Returns true if non negative float +// Returns true if non-negative float export function isFloat(n) { const result = Number(n) === n && n % 1 !== 0; return result && n >= 0; diff --git a/src/routes/components/dropdownWrapper/dropdownWrapper.test.tsx b/src/routes/components/dropdownWrapper/dropdownWrapper.test.tsx index 2f2338893..53f6e5acd 100644 --- a/src/routes/components/dropdownWrapper/dropdownWrapper.test.tsx +++ b/src/routes/components/dropdownWrapper/dropdownWrapper.test.tsx @@ -1,4 +1,4 @@ -import { act, render, screen } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -16,9 +16,9 @@ test('primary selector', async () => { expect(screen.queryAllByText('CPU').length).toBe(0); expect(screen.queryAllByText('Memory').length).toBe(0); const button = screen.getByRole('button'); - await act(async () => user.click(button)); + await user.click(button); const menuItems = screen.getAllByRole('menuitem'); expect(menuItems.length).toBe(3); - await act(async () => user.click(menuItems[1])); + await user.click(menuItems[1]); expect(handleOnClick.mock.calls).toEqual([['memory']]); }); diff --git a/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx b/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx index 96dc48078..034ed0b18 100644 --- a/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx +++ b/src/routes/components/selectWrapper/selectCheckboxWrapper.test.tsx @@ -1,4 +1,4 @@ -import { act, render, screen } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -24,11 +24,11 @@ test('checkbox selector', async () => { expect(screen.queryAllByText('CPU').length).toBe(0); expect(screen.queryAllByText('Memory').length).toBe(0); expect(screen.queryAllByText('Storage').length).toBe(0); - await act(async () => user.click(screen.getByRole('button'))); + await user.click(screen.getByRole('button')); expect(screen.queryAllByText('CPU').length).toBe(1); expect(screen.queryAllByText('Memory').length).toBe(1); expect(screen.queryAllByText('Storage').length).toBe(1); expect(handleOnSelect.mock.calls.length).toBe(0); - await act(async () => user.click(screen.getAllByRole('checkbox')[0])); + await user.click(screen.getAllByRole('checkbox')[0]); expect(handleOnSelect.mock.calls).toEqual([['cpu']]); }); diff --git a/src/routes/components/selectWrapper/selectWrapper.test.tsx b/src/routes/components/selectWrapper/selectWrapper.test.tsx index ff53f7f93..afe4dd9ed 100644 --- a/src/routes/components/selectWrapper/selectWrapper.test.tsx +++ b/src/routes/components/selectWrapper/selectWrapper.test.tsx @@ -1,4 +1,4 @@ -import { act, render, screen } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -23,9 +23,9 @@ test('primary selector', async () => { expect(screen.queryAllByText('CPU').length).toBe(1); expect(screen.queryAllByText('Memory').length).toBe(0); const button = screen.getByRole('button'); - await act(async () => user.click(button)); + await user.click(button); const options = screen.getAllByRole('option'); expect(options.length).toBe(3); - await act(async () => user.click(options[1])); + await user.click(options[1]); expect(handleOnSelect.mock.calls).toEqual([['memory']]); }); diff --git a/src/routes/details/components/historicalData/historicalDataBase.tsx b/src/routes/details/components/historicalData/historicalDataBase.tsx index 041de3ae5..349ede9de 100644 --- a/src/routes/details/components/historicalData/historicalDataBase.tsx +++ b/src/routes/details/components/historicalData/historicalDataBase.tsx @@ -177,36 +177,36 @@ class HistoricalDatasBase extends React.Component { }; // Returns rendered widget based on type - private renderWidget(widget: HistoricalDataWidget) { - const { isOcpCloudNetworkingToggleEnabled, isOcpProjectStorageToggleEnabled } = this.props; + private renderWidget(widgetId: number) { + const { isOcpCloudNetworkingToggleEnabled, isOcpProjectStorageToggleEnabled, selectWidgets } = this.props; + + const widget = selectWidgets[widgetId]; + let result = null; switch (widget.type) { case HistoricalDataWidgetType.cost: - return this.getCostChart(widget); + result = this.getCostChart(widget); + break; case HistoricalDataWidgetType.network: - return isOcpCloudNetworkingToggleEnabled ? this.getNetworkChart(widget) : null; + result = isOcpCloudNetworkingToggleEnabled ? this.getNetworkChart(widget) : null; + break; case HistoricalDataWidgetType.trend: - return this.getTrendChart(widget); + result = this.getTrendChart(widget); + break; case HistoricalDataWidgetType.usage: - return this.getUsageChart(widget); + result = this.getUsageChart(widget); + break; case HistoricalDataWidgetType.volume: - return isOcpProjectStorageToggleEnabled ? this.getVolumeChart(widget) : null; - default: - return null; + result = isOcpProjectStorageToggleEnabled ? this.getVolumeChart(widget) : null; + break; } + return result !== null ? {result} : null; } public render() { - const { selectWidgets, widgets } = this.props; + const { widgets } = this.props; - return ( - - {widgets.map(widgetId => { - const widget = selectWidgets[widgetId]; - return {this.renderWidget(widget)}; - })} - - ); + return {widgets.map(widgetId => this.renderWidget(widgetId))}; } } diff --git a/src/routes/details/ocpDetails/detailsTable.tsx b/src/routes/details/ocpDetails/detailsTable.tsx index 253fef687..875e6d0d5 100644 --- a/src/routes/details/ocpDetails/detailsTable.tsx +++ b/src/routes/details/ocpDetails/detailsTable.tsx @@ -20,7 +20,13 @@ import { getUnsortedComputedReportItems } from 'routes/utils/computedReport/getC import { getBreakdownPath } from 'routes/utils/paths'; import { getForDateRangeString, getNoDataForDateRangeString } from 'utils/dates'; import { formatCurrency, formatPercentage } from 'utils/format'; -import { classificationDefault, classificationPlatform, classificationUnallocated, noPrefix } from 'utils/props'; +import { + classificationDefault, + classificationPlatform, + classificationUnallocated, + classificationUnattributed, + noPrefix, +} from 'utils/props'; import type { RouterComponentProps } from 'utils/router'; import { withRouter } from 'utils/router'; @@ -210,16 +216,21 @@ class DetailsTableBase extends React.Component 0) || (item.cost.workerUnallocatedDistributed && item.cost.workerUnallocatedDistributed.value > 0)); const desc = item.id && item.id !== item.label ?
{item.id}
: null; const isDisabled = - label === `${noPrefix}${groupBy}` || label === `${noPrefix}${groupByTagKey}` || isUnallocatedCosts; + label === `${noPrefix}${groupBy}` || + label === `${noPrefix}${groupByTagKey}` || + isUnallocatedProject || + isUnattributedCosts; const actions = this.getActions(item, isDisabled); const name = isDisabled ? ( @@ -230,7 +241,7 @@ class DetailsTableBase extends React.Component - {intl.formatMessage(messages.default)} + value: isDefaultProject ? ( + + ) : isOverheadCosts ? ( + + - ) : isOverheadCosts ? ( - - - - ) : ( - - ), + + ) : ( + + ), }, { hidden: !(isGroupByProject && isRosToggleEnabled), - value: !isPlatformCosts && !isDisabled && ( + value: !isPlatformProject && !isDisabled && ( { let options = null; render(); - await act(async () => user.type(screen.getByLabelText('Description'), 'regular rate test')); + await user.type(screen.getByLabelText('Description'), 'regular rate test'); // select first option for metric - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); // select first option for measurement - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[3])); // Previous select options are not being removed from page + await user.click(options[3]); // Previous select options are not being removed from page // make sure the default cost type is selected expect(screen.getByLabelText(qr.infraradio)).toHaveProperty('checked', true); // selecting a different measurement does not reset cost type to default - await act(async () => user.click(screen.getByLabelText(qr.supplradio))); + await user.click(screen.getByLabelText(qr.supplradio)); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); expect(screen.getByLabelText(qr.supplradio)).toHaveProperty('checked', true); // selecting metric will reset both measurement and cost type - await act(async () => user.click(screen.getByLabelText(qr.infraradio))); + await user.click(screen.getByLabelText(qr.infraradio)); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[3])); // Previous select options are not being removed from page + await user.click(options[3]); // Previous select options are not being removed from page expect(screen.getByLabelText(qr.supplradio)).toHaveProperty('checked', true); - await act(async () => user.click(screen.getByLabelText(qr.infraradio))); + await user.click(screen.getByLabelText(qr.infraradio)); const rateInput = screen.getByLabelText('Assign rate'); // setting rate to anything but a number expect(screen.queryByText(regExp(messages.priceListNumberRate))).toBeNull(); - await act(async () => user.type(rateInput, 'A')); + await user.type(rateInput, 'A'); expect(screen.getByText(regExp(messages.priceListNumberRate))).not.toBeNull(); // setting rate to a negative number - validation is done on blur - await act(async () => user.clear(rateInput)); - await act(async () => user.type(rateInput, '-12')); + await user.clear(rateInput); + await user.type(rateInput, '-12'); expect(screen.getByText(regExp(messages.priceListPosNumberRate))).not.toBeNull(); // setting rate to a valid number - await act(async () => user.clear(rateInput)); - await act(async () => user.type(rateInput, '0.2')); + await user.clear(rateInput); + await user.type(rateInput, '0.2'); expect(screen.queryByText(regExp(messages.priceListNumberRate))).toBeNull(); // making sure button is enabled const createButton = screen.getByText(regExp(messages.createRate)); expect(createButton.getAttribute('aria-disabled')).toBe('false'); - await act(async () => user.click(createButton)); + await user.click(createButton); expect(submit).toHaveBeenCalled(); }, 10000); @@ -196,68 +196,68 @@ describe('add-a-new-rate', () => { render(); - await act(async () => user.type(screen.getByLabelText('Description'), 'tag rate test')); + await user.type(screen.getByLabelText('Description'), 'tag rate test'); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[3])); // Previous select options are not being removed from page + await user.click(options[3]); // Previous select options are not being removed from page - await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)))); + await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))); // tag key is required validation const tagKeyInput = screen.getByPlaceholderText(qr.tagKeyPlaceHolder); - await act(async () => user.type(tagKeyInput, 'test')); + await user.type(tagKeyInput, 'test'); expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull(); - await act(async () => user.clear(tagKeyInput)); + await user.clear(tagKeyInput); expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull(); - await act(async () => user.type(tagKeyInput, 'openshift')); + await user.type(tagKeyInput, 'openshift'); expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull(); // tag value is required validation const tagValueInput = screen.getByPlaceholderText('Enter a tag value'); - await act(async () => user.type(tagValueInput, 'test')); + await user.type(tagValueInput, 'test'); expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull(); - await act(async () => user.clear(tagValueInput)); + await user.clear(tagValueInput); expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull(); - await act(async () => user.type(tagValueInput, 'openshift')); + await user.type(tagValueInput, 'openshift'); expect(screen.queryByText(regExp(messages.costModelsRequiredField))).toBeNull(); // rate must be a number const tagRateInput = screen.getByLabelText('Assign rate'); - await act(async () => user.type(tagRateInput, 'test')); + await user.type(tagRateInput, 'test'); expect(screen.getByText(regExp(messages.priceListNumberRate))).not.toBeNull(); // rate is required - await act(async () => user.clear(tagRateInput)); + await user.clear(tagRateInput); expect(screen.getByText(regExp(messages.costModelsRequiredField))).not.toBeNull(); // rate must be positive - await act(async () => user.type(tagRateInput, '-0.23')); + await user.type(tagRateInput, '-0.23'); expect(screen.getByText(regExp(messages.priceListPosNumberRate))).not.toBeNull(); // setting a valid rate - now form is valid and can be submitted const createButton = screen.getByText(regExp(messages.createRate)); expect(createButton.getAttribute('aria-disabled')).toBe('true'); - await act(async () => user.clear(tagRateInput)); + await user.clear(tagRateInput); - await act(async () => user.type(tagRateInput, '0.23')); - await act(async () => user.type(screen.getByPlaceholderText('Enter a tag description'), 'default worker')); + await user.type(tagRateInput, '0.23'); + await user.type(screen.getByPlaceholderText('Enter a tag description'), 'default worker'); expect(createButton.getAttribute('aria-disabled')).toBe('false'); // set tag to default - await act(async () => user.click(screen.getByLabelText('Default'))); + await user.click(screen.getByLabelText('Default')); // add a new rate disables the submit button - await act(async () => user.click(screen.getByText(/add more tag values/i))); + await user.click(screen.getByText(/add more tag values/i)); expect(createButton.getAttribute('aria-disabled')).toBe('true'); - await act(async () => user.click(screen.getAllByRole('button', { name: /remove tag value/i })[1])); + await user.click(screen.getAllByRole('button', { name: /remove tag value/i })[1]); expect(createButton.getAttribute('aria-disabled')).toBe('false'); - await act(async () => user.click(createButton)); + await user.click(createButton); expect(submit).toHaveBeenCalled(); }, 15000); @@ -269,37 +269,37 @@ describe('add-a-new-rate', () => { render(); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[3])); // Previous select options are not being removed from page + await user.click(options[3]); // Previous select options are not being removed from page - await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)))); + await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))); // tag key is duplicated const tagKeyInput = screen.getByPlaceholderText(qr.tagKeyPlaceHolder); - await act(async () => user.type(tagKeyInput, 'app')); + await user.type(tagKeyInput, 'app'); expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull(); - await act(async () => user.type(tagKeyInput, '1')); + await user.type(tagKeyInput, '1'); expect(screen.queryByText(regExp(messages.priceListDuplicate))).toBeNull(); // change measurement will set tag key as not duplicate - await act(async () => user.type(tagKeyInput, '{backspace}')); + await user.type(tagKeyInput, '{backspace}'); expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); expect(screen.queryByText(regExp(messages.priceListDuplicate))).toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[3])); + await user.click(options[3]); expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull(); }); @@ -312,13 +312,13 @@ describe('add-a-new-rate', () => { await render(); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[2])); + await user.click(options[2]); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); expect(screen.queryAllByLabelText(regExp(messages.costModelsEnterTagRate))).toHaveLength(0); }); }); diff --git a/src/routes/settings/costModels/components/rateForm/utils.tsx b/src/routes/settings/costModels/components/rateForm/utils.tsx index 1952cb985..afb043bd2 100644 --- a/src/routes/settings/costModels/components/rateForm/utils.tsx +++ b/src/routes/settings/costModels/components/rateForm/utils.tsx @@ -173,9 +173,9 @@ export const mergeToRequest = ( description: costModel.description, distribution_info: { distribution_type: costModel.distribution_info ? costModel.distribution_info.distribution_type : undefined, - network_cost: costModel.distribution_info ? costModel.distribution_info.network_cost : undefined, + network_unattributed: costModel.distribution_info ? costModel.distribution_info.network_unattributed : undefined, platform_cost: costModel.distribution_info ? costModel.distribution_info.platform_cost : undefined, - storage_cost: costModel.distribution_info ? costModel.distribution_info.storage_cost : undefined, + storage_unattributed: costModel.distribution_info ? costModel.distribution_info.storage_unattributed : undefined, worker_cost: costModel.distribution_info ? costModel.distribution_info.worker_cost : undefined, }, source_uuids: costModel.sources.map(src => src.uuid), diff --git a/src/routes/settings/costModels/costModel/distribution.tsx b/src/routes/settings/costModels/costModel/distribution.tsx index 9f73b4a9b..4728cddc7 100644 --- a/src/routes/settings/costModels/costModel/distribution.tsx +++ b/src/routes/settings/costModels/costModel/distribution.tsx @@ -65,21 +65,19 @@ const DistributionCardBase: React.FC = ({ })}
- {intl.formatMessage(messages.distributeUnallocatedCapacity, { + {intl.formatMessage(messages.distributePlatformCosts, { value: current.distribution_info.platform_cost, - type: 'platform', })}
{intl.formatMessage(messages.distributeUnallocatedCapacity, { value: current.distribution_info.worker_cost, - type: 'worker', })}
{isOcpCloudNetworkingToggleEnabled && (
{intl.formatMessage(messages.distributeCosts, { - value: current.distribution_info.network_cost || false, + value: current.distribution_info.network_unattributed || false, type: 'network', })}
@@ -87,7 +85,7 @@ const DistributionCardBase: React.FC = ({ {isOcpProjectStorageToggleEnabled && (
{intl.formatMessage(messages.distributeCosts, { - value: current.distribution_info.storage_cost || false, + value: current.distribution_info.storage_unattributed || false, type: 'storage', })}
diff --git a/src/routes/settings/costModels/costModel/updateDistributionDialog.tsx b/src/routes/settings/costModels/costModel/updateDistributionDialog.tsx index 1ef01e463..505b0eb0e 100644 --- a/src/routes/settings/costModels/costModel/updateDistributionDialog.tsx +++ b/src/routes/settings/costModels/costModel/updateDistributionDialog.tsx @@ -61,9 +61,9 @@ class UpdateDistributionDialogBase extends React.Component< super(props); this.state = { distribution: this.props.current.distribution_info.distribution_type, - distributeNetwork: this.props.current.distribution_info.network_cost === true, + distributeNetwork: this.props.current.distribution_info.network_unattributed === true, distributePlatformUnallocated: this.props.current.distribution_info.platform_cost === true, - distributeStorage: this.props.current.distribution_info.storage_cost === true, + distributeStorage: this.props.current.distribution_info.storage_unattributed === true, distributeWorkerUnallocated: this.props.current.distribution_info.worker_cost === true, }; } @@ -127,9 +127,9 @@ class UpdateDistributionDialogBase extends React.Component< source_type: 'OCP', distribution_info: { distribution_type: this.state.distribution, - network_cost: this.state.distributeNetwork, + network_unattributed: this.state.distributeNetwork, platform_cost: this.state.distributePlatformUnallocated, - storage_cost: this.state.distributeStorage, + storage_unattributed: this.state.distributeStorage, worker_cost: this.state.distributeWorkerUnallocated, }, }; diff --git a/src/routes/settings/costModels/costModel/updateRateModel.test.tsx b/src/routes/settings/costModels/costModel/updateRateModel.test.tsx index 060c62196..7c02b26f6 100644 --- a/src/routes/settings/costModels/costModel/updateRateModel.test.tsx +++ b/src/routes/settings/costModels/costModel/updateRateModel.test.tsx @@ -259,10 +259,10 @@ describe('update-rate', () => { test('submit regular', async () => { const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime }); render(); - await act(async () => user.type(screen.getByDisplayValue(/openshift-aws-node/i), 'a new description')); + await user.type(screen.getByDisplayValue(/openshift-aws-node/i), 'a new description'); // eslint-disable-next-line testing-library/prefer-presence-queries expect(screen.getByText(regExp(messages.save)).getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getByText(regExp(messages.save)))); + await user.click(screen.getByText(regExp(messages.save))); }); test('Description', async () => { @@ -274,12 +274,12 @@ describe('update-rate', () => { const saveButton = screen.getByText(regExp(messages.save)); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.clear(descInput)); - await act(async () => user.type(descInput, 'a new description')); + await user.clear(descInput); + await user.type(descInput, 'a new description'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.clear(descInput)); - await act(async () => user.type(descInput, 'openshift-aws-node')); + await user.clear(descInput); + await user.type(descInput, 'openshift-aws-node'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); }); @@ -291,35 +291,35 @@ describe('update-rate', () => { const saveButton = screen.getByText(regExp(messages.save)); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[5])); // Previous select options are not being removed from page + await user.click(options[5]); // Previous select options are not being removed from page expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getByLabelText('Select Metric'))); + await user.click(screen.getByLabelText('Select Metric')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[0])); + await user.click(options[0]); expect(saveButton.getAttribute('disabled')).not.toBeNull(); }, 10000); @@ -329,23 +329,23 @@ describe('update-rate', () => { render(); const saveButton = screen.getByText(regExp(messages.save)); - await act(async () => user.click(screen.getByLabelText(/infrastructure/i))); + await user.click(screen.getByLabelText(/infrastructure/i)); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getByLabelText(/supplementary/i))); + await user.click(screen.getByLabelText(/supplementary/i)); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/55/i), '.3')); + await user.type(screen.getByDisplayValue(/55/i), '.3'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/55.3/i), '{backspace}{backspace}')); + await user.type(screen.getByDisplayValue(/55.3/i), '{backspace}{backspace}'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)))); + await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByLabelText(regExp(messages.costModelsFilterTagKey)), 'openshift')); - await act(async () => user.type(screen.getByLabelText(regExp(messages.costModelsTagRateTableValue)), 'worker')); - await act(async () => user.type(screen.getByLabelText(regExp(messages.rate)), '0.321')); + await user.type(screen.getByLabelText(regExp(messages.costModelsFilterTagKey)), 'openshift'); + await user.type(screen.getByLabelText(regExp(messages.costModelsTagRateTableValue)), 'worker'); + await user.type(screen.getByLabelText(regExp(messages.rate)), '0.321'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(saveButton)); + await user.click(saveButton); }); test('tag', async () => { @@ -353,38 +353,38 @@ describe('update-rate', () => { render(); const saveButton = screen.getByText(regExp(messages.save)); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/^container$/i), '1')); + await user.type(screen.getByDisplayValue(/^container$/i), '1'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/^container1$/i), '{backspace}')); + await user.type(screen.getByDisplayValue(/^container1$/i), '{backspace}'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/any container$/i), '1')); + await user.type(screen.getByDisplayValue(/any container$/i), '1'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/any container1$/i), '{backspace}')); + await user.type(screen.getByDisplayValue(/any container1$/i), '{backspace}'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/^0.4$/i), '3')); + await user.type(screen.getByDisplayValue(/^0.4$/i), '3'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/^0.43$/i), '{backspace}')); + await user.type(screen.getByDisplayValue(/^0.43$/i), '{backspace}'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.click(screen.getAllByLabelText(regExp(messages.default))[1])); + await user.click(screen.getAllByLabelText(regExp(messages.default))[1]); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getAllByLabelText(regExp(messages.default))[0])); + await user.click(screen.getAllByLabelText(regExp(messages.default))[0]); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.click(screen.getByText(/Add more tag values/i))); + await user.click(screen.getByText(/Add more tag values/i)); await act(async () => user.type(screen.getAllByLabelText(regExp(messages.costModelsTagRateTableValue))[4], 'something random') ); - await act(async () => user.type(screen.getAllByLabelText(regExp(messages.rate))[4], '1.01')); + await user.type(screen.getAllByLabelText(regExp(messages.rate))[4], '1.01'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.click(screen.getAllByLabelText(regExp(messages.costModelsRemoveTagLabel))[4])); + await user.click(screen.getAllByLabelText(regExp(messages.costModelsRemoveTagLabel))[4]); expect(saveButton.getAttribute('disabled')).not.toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/openshift-region-1/i), '2')); + await user.type(screen.getByDisplayValue(/openshift-region-1/i), '2'); expect(saveButton.getAttribute('disabled')).toBeNull(); - await act(async () => user.type(screen.getByDisplayValue(/openshift-region-12/i), '{backspace}')); + await user.type(screen.getByDisplayValue(/openshift-region-12/i), '{backspace}'); expect(saveButton.getAttribute('disabled')).not.toBeNull(); }); @@ -393,11 +393,11 @@ describe('update-rate', () => { let options = null; render(); - await act(async () => user.click(screen.getByLabelText('Select Measurement'))); + await user.click(screen.getByLabelText('Select Measurement')); options = await screen.findAllByRole('option'); - await act(async () => user.click(options[1])); + await user.click(options[1]); - await act(async () => user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate)))); + await user.click(screen.getByLabelText(regExp(messages.costModelsEnterTagRate))); await act(async () => user.type(screen.getByLabelText(regExp(messages.costModelsFilterTagKey)), 'openshift-region-1') ); @@ -408,8 +408,8 @@ describe('update-rate', () => { const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime }); render(); const filterTagInput = screen.getByLabelText(regExp(messages.costModelsFilterTagKey)); - await act(async () => user.clear(filterTagInput)); - await act(async () => user.type(filterTagInput, 'openshift-region-1')); + await user.clear(filterTagInput); + await user.type(filterTagInput, 'openshift-region-1'); expect(screen.getByText(regExp(messages.priceListDuplicate))).not.toBeNull(); }); }); diff --git a/src/routes/settings/costModels/costModelWizard/costModelWizard.tsx b/src/routes/settings/costModels/costModelWizard/costModelWizard.tsx index d5dfea849..21db7d921 100644 --- a/src/routes/settings/costModels/costModelWizard/costModelWizard.tsx +++ b/src/routes/settings/costModels/costModelWizard/costModelWizard.tsx @@ -127,9 +127,9 @@ const InternalWizardBase: React.FC = ({ description, distribution_info: { distribution_type: distribution, - network_cost: distributeNetwork, + network_unattributed: distributeNetwork, platform_cost: distributePlatformUnallocated, - storage_cost: distributeStorage, + storage_unattributed: distributeStorage, worker_cost: distributeWorkerUnallocated, }, rates: tiers, diff --git a/src/routes/settings/costModels/costModelWizard/review.tsx b/src/routes/settings/costModels/costModelWizard/review.tsx index bccbc52ac..d5707b0e2 100644 --- a/src/routes/settings/costModels/costModelWizard/review.tsx +++ b/src/routes/settings/costModels/costModelWizard/review.tsx @@ -163,15 +163,13 @@ const ReviewDetailsBase: React.FC = ({ {intl.formatMessage(messages.distributionTypeDesc, { type: distribution })} - {intl.formatMessage(messages.distributeUnallocatedCapacity, { + {intl.formatMessage(messages.distributePlatformCosts, { value: distributePlatformUnallocated, - type: 'platform', })} {intl.formatMessage(messages.distributeUnallocatedCapacity, { value: distributeWorkerUnallocated, - type: 'worker', })} {isOcpCloudNetworkingToggleEnabled && ( diff --git a/src/routes/utils/computedReport/getComputedReportItems.ts b/src/routes/utils/computedReport/getComputedReportItems.ts index 80223c67d..0780e8d0d 100644 --- a/src/routes/utils/computedReport/getComputedReportItems.ts +++ b/src/routes/utils/computedReport/getComputedReportItems.ts @@ -21,6 +21,8 @@ export interface ComputedReportItemValue { } export interface ComputedReportOcpItem extends ReportItem { + data_transfer_in?: ReportValue; + data_transfer_out?: ReportValue; capacity?: ReportValue; cluster?: string; clusters?: string[]; diff --git a/src/routes/utils/paths.ts b/src/routes/utils/paths.ts index 53f4c9bd5..e6b44141c 100644 --- a/src/routes/utils/paths.ts +++ b/src/routes/utils/paths.ts @@ -6,7 +6,7 @@ export const getBreakdownPath = ({ description, groupBy, id, - isPlatformCosts, + isPlatformProject, isOptimizationsPath, isOptimizationsTab, title, @@ -15,7 +15,7 @@ export const getBreakdownPath = ({ description?: string; // Used to display a description in the breakdown header groupBy: string | number; id: string | number; // group_by[account]= param in the breakdown page - isPlatformCosts?: boolean; + isPlatformProject?: boolean; isOptimizationsPath?: boolean; isOptimizationsTab?: boolean; title: string | number; // Used to display a title in the breakdown header @@ -27,11 +27,11 @@ export const getBreakdownPath = ({ optimizationsTab: isOptimizationsTab ? true : undefined, // Clear query params ...(groupBy && { group_by: { - [groupBy]: isPlatformCosts ? '*' : id, // Use ID here -- see https://github.com/project-koku/koku-ui/pull/2821 + [groupBy]: isPlatformProject ? '*' : id, // Use ID here -- see https://github.com/project-koku/koku-ui/pull/2821 }, }), id, - isPlatformCosts: isPlatformCosts ? true : undefined, + isPlatformCosts: isPlatformProject ? true : undefined, }; return `${basePath}?${getQueryRoute(newQuery)}`; }; diff --git a/src/utils/props.ts b/src/utils/props.ts index 0c42cd91a..e382f177d 100644 --- a/src/utils/props.ts +++ b/src/utils/props.ts @@ -18,4 +18,6 @@ export const tagKey = 'tag'; // Tag key for group_by export const classificationDefault = 'default'; // Classification default costs export const classificationPlatform = 'category_Platform'; // Classification platform costs +export const classificationProject = 'project'; // Classification for project costs export const classificationUnallocated = 'unallocated'; // Classification for unallocated platform and worker costs +export const classificationUnattributed = 'unattributed'; // Classification for unattributed network and storage costs