-
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.
Merge pull request #10 from oposs/qol_changes
correctly sort numbers, send only on success, include email template in pkg
- Loading branch information
Showing
9 changed files
with
83 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
wg-wrangler (0.3.1) UNRELEASED; urgency=medium | ||
|
||
* Sort numeric columns numerically | ||
* Send emails only if everything before successes | ||
* 'Send by Email' is now the default option | ||
* Also show 'Last Handshake' column | ||
|
||
-- Tobias Bossert <[email protected]> Fri, 24 Mar 2023 14:57:27 +0100 | ||
|
||
wg-wrangler (0.3.0) unstable; urgency=medium | ||
|
||
* Fixed incorrect handling of #+comment tags | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
0.3.1 |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
|
||
ETC = wgwrangler.dist.yaml env.dist.conf | ||
ETC = wgwrangler.dist.yaml env.dist.conf send_config_by_email.dist.ep | ||
EXTRA_DIST = $(ETC) | ||
sysconf_DATA = $(ETC) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,8 +284,15 @@ has formCfg => sub ($self) { | |
{ | ||
key => 'send_by_email', | ||
label => => trm('Send by Email'), | ||
widget => 'checkBox' | ||
widget => 'checkBox', | ||
set => { | ||
value => true | ||
} | ||
}, | ||
{ | ||
widget => 'header', | ||
label => trm('Note: The configuration rendered in the preview is also completely valid'), | ||
} | ||
]; | ||
}; | ||
|
||
|
@@ -316,6 +323,17 @@ has actionCfg => sub ($self) { | |
$self->app->wireguardModel->update_peer_data($interface, $peer_pub_key, 'device', $device); | ||
$self->app->wireguardModel->update_peer_data($interface, $peer_pub_key, 'created', $created); | ||
|
||
# Commit changes | ||
$self->app->wireguardModel->commit_changes({}); | ||
|
||
# Check into VCS if enabled | ||
if ($self->config->{'no_apply'} && $self->config->{'enable_git'}) { | ||
my $commit_message = "Created peer for `$name` on interface `$interface`"; | ||
my $user_string = $self->user->{userInfo}{cbuser_login}; | ||
$self->app->versionManager->checkin_new_version($commit_message, $user_string, '[email protected]'); | ||
} | ||
|
||
# And send mail if no error occurred so far | ||
if (defined $send_by_email && $send_by_email == 1) { | ||
my $email_cfg = { | ||
'name' => $name, | ||
|
@@ -335,15 +353,6 @@ has actionCfg => sub ($self) { | |
}; | ||
$self->mailHandler->prepare_and_send($email_cfg); | ||
} | ||
# Commit changes | ||
$self->app->wireguardModel->commit_changes({}); | ||
|
||
# Check into VCS if enabled | ||
if ($self->config->{'no_apply'} && $self->config->{'enable_git'}) { | ||
my $commit_message = "Created peer for `$name` on interface `$interface`"; | ||
my $user_string = $self->user->{userInfo}{cbuser_login}; | ||
$self->app->versionManager->checkin_new_version($commit_message, $user_string, '[email protected]'); | ||
} | ||
}; | ||
if ($@) { | ||
my $error_id = int(rand(100000)); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
wg0 eOSNqjwOrtIQMOaVxOXXdGjvgQ6gIzS09ltKJMjAPl8= MN6ipoevVEFdsQ+vciTdsgeD30e9w0qT2jPZOFotmHQ= 51861 off | ||
wg0 2mO59ijYCvfJUi6pnNO0H697xiZHTzs4mLA5da5m13w= (none) 89.333.25.1:5589 10.0.10.50/32 0 1234 5985 off | ||
wg0 KpXASgjXPh5xtIxFclQUZzq4PuqbDfHT1CaU8shTsVE= (none) 8.8.8.8:42 10.0.10.51/32 0 4242 4242 off | ||
wg0 Mu46ORALOMuD/T/uyuBiJNecOps4q80TB6BH6F2W9SA= (none) 45.68.254.22:6633 10.0.10.52/32 0 5 10 off | ||
wg0 2mO59ijYCvfJUi6pnNO0H697xiZHTzs4mLA5da5m13w= (none) 89.333.25.1:5589 10.0.10.50/32 52 1234 5985 off | ||
wg0 KpXASgjXPh5xtIxFclQUZzq4PuqbDfHT1CaU8shTsVE= (none) 8.8.8.8:42 10.0.10.51/32 4589 4528289367867 4242 off | ||
wg0 Mu46ORALOMuD/T/uyuBiJNecOps4q80TB6BH6F2W9SA= (none) 45.68.254.22:6633 10.0.10.52/32 4567898 5 10 off |