Merge branch 'release/FixGraphBaseChartJs'

This commit is contained in:
Samuele Locatelli
2022-02-26 14:27:24 +01:00
240 changed files with 112958 additions and 988 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/MP.Stats/bin/Debug/net5.0/MP.Stats.dll",
"program": "${workspaceFolder}/MP.Stats/bin/Debug/net6.0/MP.Stats.dll",
"args": [],
"cwd": "${workspaceFolder}/MP.Stats",
"stopAtEntry": false,
+1 -1
View File
@@ -89,7 +89,7 @@ ExecuteLog "7z x ""$SourceDir\$ZipFile"" "
# step 3 : replica applicazione
Write-Host "START copy step"
ExecuteLog "robocopy '$utilDir\publish\net5.0\' '$DestDir' /MIR /Z /LOG:'$logMirror'"
ExecuteLog "robocopy '$utilDir\publish\net6.0\' '$DestDir' /MIR /Z /LOG:'$logMirror'"
Write-Host "END copy step"
# step 4 : riavvio pool
+2 -2
View File
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31229.75
# Visual Studio Version 17
VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Stats", "MP.Stats\MP.Stats.csproj", "{D9901B50-E61C-400C-B62C-FA060CF72C29}"
EndProject
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>MP.Data</AssemblyName>
<RootNamespace>MP.Data</RootNamespace>
</PropertyGroup>
+7 -7
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>MP.Data</AssemblyName>
<RootNamespace>MP.Data</RootNamespace>
</PropertyGroup>
@@ -12,14 +12,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="NLog" Version="4.7.11" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
<PackageReference Include="NLog" Version="4.7.13" />
</ItemGroup>
</Project>
+31
View File
@@ -0,0 +1,31 @@
using System;
namespace MP.Data
{
public class chartJsData
{
#region Public Classes
public class chartJsTSerie
{
#region Public Properties
public DateTime x { get; set; }
public double y { get; set; }
#endregion Public Properties
}
public class chartJsXY
{
#region Public Properties
public double x { get; set; }
public double y { get; set; }
#endregion Public Properties
}
#endregion Public Classes
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
+39 -46
View File
@@ -6,60 +6,53 @@
@inject AppAuthService DataService
@inject LicenseService LicServ
<div class="card">
<div class="card-header">
@if (authOk())
{
@if (authOk()) // disegno box cliccabile e programma attivato
{
<div class="card">
<div class="card-header">
<a target="_blank" href="@(fullUrl(CurrItem.AppUrl))" class="btn btn-outline-info btn-block" title="Apri">
<h3 class="mb-0">@CurrItem.AppName&nbsp;<i class="fas fa-angle-double-right"></i></h3>
<i class="@(traduci($"{CurrItem.AppName}-ICON"))"></i>
<h3 class="mb-0">@CurrItem.AppName&nbsp;</h3>
</a>
}
else
{
<del>
<h3 class="mb-0 text-secondary">@CurrItem.AppName</h3>
</del>
}
</div>
<div class="card-body pt-2 pb-0">
<div class="row">
@if (authOk())
{
<div class="col-3 text-info">
<i class="@(traduci($"{CurrItem.AppName}-ICON"))"></i>
</div>
<div class="col-9" style="overflow-y: auto; height: 7.5em;">
</div>
<div class="card-body">
<div class="row text-dark">
<div class="col-4 text-left">
<b>@(traduci($"{CurrItem.AppName}-TITLE"))</b>
<ul class="mb-0 small">
@(traduci($"{CurrItem.AppName}-LIST"))
</ul>
<div class="border-bottom"></div>
<div class="badge badge-success"> Licenza Attiva</div>
</div>
}
else
{
<div class="col-3 text-secondary">
<i class="@(traduci($"{CurrItem.AppName}-ICON"))"></i>
<div class="col-8 border-left text-left">
@(traduci($"{CurrItem.AppName}-LIST"))
</div>
<div class="col-9 text-secondary" style="overflow-y: auto; height: 8em;">
<b>@(traduci($"{CurrItem.AppName}-TITLE"))</b>
<ul class="mb-0 small">
@(traduci($"{CurrItem.AppName}-LIST"))
</ul>
</div>
}
</div>
</div>
</div>
<div class="card-footer text-danger py-1">
@if (authOk())
{
<span class="text-success">Programma Attivato</span>
}
else
{
<span class="text-danger">Licenza non attivata!</span>
}
}
else // disegno box non cliccabile e licenza mancante
{
<div class="card">
<div class="card-header">
<button class="btn btn-outline-secondary btn-block" title="Manca Licenza" disabled>
<i class="@(traduci($"{CurrItem.AppName}-ICON"))"></i>
<h3 class="mb-0">@CurrItem.AppName</h3>
</button>
</div>
<div class="card-body">
<div class="row text-muted">
<div class="col-4 text-left">
<b>@(traduci($"{CurrItem.AppName}-TITLE"))</b>
<div class="border-bottom"></div>
<div class="badge badge-danger"> Licenza Mancante</div>
</div>
<div class="col-8 border-left text-left">
@(traduci($"{CurrItem.AppName}-LIST"))
</div>
</div>
</div>
</div>
</div>
}
@code {
[Parameter]
+12 -21
View File
@@ -2,34 +2,25 @@
@inject IJSRuntime JSRuntime
<div class="card">
<div class="card-header py-2 font-weight-bold">
<div class="card text-center my-2">
<div class="card-header list-group-item-info">
<div class="row">
<div class="col-4 col-md-4">
<div class="badge badge-pill badge-dark px-2 py-1">
<div class="px-1">
<span>EgalWare <img width="24" class="img-fluid" src="img/LogoBluGreen.png" /></span>
</div>
</div>
<div class="col-6 text-left">
<b>@Environment</b>
</div>
<div class="col-8 text-right">
<h4 class="py-0 mb-0">@Environment</h4>
<div class="col-6 text-right">
<b>Matr. @CurrItem.MatrOpr</b>
</div>
</div>
</div>
<div class="card-body px-3">
<div class="row">
<div class="col-6 col-md-4">
<div id="qrCodeImg_@(CurrItem.MatrOpr)"></div>
</div>
<div class="col-6 col-md-8">
<h2><b>@CurrItem.Cognome</b> @CurrItem.Nome</h2>
matr: @CurrItem.MatrOpr
</div>
</div>
<div class="card-body text-center">
<div class="img-fluid" id="qrCodeImg_@(CurrItem.MatrOpr)"></div>
</div>
<div class="card-footer text-center">
<b>@CurrItem.Cognome @CurrItem.Nome</b>
</div>
@*<div class="card-footer text-muted py-1">
Card login MAPO-TAB
Card login MAPO-TAB
</div>*@
</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>6.14.2202.0112</Version>
<Version>6.14.2202.2317</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -39,7 +39,7 @@
<div class="row">
@foreach (var item in ListRecords)
{
<div class="col-4 mb-2">
<div class="col-12 col-sm-6 col-xl-4 my-1">
<HomeLink CurrItem="@item"></HomeLink>
</div>
}
+1 -1
View File
@@ -58,7 +58,7 @@
<div class="row">
@foreach (var item in ListRecords)
{
<div class="col-4 mb-2">
<div class="col-12 col-sm-6 col-xl-4 my-1">
<SingleDownload CurrItem="@item"></SingleDownload>
</div>
}
+1 -1
View File
@@ -18,7 +18,7 @@
<div class="row">
@foreach (var item in ListRecords)
{
<div class="col-6 my-2 userCard">
<div class="col-12 col-sm-6 col-xl-4 my-1 userCard">
<UserCard CurrItem="@item" BaseUrl="@BaseUrlTab" Environment="@Environment"></UserCard>
</div>
}
@@ -10,7 +10,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\publish\net5.0\</PublishUrl>
<PublishUrl>bin\publish\net6.0\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>d949ab45-9b65-4594-a97e-182bc3831707</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
+21 -21
View File
@@ -4,25 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
+21 -20
View File
@@ -4,24 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
@@ -4,18 +4,18 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\MP.Land.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\MP.Land.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
@@ -4,24 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://w2019-iis-dev:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://iis03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/LAND</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 6.14.2202.0112</h4>
<h4>Versione: 6.14.2202.2317</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.14.2202.0112
6.14.2202.2317
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.14.2202.0112</version>
<version>6.14.2202.2317</version>
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -38,7 +38,7 @@
align-items: center;
}
@media (min-width: 641px) {
@media (min-width: 992px) {
.page {
flex-direction: row;
}
+1 -1
View File
@@ -50,7 +50,7 @@
color: white;
}
@media (min-width: 641px) {
@media (min-width: 992px) {
.navbar-toggler {
display: none;
}
+2 -2
View File
@@ -360,8 +360,8 @@ var QRCode;
})() : (function () { // Drawing in Canvas
function _onMakeImage() {
this._elImage.src = this._elCanvas.toDataURL("image/png");
this._elImage.style.display = "block";
this._elCanvas.style.display = "none";
//this._elImage.style.display = "block";
//this._elCanvas.style.display = "none";
this._elImage.className = "img-fluid";
}
+6 -2
View File
@@ -1,15 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Prog</RootNamespace>
<Version>6.14.2112.2315</Version>
<Version>6.14.2202.2215</Version>
</PropertyGroup>
<ItemGroup>
<Content Remove="Components\CodArtSelector.razor" />
</ItemGroup>
<ItemGroup>
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
<PackageReference Include="Majorsoft.Blazor.Components.Debounce" Version="1.5.0" />
@@ -10,7 +10,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\publish\net5.0\</PublishUrl>
<PublishUrl>bin\publish\net6.0\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net6.0</TargetFramework>
<ProjectGuid>3223dde4-564e-4d58-8a94-e368b9778c67</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
@@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<MSDeployServiceURL>https://iis01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
@@ -22,7 +22,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
+21 -20
View File
@@ -4,24 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://iis02.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://iis03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
@@ -4,18 +4,18 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\MP.Prog.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\MP.Prog.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://w2019-iis-dev:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/PROG</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 6.14.2112.2315</h4>
<h4>Versione: 6.14.2202.2215</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.14.2112.2315
6.14.2202.2215
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.14.2112.2315</version>
<version>6.14.2202.2215</version>
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
-8
View File
@@ -188,14 +188,6 @@ namespace MP.Prog
.AddEntityFrameworkStores<UserIdentityDbContext>();
#endif
#if false
services.AddBlazorise(options =>
{
options.ChangeTextOnKeyPress = true; // optional
})
.AddBootstrapProviders()
.AddFontAwesomeIcons();
#endif
//// Elmah
//services.AddElmah();
//string elmaConn = "Data Source=SQL2016DEV;Initial Catalog=Elmah;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=SHERPA.BBM;";
+5 -3
View File
@@ -1,4 +1,6 @@
<div class="row">
@using MP.Stats.Components.ChartJs
<div class="row">
@if (RawData == null || RawData.Count == 0)
{
<div class="col-12">
@@ -21,10 +23,10 @@
<div class="col-10">
<div class="row">
<div class="col-2">
<PieChart @ref="PieVC" TItem="double" OptionsObject="pieChartOptions" />
<PieChart Id="PieControlli" AspRatio="1" LegendPos="bottom" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="Esito Controlli"></PieChart>
</div>
<div class="col-10">
<LineChart @ref="TimeSerieVC" TItem="double" OptionsObject="lineChartOptions" />
<Line Id="NumControlli" AspRatio="6" DataTS="@DatiPlot" Labels="@LabelPlot" lineColor="@lineColor" backColor="@lineColor" lTens="0" Title="Num Controlli"></Line>
</div>
</div>
</div>
+67 -88
View File
@@ -1,10 +1,8 @@
using System;
using Microsoft.AspNetCore.Components;
using MP.Data;
using MP.Stats.Data;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Blazorise.Charts;
using Microsoft.AspNetCore.Components;
using MP.Stats.Data;
namespace MP.Stats.Components
{
@@ -85,17 +83,68 @@ namespace MP.Stats.Components
AspectRatio = 1
};
protected PieChart<double> PieVC = new PieChart<double>();
protected LineChart<double> TimeSerieVC = new LineChart<double>();
#endregion Protected Fields
#region Private Properties
private List<double> DatiPareto
{
get => ParetoData.Select(x => x.value).ToList();
}
private List<chartJsData.chartJsTSerie> DatiPlot
{
get => TSData;
}
private List<string> LabelPareto
{
get => ParetoData.Select(x => x.label).ToList();
}
private List<string> LabelPlot
{
get => TSData.Select(r => $"{r.x:yyyy-MM-dd}").ToList();
}
#endregion Private Properties
#region Protected Properties
protected SelectData _currFilter { get; set; } = new SelectData();
protected List<MP.Data.DatabaseModels.ResControlli> _rawData { get; set; } = new List<MP.Data.DatabaseModels.ResControlli>();
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> bgColors
{
get => semaphColors(ParetoData.Count, "0.3");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColor
{
get => solidColors("1");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColors
{
get => semaphColors(ParetoData.Count, "1");
}
[Inject]
protected MessageService MessageService { get; set; }
@@ -104,7 +153,7 @@ namespace MP.Stats.Components
[Inject]
protected MpStatsService StatService { get; set; }
protected List<ChartTS> TSData { get; set; } = new List<ChartTS>();
protected List<chartJsData.chartJsTSerie> TSData { get; set; } = new List<chartJsData.chartJsTSerie>();
#endregion Protected Properties
@@ -122,10 +171,6 @@ namespace MP.Stats.Components
{
// ricalcolo charting data
recalcData();
var dataReload = Task.Run(async () =>
{
await HandleRedraw();
});
}
}
}
@@ -134,50 +179,6 @@ namespace MP.Stats.Components
#region Private Methods
private PieChartDataset<double> GetBarChartDataset()
{
var answ = new PieChartDataset<double>
{
Label = "Numero Controlli",
Data = ParetoData.Select(x => x.value).ToList(),
BackgroundColor = getPieColors(0.4f),
BorderColor = getPieColors(1f),
HoverBorderWidth = 3
};
return answ;
}
private List<string> GetBarChartLabels()
{
var answ = ParetoData.Select(x => x.label).ToList();
return answ;
}
/// <summary>
/// Elenco 2 linee x controli KO /KO
/// </summary>
/// <returns></returns>
private LineChartDataset<double> GetLineChartDataset()
{
var answ = new LineChartDataset<double>
{
Label = "Numero controlli",
Data = TSData.Select(x => x.Value).ToList(),
BorderColor = getLineColors(1f),
Fill = true,
PointRadius = 2,
LineTension = 0,
BorderDash = new List<int> { }
};
return answ;
}
private List<string> GetLineChartLabels()
{
var answ = TSData.Select(x => x.TLabel.ToString("ddd dd.MM")).ToList();
return answ;
}
private void recalcData()
{
if (RawData != null)
@@ -190,8 +191,8 @@ namespace MP.Stats.Components
TSData = RawData
.GroupBy(x => x.DataOra.Date)
.Select(y => new ChartTS() { TLabel = y.First().DataOra.Date, Value = y.Count() })
.OrderBy(x => x.TLabel)
.Select(r => new chartJsData.chartJsTSerie() { x = r.First().DataOra.Date, y = r.Count() })
.OrderBy(o => o.x)
.ToList();
}
}
@@ -200,15 +201,17 @@ namespace MP.Stats.Components
#region Protected Methods
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> getLineColors(float alpha)
protected List<string> semaphColors(int numRecords, string alpha)
{
List<string> answ = new List<string>();
answ.Add(ChartColor.FromRgba(54, 82, 254, alpha));
// aggiungo verde/rosso
answ.Add($"rgba(54, 254, 82, {alpha})");
answ.Add($"rgba(254, 82, 65, {alpha})");
return answ;
}
@@ -217,37 +220,13 @@ namespace MP.Stats.Components
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> getPieColors(float alpha)
protected List<string> solidColors(string alpha)
{
List<string> answ = new List<string>();
foreach (var item in ParetoData)
{
if (item.label == EsitoOK)
{
answ.Add(ChartColor.FromRgba(54, 254, 82, alpha));
}
else
{
answ.Add(ChartColor.FromRgba(254, 82, 65, alpha));
}
}
answ.Add($"rgba(54, 162, 235, {alpha})");
return answ;
}
protected async Task HandleRedraw()
{
if (PieVC != null)
{
await PieVC.Clear();
await PieVC.AddLabelsDatasetsAndUpdate(GetBarChartLabels(), GetBarChartDataset());
}
if (TimeSerieVC != null)
{
await TimeSerieVC.Clear();
await TimeSerieVC.AddLabelsDatasetsAndUpdate(GetLineChartLabels(), GetLineChartDataset());
}
}
#endregion Protected Methods
}
}
+133
View File
@@ -0,0 +1,133 @@
@using MP.Data
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
@code {
[Parameter]
public string Id { get; set; } = "MyHist";
[Parameter]
public string Legenda { get; set; } = "Legenda";
[Parameter]
public bool Horizontal { get; set; } = false;
[Parameter]
public List<double> Data { get; set; } = new List<double>();
[Parameter]
public List<string> Labels { get; set; } = new List<string>();
[Parameter]
public double AspRatio { get; set; } = 0;
[Parameter]
public List<string> lineColor { get; set; } = new List<string>();
[Parameter]
public List<string> backColor { get; set; } = new List<string>();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name = "firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js, tipo verticale
var config = new
{
type = "bar",
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
suggestedMin = 0,
display = true,
ticks = new
{
beginAtZero = true,
maxTicksLimit = 10
}
}
},
Animation = false,
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}"
},
data = new
{
datasets = new[] {
new {
data = Data,
borderColor = lineColor,
backgroundColor = backColor,
borderWidth = 1,
label = Legenda
}
},
labels = Labels
}
};
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js, tipo verticale
var configHor = new
{
type = "bar",
options = new
{
indexAxis = "y",
responsive = true,
scales = new
{
yAxes = new
{
suggestedMin = 0,
display = true,
ticks = new
{
beginAtZero = true,
maxTicksLimit = 10
}
}
},
Animation = false,
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}"
},
data = new
{
datasets = new[] {
new {
data = Data,
borderColor = lineColor,
backgroundColor = backColor,
borderWidth = 1,
label = Legenda
}
},
labels = Labels
}
};
if (Horizontal)
{
await JSRuntime.InvokeVoidAsync("setup", Id, configHor);
}
else
{
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
}
}
+62
View File
@@ -0,0 +1,62 @@
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
@code {
public enum ChartType
{
Pie,
Bar
}
[Parameter]
public string Id { get; set; } = "MyChart";
[Parameter]
public ChartType Type { get; set; }
[Parameter]
public string[]? Data { get; set; }
[Parameter]
public string[]? BackgroundColor { get; set; }
[Parameter]
public string[]? Labels { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await InitDefault();
}
protected async Task InitDefault()
{
// Here we create an anonymous type with all the options
// that need to be sent to Chart.js
var config = new
{
type = Type.ToString().ToLower(),
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
suggestedMin = 0
}
}
},
data = new
{
datasets = new[]
{
new { data = Data, backgroundColor = BackgroundColor}
},
labels = Labels
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
}
+113
View File
@@ -0,0 +1,113 @@
@using MP.Data
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
@code {
[Parameter]
public string Id { get; set; } = "MyTs";
[Parameter]
public string Title { get; set; } = "Demo Line";
[Parameter]
public List<chartJsData.chartJsTSerie> DataTS { get; set; } = null!;
[Parameter]
public List<string> Labels { get; set; } = new List<string>();
[Parameter]
public List<string> lineColor { get; set; } = new List<string>();
[Parameter]
public List<string> backColor { get; set; } = new List<string>();
[Parameter]
public double AspRatio { get; set; } = 0;
[Parameter]
public string MinValue { get; set; } = "0";
[Parameter]
public string MaxValue { get; set; } = "0";
[Parameter]
public int lTens { get; set; } = 0;
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
var config = new
{
type = "line",
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
display = true,
ticks = new
{
maxTicksLimit = 10
},
suggestedMin = MinValue != MaxValue ? MinValue : "auto",
suggestedMax = MinValue != MaxValue ? MaxValue : "auto"
},
xAxes = new
{
type = "time",
distribution = "linear",
}
},
Animation = false,
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}"
},
data = new
{
labels = Labels,
datasets = new[]
{
new
{
data = DataTS,
borderColor= lineColor,
backgroundColor= backColor,
lineTension= lTens,
stepped= false,
label= Title
}
}
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
}
@@ -0,0 +1,98 @@
@using MP.Data
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
@code {
[Parameter]
public string Id { get; set; } = "MyTs";
[Parameter]
public string Title { get; set; } = "DEMO Pie Chart";
[Parameter]
public string LegendPos { get; set; } = "right";
[Parameter]
public List<double> Data { get; set; } = new List<double>();
[Parameter]
public List<string> Labels { get; set; } = new List<string>();
[Parameter]
public List<string> lineColor { get; set; } = new List<string>();
[Parameter]
public List<string> backColor { get; set; } = new List<string>();
[Parameter]
public double AspRatio { get; set; } = 0;
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
var config = new
{
type = "pie",
options = new
{
responsive = true,
plugins = new
{
legend = new
{
position = LegendPos
},
title = new
{
display = true,
text = Title
}
},
Animation = false,
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}",
HoverBorderWidth = 3
},
data = new
{
labels = Labels.ToArray(),
datasets = new[]
{
new
{
data = Data,
borderColor= lineColor,
backgroundColor= backColor
}
}
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
}
@@ -0,0 +1,94 @@
@using MP.Data
@inject IJSRuntime JSRuntime
<canvas id="@Id"></canvas>
@code {
[Parameter]
public string Id { get; set; } = "MyTs";
[Parameter]
public List<chartJsData.chartJsTSerie> DataTS { get; set; } = null!;
[Parameter]
public List<string> lineColor { get; set; } = new List<string>();
[Parameter]
public List<string> backColor { get; set; } = new List<string>();
[Parameter]
public double AspRatio { get; set; } = 0;
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await renderChart();
}
/// <summary>
/// Inizializzazione rendering componente
///
/// partendo da qui:
/// https://www.williamleme.com/posts/2020/003-chartjs-blazor/
/// https://www.puresourcecode.com/dotnet/blazor/using-chart-js-with-blazor/
/// https://www.tutorialsteacher.com/csharp/csharp-anonymous-type
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected async Task renderChart()
{
// creazione di un oggetto anonymous type con tutte le opzioni da passare a chart.js
var config = new
{
type = "line",
options = new
{
responsive = true,
scales = new
{
yAxes = new
{
display = true,
ticks = new
{
maxTicksLimit = 10
}
},
xAxes = new
{
type = "timeseries",
distribution = "linear",
}
},
Animation = false,
AspectRatio = AspRatio == 0 ? "auto" : $"{AspRatio}"
},
data = new
{
datasets = new[]
{
new
{
data = DataTS,
borderColor= lineColor,
backgroundColor= backColor,
lineTension= 0,
stepped= true,
label= "Temperatura Rilevata"
}
}
}
};
await JSRuntime.InvokeVoidAsync("setup", Id, config);
}
}
+21 -19
View File
@@ -1,32 +1,34 @@
<div class="row">
@using MP.Stats.Components.ChartJs
<div class="row">
@if (RawData == null || RawData.Count == 0)
{
<div class="col-12">
<div class="alert alert-secondary text-center h4"><span class="oi oi-graph"></span> No Chart Data</div>
</div>
<div class="col-12">
<div class="alert alert-secondary text-center h4"><span class="oi oi-graph"></span> No Chart Data</div>
</div>
}
else
{
<div class="col-2" style="max-height: 10em; overflow:hidden; overflow-y: auto;">
<ul class="list-group list-group-sm small">
<div class="col-2" style="max-height: 10em; overflow:hidden; overflow-y: auto;">
<ul class="list-group list-group-sm small">
@foreach (var item in @ParetoData)
{
<li class="list-group-item p-1 d-flex justify-content-between align-items-center">
<li class="list-group-item p-1 d-flex justify-content-between align-items-center">
@item.label
<span class="badge badge-primary badge-pill">@item.value.ToString("N2")%</span>
</li>
<span class="badge badge-primary badge-pill">@item.value.ToString("N2")%</span>
</li>
}
</ul>
</div>
<div class="col-10">
<div class="row">
<div class="col-6">
<BarChart @ref="ParetoGuasti" TItem="double" OptionsObject="barChartOptions" />
</div>
<div class="col-6">
<LineChart @ref="NumGuasti" TItem="double" OptionsObject="lineChartOptions" />
</ul>
</div>
<div class="col-10">
<div class="row">
<div class="col-6">
<BarPlot Id="ParetoOee" AspRatio="3" Data="@DatiParetoOee" Labels="@LabelParetoOee" Legenda="Pareto OEE Macchine" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
</div>
<div class="col-6">
<Line Id="AndamentoTrs" AspRatio="3" DataTS="@DatiTrs" Labels="@LabelTrs" lineColor="@lineColor" backColor="@lineColor" lTens="0" Title="Andamento TRS" MinValue="0" MaxValue="110"></Line>
</div>
</div>
</div>
</div>
}
</div>
+75 -130
View File
@@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Blazorise.Charts;
using Microsoft.AspNetCore.Components;
using MP.Data;
using MP.Stats.Data;
namespace MP.Stats.Components
@@ -12,79 +12,6 @@ namespace MP.Stats.Components
{
#region Protected Fields
protected object barChartOptions = new
{
Scales = new
{
XAxes = new object[]
{
new {
Display = false
}
},
YAxes = new object[]
{
new {
Display = true,
ticks= new {
suggestedMin = 0
}
}
}
},
Tooltips = new
{
Mode = "nearest",
Intersect = false
},
Hover = new
{
Mode = "nearest",
Intersect = false
},
Animation = false,
AspectRatio = 3.5
};
protected object lineChartOptions = new
{
Scales = new
{
XAxes = new object[]
{
new {
Display = true,
//type = "time"
}
},
YAxes = new object[]
{
new {
Display = true,
ticks= new {
min = 0,
max = 100
}
}
}
},
Tooltips = new
{
Mode = "nearest",
Intersect = false
},
Hover = new
{
Mode = "nearest",
Intersect = false
},
Animation = false,
AspectRatio = 3.5
};
protected LineChart<double> NumGuasti = new LineChart<double>();
protected BarChart<double> ParetoGuasti = new BarChart<double>();
#endregion Protected Fields
@@ -102,7 +29,7 @@ namespace MP.Stats.Components
[Inject]
protected MpStatsService StatService { get; set; }
protected List<ChartTS> TSData { get; set; } = new List<ChartTS>();
protected List<chartJsData.chartJsTSerie> TSData { get; set; } = new List<chartJsData.chartJsTSerie>();
#endregion Protected Properties
@@ -120,10 +47,6 @@ namespace MP.Stats.Components
{
// ricalcolo charting data
recalcData();
var dataReload = Task.Run(async () =>
{
await HandleRedraw();
});
}
}
}
@@ -132,45 +55,39 @@ namespace MP.Stats.Components
#region Private Methods
private BarChartDataset<double> GetBarChartDataset()
private List<double> DatiParetoOee
{
var answ = new BarChartDataset<double>
get => ParetoData.Select(x => x.value).ToList();
}
private List<string> LabelParetoOee
{
get => ParetoData.Select(x => x.label).ToList();
}
private List<chartJsData.chartJsTSerie> DatiTrs
{
get => TSData;
}
private List<string> LabelTrs
{
get => TSData.Select(r => $"{r.x:yyyy-MM-dd}").ToList();
}
private Dictionary<DateTime, double> calcTSData(DateTime inizio, List<double> yData)
{
Dictionary<DateTime, double> answ = new Dictionary<DateTime, double>();
// usando i dati ricevuti aggiunge variabile x = tempo crescente
int idx = 0;
foreach (var item in yData)
{
Label = "Pareto OEE Macchine",
Data = ParetoData.Select(x => x.value).ToList(),
BackgroundColor = backgroundColors(ParetoData.Count, 0.4f),
BorderColor = backgroundColors(ParetoData.Count, 1f),
HoverBorderWidth = 5
};
answ.Add(inizio.AddHours(idx), item);
idx++;
}
// restituisco!
return answ;
}
private List<string> GetBarChartLabels()
{
var answ = ParetoData.Select(x => x.label).ToList();
return answ;
}
private LineChartDataset<double> GetLineChartDataset()
{
var answ = new LineChartDataset<double>
{
Label = "TRS/OEE Periodo",
Data = TSData.Select(x => x.Value).ToList(),
BorderColor = backgroundColors(1, 1f),
Fill = true,
PointRadius = 2,
LineTension = 0,
BorderDash = new List<int> { }
};
return answ;
}
private List<string> GetLineChartLabels()
{
var answ = TSData.Select(x => x.TLabel.ToString("ddd dd.MM")).ToList();
return answ;
}
private void recalcData()
{
@@ -184,8 +101,8 @@ namespace MP.Stats.Components
TSData = RawData
.GroupBy(x => x.DataRif.Date)
.Select(y => new ChartTS() { TLabel = y.First().DataRif.Date, Value = Math.Round(y.Average(c => c.OEE) * 100, 2) })
.OrderBy(x => x.TLabel)
.Select(r => new chartJsData.chartJsTSerie() { x = r.First().DataRif.Date, y = Math.Round(r.Average(c => c.OEE) * 100, 2) })
.OrderBy(o => o.x)
.ToList();
}
}
@@ -199,39 +116,67 @@ namespace MP.Stats.Components
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> backgroundColors(int numRecords, float alpha)
protected List<string> semaphColors(int numRecords, string alpha)
{
List<string> answ = new List<string>();
// verde...
for (int i = 0; i < numRecords / 3; i++)
{
answ.Add(ChartColor.FromRgba(54, 235, 82, alpha));
answ.Add($"rgba(54, 235, 82, {alpha})");
}
// arancione
for (int i = 0; i < numRecords / 3; i++)
{
answ.Add(ChartColor.FromRgba(255, 206, 86, alpha));
answ.Add($"rgba(255, 206, 86, {alpha})");
}
while (answ.Count < numRecords)
{
answ.Add(ChartColor.FromRgba(255, 99, 132, alpha));
answ.Add($"rgba(255, 99, 132, {alpha}");
}
return answ;
}
protected async Task HandleRedraw()
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> solidColors(string alpha)
{
if (ParetoGuasti != null)
{
await ParetoGuasti.Clear();
await ParetoGuasti.AddLabelsDatasetsAndUpdate(GetBarChartLabels(), GetBarChartDataset());
}
if (NumGuasti != null)
{
await NumGuasti.Clear();
await NumGuasti.AddLabelsDatasetsAndUpdate(GetLineChartLabels(), GetLineChartDataset());
}
List<string> answ = new List<string>();
answ.Add($"rgba(54, 162, 235, {alpha})");
return answ;
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColor
{
get => solidColors("1");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColors
{
get => semaphColors(ParetoData.Count, "1");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> bgColors
{
get => semaphColors(ParetoData.Count, "0.3");
}
#endregion Protected Methods
+5 -3
View File
@@ -1,4 +1,6 @@
<div class="row">
@using MP.Stats.Components.ChartJs
<div class="row">
@if (RawData == null || RawData.Count == 0)
{
<div class="col-12">
@@ -21,10 +23,10 @@
<div class="col-10">
<div class="row">
<div class="col-6">
<BarChart @ref="ParetoGuasti" TItem="double" OptionsObject="barChartOptions" />
<BarPlot Id="ParetoScarti" AspRatio="3" Data="@DatiPareto" Labels="@LabelPareto" Legenda="Pareto Scarti Macchine" lineColor="@lineColors" backColor="@bgColors"></BarPlot>
</div>
<div class="col-6">
<LineChart @ref="NumGuasti" TItem="double" OptionsObject="lineChartOptions" />
<Line Id="NumScarti" AspRatio="3" DataTS="@DatiPlot" Labels="@LabelPlot" lineColor="@lineColor" backColor="@lineColor" lTens="0" Title="Num Scarti"></Line>
</div>
</div>
</div>
+71 -143
View File
@@ -1,91 +1,36 @@
using System;
using Microsoft.AspNetCore.Components;
using MP.Data;
using MP.Stats.Data;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Blazorise.Charts;
using Microsoft.AspNetCore.Components;
using MP.Stats.Data;
namespace MP.Stats.Components
{
public partial class ChartScarti
{
#region Protected Fields
#region Private Properties
protected object barChartOptions = new
private List<double> DatiPareto
{
Scales = new
{
XAxes = new object[]
{
new {
Display = false
}
},
YAxes = new object[]
{
new {
Display = true,
ticks= new {
suggestedMin = 0
}
}
}
},
Tooltips = new
{
Mode = "nearest",
Intersect = false
},
Hover = new
{
Mode = "nearest",
Intersect = false
},
Animation = false,
AspectRatio = 3.5
};
get => ParetoData.Select(x => x.value).ToList();
}
protected object lineChartOptions = new
private List<chartJsData.chartJsTSerie> DatiPlot
{
Scales = new
{
XAxes = new object[]
{
new {
Display = true,
//type = "time"
}
},
YAxes = new object[]
{
new {
Display = true,
ticks= new {
suggestedMin = 0
}
}
}
},
Tooltips = new
{
Mode = "nearest",
Intersect = false
},
Hover = new
{
Mode = "nearest",
Intersect = false
},
Animation = false,
AspectRatio = 3.5
};
get => TSData;
}
protected LineChart<double> NumGuasti = new LineChart<double>();
private List<string> LabelPareto
{
get => ParetoData.Select(x => x.label).ToList();
}
protected BarChart<double> ParetoGuasti = new BarChart<double>();
private List<string> LabelPlot
{
get => TSData.Select(r => $"{r.x:yyyy-MM-dd}").ToList();
}
#endregion Protected Fields
#endregion Private Properties
#region Protected Properties
@@ -93,6 +38,36 @@ namespace MP.Stats.Components
protected List<MP.Data.DatabaseModels.ResScarti> _rawData { get; set; } = new List<MP.Data.DatabaseModels.ResScarti>();
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> bgColors
{
get => semaphColors(ParetoData.Count, "0.3");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColor
{
get => solidColors("1");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColors
{
get => semaphColors(ParetoData.Count, "1");
}
[Inject]
protected MessageService MessageService { get; set; }
@@ -101,7 +76,7 @@ namespace MP.Stats.Components
[Inject]
protected MpStatsService StatService { get; set; }
protected List<ChartTS> TSData { get; set; } = new List<ChartTS>();
protected List<chartJsData.chartJsTSerie> TSData { get; set; } = new List<chartJsData.chartJsTSerie>();
#endregion Protected Properties
@@ -119,10 +94,6 @@ namespace MP.Stats.Components
{
// ricalcolo charting data
recalcData();
var dataReload = Task.Run(async () =>
{
await HandleRedraw();
});
}
}
}
@@ -131,46 +102,6 @@ namespace MP.Stats.Components
#region Private Methods
private BarChartDataset<double> GetBarChartDataset()
{
var answ = new BarChartDataset<double>
{
Label = "Pareto Causali Scarto",
Data = ParetoData.Select(x => x.value).ToList(),
BackgroundColor = backgroundColors(ParetoData.Count, 0.4f),
BorderColor = backgroundColors(ParetoData.Count, 1f),
HoverBorderWidth = 5
};
return answ;
}
private List<string> GetBarChartLabels()
{
var answ = ParetoData.Select(x => x.label).ToList();
return answ;
}
private LineChartDataset<double> GetLineChartDataset()
{
var answ = new LineChartDataset<double>
{
Label = "Numero Scarti Periodo",
Data = TSData.Select(x => x.Value).ToList(),
BorderColor = backgroundColors(1, 1f),
Fill = true,
PointRadius = 2,
SteppedLine = true,
BorderDash = new List<int> { }
};
return answ;
}
private List<string> GetLineChartLabels()
{
var answ = TSData.Select(x => x.TLabel.ToString("ddd dd.MM")).ToList();
return answ;
}
private void recalcData()
{
if (RawData != null)
@@ -183,8 +114,8 @@ namespace MP.Stats.Components
TSData = RawData
.GroupBy(x => x.DataOraRif.Date)
.Select(y => new ChartTS() { TLabel = y.First().DataOraRif.Date, Value = y.Sum(c => c.Qta) })
.OrderBy(x => x.TLabel)
.Select(r => new chartJsData.chartJsTSerie() { x = r.First().DataOraRif.Date, y = r.Sum(c => c.Qta) })
.OrderBy(o => o.x)
.ToList();
}
}
@@ -193,44 +124,41 @@ namespace MP.Stats.Components
#region Protected Methods
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> backgroundColors(int numRecords, float alpha)
protected List<string> semaphColors(int numRecords, string alpha)
{
List<string> answ = new List<string>();
// rosso...
for (int i = 0; i < numRecords / 3; i++)
int numStep = 5;
// ciclo x numStep-1
for (int j = 0; j < numStep; j++)
{
answ.Add(ChartColor.FromRgba(255, 99, 132, alpha));
}
// arancione
for (int i = 0; i < numRecords / 3; i++)
{
answ.Add(ChartColor.FromRgba(255, 206, 86, alpha));
for (int i = 0; i < numRecords / numStep; i++)
{
answ.Add($"rgba(255, {82 + (206 - 82) * j / numStep}, {132 + (74 - 132) * j / numStep}, {alpha}");
}
}
// chiude
while (answ.Count < numRecords)
{
answ.Add(ChartColor.FromRgba(54, 82, 235, alpha));
answ.Add($"rgba(255, 206, 86, {alpha})");
}
return answ;
}
protected async Task HandleRedraw()
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> solidColors(string alpha)
{
if (ParetoGuasti != null)
{
await ParetoGuasti.Clear();
await ParetoGuasti.AddLabelsDatasetsAndUpdate(GetBarChartLabels(), GetBarChartDataset());
}
if (NumGuasti != null)
{
await NumGuasti.Clear();
await NumGuasti.AddLabelsDatasetsAndUpdate(GetLineChartLabels(), GetLineChartDataset());
}
List<string> answ = new List<string>();
answ.Add($"rgba(54, 162, 235, {alpha})");
return answ;
}
#endregion Protected Methods
+5 -3
View File
@@ -1,4 +1,6 @@
<div class="row">
@using MP.Stats.Components.ChartJs
<div class="row">
@if (RawData == null || RawData.Count == 0)
{
<div class="col-12">
@@ -21,10 +23,10 @@
<div class="col-10">
<div class="row">
<div class="col-2">
<PieChart @ref="PieVC" TItem="double" OptionsObject="pieChartOptions" />
<PieChart Id="PieAzioni" AspRatio="1" LegendPos="bottom" Data="@DatiPareto" Labels="@LabelPareto" lineColor="@lineColors" backColor="@bgColors" Title="Azioni"></PieChart>
</div>
<div class="col-10">
<LineChart @ref="TimeSerieVC" TItem="double" OptionsObject="lineChartOptions" />
<Line Id="PlotAzioni" AspRatio="6" DataTS="@DatiPlot" Labels="@LabelPlot" lineColor="@lineColor" backColor="@lineColor" lTens="0" Title="Azioni Utente"></Line>
</div>
</div>
</div>
+69 -72
View File
@@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Blazorise.Charts;
using Microsoft.AspNetCore.Components;
using MP.Data;
using MP.Stats.Data;
namespace MP.Stats.Components
@@ -85,8 +85,10 @@ namespace MP.Stats.Components
AspectRatio = 1
};
#if false
protected PieChart<double> PieVC = new PieChart<double>();
protected LineChart<double> TimeSerieVC = new LineChart<double>();
protected LineChart<double> TimeSerieVC = new LineChart<double>();
#endif
#endregion Protected Fields
@@ -104,7 +106,7 @@ namespace MP.Stats.Components
[Inject]
protected MpStatsService StatService { get; set; }
protected List<ChartTS> TSData { get; set; } = new List<ChartTS>();
protected List<chartJsData.chartJsTSerie> TSData { get; set; } = new List<chartJsData.chartJsTSerie>();
#endregion Protected Properties
@@ -122,10 +124,6 @@ namespace MP.Stats.Components
{
// ricalcolo charting data
recalcData();
var dataReload = Task.Run(async () =>
{
await HandleRedraw();
});
}
}
}
@@ -134,47 +132,10 @@ namespace MP.Stats.Components
#region Private Methods
private PieChartDataset<double> GetBarChartDataset()
{
var answ = new PieChartDataset<double>
{
Label = "Numero Controlli",
Data = ParetoData.Select(x => x.value).ToList(),
BackgroundColor = backgroundColors(ParetoData.Count, 0.4f),
BorderColor = backgroundColors(ParetoData.Count, 1f),
HoverBorderWidth = 3
};
return answ;
}
private List<string> GetBarChartLabels()
{
var answ = ParetoData.Select(x => x.label).ToList();
return answ;
}
/// <summary>
/// Elenco 2 linee x controli KO /KO
/// </summary>
/// <returns></returns>
private LineChartDataset<double> GetLineChartDataset()
{
var answ = new LineChartDataset<double>
{
Label = "Numero Azioni",
Data = TSData.Select(x => x.Value).ToList(),
BorderColor = getLineColors(1f),
Fill = true,
PointRadius = 2,
LineTension = 0,
BorderDash = new List<int> { }
};
return answ;
}
private List<string> GetLineChartLabels()
{
var answ = TSData.Select(x => x.TLabel.ToString("ddd dd.MM")).ToList();
var answ = TSData.Select(x => x.x.ToString("ddd dd.MM")).ToList();
return answ;
}
@@ -190,8 +151,8 @@ namespace MP.Stats.Components
TSData = RawData
.GroupBy(x => x.DataOraRif.Date)
.Select(y => new ChartTS() { TLabel = y.First().DataOraRif.Date, Value = y.Count() })
.OrderBy(x => x.TLabel)
.Select(r => new chartJsData.chartJsTSerie() { x = r.First().DataOraRif.Date, y = r.Count() })
.OrderBy(o => o.x)
.ToList();
}
}
@@ -200,29 +161,29 @@ namespace MP.Stats.Components
#region Protected Methods
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> backgroundColors(int numRecords, float alpha)
protected List<string> semaphColors(int numRecords, string alpha)
{
List<string> answ = new List<string>();
// verde...
for (int i = 0; i < numRecords / 3; i++)
int numStep = 5;
// ciclo x numStep-1
for (int j = 0; j < numStep; j++)
{
answ.Add(ChartColor.FromRgba(54, 254, 86, alpha));
}
// arancione
for (int i = 0; i < numRecords / 3; i++)
{
answ.Add(ChartColor.FromRgba(80, 254, 190, alpha));
for (int i = 0; i < numRecords / numStep; i++)
{
answ.Add($"rgba({54 + (180 - 54) * j / numStep}, {254 + (180 - 254) * j / numStep}, {86 + (35 - 86) * j / numStep}, {alpha}");
}
}
// chiude
while (answ.Count < numRecords)
{
answ.Add(ChartColor.FromRgba(180, 180, 35, alpha));
answ.Add($"rgba(180, 180, 35, {alpha})");
}
return answ;
}
@@ -231,25 +192,61 @@ namespace MP.Stats.Components
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> getLineColors(float alpha)
protected List<string> solidColors(string alpha)
{
List<string> answ = new List<string>();
answ.Add(ChartColor.FromRgba(54, 82, 254, alpha));
answ.Add($"rgba(54, 162, 235, {alpha})");
return answ;
}
protected async Task HandleRedraw()
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> bgColors
{
if (PieVC != null)
{
await PieVC.Clear();
await PieVC.AddLabelsDatasetsAndUpdate(GetBarChartLabels(), GetBarChartDataset());
}
if (TimeSerieVC != null)
{
await TimeSerieVC.Clear();
await TimeSerieVC.AddLabelsDatasetsAndUpdate(GetLineChartLabels(), GetLineChartDataset());
}
get => semaphColors(ParetoData.Count, "0.3");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColor
{
get => solidColors("1");
}
/// <summary>
/// Genera colori sfondo 33% rosso / arancione / giallo
/// </summary>
/// <param name="numRecords"></param>
/// <returns></returns>
protected List<string> lineColors
{
get => semaphColors(ParetoData.Count, "1");
}
private List<double> DatiPareto
{
get => ParetoData.Select(x => x.value).ToList();
}
private List<chartJsData.chartJsTSerie> DatiPlot
{
get => TSData;
}
private List<string> LabelPareto
{
get => ParetoData.Select(x => x.label).ToList();
}
private List<string> LabelPlot
{
get => TSData.Select(r => $"{r.x:yyyy-MM-dd}").ToList();
}
#endregion Protected Methods
+34 -62
View File
@@ -1,57 +1,20 @@
<div class="row">
<div class="col-6 col-lg-10 text-left">
<div class="col-12 col-lg-8 text-left">
<div class="row">
<div class="col-9 small">
<div class="col-12 small">
@if (totalCount > 0)
{
<Pagination>
<PaginationItem>
<PaginationLink Clicked="@HandlePaginationItemClick" Page="1">
<i class="fas fa-angle-double-left"></i>
</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink Clicked="@HandlePaginationItemClick" Page="@prevBlock.ToString()">
<span aria-hidden="true"><i class="fas fa-angle-left"></i></span>
</PaginationLink>
</PaginationItem>
<ul class="pagination pagination-sm mb-1">
<li class="page-item"><button class="page-link" @onclick="() => PaginationItemClick(1)"><i class="fas fa-angle-double-left"></i></button></li>
<li class="page-item"><button class="page-link" @onclick="() => PaginationItemClick(prevBlock)"><i class="fas fa-angle-left"></i></button></li>
@for (int i = @startPage; i <= endPage; ++i)
{
var pageNum = i;
<PaginationItem Active="@(currPage.Equals(pageNum))">
<PaginationLink Clicked="@HandlePaginationItemClick" Page="@pageNum.ToString()">
@pageNum
</PaginationLink>
</PaginationItem>
<li class="page-item @cssActive(pageNum)"><button class="page-link" @onclick="() => PaginationItemClick(pageNum)">@pageNum</button></li>
}
<PaginationItem>
<PaginationLink Clicked="@HandlePaginationItemClick" Page="@nextBlock.ToString()">
<i class="fas fa-angle-right"></i>
</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink Clicked="@HandlePaginationItemClick" Page="@LastPage.ToString()">
<i class="fas fa-angle-double-right"></i>
</PaginationLink>
</PaginationItem>
</Pagination>
}
</div>
<div class="col-3 text-center">
@if (!showLoading)
{
<div>@totalCount records</div>
}
@if (totalCount > 0)
{
if (!fileExist)
{
<button class="btn btn-block btn-sm btn-primary" @onclick="() => requestSave()"><span class="oi oi-wrench"></span> Prepare Data</button>
}
else
{
<a target="_blank" href="Download?fileName=@fileName" class="btn btn-block btn-sm btn-success"><span class="oi oi-cloud-download"></span> Download Data</a>
}
<li class="page-item"><button class="page-link" @onclick="() => PaginationItemClick(nextBlock)"><i class="fas fa-angle-right"></i></button></li>
<li class="page-item"><button class="page-link" @onclick="() => PaginationItemClick(LastPage)"><i class="fas fa-angle-double-right"></i></button></li>
</ul>
}
</div>
</div>
@@ -59,26 +22,35 @@
<div class="col-12 small">
@if (showLoading)
{
<Progress>
<ProgressBar Value="@percLoading" Striped="true" Animated="true" />
</Progress>
<div class="progress" style="height: 10px;">
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width:@percLoading%;"></div>
</div>
}
</div>
</div>
</div>
<div class="col-6 col-lg-2 text-right">
@if (totalCount > 0)
{
<div class="input-group input-group-sm">
row/pag:&nbsp;
<select @bind="@PageSize" class="form-control form-control-sm">
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
<div class="col-12 col-lg-4">
<div class="d-flex">
<div class="p-1 flex-fill text-right">
@if (!showLoading)
{
<span>@totalCount records</span>
}
</div>
}
<div class="p-1 flex-fill text-right small">
@if (totalCount > 0)
{
<div class="input-group input-group-sm">
<select @bind="@PageSize" class="form-control form-control-sm">
<option value="5">5</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
}
</div>
</div>
</div>
</div>
+17 -8
View File
@@ -9,7 +9,7 @@ using MP.Stats.Data;
namespace MP.Stats.Components
{
public partial class DataPager
public partial class DataPager : ComponentBase
{
#region Protected Fields
@@ -17,6 +17,7 @@ namespace MP.Stats.Components
protected string exportDir = $"{Directory.GetCurrentDirectory()}\\temp";
#endregion Protected Fields
#region Private Properties
@@ -61,7 +62,7 @@ namespace MP.Stats.Components
}
}
// calcola un set 1..numPOages centrato sulla pagina corrente...
// calcola un set 1 .. numPages centrato sulla pagina corrente...
private int startPage
{
get
@@ -194,23 +195,31 @@ namespace MP.Stats.Components
showLoading = false;
}
#endregion Private Methods
#region Protected Methods
protected void HandlePaginationItemClick(string page)
protected string cssActive(int numPage)
{
currPage = int.Parse(page);
string answ = "";
if (numPage == currPage)
{
answ = "active";
}
return answ;
}
#endregion Protected Methods
#if false
protected override async Task OnInitializedAsync()
{
await Task.Run(() => showLoading = false);
}
#endif
protected void PaginationItemClick(int page)
{
currPage = page;
}
#endregion Protected Methods
}
}
+6 -1
View File
@@ -9,11 +9,16 @@ using System.Threading.Tasks;
namespace MP.Stats.Components
{
/// <summary>
/// override calsse inputdate da
/// https://github.com/dotnet/aspnetcore/issues/18078
/// </summary>
/// <typeparam name="TValue"></typeparam>
public class InputDateTime<TValue> : InputDate<TValue>
{
#region Private Fields
private const string DateFormat = "yyyy-MM-ddTHH:mm";
private const string DateFormat = "yyyy-MM-ddTHH:mm:ss";
#endregion Private Fields
+4 -5
View File
@@ -1,12 +1,11 @@
@using Blazorise.Components
@using MP.Stats.Data
@using MP.Stats.Data
<EditForm Model="@SelFilter">
<div class="d-flex justify-content-between">
<div class="p-2">
<div class="form-group mb-0">
<label for="btnReset" class="small">chart</label><br />
<Button id="btnReset" class="@btnClass" Clicked="toggleChart" disabled="@(!ChartEnabled)">
<button class="@btnClass" @onclick="() => toggleChart()" disabled="@(!ChartEnabled)">
@if (chartVisible)
{
<span class="oi oi-chevron-top"></span>
@@ -15,7 +14,7 @@
{
<span class="oi oi-chevron-bottom"></span>
}
</Button>
</button>
</div>
</div>
<div class="p-2">
@@ -80,7 +79,7 @@
<div class="p-2">
<div class="form-group mb-0">
<label for="btnReset" class="small">reset</label><br />
<Button id="btnReset" class="btn btn-info btn-sm btn-block" Clicked="resetFilter"><span class="oi oi-loop-circular"></span></Button>
<button id="btnReset" class="btn btn-info btn-sm btn-block" Clicked="resetFilter"><span class="oi oi-loop-circular"></span></button>
</div>
</div>
</div>
+151 -11
View File
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>6.14.2201.1815</Version>
<Version>6.14.2202.2614</Version>
</PropertyGroup>
<ItemGroup>
@@ -28,18 +28,158 @@
<ItemGroup>
<None Include="compilerconfig.json" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap-grid.css.map" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap-grid.min.css.map" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap-reboot.css.map" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap-reboot.min.css.map" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap.css.map" />
<None Include="wwwroot\lib\bootstrap\css\bootstrap.min.css.map" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.bundle.js" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.bundle.js.map" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.bundle.min.js" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.bundle.min.js.map" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.js" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.js.map" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.min.js" />
<None Include="wwwroot\lib\bootstrap\js\bootstrap.min.js.map" />
<None Include="wwwroot\lib\bootstrap\scss\bootstrap-grid.scss" />
<None Include="wwwroot\lib\bootstrap\scss\bootstrap-reboot.scss" />
<None Include="wwwroot\lib\bootstrap\scss\bootstrap.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_alert.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_background-variant.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_badge.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_border-radius.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_box-shadow.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_breakpoints.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_buttons.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_caret.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_clearfix.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_deprecate.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_float.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_forms.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_gradients.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_grid-framework.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_grid.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_hover.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_image.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_list-group.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_lists.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_nav-divider.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_pagination.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_reset-text.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_resize.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_screen-reader.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_size.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_table-row.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_text-emphasis.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_text-hide.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_text-truncate.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_transition.scss" />
<None Include="wwwroot\lib\bootstrap\scss\mixins\_visibility.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_align.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_background.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_borders.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_clearfix.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_display.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_embed.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_flex.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_float.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_interactions.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_overflow.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_position.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_screenreaders.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_shadows.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_sizing.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_spacing.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_stretched-link.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_text.scss" />
<None Include="wwwroot\lib\bootstrap\scss\utilities\_visibility.scss" />
<None Include="wwwroot\lib\bootstrap\scss\vendor\_rfs.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_alert.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_badge.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_breadcrumb.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_button-group.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_buttons.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_card.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_carousel.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_close.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_code.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_custom-forms.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_dropdown.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_forms.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_functions.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_grid.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_images.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_input-group.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_jumbotron.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_list-group.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_media.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_mixins.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_modal.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_nav.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_navbar.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_pagination.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_popover.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_print.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_progress.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_reboot.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_root.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_spinners.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_tables.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_toasts.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_tooltip.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_transitions.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_type.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_utilities.scss" />
<None Include="wwwroot\lib\bootstrap\scss\_variables.scss" />
<None Include="wwwroot\lib\Chart.js\chart.esm.js" />
<None Include="wwwroot\lib\Chart.js\chart.esm.min.js" />
<None Include="wwwroot\lib\Chart.js\chart.js" />
<None Include="wwwroot\lib\Chart.js\chart.min.js" />
<None Include="wwwroot\lib\Chart.js\helpers.esm.js" />
<None Include="wwwroot\lib\Chart.js\helpers.esm.min.js" />
<None Include="wwwroot\lib\chartjs-adapter-luxon\chartjs-adapter-luxon.esm.js" />
<None Include="wwwroot\lib\chartjs-adapter-luxon\chartjs-adapter-luxon.esm.min.js" />
<None Include="wwwroot\lib\chartjs-adapter-luxon\chartjs-adapter-luxon.js" />
<None Include="wwwroot\lib\chartjs-adapter-luxon\chartjs-adapter-luxon.min.js" />
<None Include="wwwroot\lib\font-awesome\js\all.js" />
<None Include="wwwroot\lib\font-awesome\js\all.min.js" />
<None Include="wwwroot\lib\font-awesome\js\brands.js" />
<None Include="wwwroot\lib\font-awesome\js\brands.min.js" />
<None Include="wwwroot\lib\font-awesome\js\conflict-detection.js" />
<None Include="wwwroot\lib\font-awesome\js\conflict-detection.min.js" />
<None Include="wwwroot\lib\font-awesome\js\fontawesome.js" />
<None Include="wwwroot\lib\font-awesome\js\fontawesome.min.js" />
<None Include="wwwroot\lib\font-awesome\js\regular.js" />
<None Include="wwwroot\lib\font-awesome\js\regular.min.js" />
<None Include="wwwroot\lib\font-awesome\js\solid.js" />
<None Include="wwwroot\lib\font-awesome\js\solid.min.js" />
<None Include="wwwroot\lib\font-awesome\js\v4-shims.js" />
<None Include="wwwroot\lib\font-awesome\js\v4-shims.min.js" />
<None Include="wwwroot\lib\font-awesome\sprites\brands.svg" />
<None Include="wwwroot\lib\font-awesome\sprites\regular.svg" />
<None Include="wwwroot\lib\font-awesome\sprites\solid.svg" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-brands-400.svg" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-brands-400.woff2" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-regular-400.svg" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-regular-400.woff2" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-solid-900.svg" />
<None Include="wwwroot\lib\font-awesome\webfonts\fa-solid-900.woff2" />
<None Include="wwwroot\lib\luxon\cjs-browser\luxon.js" />
<None Include="wwwroot\lib\luxon\cjs-browser\luxon.js.map" />
<None Include="wwwroot\lib\luxon\cjs-browser\luxon.min.js" />
<None Include="wwwroot\lib\luxon\luxon.js" />
<None Include="wwwroot\lib\luxon\luxon.js.map" />
<None Include="wwwroot\lib\luxon\luxon.min.js" />
<None Include="wwwroot\lib\luxon\luxon.min.js.map" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazorise" Version="0.9.3.6" />
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.3.6" />
<PackageReference Include="Blazorise.Charts" Version="0.9.3.6" />
<PackageReference Include="Blazorise.Components" Version="0.9.3.6" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.3.6" />
<PackageReference Include="ElmahCore" Version="2.0.7" />
<PackageReference Include="ElmahCore.Common" Version="2.0.7" />
<PackageReference Include="ElmahCore.Sql" Version="2.0.7" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
<PackageReference Include="ElmahCore" Version="2.1.1" />
<PackageReference Include="ElmahCore.Common" Version="2.1.1" />
<PackageReference Include="ElmahCore.Sql" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
</ItemGroup>
+44 -135
View File
@@ -1,145 +1,54 @@
@page "/test"
<Heading Size="HeadingSize.Is1">Test</Heading>
@using MP.Stats.Components.ChartJs
<h1>Test Normal plot</h1>
<Button class="btn btn-info btn-sm" Clicked="@(async () => await HandleRedraw())">Redraw</Button>
<div class="row">
<div class="col-3">
<LineChart @ref="lineChart" TItem="double" OptionsObject="horizontalLineChartOptions" />
</div>
<div class="col-3">
<PieChart @ref="pieChart" TItem="double" OptionsObject="horizontalLineChartOptions" />
</div>
<div class="col-3">
<HorizontalBarChart @ref="barChartHoriz" TItem="double" OptionsObject="horizontalLineChartOptions" />
</div>
<div class="col-3">
<BarChart @ref="barChart" TItem="double" OptionsObject="horizontalLineChartOptions" />
<div class="col">
<div class="form-group mb-0">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<label class="input-group-text"># punti</label>
</div>
<input class="form-control form-control-sm" @bind="@numRec" placeholder="# punti da simulare" type="number" />
<div class="input-group-prepend">
<label class="input-group-text">media</label>
</div>
<input class="form-control form-control-sm" @bind="@mean" placeholder="valore media" type="number" />
<div class="input-group-prepend">
<label class="input-group-text">std dev</label>
</div>
<input class="form-control form-control-sm" @bind="@stdDev" placeholder="deviazione standard" type="number" />
<div class="input-group-prepend">
<label class="input-group-text">Tensione linea</label>
</div>
<input class="form-control form-control-sm" @bind="@lineTens" placeholder="deviazione standard" type="number" />
<div class="input-group-append">
<button class="btn btn-info btn-sm" @onclick="@(async () => await HandleRedraw())">Redraw</button>
</div>
</div>
</div>
</div>
</div>
@code {
PieChart<double> pieChart;
LineChart<double> lineChart;
HorizontalBarChart<double> barChartHoriz;
BarChart<double> barChart;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await HandleRedraw();
}
}
<div class="row">
<div class="col-6">
<BarPlot Id="TestBar" AspRatio="3" Data="@histData" Labels="@histLabel" lineColor="@lineColors" backColor="@bgColors" Legenda="Freq. Osservate"></BarPlot>
</div>
<div class="col-6">
<StepLine Id="TestTS" AspRatio="3" DataTS="@dataList" lineColor="@lineColors.Skip(4).Take(1).ToList()" backColor="@bgColors.Skip(4).Take(1).ToList()"></StepLine>
</div>
<div class="col-6">
<BarPlot Id="TestBarHor" Horizontal="true" AspRatio="3" Data="@histData" Labels="@histLabel" lineColor="@lineColors" backColor="@bgColors" Legenda="Freq. Osservate"></BarPlot>
</div>
<div class="col-6">
<Line Id="TestLineTS" AspRatio="3" DataTS="@dataList" lineColor="@lineColors.Skip(1).Take(1).ToList()" backColor="@bgColors.Skip(1).Take(1).ToList()" lTens="@lineTens"></Line>
</div>
<div class="col-6">
<PieChart Id="Testpie" AspRatio="3" Data="@histData" Labels="@histLabel" lineColor="@lineColors" backColor="@bgColors"></PieChart>
</div>
</div>
object horizontalLineChartOptions = new
{
//Title = new
//{
// Display = true,
// Text = "Line chart sample"
//},
//Scales = new
//{
// XAxes = new object[]
// {
// new {
// //ScaleLabel = new {
// //Display = true, LabelString = "value" },
// Stacked = true
// }
// }
//},
Tooltips = new
{
Mode = "nearest",
Intersect = false
},
Hover = new
{
Mode = "nearest",
Intersect = false
},
Legend = new
{
Display = true,
FullWidth = true
},
AspectRatio = 2.5
};
async Task HandleRedraw()
{
await pieChart.Clear();
await pieChart.AddLabelsDatasetsAndUpdate(Labels, GetPieChartDataset());
await lineChart.Clear();
await lineChart.AddLabelsDatasetsAndUpdate(Labels, GetLineChartDataset());
await barChart.Clear();
await barChart.AddLabelsDatasetsAndUpdate(Labels, GetBarChartDataset());
await barChartHoriz.Clear();
await barChartHoriz.AddLabelsDatasetsAndUpdate(Labels, GetHorizBarChartDataset());
}
PieChartDataset<double> GetPieChartDataset()
{
return new PieChartDataset<double>
{
Label = "# of randoms",
Data = RandomizeData(),
BackgroundColor = backgroundColors,
BorderColor = borderColors
};
}
LineChartDataset<double> GetLineChartDataset()
{
return new LineChartDataset<double>
{
Label = "# of randoms",
Data = RandomizeData(),
BackgroundColor = backgroundColors,
BorderColor = borderColors,
Fill = true,
PointRadius = 2,
BorderDash = new List<int> { }
};
}
BarChartDataset<double> GetBarChartDataset()
{
return new BarChartDataset<double>
{
Label = "# of randoms",
Data = RandomizeData(),
BackgroundColor = backgroundColors,
BorderColor = borderColors,
HoverBorderWidth = 5
};
}
BarChartDataset<double> GetHorizBarChartDataset()
{
return new BarChartDataset<double>
{
Label = "# of randoms",
Data = RandomizeData(),
BackgroundColor = backgroundColors,
BorderColor = borderColors,
HoverBorderWidth = 5
};
}
string[] Labels = { "Red", "Blue", "Yellow", "Green", "Purple", "Orange" };
List<string> backgroundColors = new List<string> { ChartColor.FromRgba(255, 99, 132, 0.2f), ChartColor.FromRgba(54, 162, 235, 0.2f), ChartColor.FromRgba(255, 206, 86, 0.2f), ChartColor.FromRgba(75, 192, 192, 0.2f), ChartColor.FromRgba(153, 102, 255, 0.2f), ChartColor.FromRgba(255, 159, 64, 0.2f) };
List<string> borderColors = new List<string> { ChartColor.FromRgba(255, 99, 132, 1f), ChartColor.FromRgba(54, 162, 235, 1f), ChartColor.FromRgba(255, 206, 86, 1f), ChartColor.FromRgba(75, 192, 192, 1f), ChartColor.FromRgba(153, 102, 255, 1f), ChartColor.FromRgba(255, 159, 64, 1f) };
List<double> RandomizeData()
{
var r = new Random(DateTime.Now.Millisecond);
return new List<double> { r.Next(3, 30) * r.NextDouble(), r.Next(3, 30) * r.NextDouble(), r.Next(3, 30) * r.NextDouble(), r.Next(3, 30) * r.NextDouble(), r.Next(3, 30) * r.NextDouble(), r.Next(3, 30) * r.NextDouble() };
}
}
+198
View File
@@ -0,0 +1,198 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP.Data;
using MP.Stats;
namespace MP.Stats.Pages
{
public partial class Test
{
private int _numRec = 100;
private double _mean = 14;
private double _stdDev = 1;
public int numRec
{
get
{
return _numRec;
}
set
{
_numRec = value;
var pUpd = Task.Run(async () => await HandleRedraw());
pUpd.Wait();
}
}
public double mean
{
get
{
return _mean;
}
set
{
_mean = value;
var pUpd = Task.Run(async () => await HandleRedraw());
pUpd.Wait();
}
}
public double stdDev
{
get
{
return _stdDev;
}
set
{
_stdDev = value;
var pUpd = Task.Run(async () => await HandleRedraw());
pUpd.Wait();
}
}
protected int lineTens { get; set; } = 0;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await HandleRedraw();
}
}
protected override async Task OnInitializedAsync()
{
await HandleRedraw();
}
object horizontalLineChartOptions = new
{
Tooltips = new
{
Mode = "nearest",
Intersect = false
}
,
Hover = new
{
Mode = "nearest",
Intersect = false
}
,
Legend = new
{
Display = true,
FullWidth = true
}
,
AspectRatio = 2.5
}
;
private async Task HandleRedraw()
{
// calcolo hist frequenza con EFCore: https://entityframeworkcore.com/knowledge-base/60871048/group-by-and-to-dictionary-in-ef-core-3-1
randData = RandomizeData();
//var histDict = randData.GroupBy(r => r).Select(g => new
//{
// g.Key,
// Count = g.Count()
//}).OrderBy(d => d.Key).ToDictionary(x => x.Key, x => x.Count.ToString());
//histData = histDict.Values.ToArray();
//histLabel = histDict.Keys.Select(x => $"{x}").ToArray();
// calcolo i valori raggruppati in numGroup...
int numGroup = (int)Math.Sqrt(numRec);
double minVal = randData.Min();
double maxVal = randData.Max();
double step = (maxVal - minVal) / numGroup;
var histDictGroup = randData.GroupBy(r => ((int)Math.Round((r - minVal) / step)) * step + minVal).Select(g => new
{
g.Key,
Count = g.Count()
}).OrderBy(d => d.Key).ToDictionary(x => x.Key, x => x.Count);
histGroupData = histDictGroup.Values.Select(x => $"{x}").ToArray();
histGroupLabel = histDictGroup.Keys.Select(x => $"{x:N2}").ToArray();
histData = histDictGroup.Values.Select(x => (double)x).ToList();
histLabel = histDictGroup.Keys.Select(x => $"{x:N2}").ToList();
dataList = TSData(DateTime.Today.AddHours(-randData.Count), randData).Select(r => new chartJsData.chartJsTSerie()
{ x = r.Key, y = r.Value }).ToList();
lineColors = new List<string>() { "rgba(255, 99, 132, 1)", "rgba(255, 159, 64, 1)", "rgba(255, 205, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(54, 162, 235, 1)", "rgba(153, 102, 255, 1)", "rgba(201, 203, 207, 1)" };
bgColors = new List<string>() { "rgba(255, 99, 132, 0.3)", "rgba(255, 159, 64, 0.3)", "rgba(255, 205, 86, 0.3)", "rgba(75, 192, 192, 0.3)", "rgba(54, 162, 235, 0.3)", "rgba(153, 102, 255, 0.3)", "rgba(201, 203, 207, 0.3)" };
}
protected List<double> histData { get; set; } = new List<double>();
protected List<string> histLabel { get; set; } = new List<string>();
protected string[]? histGroupData { get; set; } = null;
protected string[]? histGroupLabel { get; set; } = null;
protected List<double> randData { get; set; } = new List<double>();
protected List<string> bgColors = new List<string>();
protected List<string> lineColors = new List<string>();
protected List<chartJsData.chartJsTSerie> dataList { get; set; } = new List<chartJsData.chartJsTSerie>();
string[] Labels = { "Red", "Blue", "Yellow", "Green", "Purple", "Orange" };
private List<double> RandomizeData()
{
var r = new Random(DateTime.Now.Millisecond);
List<double> answ = new List<double>();
for (int i = 0; i < numRec; i++)
{
double u1 = 1.0 - r.NextDouble(); // uniform (0,1] random doubles
double u2 = 1.0 - r.NextDouble();
double randStdNormal = Math.Sqrt(-2.0 * Math.Log(u1)) * Math.Sin(2.0 * Math.PI * u2);
double randNormal = mean + stdDev * randStdNormal; // random normal (mean, stdDev^2)
//answ.Add(r.Next(3, 30) * r.NextDouble());
answ.Add(randNormal);
}
return answ;
}
private Dictionary<DateTime, double> TSData(DateTime inizio, List<double> yData)
{
Dictionary<DateTime, double> answ = new Dictionary<DateTime, double>();
// usando i dati ricevuti aggiunge variabile x = tempo crescente
int idx = 0;
foreach (var item in yData)
{
answ.Add(inizio.AddHours(idx), item);
idx++;
}
// restituisco!
return answ;
}
}
}
+7 -20
View File
@@ -14,16 +14,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MP.STATS</title>
<base href="~/" />
@*<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />*@
<!-- inside of head section -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css">
<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
<link href="css/site.css" rel="stylesheet" />
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"href="css/site.css" />
<link rel="stylesheet"href="lib/font-awesome/css/all.css" />
<link href="MP.Stats.styles.css" rel="stylesheet" />
</head>
<body>
@@ -40,16 +33,10 @@
<a class="dismiss">🗙</a>
</div>
<!-- inside of body section and after the div/app tag -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script src="_content/Blazorise/blazorise.js"></script>
<script src="_content/Blazorise.Bootstrap/blazorise.bootstrap.js"></script>
<script src="_content/Blazorise.Charts/blazorise.charts.js"></script>
<script src="_framework/blazor.server.js"></script>
<script src="lib/Chart.js/chart.js"></script>
<script src="lib/luxon/luxon.js"></script>
<script src="lib/chartjs-adapter-luxon/chartjs-adapter-luxon.js"></script>
<script src="lib/chartBoot.js"></script>
</body>
</html>
@@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS01:8172/MsDeploy.axd</MSDeployServiceURL>
<MSDeployServiceURL>https://iis01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/STATS</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
@@ -22,6 +22,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
@@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://IIS02:8172/MsDeploy.axd</MSDeployServiceURL>
<MSDeployServiceURL>https://iis02.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/STATS</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
@@ -22,6 +22,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
@@ -15,7 +15,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<DesktopBuildPackageLocation>bin\publish\MP.Stats.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/STATS</DeployIisAppPath>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
@@ -4,24 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://w2019-iis-dev:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/STATS</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>
</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>d9901b50-e61c-400c-b62c-fa060cf72c29</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>https://iis03.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/STATS</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>False</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>True</EnableMSDeployBackup>
<UserName>jenkins</UserName>
<_SavePWD>True</_SavePWD>
<TargetFramework>net6.0</TargetFramework>
<EnableMsDeployAppOffline>True</EnableMsDeployAppOffline>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 6.14.2201.1815</h4>
<h4>Versione: 6.14.2202.2614</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.14.2201.1815
6.14.2202.2614
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.14.2201.1815</version>
<version>6.14.2202.2614</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
-10
View File
@@ -1,6 +1,3 @@
using Blazorise;
using Blazorise.Bootstrap;
using Blazorise.Icons.FontAwesome;
using ElmahCore.Mvc;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@@ -78,13 +75,6 @@ namespace MP.Stats
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddBlazorise(options =>
{
options.ChangeTextOnKeyPress = true; // optional
})
.AddBootstrapProviders()
.AddFontAwesomeIcons();
// Elmah
services.AddElmah();
//string elmaConn = "Data Source=SQL2016DEV;Initial Catalog=Elmah;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=SHERPA.BBM;";
+1 -3
View File
@@ -7,6 +7,4 @@
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using MP.Stats
@using MP.Stats.Shared
@using Blazorise
@using Blazorise.Charts
@using MP.Stats.Shared
+26
View File
@@ -0,0 +1,26 @@
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "font-awesome@5.15.4",
"destination": "wwwroot/lib/font-awesome/"
},
{
"library": "bootstrap@4.6.1",
"destination": "wwwroot/lib/bootstrap/"
},
{
"library": "Chart.js@3.7.0",
"destination": "wwwroot/lib/Chart.js/"
},
{
"library": "chartjs-adapter-luxon@1.1.0",
"destination": "wwwroot/lib/chartjs-adapter-luxon/"
},
{
"library": "luxon@2.3.0",
"destination": "wwwroot/lib/luxon/"
}
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
/*!
* Chart.js v3.7.0
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
*/
export { H as HALF_PI, aX as INFINITY, P as PI, aW as PITAU, aZ as QUARTER_PI, aY as RAD_PER_DEG, T as TAU, a_ as TWO_THIRDS_PI, Q as _addGrace, V as _alignPixel, a0 as _alignStartEnd, p as _angleBetween, a$ as _angleDiff, _ as _arrayUnique, a6 as _attachContext, aq as _bezierCurveTo, an as _bezierInterpolation, av as _boundSegment, al as _boundSegments, a3 as _capitalize, ak as _computeSegments, a7 as _createResolver, aH as _decimalPlaces, aP as _deprecated, a8 as _descriptors, af as _elementsEqual, M as _factorize, aJ as _filterBetween, F as _getParentNode, U as _int16Range, ah as _isBetween, ag as _isClickEvent, K as _isDomSupported, z as _isPointInArea, w as _limitValue, aI as _longestText, aK as _lookup, x as _lookupByKey, S as _measureText, aN as _merger, aO as _mergerIf, aw as _normalizeAngle, ao as _pointInLine, ai as _readValueToProps, A as _rlookupByKey, aD as _setMinAndMaxByKey, am as _steppedInterpolation, ap as _steppedLineTo, az as _textX, $ as _toLeftRightCenter, aj as _updateBezierControlPoints, as as addRoundedRectPath, aG as almostEquals, aF as almostWhole, O as callback, ad as clearCanvas, W as clipArea, aM as clone, c as color, h as createContext, ab as debounce, j as defined, aC as distanceBetweenPoints, ar as drawPoint, D as each, e as easingEffects, N as finiteOrDefault, aU as fontString, o as formatNumber, B as getAngleFromPoint, aL as getHoverColor, E as getMaximumSize, y as getRelativePosition, ax as getRtlAdapter, aT as getStyle, b as isArray, g as isFinite, a5 as isFunction, k as isNullOrUndef, q as isNumber, i as isObject, l as listenArrayEvents, L as log10, a2 as merge, a9 as mergeIf, aE as niceNum, aB as noop, ay as overrideTextDirection, G as readUsedSize, X as renderText, r as requestAnimFrame, a as resolve, f as resolveObjectKey, aA as restoreTextDirection, ac as retinaScale, ae as setsEqual, s as sign, aR as splineCurve, aS as splineCurveMonotone, J as supportsEventListenerOptions, I as throttled, R as toDegrees, n as toDimension, Z as toFont, aQ as toFontString, aV as toLineHeight, C as toPadding, m as toPercentage, t as toRadians, at as toTRBL, au as toTRBLCorners, aa as uid, Y as unclipArea, u as unlistenArrayEvents, v as valueOrDefault } from './chunks/helpers.segment.js';
+1
View File
@@ -0,0 +1 @@
export{H as HALF_PI,aX as INFINITY,P as PI,aW as PITAU,aZ as QUARTER_PI,aY as RAD_PER_DEG,T as TAU,a_ as TWO_THIRDS_PI,Q as _addGrace,V as _alignPixel,a0 as _alignStartEnd,p as _angleBetween,a$ as _angleDiff,_ as _arrayUnique,a6 as _attachContext,aq as _bezierCurveTo,an as _bezierInterpolation,av as _boundSegment,al as _boundSegments,a3 as _capitalize,ak as _computeSegments,a7 as _createResolver,aH as _decimalPlaces,aP as _deprecated,a8 as _descriptors,af as _elementsEqual,M as _factorize,aJ as _filterBetween,F as _getParentNode,U as _int16Range,ah as _isBetween,ag as _isClickEvent,K as _isDomSupported,z as _isPointInArea,w as _limitValue,aI as _longestText,aK as _lookup,x as _lookupByKey,S as _measureText,aN as _merger,aO as _mergerIf,aw as _normalizeAngle,ao as _pointInLine,ai as _readValueToProps,A as _rlookupByKey,aD as _setMinAndMaxByKey,am as _steppedInterpolation,ap as _steppedLineTo,az as _textX,$ as _toLeftRightCenter,aj as _updateBezierControlPoints,as as addRoundedRectPath,aG as almostEquals,aF as almostWhole,O as callback,ad as clearCanvas,W as clipArea,aM as clone,c as color,h as createContext,ab as debounce,j as defined,aC as distanceBetweenPoints,ar as drawPoint,D as each,e as easingEffects,N as finiteOrDefault,aU as fontString,o as formatNumber,B as getAngleFromPoint,aL as getHoverColor,E as getMaximumSize,y as getRelativePosition,ax as getRtlAdapter,aT as getStyle,b as isArray,g as isFinite,a5 as isFunction,k as isNullOrUndef,q as isNumber,i as isObject,l as listenArrayEvents,L as log10,a2 as merge,a9 as mergeIf,aE as niceNum,aB as noop,ay as overrideTextDirection,G as readUsedSize,X as renderText,r as requestAnimFrame,a as resolve,f as resolveObjectKey,aA as restoreTextDirection,ac as retinaScale,ae as setsEqual,s as sign,aR as splineCurve,aS as splineCurveMonotone,J as supportsEventListenerOptions,I as throttled,R as toDegrees,n as toDimension,Z as toFont,aQ as toFontString,aV as toLineHeight,C as toPadding,m as toPercentage,t as toRadians,at as toTRBL,au as toTRBLCorners,aa as uid,Y as unclipArea,u as unlistenArrayEvents,v as valueOrDefault}from"./chunks/helpers.segment.js";
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+325
View File
@@ -0,0 +1,325 @@
/*!
* Bootstrap Reboot v4.6.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
margin-bottom: 0.5rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title],
abbr[data-original-title] {
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #0056b3;
text-decoration: underline;
}
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
progress {
vertical-align: baseline;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
/*!
* Bootstrap Reboot v4.6.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,52 @@
//
// Base styles
//
.alert {
position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
@include border-radius($alert-border-radius);
}
// Headings for larger alerts
.alert-heading {
// Specified to prevent conflicts of changing $headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: $alert-link-font-weight;
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissible {
padding-right: $close-font-size + $alert-padding-x * 2;
// Adjust close link position
.close {
position: absolute;
top: 0;
right: 0;
z-index: 2;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}
}
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
@each $color, $value in $theme-colors {
.alert-#{$color} {
@include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
}
}
@@ -0,0 +1,54 @@
// Base class
//
// Requires one of the contextual, color modifier classes for `color` and
// `background-color`.
.badge {
display: inline-block;
padding: $badge-padding-y $badge-padding-x;
@include font-size($badge-font-size);
font-weight: $badge-font-weight;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius($badge-border-radius);
@include transition($badge-transition);
@at-root a#{&} {
@include hover-focus() {
text-decoration: none;
}
}
// Empty badges collapse automatically
&:empty {
display: none;
}
}
// Quick fix for badges in buttons
.btn .badge {
position: relative;
top: -1px;
}
// Pill badges
//
// Make them extra rounded with a modifier to replace v3's badges.
.badge-pill {
padding-right: $badge-pill-padding-x;
padding-left: $badge-pill-padding-x;
@include border-radius($badge-pill-border-radius);
}
// Colors
//
// Contextual variations (linked badges get darker on :hover).
@each $color, $value in $theme-colors {
.badge-#{$color} {
@include badge-variant($value);
}
}
@@ -0,0 +1,42 @@
.breadcrumb {
display: flex;
flex-wrap: wrap;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $breadcrumb-margin-bottom;
@include font-size($breadcrumb-font-size);
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($breadcrumb-border-radius);
}
.breadcrumb-item {
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
padding-left: $breadcrumb-item-padding;
&::before {
float: left; // Suppress inline spacings and underlining of the separator
padding-right: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: escape-svg($breadcrumb-divider);
}
}
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
// without `<ul>`s. The `::before` pseudo-element generates an element
// *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
//
// To trick IE into suppressing the underline, we give the pseudo-element an
// underline and then immediately remove it.
+ .breadcrumb-item:hover::before {
text-decoration: underline;
}
// stylelint-disable-next-line no-duplicate-selectors
+ .breadcrumb-item:hover::before {
text-decoration: none;
}
&.active {
color: $breadcrumb-active-color;
}
}
@@ -0,0 +1,163 @@
// stylelint-disable selector-no-qualifying-type
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-flex;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
flex: 1 1 auto;
// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
@include hover() {
z-index: 1;
}
&:focus,
&:active,
&.active {
z-index: 1;
}
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.input-group {
width: auto;
}
}
.btn-group {
// Prevent double borders when buttons are next to each other
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-left: -$btn-border-width;
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-right-radius(0);
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) > .btn {
@include border-left-radius(0);
}
}
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-sm > .btn { @extend .btn-sm; }
.btn-group-lg > .btn { @extend .btn-lg; }
//
// Split button dropdowns
//
.dropdown-toggle-split {
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
&::after,
.dropup &::after,
.dropright &::after {
margin-left: 0;
}
.dropleft &::before {
margin-right: 0;
}
}
.btn-sm + .dropdown-toggle-split {
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
}
.btn-lg + .dropdown-toggle-split {
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
}
// The clickable button for toggling the menu
// Set the same inset shadow as the :active state
.btn-group.show .dropdown-toggle {
@include box-shadow($btn-active-box-shadow);
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
@include box-shadow(none);
}
}
//
// Vertical button groups
//
.btn-group-vertical {
flex-direction: column;
align-items: flex-start;
justify-content: center;
> .btn,
> .btn-group {
width: 100%;
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: -$btn-border-width;
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-bottom-radius(0);
}
> .btn:not(:first-child),
> .btn-group:not(:first-child) > .btn {
@include border-top-radius(0);
}
}
// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
// `display: none;` or `visibility: hidden;` as that also hides the popover.
// Simply visually hiding the inputs via `opacity` would leave them clickable in
// certain cases which is prevented by using `clip` and `pointer-events`.
// This way, we ensure a DOM element is visible to position the popover from.
//
// See https://github.com/twbs/bootstrap/pull/12794 and
// https://github.com/twbs/bootstrap/pull/14559 for more information.
.btn-group-toggle {
> .btn,
> .btn-group > .btn {
margin-bottom: 0; // Override default `<label>` value
input[type="radio"],
input[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
}
}
}
@@ -0,0 +1,142 @@
// stylelint-disable selector-no-qualifying-type
//
// Base styles
//
.btn {
display: inline-block;
font-family: $btn-font-family;
font-weight: $btn-font-weight;
color: $body-color;
text-align: center;
text-decoration: if($link-decoration == none, null, none);
white-space: $btn-white-space;
vertical-align: middle;
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);
@include hover() {
color: $body-color;
text-decoration: none;
}
&:focus,
&.focus {
outline: 0;
box-shadow: $btn-focus-box-shadow;
}
// Disabled comes first so active can properly restyle
&.disabled,
&:disabled {
opacity: $btn-disabled-opacity;
@include box-shadow(none);
}
&:not(:disabled):not(.disabled) {
cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
&:active,
&.active {
@include box-shadow($btn-active-box-shadow);
&:focus {
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
}
}
// Future-proof disabling of clicks on `<a>` elements
a.btn.disabled,
fieldset:disabled a.btn {
pointer-events: none;
}
//
// Alternate buttons
//
@each $color, $value in $theme-colors {
.btn-#{$color} {
@include button-variant($value, $value);
}
}
@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}
//
// Link buttons
//
// Make a button look and behave like a link
.btn-link {
font-weight: $font-weight-normal;
color: $link-color;
text-decoration: $link-decoration;
@include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
&:focus,
&.focus {
text-decoration: $link-hover-decoration;
}
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
pointer-events: none;
}
// No need for an active state here
}
//
// Button Sizes
//
.btn-lg {
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
}
.btn-sm {
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
}
//
// Block button
//
.btn-block {
display: block;
width: 100%;
// Vertically space out multiple block buttons
+ .btn-block {
margin-top: $btn-block-spacing-y;
}
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}
@@ -0,0 +1,286 @@
//
// Base styles
//
.card {
position: relative;
display: flex;
flex-direction: column;
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
height: $card-height;
word-wrap: break-word;
background-color: $card-bg;
background-clip: border-box;
border: $card-border-width solid $card-border-color;
@include border-radius($card-border-radius);
> hr {
margin-right: 0;
margin-left: 0;
}
> .list-group {
border-top: inherit;
border-bottom: inherit;
&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
}
&:last-child {
border-bottom-width: 0;
@include border-bottom-radius($card-inner-border-radius);
}
}
// Due to specificity of the above selector (`.card > .list-group`), we must
// use a child selector here to prevent double borders.
> .card-header + .list-group,
> .list-group + .card-footer {
border-top: 0;
}
}
.card-body {
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
// Workaround for the image size bug in IE
// See: https://github.com/twbs/bootstrap/pull/28855
min-height: 1px;
padding: $card-spacer-x;
color: $card-color;
}
.card-title {
margin-bottom: $card-spacer-y;
}
.card-subtitle {
margin-top: -$card-spacer-y * .5;
margin-bottom: 0;
}
.card-text:last-child {
margin-bottom: 0;
}
.card-link {
@include hover() {
text-decoration: none;
}
+ .card-link {
margin-left: $card-spacer-x;
}
}
//
// Optional textual caps
//
.card-header {
padding: $card-spacer-y $card-spacer-x;
margin-bottom: 0; // Removes the default margin-bottom of <hN>
color: $card-cap-color;
background-color: $card-cap-bg;
border-bottom: $card-border-width solid $card-border-color;
&:first-child {
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
}
}
.card-footer {
padding: $card-spacer-y $card-spacer-x;
color: $card-cap-color;
background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color;
&:last-child {
@include border-radius(0 0 $card-inner-border-radius $card-inner-border-radius);
}
}
//
// Header navs
//
.card-header-tabs {
margin-right: -$card-spacer-x * .5;
margin-bottom: -$card-spacer-y;
margin-left: -$card-spacer-x * .5;
border-bottom: 0;
}
.card-header-pills {
margin-right: -$card-spacer-x * .5;
margin-left: -$card-spacer-x * .5;
}
// Card image
.card-img-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: $card-img-overlay-padding;
@include border-radius($card-inner-border-radius);
}
.card-img,
.card-img-top,
.card-img-bottom {
flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
}
.card-img,
.card-img-top {
@include border-top-radius($card-inner-border-radius);
}
.card-img,
.card-img-bottom {
@include border-bottom-radius($card-inner-border-radius);
}
// Card deck
.card-deck {
.card {
margin-bottom: $card-deck-margin;
}
@include media-breakpoint-up(sm) {
display: flex;
flex-flow: row wrap;
margin-right: -$card-deck-margin;
margin-left: -$card-deck-margin;
.card {
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
margin-right: $card-deck-margin;
margin-bottom: 0; // Override the default
margin-left: $card-deck-margin;
}
}
}
//
// Card groups
//
.card-group {
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
margin-bottom: $card-group-margin;
}
@include media-breakpoint-up(sm) {
display: flex;
flex-flow: row wrap;
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
flex: 1 0 0%;
margin-bottom: 0;
+ .card {
margin-left: 0;
border-left: 0;
}
// Handle rounded corners
@if $enable-rounded {
&:not(:last-child) {
@include border-right-radius(0);
.card-img-top,
.card-header {
// stylelint-disable-next-line property-disallowed-list
border-top-right-radius: 0;
}
.card-img-bottom,
.card-footer {
// stylelint-disable-next-line property-disallowed-list
border-bottom-right-radius: 0;
}
}
&:not(:first-child) {
@include border-left-radius(0);
.card-img-top,
.card-header {
// stylelint-disable-next-line property-disallowed-list
border-top-left-radius: 0;
}
.card-img-bottom,
.card-footer {
// stylelint-disable-next-line property-disallowed-list
border-bottom-left-radius: 0;
}
}
}
}
}
}
//
// Columns
//
.card-columns {
.card {
margin-bottom: $card-columns-margin;
}
@include media-breakpoint-up(sm) {
column-count: $card-columns-count;
column-gap: $card-columns-gap;
orphans: 1;
widows: 1;
.card {
display: inline-block; // Don't let them vertically span multiple columns
width: 100%; // Don't let their width change
}
}
}
//
// Accordion
//
.accordion {
overflow-anchor: none;
> .card {
overflow: hidden;
&:not(:last-of-type) {
border-bottom: 0;
@include border-bottom-radius(0);
}
&:not(:first-of-type) {
@include border-top-radius(0);
}
> .card-header {
@include border-radius(0);
margin-bottom: -$card-border-width;
}
}
}
@@ -0,0 +1,200 @@
// Notes on the classes:
//
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
// we're preventing all actions instead
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
// the active slide is heading.
// 3. .active.carousel-item is the current slide.
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
// slide in its in-transition state. Only one of these occurs at a time.
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
// is the upcoming slide in transition.
.carousel {
position: relative;
}
.carousel.pointer-event {
touch-action: pan-y;
}
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
@include clearfix();
}
.carousel-item {
position: relative;
display: none;
float: left;
width: 100%;
margin-right: -100%;
backface-visibility: hidden;
@include transition($carousel-transition);
}
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}
.carousel-item-next:not(.carousel-item-left),
.active.carousel-item-right {
transform: translateX(100%);
}
.carousel-item-prev:not(.carousel-item-right),
.active.carousel-item-left {
transform: translateX(-100%);
}
//
// Alternate transitions
//
.carousel-fade {
.carousel-item {
opacity: 0;
transition-property: opacity;
transform: none;
}
.carousel-item.active,
.carousel-item-next.carousel-item-left,
.carousel-item-prev.carousel-item-right {
z-index: 1;
opacity: 1;
}
.active.carousel-item-left,
.active.carousel-item-right {
z-index: 0;
opacity: 0;
@include transition(opacity 0s $carousel-transition-duration);
}
}
//
// Left/right controls for nav
//
.carousel-control-prev,
.carousel-control-next {
position: absolute;
top: 0;
bottom: 0;
z-index: 1;
// Use flex for alignment (1-3)
display: flex; // 1. allow flex styles
align-items: center; // 2. vertically center contents
justify-content: center; // 3. horizontally center contents
width: $carousel-control-width;
padding: 0;
color: $carousel-control-color;
text-align: center;
background: none;
border: 0;
opacity: $carousel-control-opacity;
@include transition($carousel-control-transition);
// Hover/focus state
@include hover-focus() {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: $carousel-control-hover-opacity;
}
}
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
}
// Icons for within
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background: 50% / 100% 100% no-repeat;
}
.carousel-control-prev-icon {
background-image: escape-svg($carousel-control-prev-icon-bg);
}
.carousel-control-next-icon {
background-image: escape-svg($carousel-control-next-icon-bg);
}
// Optional indicator pips
//
// Add an ordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
position: absolute;
right: 0;
bottom: 0;
left: 0;
z-index: 15;
display: flex;
justify-content: center;
padding-left: 0; // override <ol> default
// Use the .carousel-control's width as margin so we don't overlay those
margin-right: $carousel-control-width;
margin-left: $carousel-control-width;
list-style: none;
li {
box-sizing: content-box;
flex: 0 1 auto;
width: $carousel-indicator-width;
height: $carousel-indicator-height;
margin-right: $carousel-indicator-spacer;
margin-left: $carousel-indicator-spacer;
text-indent: -999px;
cursor: pointer;
background-color: $carousel-indicator-active-bg;
background-clip: padding-box;
// Use transparent borders to increase the hit area by 10px on top and bottom.
border-top: $carousel-indicator-hit-area-height solid transparent;
border-bottom: $carousel-indicator-hit-area-height solid transparent;
opacity: .5;
@include transition($carousel-indicator-transition);
}
.active {
opacity: 1;
}
}
// Optional captions
//
//
.carousel-caption {
position: absolute;
right: (100% - $carousel-caption-width) * .5;
bottom: 20px;
left: (100% - $carousel-caption-width) * .5;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: $carousel-caption-color;
text-align: center;
}
@@ -0,0 +1,40 @@
.close {
float: right;
@include font-size($close-font-size);
font-weight: $close-font-weight;
line-height: 1;
color: $close-color;
text-shadow: $close-text-shadow;
opacity: .5;
// Override <a>'s hover style
@include hover() {
color: $close-color;
text-decoration: none;
}
&:not(:disabled):not(.disabled) {
@include hover-focus() {
opacity: .75;
}
}
}
// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
// stylelint-disable-next-line selector-no-qualifying-type
button.close {
padding: 0;
background-color: transparent;
border: 0;
}
// Future-proof disabling of clicks on `<a>` elements
// stylelint-disable-next-line selector-no-qualifying-type
a.close.disabled {
pointer-events: none;
}

Some files were not shown because too many files have changed in this diff Show More