diff --git a/apps/console/src/pages/organizations/frameworks/controls/Control.tsx b/apps/console/src/pages/organizations/frameworks/controls/Control.tsx index 15bff39f0..26f09ff34 100644 --- a/apps/console/src/pages/organizations/frameworks/controls/Control.tsx +++ b/apps/console/src/pages/organizations/frameworks/controls/Control.tsx @@ -65,7 +65,6 @@ const linkedMesuresQuery = graphql` name description category - importance state } } @@ -88,7 +87,6 @@ const organizationMesuresQuery = graphql` name description category - importance state } } @@ -721,24 +719,6 @@ export function Control({ setIsPolicyMappingDialogOpen(true); }, [loadPoliciesData]); - // UI helper functions - const formatImportance = (importance: string | undefined): string => { - if (!importance) return "Unknown"; - - switch (importance) { - case "LOW": - return "Low"; - case "MEDIUM": - return "Medium"; - case "HIGH": - return "High"; - case "CRITICAL": - return "Critical"; - default: - return importance; - } - }; - const formatState = (state: string | undefined): string => { if (!state) return "Unknown"; @@ -756,23 +736,6 @@ export function Control({ } }; - const getImportanceColor = (importance: string | undefined): string => { - if (!importance) return "bg-secondary-bg text-secondary"; - - switch (importance) { - case "LOW": - return "bg-success-bg text-success"; - case "MEDIUM": - return "bg-info-bg text-info"; - case "HIGH": - return "bg-warning-bg text-warning"; - case "CRITICAL": - return "bg-danger-bg text-danger"; - default: - return "bg-secondary-bg text-secondary"; - } - }; - const getStateColor = (state: string | undefined): string => { if (!state) return "bg-secondary-bg text-secondary"; @@ -871,9 +834,6 @@ export function Control({ Name - - Importance - State Actions @@ -898,15 +858,6 @@ export function Control({ )} - -
- {formatImportance(mesure.importance)} -
-
Name - Importance State Actions @@ -1021,15 +971,6 @@ export function Control({
)} - -
- {formatImportance(mesure.importance)} -
-
> + * @generated SignedSource<<94f5c5a041ae3730b8f4a71ad63530a8>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,6 @@ // @ts-nocheck import { ConcreteRequest } from 'relay-runtime'; -export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED"; export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED"; export type ControlLinkedMesuresQuery$variables = { controlId: string; @@ -23,7 +22,6 @@ export type ControlLinkedMesuresQuery$data = { readonly category: string; readonly description: string; readonly id: string; - readonly importance: MesureImportance; readonly name: string; readonly state: MesureState; }; @@ -104,13 +102,6 @@ v4 = [ "name": "category", "storageKey": null }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "importance", - "storageKey": null - }, { "alias": null, "args": null, @@ -253,7 +244,7 @@ return { ] }, "params": { - "cacheID": "19d9240a60b26d765a93e00be9e1e83f", + "cacheID": "b29cb1662103fc42abf16fa6b3458a68", "id": null, "metadata": { "connection": [ @@ -270,11 +261,11 @@ return { }, "name": "ControlLinkedMesuresQuery", "operationKind": "query", - "text": "query ControlLinkedMesuresQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n importance\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n" + "text": "query ControlLinkedMesuresQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n" } }; })(); -(node as any).hash = "acb01a862fb268c4b4b557edc3090a0e"; +(node as any).hash = "e42a48d7b21eaa5c42331377b6a9bc9c"; export default node; diff --git a/apps/console/src/pages/organizations/frameworks/controls/__generated__/ControlOrganizationMesuresQuery.graphql.ts b/apps/console/src/pages/organizations/frameworks/controls/__generated__/ControlOrganizationMesuresQuery.graphql.ts index 9b3d0ace2..0932b719c 100644 --- a/apps/console/src/pages/organizations/frameworks/controls/__generated__/ControlOrganizationMesuresQuery.graphql.ts +++ b/apps/console/src/pages/organizations/frameworks/controls/__generated__/ControlOrganizationMesuresQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<345a2b05f66a0bb630eea3c12f549e52>> + * @generated SignedSource<<862b2210a9d569a05063cebc805bdd01>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,6 @@ // @ts-nocheck import { ConcreteRequest } from 'relay-runtime'; -export type MesureImportance = "ADVANCED" | "MANDATORY" | "PREFERRED"; export type MesureState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED"; export type ControlOrganizationMesuresQuery$variables = { organizationId: string; @@ -23,7 +22,6 @@ export type ControlOrganizationMesuresQuery$data = { readonly category: string; readonly description: string; readonly id: string; - readonly importance: MesureImportance; readonly name: string; readonly state: MesureState; }; @@ -104,13 +102,6 @@ v4 = [ "name": "category", "storageKey": null }, - { - "alias": null, - "args": null, - "kind": "ScalarField", - "name": "importance", - "storageKey": null - }, { "alias": null, "args": null, @@ -253,7 +244,7 @@ return { ] }, "params": { - "cacheID": "59ceb60db60754876774a3856686b35c", + "cacheID": "bb1066800bfa28aaa64a2fd1f12c5924", "id": null, "metadata": { "connection": [ @@ -270,11 +261,11 @@ return { }, "name": "ControlOrganizationMesuresQuery", "operationKind": "query", - "text": "query ControlOrganizationMesuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n importance\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n" + "text": "query ControlOrganizationMesuresQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n mesures(first: 100) {\n edges {\n node {\n id\n name\n description\n category\n state\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n" } }; })(); -(node as any).hash = "cc43b07a1a1f5831f5d09fbd13d8805d"; +(node as any).hash = "5f1d6b11af3d92bec1c4d37ceb12b7c3"; export default node; diff --git a/apps/console/src/pages/organizations/mesures/EditMesureView.tsx b/apps/console/src/pages/organizations/mesures/EditMesureView.tsx index 0d5f28ade..9cc95aaf8 100644 --- a/apps/console/src/pages/organizations/mesures/EditMesureView.tsx +++ b/apps/console/src/pages/organizations/mesures/EditMesureView.tsx @@ -26,7 +26,6 @@ const editMesureQuery = graphql` name description category - importance } } } @@ -59,8 +58,7 @@ function EditMesureViewContent({ const [formData, setFormData] = useState({ name: mesure.name ?? "", description: mesure.description ?? "", - category: mesure.category ?? "", - importance: mesure.importance, + category: mesure.category ?? "" }); const [commit, isInFlight] = @@ -91,8 +89,7 @@ function EditMesureViewContent({ id: mesureId!, name: formData.name, description: formData.description, - category: formData.category, - importance: formData.importance, + category: formData.category }, }, onCompleted(data, errors) { @@ -152,52 +149,6 @@ function EditMesureViewContent({ required /> -
-
-
- -
-
- - - -
-
-
-
} > diff --git a/apps/console/src/pages/organizations/mesures/NewMesureView.tsx b/apps/console/src/pages/organizations/mesures/NewMesureView.tsx index bf3567792..1d7148566 100644 --- a/apps/console/src/pages/organizations/mesures/NewMesureView.tsx +++ b/apps/console/src/pages/organizations/mesures/NewMesureView.tsx @@ -36,8 +36,7 @@ export default function NewMesureView() { const [formData, setFormData] = useState({ name: "", description: "", - category: "", - importance: "MADATORY" as "MANDATORY" | "PREFERRED" | "ADVANCED", + category: "" }); const [commit, isInFlight] = @@ -73,8 +72,7 @@ export default function NewMesureView() { organizationId: organizationId!, name: formData.name, description: formData.description, - category: formData.category, - importance: formData.importance, + category: formData.category }, connections: [connectionId], }, @@ -137,52 +135,6 @@ export default function NewMesureView() { required /> -
-
-
- -
-
- - - -
-
-
-