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

Draft
wants to merge 103 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
103 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
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