Skip to content

Commit

Permalink
Merge pull request #3831 from bcgov/changelog/0.34.2
Browse files Browse the repository at this point in the history
chore: release candidate v0.34.2
  • Loading branch information
junminahn authored and golebu2020 committed Sep 24, 2024
2 parents 3f1cc1a + 05104ab commit e1a3511
Show file tree
Hide file tree
Showing 14 changed files with 184 additions and 55 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
## [0.34.2](https://github.com/bcgov/platform-services-registry/compare/v0.34.0...v0.34.2) (2024-09-24)

### Features

* **3165:** add label and select generic components ([27e2187](https://github.com/bcgov/platform-services-registry/commit/27e218782427c8f1527d229a652adb55bc1b1d3c))
* **3364-3361:** hightlight changes to quota and reorder namespaces ([b6d447d](https://github.com/bcgov/platform-services-registry/commit/b6d447deb45cfac90dabfdb820e6656f3fa05973))
* **3471:** add usage metrics for namespaces pods ([ebed667](https://github.com/bcgov/platform-services-registry/commit/ebed6673955e6efb9154457ae3d856a661da8954))
* **3593-2:** add 'Completed' email template and trigger on edit request completed; update Approved email template ([830bc12](https://github.com/bcgov/platform-services-registry/commit/830bc12fa6ae20f341c12c511712335b2f159a80))
* **3593-2:** adjust email templates for provisioning and editing products ([c28d189](https://github.com/bcgov/platform-services-registry/commit/c28d18973c86bc1f868a1721e454320a13608869))
* **3593-3:** update mermaid diagram ([4cfdbdc](https://github.com/bcgov/platform-services-registry/commit/4cfdbdc3a6c85e49fb471927f6addeaa78f1b3ab))
* **3593:** modify approval email templates and triggers. ([4a65e3f](https://github.com/bcgov/platform-services-registry/commit/4a65e3f9d6ee86f0de15e2efaec5e11e2ba7eb68))
* **3593:** modify request approval email templates and triggers ([e59b808](https://github.com/bcgov/platform-services-registry/commit/e59b80831254c0309cfe517b0482274ae115c0bc))
* **3647:** add saving screenshots, tweak e2e tests and sandbox image pulls ([bb9faa1](https://github.com/bcgov/platform-services-registry/commit/bb9faa14ce87f14ba20b195765edcb04693682c6))
* **3663:** add graphic for when there are no comments to display ([296c19e](https://github.com/bcgov/platform-services-registry/commit/296c19e2ec24747c03eb203435fde07c8adf77a7))
* **3669:** enhance eMOU workflow ([286f486](https://github.com/bcgov/platform-services-registry/commit/286f486c8cecbabcecd37cf7725d9afc81bde673))
* **3697:** add separate billing code by providers ([9e117aa](https://github.com/bcgov/platform-services-registry/commit/9e117aaa2181ca48e17a40a03f86f8af76310ae9))
* **3717:** add an admin script to resend eMOU signing emails ([1b7f909](https://github.com/bcgov/platform-services-registry/commit/1b7f909cde83ac07e55ba69c5297609bca4a495f))
* **3814:** tweak public cloud create test to run in github actions ([093dc74](https://github.com/bcgov/platform-services-registry/commit/093dc7490dfcf0dfeda0bd48c41e9b10b16d7530))
* **analytics:** add quota summary CSV endpoint ([71ffed4](https://github.com/bcgov/platform-services-registry/commit/71ffed46210a78dfa1471c7354fc0e3ef5f950b4))

### Bug Fixes

* **3364:** reorder quota namespaces in private cloud ([ef7335c](https://github.com/bcgov/platform-services-registry/commit/ef7335c88c32e5b168e219c086b855953ec85d42))
* **3573:** capitalize CPU in the request summary page ([cf770a7](https://github.com/bcgov/platform-services-registry/commit/cf770a7489eb695562d7c12fd57e41b0be0163a8))
* **3642:** update eMOU document for platform name ([83b1a1f](https://github.com/bcgov/platform-services-registry/commit/83b1a1fcadf27a71cd1f920dc6ba4b045c86dd3e))
* **3773:** apply minimum validation for delete request decision ([18248a4](https://github.com/bcgov/platform-services-registry/commit/18248a4a2dcd26a3905636b555f846022860ca3f))
* **3782:** resolve the issue approving edit requests ([9e1da00](https://github.com/bcgov/platform-services-registry/commit/9e1da00bcbac02efb53e5980d6ebc6ea78388ee2))
* **3795:** remove duplicate group names ([1004aaf](https://github.com/bcgov/platform-services-registry/commit/1004aaf12c791c3f9763c3faa1ba14a1416989d2))
* **3795:** update Keycloak role fetching logic ([ddd262e](https://github.com/bcgov/platform-services-registry/commit/ddd262ea168b916b922fab3cfb4da4360e4a4271))

### Refactors

* **3731:** revisit comment sections on email templates ([ceb9cd7](https://github.com/bcgov/platform-services-registry/commit/ceb9cd70ee8f79b30fdaeb375fad2d3d11adb700))
* **3747:** optimize email templates ([c189f41](https://github.com/bcgov/platform-services-registry/commit/c189f41022bbb618bda02ee38f69a3cf84c91389))
* **3747:** organize email templates ([d1ee4ef](https://github.com/bcgov/platform-services-registry/commit/d1ee4efeed94e33b0f04aceca995257b5c2332ac))
* **3747:** organize email templates' types ([a822488](https://github.com/bcgov/platform-services-registry/commit/a8224885a74107dc647854cf20516154b5831682))
* **3747:** update the email template function definitions ([352e8d1](https://github.com/bcgov/platform-services-registry/commit/352e8d1c676a15a222578c92cbaae11554fcfb1c))
## [0.34.0](https://github.com/bcgov/platform-services-registry/compare/v0.33.2...v0.34.0) (2024-09-04)

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.34.0
0.34.2
3 changes: 3 additions & 0 deletions app/app/api/public-cloud/products/download/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { EventType, ProjectStatus } from '@prisma/client';
import _ from 'lodash';
import createApiHandler from '@/core/api-handler';
import { NoContent, CsvResponse } from '@/core/responses';
import { ministryKeyToName } from '@/helpers/product';
Expand Down Expand Up @@ -36,6 +37,8 @@ export const POST = createApiHandler({
Description: project.description,
Ministry: ministryKeyToName(project.ministry),
Provider: project.provider,
'Reasons for Selecting Cloud Provider': _.join(project.providerSelectionReasons, ', '),
'Description of Selected Reasons': project.providerSelectionReasonsNote,
'Project Owner Email': project.projectOwner.email,
'Project Owner Name': formatFullName(project.projectOwner),
'Primary Technical Lead Email': project.primaryTechnicalLead.email,
Expand Down
2 changes: 2 additions & 0 deletions app/app/api/public-cloud/requests/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const POST = createApiHandler({
pageSize = 5,
ministry = '',
provider = '',
providerSelectionReasonsNote = '',
providerSelectionReasons = [],
includeInactive = false,
sortKey,
sortOrder,
Expand Down
63 changes: 60 additions & 3 deletions app/components/form/ProjectDescriptionPublic.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Provider } from '@prisma/client';
import classNames from 'classnames';
import { useSession } from 'next-auth/react';
import { useFormContext } from 'react-hook-form';
import { Controller, useFormContext } from 'react-hook-form';
import AGMinistryCheckBox from '@/components/form/AGMinistryCheckBox';
import FormSelect from '@/components/generic/select/FormSelect';
import { ministryOptions, providerOptions } from '@/constants';
import { ministryOptions, providerOptions, reasonForSelectingCloudProviderOptions } from '@/constants';
import FormMultiSelect from '../generic/select/FormMultiSelect';

function stripSpecialCharacters(text: string) {
const pattern = /[^A-Za-z0-9///.:+=@_ ]/g;
Expand All @@ -27,6 +28,7 @@ export default function ProjectDescriptionPublic({
formState: { errors },
getValues,
setValue,
control,
} = useFormContext();

return (
Expand Down Expand Up @@ -109,7 +111,6 @@ export default function ProjectDescriptionPublic({
</p>
{['create', 'edit'].includes(mode) && <AGMinistryCheckBox disabled={disabled} />}
</div>

<div className="sm:col-span-3 sm:ml-10">
<FormSelect
id="provider"
Expand All @@ -135,6 +136,62 @@ export default function ProjectDescriptionPublic({
.
</p>
</div>
<div className="sm:col-span-3 sm:mr-10">
<Controller
name="providerSelectionReasons"
control={control}
defaultValue={[]}
render={({ field: { onChange, value, onBlur } }) => (
<FormMultiSelect
name="providerSelectionReasons"
label="Select Reason for Choosing Cloud Provider"
data={reasonForSelectingCloudProviderOptions}
value={value}
onChange={onChange}
onBlur={onBlur}
disabled={disabled}
classNames={{ wrapper: 'mb-4', label: 'text-lg font-bold', input: 'focus:border-blue-500 border-1.5' }}
/>
)}
/>

<p
className={classNames(
errors.providerSelectionReasons ? 'text-red-400' : '',
'mt-3 text-sm leading-6 text-gray-600',
)}
>
Please select the main reason that led to your choice of the cloud provider.
</p>
</div>
<div className="sm:col-span-3 sm:ml-10">
<label htmlFor="providerSelectionReasonsNote" className="block text-sm font-medium leading-6 text-gray-900">
Description of Reason&#40;s&#41; for Selecting Cloud Provider
</label>
<div className="mt-2">
<textarea
disabled={disabled}
id="providerSelectionReasonsNote"
placeholder="Enter a description of the reason for choosing cloud proider..."
{...register('providerSelectionReasonsNote')}
rows={3}
className={classNames(
'block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6',
disabled
? 'disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-noneinvalid:border-pink-500 invalid:text-pink-600 focus:invalid:border-pink-500 focus:invalid:ring-pink-500'
: '',
)}
/>
</div>
<p
className={classNames(
errors.providerSelectionReasonsNote ? 'text-red-400' : '',
'mt-3 text-sm leading-6 text-gray-600',
)}
>
Please provide a short description of the selected reason &#40;maximum of 1000 characters&#41;
</p>
</div>
</div>
</div>
);
Expand Down
3 changes: 2 additions & 1 deletion app/components/generic/select/FormMultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function FormMultiSelect({
return (
<div className={classNames?.wrapper}>
{label && (
<Label htmlFor={id} className={classNames?.label}>
<Label htmlFor={id} className={classnames(classNames?.label, 'mb-2')}>
{label}
</Label>
)}
Expand All @@ -51,6 +51,7 @@ export default function FormMultiSelect({
value={value}
searchable
disabled={disabled}
clearable
classNames={{ input: classnames('text-md', classNames?.input) }}
/>
</div>
Expand Down
16 changes: 16 additions & 0 deletions app/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,22 @@ export const clusterNames = [

export const AGMinistries = ['AG', 'PSSG', 'EMBC', 'HOUS'];

export const reasonForSelectingCloudProviderOptions = [
{ value: 'Cost Efficiency', label: 'Cost Efficiency' },
{ value: 'Scalability Needs', label: 'Scalability Needs' },
{ value: 'Security Level', label: 'Security Level' },
{ value: 'High Availability/Disaster Recovery Features', label: 'High Availability/Disaster Recovery Features' },
{
value: 'Specialized Cloud Services (e.g., AI/ML, Big Data)',
label: 'Specialized Cloud Services (e.g., AI/ML, Big Data)',
},
{ value: 'Vendor Preference', label: 'Vendor Preference' },
{ value: 'My Team Expertise', label: 'My Team Expertise' },
{ value: 'Internal Support Level Within OCIO', label: 'Internal Support Level within OCIO' },
{ value: 'Project-Specific Requirements', label: 'Project-Specific Requirements' },
{ value: 'Other', label: 'Other' },
];

export const productSorts = [
{
sortKey: 'updatedAt',
Expand Down
2 changes: 1 addition & 1 deletion app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pltsvc-app",
"description": "B.C. Government's Platform Product Registry - App",
"version": "0.34.0",
"version": "0.34.2",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
94 changes: 49 additions & 45 deletions app/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -232,54 +232,58 @@ type PublicCloudDataChanges {
}

model PublicCloudProject {
id String @id @default(auto()) @map("_id") @db.ObjectId
licencePlate String @unique
name String
description String
status ProjectStatus
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
billingId String @db.ObjectId
billing Billing @relation("billing", fields: [billingId], references: [id])
budget Budget
projectOwnerId String @db.ObjectId
projectOwner User @relation("projectOwner", fields: [projectOwnerId], references: [id])
primaryTechnicalLeadId String @db.ObjectId
primaryTechnicalLead User @relation("primaryTechnicalLead", fields: [primaryTechnicalLeadId], references: [id])
secondaryTechnicalLeadId String? @db.ObjectId
secondaryTechnicalLead User? @relation("secondaryTechnicalLead", fields: [secondaryTechnicalLeadId], references: [id])
expenseAuthorityId String? @db.ObjectId
expenseAuthority User? @relation("expenseAuthority", fields: [expenseAuthorityId], references: [id])
ministry Ministry
provider Provider
environmentsEnabled EnvironmentsEnabled
requests PublicCloudRequest[] @relation("project")
id String @id @default(auto()) @map("_id") @db.ObjectId
licencePlate String @unique
name String
description String
status ProjectStatus
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
billingId String @db.ObjectId
billing Billing @relation("billing", fields: [billingId], references: [id])
budget Budget
projectOwnerId String @db.ObjectId
projectOwner User @relation("projectOwner", fields: [projectOwnerId], references: [id])
primaryTechnicalLeadId String @db.ObjectId
primaryTechnicalLead User @relation("primaryTechnicalLead", fields: [primaryTechnicalLeadId], references: [id])
secondaryTechnicalLeadId String? @db.ObjectId
secondaryTechnicalLead User? @relation("secondaryTechnicalLead", fields: [secondaryTechnicalLeadId], references: [id])
expenseAuthorityId String? @db.ObjectId
expenseAuthority User? @relation("expenseAuthority", fields: [expenseAuthorityId], references: [id])
ministry Ministry
provider Provider
providerSelectionReasons String[]
providerSelectionReasonsNote String?
environmentsEnabled EnvironmentsEnabled
requests PublicCloudRequest[] @relation("project")
}

model PublicCloudRequestedProject {
id String @id @default(auto()) @map("_id") @db.ObjectId
licencePlate String
name String
description String
status ProjectStatus
createdAt DateTime @default(now())
billingId String @db.ObjectId
billing Billing @relation("billing", fields: [billingId], references: [id])
budget Budget
projectOwnerId String @db.ObjectId
projectOwner User @relation("projectOwner", fields: [projectOwnerId], references: [id])
primaryTechnicalLeadId String @db.ObjectId
primaryTechnicalLead User @relation("primaryTechnicalLead", fields: [primaryTechnicalLeadId], references: [id])
secondaryTechnicalLeadId String? @db.ObjectId
secondaryTechnicalLead User? @relation("secondaryTechnicalLead", fields: [secondaryTechnicalLeadId], references: [id])
expenseAuthorityId String? @db.ObjectId
expenseAuthority User? @relation("expenseAuthority", fields: [expenseAuthorityId], references: [id])
ministry Ministry
provider Provider
environmentsEnabled EnvironmentsEnabled
decisionRequests PublicCloudRequest[] @relation("decisionData")
requestRequests PublicCloudRequest[] @relation("requestData")
originalRequests PublicCloudRequest[] @relation("originalData")
id String @id @default(auto()) @map("_id") @db.ObjectId
licencePlate String
name String
description String
status ProjectStatus
createdAt DateTime @default(now())
billingId String @db.ObjectId
billing Billing @relation("billing", fields: [billingId], references: [id])
budget Budget
projectOwnerId String @db.ObjectId
projectOwner User @relation("projectOwner", fields: [projectOwnerId], references: [id])
primaryTechnicalLeadId String @db.ObjectId
primaryTechnicalLead User @relation("primaryTechnicalLead", fields: [primaryTechnicalLeadId], references: [id])
secondaryTechnicalLeadId String? @db.ObjectId
secondaryTechnicalLead User? @relation("secondaryTechnicalLead", fields: [secondaryTechnicalLeadId], references: [id])
expenseAuthorityId String? @db.ObjectId
expenseAuthority User? @relation("expenseAuthority", fields: [expenseAuthorityId], references: [id])
ministry Ministry
provider Provider
providerSelectionReasons String[]
providerSelectionReasonsNote String?
environmentsEnabled EnvironmentsEnabled
decisionRequests PublicCloudRequest[] @relation("decisionData")
requestRequests PublicCloudRequest[] @relation("requestData")
originalRequests PublicCloudRequest[] @relation("originalData")
}

type EnvironmentsEnabled {
Expand Down
2 changes: 2 additions & 0 deletions app/request-actions/public-cloud/create-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export default async function createRequest(formData: PublicCloudCreateRequestBo
name: formData.name,
budget: formData.budget,
provider: formData.provider,
providerSelectionReasons: formData.providerSelectionReasons,
providerSelectionReasonsNote: formData.providerSelectionReasonsNote,
description: formData.description,
ministry: formData.ministry,
status: ProjectStatus.ACTIVE,
Expand Down
Loading

0 comments on commit e1a3511

Please sign in to comment.