Add configurable compliance portal commitment cards
The compliance portal home page rendered security-commitment cards from a hardcoded placeholder POJO. Back them with real, per-organization data that admins configure in the console and the portal loads over the trust center GraphQL API. Model two entities under the trust center: a commitment group (title, description, rank) and a commitment card (icon, eyebrow, title, description, rank). The card icon is a curated enum mapped to a Phosphor icon in the portal. New entities adopt the compliance_portal_ prefix as the start of the broader rename away from trust_center_ naming. Expose the groups and cards read-only on the public trust API and with full CRUD on the console API, add a Commitments tab to the compliance page, and replace the placeholder section with a Relay-driven one. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -106,6 +106,88 @@ enum TrustCenterReferenceOrderField
|
||||
)
|
||||
}
|
||||
|
||||
enum CompliancePortalCommitmentGroupOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentGroupOrderField"
|
||||
) {
|
||||
RANK
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentGroupOrderFieldRank"
|
||||
)
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentGroupOrderFieldCreatedAt"
|
||||
)
|
||||
UPDATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentGroupOrderFieldUpdatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum CompliancePortalCommitmentOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentOrderField"
|
||||
) {
|
||||
RANK
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentOrderFieldRank"
|
||||
)
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentOrderFieldCreatedAt"
|
||||
)
|
||||
UPDATED_AT
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentOrderFieldUpdatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum CompliancePortalCommitmentIcon
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIcon"
|
||||
) {
|
||||
LOCK_KEY
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconLockKey")
|
||||
EYE_SLASH
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconEyeSlash")
|
||||
FINGERPRINT
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconFingerprint")
|
||||
SHIELD_WARNING
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconShieldWarning")
|
||||
SHIELD_CHECK
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconShieldCheck")
|
||||
SIREN
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconSiren")
|
||||
KEY
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconKey")
|
||||
LOCK
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconLock")
|
||||
CLOUD
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconCloud")
|
||||
DATABASE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconDatabase")
|
||||
GLOBE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconGlobe")
|
||||
EYE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconEye")
|
||||
USERS
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconUsers")
|
||||
CERTIFICATE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconCertificate")
|
||||
GAVEL
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconGavel")
|
||||
HEARTBEAT
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconHeartbeat")
|
||||
BELL
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconBell")
|
||||
BUG
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconBug")
|
||||
CODE
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconCode")
|
||||
SERVER
|
||||
@goEnum(value: "go.probo.inc/probo/pkg/coredata.CompliancePortalCommitmentIconServer")
|
||||
}
|
||||
|
||||
enum ComplianceExternalURLOrderField
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/coredata.ComplianceExternalURLOrderField"
|
||||
@@ -218,6 +300,22 @@ input TrustCenterReferenceOrder
|
||||
field: TrustCenterReferenceOrderField!
|
||||
}
|
||||
|
||||
input CompliancePortalCommitmentGroupOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CompliancePortalCommitmentGroupOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: CompliancePortalCommitmentGroupOrderField!
|
||||
}
|
||||
|
||||
input CompliancePortalCommitmentOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CompliancePortalCommitmentOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: CompliancePortalCommitmentOrderField!
|
||||
}
|
||||
|
||||
input TrustCenterFileOrder
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.TrustCenterFileOrderBy"
|
||||
@@ -272,6 +370,14 @@ type TrustCenter implements Node
|
||||
orderBy: TrustCenterReferenceOrder
|
||||
): TrustCenterReferenceConnection! @goField(forceResolver: true)
|
||||
|
||||
commitmentGroups(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: CompliancePortalCommitmentGroupOrder
|
||||
): CompliancePortalCommitmentGroupConnection! @goField(forceResolver: true)
|
||||
|
||||
complianceFrameworks(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
@@ -389,6 +495,66 @@ type TrustCenterReferenceEdge {
|
||||
node: TrustCenterReference!
|
||||
}
|
||||
|
||||
type CompliancePortalCommitmentGroup implements Node {
|
||||
id: ID!
|
||||
title: String!
|
||||
description: String!
|
||||
rank: Int!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
commitments(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: CompliancePortalCommitmentOrder
|
||||
): CompliancePortalCommitmentConnection! @goField(forceResolver: true)
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type CompliancePortalCommitmentGroupConnection
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CompliancePortalCommitmentGroupConnection"
|
||||
) {
|
||||
totalCount: Int! @goField(forceResolver: true)
|
||||
edges: [CompliancePortalCommitmentGroupEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type CompliancePortalCommitmentGroupEdge {
|
||||
cursor: CursorKey!
|
||||
node: CompliancePortalCommitmentGroup!
|
||||
}
|
||||
|
||||
type CompliancePortalCommitment implements Node {
|
||||
id: ID!
|
||||
icon: CompliancePortalCommitmentIcon!
|
||||
eyebrow: String!
|
||||
title: String!
|
||||
description: String!
|
||||
rank: Int!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
permission(action: String!): Boolean! @goField(forceResolver: true)
|
||||
}
|
||||
|
||||
type CompliancePortalCommitmentConnection
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.CompliancePortalCommitmentConnection"
|
||||
) {
|
||||
totalCount: Int! @goField(forceResolver: true)
|
||||
edges: [CompliancePortalCommitmentEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type CompliancePortalCommitmentEdge {
|
||||
cursor: CursorKey!
|
||||
node: CompliancePortalCommitment!
|
||||
}
|
||||
|
||||
type ComplianceFramework implements Node
|
||||
@goModel(
|
||||
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.ComplianceFramework"
|
||||
@@ -514,6 +680,24 @@ extend type Mutation {
|
||||
deleteTrustCenterReference(
|
||||
input: DeleteTrustCenterReferenceInput!
|
||||
): DeleteTrustCenterReferencePayload!
|
||||
createCompliancePortalCommitmentGroup(
|
||||
input: CreateCompliancePortalCommitmentGroupInput!
|
||||
): CreateCompliancePortalCommitmentGroupPayload!
|
||||
updateCompliancePortalCommitmentGroup(
|
||||
input: UpdateCompliancePortalCommitmentGroupInput!
|
||||
): UpdateCompliancePortalCommitmentGroupPayload!
|
||||
deleteCompliancePortalCommitmentGroup(
|
||||
input: DeleteCompliancePortalCommitmentGroupInput!
|
||||
): DeleteCompliancePortalCommitmentGroupPayload!
|
||||
createCompliancePortalCommitment(
|
||||
input: CreateCompliancePortalCommitmentInput!
|
||||
): CreateCompliancePortalCommitmentPayload!
|
||||
updateCompliancePortalCommitment(
|
||||
input: UpdateCompliancePortalCommitmentInput!
|
||||
): UpdateCompliancePortalCommitmentPayload!
|
||||
deleteCompliancePortalCommitment(
|
||||
input: DeleteCompliancePortalCommitmentInput!
|
||||
): DeleteCompliancePortalCommitmentPayload!
|
||||
createComplianceFramework(
|
||||
input: CreateComplianceFrameworkInput!
|
||||
): CreateComplianceFrameworkPayload!
|
||||
@@ -613,6 +797,44 @@ input DeleteTrustCenterReferenceInput {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
input CreateCompliancePortalCommitmentGroupInput {
|
||||
trustCenterId: ID!
|
||||
title: String!
|
||||
description: String!
|
||||
}
|
||||
|
||||
input UpdateCompliancePortalCommitmentGroupInput {
|
||||
id: ID!
|
||||
title: String
|
||||
description: String
|
||||
rank: Int
|
||||
}
|
||||
|
||||
input DeleteCompliancePortalCommitmentGroupInput {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
input CreateCompliancePortalCommitmentInput {
|
||||
groupId: ID!
|
||||
icon: CompliancePortalCommitmentIcon!
|
||||
eyebrow: String!
|
||||
title: String!
|
||||
description: String!
|
||||
}
|
||||
|
||||
input UpdateCompliancePortalCommitmentInput {
|
||||
id: ID!
|
||||
icon: CompliancePortalCommitmentIcon
|
||||
eyebrow: String
|
||||
title: String
|
||||
description: String
|
||||
rank: Int
|
||||
}
|
||||
|
||||
input DeleteCompliancePortalCommitmentInput {
|
||||
id: ID!
|
||||
}
|
||||
|
||||
input CreateComplianceFrameworkInput {
|
||||
trustCenterId: ID!
|
||||
frameworkId: ID!
|
||||
@@ -712,6 +934,30 @@ type DeleteTrustCenterReferencePayload {
|
||||
deletedTrustCenterReferenceId: ID!
|
||||
}
|
||||
|
||||
type CreateCompliancePortalCommitmentGroupPayload {
|
||||
compliancePortalCommitmentGroupEdge: CompliancePortalCommitmentGroupEdge!
|
||||
}
|
||||
|
||||
type UpdateCompliancePortalCommitmentGroupPayload {
|
||||
compliancePortalCommitmentGroup: CompliancePortalCommitmentGroup!
|
||||
}
|
||||
|
||||
type DeleteCompliancePortalCommitmentGroupPayload {
|
||||
deletedCompliancePortalCommitmentGroupId: ID!
|
||||
}
|
||||
|
||||
type CreateCompliancePortalCommitmentPayload {
|
||||
compliancePortalCommitmentEdge: CompliancePortalCommitmentEdge!
|
||||
}
|
||||
|
||||
type UpdateCompliancePortalCommitmentPayload {
|
||||
compliancePortalCommitment: CompliancePortalCommitment!
|
||||
}
|
||||
|
||||
type DeleteCompliancePortalCommitmentPayload {
|
||||
deletedCompliancePortalCommitmentId: ID!
|
||||
}
|
||||
|
||||
type CreateComplianceFrameworkPayload {
|
||||
complianceFrameworkEdge: ComplianceFrameworkEdge!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user