Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
2e94b70
Merge off developer (#185)
willywil548 May 3, 2022
cd0c7b5
new table created under sql file
MahiGitH Feb 19, 2024
f839e5a
message
MahiGitH Feb 20, 2024
43415f3
The navigation bar was updated. It needs C# code to make the mobile h…
Feb 20, 2024
27baede
The Submit Project UI was updated.
jadev66 Feb 20, 2024
3b40b5d
updates to /projectlist
Mar 1, 2024
de26f11
Merge remote-tracking branch 'origin/developer_test' into developer_test
Mar 1, 2024
3028f6b
updated projectlist path
Mar 1, 2024
09cf8f6
Added breaks for Questions page
Willo567 Mar 2, 2024
7a76e88
implemented drop down
ytang913 Mar 2, 2024
84fc80b
updates to /IndividualProject page
Mar 2, 2024
83ec4c2
new file added
MahiGitH Mar 5, 2024
84a794e
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
MahiGitH Mar 8, 2024
70b07b9
Added automated email functionality for when questions or project ide…
Willo567 Mar 10, 2024
7df19cc
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Willo567 Mar 10, 2024
f61e6c0
adding drag/drop
ytang913 Mar 12, 2024
34d49e7
file upload progress bar change
Hgetahun2024 Mar 14, 2024
844dce8
I am not a robot check box
Hgetahun2024 Mar 15, 2024
21644ed
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
MahiGitH Mar 15, 2024
2ecba4f
new code added to UMGCHeader.razor and UMGCHeader.css files for mobil…
MahiGitH Mar 16, 2024
4337342
adding plus/minus button
ytang913 Mar 17, 2024
db2f93e
refinements to navigation bar
Mar 19, 2024
98b9c23
modified Projects and Manage Projects pages
Mar 19, 2024
642cb94
modified Projects and Manage Projects pages
Mar 19, 2024
a3d5dff
Changed format of main link buttons on Submit Project page
jadev66 Mar 21, 2024
5726e39
Changed button colors for Submit Project and FAQs so they match with …
jadev66 Mar 22, 2024
3ef6be9
Centered the document upload area on the Submit Project page
jadev66 Mar 22, 2024
3758765
faq page modified
MahiGitH Mar 22, 2024
1e4d3ea
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
MahiGitH Mar 22, 2024
51f07c2
.net framwork updated to 8.0
MahiGitH Mar 22, 2024
6f099e0
Re-added the automated email for when a new Project Idea is submitted
Willo567 Mar 23, 2024
f40a2a7
modified IndividualManageProject.razor
Mar 23, 2024
dcb6abd
modified IndividualManageProject.razor
Mar 23, 2024
6813e99
mobile nav item color changed to white
MahiGitH Mar 23, 2024
cc03329
Reenabled the fileter boxes for the Projects and Manage Projects page
Willo567 Mar 24, 2024
410b7ce
update for I am not robot box
Hgetahun2024 Mar 25, 2024
cb642d4
Changed the buttons on the Question page to use bootstrap, changed th…
Willo567 Mar 26, 2024
ea6960d
Added the email functionality back in again
Willo567 Mar 26, 2024
d557671
Fixed projects marked as New not loading when clicked on in Projects …
Willo567 Mar 26, 2024
3836839
adding display file
ytang913 Mar 26, 2024
2dbcc92
adding drag/drop code
ytang913 Mar 27, 2024
9414eca
adding new links code
ytang913 Mar 27, 2024
edad1bb
added Edit button to Projects page
Mar 27, 2024
a39440f
Fixed the functionality of the Update, Delete and Approve buttons.
Willo567 Mar 27, 2024
1ec2114
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Willo567 Mar 27, 2024
cb52b0f
adding links code
ytang913 Mar 28, 2024
b032e7e
introduction paragraph add to submit page
MahiGitH Mar 28, 2024
e082393
removing global.js and .mono from project
Mar 28, 2024
fdbdd15
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Mar 28, 2024
a138b6f
removed .mono and global.json
Mar 28, 2024
5a3866e
Fixed the fields in the Individual Project page updating upon clicki…
Willo567 Mar 28, 2024
26ea9f5
Merge branch 'developer_link_url' into developer_test
Willo567 Mar 28, 2024
5a769cd
Removed setting the urls for a project for now due to it working diff…
Willo567 Mar 28, 2024
ce48753
Paragraph added to Questions and Projects pages
MahiGitH Mar 28, 2024
b70603b
added AuthorizeView to Edit button
Mar 28, 2024
6808daf
Fixed the attachements for New Projects not showing up, as well as re…
Willo567 Mar 29, 2024
8cad771
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Willo567 Mar 29, 2024
134a9e0
Reworked the comments section of the Individual Manage Project page
Willo567 Mar 29, 2024
6ccc333
Removed Manage Projects from the navigation bar
Mar 29, 2024
ae00165
Got the "Upload Document" button in the Manage Project page to be fun…
Willo567 Mar 29, 2024
7e3b7ea
Changed second line of Submit Project paragraph from student focus to…
jadev66 Mar 29, 2024
508a154
Re-Implemented the complete project functionality
Willo567 Mar 29, 2024
b81b495
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Willo567 Mar 29, 2024
1f62779
Fixed the functionality for adding links, urls and team members to a …
Willo567 Mar 30, 2024
9e9439f
Fixed issue involving submitting project with multiple team members a…
Willo567 Mar 30, 2024
cb552fd
Made all of the red buttons the same shade of red so that the buttons…
Willo567 Mar 30, 2024
3c4584a
added Edit Project column and Edit button
Mar 30, 2024
b110c04
added Edit Project column and Edit button
Mar 30, 2024
957d033
deleted .mono
Mar 30, 2024
4802306
added Edit Project column and Edit button
Mar 30, 2024
53b5cbe
Fixed the documents still being attached to project ideas even if rem…
Willo567 Mar 30, 2024
b4ffd9c
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Willo567 Mar 30, 2024
bbca023
Changed width of FAQ Modify form boxes
jadev66 Apr 1, 2024
3212da0
Changed Edit button text for when user is not logged in to "Edit" as …
Willo567 Apr 1, 2024
541b343
Fixed an issue where if there were no team members or links, then a b…
Willo567 Apr 1, 2024
059bb1a
Changed email to be Rob Wilson's email (Our primary stakeholder)
Willo567 Apr 1, 2024
98eb54c
Merge branch 'developer' of https://github.com/umgc/DevSecOpsPlaygrou…
Apr 6, 2024
9c5c7ea
Merge branch 'developer' of https://github.com/umgc/DevSecOpsPlaygrou…
Apr 6, 2024
af8edc3
Willywil/developer test/fix (#240)
willywil548 Apr 6, 2024
cb1cdc3
Merge branch 'developer_test' of https://github.com/umgc/DevSecOpsPla…
Apr 6, 2024
597f71b
update half of the projects
Apr 7, 2024
df4a1c0
remove commented code.
Apr 7, 2024
b75c91e
Merge branch 'developer' into developer_test
mikecollins08 Apr 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<values>
<value name="StillAlive" type="qword">133562849028924050</value>
</values>
Binary file added CaPPMS/.DS_Store
Binary file not shown.
18 changes: 10 additions & 8 deletions CaPPMS/CaPPMS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,24 @@
<AllowUnsafeBlocks></AllowUnsafeBlocks>
<CheckForOverflowUnderflow></CheckForOverflowUnderflow>
<DebugType>portable</DebugType>
<DefineConstants>TRACE;RELEASE;NET;NET8_0;NETCOREAPP</DefineConstants>
<DefineConstants>TRACE;RELEASE;NET;net8.0</DefineConstants>
<NoWarn>1701;1702</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BlazorPro.Spinkit" Version="1.2.0" />
<PackageReference Include="iTextSharp.LGPLv2.Core" Version="1.7.3" />
<PackageReference Include="iTextSharp.LGPLv2.Core" Version="3.4.18" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="5.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.9" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.8" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.9"
NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.8"
NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.35.1" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.15.2" />
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.15.2" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.15.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.13" />
<PackageReference Include="Octokit" Version="0.50.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="Octokit" Version="10.0.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.3" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
</ItemGroup>
</Project>
32 changes: 20 additions & 12 deletions CaPPMS/Data/GitHubService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ await Task.Run(async () =>
{
try
{
var repoUpdateVar = new RepositoryUpdate(RepoName) { DefaultBranch = developmentBranch };
var repoUpdateVar = new RepositoryUpdate()
{
DefaultBranch = developmentBranch,
Name = RepoName
};
await gitHubClient.Repository.Edit(OrganizationName, RepoName, repoUpdateVar);
}
catch (AggregateException e)
Expand Down Expand Up @@ -90,38 +94,42 @@ await Task.Run(async () =>
}).ConfigureAwait(false);
}

public async Task<string> DoAllTasks(string OrganizationName, string RepoName, string Description)
public async Task<string> DoAllTasks(string organizationName, string repoName, string description)
{
string error = string.Empty;

try
{
var repository = new NewRepository(RepoName)
var repository = new NewRepository(repoName)
{
AutoInit = true,
Description = Description,
Description = description,
Private = false
};

var newRepository = await gitHubClient.Repository.Create(OrganizationName, repository);
var newRepository = await gitHubClient.Repository.Create(organizationName, repository);

var masterReference = await gitHubClient.Git.Reference.Get(OrganizationName, RepoName, heads + mainBranch);
var masterReference = await gitHubClient.Git.Reference.Get(organizationName, repoName, heads + mainBranch);
var branchReference = new NewReference(heads + developmentBranch, masterReference.Object.Sha);
_ = gitHubClient.Git.Reference.Create(OrganizationName, RepoName, branchReference);
_ = gitHubClient.Git.Reference.Create(organizationName, repoName, branchReference);

var repoUpdateVar = new RepositoryUpdate(RepoName) { DefaultBranch = developmentBranch };
_ = gitHubClient.Repository.Edit(OrganizationName, RepoName, repoUpdateVar);
var repoUpdateVar = new RepositoryUpdate()
{
DefaultBranch = developmentBranch,
Name = repoName,
};
_ = gitHubClient.Repository.Edit(organizationName, repoName, repoUpdateVar);

var protection = new BranchProtectionSettingsUpdate(
new BranchProtectionRequiredReviewsUpdate(false, true, 1));

_ = gitHubClient.Repository.Branch.UpdateBranchProtection(OrganizationName, RepoName, mainBranch, protection);
_ = gitHubClient.Repository.Branch.UpdateBranchProtection(OrganizationName, RepoName, developmentBranch, protection);
_ = gitHubClient.Repository.Branch.UpdateBranchProtection(organizationName, repoName, mainBranch, protection);
_ = gitHubClient.Repository.Branch.UpdateBranchProtection(organizationName, repoName, developmentBranch, protection);

}
catch (Exception e)
{
error = $"Repository:{RepoName} cannot be created. Error: {e.Message}";
error = $"Repository:{repoName} cannot be created. Error: {e.Message}";
}

return error;
Expand Down
11 changes: 11 additions & 0 deletions CaPPMS/Data/IMailService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CaPPMS.Data
{
public interface IMailService
{
Task SendEmailAsync(string ToEmail, string Subject, string HTMLBody);
}
}
35 changes: 35 additions & 0 deletions CaPPMS/Data/MailService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net;
using System.Net.Mail;
namespace CaPPMS.Data
{
public class MailService : IMailService
{
private readonly MailSettings _mailConfig;
public MailService(MailSettings mailConfig)
{
_mailConfig = mailConfig;
}

public async Task SendEmailAsync(string ToEmail, string Subject, string HTMLBody)
{
MailMessage message = new MailMessage();
SmtpClient smtp = new SmtpClient();
message.From = new MailAddress(_mailConfig.FromEmail);
message.To.Add(new MailAddress(ToEmail));
message.Subject = Subject;
message.IsBodyHtml = true;
message.Body = HTMLBody;
smtp.Port = _mailConfig.Port;
smtp.Host = _mailConfig.Host;
smtp.EnableSsl = true;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(_mailConfig.Username, _mailConfig.Password);
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
await smtp.SendMailAsync(message);
}
}
}
11 changes: 11 additions & 0 deletions CaPPMS/Data/MailSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace CaPPMS.Data
{
public class MailSettings
{
public string Username { get; set; }
public string Password { get; set; }
public int Port { get; set; }
public string FromEmail { get; set; }
public string Host { get; set; }
}
}
7 changes: 6 additions & 1 deletion CaPPMS/Data/ProjectManagerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public async Task<bool> AddAsync(ProjectInformation idea)
ProjectIdeasChanged?.Invoke(ProjectIdeas.Values, EventArgs.Empty);
return true;
}

public void NotifyProjectIdeasChanged()
{
ProjectIdeasChanged?.Invoke(this, EventArgs.Empty);
}


public async Task<string> RemoveAsync(ProjectInformation idea, IPrincipal user)
{
Expand Down Expand Up @@ -213,7 +219,6 @@ public async Task<string> ExportAsync(ProjectInformation idea)
propertyTitleChunk.SetUnderline(2f, -2f);
var itemTitle = new Paragraph(propertyTitleChunk);
itemTitle.SpacingAfter = 1f;
itemTitle.Add(Environment.NewLine);
var item = new Phrase($"\t\t{exportedField.Item2}", bodyFont);
itemTitle.Add(item);

Expand Down
Loading