0
apps/console/dist/.keep
vendored
0
apps/console/dist/.keep
vendored
@@ -69,7 +69,7 @@ const SidebarProvider = React.forwardRef<
|
||||
const [openMobile, setOpenMobile] = React.useState(false);
|
||||
|
||||
// This is the internal state of the sidebar.
|
||||
// We use openProp and setOpenProp for control from outside the component.
|
||||
// We use openProp and setOpenProp for mitigation from outside the component.
|
||||
const [_open, _setOpen] = React.useState(defaultOpen);
|
||||
const open = openProp ?? _open;
|
||||
const setOpen = React.useCallback(
|
||||
|
||||
@@ -14,7 +14,7 @@ import { Toaster } from "@/components/ui/toaster";
|
||||
import { graphql, useLazyLoadQuery } from "react-relay";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { OrganizationLayoutOrganizationQuery } from "./__generated__/OrganizationLayoutOrganizationQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbControlOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbControlOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbMitigationOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbMitigationOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbFrameworkOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbFrameworkOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbPeopleOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbPeopleOverviewQuery.graphql";
|
||||
import { OrganizationLayoutBreadcrumbPolicyOverviewQuery } from "./__generated__/OrganizationLayoutBreadcrumbPolicyOverviewQuery.graphql";
|
||||
@@ -270,23 +270,23 @@ function BreadcrumbPeopleOverview() {
|
||||
);
|
||||
}
|
||||
|
||||
function BreadcrumbControlOverview() {
|
||||
const { organizationId, frameworkId, controlId } = useParams();
|
||||
function BreadcrumbMitigationOverview() {
|
||||
const { organizationId, frameworkId, mitigationId } = useParams();
|
||||
const data =
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbControlOverviewQuery>(
|
||||
useLazyLoadQuery<OrganizationLayoutBreadcrumbMitigationOverviewQuery>(
|
||||
graphql`
|
||||
query OrganizationLayoutBreadcrumbControlOverviewQuery(
|
||||
$controlId: ID!
|
||||
query OrganizationLayoutBreadcrumbMitigationOverviewQuery(
|
||||
$mitigationId: ID!
|
||||
) {
|
||||
control: node(id: $controlId) {
|
||||
mitigation: node(id: $mitigationId) {
|
||||
id
|
||||
... on Control {
|
||||
... on Mitigation {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ controlId: controlId! }
|
||||
{ mitigationId: mitigationId! }
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -294,9 +294,9 @@ function BreadcrumbControlOverview() {
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadCrumbNavLink
|
||||
to={`/organizations/${organizationId}/frameworks/${frameworkId}/controls/${controlId}`}
|
||||
to={`/organizations/${organizationId}/frameworks/${frameworkId}/mitigations/${mitigationId}`}
|
||||
>
|
||||
{data.control?.name}
|
||||
{data.mitigation?.name}
|
||||
</BreadCrumbNavLink>
|
||||
</BreadcrumbItem>
|
||||
<Outlet />
|
||||
@@ -304,23 +304,23 @@ function BreadcrumbControlOverview() {
|
||||
);
|
||||
}
|
||||
|
||||
function BreadcrumbCreateControl() {
|
||||
function BreadcrumbCreateMitigation() {
|
||||
return (
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbPage>Create Control</BreadcrumbPage>
|
||||
<BreadcrumbPage>Create Mitigation</BreadcrumbPage>
|
||||
</BreadcrumbItem>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function BreadcrumbUpdateControl() {
|
||||
function BreadcrumbUpdateMitigation() {
|
||||
return (
|
||||
<>
|
||||
<BreadcrumbSeparator />
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbPage>Update Control</BreadcrumbPage>
|
||||
<BreadcrumbPage>Update Mitigation</BreadcrumbPage>
|
||||
</BreadcrumbItem>
|
||||
</>
|
||||
);
|
||||
@@ -423,20 +423,20 @@ export default function OrganizationLayout() {
|
||||
}
|
||||
>
|
||||
<Route
|
||||
path="controls/create"
|
||||
element={<BreadcrumbCreateControl />}
|
||||
path="mitigations/create"
|
||||
element={<BreadcrumbCreateMitigation />}
|
||||
/>
|
||||
<Route
|
||||
path="controls/:controlId"
|
||||
path="mitigations/:mitigationId"
|
||||
element={
|
||||
<Suspense>
|
||||
<BreadcrumbControlOverview />
|
||||
<BreadcrumbMitigationOverview />
|
||||
</Suspense>
|
||||
}
|
||||
>
|
||||
<Route
|
||||
path="update"
|
||||
element={<BreadcrumbUpdateControl />}
|
||||
element={<BreadcrumbUpdateMitigation />}
|
||||
/>
|
||||
</Route>
|
||||
<Route
|
||||
|
||||
@@ -9,9 +9,9 @@ import { CreatePeoplePage } from "./people/CreatePeoplePage";
|
||||
import { PeoplePage } from "./people/PeoplePage";
|
||||
import { CreateFrameworkPage } from "./frameworks/CreateFrameworkPage";
|
||||
import { UpdateFrameworkPage } from "./frameworks/UpdateFrameworkPage";
|
||||
import { CreateControlPage } from "./frameworks/controls/CreateControlPage";
|
||||
import { ControlPage } from "./frameworks/controls/ControlPage";
|
||||
import { UpdateControlPage } from "./frameworks/controls/UpdateControlPage";
|
||||
import { CreateMitigationPage } from "./frameworks/mitigations/CreateMitigationPage";
|
||||
import { MitigationPage } from "./frameworks/mitigations/MitigationPage";
|
||||
import { UpdateMitigationPage } from "./frameworks/mitigations/UpdateMitigationPage";
|
||||
import { VendorPage } from "./vendors/VendorPage";
|
||||
import { PolicyListPage } from "./policies/PolicyListPage";
|
||||
import { CreatePolicyPage } from "./policies/CreatePolicyPage";
|
||||
@@ -38,16 +38,16 @@ export function OrganizationsRoutes() {
|
||||
element={<UpdateFrameworkPage />}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/create"
|
||||
element={<CreateControlPage />}
|
||||
path="frameworks/:frameworkId/mitigations/create"
|
||||
element={<CreateMitigationPage />}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId"
|
||||
element={<ControlPage />}
|
||||
path="frameworks/:frameworkId/mitigations/:mitigationId"
|
||||
element={<MitigationPage />}
|
||||
/>
|
||||
<Route
|
||||
path="frameworks/:frameworkId/controls/:controlId/update"
|
||||
element={<UpdateControlPage />}
|
||||
path="frameworks/:frameworkId/mitigations/:mitigationId/update"
|
||||
element={<UpdateMitigationPage />}
|
||||
/>
|
||||
<Route path="vendors/:vendorId" element={<VendorPage />} />
|
||||
<Route path="policies" element={<PolicyListPage />} />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<ebdda8f7be44df65a5ba836693e48bea>>
|
||||
* @generated SignedSource<<e194a128ba01be3824345ec9386bc7e5>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery$variables = {
|
||||
controlId: string;
|
||||
export type OrganizationLayoutBreadcrumbMitigationOverviewQuery$variables = {
|
||||
mitigationId: string;
|
||||
};
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery$data = {
|
||||
readonly control: {
|
||||
export type OrganizationLayoutBreadcrumbMitigationOverviewQuery$data = {
|
||||
readonly mitigation: {
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
export type OrganizationLayoutBreadcrumbControlOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbControlOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbControlOverviewQuery$variables;
|
||||
export type OrganizationLayoutBreadcrumbMitigationOverviewQuery = {
|
||||
response: OrganizationLayoutBreadcrumbMitigationOverviewQuery$data;
|
||||
variables: OrganizationLayoutBreadcrumbMitigationOverviewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -28,14 +28,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "controlId"
|
||||
"name": "mitigationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "controlId"
|
||||
"variableName": "mitigationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -56,7 +56,7 @@ v3 = {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Control",
|
||||
"type": "Mitigation",
|
||||
"abstractKey": null
|
||||
};
|
||||
return {
|
||||
@@ -64,10 +64,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbMitigationOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
"alias": "mitigation",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -87,10 +87,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbMitigationOverviewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
"alias": "mitigation",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -112,16 +112,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "2fa16d62f29015853c425704e3de3fd4",
|
||||
"cacheID": "12d02036b7f66c280ddd621941750d00",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "OrganizationLayoutBreadcrumbControlOverviewQuery",
|
||||
"name": "OrganizationLayoutBreadcrumbMitigationOverviewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query OrganizationLayoutBreadcrumbControlOverviewQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n name\n }\n }\n}\n"
|
||||
"text": "query OrganizationLayoutBreadcrumbMitigationOverviewQuery(\n $mitigationId: ID!\n) {\n mitigation: node(id: $mitigationId) {\n __typename\n id\n ... on Mitigation {\n name\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "202e114f9b94e9c0bf805b0ae8f69fcd";
|
||||
(node as any).hash = "cd0a93d3c44467278a33729c4a46b0bf";
|
||||
|
||||
export default node;
|
||||
@@ -10,7 +10,7 @@ export function CreateFrameworkViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Framework"
|
||||
description="Create a new framework to organize your controls"
|
||||
description="Create a new framework to organize your mitigations"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-muted rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
|
||||
@@ -170,7 +170,7 @@ function CreateFrameworkViewContent() {
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Create Framework"
|
||||
description="Create a new framework to organize your controls"
|
||||
description="Create a new framework to organize your mitigations"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
|
||||
@@ -37,7 +37,7 @@ const FrameworkListViewQuery = graphql`
|
||||
id
|
||||
name
|
||||
description
|
||||
controls(first: 100) {
|
||||
mitigations(first: 100) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -66,7 +66,7 @@ const FrameworkListViewImportFrameworkMutation = graphql`
|
||||
id
|
||||
name
|
||||
description
|
||||
controls(first: 100) {
|
||||
mitigations(first: 100) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -240,10 +240,10 @@ function FrameworkListViewContent({
|
||||
<div className="space-y-6">
|
||||
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-2">
|
||||
{frameworks.map((framework) => {
|
||||
const validatedControls = framework.controls.edges.filter(
|
||||
const validatedControls = framework.mitigations.edges.filter(
|
||||
(edge) => edge?.node?.state === "IMPLEMENTED"
|
||||
).length;
|
||||
const totalControls = framework.controls.edges.length;
|
||||
const totalControls = framework.mitigations.edges.length;
|
||||
|
||||
return (
|
||||
<Link
|
||||
@@ -267,7 +267,7 @@ function FrameworkListViewContent({
|
||||
}
|
||||
progress={
|
||||
validatedControls === totalControls
|
||||
? "All controls validated"
|
||||
? "All mitigations validated"
|
||||
: `${validatedControls}/${totalControls} Controls validated`
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -29,7 +29,7 @@ const FrameworkViewQuery = graphql`
|
||||
... on Framework {
|
||||
name
|
||||
description
|
||||
controls(first: 100) @connection(key: "FrameworkView_controls") {
|
||||
mitigations(first: 100) @connection(key: "FrameworkView_mitigations") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -46,7 +46,7 @@ const FrameworkViewQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
interface Control {
|
||||
interface Mitigation {
|
||||
id?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
@@ -61,7 +61,7 @@ interface Category {
|
||||
name: string;
|
||||
description: string;
|
||||
progress: number;
|
||||
controls: Control[];
|
||||
mitigations: Mitigation[];
|
||||
doneCount: number;
|
||||
totalCount: number;
|
||||
}
|
||||
@@ -73,14 +73,15 @@ function FrameworkViewContent({
|
||||
}) {
|
||||
const data = usePreloadedQuery(FrameworkViewQuery, queryRef);
|
||||
const framework = data.node;
|
||||
const controls = framework.controls?.edges.map((edge) => edge?.node) ?? [];
|
||||
const mitigations =
|
||||
framework.mitigations?.edges.map((edge) => edge?.node) ?? [];
|
||||
const navigate = useNavigate();
|
||||
const { organizationId } = useParams();
|
||||
|
||||
// Monitor URL hash for changes and update state accordingly
|
||||
const [hashValue, setHashValue] = useState(window.location.hash);
|
||||
|
||||
// Get the active category from the hash (used when returning from a control)
|
||||
// Get the active category from the hash (used when returning from a mitigation)
|
||||
const hashCategory = hashValue.substring(1)
|
||||
? decodeURIComponent(hashValue.substring(1))
|
||||
: "";
|
||||
@@ -110,7 +111,7 @@ function FrameworkViewContent({
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Map control state to status for the new design
|
||||
// Map mitigation state to status for the new design
|
||||
const mapStateToStatus = (state?: string): string => {
|
||||
if (!state) return "incomplete";
|
||||
switch (state) {
|
||||
@@ -125,17 +126,17 @@ function FrameworkViewContent({
|
||||
}
|
||||
};
|
||||
|
||||
const processedControls = controls.map((control) => ({
|
||||
...control,
|
||||
status: mapStateToStatus(control.state),
|
||||
const processedControls = mitigations.map((mitigation) => ({
|
||||
...mitigation,
|
||||
status: mapStateToStatus(mitigation.state),
|
||||
}));
|
||||
|
||||
// Calculate global progress
|
||||
const implementedCount = processedControls.filter(
|
||||
(control) => control.status === "complete"
|
||||
(mitigation) => mitigation.status === "complete"
|
||||
).length;
|
||||
const notApplicableCount = processedControls.filter(
|
||||
(control) => control.status === "not-applicable"
|
||||
(mitigation) => mitigation.status === "not-applicable"
|
||||
).length;
|
||||
const totalControls = processedControls.length;
|
||||
|
||||
@@ -146,22 +147,22 @@ function FrameworkViewContent({
|
||||
: 0;
|
||||
|
||||
// Get global status counts
|
||||
const globalStatusCounts = processedControls.reduce((acc, control) => {
|
||||
if (control.status) {
|
||||
acc[control.status] = (acc[control.status] || 0) + 1;
|
||||
const globalStatusCounts = processedControls.reduce((acc, mitigation) => {
|
||||
if (mitigation.status) {
|
||||
acc[mitigation.status] = (acc[mitigation.status] || 0) + 1;
|
||||
}
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
|
||||
// Group controls by category
|
||||
const controlsByCategory = processedControls.reduce((acc, control) => {
|
||||
if (!control?.category) return acc;
|
||||
if (!acc[control.category]) {
|
||||
acc[control.category] = [];
|
||||
// Group mitigations by category
|
||||
const controlsByCategory = processedControls.reduce((acc, mitigation) => {
|
||||
if (!mitigation?.category) return acc;
|
||||
if (!acc[mitigation.category]) {
|
||||
acc[mitigation.category] = [];
|
||||
}
|
||||
acc[control.category].push(control);
|
||||
acc[mitigation.category].push(mitigation);
|
||||
return acc;
|
||||
}, {} as Record<string, Control[]>);
|
||||
}, {} as Record<string, Mitigation[]>);
|
||||
|
||||
// Function to toggle a category's expanded state - now supports multiple expanded categories
|
||||
const toggleCategory = (categoryId: string) => {
|
||||
@@ -177,10 +178,10 @@ function FrameworkViewContent({
|
||||
const categories: Category[] = Object.entries(controlsByCategory)
|
||||
.map(([categoryName, categoryControls]) => {
|
||||
const catImplementedCount = categoryControls.filter(
|
||||
(control) => control.status === "complete"
|
||||
(mitigation) => mitigation.status === "complete"
|
||||
).length;
|
||||
const catNotApplicableCount = categoryControls.filter(
|
||||
(control) => control.status === "not-applicable"
|
||||
(mitigation) => mitigation.status === "not-applicable"
|
||||
).length;
|
||||
// Consider both "complete" and "not-applicable" as done for category progress
|
||||
const catDoneCount = catImplementedCount + catNotApplicableCount;
|
||||
@@ -194,14 +195,14 @@ function FrameworkViewContent({
|
||||
name: categoryName,
|
||||
description: `Controls related to ${categoryName.toLowerCase()}`,
|
||||
progress: progress,
|
||||
controls: categoryControls.sort((a, b) =>
|
||||
mitigations: categoryControls.sort((a, b) =>
|
||||
(a.name || "").localeCompare(b.name || "")
|
||||
),
|
||||
doneCount: catDoneCount,
|
||||
totalCount: catTotalCount,
|
||||
};
|
||||
})
|
||||
.filter((category) => category.controls.length > 0)
|
||||
.filter((category) => category.mitigations.length > 0)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
const getStatusIcon = (status: string) => {
|
||||
@@ -235,10 +236,10 @@ function FrameworkViewContent({
|
||||
</Button>
|
||||
<Button asChild>
|
||||
<Link
|
||||
to={`/organizations/${organizationId}/frameworks/${framework.id}/controls/create`}
|
||||
to={`/organizations/${organizationId}/frameworks/${framework.id}/mitigations/create`}
|
||||
>
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Create Control
|
||||
Create Mitigation
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
@@ -385,7 +386,7 @@ function FrameworkViewContent({
|
||||
|
||||
{isExpanded && (
|
||||
<CardContent className="p-0">
|
||||
{category.controls.length > 0 ? (
|
||||
{category.mitigations.length > 0 ? (
|
||||
<div className="w-full">
|
||||
<table className="w-full">
|
||||
<thead>
|
||||
@@ -396,16 +397,18 @@ function FrameworkViewContent({
|
||||
<th className="w-24 px-4 py-2 text-left">
|
||||
Status
|
||||
</th>
|
||||
<th className="px-4 py-2 text-left">Control</th>
|
||||
<th className="px-4 py-2 text-left">
|
||||
Mitigation
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y">
|
||||
{category.controls.map((control) => (
|
||||
{category.mitigations.map((mitigation) => (
|
||||
<tr
|
||||
key={control.id || Math.random().toString()}
|
||||
key={mitigation.id || Math.random().toString()}
|
||||
className="hover:bg-muted/50 cursor-pointer"
|
||||
onClick={() => {
|
||||
if (control?.id) {
|
||||
if (mitigation?.id) {
|
||||
// Always store just this category in the hash
|
||||
// This is what will be expanded when returning
|
||||
const encoded = encodeURIComponent(
|
||||
@@ -427,7 +430,7 @@ function FrameworkViewContent({
|
||||
// Use a small timeout to ensure the hash change is processed by the browser
|
||||
setTimeout(() => {
|
||||
navigate(
|
||||
`/organizations/${organizationId}/frameworks/${framework.id}/controls/${control.id}`
|
||||
`/organizations/${organizationId}/frameworks/${framework.id}/mitigations/${mitigation.id}`
|
||||
);
|
||||
}, 100);
|
||||
}
|
||||
@@ -435,19 +438,19 @@ function FrameworkViewContent({
|
||||
>
|
||||
<td className="w-24 px-4 py-3 align-middle">
|
||||
<Badge variant="outline" className="text-xs">
|
||||
{control.importance}
|
||||
{mitigation.importance}
|
||||
</Badge>
|
||||
</td>
|
||||
<td className="w-24 px-4 py-3 align-middle">
|
||||
<div className="flex items-center justify-center">
|
||||
{control.status
|
||||
? getStatusIcon(control.status)
|
||||
{mitigation.status
|
||||
? getStatusIcon(mitigation.status)
|
||||
: null}
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 align-middle">
|
||||
<div className="font-medium">
|
||||
{control.name}
|
||||
{mitigation.name}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -457,7 +460,7 @@ function FrameworkViewContent({
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-center p-6 text-center text-muted-foreground">
|
||||
No controls in this category
|
||||
No mitigations in this category
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0d36f3f459adaca2f0abab59d9208bf9>>
|
||||
* @generated SignedSource<<11936aad3da2565a509b1566774e0ecf>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type ImportFrameworkInput = {
|
||||
file: any;
|
||||
organizationId: string;
|
||||
@@ -22,17 +22,17 @@ export type FrameworkListViewImportFrameworkMutation$data = {
|
||||
readonly importFramework: {
|
||||
readonly frameworkEdge: {
|
||||
readonly node: {
|
||||
readonly controls: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: ControlState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly mitigations: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: MitigationState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly name: string;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
@@ -109,15 +109,15 @@ v4 = {
|
||||
"value": 100
|
||||
}
|
||||
],
|
||||
"concreteType": "ControlConnection",
|
||||
"concreteType": "MitigationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "mitigations",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"concreteType": "MitigationEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -125,7 +125,7 @@ v4 = {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -145,7 +145,7 @@ v4 = {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:100)"
|
||||
"storageKey": "mitigations(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -233,16 +233,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b225cace8b9956333d0175a7e0a4c04d",
|
||||
"cacheID": "d2d34f8e054d753d956120ea14791f79",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "FrameworkListViewImportFrameworkMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation FrameworkListViewImportFrameworkMutation(\n $input: ImportFrameworkInput!\n) {\n importFramework(input: $input) {\n frameworkEdge {\n node {\n id\n name\n description\n controls(first: 100) {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||
"text": "mutation FrameworkListViewImportFrameworkMutation(\n $input: ImportFrameworkInput!\n) {\n importFramework(input: $input) {\n frameworkEdge {\n node {\n id\n name\n description\n mitigations(first: 100) {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "fa1a8aa9d16bc50eac99392d3de59f6c";
|
||||
(node as any).hash = "a812db41b10d16c25959a5a733fe6088";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<c2ec2b3948d67ed6b924494adcae63aa>>
|
||||
* @generated SignedSource<<6b6bb27f3ae9e9cf720be1c3655c595e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type FrameworkListViewQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
@@ -18,17 +18,17 @@ export type FrameworkListViewQuery$data = {
|
||||
readonly frameworks?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly controls: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: ControlState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly mitigations: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly id: string;
|
||||
readonly state: MitigationState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly name: string;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
@@ -112,15 +112,15 @@ v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v3/*: any*/),
|
||||
"concreteType": "ControlConnection",
|
||||
"concreteType": "MitigationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "mitigations",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"concreteType": "MitigationEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -128,7 +128,7 @@ v5 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -148,7 +148,7 @@ v5 = [
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": "controls(first:100)"
|
||||
"storageKey": "mitigations(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
@@ -291,7 +291,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "88bb77e2d10398380353d5a90ba5d6d6",
|
||||
"cacheID": "e5d4da21773770d146fb7d91e435caef",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -308,11 +308,11 @@ return {
|
||||
},
|
||||
"name": "FrameworkListViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query FrameworkListViewQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n frameworks(first: 100) {\n edges {\n node {\n id\n name\n description\n controls(first: 100) {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n"
|
||||
"text": "query FrameworkListViewQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n ... on Organization {\n frameworks(first: 100) {\n edges {\n node {\n id\n name\n description\n mitigations(first: 100) {\n edges {\n node {\n id\n state\n }\n }\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e5d315fb00e4fee74b53685b6441ed54";
|
||||
(node as any).hash = "8da147529de5e229e38b836bd584e484";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<c36de2ad1593c2dfefe28d7d3bbbddba>>
|
||||
* @generated SignedSource<<1abc57788d51404af0931c7e120c01a7>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,27 +9,27 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type FrameworkViewQuery$variables = {
|
||||
frameworkId: string;
|
||||
};
|
||||
export type FrameworkViewQuery$data = {
|
||||
readonly node: {
|
||||
readonly controls?: {
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly mitigations?: {
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: ControlImportance;
|
||||
readonly importance: MitigationImportance;
|
||||
readonly name: string;
|
||||
readonly state: ControlState;
|
||||
readonly state: MitigationState;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly name?: string;
|
||||
};
|
||||
};
|
||||
@@ -85,7 +85,7 @@ v6 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"concreteType": "MitigationEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
@@ -93,7 +93,7 @@ v6 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -191,11 +191,11 @@ return {
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/),
|
||||
{
|
||||
"alias": "controls",
|
||||
"alias": "mitigations",
|
||||
"args": null,
|
||||
"concreteType": "ControlConnection",
|
||||
"concreteType": "MitigationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__FrameworkView_controls_connection",
|
||||
"name": "__FrameworkView_mitigations_connection",
|
||||
"plural": false,
|
||||
"selections": (v6/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -235,21 +235,21 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"concreteType": "ControlConnection",
|
||||
"concreteType": "MitigationConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "controls",
|
||||
"name": "mitigations",
|
||||
"plural": false,
|
||||
"selections": (v6/*: any*/),
|
||||
"storageKey": "controls(first:100)"
|
||||
"storageKey": "mitigations(first:100)"
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v7/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "FrameworkView_controls",
|
||||
"key": "FrameworkView_mitigations",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "controls"
|
||||
"name": "mitigations"
|
||||
}
|
||||
],
|
||||
"type": "Framework",
|
||||
@@ -261,7 +261,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f8edefde219c5fa1a5c7c85e287d846a",
|
||||
"cacheID": "c60a352d14662dd43ab93b9a4dcebee8",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -271,18 +271,18 @@ return {
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"node",
|
||||
"controls"
|
||||
"mitigations"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "FrameworkViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query FrameworkViewQuery(\n $frameworkId: ID!\n) {\n node(id: $frameworkId) {\n __typename\n id\n ... on Framework {\n name\n description\n controls(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n category\n importance\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query FrameworkViewQuery(\n $frameworkId: ID!\n) {\n node(id: $frameworkId) {\n __typename\n id\n ... on Framework {\n name\n description\n mitigations(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n category\n importance\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "9e8a9b37d956ec4c9dfba88e7b1120f3";
|
||||
(node as any).hash = "f65af17f461e1c112573c0d14d08479d";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,29 +1,32 @@
|
||||
import { PageTemplateSkeleton } from "@/components/PageTemplate";
|
||||
import { Suspense } from "react";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../../ErrorBoundary";
|
||||
import { Suspense } from "react";
|
||||
import { useLocation } from "react-router";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
|
||||
const UpdateControlView = lazy(() => import("./UpdateControlView"));
|
||||
const CreateMitigationView = lazy(() => import("./CreateMitigationView"));
|
||||
|
||||
export function UpdateControlViewSkeleton() {
|
||||
export function CreateMitigationViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Update Control"
|
||||
description="Update the control details"
|
||||
title="Create Mitigation"
|
||||
description="Create a new mitigation for your framework"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-muted rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function UpdateControlPage() {
|
||||
export function CreateMitigationPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<UpdateControlViewSkeleton />}>
|
||||
<Suspense
|
||||
key={location.pathname}
|
||||
fallback={<CreateMitigationViewSkeleton />}
|
||||
>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<UpdateControlView />
|
||||
<CreateMitigationView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -17,19 +17,19 @@ import {
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import {
|
||||
CreateControlViewCreateControlMutation,
|
||||
ControlImportance,
|
||||
} from "./__generated__/CreateControlViewCreateControlMutation.graphql";
|
||||
CreateMitigationViewCreateMitigationMutation,
|
||||
MitigationImportance,
|
||||
} from "./__generated__/CreateMitigationViewCreateMitigationMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { CreateControlViewSkeleton } from "./CreateControlPage";
|
||||
import { CreateMitigationViewSkeleton } from "./CreateMitigationPage";
|
||||
|
||||
const createControlMutation = graphql`
|
||||
mutation CreateControlViewCreateControlMutation(
|
||||
$input: CreateControlInput!
|
||||
const createMitigationMutation = graphql`
|
||||
mutation CreateMitigationViewCreateMitigationMutation(
|
||||
$input: CreateMitigationInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
createControl(input: $input) {
|
||||
controlEdge @prependEdge(connections: $connections) {
|
||||
createMitigation(input: $input) {
|
||||
mitigationEdge @prependEdge(connections: $connections) {
|
||||
node {
|
||||
id
|
||||
name
|
||||
@@ -103,7 +103,7 @@ function EditableField({
|
||||
);
|
||||
}
|
||||
|
||||
function CreateControlViewContent() {
|
||||
function CreateMitigationViewContent() {
|
||||
const { organizationId, frameworkId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
@@ -111,11 +111,13 @@ function CreateControlViewContent() {
|
||||
name: "",
|
||||
description: "",
|
||||
category: "",
|
||||
importance: "MANDATORY" as ControlImportance,
|
||||
importance: "MANDATORY" as MitigationImportance,
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
useMutation<CreateControlViewCreateControlMutation>(createControlMutation);
|
||||
useMutation<CreateMitigationViewCreateMitigationMutation>(
|
||||
createMitigationMutation
|
||||
);
|
||||
|
||||
const handleFieldChange = (field: keyof typeof formData, value: unknown) => {
|
||||
setFormData((prev) => ({
|
||||
@@ -138,7 +140,7 @@ function CreateControlViewContent() {
|
||||
|
||||
const connectionId = ConnectionHandler.getConnectionID(
|
||||
frameworkId!,
|
||||
"FrameworkOverviewPage_controls"
|
||||
"FrameworkOverviewPage_mitigations"
|
||||
);
|
||||
|
||||
commit({
|
||||
@@ -156,7 +158,7 @@ function CreateControlViewContent() {
|
||||
if (errors) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: errors[0]?.message || "Failed to create control",
|
||||
description: errors[0]?.message || "Failed to create mitigation",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -164,17 +166,17 @@ function CreateControlViewContent() {
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Control created successfully",
|
||||
description: "Mitigation created successfully",
|
||||
});
|
||||
|
||||
navigate(
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/controls/${data.createControl.controlEdge.node.id}`
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/mitigations/${data.createMitigation.mitigationEdge.node.id}`
|
||||
);
|
||||
},
|
||||
onError(error) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to create control",
|
||||
description: error.message || "Failed to create mitigation",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
@@ -183,8 +185,8 @@ function CreateControlViewContent() {
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Create Control"
|
||||
description="Create a new control for your framework"
|
||||
title="Create Mitigation"
|
||||
description="Create a new mitigation for your framework"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
@@ -200,7 +202,7 @@ function CreateControlViewContent() {
|
||||
value={formData.category}
|
||||
onChange={(value) => handleFieldChange("category", value)}
|
||||
required
|
||||
helpText="The category this control belongs to"
|
||||
helpText="The category this mitigation belongs to"
|
||||
/>
|
||||
|
||||
<EditableField
|
||||
@@ -209,7 +211,7 @@ function CreateControlViewContent() {
|
||||
onChange={(value) => handleFieldChange("description", value)}
|
||||
required
|
||||
multiline
|
||||
helpText="Provide a detailed description of the control"
|
||||
helpText="Provide a detailed description of the mitigation"
|
||||
/>
|
||||
|
||||
<div className="space-y-2">
|
||||
@@ -219,7 +221,7 @@ function CreateControlViewContent() {
|
||||
<Select
|
||||
value={formData.importance}
|
||||
onValueChange={(value) =>
|
||||
handleFieldChange("importance", value as ControlImportance)
|
||||
handleFieldChange("importance", value as MitigationImportance)
|
||||
}
|
||||
>
|
||||
<SelectTrigger>
|
||||
@@ -246,7 +248,7 @@ function CreateControlViewContent() {
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isInFlight}>
|
||||
{isInFlight ? "Creating..." : "Create Control"}
|
||||
{isInFlight ? "Creating..." : "Create Mitigation"}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -257,8 +259,8 @@ function CreateControlViewContent() {
|
||||
|
||||
export default function CreateControlView() {
|
||||
return (
|
||||
<Suspense fallback={<CreateControlViewSkeleton />}>
|
||||
<CreateControlViewContent />
|
||||
<Suspense fallback={<CreateMitigationViewSkeleton />}>
|
||||
<CreateMitigationViewContent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -5,9 +5,9 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../../ErrorBoundary";
|
||||
|
||||
const ControlView = lazy(() => import("./ControlView"));
|
||||
const MitigationView = lazy(() => import("./MitigationView"));
|
||||
|
||||
export function ControlViewSkeleton() {
|
||||
export function MitigationViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
actions={
|
||||
@@ -32,13 +32,13 @@ export function ControlViewSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function ControlPage() {
|
||||
export function MitigationPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<ControlViewSkeleton />}>
|
||||
<Suspense key={location.pathname} fallback={<MitigationViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<ControlView />
|
||||
<MitigationView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -71,18 +71,18 @@ import {
|
||||
SheetClose,
|
||||
} from "@/components/ui/sheet";
|
||||
|
||||
import type { ControlViewQuery as ControlViewQueryType } from "./__generated__/ControlViewQuery.graphql";
|
||||
import type { ControlViewUpdateTaskStateMutation as ControlViewUpdateTaskStateMutationType } from "./__generated__/ControlViewUpdateTaskStateMutation.graphql";
|
||||
import type { ControlViewCreateTaskMutation as ControlViewCreateTaskMutationType } from "./__generated__/ControlViewCreateTaskMutation.graphql";
|
||||
import type { ControlViewDeleteTaskMutation as ControlViewDeleteTaskMutationType } from "./__generated__/ControlViewDeleteTaskMutation.graphql";
|
||||
import type { ControlViewUploadEvidenceMutation as ControlViewUploadEvidenceMutationType } from "./__generated__/ControlViewUploadEvidenceMutation.graphql";
|
||||
import type { ControlViewDeleteEvidenceMutation as ControlViewDeleteEvidenceMutationType } from "./__generated__/ControlViewDeleteEvidenceMutation.graphql";
|
||||
import type { ControlViewAssignTaskMutation as ControlViewAssignTaskMutationType } from "./__generated__/ControlViewAssignTaskMutation.graphql";
|
||||
import type { ControlViewUnassignTaskMutation as ControlViewUnassignTaskMutationType } from "./__generated__/ControlViewUnassignTaskMutation.graphql";
|
||||
import type { ControlViewOrganizationQuery$data } from "./__generated__/ControlViewOrganizationQuery.graphql";
|
||||
import type { ControlViewUpdateControlStateMutation as ControlViewUpdateControlStateMutationType } from "./__generated__/ControlViewUpdateControlStateMutation.graphql";
|
||||
import type { MitigationViewQuery as MitigationViewQueryType } from "./__generated__/MitigationViewQuery.graphql";
|
||||
import type { MitigationViewUpdateTaskStateMutation as MitigationViewUpdateTaskStateMutationType } from "./__generated__/MitigationViewUpdateTaskStateMutation.graphql";
|
||||
import type { MitigationViewCreateTaskMutation as MitigationViewCreateTaskMutationType } from "./__generated__/MitigationViewCreateTaskMutation.graphql";
|
||||
import type { MitigationViewDeleteTaskMutation as MitigationViewDeleteTaskMutationType } from "./__generated__/MitigationViewDeleteTaskMutation.graphql";
|
||||
import type { MitigationViewUploadEvidenceMutation as MitigationViewUploadEvidenceMutationType } from "./__generated__/MitigationViewUploadEvidenceMutation.graphql";
|
||||
import type { MitigationViewDeleteEvidenceMutation as MitigationViewDeleteEvidenceMutationType } from "./__generated__/MitigationViewDeleteEvidenceMutation.graphql";
|
||||
import type { MitigationViewAssignTaskMutation as MitigationViewAssignTaskMutationType } from "./__generated__/MitigationViewAssignTaskMutation.graphql";
|
||||
import type { MitigationViewUnassignTaskMutation as MitigationViewUnassignTaskMutationType } from "./__generated__/MitigationViewUnassignTaskMutation.graphql";
|
||||
import type { MitigationViewOrganizationQuery$data } from "./__generated__/MitigationViewOrganizationQuery.graphql";
|
||||
import type { MitigationViewUpdateMitigationStateMutation as MitigationViewUpdateMitigationStateMutationType } from "./__generated__/MitigationViewUpdateMitigationStateMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { ControlViewSkeleton } from "./ControlPage";
|
||||
import { MitigationViewSkeleton } from "./MitigationPage";
|
||||
|
||||
// Function to format ISO8601 duration to human-readable format
|
||||
const formatDuration = (isoDuration: string): string => {
|
||||
@@ -121,18 +121,18 @@ const formatDuration = (isoDuration: string): string => {
|
||||
}
|
||||
};
|
||||
|
||||
const controlViewQuery = graphql`
|
||||
query ControlViewQuery($controlId: ID!) {
|
||||
control: node(id: $controlId) {
|
||||
const mitigationViewQuery = graphql`
|
||||
query MitigationViewQuery($mitigationId: ID!) {
|
||||
mitigation: node(id: $mitigationId) {
|
||||
id
|
||||
... on Control {
|
||||
... on Mitigation {
|
||||
name
|
||||
description
|
||||
state
|
||||
importance
|
||||
category
|
||||
version
|
||||
tasks(first: 100) @connection(key: "ControlView_tasks") {
|
||||
tasks(first: 100) @connection(key: "MitigationView_tasks") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
@@ -147,7 +147,8 @@ const controlViewQuery = graphql`
|
||||
fullName
|
||||
primaryEmailAddress
|
||||
}
|
||||
evidences(first: 50) @connection(key: "ControlView_evidences") {
|
||||
evidences(first: 50)
|
||||
@connection(key: "MitigationView_evidences") {
|
||||
__id
|
||||
edges {
|
||||
node {
|
||||
@@ -171,7 +172,7 @@ const controlViewQuery = graphql`
|
||||
`;
|
||||
|
||||
const updateTaskStateMutation = graphql`
|
||||
mutation ControlViewUpdateTaskStateMutation($input: UpdateTaskInput!) {
|
||||
mutation MitigationViewUpdateTaskStateMutation($input: UpdateTaskInput!) {
|
||||
updateTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -184,7 +185,7 @@ const updateTaskStateMutation = graphql`
|
||||
`;
|
||||
|
||||
const createTaskMutation = graphql`
|
||||
mutation ControlViewCreateTaskMutation(
|
||||
mutation MitigationViewCreateTaskMutation(
|
||||
$input: CreateTaskInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -209,7 +210,7 @@ const createTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const deleteTaskMutation = graphql`
|
||||
mutation ControlViewDeleteTaskMutation(
|
||||
mutation MitigationViewDeleteTaskMutation(
|
||||
$input: DeleteTaskInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -220,7 +221,7 @@ const deleteTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const uploadEvidenceMutation = graphql`
|
||||
mutation ControlViewUploadEvidenceMutation(
|
||||
mutation MitigationViewUploadEvidenceMutation(
|
||||
$input: UploadEvidenceInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -243,7 +244,7 @@ const uploadEvidenceMutation = graphql`
|
||||
`;
|
||||
|
||||
const deleteEvidenceMutation = graphql`
|
||||
mutation ControlViewDeleteEvidenceMutation(
|
||||
mutation MitigationViewDeleteEvidenceMutation(
|
||||
$input: DeleteEvidenceInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -255,7 +256,7 @@ const deleteEvidenceMutation = graphql`
|
||||
|
||||
// Add a GraphQL query to fetch the fileUrl for an evidence item
|
||||
const getEvidenceFileUrlQuery = graphql`
|
||||
query ControlViewGetEvidenceFileUrlQuery($evidenceId: ID!) {
|
||||
query MitigationViewGetEvidenceFileUrlQuery($evidenceId: ID!) {
|
||||
node(id: $evidenceId) {
|
||||
... on Evidence {
|
||||
id
|
||||
@@ -266,7 +267,7 @@ const getEvidenceFileUrlQuery = graphql`
|
||||
`;
|
||||
|
||||
const assignTaskMutation = graphql`
|
||||
mutation ControlViewAssignTaskMutation($input: AssignTaskInput!) {
|
||||
mutation MitigationViewAssignTaskMutation($input: AssignTaskInput!) {
|
||||
assignTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -282,7 +283,7 @@ const assignTaskMutation = graphql`
|
||||
`;
|
||||
|
||||
const unassignTaskMutation = graphql`
|
||||
mutation ControlViewUnassignTaskMutation($input: UnassignTaskInput!) {
|
||||
mutation MitigationViewUnassignTaskMutation($input: UnassignTaskInput!) {
|
||||
unassignTask(input: $input) {
|
||||
task {
|
||||
id
|
||||
@@ -297,10 +298,12 @@ const unassignTaskMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const updateControlStateMutation = graphql`
|
||||
mutation ControlViewUpdateControlStateMutation($input: UpdateControlInput!) {
|
||||
updateControl(input: $input) {
|
||||
control {
|
||||
const updateMitigationStateMutation = graphql`
|
||||
mutation MitigationViewUpdateMitigationStateMutation(
|
||||
$input: UpdateMitigationInput!
|
||||
) {
|
||||
updateMitigation(input: $input) {
|
||||
mitigation {
|
||||
id
|
||||
state
|
||||
version
|
||||
@@ -310,12 +313,12 @@ const updateControlStateMutation = graphql`
|
||||
`;
|
||||
|
||||
const organizationQuery = graphql`
|
||||
query ControlViewOrganizationQuery($organizationId: ID!) {
|
||||
query MitigationViewOrganizationQuery($organizationId: ID!) {
|
||||
organization: node(id: $organizationId) {
|
||||
id
|
||||
... on Organization {
|
||||
peoples(first: 100, orderBy: { direction: ASC, field: FULL_NAME })
|
||||
@connection(key: "ControlView_peoples") {
|
||||
@connection(key: "MitigationView_peoples") {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
@@ -329,17 +332,17 @@ const organizationQuery = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
function ControlViewContent({
|
||||
function MitigationViewContent({
|
||||
queryRef,
|
||||
}: {
|
||||
queryRef: PreloadedQuery<ControlViewQueryType>;
|
||||
queryRef: PreloadedQuery<MitigationViewQueryType>;
|
||||
}) {
|
||||
const data = usePreloadedQuery<ControlViewQueryType>(
|
||||
controlViewQuery,
|
||||
const data = usePreloadedQuery<MitigationViewQueryType>(
|
||||
mitigationViewQuery,
|
||||
queryRef
|
||||
);
|
||||
const { toast } = useToast();
|
||||
const { organizationId, frameworkId, controlId } = useParams();
|
||||
const { organizationId, frameworkId, mitigationId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const environment = useRelayEnvironment();
|
||||
|
||||
@@ -349,7 +352,7 @@ function ControlViewContent({
|
||||
|
||||
// Load organization data for people selector
|
||||
const [organizationData, setOrganizationData] =
|
||||
useState<ControlViewOrganizationQuery$data | null>(null);
|
||||
useState<MitigationViewOrganizationQuery$data | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (organizationId) {
|
||||
@@ -358,7 +361,7 @@ function ControlViewContent({
|
||||
})
|
||||
.toPromise()
|
||||
.then((response) => {
|
||||
setOrganizationData(response as ControlViewOrganizationQuery$data);
|
||||
setOrganizationData(response as MitigationViewOrganizationQuery$data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error fetching organization data:", error);
|
||||
@@ -423,27 +426,29 @@ function ControlViewContent({
|
||||
return "bg-gray-100 text-gray-800";
|
||||
};
|
||||
|
||||
const [updateTask] = useMutation<ControlViewUpdateTaskStateMutationType>(
|
||||
const [updateTask] = useMutation<MitigationViewUpdateTaskStateMutationType>(
|
||||
updateTaskStateMutation
|
||||
);
|
||||
const [createTask] =
|
||||
useMutation<ControlViewCreateTaskMutationType>(createTaskMutation);
|
||||
useMutation<MitigationViewCreateTaskMutationType>(createTaskMutation);
|
||||
const [deleteTask] =
|
||||
useMutation<ControlViewDeleteTaskMutationType>(deleteTaskMutation);
|
||||
const [uploadEvidence] = useMutation<ControlViewUploadEvidenceMutationType>(
|
||||
uploadEvidenceMutation
|
||||
);
|
||||
const [deleteEvidence] = useMutation<ControlViewDeleteEvidenceMutationType>(
|
||||
deleteEvidenceMutation
|
||||
);
|
||||
useMutation<MitigationViewDeleteTaskMutationType>(deleteTaskMutation);
|
||||
const [uploadEvidence] =
|
||||
useMutation<MitigationViewUploadEvidenceMutationType>(
|
||||
uploadEvidenceMutation
|
||||
);
|
||||
const [deleteEvidence] =
|
||||
useMutation<MitigationViewDeleteEvidenceMutationType>(
|
||||
deleteEvidenceMutation
|
||||
);
|
||||
const [assignTask] =
|
||||
useMutation<ControlViewAssignTaskMutationType>(assignTaskMutation);
|
||||
useMutation<MitigationViewAssignTaskMutationType>(assignTaskMutation);
|
||||
const [unassignTask] =
|
||||
useMutation<ControlViewUnassignTaskMutationType>(unassignTaskMutation);
|
||||
useMutation<MitigationViewUnassignTaskMutationType>(unassignTaskMutation);
|
||||
|
||||
const [updateControlState] =
|
||||
useMutation<ControlViewUpdateControlStateMutationType>(
|
||||
updateControlStateMutation
|
||||
const [updateMitigationState] =
|
||||
useMutation<MitigationViewUpdateMitigationStateMutationType>(
|
||||
updateMitigationStateMutation
|
||||
);
|
||||
|
||||
const [isCreateTaskOpen, setIsCreateTaskOpen] = useState(false);
|
||||
@@ -518,7 +523,7 @@ function ControlViewContent({
|
||||
// Track if task panel is open
|
||||
const [isTaskPanelOpen, setIsTaskPanelOpen] = useState(false);
|
||||
|
||||
const tasks = data.control.tasks?.edges.map((edge) => edge.node) || [];
|
||||
const tasks = data.mitigation.tasks?.edges.map((edge) => edge.node) || [];
|
||||
|
||||
// Add useEffect to handle URL parameters for task selection
|
||||
useEffect(() => {
|
||||
@@ -666,10 +671,10 @@ function ControlViewContent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data.control.id) {
|
||||
if (!data.mitigation.id) {
|
||||
toast({
|
||||
title: "Error creating task",
|
||||
description: "Control ID is missing",
|
||||
description: "Mitigation ID is missing",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -679,9 +684,9 @@ function ControlViewContent({
|
||||
|
||||
createTask({
|
||||
variables: {
|
||||
connections: [`${data.control.tasks?.__id}`],
|
||||
connections: [`${data.mitigation.tasks?.__id}`],
|
||||
input: {
|
||||
controlId: data.control.id,
|
||||
mitigationId: data.mitigation.id,
|
||||
name: newTaskName,
|
||||
description: newTaskDescription,
|
||||
timeEstimate: isoTimeEstimate === "" ? null : isoTimeEstimate,
|
||||
@@ -719,7 +724,7 @@ function ControlViewContent({
|
||||
|
||||
deleteTask({
|
||||
variables: {
|
||||
connections: [`${data.control.tasks?.__id}`],
|
||||
connections: [`${data.mitigation.tasks?.__id}`],
|
||||
input: {
|
||||
taskId: taskToDelete.id,
|
||||
},
|
||||
@@ -742,9 +747,9 @@ function ControlViewContent({
|
||||
});
|
||||
};
|
||||
|
||||
const handleEditControl = () => {
|
||||
const handleEditMitigation = () => {
|
||||
navigate(
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/controls/${controlId}/update`
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/mitigations/${mitigationId}/update`
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1098,31 +1103,31 @@ function ControlViewContent({
|
||||
});
|
||||
};
|
||||
|
||||
// Function to handle control state change
|
||||
const handleControlStateChange = (newState: string) => {
|
||||
updateControlState({
|
||||
// Function to handle mitigation state change
|
||||
const handleMitigationStateChange = (newState: string) => {
|
||||
updateMitigationState({
|
||||
variables: {
|
||||
input: {
|
||||
id: data.control.id,
|
||||
id: data.mitigation.id,
|
||||
state: newState as
|
||||
| "NOT_STARTED"
|
||||
| "IN_PROGRESS"
|
||||
| "IMPLEMENTED"
|
||||
| "NOT_APPLICABLE",
|
||||
expectedVersion: data.control.version!,
|
||||
expectedVersion: data.mitigation.version!,
|
||||
},
|
||||
},
|
||||
onCompleted: () => {
|
||||
toast({
|
||||
title: "Control state updated",
|
||||
description: `Control state has been updated to ${formatState(
|
||||
title: "Mitigation state updated",
|
||||
description: `Mitigation state has been updated to ${formatState(
|
||||
newState
|
||||
)}.`,
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
toast({
|
||||
title: "Error updating control state",
|
||||
title: "Error updating mitigation state",
|
||||
description: error.message,
|
||||
variant: "destructive",
|
||||
});
|
||||
@@ -1255,23 +1260,23 @@ function ControlViewContent({
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title={data.control.name ?? ""}
|
||||
title={data.mitigation.name ?? ""}
|
||||
actions={
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" size="sm" onClick={handleEditControl}>
|
||||
Edit Control
|
||||
<Button variant="outline" size="sm" onClick={handleEditMitigation}>
|
||||
Edit Mitigation
|
||||
</Button>
|
||||
<Select
|
||||
defaultValue={data.control.state}
|
||||
onValueChange={handleControlStateChange}
|
||||
defaultValue={data.mitigation.state}
|
||||
onValueChange={handleMitigationStateChange}
|
||||
>
|
||||
<SelectTrigger className="w-[160px] h-8 text-sm">
|
||||
<div
|
||||
className={`${getStateColor(
|
||||
data.control.state
|
||||
data.mitigation.state
|
||||
)} px-2 py-0.5 rounded-full text-sm w-full text-center`}
|
||||
>
|
||||
{formatState(data.control.state)}
|
||||
{formatState(data.mitigation.state)}
|
||||
</div>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -1283,10 +1288,10 @@ function ControlViewContent({
|
||||
</Select>
|
||||
<div
|
||||
className={`${getImportanceColor(
|
||||
data.control.importance
|
||||
data.mitigation.importance
|
||||
)} px-3 py-1 rounded-full text-sm`}
|
||||
>
|
||||
{formatImportance(data.control.importance)}
|
||||
{formatImportance(data.mitigation.importance)}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1295,7 +1300,7 @@ function ControlViewContent({
|
||||
<Card className="mt-4">
|
||||
<CardContent className="pt-6">
|
||||
<div className="prose prose-gray prose-sm md:prose-base text-gray-600 max-w-3xl">
|
||||
<ReactMarkdown>{data.control.description}</ReactMarkdown>
|
||||
<ReactMarkdown>{data.mitigation.description}</ReactMarkdown>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -1320,8 +1325,8 @@ function ControlViewContent({
|
||||
<DialogHeader>
|
||||
<DialogTitle>Create New Task</DialogTitle>
|
||||
<DialogDescription>
|
||||
Add a new task to this control. Click save when you're
|
||||
done.
|
||||
Add a new task to this mitigation. Click save when
|
||||
you're done.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="space-y-4 py-4">
|
||||
@@ -2530,24 +2535,24 @@ function ControlViewContent({
|
||||
);
|
||||
}
|
||||
|
||||
export default function ControlView() {
|
||||
const { controlId } = useParams();
|
||||
export default function MitigationView() {
|
||||
const { mitigationId } = useParams();
|
||||
const [queryRef, loadQuery] =
|
||||
useQueryLoader<ControlViewQueryType>(controlViewQuery);
|
||||
useQueryLoader<MitigationViewQueryType>(mitigationViewQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (controlId) {
|
||||
loadQuery({ controlId });
|
||||
if (mitigationId) {
|
||||
loadQuery({ mitigationId });
|
||||
}
|
||||
}, [controlId, loadQuery]);
|
||||
}, [mitigationId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <ControlViewSkeleton />;
|
||||
return <MitigationViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<ControlViewSkeleton />}>
|
||||
<ControlViewContent queryRef={queryRef} />
|
||||
<Suspense fallback={<MitigationViewSkeleton />}>
|
||||
<MitigationViewContent queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -1,29 +1,32 @@
|
||||
import { PageTemplateSkeleton } from "@/components/PageTemplate";
|
||||
import { ErrorBoundaryWithLocation } from "../../ErrorBoundary";
|
||||
import { Suspense } from "react";
|
||||
import { useLocation } from "react-router";
|
||||
import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../../ErrorBoundary";
|
||||
|
||||
const CreateControlView = lazy(() => import("./CreateControlView"));
|
||||
const UpdateMitigationView = lazy(() => import("./UpdateMitigationView"));
|
||||
|
||||
export function CreateControlViewSkeleton() {
|
||||
export function UpdateMitigationViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Control"
|
||||
description="Create a new control for your framework"
|
||||
title="Update Mitigation"
|
||||
description="Update the mitigation details"
|
||||
>
|
||||
<div className="max-w-2xl aspect-square bg-muted rounded-xl animate-pulse" />
|
||||
</PageTemplateSkeleton>
|
||||
);
|
||||
}
|
||||
|
||||
export function CreateControlPage() {
|
||||
export function UpdateMitigationPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense key={location.pathname} fallback={<CreateControlViewSkeleton />}>
|
||||
<Suspense
|
||||
key={location.pathname}
|
||||
fallback={<UpdateMitigationViewSkeleton />}
|
||||
>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateControlView />
|
||||
<UpdateMitigationView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -22,18 +22,20 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import type { UpdateControlViewUpdateControlMutation as UpdateControlViewUpdateControlMutationType } from "./__generated__/UpdateControlViewUpdateControlMutation.graphql";
|
||||
import type {
|
||||
ControlState,
|
||||
ControlImportance,
|
||||
} from "./__generated__/UpdateControlViewUpdateControlMutation.graphql";
|
||||
MitigationState,
|
||||
MitigationImportance,
|
||||
UpdateMitigationViewUpdateMitigationMutation,
|
||||
} from "./__generated__/UpdateMitigationViewUpdateMitigationMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { UpdateControlViewSkeleton } from "./UpdateControlPage";
|
||||
import { MitigationViewSkeleton } from "./MitigationPage";
|
||||
|
||||
const updateControlMutation = graphql`
|
||||
mutation UpdateControlViewUpdateControlMutation($input: UpdateControlInput!) {
|
||||
updateControl(input: $input) {
|
||||
control {
|
||||
const updateMitigationMutation = graphql`
|
||||
mutation UpdateMitigationViewUpdateMitigationMutation(
|
||||
$input: UpdateMitigationInput!
|
||||
) {
|
||||
updateMitigation(input: $input) {
|
||||
mitigation {
|
||||
id
|
||||
name
|
||||
description
|
||||
@@ -46,10 +48,10 @@ const updateControlMutation = graphql`
|
||||
}
|
||||
`;
|
||||
|
||||
const updateControlQuery = graphql`
|
||||
query UpdateControlViewQuery($controlId: ID!) {
|
||||
node(id: $controlId) {
|
||||
... on Control {
|
||||
const updateMitigationQuery = graphql`
|
||||
query UpdateMitigationViewQuery($mitigationId: ID!) {
|
||||
node(id: $mitigationId) {
|
||||
... on Mitigation {
|
||||
id
|
||||
name
|
||||
description
|
||||
@@ -123,16 +125,16 @@ function EditableField({
|
||||
);
|
||||
}
|
||||
|
||||
function UpdateControlViewContent({
|
||||
function UpdateMitigationViewContent({
|
||||
queryRef,
|
||||
}: {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
queryRef: PreloadedQuery<any>;
|
||||
}) {
|
||||
const { organizationId, frameworkId, controlId } = useParams();
|
||||
const { organizationId, frameworkId, mitigationId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
const data = usePreloadedQuery(updateControlQuery, queryRef);
|
||||
const data = usePreloadedQuery(updateMitigationQuery, queryRef);
|
||||
const [editedFields, setEditedFields] = useState<Set<string>>(new Set());
|
||||
const [formData, setFormData] = useState({
|
||||
name: "",
|
||||
@@ -155,8 +157,8 @@ function UpdateControlViewContent({
|
||||
}, [data.node]);
|
||||
|
||||
const [commit, isInFlight] =
|
||||
useMutation<UpdateControlViewUpdateControlMutationType>(
|
||||
updateControlMutation
|
||||
useMutation<UpdateMitigationViewUpdateMitigationMutation>(
|
||||
updateMitigationMutation
|
||||
);
|
||||
|
||||
const handleFieldChange = (field: keyof typeof formData, value: string) => {
|
||||
@@ -169,7 +171,7 @@ function UpdateControlViewContent({
|
||||
|
||||
const handleCancel = () => {
|
||||
navigate(
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/controls/${controlId}`
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/mitigations/${mitigationId}`
|
||||
);
|
||||
};
|
||||
|
||||
@@ -193,10 +195,10 @@ function UpdateControlViewContent({
|
||||
name?: string;
|
||||
description?: string;
|
||||
category?: string;
|
||||
state?: ControlState;
|
||||
importance?: ControlImportance;
|
||||
state?: MitigationState;
|
||||
importance?: MitigationImportance;
|
||||
} = {
|
||||
id: controlId!,
|
||||
id: mitigationId!,
|
||||
expectedVersion: data.node.version,
|
||||
};
|
||||
|
||||
@@ -210,10 +212,10 @@ function UpdateControlViewContent({
|
||||
input.category = formData.category;
|
||||
}
|
||||
if (editedFields.has("state")) {
|
||||
input.state = formData.state as ControlState;
|
||||
input.state = formData.state as MitigationState;
|
||||
}
|
||||
if (editedFields.has("importance")) {
|
||||
input.importance = formData.importance as ControlImportance;
|
||||
input.importance = formData.importance as MitigationImportance;
|
||||
}
|
||||
|
||||
commit({
|
||||
@@ -224,7 +226,7 @@ function UpdateControlViewContent({
|
||||
if (errors) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: errors[0]?.message || "Failed to update control",
|
||||
description: errors[0]?.message || "Failed to update mitigation",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
@@ -232,17 +234,17 @@ function UpdateControlViewContent({
|
||||
|
||||
toast({
|
||||
title: "Success",
|
||||
description: "Control updated successfully",
|
||||
description: "Mitigation updated successfully",
|
||||
});
|
||||
|
||||
navigate(
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/controls/${controlId}`
|
||||
`/organizations/${organizationId}/frameworks/${frameworkId}/mitigations/${mitigationId}`
|
||||
);
|
||||
},
|
||||
onError(error) {
|
||||
toast({
|
||||
title: "Error",
|
||||
description: error.message || "Failed to update control",
|
||||
description: error.message || "Failed to update mitigation",
|
||||
variant: "destructive",
|
||||
});
|
||||
},
|
||||
@@ -251,8 +253,8 @@ function UpdateControlViewContent({
|
||||
|
||||
return (
|
||||
<PageTemplate
|
||||
title="Update Control"
|
||||
description="Update the control details"
|
||||
title="Update Mitigation"
|
||||
description="Update the mitigation details"
|
||||
>
|
||||
<Card className="max-w-2xl">
|
||||
<form onSubmit={handleSubmit} className="p-6 space-y-6">
|
||||
@@ -269,7 +271,7 @@ function UpdateControlViewContent({
|
||||
onChange={(value) => handleFieldChange("description", value)}
|
||||
required
|
||||
multiline
|
||||
helpText="Provide a detailed description of the control"
|
||||
helpText="Provide a detailed description of the mitigation"
|
||||
/>
|
||||
|
||||
<EditableField
|
||||
@@ -323,7 +325,7 @@ function UpdateControlViewContent({
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={isInFlight || !hasChanges}>
|
||||
{isInFlight ? "Updating..." : "Update Control"}
|
||||
{isInFlight ? "Updating..." : "Update Mitigation"}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -333,23 +335,23 @@ function UpdateControlViewContent({
|
||||
}
|
||||
|
||||
export default function UpdateControlView() {
|
||||
const { controlId } = useParams();
|
||||
const { mitigationId } = useParams();
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const [queryRef, loadQuery] = useQueryLoader<any>(updateControlQuery);
|
||||
const [queryRef, loadQuery] = useQueryLoader<any>(updateMitigationQuery);
|
||||
|
||||
useEffect(() => {
|
||||
if (controlId) {
|
||||
loadQuery({ controlId });
|
||||
if (mitigationId) {
|
||||
loadQuery({ mitigationId });
|
||||
}
|
||||
}, [controlId, loadQuery]);
|
||||
}, [mitigationId, loadQuery]);
|
||||
|
||||
if (!queryRef) {
|
||||
return <UpdateControlViewSkeleton />;
|
||||
return <MitigationViewSkeleton />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Suspense fallback={<UpdateControlViewSkeleton />}>
|
||||
<UpdateControlViewContent queryRef={queryRef} />
|
||||
<Suspense fallback={<MitigationViewSkeleton />}>
|
||||
<UpdateMitigationViewContent queryRef={queryRef} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a38544ace1fb4fc6da394e8ea2c35787>>
|
||||
* @generated SignedSource<<22a6faa89009d6784bc9a89c2456f12e>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,35 +9,35 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type CreateControlInput = {
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type CreateMitigationInput = {
|
||||
category: string;
|
||||
description: string;
|
||||
frameworkId: string;
|
||||
importance: ControlImportance;
|
||||
importance: MitigationImportance;
|
||||
name: string;
|
||||
};
|
||||
export type CreateControlViewCreateControlMutation$variables = {
|
||||
export type CreateMitigationViewCreateMitigationMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateControlInput;
|
||||
input: CreateMitigationInput;
|
||||
};
|
||||
export type CreateControlViewCreateControlMutation$data = {
|
||||
readonly createControl: {
|
||||
readonly controlEdge: {
|
||||
export type CreateMitigationViewCreateMitigationMutation$data = {
|
||||
readonly createMitigation: {
|
||||
readonly mitigationEdge: {
|
||||
readonly node: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly state: ControlState;
|
||||
readonly state: MitigationState;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreateControlViewCreateControlMutation = {
|
||||
response: CreateControlViewCreateControlMutation$data;
|
||||
variables: CreateControlViewCreateControlMutation$variables;
|
||||
export type CreateMitigationViewCreateMitigationMutation = {
|
||||
response: CreateMitigationViewCreateMitigationMutation$data;
|
||||
variables: CreateMitigationViewCreateMitigationMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -61,15 +61,15 @@ v2 = [
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "ControlEdge",
|
||||
"concreteType": "MitigationEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "controlEdge",
|
||||
"name": "mitigationEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
@@ -123,14 +123,14 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreateControlViewCreateControlMutation",
|
||||
"name": "CreateMitigationViewCreateMitigationMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateControlPayload",
|
||||
"concreteType": "CreateMitigationPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createControl",
|
||||
"name": "createMitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
@@ -148,14 +148,14 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "CreateControlViewCreateControlMutation",
|
||||
"name": "CreateMitigationViewCreateMitigationMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateControlPayload",
|
||||
"concreteType": "CreateMitigationPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createControl",
|
||||
"name": "createMitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
@@ -166,7 +166,7 @@ return {
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "controlEdge",
|
||||
"name": "mitigationEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
@@ -181,16 +181,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f0f7112f1eb67ed8e7f0fe38b427b0c5",
|
||||
"cacheID": "09c15768681bc81e7035ff20e90e81a0",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreateControlViewCreateControlMutation",
|
||||
"name": "CreateMitigationViewCreateMitigationMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation CreateControlViewCreateControlMutation(\n $input: CreateControlInput!\n) {\n createControl(input: $input) {\n controlEdge {\n node {\n id\n name\n description\n category\n state\n }\n }\n }\n}\n"
|
||||
"text": "mutation CreateMitigationViewCreateMitigationMutation(\n $input: CreateMitigationInput!\n) {\n createMitigation(input: $input) {\n mitigationEdge {\n node {\n id\n name\n description\n category\n state\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b9b19ec5600f99a2a8e75e0bd9f86355";
|
||||
(node as any).hash = "42db1acd8c6e92678c9e6355a77e1eb6";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<18bc7a503d34d2bcb4cdfb6b4cfc1912>>
|
||||
* @generated SignedSource<<acf83fd1c5826a38f85912ed91e79422>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,10 +13,10 @@ export type AssignTaskInput = {
|
||||
assignedToId: string;
|
||||
taskId: string;
|
||||
};
|
||||
export type ControlViewAssignTaskMutation$variables = {
|
||||
export type MitigationViewAssignTaskMutation$variables = {
|
||||
input: AssignTaskInput;
|
||||
};
|
||||
export type ControlViewAssignTaskMutation$data = {
|
||||
export type MitigationViewAssignTaskMutation$data = {
|
||||
readonly assignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
@@ -29,9 +29,9 @@ export type ControlViewAssignTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewAssignTaskMutation = {
|
||||
response: ControlViewAssignTaskMutation$data;
|
||||
variables: ControlViewAssignTaskMutation$variables;
|
||||
export type MitigationViewAssignTaskMutation = {
|
||||
response: MitigationViewAssignTaskMutation$data;
|
||||
variables: MitigationViewAssignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -118,7 +118,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewAssignTaskMutation",
|
||||
"name": "MitigationViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -127,20 +127,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewAssignTaskMutation",
|
||||
"name": "MitigationViewAssignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "0a406c0e166607d86896adc0dfb5618e",
|
||||
"cacheID": "b336b45b0dad20968af93b52cd0aac48",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewAssignTaskMutation",
|
||||
"name": "MitigationViewAssignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewAssignTaskMutation(\n $input: AssignTaskInput!\n) {\n assignTask(input: $input) {\n task {\n id\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewAssignTaskMutation(\n $input: AssignTaskInput!\n) {\n assignTask(input: $input) {\n task {\n id\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1a9a18038c2f6ad39d3efe61d2d0e33d";
|
||||
(node as any).hash = "6446830361465b47f185c50b2886a422";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<93ac47858fbd7c339faac83f193cb21b>>
|
||||
* @generated SignedSource<<958545e211155678a1a43d8ef1717071>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,16 +12,16 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type CreateTaskInput = {
|
||||
assignedToId?: string | null | undefined;
|
||||
controlId: string;
|
||||
description: string;
|
||||
mitigationId: string;
|
||||
name: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type ControlViewCreateTaskMutation$variables = {
|
||||
export type MitigationViewCreateTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateTaskInput;
|
||||
};
|
||||
export type ControlViewCreateTaskMutation$data = {
|
||||
export type MitigationViewCreateTaskMutation$data = {
|
||||
readonly createTask: {
|
||||
readonly taskEdge: {
|
||||
readonly node: {
|
||||
@@ -40,9 +40,9 @@ export type ControlViewCreateTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewCreateTaskMutation = {
|
||||
response: ControlViewCreateTaskMutation$data;
|
||||
variables: ControlViewCreateTaskMutation$variables;
|
||||
export type MitigationViewCreateTaskMutation = {
|
||||
response: MitigationViewCreateTaskMutation$data;
|
||||
variables: MitigationViewCreateTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -162,7 +162,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewCreateTaskMutation",
|
||||
"name": "MitigationViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -187,7 +187,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewCreateTaskMutation",
|
||||
"name": "MitigationViewCreateTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -220,16 +220,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f823a58c96ee652fd522df58de3710a1",
|
||||
"cacheID": "dedf546da903060c79209ab7695bde12",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewCreateTaskMutation",
|
||||
"name": "MitigationViewCreateTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewCreateTaskMutation(\n $input: CreateTaskInput!\n) {\n createTask(input: $input) {\n taskEdge {\n node {\n id\n name\n description\n timeEstimate\n state\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewCreateTaskMutation(\n $input: CreateTaskInput!\n) {\n createTask(input: $input) {\n taskEdge {\n node {\n id\n name\n description\n timeEstimate\n state\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "5d50a685dad17446a0cab1891dc00374";
|
||||
(node as any).hash = "683fe4d2a3d33e989a8b5593f99799a5";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<5cc5a8fcb02623e685586d2f3510fb4a>>
|
||||
* @generated SignedSource<<c7cba05f3dbc917afc82d3a3dae6045c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,18 +12,18 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteEvidenceInput = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type ControlViewDeleteEvidenceMutation$variables = {
|
||||
export type MitigationViewDeleteEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteEvidenceInput;
|
||||
};
|
||||
export type ControlViewDeleteEvidenceMutation$data = {
|
||||
export type MitigationViewDeleteEvidenceMutation$data = {
|
||||
readonly deleteEvidence: {
|
||||
readonly deletedEvidenceId: string;
|
||||
};
|
||||
};
|
||||
export type ControlViewDeleteEvidenceMutation = {
|
||||
response: ControlViewDeleteEvidenceMutation$data;
|
||||
variables: ControlViewDeleteEvidenceMutation$variables;
|
||||
export type MitigationViewDeleteEvidenceMutation = {
|
||||
response: MitigationViewDeleteEvidenceMutation$data;
|
||||
variables: MitigationViewDeleteEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewDeleteEvidenceMutation",
|
||||
"name": "MitigationViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -84,7 +84,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewDeleteEvidenceMutation",
|
||||
"name": "MitigationViewDeleteEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -117,16 +117,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "594da4829274c817424f9b84ba99a5a6",
|
||||
"cacheID": "4770e84f6f87fb95b9f102cf8e572f44",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewDeleteEvidenceMutation",
|
||||
"name": "MitigationViewDeleteEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewDeleteEvidenceMutation(\n $input: DeleteEvidenceInput!\n) {\n deleteEvidence(input: $input) {\n deletedEvidenceId\n }\n}\n"
|
||||
"text": "mutation MitigationViewDeleteEvidenceMutation(\n $input: DeleteEvidenceInput!\n) {\n deleteEvidence(input: $input) {\n deletedEvidenceId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a6b5e90e931adf04f45be9403b291ad9";
|
||||
(node as any).hash = "993f84f2e310e888a78200abb9b79ae0";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<e6c50692038abaca7921b9f0810ddfaa>>
|
||||
* @generated SignedSource<<c91c57e5263b695d85ca6d95f14acc1d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,18 +12,18 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type ControlViewDeleteTaskMutation$variables = {
|
||||
export type MitigationViewDeleteTaskMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteTaskInput;
|
||||
};
|
||||
export type ControlViewDeleteTaskMutation$data = {
|
||||
export type MitigationViewDeleteTaskMutation$data = {
|
||||
readonly deleteTask: {
|
||||
readonly deletedTaskId: string;
|
||||
};
|
||||
};
|
||||
export type ControlViewDeleteTaskMutation = {
|
||||
response: ControlViewDeleteTaskMutation$data;
|
||||
variables: ControlViewDeleteTaskMutation$variables;
|
||||
export type MitigationViewDeleteTaskMutation = {
|
||||
response: MitigationViewDeleteTaskMutation$data;
|
||||
variables: MitigationViewDeleteTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,7 +59,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewDeleteTaskMutation",
|
||||
"name": "MitigationViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -84,7 +84,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewDeleteTaskMutation",
|
||||
"name": "MitigationViewDeleteTaskMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -117,16 +117,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "36b910121f02343b2e920adda58d7032",
|
||||
"cacheID": "f586e9c07d233eb31a72c2564c448fe4",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewDeleteTaskMutation",
|
||||
"name": "MitigationViewDeleteTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewDeleteTaskMutation(\n $input: DeleteTaskInput!\n) {\n deleteTask(input: $input) {\n deletedTaskId\n }\n}\n"
|
||||
"text": "mutation MitigationViewDeleteTaskMutation(\n $input: DeleteTaskInput!\n) {\n deleteTask(input: $input) {\n deletedTaskId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "3aa9ea0eca32df8e6fe0258ee1140e56";
|
||||
(node as any).hash = "2d6cfcb4704b95bc89f9f4715488d133";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<6097cb76bff61c342c2b6389a8e7f618>>
|
||||
* @generated SignedSource<<c39e6569df1609b4a9cf0a6c1673df3a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,18 +9,18 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlViewGetEvidenceFileUrlQuery$variables = {
|
||||
export type MitigationViewGetEvidenceFileUrlQuery$variables = {
|
||||
evidenceId: string;
|
||||
};
|
||||
export type ControlViewGetEvidenceFileUrlQuery$data = {
|
||||
export type MitigationViewGetEvidenceFileUrlQuery$data = {
|
||||
readonly node: {
|
||||
readonly fileUrl?: string | null | undefined;
|
||||
readonly id?: string;
|
||||
};
|
||||
};
|
||||
export type ControlViewGetEvidenceFileUrlQuery = {
|
||||
response: ControlViewGetEvidenceFileUrlQuery$data;
|
||||
variables: ControlViewGetEvidenceFileUrlQuery$variables;
|
||||
export type MitigationViewGetEvidenceFileUrlQuery = {
|
||||
response: MitigationViewGetEvidenceFileUrlQuery$data;
|
||||
variables: MitigationViewGetEvidenceFileUrlQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -57,7 +57,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewGetEvidenceFileUrlQuery",
|
||||
"name": "MitigationViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -87,7 +87,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewGetEvidenceFileUrlQuery",
|
||||
"name": "MitigationViewGetEvidenceFileUrlQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -119,16 +119,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b656f027db1774647bcd0eefad36f66f",
|
||||
"cacheID": "1dc81a5d665b9141b5cd62ef893ff0e1",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewGetEvidenceFileUrlQuery",
|
||||
"name": "MitigationViewGetEvidenceFileUrlQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ControlViewGetEvidenceFileUrlQuery(\n $evidenceId: ID!\n) {\n node(id: $evidenceId) {\n __typename\n ... on Evidence {\n id\n fileUrl\n }\n id\n }\n}\n"
|
||||
"text": "query MitigationViewGetEvidenceFileUrlQuery(\n $evidenceId: ID!\n) {\n node(id: $evidenceId) {\n __typename\n ... on Evidence {\n id\n fileUrl\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "a06f8279b87274b3cec4a11f44a53f49";
|
||||
(node as any).hash = "9d7bbfc81ce73246b671989102da3192";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<be19ac6afdae6f9be1b869afbd0a0838>>
|
||||
* @generated SignedSource<<780c10208a633b2ce7cd34ccc580cf25>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,10 +9,10 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlViewOrganizationQuery$variables = {
|
||||
export type MitigationViewOrganizationQuery$variables = {
|
||||
organizationId: string;
|
||||
};
|
||||
export type ControlViewOrganizationQuery$data = {
|
||||
export type MitigationViewOrganizationQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly peoples?: {
|
||||
@@ -26,9 +26,9 @@ export type ControlViewOrganizationQuery$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewOrganizationQuery = {
|
||||
response: ControlViewOrganizationQuery$data;
|
||||
variables: ControlViewOrganizationQuery$variables;
|
||||
export type MitigationViewOrganizationQuery = {
|
||||
response: MitigationViewOrganizationQuery$data;
|
||||
variables: MitigationViewOrganizationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -153,7 +153,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewOrganizationQuery",
|
||||
"name": "MitigationViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -174,10 +174,10 @@ return {
|
||||
],
|
||||
"concreteType": "PeopleConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__ControlView_peoples_connection",
|
||||
"name": "__MitigationView_peoples_connection",
|
||||
"plural": false,
|
||||
"selections": (v5/*: any*/),
|
||||
"storageKey": "__ControlView_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
"storageKey": "__MitigationView_peoples_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"FULL_NAME\"})"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
@@ -194,7 +194,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewOrganizationQuery",
|
||||
"name": "MitigationViewOrganizationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
@@ -226,7 +226,7 @@ return {
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "ControlView_peoples",
|
||||
"key": "MitigationView_peoples",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "peoples"
|
||||
}
|
||||
@@ -240,7 +240,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "9a339515a618cf48b77e74890b016272",
|
||||
"cacheID": "3d1fc2d02bc6eea68edcabc6fc6f0b56",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -255,13 +255,13 @@ return {
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "ControlViewOrganizationQuery",
|
||||
"name": "MitigationViewOrganizationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ControlViewOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MitigationViewOrganizationQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ... on Organization {\n peoples(first: 100, orderBy: {direction: ASC, field: FULL_NAME}) {\n edges {\n node {\n id\n fullName\n primaryEmailAddress\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "22507c997964e19a663c819b750e50c9";
|
||||
(node as any).hash = "73abf70f60b6f5a07b25f3c83676e02f";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d90309f0abd5f91c5f38c3070e27758b>>
|
||||
* @generated SignedSource<<d54298db57548f693ed2ca2418c9128c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,22 +9,22 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type EvidenceState = "EXPIRED" | "INVALID" | "VALID";
|
||||
export type EvidenceType = "FILE" | "LINK";
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type TaskState = "DONE" | "TODO";
|
||||
export type ControlViewQuery$variables = {
|
||||
controlId: string;
|
||||
export type MitigationViewQuery$variables = {
|
||||
mitigationId: string;
|
||||
};
|
||||
export type ControlViewQuery$data = {
|
||||
readonly control: {
|
||||
export type MitigationViewQuery$data = {
|
||||
readonly mitigation: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id: string;
|
||||
readonly importance?: ControlImportance;
|
||||
readonly importance?: MitigationImportance;
|
||||
readonly name?: string;
|
||||
readonly state?: ControlState;
|
||||
readonly state?: MitigationState;
|
||||
readonly tasks?: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
@@ -61,9 +61,9 @@ export type ControlViewQuery$data = {
|
||||
readonly version?: number;
|
||||
};
|
||||
};
|
||||
export type ControlViewQuery = {
|
||||
response: ControlViewQuery$data;
|
||||
variables: ControlViewQuery$variables;
|
||||
export type MitigationViewQuery = {
|
||||
response: MitigationViewQuery$data;
|
||||
variables: MitigationViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -71,14 +71,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "controlId"
|
||||
"name": "mitigationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "controlId"
|
||||
"variableName": "mitigationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -305,10 +305,10 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewQuery",
|
||||
"name": "MitigationViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
"alias": "mitigation",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -330,7 +330,7 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "TaskConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__ControlView_tasks_connection",
|
||||
"name": "__MitigationView_tasks_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -361,7 +361,7 @@ return {
|
||||
"args": null,
|
||||
"concreteType": "EvidenceConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__ControlView_evidences_connection",
|
||||
"name": "__MitigationView_evidences_connection",
|
||||
"plural": false,
|
||||
"selections": (v15/*: any*/),
|
||||
"storageKey": null
|
||||
@@ -380,7 +380,7 @@ return {
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Control",
|
||||
"type": "Mitigation",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -394,10 +394,10 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewQuery",
|
||||
"name": "MitigationViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "control",
|
||||
"alias": "mitigation",
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
@@ -461,7 +461,7 @@ return {
|
||||
"args": (v17/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "ControlView_evidences",
|
||||
"key": "MitigationView_evidences",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "evidences"
|
||||
},
|
||||
@@ -483,12 +483,12 @@ return {
|
||||
"args": (v16/*: any*/),
|
||||
"filters": null,
|
||||
"handle": "connection",
|
||||
"key": "ControlView_tasks",
|
||||
"key": "MitigationView_tasks",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "tasks"
|
||||
}
|
||||
],
|
||||
"type": "Control",
|
||||
"type": "Mitigation",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -497,7 +497,7 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "35556c446c544e8b281b572272daae6b",
|
||||
"cacheID": "8e9c3cef43daff0bdbfff4e33d7c70ad",
|
||||
"id": null,
|
||||
"metadata": {
|
||||
"connection": [
|
||||
@@ -512,19 +512,19 @@ return {
|
||||
"cursor": null,
|
||||
"direction": "forward",
|
||||
"path": [
|
||||
"control",
|
||||
"mitigation",
|
||||
"tasks"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "ControlViewQuery",
|
||||
"name": "MitigationViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query ControlViewQuery(\n $controlId: ID!\n) {\n control: node(id: $controlId) {\n __typename\n id\n ... on Control {\n name\n description\n state\n importance\n category\n version\n tasks(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n timeEstimate\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n evidences(first: 50) {\n edges {\n node {\n id\n mimeType\n filename\n size\n state\n type\n url\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
"text": "query MitigationViewQuery(\n $mitigationId: ID!\n) {\n mitigation: node(id: $mitigationId) {\n __typename\n id\n ... on Mitigation {\n name\n description\n state\n importance\n category\n version\n tasks(first: 100) {\n edges {\n node {\n id\n name\n description\n state\n timeEstimate\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n evidences(first: 50) {\n edges {\n node {\n id\n mimeType\n filename\n size\n state\n type\n url\n createdAt\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "cf9ee1fdc5e0e09c6b883299af7ffa37";
|
||||
(node as any).hash = "f0baeab367be46290f2f15df836ed153";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<c9adac41c9c5084befb16e9c01a12900>>
|
||||
* @generated SignedSource<<9cb5a3f1c6f0c2a3265ecdc6ececd13d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,10 +12,10 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type UnassignTaskInput = {
|
||||
taskId: string;
|
||||
};
|
||||
export type ControlViewUnassignTaskMutation$variables = {
|
||||
export type MitigationViewUnassignTaskMutation$variables = {
|
||||
input: UnassignTaskInput;
|
||||
};
|
||||
export type ControlViewUnassignTaskMutation$data = {
|
||||
export type MitigationViewUnassignTaskMutation$data = {
|
||||
readonly unassignTask: {
|
||||
readonly task: {
|
||||
readonly assignedTo: {
|
||||
@@ -28,9 +28,9 @@ export type ControlViewUnassignTaskMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewUnassignTaskMutation = {
|
||||
response: ControlViewUnassignTaskMutation$data;
|
||||
variables: ControlViewUnassignTaskMutation$variables;
|
||||
export type MitigationViewUnassignTaskMutation = {
|
||||
response: MitigationViewUnassignTaskMutation$data;
|
||||
variables: MitigationViewUnassignTaskMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -117,7 +117,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewUnassignTaskMutation",
|
||||
"name": "MitigationViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -126,20 +126,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewUnassignTaskMutation",
|
||||
"name": "MitigationViewUnassignTaskMutation",
|
||||
"selections": (v2/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "15ebb533fa8c9ef25aba306106a198eb",
|
||||
"cacheID": "e493ae65ba1e53627dd3f260e8814e41",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewUnassignTaskMutation",
|
||||
"name": "MitigationViewUnassignTaskMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewUnassignTaskMutation(\n $input: UnassignTaskInput!\n) {\n unassignTask(input: $input) {\n task {\n id\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewUnassignTaskMutation(\n $input: UnassignTaskInput!\n) {\n unassignTask(input: $input) {\n task {\n id\n version\n assignedTo {\n id\n fullName\n primaryEmailAddress\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "b0956d42397dc015e2ece4ff37a83857";
|
||||
(node as any).hash = "3f5a0d2b753d0a759e3004c0b557c505";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<42dcc8ca7d9ad288321e73fa5175db44>>
|
||||
* @generated SignedSource<<3aa56a1042b1f9492cfc5bd5d5f55d9d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,32 +9,32 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateControlInput = {
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMitigationInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
expectedVersion: number;
|
||||
id: string;
|
||||
importance?: ControlImportance | null | undefined;
|
||||
importance?: MitigationImportance | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
state?: ControlState | null | undefined;
|
||||
state?: MitigationState | null | undefined;
|
||||
};
|
||||
export type ControlViewUpdateControlStateMutation$variables = {
|
||||
input: UpdateControlInput;
|
||||
export type MitigationViewUpdateMitigationStateMutation$variables = {
|
||||
input: UpdateMitigationInput;
|
||||
};
|
||||
export type ControlViewUpdateControlStateMutation$data = {
|
||||
readonly updateControl: {
|
||||
readonly control: {
|
||||
export type MitigationViewUpdateMitigationStateMutation$data = {
|
||||
readonly updateMitigation: {
|
||||
readonly mitigation: {
|
||||
readonly id: string;
|
||||
readonly state: ControlState;
|
||||
readonly state: MitigationState;
|
||||
readonly version: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewUpdateControlStateMutation = {
|
||||
response: ControlViewUpdateControlStateMutation$data;
|
||||
variables: ControlViewUpdateControlStateMutation$variables;
|
||||
export type MitigationViewUpdateMitigationStateMutation = {
|
||||
response: MitigationViewUpdateMitigationStateMutation$data;
|
||||
variables: MitigationViewUpdateMitigationStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -55,17 +55,17 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateControlPayload",
|
||||
"concreteType": "UpdateMitigationPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateControl",
|
||||
"name": "updateMitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"name": "mitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -101,7 +101,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewUpdateControlStateMutation",
|
||||
"name": "MitigationViewUpdateMitigationStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -110,20 +110,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewUpdateControlStateMutation",
|
||||
"name": "MitigationViewUpdateMitigationStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "b34b9c0ddec55d16efcc2f38e8334773",
|
||||
"cacheID": "4a85c6e15d6ff91ccaa7976f9b0a0c6f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewUpdateControlStateMutation",
|
||||
"name": "MitigationViewUpdateMitigationStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewUpdateControlStateMutation(\n $input: UpdateControlInput!\n) {\n updateControl(input: $input) {\n control {\n id\n state\n version\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewUpdateMitigationStateMutation(\n $input: UpdateMitigationInput!\n) {\n updateMitigation(input: $input) {\n mitigation {\n id\n state\n version\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "3eaaab55403bfaf343d4a740ad0128e1";
|
||||
(node as any).hash = "2eb2c1f791262f502df22ca0c16682a7";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<f0b91a291608cee99d4b22fb2d19e847>>
|
||||
* @generated SignedSource<<4aed09b28d5d1ec083abfeeb874b9ce3>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -18,10 +18,10 @@ export type UpdateTaskInput = {
|
||||
taskId: string;
|
||||
timeEstimate?: any | null | undefined;
|
||||
};
|
||||
export type ControlViewUpdateTaskStateMutation$variables = {
|
||||
export type MitigationViewUpdateTaskStateMutation$variables = {
|
||||
input: UpdateTaskInput;
|
||||
};
|
||||
export type ControlViewUpdateTaskStateMutation$data = {
|
||||
export type MitigationViewUpdateTaskStateMutation$data = {
|
||||
readonly updateTask: {
|
||||
readonly task: {
|
||||
readonly id: string;
|
||||
@@ -31,9 +31,9 @@ export type ControlViewUpdateTaskStateMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewUpdateTaskStateMutation = {
|
||||
response: ControlViewUpdateTaskStateMutation$data;
|
||||
variables: ControlViewUpdateTaskStateMutation$variables;
|
||||
export type MitigationViewUpdateTaskStateMutation = {
|
||||
response: MitigationViewUpdateTaskStateMutation$data;
|
||||
variables: MitigationViewUpdateTaskStateMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -107,7 +107,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewUpdateTaskStateMutation",
|
||||
"name": "MitigationViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -116,20 +116,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewUpdateTaskStateMutation",
|
||||
"name": "MitigationViewUpdateTaskStateMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "f8f00bd63de4f5eac131954a8039b40e",
|
||||
"cacheID": "8de0d061237d4ebcbb366b8eefff6d94",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewUpdateTaskStateMutation",
|
||||
"name": "MitigationViewUpdateTaskStateMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewUpdateTaskStateMutation(\n $input: UpdateTaskInput!\n) {\n updateTask(input: $input) {\n task {\n id\n state\n timeEstimate\n version\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewUpdateTaskStateMutation(\n $input: UpdateTaskInput!\n) {\n updateTask(input: $input) {\n task {\n id\n state\n timeEstimate\n version\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "f53df99b24c2f5f233f8d865885718ea";
|
||||
(node as any).hash = "81dca6c475859526370ef60b4757428b";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<f6ace4744710269a7c6502726617efcb>>
|
||||
* @generated SignedSource<<9d4db1a6dc5ce7a35be41b6f42bc91d2>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -19,11 +19,11 @@ export type UploadEvidenceInput = {
|
||||
type: EvidenceType;
|
||||
url?: string | null | undefined;
|
||||
};
|
||||
export type ControlViewUploadEvidenceMutation$variables = {
|
||||
export type MitigationViewUploadEvidenceMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: UploadEvidenceInput;
|
||||
};
|
||||
export type ControlViewUploadEvidenceMutation$data = {
|
||||
export type MitigationViewUploadEvidenceMutation$data = {
|
||||
readonly uploadEvidence: {
|
||||
readonly evidenceEdge: {
|
||||
readonly node: {
|
||||
@@ -40,9 +40,9 @@ export type ControlViewUploadEvidenceMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type ControlViewUploadEvidenceMutation = {
|
||||
response: ControlViewUploadEvidenceMutation$data;
|
||||
variables: ControlViewUploadEvidenceMutation$variables;
|
||||
export type MitigationViewUploadEvidenceMutation = {
|
||||
response: MitigationViewUploadEvidenceMutation$data;
|
||||
variables: MitigationViewUploadEvidenceMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -156,7 +156,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "ControlViewUploadEvidenceMutation",
|
||||
"name": "MitigationViewUploadEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -181,7 +181,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "ControlViewUploadEvidenceMutation",
|
||||
"name": "MitigationViewUploadEvidenceMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -214,16 +214,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "62fbef44afc988cdedc94c7a0292a432",
|
||||
"cacheID": "30a6915055d3f6b63d96836b26f05a45",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "ControlViewUploadEvidenceMutation",
|
||||
"name": "MitigationViewUploadEvidenceMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation ControlViewUploadEvidenceMutation(\n $input: UploadEvidenceInput!\n) {\n uploadEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n }\n }\n }\n}\n"
|
||||
"text": "mutation MitigationViewUploadEvidenceMutation(\n $input: UploadEvidenceInput!\n) {\n uploadEvidence(input: $input) {\n evidenceEdge {\n node {\n id\n filename\n fileUrl\n mimeType\n type\n url\n size\n state\n createdAt\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1e2b47702f9a03efdca7fdfd44ebbccf";
|
||||
(node as any).hash = "4cf5430a0971ba1ddf476765df614e30";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<839284c6c29a5727d0ca521b1d804c5f>>
|
||||
* @generated SignedSource<<338c4c7afa073c41eacac21a2996d1f9>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,25 +9,25 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateControlViewQuery$variables = {
|
||||
controlId: string;
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMitigationViewQuery$variables = {
|
||||
mitigationId: string;
|
||||
};
|
||||
export type UpdateControlViewQuery$data = {
|
||||
export type UpdateMitigationViewQuery$data = {
|
||||
readonly node: {
|
||||
readonly category?: string;
|
||||
readonly description?: string;
|
||||
readonly id?: string;
|
||||
readonly importance?: ControlImportance;
|
||||
readonly importance?: MitigationImportance;
|
||||
readonly name?: string;
|
||||
readonly state?: ControlState;
|
||||
readonly state?: MitigationState;
|
||||
readonly version?: number;
|
||||
};
|
||||
};
|
||||
export type UpdateControlViewQuery = {
|
||||
response: UpdateControlViewQuery$data;
|
||||
variables: UpdateControlViewQuery$variables;
|
||||
export type UpdateMitigationViewQuery = {
|
||||
response: UpdateMitigationViewQuery$data;
|
||||
variables: UpdateMitigationViewQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -35,14 +35,14 @@ var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "controlId"
|
||||
"name": "mitigationId"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "controlId"
|
||||
"variableName": "mitigationId"
|
||||
}
|
||||
],
|
||||
v2 = {
|
||||
@@ -99,7 +99,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "UpdateControlViewQuery",
|
||||
"name": "UpdateMitigationViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -120,7 +120,7 @@ return {
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/)
|
||||
],
|
||||
"type": "Control",
|
||||
"type": "Mitigation",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -134,7 +134,7 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "UpdateControlViewQuery",
|
||||
"name": "UpdateMitigationViewQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -162,7 +162,7 @@ return {
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/)
|
||||
],
|
||||
"type": "Control",
|
||||
"type": "Mitigation",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
@@ -171,16 +171,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "d578024453f1901119a772154524070d",
|
||||
"cacheID": "c2e9133d77f3e090267b19f4ab270c72",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "UpdateControlViewQuery",
|
||||
"name": "UpdateMitigationViewQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query UpdateControlViewQuery(\n $controlId: ID!\n) {\n node(id: $controlId) {\n __typename\n ... on Control {\n id\n name\n description\n category\n importance\n state\n version\n }\n id\n }\n}\n"
|
||||
"text": "query UpdateMitigationViewQuery(\n $mitigationId: ID!\n) {\n node(id: $mitigationId) {\n __typename\n ... on Mitigation {\n id\n name\n description\n category\n importance\n state\n version\n }\n id\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e6a997a27a8e45c01ad415e73b794cae";
|
||||
(node as any).hash = "3e977744beb9c403aa8be232c8112a9b";
|
||||
|
||||
export default node;
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<5223ef96f75ea5f5d4b124d190dfd455>>
|
||||
* @generated SignedSource<<39cfe3277c49d7a0ff2099d6ad579e7d>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,36 +9,36 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type ControlImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type ControlState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateControlInput = {
|
||||
export type MitigationImportance = "ADVANCED" | "MANDATORY" | "PREFERRED";
|
||||
export type MitigationState = "IMPLEMENTED" | "IN_PROGRESS" | "NOT_APPLICABLE" | "NOT_STARTED";
|
||||
export type UpdateMitigationInput = {
|
||||
category?: string | null | undefined;
|
||||
description?: string | null | undefined;
|
||||
expectedVersion: number;
|
||||
id: string;
|
||||
importance?: ControlImportance | null | undefined;
|
||||
importance?: MitigationImportance | null | undefined;
|
||||
name?: string | null | undefined;
|
||||
state?: ControlState | null | undefined;
|
||||
state?: MitigationState | null | undefined;
|
||||
};
|
||||
export type UpdateControlViewUpdateControlMutation$variables = {
|
||||
input: UpdateControlInput;
|
||||
export type UpdateMitigationViewUpdateMitigationMutation$variables = {
|
||||
input: UpdateMitigationInput;
|
||||
};
|
||||
export type UpdateControlViewUpdateControlMutation$data = {
|
||||
readonly updateControl: {
|
||||
readonly control: {
|
||||
export type UpdateMitigationViewUpdateMitigationMutation$data = {
|
||||
readonly updateMitigation: {
|
||||
readonly mitigation: {
|
||||
readonly category: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly importance: ControlImportance;
|
||||
readonly importance: MitigationImportance;
|
||||
readonly name: string;
|
||||
readonly state: ControlState;
|
||||
readonly state: MitigationState;
|
||||
readonly version: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
export type UpdateControlViewUpdateControlMutation = {
|
||||
response: UpdateControlViewUpdateControlMutation$data;
|
||||
variables: UpdateControlViewUpdateControlMutation$variables;
|
||||
export type UpdateMitigationViewUpdateMitigationMutation = {
|
||||
response: UpdateMitigationViewUpdateMitigationMutation$data;
|
||||
variables: UpdateMitigationViewUpdateMitigationMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -59,17 +59,17 @@ v1 = [
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "UpdateControlPayload",
|
||||
"concreteType": "UpdateMitigationPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "updateControl",
|
||||
"name": "updateMitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Control",
|
||||
"concreteType": "Mitigation",
|
||||
"kind": "LinkedField",
|
||||
"name": "control",
|
||||
"name": "mitigation",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
@@ -133,7 +133,7 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "UpdateControlViewUpdateControlMutation",
|
||||
"name": "UpdateMitigationViewUpdateMitigationMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
@@ -142,20 +142,20 @@ return {
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "UpdateControlViewUpdateControlMutation",
|
||||
"name": "UpdateMitigationViewUpdateMitigationMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "1702f16b6cc6452422c0f72acee25359",
|
||||
"cacheID": "5ebe3d38712b444c98c08661b7431da3",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "UpdateControlViewUpdateControlMutation",
|
||||
"name": "UpdateMitigationViewUpdateMitigationMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation UpdateControlViewUpdateControlMutation(\n $input: UpdateControlInput!\n) {\n updateControl(input: $input) {\n control {\n id\n name\n description\n category\n importance\n state\n version\n }\n }\n}\n"
|
||||
"text": "mutation UpdateMitigationViewUpdateMitigationMutation(\n $input: UpdateMitigationInput!\n) {\n updateMitigation(input: $input) {\n mitigation {\n id\n name\n description\n category\n importance\n state\n version\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "e0f0940fe564406ef95473420b336128";
|
||||
(node as any).hash = "c68d76d527359d182749b309d2d8d6dd";
|
||||
|
||||
export default node;
|
||||
@@ -14,7 +14,7 @@ export function PolicyListViewSkeleton() {
|
||||
description="Manage your organization's policies"
|
||||
actions={<div className="bg-muted animate-pulse h-9 w-1/6 rounded-lg" />}
|
||||
>
|
||||
{/* Search and filter controls skeleton */}
|
||||
{/* Search and filter mitigations skeleton */}
|
||||
<div className="flex flex-col md:flex-row gap-4 mb-6">
|
||||
<div className="flex-1 h-10 bg-muted animate-pulse rounded" />
|
||||
<div className="flex gap-2">
|
||||
|
||||
@@ -232,7 +232,7 @@ function PolicyListViewContent({
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
{/* Search and filter controls */}
|
||||
{/* Search and filter mitigations */}
|
||||
<div className="flex flex-col md:flex-row gap-4 mb-6">
|
||||
<div className="relative flex-1">
|
||||
<Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
||||
|
||||
@@ -1,209 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<1e5aa858fdcd0179ebfd8ffba00b6bd7>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type RiskTier = "CRITICAL" | "GENERAL" | "SIGNIFICANT";
|
||||
export type ServiceCriticality = "HIGH" | "LOW" | "MEDIUM";
|
||||
export type CreateVendorInput = {
|
||||
description: string;
|
||||
name: string;
|
||||
organizationId: string;
|
||||
privacyPolicyUrl?: string | null | undefined;
|
||||
riskTier: RiskTier;
|
||||
serviceCriticality: ServiceCriticality;
|
||||
serviceStartAt: string;
|
||||
serviceTerminationAt?: string | null | undefined;
|
||||
statusPageUrl?: string | null | undefined;
|
||||
termsOfServiceUrl?: string | null | undefined;
|
||||
};
|
||||
export type VendorListPageCreateVendorMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateVendorInput;
|
||||
};
|
||||
export type VendorListPageCreateVendorMutation$data = {
|
||||
readonly createVendor: {
|
||||
readonly vendorEdge: {
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly riskTier: RiskTier;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
export type VendorListPageCreateVendorMutation = {
|
||||
response: VendorListPageCreateVendorMutation$data;
|
||||
variables: VendorListPageCreateVendorMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "VendorEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "vendorEdge",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Vendor",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskTier",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "VendorListPageCreateVendorMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateVendorPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createVendor",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "VendorListPageCreateVendorMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "CreateVendorPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "createVendor",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "prependEdge",
|
||||
"key": "",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "vendorEdge",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "7ab96ef77e598ee748273b37bb9b42d2",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorListPageCreateVendorMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation VendorListPageCreateVendorMutation(\n $input: CreateVendorInput!\n) {\n createVendor(input: $input) {\n vendorEdge {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n }\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "603ba3f92a342a8e1fb20057612b7c79";
|
||||
|
||||
export default node;
|
||||
@@ -1,132 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<ff037e64f503f247a68922f86248bb10>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DeleteVendorInput = {
|
||||
vendorId: string;
|
||||
};
|
||||
export type VendorListPageDeleteVendorMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: DeleteVendorInput;
|
||||
};
|
||||
export type VendorListPageDeleteVendorMutation$data = {
|
||||
readonly deleteVendor: {
|
||||
readonly deletedVendorId: string;
|
||||
};
|
||||
};
|
||||
export type VendorListPageDeleteVendorMutation = {
|
||||
response: VendorListPageDeleteVendorMutation$data;
|
||||
variables: VendorListPageDeleteVendorMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "connections"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
},
|
||||
v2 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "deletedVendorId",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "VendorListPageDeleteVendorMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteVendorPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteVendor",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v1/*: any*/),
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "VendorListPageDeleteVendorMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v2/*: any*/),
|
||||
"concreteType": "DeleteVendorPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "deleteVendor",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"filters": null,
|
||||
"handle": "deleteEdge",
|
||||
"key": "",
|
||||
"kind": "ScalarHandle",
|
||||
"name": "deletedVendorId",
|
||||
"handleArgs": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "connections",
|
||||
"variableName": "connections"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "278e42c6c988a64d4c863198f02df901",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorListPageDeleteVendorMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation VendorListPageDeleteVendorMutation(\n $input: DeleteVendorInput!\n) {\n deleteVendor(input: $input) {\n deletedVendorId\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "20a320191535706246ae00aa05df991e";
|
||||
|
||||
export default node;
|
||||
@@ -1,335 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<167c602f1fa3a3720523424c44c8b734>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type VendorListPagePaginationQuery$variables = {
|
||||
after?: string | null | undefined;
|
||||
before?: string | null | undefined;
|
||||
first?: number | null | undefined;
|
||||
id: string;
|
||||
last?: number | null | undefined;
|
||||
};
|
||||
export type VendorListPagePaginationQuery$data = {
|
||||
readonly node: {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"VendorListPage_vendors">;
|
||||
};
|
||||
};
|
||||
export type VendorListPagePaginationQuery = {
|
||||
response: VendorListPagePaginationQuery$data;
|
||||
variables: VendorListPagePaginationQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "after"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "before"
|
||||
},
|
||||
v2 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
},
|
||||
v3 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "id"
|
||||
},
|
||||
v4 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "last"
|
||||
},
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "id"
|
||||
}
|
||||
],
|
||||
v6 = {
|
||||
"kind": "Variable",
|
||||
"name": "after",
|
||||
"variableName": "after"
|
||||
},
|
||||
v7 = {
|
||||
"kind": "Variable",
|
||||
"name": "before",
|
||||
"variableName": "before"
|
||||
},
|
||||
v8 = {
|
||||
"kind": "Variable",
|
||||
"name": "first",
|
||||
"variableName": "first"
|
||||
},
|
||||
v9 = {
|
||||
"kind": "Variable",
|
||||
"name": "last",
|
||||
"variableName": "last"
|
||||
},
|
||||
v10 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = [
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "NAME"
|
||||
}
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "VendorListPagePaginationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"args": [
|
||||
(v6/*: any*/),
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/)
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "VendorListPage_vendors"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v4/*: any*/),
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "VendorListPagePaginationQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v10/*: any*/),
|
||||
(v11/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v12/*: any*/),
|
||||
"concreteType": "VendorConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "vendors",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "VendorEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Vendor",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v11/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskTier",
|
||||
"storageKey": null
|
||||
},
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasPreviousPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "startCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v12/*: any*/),
|
||||
"filters": [
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "VendorListPage_vendors",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "vendors"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "72074f9c6435d35453cfd0effbbd6add",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorListPagePaginationQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query VendorListPagePaginationQuery(\n $after: CursorKey\n $before: CursorKey\n $first: Int\n $last: Int\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...VendorListPage_vendors_pbnwq\n id\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "beaab1664bed1fa776659595b1ef3c30";
|
||||
|
||||
export default node;
|
||||
337
apps/console/src/pages/organizations/vendors/__generated__/VendorListPageQuery.graphql.ts
generated
vendored
337
apps/console/src/pages/organizations/vendors/__generated__/VendorListPageQuery.graphql.ts
generated
vendored
@@ -1,337 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<3e49ccb0b233e4d7495387ecf23f2316>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type VendorListPageQuery$variables = {
|
||||
after?: string | null | undefined;
|
||||
before?: string | null | undefined;
|
||||
first?: number | null | undefined;
|
||||
last?: number | null | undefined;
|
||||
organizationId: string;
|
||||
};
|
||||
export type VendorListPageQuery$data = {
|
||||
readonly organization: {
|
||||
readonly id: string;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"VendorListPage_vendors">;
|
||||
};
|
||||
};
|
||||
export type VendorListPageQuery = {
|
||||
response: VendorListPageQuery$data;
|
||||
variables: VendorListPageQuery$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "after"
|
||||
},
|
||||
v1 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "before"
|
||||
},
|
||||
v2 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
},
|
||||
v3 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "last"
|
||||
},
|
||||
v4 = {
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "organizationId"
|
||||
},
|
||||
v5 = [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "id",
|
||||
"variableName": "organizationId"
|
||||
}
|
||||
],
|
||||
v6 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v7 = {
|
||||
"kind": "Variable",
|
||||
"name": "after",
|
||||
"variableName": "after"
|
||||
},
|
||||
v8 = {
|
||||
"kind": "Variable",
|
||||
"name": "before",
|
||||
"variableName": "before"
|
||||
},
|
||||
v9 = {
|
||||
"kind": "Variable",
|
||||
"name": "first",
|
||||
"variableName": "first"
|
||||
},
|
||||
v10 = {
|
||||
"kind": "Variable",
|
||||
"name": "last",
|
||||
"variableName": "last"
|
||||
},
|
||||
v11 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
},
|
||||
v12 = [
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/),
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "NAME"
|
||||
}
|
||||
}
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": [
|
||||
(v0/*: any*/),
|
||||
(v1/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v4/*: any*/)
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "VendorListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"args": [
|
||||
(v7/*: any*/),
|
||||
(v8/*: any*/),
|
||||
(v9/*: any*/),
|
||||
(v10/*: any*/)
|
||||
],
|
||||
"kind": "FragmentSpread",
|
||||
"name": "VendorListPage_vendors"
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Query",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": [
|
||||
(v4/*: any*/),
|
||||
(v2/*: any*/),
|
||||
(v0/*: any*/),
|
||||
(v3/*: any*/),
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "VendorListPageQuery",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "organization",
|
||||
"args": (v5/*: any*/),
|
||||
"concreteType": null,
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v11/*: any*/),
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"kind": "InlineFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v12/*: any*/),
|
||||
"concreteType": "VendorConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "vendors",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "VendorEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Vendor",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v6/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskTier",
|
||||
"storageKey": null
|
||||
},
|
||||
(v11/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasPreviousPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "startCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v12/*: any*/),
|
||||
"filters": [
|
||||
"orderBy"
|
||||
],
|
||||
"handle": "connection",
|
||||
"key": "VendorListPage_vendors",
|
||||
"kind": "LinkedHandle",
|
||||
"name": "vendors"
|
||||
}
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "c2e401b2e573156b913d60ade59ea4ff",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "VendorListPageQuery",
|
||||
"operationKind": "query",
|
||||
"text": "query VendorListPageQuery(\n $organizationId: ID!\n $first: Int\n $after: CursorKey\n $last: Int\n $before: CursorKey\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...VendorListPage_vendors_pbnwq\n }\n}\n\nfragment VendorListPage_vendors_pbnwq on Organization {\n vendors(first: $first, after: $after, last: $last, before: $before, orderBy: {direction: ASC, field: NAME}) {\n edges {\n node {\n id\n name\n description\n createdAt\n updatedAt\n riskTier\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n }\n id\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1dc54deae9707bee0ab9beba6d844df3";
|
||||
|
||||
export default node;
|
||||
262
apps/console/src/pages/organizations/vendors/__generated__/VendorListPage_vendors.graphql.ts
generated
vendored
262
apps/console/src/pages/organizations/vendors/__generated__/VendorListPage_vendors.graphql.ts
generated
vendored
@@ -1,262 +0,0 @@
|
||||
/**
|
||||
* @generated SignedSource<<07023a3f17c448fc24762c05b3a7ff87>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type RiskTier = "CRITICAL" | "GENERAL" | "SIGNIFICANT";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type VendorListPage_vendors$data = {
|
||||
readonly id: string;
|
||||
readonly vendors: {
|
||||
readonly __id: string;
|
||||
readonly edges: ReadonlyArray<{
|
||||
readonly node: {
|
||||
readonly createdAt: string;
|
||||
readonly description: string;
|
||||
readonly id: string;
|
||||
readonly name: string;
|
||||
readonly riskTier: RiskTier;
|
||||
readonly updatedAt: string;
|
||||
};
|
||||
}>;
|
||||
readonly pageInfo: {
|
||||
readonly endCursor: string | null | undefined;
|
||||
readonly hasNextPage: boolean;
|
||||
readonly hasPreviousPage: boolean;
|
||||
readonly startCursor: string | null | undefined;
|
||||
};
|
||||
};
|
||||
readonly " $fragmentType": "VendorListPage_vendors";
|
||||
};
|
||||
export type VendorListPage_vendors$key = {
|
||||
readonly " $data"?: VendorListPage_vendors$data;
|
||||
readonly " $fragmentSpreads": FragmentRefs<"VendorListPage_vendors">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = [
|
||||
"vendors"
|
||||
],
|
||||
v1 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "after"
|
||||
},
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "before"
|
||||
},
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "first"
|
||||
},
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "last"
|
||||
}
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": {
|
||||
"connection": [
|
||||
{
|
||||
"count": null,
|
||||
"cursor": null,
|
||||
"direction": "bidirectional",
|
||||
"path": (v0/*: any*/)
|
||||
}
|
||||
],
|
||||
"refetch": {
|
||||
"connection": {
|
||||
"forward": {
|
||||
"count": "first",
|
||||
"cursor": "after"
|
||||
},
|
||||
"backward": {
|
||||
"count": "last",
|
||||
"cursor": "before"
|
||||
},
|
||||
"path": (v0/*: any*/)
|
||||
},
|
||||
"fragmentPathInResult": [
|
||||
"node"
|
||||
],
|
||||
"operation": require('./VendorListPagePaginationQuery.graphql'),
|
||||
"identifierInfo": {
|
||||
"identifierField": "id",
|
||||
"identifierQueryVariableName": "id"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "VendorListPage_vendors",
|
||||
"selections": [
|
||||
{
|
||||
"alias": "vendors",
|
||||
"args": [
|
||||
{
|
||||
"kind": "Literal",
|
||||
"name": "orderBy",
|
||||
"value": {
|
||||
"direction": "ASC",
|
||||
"field": "NAME"
|
||||
}
|
||||
}
|
||||
],
|
||||
"concreteType": "VendorConnection",
|
||||
"kind": "LinkedField",
|
||||
"name": "__VendorListPage_vendors_connection",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "VendorEdge",
|
||||
"kind": "LinkedField",
|
||||
"name": "edges",
|
||||
"plural": true,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Vendor",
|
||||
"kind": "LinkedField",
|
||||
"name": "node",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "name",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "description",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "createdAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "updatedAt",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "riskTier",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__typename",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "cursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "PageInfo",
|
||||
"kind": "LinkedField",
|
||||
"name": "pageInfo",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasNextPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasPreviousPage",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "startCursor",
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "endCursor",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
{
|
||||
"kind": "ClientExtension",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "__id",
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"storageKey": "__VendorListPage_vendors_connection(orderBy:{\"direction\":\"ASC\",\"field\":\"NAME\"})"
|
||||
},
|
||||
(v1/*: any*/)
|
||||
],
|
||||
"type": "Organization",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "beaab1664bed1fa776659595b1ef3c30";
|
||||
|
||||
export default node;
|
||||
Reference in New Issue
Block a user