Skip to content

Commit 6155735

Browse files
Ticket #22 : start to create the website to show the performance
1 parent 74a42b7 commit 6155735

170 files changed

Lines changed: 20397 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CaseManagement.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.CMMN.AspNet"
3535
EndProject
3636
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.CMMN.AspNetCore", "src\CaseManagement.CMMN.AspNetCore\CaseManagement.CMMN.AspNetCore.csproj", "{A33A6BDF-FD00-4EFE-BA3F-A73BC63CB321}"
3737
EndProject
38+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.Performance", "src\CaseManagement.Performance\CaseManagement.Performance.csproj", "{8EC2090C-1BF1-4557-B62E-EB088699ED8A}"
39+
EndProject
3840
Global
3941
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4042
Debug|Any CPU = Debug|Any CPU
@@ -85,6 +87,10 @@ Global
8587
{A33A6BDF-FD00-4EFE-BA3F-A73BC63CB321}.Debug|Any CPU.Build.0 = Debug|Any CPU
8688
{A33A6BDF-FD00-4EFE-BA3F-A73BC63CB321}.Release|Any CPU.ActiveCfg = Release|Any CPU
8789
{A33A6BDF-FD00-4EFE-BA3F-A73BC63CB321}.Release|Any CPU.Build.0 = Release|Any CPU
90+
{8EC2090C-1BF1-4557-B62E-EB088699ED8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91+
{8EC2090C-1BF1-4557-B62E-EB088699ED8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
92+
{8EC2090C-1BF1-4557-B62E-EB088699ED8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
93+
{8EC2090C-1BF1-4557-B62E-EB088699ED8A}.Release|Any CPU.Build.0 = Release|Any CPU
8894
EndGlobalSection
8995
GlobalSection(SolutionProperties) = preSolution
9096
HideSolutionNode = FALSE
@@ -101,6 +107,7 @@ Global
101107
{2AF59449-01BC-447B-8156-B285278E7956} = {4A5D2E88-20E8-4A3F-8527-A4934BC0E11F}
102108
{11F22F1F-2F25-4F13-9F2F-195AFC99B584} = {CD2E7CFE-4E9C-4308-A0D3-41CD5AD90FD8}
103109
{A33A6BDF-FD00-4EFE-BA3F-A73BC63CB321} = {CD2E7CFE-4E9C-4308-A0D3-41CD5AD90FD8}
110+
{8EC2090C-1BF1-4557-B62E-EB088699ED8A} = {D16A3E6D-32B6-44CF-9941-A9BDB9DFC6A7}
104111
EndGlobalSection
105112
GlobalSection(ExtensibilityGlobals) = postSolution
106113
SolutionGuid = {D2CFBF2E-D493-42F7-B339-01A3070C2B5E}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TypeScriptToolsVersion>3.6</TypeScriptToolsVersion>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageReference Include="Microsoft.AspNetCore.App" />
8+
</ItemGroup>
9+
<ItemGroup>
10+
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
11+
</ItemGroup>
12+
</Project>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using Microsoft.AspNetCore;
2+
using Microsoft.AspNetCore.Hosting;
3+
4+
namespace CaseManagement.Website
5+
{
6+
public class Program
7+
{
8+
public static void Main(string[] args)
9+
{
10+
CreateWebHostBuilder(args).Build().Run();
11+
}
12+
13+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
14+
WebHost.CreateDefaultBuilder(args)
15+
.UseStartup<Startup>();
16+
}
17+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:51723/",
7+
"sslPort": 0
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"CaseManagement.Website": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"environmentVariables": {
22+
"ASPNETCORE_ENVIRONMENT": "Development"
23+
},
24+
"applicationUrl": "http://localhost:51724/"
25+
}
26+
}
27+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
using Microsoft.AspNetCore.Builder;
2+
using Microsoft.AspNetCore.Hosting;
3+
using Microsoft.AspNetCore.Http;
4+
using Microsoft.AspNetCore.HttpOverrides;
5+
using Microsoft.AspNetCore.Mvc;
6+
using Microsoft.Extensions.Configuration;
7+
using Microsoft.Extensions.DependencyInjection;
8+
using System;
9+
using System.Linq;
10+
11+
namespace CaseManagement.Website
12+
{
13+
public class Startup
14+
{
15+
public Startup() { }
16+
17+
public IConfigurationRoot Configuration { get; }
18+
19+
// This method gets called by the runtime. Use this method to add services to the container.
20+
public void ConfigureServices(IServiceCollection services)
21+
{
22+
services.AddCors(options =>
23+
{
24+
options.AddPolicy("AllowAllOrigins",
25+
builder =>
26+
{
27+
builder
28+
.AllowAnyOrigin()
29+
.AllowAnyHeader()
30+
.AllowAnyMethod();
31+
});
32+
});
33+
34+
// Add framework services.
35+
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
36+
services.Configure<ForwardedHeadersOptions>(options =>
37+
{
38+
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
39+
});
40+
}
41+
42+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
43+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
44+
{
45+
app.UseForwardedHeaders();
46+
var angularRoutes = new[] {
47+
"/home",
48+
"/about",
49+
"/casedefinitions",
50+
"/caseinstances",
51+
"/performances"
52+
};
53+
54+
app.Use(async (context, next) =>
55+
{
56+
if (context.Request.Path.HasValue && null != angularRoutes.FirstOrDefault((ar) => context.Request.Path.Value.StartsWith(ar, StringComparison.OrdinalIgnoreCase)))
57+
{
58+
context.Request.Path = new PathString("/");
59+
}
60+
61+
await next();
62+
});
63+
64+
app.UseCors("AllowAllOrigins");
65+
app.UseDefaultFiles();
66+
app.UseStaticFiles();
67+
app.UseMvc(routes =>
68+
{
69+
routes.MapRoute(
70+
name: "default",
71+
template: "{controller=Home}/{action=Index}/{id?}");
72+
});
73+
}
74+
}
75+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<app-navigation></app-navigation>
2+
<router-outlet></router-outlet>

src/CaseManagement.Performance/angularApp/app/app.component.js

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CaseManagement.Performance/angularApp/app/app.component.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CaseManagement.Performance/angularApp/app/app.component.scss

Whitespace-only changes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
2+
import { TranslateService } from '@ngx-translate/core';
3+
import { Router } from '@angular/router';
4+
interface BreadCrumbItem {
5+
name: string,
6+
index: number,
7+
path: string,
8+
isLast: boolean
9+
}
10+
11+
@Component({
12+
selector: 'app-component',
13+
templateUrl: './app.component.html',
14+
styleUrls: [
15+
'./app.component.scss',
16+
'../../node_modules/leaflet/dist/leaflet.css',
17+
'../../node_modules/leaflet-search/dist/leaflet-search.src.css'
18+
],
19+
encapsulation: ViewEncapsulation.None
20+
})
21+
22+
export class AppComponent implements OnInit {
23+
breadCrumbList: Array<BreadCrumbItem> = [];
24+
sessionCheckEventListener: EventListener;
25+
sessionCheckTimer: any;
26+
iFrameName: string;
27+
28+
constructor(translate: TranslateService, private router: Router) {
29+
translate.setDefaultLang('fr');
30+
translate.use('fr');
31+
}
32+
33+
ngOnInit(): void {
34+
this.listenRouting();
35+
}
36+
37+
private listenRouting() {
38+
var self = this;
39+
let routerUrl: string;
40+
let path: string;
41+
let routerList: Array<any>;
42+
this.router.events.subscribe((router: any) => {
43+
routerUrl = router.urlAfterRedirects;
44+
if (!routerUrl || typeof routerUrl !== 'string') {
45+
return;
46+
}
47+
48+
path = '';
49+
self.breadCrumbList.length = 0;
50+
if (routerUrl.includes('filter')) {
51+
return;
52+
}
53+
54+
routerList = routerUrl.slice(1).split('/');
55+
routerList.forEach(function (router, index) {
56+
path += '/' + decodeURIComponent(router);
57+
self.breadCrumbList.push({
58+
name: self.cleanUri(decodeURIComponent(router)),
59+
index: index,
60+
path: path,
61+
isLast: index === routerList.length - 1
62+
});
63+
});
64+
});
65+
}
66+
67+
private cleanUri(uri :string) : string {
68+
return uri.replace(/(\?.*)|(#.*)/g, "");
69+
}
70+
}

0 commit comments

Comments
 (0)