-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO - Make server admin page tabbed - Unit tests
- Loading branch information
Showing
13 changed files
with
217 additions
and
43 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
COMETwebapp/Components/ReferenceData/ReferenceDataBody.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,42 @@ | ||
<!------------------------------------------------------------------------------ | ||
// Copyright (c) 2023-2024 Starion Group S.A. | ||
// | ||
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Antoine Théate, João Rua | ||
// | ||
// This file is part of CDP4-COMET WEB Community Edition | ||
// The CDP4-COMET WEB Community Edition is the Starion Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. | ||
// | ||
// The CDP4-COMET WEB Community Edition is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU Affero General Public | ||
// License as published by the Free Software Foundation; either | ||
// version 3 of the License, or (at your option) any later version. | ||
// | ||
// The CDP4-COMET WEB Community Edition is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see http://www.gnu.org/licenses/. | ||
-------------------------------------------------------------------------------> | ||
@inherits ApplicationBase<COMETwebapp.ViewModels.Components.ReferenceData.IReferenceDataBodyViewModel> | ||
|
||
<LoadingComponent IsVisible="@(this.ViewModel.IsLoading)"> | ||
<DxToolbar ItemClick="@(this.OnItemClick)"> | ||
<Items> | ||
@foreach (var mappedValue in this.mapOfComponentsAndNames) | ||
{ | ||
<DxToolbarItem @key="@(mappedValue.Value)" | ||
Name="@(mappedValue.Value)" | ||
Text="@(mappedValue.Value)" | ||
Tooltip="@(mappedValue.Value)" | ||
RenderStyle="@(mappedValue.Key == this.SelectedComponent ? ButtonRenderStyle.Primary : ButtonRenderStyle.Secondary)"/> | ||
} | ||
</Items> | ||
</DxToolbar> | ||
|
||
@if (this.SelectedComponent != null) | ||
{ | ||
<DynamicComponent Type="@(this.SelectedComponent)"/> | ||
} | ||
</LoadingComponent> |
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
35 changes: 35 additions & 0 deletions
35
COMETwebapp/ViewModels/Components/ReferenceData/IReferenceDataBodyViewModel.cs
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,35 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="IReferenceDataBodyViewModel.cs" company="Starion Group S.A."> | ||
// Copyright (c) 2024 Starion Group S.A. | ||
// | ||
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Théate Antoine, João Rua | ||
// | ||
// This file is part of COMET WEB Community Edition | ||
// The COMET WEB Community Edition is the Starion Group Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. | ||
// | ||
// The COMET WEB Community Edition is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU Affero General Public | ||
// License as published by the Free Software Foundation; either | ||
// version 3 of the License, or (at your option) any later version. | ||
// | ||
// The COMET WEB Community Edition is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
// </copyright> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace COMETwebapp.ViewModels.Components.ReferenceData | ||
{ | ||
using COMET.Web.Common.ViewModels.Components.Applications; | ||
|
||
/// <summary> | ||
/// View Model that handle the logic for the Reference data body application | ||
/// </summary> | ||
public interface IReferenceDataBodyViewModel : IApplicationBaseViewModel | ||
{ | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
COMETwebapp/ViewModels/Components/ReferenceData/ReferenceDataBodyViewModel.cs
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,55 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="ReferenceDataBodyViewModel.cs" company="Starion Group S.A."> | ||
// Copyright (c) 2024 Starion Group S.A. | ||
// | ||
// Authors: Sam Gerené, Alex Vorobiev, Alexander van Delft, Jaime Bernar, Théate Antoine, João Rua | ||
// | ||
// This file is part of COMET WEB Community Edition | ||
// The COMET WEB Community Edition is the Starion Group Web Application implementation of ECSS-E-TM-10-25 Annex A and Annex C. | ||
// | ||
// The COMET WEB Community Edition is free software; you can redistribute it and/or | ||
// modify it under the terms of the GNU Affero General Public | ||
// License as published by the Free Software Foundation; either | ||
// version 3 of the License, or (at your option) any later version. | ||
// | ||
// The COMET WEB Community Edition is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
// </copyright> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace COMETwebapp.ViewModels.Components.ReferenceData | ||
{ | ||
using CDP4Dal; | ||
|
||
using COMET.Web.Common.Services.SessionManagement; | ||
using COMET.Web.Common.ViewModels.Components.Applications; | ||
|
||
/// <summary> | ||
/// View Model that handle the logic for the Reference data body application | ||
/// </summary> | ||
public class ReferenceDataBodyViewModel : ApplicationBaseViewModel, IReferenceDataBodyViewModel | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ReferenceDataBodyViewModel" /> class. | ||
/// </summary> | ||
/// <param name="sessionService">The <see cref="ISessionService" /></param> | ||
/// <param name="messageBus">The <see cref="ICDPMessageBus" /></param> | ||
public ReferenceDataBodyViewModel(ISessionService sessionService, ICDPMessageBus messageBus) : base(sessionService, messageBus) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Handles the refresh of the current <see cref="ISession" /> | ||
/// </summary> | ||
/// <returns>A <see cref="Task" /></returns> | ||
protected override Task OnSessionRefreshed() | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
Oops, something went wrong.