diff --git a/src/Controller/Console.php b/src/Controller/Console.php index 1e4b8b4..faf8616 100644 --- a/src/Controller/Console.php +++ b/src/Controller/Console.php @@ -26,6 +26,7 @@ class Console { new FormHandler($request, $git = new Form\Update\Git(getenv('PROJECT_PATH'))); $status = iterator_to_array($git->run("/usr/bin/git status -s")); + $diff = iterator_to_array($git->run("/usr/bin/git diff")); return $this->renderView("lean-console/page/update/index", get_defined_vars()); } diff --git a/src/Entity/Firewall/BannedIp.php b/src/Entity/Firewall/BannedIp.php new file mode 100644 index 0000000..91013f3 --- /dev/null +++ b/src/Entity/Firewall/BannedIp.php @@ -0,0 +1,31 @@ +count() ) { if ( $adapter->splitAlterQuery() ) { $query = $alter->map(fn(Lib\Database\Definition $map) => $entity::repository() - ->alterSqlQuery([$map->toArray()]) + ->alterSqlQuery([ $map->toArray() ]) ->getSqlQuery(true)); } else { diff --git a/src/Middleware/FirewallMiddleware.php b/src/Middleware/FirewallMiddleware.php new file mode 100644 index 0000000..8f0ccc9 --- /dev/null +++ b/src/Middleware/FirewallMiddleware.php @@ -0,0 +1,27 @@ +handle($request); + } +} diff --git a/view/lean-console/page/dashboard/index.phtml b/view/lean-console/page/dashboard/index.phtml index 390b4c4..4d6a109 100644 --- a/view/lean-console/page/dashboard/index.phtml +++ b/view/lean-console/page/dashboard/index.phtml @@ -12,4 +12,15 @@
Welcome into your Lean Console section. Select the appropriate menu item from the sidebar.
+ +
+
+
Firewall
+
+ @todo + latest 50 connections + banned users / IP ! + fail2ban integration +
+
{% endsection %} \ No newline at end of file diff --git a/view/lean-console/page/update/index.phtml b/view/lean-console/page/update/index.phtml index be70a47..13d5305 100644 --- a/view/lean-console/page/update/index.phtml +++ b/view/lean-console/page/update/index.phtml @@ -20,6 +20,20 @@ {% foreach $status as $line %} +
+ {% if $line %} + {{ $line }} + {% endif %} +
+ {% endforeach %} +
+ + +
+ 'git diff' output + + + {% foreach $diff as $line %}
{% if $line %} {{ $line }}