From 19b1739d35d2584d8cb0deca9bc6fe0746d0b596 Mon Sep 17 00:00:00 2001 From: csavelief Date: Sun, 13 Oct 2024 18:32:50 +0200 Subject: [PATCH] Cosmetic on UI --- public/adversary_meter/src/js/app.js | 2 +- resources/lang/fr.json | 2 +- ...pplications-ready-to-be-deployed.blade.php | 9 +-- .../views/components/applications.blade.php | 9 +-- resources/views/components/backups.blade.php | 21 +++---- resources/views/components/domains.blade.php | 11 +--- .../components/interdependencies.blade.php | 9 +-- .../views/components/invitations.blade.php | 17 ++---- .../views/components/knowledge-base.blade.php | 21 +++---- .../components/my-applications.blade.php | 8 +-- resources/views/components/orders.blade.php | 6 +- .../views/components/osquery-rules.blade.php | 6 +- .../components/pending-actions.blade.php | 16 +++-- resources/views/components/servers.blade.php | 26 +++----- resources/views/components/shell.blade.php | 3 - resources/views/components/traces.blade.php | 25 +++----- resources/views/components/users.blade.php | 5 +- resources/views/layouts/_sidebar.blade.php | 12 ---- resources/views/layouts/app.blade.php | 61 +++++++++++++++++++ 19 files changed, 131 insertions(+), 138 deletions(-) diff --git a/public/adversary_meter/src/js/app.js b/public/adversary_meter/src/js/app.js index a6e9f7a..69da446 100644 --- a/public/adversary_meter/src/js/app.js +++ b/public/adversary_meter/src/js/app.js @@ -356,7 +356,7 @@ export class App { } else if (tab === 'assets') { menu.selectTab(App.ASSETS); } else if (tab === 'attackers') { - menu.selectTab(App.ASSETS); + menu.selectTab(App.DIRECTORY_ADVERSARIES); } else if (tab === 'blacklist') { menu.selectTab(App.IP_BLACKLIST); } else if (tab === 'delegation') { diff --git a/resources/lang/fr.json b/resources/lang/fr.json index 82f8edd..c3b62a6 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -149,7 +149,7 @@ "Text successfully copied to clipboard.": "Le text a été copié dans le presse-papiers.", "Someone has shared vulnerabilities with you on assets for which you are responsible. Please fix the vulnerabilities below and check the corresponding box. A new scan will verify that the problem has been solved.": "Quelqu'un a partagé avec vous des vulnérabilités sur des actifs dont vous êtes responsable. Veuillez corriger les vulnérabilités ci-dessous et cocher la case correspondante. Un nouveau scan vérifiera que le problème a été résolu.", "uppercase/lowercase letters and digits only": "lettres majuscules/minuscules et chiffres uniquement", - "+ new": "+ nouvelle", + "+ new": "+ ajouter", "Size": "Taille", "Terms": "Mentions Légales", "Reports": "Rapports", diff --git a/resources/views/components/applications-ready-to-be-deployed.blade.php b/resources/views/components/applications-ready-to-be-deployed.blade.php index 29ab583..363de5f 100644 --- a/resources/views/components/applications-ready-to-be-deployed.blade.php +++ b/resources/views/components/applications-ready-to-be-deployed.blade.php @@ -1,8 +1,5 @@ @if(Auth::user()->canListApps()) -
-
-

{{ __('Applications Ready To Be Deployed') }}

-
+
@if($orders->isEmpty())
@@ -12,8 +9,8 @@
@else -
- +
+
diff --git a/resources/views/components/applications.blade.php b/resources/views/components/applications.blade.php index 6e5ed51..4766c95 100644 --- a/resources/views/components/applications.blade.php +++ b/resources/views/components/applications.blade.php @@ -1,8 +1,5 @@ @if(Auth::user()->canListApps()) -
-
-

{{ __('Applications') }}

-
+
@if($apps->isEmpty())
@@ -13,12 +10,12 @@
@else
-
+
diff --git a/resources/views/components/backups.blade.php b/resources/views/components/backups.blade.php index 7dc90d6..34cf554 100644 --- a/resources/views/components/backups.blade.php +++ b/resources/views/components/backups.blade.php @@ -1,21 +1,16 @@ @if(Auth::user()->canListServers()) -
+
+ @if(Auth::user()->canManageServers() && isset($url))
-
-

- {{ __('Backups') }} -

-
- @if(Auth::user()->canManageServers() && isset($url)) - @endif
+ @endif @if($backups->isEmpty())
@@ -26,12 +21,10 @@
@else
-
{{ __('Server') }} -  {{ __('Name') }} + { __('Name') }} {{ __('Description') }} {{ __('Sku') }}
+
- + diff --git a/resources/views/components/domains.blade.php b/resources/views/components/domains.blade.php index 5717616..d641c62 100644 --- a/resources/views/components/domains.blade.php +++ b/resources/views/components/domains.blade.php @@ -1,8 +1,5 @@ @if(Auth::user()->canListServers()) -
-
-

{{ __('Domains') }}

-
+
@if($domains->isEmpty())
@@ -13,15 +10,13 @@
@else
-
-  {{ __('Date') }} - {{ __('Date') }} {{ __('Name') }} {{ __('Size') }}
+
- + diff --git a/resources/views/components/interdependencies.blade.php b/resources/views/components/interdependencies.blade.php index 41aec83..2f0e455 100644 --- a/resources/views/components/interdependencies.blade.php +++ b/resources/views/components/interdependencies.blade.php @@ -4,15 +4,10 @@ @endonce -
-
-

{{ __('Interdependencies') }}

-
+
-
- -
+
diff --git a/resources/views/components/invitations.blade.php b/resources/views/components/invitations.blade.php index 346c9fc..be8b44b 100644 --- a/resources/views/components/invitations.blade.php +++ b/resources/views/components/invitations.blade.php @@ -1,21 +1,16 @@ @if(Auth::user()->canListUsers()) -
+
+ @if(Auth::user()->canManageUsers())
-
-

- {{ __('Invitations') }} -

-
- @if(Auth::user()->canManageUsers()) - @endif
+ @endif
@@ -45,7 +40,7 @@ class="form-control btn btn-xs btn-outline-success float-end">
@else
-
{{ __('Server') }} {{ __('IP V4') }} {{ __('IP V6') }} -  {{ __('Name') }} - {{ __('Name') }}
+
diff --git a/resources/views/components/knowledge-base.blade.php b/resources/views/components/knowledge-base.blade.php index f642001..37ede12 100644 --- a/resources/views/components/knowledge-base.blade.php +++ b/resources/views/components/knowledge-base.blade.php @@ -1,8 +1,6 @@ -
-
-

{{ __('Import your documents !') }}

-
+
+
{{ __('Import your documents !') }}
@@ -17,10 +15,7 @@
-
-
-

{{ __('Knowledge Base') }}

-
+
@if($files->isEmpty())
@@ -31,11 +26,11 @@
@else
- +
- + @@ -46,7 +41,7 @@ @foreach($files as $file) diff --git a/resources/views/components/my-applications.blade.php b/resources/views/components/my-applications.blade.php index 33507b6..87a00b5 100644 --- a/resources/views/components/my-applications.blade.php +++ b/resources/views/components/my-applications.blade.php @@ -1,7 +1,4 @@ -
-
-

{{ __('Applications') }}

-
+
@if($apps->isEmpty())
@@ -12,7 +9,7 @@
@else
-
{{ __('Collection') }} {{ __('Filename') }}{{ __('Filename') }} {{ __('File Size') }} {{ __('Number of Chunks') }} {{ __('Number of Vectors') }}
- {{ $file['collection'] }} + {{ $file['collection'] }} @@ -64,9 +59,9 @@ @if($file['status'] === 'processed') - {{ __($file['status']) }} + {{ __($file['status']) }} @else - {{ __($file['status']) }} + {{ __($file['status']) }} @endif
+
@@ -43,7 +40,6 @@ class="mw-100" style="height: 2.5em;"/> @else {{ $app->application->name }} @endif -   
diff --git a/resources/views/components/orders.blade.php b/resources/views/components/orders.blade.php index 28ca485..f1e4b34 100644 --- a/resources/views/components/orders.blade.php +++ b/resources/views/components/orders.blade.php @@ -8,11 +8,11 @@
@if(Auth::user()->canBuyStuff()) @endif diff --git a/resources/views/components/osquery-rules.blade.php b/resources/views/components/osquery-rules.blade.php index 3fdf095..f366db8 100644 --- a/resources/views/components/osquery-rules.blade.php +++ b/resources/views/components/osquery-rules.blade.php @@ -9,11 +9,11 @@ @else
-
+
@@ -44,7 +44,7 @@ {{ \Carbon\CarbonInterval::seconds($rule->interval)->cascade()->forHumans(); }} diff --git a/resources/views/components/pending-actions.blade.php b/resources/views/components/pending-actions.blade.php index a9d7d0f..ac8e40c 100644 --- a/resources/views/components/pending-actions.blade.php +++ b/resources/views/components/pending-actions.blade.php @@ -1,11 +1,9 @@ @if(Auth::user()->canListServers()) -
-
-

{{ __('Pending Actions') }}

-
+
+
{{ __('Pending Actions') }}
-
+
@if($pendingActions->isEmpty())
@@ -16,13 +14,13 @@ @foreach($pendingActions as $pendingAction)
@if($pendingAction->state === \App\Enums\SshTraceStateEnum::PENDING) - + @elseif ($pendingAction->state === \App\Enums\SshTraceStateEnum::IN_PROGRESS) - + @elseif ($pendingAction->state === \App\Enums\SshTraceStateEnum::DONE) - + @else - + @endif {{ $pendingAction->updated_at }} - {{ $pendingAction->server->name }} - {{ $pendingAction->trace }}
diff --git a/resources/views/components/servers.blade.php b/resources/views/components/servers.blade.php index 283e152..8d49376 100644 --- a/resources/views/components/servers.blade.php +++ b/resources/views/components/servers.blade.php @@ -14,23 +14,18 @@
@endif @if(Auth::user()->canListServers()) -
+
+ @if(Auth::user()->canManageServers() && $is_yunohost)
-
-

- {{ __('Servers') }} -

-
- @if(Auth::user()->canManageServers() && $is_yunohost) - - @endif
+ @endif @if($servers->isEmpty())
@@ -41,12 +36,12 @@
@else
-
-  {{ __('Name') }} + {{ __('Name') }} {{ __('Version') }} {{ __('Interval') }} - + {{ $rule->platform->value }}
+
@@ -91,8 +86,7 @@ {{ $server->ip() }}
-  {{ __('Name') }} + {{ __('Name') }} {{ __('OS') }} {{ __('IP V4') }} - @if($server->isFrozen() || $server->ipv6() === ' - ') + @if($server->isFrozen() || $server->ipv6() === '') - @else {{ $server->ipv6() }} diff --git a/resources/views/components/shell.blade.php b/resources/views/components/shell.blade.php index 23fb1e7..6522eac 100644 --- a/resources/views/components/shell.blade.php +++ b/resources/views/components/shell.blade.php @@ -84,9 +84,6 @@
-
-

{{ __('Shell') }}

-
{{ __('This shell does not allow you to execute interactive commands. Shell commands cannot exceed 255 characters.') }} diff --git a/resources/views/components/traces.blade.php b/resources/views/components/traces.blade.php index 52ff7c1..4dd9775 100644 --- a/resources/views/components/traces.blade.php +++ b/resources/views/components/traces.blade.php @@ -1,9 +1,6 @@ @if(Auth::user()->canListServers()) @if($traces->isEmpty()) -
-
-

{{ __('Traces') }}

-
+
@@ -18,25 +15,23 @@
@else @foreach($servers as $server) -
-
-

- {{ $server->name }} / {{ __('Latest traces') }} -

-
+
+
+ {{ $server->name }} / {{ __('Latest traces') }} +
-
+
@foreach($tracesGroupedByServers[$server->name] as $trace)
@if($trace->state === \App\Enums\SshTraceStateEnum::PENDING) - + @elseif ($trace->state === \App\Enums\SshTraceStateEnum::IN_PROGRESS) - + @elseif ($trace->state === \App\Enums\SshTraceStateEnum::DONE) - + @else - + @endif {{ $trace->updated_at }} - {{ $trace->trace }}
diff --git a/resources/views/components/users.blade.php b/resources/views/components/users.blade.php index 097c697..884ffee 100644 --- a/resources/views/components/users.blade.php +++ b/resources/views/components/users.blade.php @@ -1,8 +1,5 @@ @if(Auth::user()->canListUsers())
-
-

{{ __('Users') }}

-
@if($users->isEmpty())
@@ -13,7 +10,7 @@
@else
- +
diff --git a/resources/views/layouts/_sidebar.blade.php b/resources/views/layouts/_sidebar.blade.php index da33f19..c46f1ad 100644 --- a/resources/views/layouts/_sidebar.blade.php +++ b/resources/views/layouts/_sidebar.blade.php @@ -69,18 +69,6 @@ z-index: 2 } - .lozenge.new { - background-color: var(--ds-background-discovery); - color: var(--ds-text-discovery); - } - - .lozenge { - display: inline-block; - padding: 0 4px; - border-radius: var(--bs-border-radius); - font-size: 14px; - } -