Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geosynk20 pusher #142

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
20b91a4
Update UML-modell with correct figure on Felleskomponent #141
larseggan Jun 14, 2021
e9d8403
Geosync Provider 2.0 Beta.
larseggan Sep 1, 2021
8ce405e
Updated readme for Provider Geosynk 2.0 Beta
larseggan Sep 1, 2021
3f2debd
general workflow
jarped Sep 14, 2021
1c59b9f
added pushAll and help for push
jarped Sep 14, 2021
11b7909
undo silly commits
jarped Sep 14, 2021
1eaae97
added subscribers and reporting first version
jarped Sep 15, 2021
e158ad8
remove unused variable
jarped Sep 15, 2021
96d276e
add dataset
jarped Sep 15, 2021
193e320
refactored status
jarped Sep 15, 2021
a2c4fdb
rough implementation of writing
jarped Sep 15, 2021
0592140
reuse changelogs if exists
jarped Sep 15, 2021
e622320
set client credentials
jarped Sep 20, 2021
7939c85
use proper datatypes
jarped Sep 21, 2021
f7e43e9
set headers
jarped Oct 4, 2021
81ecff8
working version
jarped Oct 4, 2021
dbc7f41
try to read status
jarped Oct 4, 2021
52c2ac5
set status tr-number to -1 if null
jarped Oct 4, 2021
aa7e3f8
wait for result
jarped Oct 25, 2021
ac01718
flesh out DatasetStatus
jarped Oct 25, 2021
47b9be6
test correct result
jarped Nov 4, 2021
aa4fbf4
write strings as status
jarped Nov 4, 2021
0cf2930
expand reported status
jarped Nov 4, 2021
d13d165
WriteChanges:
larseggan Nov 16, 2021
c5121f1
added loop and reporting
jarped May 30, 2022
6c0168b
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
jarped May 30, 2022
e86c73f
set headers
jarped May 31, 2022
e85abb0
use datasetId in errorMessage
jarped May 31, 2022
41ab90f
write message if exists
jarped May 31, 2022
c30511c
dont write message for now
jarped May 31, 2022
ad6c184
dont increase tries on write ok
jarped May 31, 2022
cfa90d1
set copy transaction from changelog
jarped May 31, 2022
327f2de
only write transaction_number on status.write_changes
jarped May 31, 2022
6fef11d
use correct index
jarped May 31, 2022
16cd2b2
subtract 1 from endIndex
jarped May 31, 2022
3500ba2
try simplify for off-by-one
jarped May 31, 2022
ffce7f5
refactoring
jarped May 31, 2022
5eea005
Fix
larseggan May 31, 2022
0bd023b
WriteChanges: better logging
larseggan May 31, 2022
e468027
WriteChanges: better logging with progress
larseggan May 31, 2022
bf61fac
update endindex
jarped Jun 1, 2022
3511665
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
jarped Jun 1, 2022
15a66c8
logging in pusher
larseggan Jun 1, 2022
4ff6d85
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
larseggan Jun 1, 2022
61279d8
use entities directly
jarped Jun 1, 2022
0c9868c
savechanges
jarped Jun 1, 2022
dd4c0dd
always get new StoredChangelogsEntities
jarped Jun 1, 2022
2a36efa
add to correct table
jarped Jun 1, 2022
22c76b0
always new db
jarped Jun 1, 2022
9f870ec
explicitly set changelogid
jarped Jun 1, 2022
55ba554
addObject
jarped Jun 1, 2022
3a5ced9
revert
jarped Jun 1, 2022
3c94d1b
always new StoredChangelogsEntities
jarped Jun 1, 2022
9067fe2
use void
jarped Jun 1, 2022
a55d16a
remove extra news
jarped Jun 1, 2022
7ff758c
new StoredChangelogsEntities
jarped Jun 1, 2022
78be77e
Fix
larseggan Jun 1, 2022
49f7635
For logging replaced nlog with Serilog.
larseggan Jun 7, 2022
e68f8c5
- The UI-part of the provider has got a new Blazor Web-UI supporting …
larseggan Jun 24, 2022
415ee18
Geosynkronisering Provider 2.1 Beta.
larseggan Jun 24, 2022
b787441
#149 Fix immediate redraw of _listPushLog table
larseggan Jul 14, 2022
26abf52
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
larseggan Jul 14, 2022
b946890
Version 2.1.3
larseggan Sep 26, 2022
03a4400
Update README.md
larseggan Sep 26, 2022
16547cc
Added more logging in pusher.cs
larseggan Oct 19, 2022
7eecb29
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
larseggan Oct 19, 2022
b0fd248
#157 fix for Provider_NetCore failes for self-contained executable
larseggan Oct 19, 2022
16603d5
issue #158: Fixed:
larseggan Oct 20, 2022
a9c2744
added datasets-method
jarped Nov 29, 2022
6750bee
fix name
jarped Nov 29, 2022
e6f5abc
added ngid dataset class
jarped Nov 29, 2022
00ef562
make method public
jarped Nov 29, 2022
f8119cd
send in currentSubscriber
jarped Nov 29, 2022
02a1cc5
get subsciber by id
jarped Nov 29, 2022
7c8a741
add subscriber to currentsubscriber
jarped Nov 29, 2022
df81dcf
use correct mime
jarped Nov 29, 2022
8ffc632
use string for id
jarped Nov 29, 2022
b0656db
#154: WEB Push-klient må kunne Hent liste over tilgjengelige dataset
larseggan Dec 2, 2022
b3d9478
Update README.md
larseggan Dec 2, 2022
d9cef82
#162 : Web-pusher Logs folder should be below application and not in …
larseggan Dec 2, 2022
7484309
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
larseggan Dec 2, 2022
143feb9
Update README.md
larseggan Dec 2, 2022
e0479f0
#153 Dokumentasjon for WEB Push client
larseggan Dec 16, 2022
1db0390
Merge branch 'Geosynk20_pusher' of https://github.com/kartverket/geos…
larseggan Dec 16, 2022
14cf54d
#153: Dokumentasjon for push install
larseggan Dec 20, 2022
8ded24d
Update README.md
larseggan Dec 20, 2022
239c39c
Update README.md
larseggan Dec 20, 2022
63c308c
#148: Oppdatert Tilbyder-komponenter til .NET 6 / oppdaterte nuget-pa…
larseggan Dec 20, 2022
8a42b69
Update README.md
larseggan Dec 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,4 @@ __pycache__/
/Kartverket.Geosynkronisering.Subscriber/Kartverket.Geosynkronisering.Subscriber.DL/Properties/PublishProfiles/FolderProfile.pubxml
/Kartverket.Geosynkronisering.Subscriber/Test_Subscriber_NetCore/Properties/PublishProfiles
/Kartverket.Geosynkronisering.Server/Kartverket.Geosynkronisering/ChangelogProviders/SqlServerSpatialChangelog - Copy.cs
/Kartverket.Geosynkronisering.Server/Provider_NetCore/geosync.sqlite-journal
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.10",
"commands": [
"dotnet-ef"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.1.5</Version>
</PropertyGroup>

<!--<ItemGroup>
<Content Remove="wwwroot\favicon.ico" />
</ItemGroup>-->

<ItemGroup>
<None Remove="Old_favicon.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.30.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.5" />
<PackageReference Include="MudBlazor" Version="6.0.10" />
<PackageReference Include="MudBlazor.ThemeManager" Version="1.0.6" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ChangelogManager\ChangelogManager.csproj" />
<ProjectReference Include="..\Pusher\Pusher.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="geosync.sqlite">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Always</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</None>
<None Include="wwwroot\favicon.ico" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<MudDialog>
<DialogContent>
<MudText>@ContentText</MudText>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">@CancelText</MudButton>
<MudButton Color="@Color" Variant="Variant.Filled" OnClick="Submit">@ButtonText</MudButton>
</DialogActions>
</MudDialog>

@code {
[CascadingParameter] MudDialogInstance MudDialog { get; set; }

[Parameter] public string ContentText { get; set; }

[Parameter] public string ButtonText { get; set; }

[Parameter] public string CancelText { get; set; }

[Parameter] public Color Color { get; set; }

void Submit() => MudDialog.Close(DialogResult.Ok(true));
void Cancel() => MudDialog.Cancel();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Blazor.Kartverket.Geosynkronisering.Provider.Data
{
public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string? Summary { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Blazor.Kartverket.Geosynkronisering.Provider.Data
{
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};

public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
}).ToArray());
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@page "/about"
@using Markdig
@inject HttpClient Http
@inject IHttpClientFactory ClientFactory



<h3>Geosynkronisering Administrator med Push</h3>
<h3> v @(typeof(About).Assembly.GetName().Version.ToString(3))</h3>

@*Override mudblazor default due to problem with markdown*@
<style>
ul {
margin: 20px;
padding: 0;
list-style: disc;
}
</style>



<style>
* {
box-sizing: border-box;
margin: unset;
padding: 0;
border-width: 0;
border-style: solid;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>

<style>
body {
color: var(--mud-palette-text-primary);
font-family: var(--mud-typography-default-family);
/*font-size: var(--mud-typography-subtitle2-size) !important;*/
font-size: unset !important;
/* font-size: var(--mud-typography-default-size);*/
font-weight: var(--mud-typography-default-weight);
line-height: var(--mud-typography-default-lineheight);
letter-spacing: var(--mud-typography-default-letterspacing);
text-transform: var(--mud-typography-default-text-transform);
background-color: var(--mud-palette-background);
}
</style>



<div style="list-style: disc; margin:30px; list-style-type: disc;">

@if (Preview != null && Preview.Length > 0)
{
@((MarkupString)Preview)
}


</div>


@code {

public string? Preview; // => Markdown.ToHtml(Body);

protected override async Task OnInitializedAsync()
{
await RenderMarkdown();
}

//protected override async Task OnParametersSetAsync()
//{
// await RenderMarkdown();

//}

private async Task RenderMarkdown()
{
var rootpath = Path.Combine(System.IO.Directory.GetCurrentDirectory(), "wwwroot");
var filePath = Path.Combine(rootpath, "revisionlog" + Path.DirectorySeparatorChar + "revisionlog" + ".md");
var markdown = await File.ReadAllTextAsync(filePath);

// Markdig converts to HTML
// See: https://jonhilton.net/blazor-markdown-editor/
Preview = Markdown.ToHtml(markdown);

return;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@page "/counter"

<PageTitle>Counter</PageTitle>

<h1>Counter</h1>

<p role="status">Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
private int currentCount = 0;

private void IncrementCount()
{
currentCount++;
}
}
Loading