Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Client UI translate to Filament (from React) #416

Merged
merged 218 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
db67946
Add new panel
lancepioch Jun 9, 2024
46c5d5b
Add some basic resource pages
lancepioch Jun 9, 2024
5afd194
Wip
lancepioch Jun 9, 2024
3b9fbc0
Wip terminal
lancepioch Jun 16, 2024
d86428a
Wip
lancepioch Jun 17, 2024
281c580
Add new panel
lancepioch Jun 9, 2024
a976a17
Add some basic resource pages
lancepioch Jun 9, 2024
d4e3721
Wip
lancepioch Jun 9, 2024
2f9ae32
[Sub-Users] Add Invite
notAreYouScared Jun 19, 2024
ab96feb
[Sub-Users] Fix Creation
notAreYouScared Jun 19, 2024
4e9eb34
[Cron] Add basics
notAreYouScared Jun 19, 2024
7fb3785
Merge branch 'issue/353' of github.com:pelican-dev/panel into issue/353
lancepioch Jul 5, 2024
4ec2fbc
Add basic auth and messages
lancepioch Jul 5, 2024
321fcd8
Add basic buttons
lancepioch Jul 5, 2024
ce45884
Merge branch 'main' into issue/353
notAreYouScared Jul 7, 2024
511dc34
WIP on issue/353
notAreYouScared Jul 7, 2024
b191a6c
WIP on issue/353
notAreYouScared Jul 7, 2024
10c1228
Add Database page
notAreYouScared Jul 7, 2024
a9497d3
Update Database Page
notAreYouScared Jul 7, 2024
675d405
Start of Backup Page
notAreYouScared Jul 7, 2024
cdced0b
Composer Update
notAreYouScared Jul 21, 2024
1bf0054
Changes
notAreYouScared Jul 21, 2024
033b298
Send input
lancepioch Jul 25, 2024
60151d5
Remove this includes
lancepioch Jul 25, 2024
2823e45
Better offline handling
lancepioch Jul 25, 2024
f993b55
Merge branch 'issue/353' of github.com:pelican-dev/panel into issue/353
lancepioch Jul 25, 2024
080f066
Consolidate top nav config
lancepioch Jul 25, 2024
704a1f8
Update Backups Page
notAreYouScared Jul 28, 2024
1612189
Update Backups
notAreYouScared Jul 29, 2024
959fa8d
Change name
notAreYouScared Jul 29, 2024
e6e3ce0
Add Assign All, Layout Fixes.
notAreYouScared Aug 4, 2024
5157c97
Merge branch 'main' into issue/353
notAreYouScared Aug 4, 2024
1636164
conflict
notAreYouScared Aug 4, 2024
6b857d7
update schedule pages
Boy132 Aug 5, 2024
d7dd067
fix phpstan
Boy132 Aug 5, 2024
572991a
update pint.json
Boy132 Aug 5, 2024
1a94c2a
add cron presets to schedule
Boy132 Aug 5, 2024
8c94c37
fix tests
Boy132 Aug 5, 2024
2d57a2e
fix task creation
Boy132 Aug 5, 2024
b23c9cf
schedules: disable task creation if limit is reached & disable backup…
Boy132 Aug 5, 2024
d80094a
update activity pages
Boy132 Aug 5, 2024
92a6c2c
update resources
notAreYouScared Aug 6, 2024
f7a2c7c
Update Edit User
notAreYouScared Aug 6, 2024
c67a2e9
.... Sure it works.
notAreYouScared Aug 6, 2024
7e6fc67
user: update canAccessPanel & canAccessTenant
Boy132 Aug 6, 2024
a8f8ddb
add helper to convert bytes into readable format
Boy132 Aug 8, 2024
11aac03
very basic file explorer
Boy132 Aug 9, 2024
5a9bf95
files: fix some stuff & remove dummy data
Boy132 Aug 9, 2024
e77de55
files: better error handling
Boy132 Aug 9, 2024
a39169d
files: basic file editor
Boy132 Aug 9, 2024
1da9b0d
files: add some actions
Boy132 Aug 9, 2024
818b1f3
File manager updates
notAreYouScared Aug 9, 2024
45f6811
files: fix paths
Boy132 Aug 9, 2024
70f82bc
Merge branch 'main' into issue/353
notAreYouScared Aug 10, 2024
962a0b9
Revery Composer Upgrade, Fixes SQLite
notAreYouScared Aug 10, 2024
4a7ef0e
fix: Pint (#517)
Poseidon281 Aug 11, 2024
a655f01
Update File Editing
notAreYouScared Aug 11, 2024
f76a05c
add enum for editor langs
Boy132 Aug 11, 2024
6691d51
files: add upload & pull actions
Boy132 Aug 11, 2024
0d7cc3e
fix build
Boy132 Aug 11, 2024
ca13ee3
files: handle images
Boy132 Aug 11, 2024
fa27d92
Update to Filament v3.2.98
notAreYouScared Aug 12, 2024
b1ba37e
files: add remaining actions
Boy132 Aug 12, 2024
652fa0c
use `authorize` instead of `hidden`
Boy132 Aug 12, 2024
8e4d10b
fix canAccessTenant
Boy132 Aug 12, 2024
3001e87
update date columns
Boy132 Aug 12, 2024
4059129
files: testing & fixes
Boy132 Aug 12, 2024
87fc00d
Fix File Names
notAreYouScared Aug 12, 2024
1cfb6db
Combine Pull/Upload
notAreYouScared Aug 12, 2024
abd525c
Fix BulkDelete
notAreYouScared Aug 12, 2024
dcf234a
Uncontained tabs
notAreYouScared Aug 12, 2024
d6cf3ac
Hide Lang Selection, Move Actions
notAreYouScared Aug 12, 2024
6f65fc9
Update Monaco, more custom
notAreYouScared Aug 12, 2024
500f083
Add livewire config
notAreYouScared Aug 12, 2024
eb3ed74
files: fix record url
Boy132 Aug 13, 2024
bf9b91e
basic setup for settings & startup page
Boy132 Aug 13, 2024
419e248
make abstract class for simple app pages
Boy132 Aug 13, 2024
aebe25e
Basic Startup Page
notAreYouScared Aug 13, 2024
9dae9ed
Update nav sort
notAreYouScared Aug 13, 2024
413b3a3
small cleanup
Boy132 Aug 14, 2024
8f24a21
startup: fix shouldHideComponent & getSelectOptionsFromRules
Boy132 Aug 14, 2024
30404ff
startup: fix non editable fields & set default value
Boy132 Aug 14, 2024
1e0bb00
startup: add todo for save button
Boy132 Aug 14, 2024
e0ee02b
Save Variables after update & off click
notAreYouScared Aug 14, 2024
42b8a22
Notifications are cool
notAreYouScared Aug 14, 2024
e10eb6a
Add rule validation
notAreYouScared Aug 14, 2024
967a4ff
Sort variables by sortid
notAreYouScared Aug 14, 2024
64205c1
pint
notAreYouScared Aug 14, 2024
038eca8
Settings Page + Startup Changes
notAreYouScared Aug 14, 2024
e91a6b3
settings: cleanup
Boy132 Aug 15, 2024
de3ddd5
refactor: use server model for ServerFormPage (formerly known as Simp…
Boy132 Aug 16, 2024
35f77b4
Use Repeater for variables
notAreYouScared Aug 16, 2024
329b3d8
Add Network, Remove breadcrumbs
notAreYouScared Aug 16, 2024
ac450b0
Add paginated to file explorer
notAreYouScared Aug 16, 2024
91d1952
Fix updating variables
notAreYouScared Aug 16, 2024
5237c24
Add link to go to new client area
notAreYouScared Aug 17, 2024
36de986
Merge branch 'main' into issue/353
Boy132 Aug 20, 2024
493e0f8
fix after merge
Boy132 Aug 20, 2024
888e26a
Add graphs to console page
notAreYouScared Aug 25, 2024
b185d2d
Merge branch 'main' into issue/353
Boy132 Sep 21, 2024
d1f7418
fix pint & phpstan
Boy132 Sep 21, 2024
5323ca0
fix authorizeAccess for EditFiles and Startup page
Boy132 Sep 22, 2024
22cd18d
Fix rules on startup page
notAreYouScared Sep 22, 2024
95c501a
Update console size
notAreYouScared Oct 2, 2024
8f18a45
Fix node name
notAreYouScared Oct 2, 2024
b07bbfe
add "global search" to files list
Boy132 Oct 7, 2024
09dcffa
remove debug dummy data
Boy132 Oct 7, 2024
a05bfd3
Merge branch 'main' into issue/353
Boy132 Oct 7, 2024
6b760e6
update view action on ListServers
Boy132 Oct 7, 2024
f9f67a7
enable SPA mode for app panel
Boy132 Oct 7, 2024
bdf581e
remove colors from app panel
Boy132 Oct 7, 2024
4c70292
update global search ui a bit
Boy132 Oct 7, 2024
616a7be
add own page for global search
Boy132 Oct 8, 2024
7339509
fix File getRows
Boy132 Oct 8, 2024
3505754
remove "path" from SearchFiles (for now)
Boy132 Oct 8, 2024
87483d0
fix caching for searched files
Boy132 Oct 8, 2024
43b4e13
add title and breadcrumbs to global search page
Boy132 Oct 8, 2024
78335fd
Merge branch 'main' into issue/353
Boy132 Oct 17, 2024
35e616e
make cpu & memory charts on console page working
Boy132 Oct 18, 2024
6377c77
fix phpstan
Boy132 Oct 18, 2024
4c8b288
add missing import
Boy132 Oct 18, 2024
444fa7b
cleanup console views & widgets
Boy132 Oct 18, 2024
a314fd8
add overview stats to console
Boy132 Oct 18, 2024
bec2702
don't be so lazy, console!
Boy132 Oct 18, 2024
e9eb90c
make history working
Boy132 Oct 18, 2024
cdb9f30
decode data to get array
Boy132 Oct 19, 2024
cbcfc8a
add missing On
Boy132 Oct 19, 2024
e812f93
fix json_decode
Boy132 Oct 19, 2024
17d2609
change polling to 1 sec
Boy132 Oct 19, 2024
9e7ada1
hide "0" cpu/ memory
Boy132 Oct 19, 2024
7289c00
add data to network chart
Boy132 Oct 19, 2024
dab5a5c
Remove data labels
notAreYouScared Oct 19, 2024
97fcd31
fix data on network chart
Boy132 Oct 19, 2024
b042daf
Merge remote-tracking branch 'upstream/issue/353' into issue/353
Boy132 Oct 19, 2024
36b39ff
fix data on network chart (2nd try)
Boy132 Oct 19, 2024
ebfb033
WIP Network Stats
notAreYouScared Oct 19, 2024
a9b369f
Remove test
notAreYouScared Oct 19, 2024
e7dca74
Change MaxWidth
notAreYouScared Oct 19, 2024
c1f95ee
Merge branch 'main' into issue/353
Boy132 Oct 21, 2024
ec1bd08
run pint
Boy132 Oct 21, 2024
fa21c78
fix phpstan
Boy132 Oct 21, 2024
d1f61f5
Fix storeStats cast
RMartinOscar Oct 29, 2024
52789f8
make $data a string
Boy132 Oct 29, 2024
ee39315
update visible check for "admin" menu item
Boy132 Oct 29, 2024
7a8f67e
remove account widget
Boy132 Oct 29, 2024
399ea45
rebrand "Dashboard" to "Server List"
Boy132 Oct 29, 2024
11bb03b
fix canAccessPanel
Boy132 Oct 29, 2024
a708218
Merge branch 'main' into issue/353
Boy132 Oct 29, 2024
c6522e0
separate server list into own panel
Boy132 Nov 6, 2024
efa0d98
change path to avoid conflicts with old client area (and remove sideb…
Boy132 Nov 6, 2024
4dd4968
display correct icon and color on server list entries
Boy132 Nov 6, 2024
2a5cd74
show total memory if server is offline
Boy132 Nov 6, 2024
7f2f5cb
replace custom server list page with ListRecords page
Boy132 Nov 8, 2024
ff73480
Merge branch 'main' into issue/353
Boy132 Nov 8, 2024
2b1366b
fix tests
Boy132 Nov 8, 2024
fcc590b
fix namespace
Boy132 Nov 8, 2024
f77230b
remove "open" button and make whole column clickable
Boy132 Nov 8, 2024
6e318c8
Update EditProfile
notAreYouScared Nov 12, 2024
91c9d0b
run pint
Boy132 Nov 13, 2024
cc926cb
fix access to server list
Boy132 Nov 13, 2024
4985a76
Merge branch 'main' into issue/353
Boy132 Nov 19, 2024
2a97680
add new login page to panels
Boy132 Nov 19, 2024
0eac643
fix next_run_at for new schedules
Boy132 Nov 19, 2024
f0d7e63
use new DateTimeColumn
Boy132 Nov 19, 2024
c04b8f9
add own column for file bytes
Boy132 Nov 19, 2024
d2f5dbf
return to server list when clicking title
Boy132 Nov 19, 2024
834306f
fix console loading
Boy132 Nov 19, 2024
79b51b7
handle server with "conflict state"
Boy132 Nov 21, 2024
6cd6cbc
add banner if server is in "conflict state"
Boy132 Nov 21, 2024
abcec37
fix phpstan
Boy132 Nov 21, 2024
3951f01
update docker image select
Boy132 Nov 21, 2024
88bd51b
fix permission checks on Settings & Startup pages
Boy132 Nov 21, 2024
6d327c0
fix query for activity log page
Boy132 Nov 21, 2024
1b23cdd
fix activity log not being logged
Boy132 Nov 21, 2024
ed22e1b
adjust ListActivities
Boy132 Nov 21, 2024
d04d797
fix phpstan
Boy132 Nov 21, 2024
0ec7204
Merge branch 'main' into issue/353
Boy132 Nov 23, 2024
a0db14c
fix pint
Boy132 Nov 23, 2024
4c49c4f
fix profile menu item link on server panel
Boy132 Nov 23, 2024
5138477
add ip tooltip to activity logs (and role permission)
Boy132 Nov 23, 2024
124ad7b
change backup icon
Boy132 Nov 23, 2024
d5d78c8
update navigation sort
Boy132 Nov 23, 2024
252bdaf
general code cleanup
Boy132 Nov 24, 2024
db0fb49
more cleanup
Boy132 Nov 24, 2024
93da81d
Disable Restart/Stop if server is offline
notAreYouScared Nov 30, 2024
e5de118
Change rename notification
notAreYouScared Nov 30, 2024
31f7f6d
Remove negation on abort_unless
RMartinOscar Nov 30, 2024
31cc5ed
Add notification on save
RMartinOscar Nov 30, 2024
1efe29b
Single disabled closure & comment unused import
RMartinOscar Nov 30, 2024
893fa39
Add required to Server Name & Nullable to description
RMartinOscar Nov 30, 2024
ffdcf00
mutateFormDataBeforeSave doesn't work since we use forceFill
RMartinOscar Dec 1, 2024
a0e956b
Fix web socket connection not existing.
notAreYouScared Dec 1, 2024
5480b97
Fix some subuser permissions
notAreYouScared Dec 1, 2024
bb04668
add permission checks to resources
Boy132 Dec 1, 2024
6d23d26
do not allow self-deletion
notAreYouScared Dec 1, 2024
ecb0b3e
Update editing file permissions
notAreYouScared Dec 1, 2024
4aaeb47
Fix of the previous fix
notAreYouScared Dec 1, 2024
b1a51ac
add service for subuser updating
Boy132 Dec 1, 2024
620c3d8
Only allow save if they have file_update
notAreYouScared Dec 1, 2024
10f2ac1
Remove unused import
RMartinOscar Dec 1, 2024
4ce81d1
Update backup delete button
notAreYouScared Dec 1, 2024
04cfcf1
Merge remote-tracking branch 'origin/issue/353' into issue/353
notAreYouScared Dec 1, 2024
d35fdf8
Add Delete, remove bulks
notAreYouScared Dec 1, 2024
720cf0e
Update Database page
notAreYouScared Dec 1, 2024
47c96e0
Use Allocation Permissions
notAreYouScared Dec 1, 2024
5471471
add canAccess check to startup
Boy132 Dec 1, 2024
74fd9a9
Add Permission checks to Settings page
notAreYouScared Dec 1, 2024
08a4ba0
add service for subuser deletion
Boy132 Dec 1, 2024
ca7a24e
Merge remote-tracking branch 'upstream/issue/353' into issue/353
Boy132 Dec 1, 2024
1f5787c
Remove Kill permission
notAreYouScared Dec 1, 2024
22217ae
Updates
notAreYouScared Dec 1, 2024
b03906e
fix move files
Boy132 Dec 1, 2024
e26f535
Merge remote-tracking branch 'upstream/issue/353' into issue/353
Boy132 Dec 1, 2024
cf8e7cc
add redirects
notAreYouScared Dec 1, 2024
c11192c
fix phpstan
Boy132 Dec 1, 2024
73b3840
activity: remove properties from tans for now
Boy132 Dec 1, 2024
9af643f
If alias, use that, else ip
notAreYouScared Dec 1, 2024
5e1d1e8
Merge branch 'main' into issue/353
notAreYouScared Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions app/Enums/EditorLanguages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php

namespace App\Enums;

use Filament\Support\Contracts\HasLabel;

enum EditorLanguages: string implements HasLabel
{
case plaintext = 'plaintext';
case abap = 'abap';
case apex = 'apex';
case azcali = 'azcali';
case bat = 'bat';
case bicep = 'bicep';
case cameligo = 'cameligo';
case coljure = 'coljure';
case coffeescript = 'coffeescript';
case c = 'c';
case cpp = 'cpp';
case csharp = 'csharp';
case csp = 'csp';
case css = 'css';
case cypher = 'cypher';
case dart = 'dart';
case dockerfile = 'dockerfile';
case ecl = 'ecl';
case elixir = 'elixir';
case flow9 = 'flow9';
case fsharp = 'fsharp';
case go = 'go';
case graphql = 'graphql';
case handlebars = 'handlebars';
case hcl = 'hcl';
case html = 'html';
case ini = 'ini';
case java = 'java';
case javascript = 'javascript';
case julia = 'julia';
case kotlin = 'kotlin';
case less = 'less';
case lexon = 'lexon';
case lua = 'lua';
case liquid = 'liquid';
case m3 = 'm3';
case markdown = 'markdown';
case mdx = 'mdx';
case mips = 'mips';
case msdax = 'msdax';
case mysql = 'mysql';
case objectivec = 'objective-c';
case pascal = 'pascal';
case pascaligo = 'pascaligo';
case perl = 'perl';
case pgsql = 'pgsql';
case php = 'php';
case pla = 'pla';
case postiats = 'postiats';
case powerquery = 'powerquery';
case powershell = 'powershell';
case proto = 'proto';
case pug = 'pug';
case python = 'python';
case qsharp = 'qsharp';
case r = 'r';
case razor = 'razor';
case redis = 'redis';
case redshift = 'redshift';
case restructuredtext = 'restructuredtext';
case ruby = 'ruby';
case rust = 'rust';
case sb = 'sb';
case scala = 'scala';
case scheme = 'scheme';
case scss = 'scss';
case shell = 'shell';
case sol = 'sol';
case aes = 'aes';
case sparql = 'sparql';
case sql = 'sql';
case st = 'st';
case swift = 'swift';
case systemverilog = 'systemverilog';
case verilog = 'verilog';
case tcl = 'tcl';
case twig = 'twig';
case typescript = 'typescript';
case typespec = 'typespec';
case vb = 'vb';
case wgsl = 'wgsl';
case xml = 'xml';
case yaml = 'yaml';
case json = 'json';

public function getLabel(): ?string
{
return $this->name;
}
}
74 changes: 74 additions & 0 deletions app/Filament/App/Pages/Console.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php

namespace App\Filament\App\Pages;

use Filament\Actions\Action;
use Filament\Facades\Filament;
use Filament\Pages\Page;

class Console extends Page
{
protected static ?string $navigationIcon = 'tabler-brand-tabler';
protected static ?int $navigationSort = 1;
protected static string $view = 'filament.app.pages.console';

public array $history = [];
public int $historyIndex = 0;
public string $input = '';

protected function getViewData(): array
{
return [
'server' => Filament::getTenant(),
'user' => auth()->user(),
];
}

protected function getHeaderActions(): array
{
return [
Action::make('start')
->color('primary')
->action(fn () => $this->dispatch('setServerState', state: 'start')),

Action::make('restart')
->color('gray')
->action(fn () => $this->dispatch('setServerState', state: 'restart')),

Action::make('stop')
->color('danger')
->action(fn () => $this->dispatch('setServerState', state: 'stop')),
];
}

public function up()
{
$this->historyIndex = min($this->historyIndex + 1, count($this->history) - 1);

// e.currentTarget.value = history![newIndex] || '';
//
// // By default up arrow will also bring the cursor to the start of the line, so we'll preventDefault to keep it at the end.
// e.preventDefault();
}

public function down()
{
$this->historyIndex = max($this->historyIndex - 1, -1);

// e.currentTarget.value = history![newIndex] || '';
}

public function enter()
{
$this->dispatch('sendServerCommand', command: $this->input);

$this->input = '';

// setHistory((prevHistory) => [command, ...prevHistory!].slice(0, 32));
// setHistoryIndex(-1);
//
// instance && instance.send('send command', command);
// e.currentTarget.value = '';
}

}
51 changes: 51 additions & 0 deletions app/Filament/App/Pages/Dashboard.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

namespace App\Filament\App\Pages;

use Filament\Facades\Filament;
use Filament\Pages\Page;
use Illuminate\Contracts\Support\Htmlable;

class Dashboard extends Page
{
protected static string $routePath = '/';

protected static ?int $navigationSort = 0;

protected static string $view = 'filament-panels::pages.dashboard';

public static function getNavigationLabel(): string
{
return 'Dashboard';
}

public static function getNavigationIcon(): string|Htmlable|null
{
return 'tabler-home';
}

public static function getRoutePath(): string
{
return static::$routePath;
}

public function getWidgets(): array
{
return Filament::getWidgets();
}

public function getVisibleWidgets(): array
{
return $this->filterVisibleWidgets($this->getWidgets());
}

public function getColumns(): int|string|array
{
return 2;
}

public function getTitle(): string|Htmlable
{
return 'Welcome, '. auth()->user()->username;
}
}
Loading
Loading