diff --git a/.gitmodules b/.gitmodules
index b360791..4ba83d0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -9,7 +9,7 @@
[submodule "FabAccessAPI/schema"]
path = FabAccessAPI/schema
url = https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
- branch = main
+ branch = v0.3
[submodule "external/capnproto-dotnetcore"]
path = external/capnproto-dotnetcore
url = https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
diff --git a/Borepin/Borepin/Model/MachineVisualize.cs b/Borepin/Borepin/Model/MachineVisualize.cs
index 17ccb06..0b4442c 100644
--- a/Borepin/Borepin/Model/MachineVisualize.cs
+++ b/Borepin/Borepin/Model/MachineVisualize.cs
@@ -27,46 +27,52 @@ namespace Borepin.Model
Name = _Machine.Name;
Description = _Machine.Description;
State = _Machine.State;
- Manager = new UserVisualize(_Machine.Manager);
- Manager.LoadData();
- CanUse = !((UseInterface_Proxy)_Machine.Use).IsNull;
- CanInUse = !((InUseInterface_Proxy) _Machine.Inuse).IsNull;
- CanTakeOver = !((TakeoverInterface_Proxy) _Machine.Takeover).IsNull;
- CanCheck = !((CheckInterface_Proxy) _Machine.Check).IsNull;
- CanManage = !((ManageInterface_Proxy) _Machine.Manage).IsNull;
- CanAdmin = !((AdminInterface_Proxy) _Machine.Admin).IsNull;
+ if(_Machine.Manager.Just != null)
+ {
+ Manager = new UserVisualize(_Machine.Manager.Just);
+ Manager.LoadData();
+ }
+ else
+ {
+ Manager = null;
+ }
- CurrentUser = null;
- LastUser = null;
-
- if (CanManage)
+ if(!((ManageInterface_Proxy)_Machine.Manage).IsNull)
{
MachineInfoExtended machineInfoExtended = await _Machine.Manage.GetMachineInfoExtended().ConfigureAwait(false);
- if (machineInfoExtended != null)
+ if (machineInfoExtended.CurrentUser.Just == null)
{
+ CurrentUser = null;
+ }
+ else
+ {
+ CurrentUser = new UserVisualize(machineInfoExtended.CurrentUser.Just);
+ CurrentUser.LoadData();
+ }
- if (machineInfoExtended.CurrentUser == null || machineInfoExtended.CurrentUser.Username == null)
- {
- CurrentUser = null;
- }
- else
- {
- CurrentUser = new UserVisualize(machineInfoExtended.CurrentUser);
- CurrentUser.LoadData();
- }
-
- if (machineInfoExtended.LastUser == null || machineInfoExtended.LastUser.Username == null)
- {
- LastUser = null;
- }
- else
- {
- LastUser = new UserVisualize(machineInfoExtended.LastUser);
- LastUser.LoadData();
- }
+ if (machineInfoExtended.LastUser .Just== null)
+ {
+ LastUser = null;
+ }
+ else
+ {
+ LastUser = new UserVisualize(machineInfoExtended.LastUser.Just);
+ LastUser.LoadData();
}
}
+ else
+ {
+ CurrentUser = null;
+ LastUser = null;
+ }
+
+ CanUse = !((UseInterface_Proxy)_Machine.Use).IsNull;
+ CanInUse = !((InUseInterface_Proxy)_Machine.Inuse).IsNull;
+ CanTakeOver = !((TakeoverInterface_Proxy)_Machine.Takeover).IsNull;
+ CanCheck = !((CheckInterface_Proxy)_Machine.Check).IsNull;
+ CanManage = !((ManageInterface_Proxy)_Machine.Manage).IsNull;
+ CanAdmin = !((AdminInterface_Proxy)_Machine.Admin).IsNull;
}
#endregion
diff --git a/Borepin/Borepin/Page/ScanPage.xaml b/Borepin/Borepin/Page/ScanPage.xaml
index a42564e..0bce7f6 100644
--- a/Borepin/Borepin/Page/ScanPage.xaml
+++ b/Borepin/Borepin/Page/ScanPage.xaml
@@ -5,7 +5,7 @@
x:Class="Borepin.Page.ScanPage">
-
+
diff --git a/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs b/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs
index 56c367f..656c023 100644
--- a/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs
+++ b/Borepin/Borepin/PageModel/AddServerProcess/AuthPlainPageModel.cs
@@ -5,6 +5,7 @@ using Borepin.Base;
using Borepin.Model;
using Borepin.Service.BFFH;
using Borepin.Service.BFFH.Exceptions;
+using FabAccessAPI.Exceptions;
using Prism.Commands;
using Prism.Navigation;
using Prism.Services;
@@ -85,13 +86,20 @@ namespace Borepin.PageModel.AddServerProcess
IsBusy = false;
return;
}
- catch (AuthenticatingFailedException)
+ catch (AuthenticationFailedException)
{
await _PageDialogService.DisplayAlertAsync("Connection failed", "Unable to authenticate to server.", "Ok").ConfigureAwait(false);
IsBusy = false;
return;
}
+ catch(Exception)
+ {
+ await _PageDialogService.DisplayAlertAsync("Connection failed", "Unexpected Error.", "Ok").ConfigureAwait(false);
+
+ IsBusy = false;
+ return;
+ }
await _NavigationService.NavigateAsync("/MainPage/NavigationPage/MachineListPage").ConfigureAwait(false);
}
diff --git a/Borepin/Borepin/PageModel/MachineListPageModel.cs b/Borepin/Borepin/PageModel/MachineListPageModel.cs
index 79bdd5a..ddf20a6 100644
--- a/Borepin/Borepin/PageModel/MachineListPageModel.cs
+++ b/Borepin/Borepin/PageModel/MachineListPageModel.cs
@@ -7,7 +7,6 @@ using Prism.Navigation;
using Borepin.Service.BFFH;
using Borepin.Base;
using FabAccessAPI.Schema;
-using Prism.Services.Dialogs;
using Prism.Services;
using static FabAccessAPI.Schema.Machine;
using System;
@@ -19,16 +18,12 @@ namespace Borepin.PageModel
public class MachineListPageModel : ConnectionModelBase
{
#region Private Fields
- private readonly IDialogService _DialogService;
-
private Machine _NextMachine;
#endregion
#region Constructors
- public MachineListPageModel(INavigationService navigationService, IPageDialogService pageDialogService, IBFFHService bFFHService, IDialogService dialogService) : base(navigationService, pageDialogService, bFFHService)
+ public MachineListPageModel(INavigationService navigationService, IPageDialogService pageDialogService, IBFFHService bFFHService) : base(navigationService, pageDialogService, bFFHService)
{
- _DialogService = dialogService;
-
SelectInstanceCommand = new DelegateCommand