Skip to content

Commit

Permalink
Merge pull request #116 from Resgrid/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ucswift authored May 10, 2024
2 parents e7ad161 + d461292 commit fe6a31f
Show file tree
Hide file tree
Showing 822 changed files with 291,602 additions and 11,564 deletions.
15 changes: 15 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version = 1

[[analyzers]]
name = "csharp"


[[analyzers]]
name = "javascript"

[analyzers.meta]
plugins = ["angular"]


[analyzers.meta]
runtime_version = "3.x.x"
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
**/node_modules
LICENSE
README.md
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "develop"
schedule:
interval: "weekly"
26 changes: 26 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto approve

on:
issue_comment:
types:
- created

jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v6
name: Approve LGTM Review
if: github.actor == 'ucswift' && contains(github.event.comment.body, 'Approve')
with:
script: |
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
review_id: 1,
event: 'APPROVE',
body: 'This PR is approved.'
})
26 changes: 26 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
pull_request:
branches: [ "master", "develop" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,9 @@ deploy.cmd
Packages.dgml
OffRuleSet.ruleset
Build/*
Resgrid.sln
Resgrid.xml
Resgrid-NoCore.sln
.idea/*
Tests/Resgrid.TestHarness/*
Tests/Resgrid.TestHarnessCore/*
Tests/Resgrid.SmokeTests/*
Web/Resgrid.WebCore/appsettings.Azure.json
Web/Resgrid.WebCore/appsettings.Development.json
Web/Resgrid.WebCore/appsettings.Production.json
Expand Down Expand Up @@ -194,13 +191,9 @@ Common/resgrid.local.pfx
Web/Resgrid.Web.ServicesCore/Properties/serviceDependencies.json
Web/Resgrid.Web.ServicesCore/Properties/serviceDependencies.local.json
Web/Resgrid.Web.ServicesCore/Properties/ServiceDependencies/local/appInsights1.arm.json

Docker/docker-data/dms/mail-state/lib-clamav/bytecode.cvd

Docker/docker-data/dms/mail-state/lib-clamav/daily.cvd

Docker/docker-data/dms/mail-state/lib-clamav/freshclam.dat

Docker/docker-data/dms/mail-state/lib-clamav/main.cvd
Docker/docker-data/dms/config/dovecot-quotas.cf
Docker/docker-data/dms/config/mailconfig
Expand Down Expand Up @@ -308,3 +301,4 @@ Web/Resgrid.WebCore/wwwroot/js/ng/main.js
Web/Resgrid.WebCore/wwwroot/js/ng/polyfills.js
Web/Resgrid.WebCore/wwwroot/js/ng/runtime.js
Web/Resgrid.WebCore/wwwroot/js/ng/styles.css
Web/Resgrid.WebCore/wwwroot/js/ng/*
26 changes: 26 additions & 0 deletions Common/Resgrid/Auth/Login.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
meta {
name: Login
type: http
seq: 1
}

post {
url: {{BASE_API_URL}}/connect/token
body: formUrlEncoded
auth: none
}

headers {
Content-Type: application/x-www-form-urlencoded
}

body:form-urlencoded {
grant_type: password
scope: openid profile offline_access
username: {{USERNAME}}
password: {{PASSWORD}}
}

vars:post-response {
access_token: res.body.access_token
}
36 changes: 36 additions & 0 deletions Common/Resgrid/CreateCall.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
meta {
name: CreateCall
type: http
seq: 1
}

post {
url: {{BASE_API_URL}}/Calls/SaveCall
body: json
auth: bearer
}

auth:bearer {
token: {{access_token}}
}

body:json {
{
"Priority": "1",
"Name": "Jane Smith",
"Nature": "This is the nature of my call",
"Note": "These are the notes of the call",
"Address": "123 Main St., Wilmington, OH",
"Geolocation": "",
"Type": "",
"What3Words": "",
"DispatchList": "U:5733",
"ContactName": "null",
"ContactInfo": "null",
"ExternalId": "null",
"IncidentId": "null",
"ReferenceId": "null",
"DispatchOn": "2024-03-07T02:32:53.842Z",
"CallFormData": "null"
}
}
9 changes: 9 additions & 0 deletions Common/Resgrid/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "1",
"name": "Resgrid",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}
5 changes: 5 additions & 0 deletions Common/Resgrid/environments/Dev.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vars:secret [
BASE_API_URL,
USERNAME,
PASSWORD
]
2 changes: 2 additions & 0 deletions Common/Resgrid/environments/QA.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vars {
}
5 changes: 5 additions & 0 deletions Core/Resgrid.Config/ApiConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ public static class ApiConfig
/// Allowed Methods (verbs) for CORS access. NOTE: CANNOT BE SET VIA THE CONFIG FILE.
/// </summary>
public const string CorsAllowedMethods = "GET,POST,PUT,DELETE,OPTIONS";

/// <summary>
/// Key used for authing with the backend internal apis
/// </summary>
public static string BackendInternalApikey = "";
}
}
13 changes: 13 additions & 0 deletions Core/Resgrid.Config/AuditConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Resgrid.Config
{
/// <summary>
/// Config settings for the operation of the auditing sub-system
/// </summary>
public static class AuditConfig
{
/// <summary>
/// Connection string to the audit database
/// </summary>
public static string ConnectionString = "Server=rgdevserver;Database=ResgridAudit;User Id=resgrid_audit;Password=resgrid123;MultipleActiveResultSets=True;";
}
}
4 changes: 2 additions & 2 deletions Core/Resgrid.Config/ChatConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public static class ChatConfig
{
public static string DepartmentChatPrefix = "";
public static string DepartmentGroupChatPrefix = "";
public static string DepartmentChatPrefix = "D1_";
public static string DepartmentGroupChatPrefix = "DG1_";
}
}
5 changes: 5 additions & 0 deletions Core/Resgrid.Config/ConfigProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public static bool LoadAndProcessConfig(string path = null)
FieldInfo prop = configObj.GetField(parts[1]);
if (null != prop)
{
Console.WriteLine($"Resgrid.Config: Setting Value for {prop.ToString()}");

if (prop.FieldType.BaseType == typeof(Enum))
{
Type t = Nullable.GetUnderlyingType(prop.FieldType) ?? prop.FieldType;
Expand Down Expand Up @@ -72,6 +74,8 @@ public static bool LoadAndProcessConfig(string path = null)

public static bool LoadAndProcessEnvVariables(IEnumerable<KeyValuePair<string, string>> values)
{
Console.WriteLine($"Resgrid.Config: Processing Environment Variables");

bool hasSetAtLeastOneVariable = false;

try
Expand All @@ -94,6 +98,7 @@ public static bool LoadAndProcessEnvVariables(IEnumerable<KeyValuePair<string, s
if (null != prop)
{
Console.WriteLine($"Resgrid.Config: Setting Value for {prop.ToString()}");

if (prop.FieldType.BaseType == typeof(Enum))
{
Type t = Nullable.GetUnderlyingType(prop.FieldType) ?? prop.FieldType;
Expand Down
Loading

0 comments on commit fe6a31f

Please sign in to comment.