Skip to content

Commit

Permalink
Merge pull request #20 from bcgov/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ychung-mot authored Mar 15, 2024
2 parents 5dee5b0 + 5213deb commit eb102e1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 23 deletions.
7 changes: 4 additions & 3 deletions crunchydb/readme
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
helm install strdss-dev . --values values-dev.yaml
helm install strdssdev . --values values-dev.yaml


Warning: this deletes the database file and backups
oc delete PostgresCluster/strdss-dev
oc delete PostgresCluster/strdssdev


oc port-forward svc/strdss-dev-pgbouncer 5433:5432
oc port-forward svc/strdssdev-pgbouncer 5434:5432

ALTER DATABASE strdssdev OWNER TO strdssdev;
5 changes: 1 addition & 4 deletions frontend/src/app/common/consts/validators.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ export function validateEmailListString(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
let emailList;

if (control.value.constructor === Array) {
emailList = control.value;
}
else {
if (!!control.value) {
emailList = (control.value as string).split(',').filter(x => !!x).map(x => x.trim()) as Array<string>;
}

Expand Down
8 changes: 4 additions & 4 deletions frontend/src/app/common/services/delisting.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ export class DelistingService {
return this.httpClient.post<{ content: string }>(`${environment.API_HOST}/delisting/warnings/preview`, complianceNotice)
}

createComplianceNotice(complianceNotice: ComplianceNotice): Observable<void> {
return this.httpClient.post<void>(`${environment.API_HOST}/delisting/warnings`, complianceNotice)
createComplianceNotice(complianceNotice: ComplianceNotice): Observable<any> {
return this.httpClient.post<any>(`${environment.API_HOST}/delisting/warnings`, complianceNotice)
}

delistingRequestPreview(delistingRequest: ComplianceNotice): Observable<{ content: string }> {
return this.httpClient.post<{ content: string }>(`${environment.API_HOST}/delisting/requests/preview`, delistingRequest)
}

createDelistingRequest(delistingRequest: ComplianceNotice): Observable<void> {
return this.httpClient.post<void>(`${environment.API_HOST}/delisting/requests`, delistingRequest)
createDelistingRequest(delistingRequest: ComplianceNotice): Observable<any> {
return this.httpClient.post<any>(`${environment.API_HOST}/delisting/requests`, delistingRequest)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</div>
<div class="form-group-row-col">
<p-inputMask mask="(999) 999-9999" placeholder="(999) 999-9999" formControlName="LgContactPhone"
id="LgContactPhone" name="LgContactPhone">
inputId="LgContactPhone" name="LgContactPhone">
</p-inputMask>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { DelistingService } from '../../../common/services/delisting.service';
import { DropdownOption } from '../../../common/models/dropdown-option';
import { DialogModule } from 'primeng/dialog';
import { ButtonModule } from 'primeng/button';
import { validateEmailListString, validatePhone, validateUrl } from '../../../common/consts/validators.const';
import { validateEmailListString, validateUrl } from '../../../common/consts/validators.const';
import { ToastModule } from 'primeng/toast';
import { MessageService } from 'primeng/api';
import { HttpErrorResponse } from '@angular/common/http';
Expand Down Expand Up @@ -71,6 +71,7 @@ export class ComplianceNoticeComponent implements OnInit {
onSubmit(comment: string): void {
if (this.myForm.valid) {
const model: ComplianceNotice = this.myForm.value;
model.ccList = this.myForm.value['ccList'].prototype === Array ? this.myForm.value : (this.myForm.value['ccList'] as string).split(',').filter(x => !!x).map(x => x.trim())
model.comment = comment;

this.delistingService.createComplianceNotice(model).subscribe({
Expand Down
16 changes: 6 additions & 10 deletions postgres/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@ Create Extension
CREATE EXTENSION postgis;

Create Database
CREATE DATABASE strdssdev;

CREATE ROLE strdssdev WITH LOGIN PASSWORD 'MMOv7RVwDS';

CREATE DATABASE strdssdev;
CREATE ROLE strdssdev WITH LOGIN PASSWORD '';
ALTER DATABASE strdssdev OWNER TO strdssdev;

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO strdssdev;

ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON TABLES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON SEQUENCES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON FUNCTIONS TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON TYPES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON SCHEMAS TO strdssdev ;
REASSIGN OWNED BY strdssdev TO postgres;
DROP OWNED BY strdssdev;
DROP ROLE strdssdev;

Create Secret

Expand Down

0 comments on commit eb102e1

Please sign in to comment.