Skip to content

Commit db2288d

Browse files
authored
Fix: Region/Profile & some docs (BornToBeRoot#2299)
* Fix: Region/Profile & some docs * Docs: BornToBeRoot#2299
1 parent ea96c8e commit db2288d

10 files changed

Lines changed: 106 additions & 60 deletions

File tree

Source/NETworkManager.Localization/Resources/Strings.Designer.cs

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/NETworkManager.Localization/Resources/Strings.resx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,13 +3069,13 @@ The profile is not removed from the ~\.aws\credentials file.</value>
30693069
<data name="DefaultRegion" xml:space="preserve">
30703070
<value>Default region</value>
30713071
</data>
3072-
<data name="HelpMessage_AWSSessionManagerDefaultProfile" xml:space="preserve">
3073-
<value>Default profile which is used by manually created profiles to connect to an EC2 instance via AWS CLI.
3072+
<data name="HelpMessage_AWSSessionManagerProfile" xml:space="preserve">
3073+
<value>Profile which is used by manually created profiles to connect to an EC2 instance via AWS CLI.
30743074

30753075
If not set, the default AWS CLI settings are used.</value>
30763076
</data>
3077-
<data name="HelpMessage_AWSSessionManagerDefaultRegion" xml:space="preserve">
3078-
<value>Default region which is used by manually created profiles to connect to an EC2 instance via AWS CLI .
3077+
<data name="HelpMessage_AWSSessionManagerRegion" xml:space="preserve">
3078+
<value>Region which is used by manually created profiles to connect to an EC2 instance via AWS CLI .
30793079

30803080
If not set, the default AWS CLI settings are used.</value>
30813081
</data>

Source/NETworkManager.Profiles/Application/AWSSessionManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public static AWSSessionManagerSessionInfo CreateSessionInfo(ProfileInfo profile
1313
return new AWSSessionManagerSessionInfo
1414
{
1515
InstanceID = profile.AWSSessionManager_InstanceID,
16-
Profile = profile.AWSSessionManager_OverrideProfile ? profile.AWSSessionManager_Profile : (group.AWSSessionManager_OverrideProfile ? group.AWSSessionManager_Profile : SettingsManager.Current.AWSSessionManager_DefaultProfile),
17-
Region = profile.AWSSessionManager_OverrideRegion ? profile.AWSSessionManager_Region : (group.AWSSessionManager_OverrideRegion ? group.AWSSessionManager_Region : SettingsManager.Current.AWSSessionManager_DefaultRegion)
16+
Profile = profile.AWSSessionManager_OverrideProfile ? profile.AWSSessionManager_Profile : (group.AWSSessionManager_OverrideProfile ? group.AWSSessionManager_Profile : SettingsManager.Current.AWSSessionManager_Profile),
17+
Region = profile.AWSSessionManager_OverrideRegion ? profile.AWSSessionManager_Region : (group.AWSSessionManager_OverrideRegion ? group.AWSSessionManager_Region : SettingsManager.Current.AWSSessionManager_Region)
1818
};
1919
}
2020
}

Source/NETworkManager.Settings/SettingsInfo.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2901,31 +2901,31 @@ public bool AWSSessionManager_SyncOnlyRunningInstancesFromAWS
29012901
}
29022902
}
29032903

2904-
private string _awsSessionManager_DefaultProfile;
2905-
public string AWSSessionManager_DefaultProfile
2904+
private string _awsSessionManager_Profile;
2905+
public string AWSSessionManager_Profile
29062906
{
2907-
get => _awsSessionManager_DefaultProfile;
2907+
get => _awsSessionManager_Profile;
29082908
set
29092909
{
2910-
if (value == _awsSessionManager_DefaultProfile)
2910+
if (value == _awsSessionManager_Profile)
29112911
return;
29122912

2913-
_awsSessionManager_DefaultProfile = value;
2913+
_awsSessionManager_Profile = value;
29142914
OnPropertyChanged();
29152915
SettingsChanged = true;
29162916
}
29172917
}
29182918

2919-
private string _awsSessionManager_DefaultRegion;
2920-
public string AWSSessionManager_DefaultRegion
2919+
private string _awsSessionManager_Region;
2920+
public string AWSSessionManager_Region
29212921
{
2922-
get => _awsSessionManager_DefaultRegion;
2922+
get => _awsSessionManager_Region;
29232923
set
29242924
{
2925-
if (value == _awsSessionManager_DefaultRegion)
2925+
if (value == _awsSessionManager_Region)
29262926
return;
29272927

2928-
_awsSessionManager_DefaultRegion = value;
2928+
_awsSessionManager_Region = value;
29292929
OnPropertyChanged();
29302930
SettingsChanged = true;
29312931
}

Source/NETworkManager/ViewModels/AWSSessionManagerConnectViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public AWSSessionManagerConnectViewModel(Action<AWSSessionManagerConnectViewMode
7474

7575
private void LoadSettings()
7676
{
77-
Profile = SettingsManager.Current.AWSSessionManager_DefaultProfile;
78-
Region = SettingsManager.Current.AWSSessionManager_DefaultRegion;
77+
Profile = SettingsManager.Current.AWSSessionManager_Profile;
78+
Region = SettingsManager.Current.AWSSessionManager_Region;
7979
}
8080
}

Source/NETworkManager/ViewModels/AWSSessionManagerSettingsViewModel.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,36 +70,36 @@ public bool SyncOnlyRunningInstancesFromAWS
7070
}
7171
}
7272

73-
private string _defaultProfile;
74-
public string DefaultProfile
73+
private string _profile;
74+
public string Profile
7575
{
76-
get => _defaultProfile;
76+
get => _profile;
7777
set
7878
{
79-
if (value == _defaultProfile)
79+
if (value == _profile)
8080
return;
8181

8282
if (!_isLoading)
83-
SettingsManager.Current.AWSSessionManager_DefaultProfile = value;
83+
SettingsManager.Current.AWSSessionManager_Profile = value;
8484

85-
_defaultProfile = value;
85+
_profile = value;
8686
OnPropertyChanged();
8787
}
8888
}
8989

90-
private string _defaultRegion;
91-
public string DefaultRegion
90+
private string _region;
91+
public string Region
9292
{
93-
get => _defaultRegion;
93+
get => _region;
9494
set
9595
{
96-
if (value == _defaultRegion)
96+
if (value == _region)
9797
return;
9898

9999
if (!_isLoading)
100-
SettingsManager.Current.AWSSessionManager_DefaultRegion = value;
100+
SettingsManager.Current.AWSSessionManager_Region = value;
101101

102-
_defaultRegion = value;
102+
_region = value;
103103
OnPropertyChanged();
104104
}
105105
}
@@ -158,8 +158,8 @@ private void LoadSettings()
158158
{
159159
EnableSyncInstanceIDsFromAWS = SettingsManager.Current.AWSSessionManager_EnableSyncInstanceIDsFromAWS;
160160
SyncOnlyRunningInstancesFromAWS = SettingsManager.Current.AWSSessionManager_SyncOnlyRunningInstancesFromAWS;
161-
DefaultProfile = SettingsManager.Current.AWSSessionManager_DefaultProfile;
162-
DefaultRegion = SettingsManager.Current.AWSSessionManager_DefaultRegion;
161+
Profile = SettingsManager.Current.AWSSessionManager_Profile;
162+
Region = SettingsManager.Current.AWSSessionManager_Region;
163163
ApplicationFilePath = SettingsManager.Current.AWSSessionManager_ApplicationFilePath;
164164
IsConfigured = File.Exists(ApplicationFilePath);
165165
}

Source/NETworkManager/Views/AWSSessionManagerSettingsView.xaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,25 +148,25 @@
148148
</StackPanel>
149149
<mah:ToggleSwitch Header="{x:Static localization:Strings.SyncOnlyRunningEC2InstancesFromAWS}" IsOn="{Binding SyncOnlyRunningInstancesFromAWS}" Margin="0,0,0,10" />
150150
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
151-
<TextBlock Text="{x:Static localization:Strings.DefaultProfile}" Style="{DynamicResource DefaultTextBlock}" />
152-
<Rectangle Width="24" Height="24" ToolTip="{x:Static localization:Strings.HelpMessage_AWSSessionManagerDefaultProfile}" Style="{StaticResource HelpImageRectangle}" Margin="10,0,0,0">
151+
<TextBlock Text="{x:Static localization:Strings.Profile}" Style="{DynamicResource DefaultTextBlock}" />
152+
<Rectangle Width="24" Height="24" ToolTip="{x:Static localization:Strings.HelpMessage_AWSSessionManagerProfile}" Style="{StaticResource HelpImageRectangle}" Margin="10,0,0,0">
153153
<Rectangle.Resources>
154154
<Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource HelpToolTip}" />
155155
</Rectangle.Resources>
156156
</Rectangle>
157157
</StackPanel>
158158
<TextBox Width="250" HorizontalAlignment="Left" Margin="0,0,0,10" mah:TextBoxHelper.Watermark="{x:Static localization:StaticStrings.ExampleAWSProfile}" Style="{StaticResource DefaultTextBox}" >
159159
<TextBox.Text>
160-
<Binding Path="DefaultProfile" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
160+
<Binding Path="Profile" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
161161
<Binding.ValidationRules>
162162
<validators:NoSpacesValidator ValidatesOnTargetUpdated="True" />
163163
</Binding.ValidationRules>
164164
</Binding>
165165
</TextBox.Text>
166166
</TextBox>
167167
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
168-
<TextBlock Text="{x:Static localization:Strings.DefaultRegion}" Style="{DynamicResource DefaultTextBlock}" />
169-
<Rectangle Width="24" Height="24" ToolTip="{x:Static localization:Strings.HelpMessage_AWSSessionManagerDefaultRegion}" Style="{StaticResource HelpImageRectangle}" Margin="10,0,0,0">
168+
<TextBlock Text="{x:Static localization:Strings.Region}" Style="{DynamicResource DefaultTextBlock}" />
169+
<Rectangle Width="24" Height="24" ToolTip="{x:Static localization:Strings.HelpMessage_AWSSessionManagerRegion}" Style="{StaticResource HelpImageRectangle}" Margin="10,0,0,0">
170170
<Rectangle.Resources>
171171
<Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource HelpToolTip}" />
172172
</Rectangle.Resources>
@@ -175,7 +175,7 @@
175175
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
176176
<TextBox Width="250" HorizontalAlignment="Left" mah:TextBoxHelper.Watermark="{x:Static localization:StaticStrings.ExampleAWSRegion}" Style="{StaticResource DefaultTextBox}">
177177
<TextBox.Text>
178-
<Binding Path="DefaultRegion" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
178+
<Binding Path="Region" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
179179
<Binding.ValidationRules>
180180
<validators:EmptyOrAWSRegionExistsValidator ValidatesOnTargetUpdated="True" />
181181
</Binding.ValidationRules>

docs/Changelog/next-release.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ Release date: **xx.xx.2023**
1515
- Windows 10 / Server x64 (1809 or later)
1616
- [.NET Desktop Runtime 6.x (LTS)](https://dotnet.microsoft.com/download/dotnet/6.0){:target="\_blank"}
1717

18+
## Breaking changes
19+
20+
Breaking changes
21+
{: .label .label-red }
22+
23+
- AWS Session Manager
24+
- Setting `Default profile` changed to `Profile`. You need to set the profile again [#2299](https://github.com/BornToBeRoot/NETworkManager/pull/2299){:target="\_blank"}
25+
- Setting `Default region` changed to `Region`. You need to set the region again [#2299](https://github.com/BornToBeRoot/NETworkManager/pull/2299){:target="\_blank"}
26+
1827
## What's new?
1928

2029
## Improvements
@@ -39,6 +48,7 @@ Release date: **xx.xx.2023**
3948
- [AirSpace Fixer](https://www.nuget.org/packages/AirspaceFixer){:target="\_blank"} code optimized (only called if needed). This will also prevent a screenshot bug when the application is loading and a dialog is shown. [#2253](https://github.com/BornToBeRoot/NETworkManager/pull/2253){:target="\_blank"}
4049
- Profile / Group
4150
- Fix default value for Remote Desktop sreen size [#2293](https://github.com/BornToBeRoot/NETworkManager/pull/2293){:target="\_blank"}
51+
4252
## Deprecated
4353

4454
Deprecated
@@ -65,3 +75,5 @@ Deprecated
6575
- Application > Wake on LAN [#2242](https://github.com/BornToBeRoot/NETworkManager/pull/2242){:target="\_blank"}
6676
- Application > Whois [#2236](https://github.com/BornToBeRoot/NETworkManager/pull/2236){:target="\_blank"}
6777
- Application > Subnet Calculator [#2233](https://github.com/BornToBeRoot/NETworkManager/pull/2233){:target="\_blank"}
78+
- Update documentation for:
79+
- Application > AWS Session Manager [#2299](https://github.com/BornToBeRoot/NETworkManager/pull/2299){:target="\_blank"}

docs/Documentation/01_Application/12_AWSSessionManager.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ ID of the AWS EC2 instance.
270270

271271
**Type:** `String`
272272

273+
**Default:** `Empty`
274+
273275
**Example:** `i-0123456789abcdef0`
274276

275277
### Profile
@@ -278,6 +280,8 @@ AWS CLI profile which will be used to connect.
278280

279281
**Type:** `String`
280282

283+
**Default:** `Empty or from settings`
284+
281285
**Example:** `dev`
282286

283287
{: .note }
@@ -289,6 +293,8 @@ AWS region where the instance is located.
289293

290294
**Type:** `String`
291295

296+
**Default:** `Empty or from settings`
297+
292298
**Example:** `eu-central-1`
293299

294300
{: .note }
@@ -302,6 +308,8 @@ ID of the AWS EC2 instance.
302308

303309
**Type:** `String`
304310

311+
**Default:** `Empty`
312+
305313
**Example:** `i-0123456789abcdef0`
306314

307315
### Profile
@@ -310,21 +318,41 @@ AWS CLI profile which will be used to connect.
310318

311319
**Type:** `String`
312320

313-
**Example:** `dev`
321+
**Default:** `Empty`
314322

315-
{: .note }
316-
If not set, the [`Default profile`](#default-profile) from the settings is used!
323+
**Example:** `dev`
317324

318325
### Region
319326

320327
AWS region where the instance is located.
321328

322329
**Type:** `String`
323330

331+
**Default:** `Empty`
332+
324333
**Example:** `eu-central-1`
325334

326-
{: .note }
327-
If not set, the [`Default region`](#default-region) from the settings is used!
335+
## Group
336+
337+
### Profile
338+
339+
AWS CLI profile which will be used to connect.
340+
341+
**Type:** `String`
342+
343+
**Default:** `Empty`
344+
345+
**Example:** `dev`
346+
347+
### Region
348+
349+
AWS region where the instance is located.
350+
351+
**Type:** `String`
352+
353+
**Default:** `Empty`
354+
355+
**Example:** `eu-central-1`
328356

329357
## Settings
330358

@@ -375,23 +403,29 @@ If enabled, only EC2 instances are synchronized where the `instance state` is `r
375403

376404
**Default:** `Enabled`
377405

378-
### Default profile
406+
### Profile
407+
408+
AWS CLI profile which will be used to connect for manually added profiles.
379409

380410
**Type:** `String`
381411

382-
AWS CLI profile which will be used to connect.
412+
**Default:** `Empty`
383413

384-
**Type:** `String`
414+
**Example:** `dev`
385415

386416
{: .note }
387417
If not set, the AWS CLI default settings are used!
388418

389-
### Default region
419+
### Region
390420

391-
AWS region where the instance is located.
421+
AWS region where the instance is located for manually added profiles.
392422

393423
**Type:** `String`
394424

425+
**Default:** `Empty`
426+
427+
**Example:** `eu-central-1`
428+
395429
{: .note }
396430
If not set, the AWS CLI default settings are used!
397431

docs/Documentation/01_Application/15_SNMP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Example inputs:
1818
| ----------- | ------ | ------- | -------------------- | --------- | -------------- | -------- | ----------------- | ----------------- |
1919
| `server-01` | `Get` | `V2C` | `.1.3.6.1; .1.3.6.2` | `public` | `-/-` | `-/-` | `-/-` | `-/-` |
2020
| `10.0.0.10` | `Walk` | `V3` | `.1.3.6.1.2.1.1` | `-/-` | `NoAuthNoPriv` | `Admin` | `-/-` | `-/-` |
21-
| `10.0.0.10` | `Walk` | `V3` | `.1.3.6.1.2.1.1` | `-/-` | `AuthNoPriv` | `Admin` | `SHA | S3cr3t!` | `-/-` |
21+
| `10.0.0.10` | `Walk` | `V3` | `.1.3.6.1.2.1.1` | `-/-` | `AuthNoPriv` | `Admin` | `SHA1 | S3cr3t!` | `-/-` |
2222
| `10.0.0.10` | `Walk` | `V3` | `.1.3.6.1.2.1.1` | `-/-` | `AuthPriv` | `Admin` | `SHA1 | S3cr3t!` | `AES | S3cr3t%` |
2323

2424
{: .note }

0 commit comments

Comments
 (0)