Skip to content

Commit

Permalink
Cosmetic on UI
Browse files Browse the repository at this point in the history
  • Loading branch information
csavelief committed Oct 14, 2024
1 parent 0d68eaa commit 19b1739
Show file tree
Hide file tree
Showing 19 changed files with 131 additions and 138 deletions.
2 changes: 1 addition & 1 deletion public/adversary_meter/src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@if(Auth::user()->canListApps())
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Applications Ready To Be Deployed') }}</b></h3>
</div>
<div class="card">
@if($orders->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -12,8 +9,8 @@
</div>
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<div class="card-body">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th class="ps-4" width="25px"></th>
Expand Down
9 changes: 3 additions & 6 deletions resources/views/components/applications.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@if(Auth::user()->canListApps())
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Applications') }}</b></h3>
</div>
<div class="card">
@if($apps->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -13,12 +10,12 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>{{ __('Server') }}</th>
<th>
<i class="zmdi zmdi-long-arrow-down"></i>&nbsp;{{ __('Name') }}
{ __('Name') }}
</th>
<th>{{ __('Description') }}</th>
<th>{{ __('Sku') }}</th>
Expand Down
21 changes: 7 additions & 14 deletions resources/views/components/backups.blade.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
@if(Auth::user()->canListServers())
<div class="card card-accent-secondary tw-card">
<div class="card">
@if(Auth::user()->canManageServers() && isset($url))
<div class="card-header d-flex flex-row">
<div class="align-items-start">
<h3 class="m-0">
{{ __('Backups') }}
</h3>
</div>
@if(Auth::user()->canManageServers() && isset($url))
<div class="align-items-end">
<h3 class="m-0">
<h6 class="m-0">
<a href="#" class="float-end" onclick="createBackup()">
{{ __('+ new') }}
</a>
</h3>
</h6>
</div>
@endif
</div>
@endif
@if($backups->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -26,12 +21,10 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>
<i class="zmdi zmdi-long-arrow-up"></i>&nbsp;{{ __('Date') }}
</th>
<th>{{ __('Date') }}</th>
<th>{{ __('Name') }}</th>
<th>{{ __('Size') }}</th>
<th></th>
Expand Down
11 changes: 3 additions & 8 deletions resources/views/components/domains.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
@if(Auth::user()->canListServers())
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Domains') }}</b></h3>
</div>
<div class="card">
@if($domains->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -13,15 +10,13 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>{{ __('Server') }}</th>
<th>{{ __('IP V4') }}</th>
<th>{{ __('IP V6') }}</th>
<th>
<i class="zmdi zmdi-long-arrow-down"></i>&nbsp;{{ __('Name') }}
</th>
<th>{{ __('Name') }}</th>
<th></th>
</tr>
</thead>
Expand Down
9 changes: 2 additions & 7 deletions resources/views/components/interdependencies.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/cytoscape-popper@2/cytoscape-popper.js"></script>
@endonce
<div class="card card-accent-secondary tw-card mt-4">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Interdependencies') }}</b></h3>
</div>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col" id="cy" style="width:100%;height:800px">

</div>
<div class="col" id="cy" style="width:100%;height:800px"></div>
</div>
</div>
</div>
Expand Down
17 changes: 6 additions & 11 deletions resources/views/components/invitations.blade.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
@if(Auth::user()->canListUsers())
<div class="card card-accent-secondary tw-card">
<div class="card">
@if(Auth::user()->canManageUsers())
<div class="card-header d-flex flex-row">
<div class="align-items-start">
<h3 class="m-0">
{{ __('Invitations') }}
</h3>
</div>
@if(Auth::user()->canManageUsers())
<div class="align-items-end">
<h3 class="m-0 cursor-pointer">
<h6 class="m-0">
<a onclick="toggleForm()">
{{ __('+ new') }}
</a>
</h3>
</h6>
</div>
@endif
</div>
@endif
<div id="form-invitation" class="container-fluid mt-2 d-none">
<div class="row">
<div class="mb-3 col-5 col-md-5">
Expand Down Expand Up @@ -45,7 +40,7 @@ class="form-control btn btn-xs btn-outline-success float-end">
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>
Expand Down
21 changes: 8 additions & 13 deletions resources/views/components/knowledge-base.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Import your documents !') }}</b></h3>
</div>
<div class="card">
<div class="card-body p-3">
<h6 class="card-title">{{ __('Import your documents !') }}</h6>
<div class="row">
<div class="col-3">
<div id="collections"></div>
Expand All @@ -17,10 +15,7 @@
</div>
</div>
</div>
<div class="card card-accent-secondary tw-card mt-3">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Knowledge Base') }}</b></h3>
</div>
<div class="card mt-3">
@if($files->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -31,11 +26,11 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>{{ __('Collection') }}</th>
<th><i class="zmdi zmdi-long-arrow-down"></i>&nbsp;{{ __('Filename') }}</th>
<th>{{ __('Filename') }}</th>
<th style="text-align:right">{{ __('File Size') }}</th>
<th style="text-align:right">{{ __('Number of Chunks') }}</th>
<th style="text-align:right">{{ __('Number of Vectors') }}</th>
Expand All @@ -46,7 +41,7 @@
@foreach($files as $file)
<tr>
<td>
<span class="tw-pill pill bg-primary">{{ $file['collection'] }}</span>
<span class="lozenge new">{{ $file['collection'] }}</span>
</td>
<td>
<a href="{{ $file['download_url'] }}">
Expand All @@ -64,9 +59,9 @@
</td>
<td style="text-align:right">
@if($file['status'] === 'processed')
<span class="tw-pill rounded-pill bg-success">{{ __($file['status']) }}</span>
<span class="lozenge success">{{ __($file['status']) }}</span>
@else
<span class="tw-pill-blue-text rounded-pill bg-warning">{{ __($file['status']) }}</span>
<span class="lozenge information">{{ __($file['status']) }}</span>
@endif
</td>
</tr>
Expand Down
8 changes: 2 additions & 6 deletions resources/views/components/my-applications.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Applications') }}</b></h3>
</div>
<div class="card">
@if($apps->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -12,7 +9,7 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="border-bottom:0">
<thead>
<tr>
<th width="70px"></th>
Expand Down Expand Up @@ -43,7 +40,6 @@ class="mw-100" style="height: 2.5em;"/>
@else
{{ $app->application->name }}
@endif
&nbsp;&nbsp;<i class="zmdi zmdi-open-in-new"></i>
</a>
</span>
<div class="text-muted">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/components/orders.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</div>
@if(Auth::user()->canBuyStuff())
<div class="align-items-end">
<h3 class="m-0">
<a href="{{ route('product.index') }}" class="float-end">
<h6 class="m-0">
<a href="{{ route('product.index') }}">
{{ __('+ new') }}
</a>
</h3>
</h6>
</div>
@endif
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/components/osquery-rules.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th>
<i class="zmdi zmdi-long-arrow-down"></i>&nbsp;{{ __('Name') }}
{{ __('Name') }}
</th>
<th>{{ __('Version') }}</th>
<th>{{ __('Interval') }}</th>
Expand Down Expand Up @@ -44,7 +44,7 @@
{{ \Carbon\CarbonInterval::seconds($rule->interval)->cascade()->forHumans(); }}
</td>
<td>
<span class="tw-pill rounded-pill bg-primary">
<span class="lozenge new">
{{ $rule->platform->value }}
</span>
</td>
Expand Down
16 changes: 7 additions & 9 deletions resources/views/components/pending-actions.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
@if(Auth::user()->canListServers())
<div class="card card-accent-secondary tw-card">
<div class="card-header">
<h3 class="m-0"><b>{{ __('Pending Actions') }}</b></h3>
</div>
<div class="card">
<div class="card-body">
<h6 class="card-title">{{ __('Pending Actions') }}</h6>
<div class="row">
<div class="mb-3 col">
<div class="col">
@if($pendingActions->isEmpty())
<div class="row">
<div class="col">
Expand All @@ -16,13 +14,13 @@
@foreach($pendingActions as $pendingAction)
<div>
@if($pendingAction->state === \App\Enums\SshTraceStateEnum::PENDING)
<span class="me-2 tw-dot-blue"></span>
<span class="tw-dot-blue"></span>
@elseif ($pendingAction->state === \App\Enums\SshTraceStateEnum::IN_PROGRESS)
<span class="me-2 tw-dot-orange"></span>
<span class="tw-dot-orange"></span>
@elseif ($pendingAction->state === \App\Enums\SshTraceStateEnum::DONE)
<span class="me-2 tw-dot-green"></span>
<span class="tw-dot-green"></span>
@else
<span class="me-2 tw-dot-red"></span>
<span class="tw-dot-red"></span>
@endif
{{ $pendingAction->updated_at }} - {{ $pendingAction->server->name }} - {{ $pendingAction->trace }}
</div>
Expand Down
26 changes: 10 additions & 16 deletions resources/views/components/servers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@
</div>
@endif
@if(Auth::user()->canListServers())
<div class="card card-accent-secondary tw-card">
<div class="card">
@if(Auth::user()->canManageServers() && $is_yunohost)
<div class="card-header d-flex flex-row">
<div class="align-items-start">
<h3 class="m-0">
{{ __('Servers') }}
</h3>
</div>
@if(Auth::user()->canManageServers() && $is_yunohost)
<div class="align-items-end">
<h3 class="m-0">
<a href="{{ route('ynh.servers.create') }}" class="float-end">
<div class="d-flex align-content-end">
<h6 class="m-0">
<a href="{{ route('ynh.servers.create') }}">
{{ __('+ new') }}
</a>
</h3>
</h6>
</div>
@endif
</div>
@endif
@if($servers->isEmpty())
<div class="card-body">
<div class="row">
Expand All @@ -41,12 +36,12 @@
</div>
@else
<div class="card-body p-0">
<table class="table table-hover">
<table class="table table-hover" style="margin-bottom:0">
<thead>
<tr>
<th class="ps-4" width="25px"></th>
<th>
<i class="zmdi zmdi-long-arrow-down"></i>&nbsp;{{ __('Name') }}
{{ __('Name') }}
</th>
<th>{{ __('OS') }}</th>
<th>{{ __('IP V4') }}</th>
Expand Down Expand Up @@ -91,8 +86,7 @@
{{ $server->ip() }}
</td>
<td>
@if($server->isFrozen() || $server->ipv6() === '
<unavailable>')
@if($server->isFrozen() || $server->ipv6() === '<unavailable>')
-
@else
{{ $server->ipv6() }}
Expand Down
Loading

0 comments on commit 19b1739

Please sign in to comment.