-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Development' into 'main'
Blazor: Added basic components for Hio Cloud See merge request tools/hio-dotnet!7
- Loading branch information
Showing
38 changed files
with
1,306 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
hio-dotnet.Demos.HardwarioMonitor/Components/Pages/HioCloud.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
@using Services | ||
@using hio_dotnet.UI.BlazorComponents.Radzen.CHESTER.HioCloud.Models | ||
@using hio_dotnet.UI.BlazorComponents.Radzen.CHESTER.HioCloud | ||
|
||
@page "/hiocloud" | ||
|
||
@inject ConsoleService ConsoleService | ||
|
||
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center"> | ||
<!-- Loading overlay --> | ||
@if (isBusy) | ||
{ | ||
<RadzenCard Style="z-index: 3; text-align: center; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, .5)"> | ||
<div style="display: flex; justify-content: center; align-items: center; height: 100%; width: 100%;"> | ||
<RadzenProgressBarCircular ShowValue="true" Mode="ProgressBarMode.Indeterminate" Size="ProgressBarCircularSize.Medium"> | ||
<Template>Wait</Template> | ||
</RadzenProgressBarCircular> | ||
</div> | ||
</RadzenCard> | ||
} | ||
</RadzenStack> | ||
|
||
<RadzenLayout Style="height: 100%; grid-template-rows: 1fr; grid-template-columns: 1fr auto; grid-template-areas: 'rz-body rz-sidebar'"> | ||
<RadzenSidebar Style="padding: 5px;"> | ||
<HioCloudLoginButton OnLoggedIn="@OnLoggedInHandler" OnLoggingIn="OnLoggingInHandler" Style="margin-top: 5px; width: 100%;" /> | ||
</RadzenSidebar> | ||
<RadzenBody> | ||
<RadzenRow Style="height: 100%;"> | ||
<RadzenColumn Style="height: 100%;"> | ||
|
||
<RadzenRow> | ||
<RadzenColumn Size="3"> | ||
<HioCloudTreeView @ref=hioCloudTreeViewRef OnOpenMessageRequest="@OnOpenMessageHandler" | ||
OnOpenDeviceRequest="@OnOpenDeviceHandler" | ||
OnOpenSpaceRequest="@OnOpenSpaceHandler"/> | ||
</RadzenColumn> | ||
<RadzenColumn Size="9"> | ||
<HioCloudTabs @ref=hioCloudTabsRef /> | ||
</RadzenColumn> | ||
</RadzenRow> | ||
|
||
</RadzenColumn> | ||
</RadzenRow> | ||
</RadzenBody> | ||
</RadzenLayout> | ||
|
||
|
||
@code { | ||
private bool isBusy = false; | ||
HioCloudTreeView? hioCloudTreeViewRef; | ||
HioCloudTabs? hioCloudTabsRef; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
base.OnInitialized(); | ||
} | ||
|
||
public async Task Refresh() | ||
{ | ||
await InvokeAsync(StateHasChanged); | ||
} | ||
|
||
public async Task OnLoggingInHandler(bool busy) | ||
{ | ||
isBusy = busy; | ||
} | ||
|
||
public async Task OnLoggedInHandler(bool isLoggedIn) | ||
{ | ||
isBusy = false; | ||
if (hioCloudTreeViewRef != null) | ||
{ | ||
await hioCloudTreeViewRef.GetSpaces(); | ||
} | ||
} | ||
|
||
public async Task OnOpenMessageHandler(Message msg) | ||
{ | ||
if (hioCloudTabsRef != null) | ||
{ | ||
await hioCloudTabsRef.AddTab(new OpenedTab() | ||
{ | ||
Data = msg, | ||
Type = OpenedTabType.Message, | ||
Id = msg.Id, | ||
Title = msg.Text | ||
}); | ||
} | ||
} | ||
|
||
public async Task OnOpenDeviceHandler(Device device) | ||
{ | ||
if (hioCloudTabsRef != null) | ||
{ | ||
await hioCloudTabsRef.AddTab(new OpenedTab() | ||
{ | ||
Data = device, | ||
Type = OpenedTabType.Device, | ||
Id = device.Id, | ||
Title = device.Name | ||
}); | ||
} | ||
} | ||
|
||
public async Task OnOpenSpaceHandler(Space space) | ||
{ | ||
if (hioCloudTabsRef != null) | ||
{ | ||
await hioCloudTabsRef.AddTab(new OpenedTab() | ||
{ | ||
Data = space, | ||
Type = OpenedTabType.Space, | ||
Id = space.Id, | ||
Title = space.Name | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.