Skip to content

Commit

Permalink
Merge pull request #2410 from bcgov/release/is39_master
Browse files Browse the repository at this point in the history
Test -> Master - IS39 UAT Release
  • Loading branch information
asanchezr authored Nov 10, 2022
2 parents 01f075f + 4c3709c commit 1087696
Show file tree
Hide file tree
Showing 460 changed files with 145,959 additions and 55,703 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ etl/**/obj
*.database
*.bak
*._*

2 changes: 1 addition & 1 deletion etl/PAIMS_PIMS/PAIMS_PIMS.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 15
# Visual Studio Version 16
VisualStudioVersion = 16.0.31410.223
MinimumVisualStudioVersion = 10.0.40219.1
Project("{159641D6-6404-4A2A-AE62-294DE0FE8301}") = "MOTI_LEGACY_PAIMS_PIMS_DATA_MIGRATION", "PAIMS_PIMS\MOTI_LEGACY_PAIMS_PIMS_DATA_MIGRATION.dtproj", "{B397C83F-BE2D-40DC-BB7A-BBF9B4084114}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
<SSIS:Property SSIS:Name="Name">Package2</SSIS:Property>
<SSIS:Property SSIS:Name="VersionMajor">1</SSIS:Property>
<SSIS:Property SSIS:Name="VersionMinor">0</SSIS:Property>
<SSIS:Property SSIS:Name="VersionBuild">898</SSIS:Property>
<SSIS:Property SSIS:Name="VersionBuild">1050</SSIS:Property>
<SSIS:Property SSIS:Name="VersionComments">
</SSIS:Property>
<SSIS:Property SSIS:Name="VersionGUID">{A12A074F-9939-4AF6-BB0A-76AEE0F0F890}</SSIS:Property>
<SSIS:Property SSIS:Name="VersionGUID">{C4C1A9A7-8ABF-4DE3-B43A-48697E85FE1D}</SSIS:Property>
<SSIS:Property SSIS:Name="PackageFormatVersion">8</SSIS:Property>
<SSIS:Property SSIS:Name="Description">
</SSIS:Property>
Expand Down Expand Up @@ -77,7 +77,7 @@
<SSIS:Property SSIS:Name="IncludeInDebugDump">0</SSIS:Property>
<SSIS:Property SSIS:Name="Required">0</SSIS:Property>
<SSIS:Property SSIS:Name="Sensitive">0</SSIS:Property>
<SSIS:Property SSIS:Name="Value">Data Source=lizzard.th.gov.bc.ca:20208/TST11;User ID=prisharm;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;</SSIS:Property>
<SSIS:Property SSIS:Name="Value">Data Source=lizzard.th.gov.bc.ca:20208/DEV03;User ID=prisharm;Provider=OraOLEDB.Oracle.1;Persist Security Info=True;</SSIS:Property>
<SSIS:Property SSIS:Name="DataType">18</SSIS:Property>
</SSIS:Properties>
</SSIS:Parameter>
Expand Down Expand Up @@ -180,7 +180,7 @@
<SSIS:Property SSIS:Name="IncludeInDebugDump">0</SSIS:Property>
<SSIS:Property SSIS:Name="Required">0</SSIS:Property>
<SSIS:Property SSIS:Name="Sensitive">0</SSIS:Property>
<SSIS:Property SSIS:Name="Value">lizzard.th.gov.bc.ca:20208/TST11</SSIS:Property>
<SSIS:Property SSIS:Name="Value">lizzard.th.gov.bc.ca:20208/DEV03</SSIS:Property>
<SSIS:Property SSIS:Name="DataType">18</SSIS:Property>
</SSIS:Properties>
</SSIS:Parameter>
Expand Down Expand Up @@ -225,7 +225,7 @@
<SSIS:Property SSIS:Name="IncludeInDebugDump">0</SSIS:Property>
<SSIS:Property SSIS:Name="Required">0</SSIS:Property>
<SSIS:Property SSIS:Name="Sensitive">0</SSIS:Property>
<SSIS:Property SSIS:Name="Value">Data Source=sqldevtst.th.gov.bc.ca;Initial Catalog=PIMS_TST;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;</SSIS:Property>
<SSIS:Property SSIS:Name="Value">Data Source=sqldevtst.th.gov.bc.ca;Initial Catalog=PIMS_DEV;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;</SSIS:Property>
<SSIS:Property SSIS:Name="DataType">18</SSIS:Property>
</SSIS:Properties>
</SSIS:Parameter>
Expand Down Expand Up @@ -285,7 +285,7 @@
<SSIS:Property SSIS:Name="IncludeInDebugDump">0</SSIS:Property>
<SSIS:Property SSIS:Name="Required">0</SSIS:Property>
<SSIS:Property SSIS:Name="Sensitive">0</SSIS:Property>
<SSIS:Property SSIS:Name="Value">PIMS_TST</SSIS:Property>
<SSIS:Property SSIS:Name="Value">PIMS_DEV</SSIS:Property>
<SSIS:Property SSIS:Name="DataType">18</SSIS:Property>
</SSIS:Properties>
</SSIS:Parameter>
Expand Down
70,961 changes: 59,606 additions & 11,355 deletions etl/PAIMS_PIMS/PAIMS_PIMS/PAM_LOAD_PAIMS_TO_PIMS_DATASET_2.dtsx

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions openshift/4.0/templates/clamav/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The files in our repo are merely included for reference.

Create the build configuration using:

oc process -f ./openshift/templates/clamav-bc.conf | oc create -f -
oc process -f ./openshift/4.0/templates/clamav/clamav-bc.conf | oc create -f -

https://github.com/bcgov/clamav/blob/ocp4/openshift/templates/clamav-bc.conf

Expand All @@ -20,12 +20,26 @@ ensure that you manually build and tag the image for all desired target environm

Create the deployment configuration using:

oc process -f ./openshift/templates/clamav-dc.conf -p IMAGE_NAMESPACE=3cd915-tools -p TAG_NAME=latest | oc create -f -
oc process -f ./openshift/4.0/templates/clamav/clamav-dc.conf -p IMAGE_NAMESPACE=3cd915-tools -p TAG_NAME=latest | oc create -f -

https://github.com/bcgov/clamav/blob/ocp4/openshift/templates/clamav-dc.conf

Note that the above can be replaced by any tag, and it is recommended to create one clamav tag for each environment

## Automatic Updates

Create the cron job configuration using:

oc process -f ./openshift/4.0/templates/clamav/clamav-cron.conf -p CLAMAV_NAME=<insert name of clamav pod in target environment> | oc create -f -

Next, import the ose-cli image into the 3cd915-tools namespace:

oc import-image openshift4/ose-cli:v4.11.0-202210061001.p0.g262ac9c.assembly.stream --from=registry.redhat.io/openshift4/ose-cli:v4.11.0-202210061001.p0.g262ac9c.assembly.stream --confirm

And then retag the imported image:

oc tag ose-cli:v4.11.0-202210061001.p0.g262ac9c.assembly.stream ose-cli:latest

## PIMS API Configuration

In order to consume the clamav service, the following environment variables are required in PIMS-API:
Expand Down
56 changes: 56 additions & 0 deletions openshift/4.0/templates/clamav/clamav-cron.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
kind: Template
apiVersion: v1
metadata:
name: pims-app-build
annotations:
openshift.io/display-name: Nginx with Node build
description: Build template for a Nginx with Node build
tags: pims,app
parameters:
- name: CLAMAV_NAME
displayName: "ClamAv Name"
description: "The name of the clamav pod."
required: true
value: "pims"
objects:
- kind: CronJob
apiVersion: batch/v1
metadata:
name: clamav-update
namespace: 3cd915-dev
uid: df5c62d8-54d6-4c92-bdf9-06178f1adb03
resourceVersion: '4840975848'
generation: 13
creationTimestamp: '2022-10-20T04:18:13Z'
spec:
schedule: '@daily'
concurrencyPolicy: Allow
suspend: false
jobTemplate:
metadata:
creationTimestamp: null
spec:
template:
metadata:
creationTimestamp: null
spec:
containers:
- name: clamav-updater
image: >-
image-registry.apps.silver.devops.gov.bc.ca/3cd915-tools/ose-cli:latest
args:
- oc
- rollout
- latest
- dc/${CLAMAV_NAME}
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: OnFailure
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
4 changes: 2 additions & 2 deletions source/backend/api/Areas/Leases/Mapping/Lease/LeaseMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.Properties, src => src.PimsPropertyLeases)
.Map(dest => dest.Insurances, src => src.PimsInsurances)
.Map(dest => dest.LFileNo, src => src.LFileNo)
.Map(dest => dest.TfaFileNo, src => src.TfaFileNo)
.Map(dest => dest.TfaFileNumber, src => src.TfaFileNumber)
.Map(dest => dest.PsFileNo, src => src.PsFileNo)
.Map(dest => dest.MotiName, src => src.GetMotiName())
.Map(dest => dest.ExpiryDate, src => src.GetExpiryDate())
Expand Down Expand Up @@ -66,8 +66,8 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.LeaseAmount, src => src.Amount)
.Map(dest => dest.PimsPropertyLeases, src => src.Properties)
.Map(dest => dest.LFileNo, src => src.LFileNo)
.Map(dest => dest.TfaFileNo, src => src.TfaFileNo)
.Map(dest => dest.PsFileNo, src => src.PsFileNo)
.Map(dest => dest.TfaFileNumber, src => src.TfaFileNumber)
.Map(dest => dest.MotiContact, src => src.MotiName)
.Map(dest => dest.LeaseCategoryOtherDesc, src => src.OtherCategoryType)
.Map(dest => dest.OtherLeaseProgramType, src => src.OtherProgramType)
Expand Down
2 changes: 1 addition & 1 deletion source/backend/api/Areas/Leases/Models/Lease/LeaseModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class LeaseModel
/// <summary>
/// get/set - The LIS TFA File #.
/// </summary>
public string TfaFileNo { get; set; }
public string TfaFileNumber { get; set; }

/// <summary>
/// get/set - The LIS Ps File #.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public class LeaseFilterModel : PageFilter
/// </summary>
public string Address { get; set; }

/// <summary>
/// get/set - Search by historical LIS or PS file numbers.
/// </summary>
public string Historical { get; set; }

/// <summary>
/// get/set - The lease status types.
/// </summary>
Expand Down Expand Up @@ -82,6 +87,7 @@ public LeaseFilterModel(Dictionary<string, Microsoft.Extensions.Primitives.Strin
this.PinOrPid = filter.GetStringValue(nameof(this.PinOrPid));
this.LFileNo = filter.GetStringValue(nameof(this.LFileNo));
this.Address = filter.GetStringValue(nameof(this.Address));
this.Historical = filter.GetStringValue(nameof(this.Historical));
this.LeaseStatusTypes = filter.GetStringArrayValue(nameof(this.LeaseStatusTypes));
this.TenantName = filter.GetStringValue(nameof(this.TenantName));
this.Programs = filter.GetStringArrayValue(nameof(this.Programs));
Expand Down Expand Up @@ -109,6 +115,7 @@ public static explicit operator LeaseFilter(LeaseFilterModel model)
PinOrPid = model.PinOrPid,
LFileNo = model.LFileNo,
Address = model.Address,
Historical = model.Historical,
LeaseStatusTypes = model.LeaseStatusTypes,
TenantName = model.TenantName,
Programs = model.Programs,
Expand Down Expand Up @@ -138,6 +145,7 @@ public override bool IsValid()
|| !string.IsNullOrWhiteSpace(PinOrPid)
|| !string.IsNullOrWhiteSpace(LFileNo)
|| !string.IsNullOrWhiteSpace(Address)
|| !string.IsNullOrWhiteSpace(Historical)
|| (LeaseStatusTypes.Count != 0)
|| !string.IsNullOrWhiteSpace(TenantName)
|| (Programs.Count != 0)
Expand Down
8 changes: 4 additions & 4 deletions source/backend/api/Pims.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<UserSecretsId>0ef6255f-9ea0-49ec-8c65-c172304b4926</UserSecretsId>
<Version>2.2.0-38.24</Version>
<Version>2.2.0-38.24</Version>
<AssemblyVersion>2.2.0.38</AssemblyVersion>
<Version>2.2.0-39.24</Version>
<Version>2.2.0-39.24</Version>
<AssemblyVersion>2.2.0.39</AssemblyVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProjectGuid>16BC0468-78F6-4C91-87DA-7403C919E646</ProjectGuid>
</PropertyGroup>
Expand Down Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.0.0" />
<PackageReference Include="NetTopologySuite.IO.GeoJSON" Version="2.0.4" />
<PackageReference Include="NuGet.CommandLine" Version="5.11.2">
<PackageReference Include="NuGet.CommandLine" Version="5.11.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
5 changes: 5 additions & 0 deletions source/backend/dal/Helpers/Extensions/LeaseExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ public static string GetTenantName(this Pims.Dal.Entities.PimsLeaseTenant lease)
query = query.Where(l => EF.Functions.Like(l.LFileNo, $"%{filter.LFileNo}%"));
}

if (!string.IsNullOrWhiteSpace(filter.Historical))
{
query = query.Where(l => EF.Functions.Like(l.PsFileNo, $"%{filter.Historical}%") || EF.Functions.Like(l.TfaFileNumber, $"%{filter.Historical}%"));
}

if (!string.IsNullOrWhiteSpace(filter.Address))
{
query = query.Where(l => l.PimsPropertyLeases.Any(pl => pl != null &&
Expand Down
9 changes: 8 additions & 1 deletion source/backend/dal/Models/LeaseFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ public class LeaseFilter : PageFilter
/// </summary>
public string Address { get; set; }

/// <summary>
/// get/set - Search by historical LIS or PS file numbers.
/// </summary>
public string Historical { get; set; }

/// <summary>
/// get/set - The lease status types.
/// </summary>
Expand Down Expand Up @@ -70,11 +75,12 @@ public class LeaseFilter : PageFilter
/// </summary>
public DateTime? ExpiryEndDate { get; set; }

public LeaseFilter(string lFileNo, string tenantName, string pinOrPid, string[] sort)
public LeaseFilter(string lFileNo, string tenantName, string pinOrPid, string historical, string[] sort)
{
this.LFileNo = lFileNo;
this.TenantName = tenantName;
this.PinOrPid = pinOrPid;
this.Historical = historical;
this.Sort = sort;
}

Expand Down Expand Up @@ -116,6 +122,7 @@ public override bool IsValid()
|| !string.IsNullOrWhiteSpace(PinOrPid)
|| !string.IsNullOrWhiteSpace(LFileNo)
|| !string.IsNullOrWhiteSpace(Address)
|| !string.IsNullOrWhiteSpace(Historical)
|| (LeaseStatusTypes.Count != 0)
|| !string.IsNullOrWhiteSpace(TenantName)
|| (Programs.Count != 0)
Expand Down
Loading

0 comments on commit 1087696

Please sign in to comment.