Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
<data name="ExamplePortScanRange" xml:space="preserve">
<value>22; 80; 443; 500 - 999; 8080</value>
</data>
<data name="ExampleRemoteDesktopProfileName" xml:space="preserve">
<data name="ExampleProfileName" xml:space="preserve">
<value>Webserver</value>
</data>
<data name="ExampleSerialLine" xml:space="preserve">
Expand Down
18 changes: 18 additions & 0 deletions Source/NETworkManager.Localization/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Source/NETworkManager.Localization/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3851,4 +3851,10 @@ Right-click for more options.</value>
<data name="SetDefault" xml:space="preserve">
<value>Set default</value>
</data>
<data name="ExampleProfileDescription" xml:space="preserve">
<value>Ubuntu Server running Docker with Nextcloud and Traefik...</value>
</data>
<data name="ExampleGroupDescription" xml:space="preserve">
<value>Linux servers running in AWS...</value>
</data>
</root>
11 changes: 10 additions & 1 deletion Source/NETworkManager.Profiles/GroupInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class GroupInfo
/// </summary>
public GroupInfo()
{
Profiles = new List<ProfileInfo>();
Profiles = [];
}

/// <summary>
Expand All @@ -35,6 +35,10 @@ public GroupInfo(string name) : this()
/// </summary>
public GroupInfo(GroupInfo group) : this(group.Name)
{
// General
Description = group.Description;

// Profiles
Profiles = group.Profiles;

// Remote Desktop
Expand Down Expand Up @@ -164,6 +168,11 @@ public GroupInfo(GroupInfo group) : this(group.Name)
/// Name of the group.
/// </summary>
public string Name { get; set; }

/// <summary>
/// Description of the group.
/// </summary>
public string Description { get; set; }

[XmlIgnore] public bool IsDynamic { get; set; }

Expand Down
8 changes: 7 additions & 1 deletion Source/NETworkManager.Profiles/ProfileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public ProfileInfo(ProfileInfo profile)
{
Name = profile.Name;
Host = profile.Host;
Description = profile.Description;
Group = profile.Group;
Tags = profile.Tags;

Expand Down Expand Up @@ -248,11 +249,16 @@ public ProfileInfo(ProfileInfo profile)
/// </summary>
public string Host { get; set; }

/// <summary>
/// Description of the profile.
/// </summary>
public string Description { get; set; }

/// <summary>
/// Name of the group. Profiles are grouped based on the name.
/// </summary>
public string Group { get; set; }

/// <summary>
/// Tags to classify the profiles and to filter by it.
/// </summary>
Expand Down
16 changes: 9 additions & 7 deletions Source/NETworkManager/ProfileDialogManager.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Security;
using System.Threading.Tasks;
using System.Windows;
using MahApps.Metro.Controls.Dialogs;
using MahApps.Metro.Controls.Dialogs;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
using NETworkManager.Models.Network;
Expand All @@ -12,6 +7,11 @@
using NETworkManager.Profiles;
using NETworkManager.ViewModels;
using NETworkManager.Views;
using System;
using System.Collections.Generic;
using System.Security;
using System.Threading.Tasks;
using System.Windows;

namespace NETworkManager;

Expand All @@ -31,6 +31,7 @@ private static ProfileInfo ParseProfileInfo(ProfileViewModel instance)
{
Name = instance.Name.Trim(),
Host = instance.Host.Trim(),
Description = instance.Description?.Trim(),
Group = instance.Group.Trim(),
Tags = instance.Tags?.Trim(),

Expand Down Expand Up @@ -304,7 +305,8 @@ private static GroupInfo ParseGroupInfo(GroupViewModel instance)
return new GroupInfo
{
Name = name,

Description = instance.Description?.Trim(),

Profiles = profiles,

// Remote Desktop
Expand Down
Loading