From 9e6d7642c1bf5010857b805f753f43de6f25a452 Mon Sep 17 00:00:00 2001 From: Alf Drollinger <40421928+adrolli@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:23:23 +0100 Subject: [PATCH] Change Namespace of Jobs (#246) --- .github/workflows/monorepo-split-packages.yml | 1 + _packages/jobs/CHANGELOG.md | 22 +- _packages/jobs/README.md | 38 ++-- _packages/jobs/composer.json | 14 +- .../{filament-job-manager.php => jobs.php} | 8 +- ...stub => create_job_manager_table.php.stub} | 2 +- _packages/jobs/routes/web.php | 11 - .../jobs/src/Controllers/QueueController.php | 49 ---- .../src/FilamentJobManagerServiceProvider.php | 18 -- _packages/jobs/src/JobManagerProvider.php | 4 +- ...atchesPlugin.php => JobsBatchesPlugin.php} | 22 +- ...ledJobsPlugin.php => JobsFailedPlugin.php} | 26 +-- ...{FilamentJobsPlugin.php => JobsPlugin.php} | 22 +- _packages/jobs/src/JobsServiceProvider.php | 17 ++ ...ngJobsPlugin.php => JobsWaitingPlugin.php} | 22 +- _packages/jobs/src/Models/FailedJob.php | 2 +- _packages/jobs/src/Models/Job.php | 2 +- _packages/jobs/src/Models/JobBatch.php | 2 +- _packages/jobs/src/Models/JobManager.php | 6 +- .../jobs/src/Resources/FailedJobsResource.php | 24 +- .../Pages/ListFailedJobs.php | 6 +- .../jobs/src/Resources/JobBatchesResource.php | 24 +- .../Pages/ListJobBatches.php | 4 +- _packages/jobs/src/Resources/JobsResource.php | 40 ++-- .../Resources/JobsResource/Pages/ListJobs.php | 8 +- .../JobsResource/Widgets/JobStatsOverview.php | 12 +- .../src/Resources/WaitingJobsResource.php | 40 ++-- .../Pages/ListJobsWaiting.php | 8 +- .../Widgets/JobsWaitingOverview.php | 14 +- _packages/jobs/src/Traits/FormatSeconds.php | 2 +- _packages/jobs/src/Traits/JobProgress.php | 4 +- app/Providers/Filament/AdminPanelProvider.php | 10 +- composer.json | 9 +- composer.lock | 215 ++++++++++++++---- .../2014_10_12_000000_create_users_table.php | 34 --- ...12_100000_create_password_resets_table.php | 32 --- ...01_create_personal_access_tokens_table.php | 33 --- .../2020_05_21_100000_create_teams_table.php | 30 --- ...20_05_21_200000_create_team_user_table.php | 32 --- ...1_300000_create_team_invitations_table.php | 32 --- ...12_07_135326_create_failed_jobs_table.php} | 8 +- ..._12_07_135327_create_job_batches_table.php | 35 +++ ...> 2023_12_07_135518_create_jobs_table.php} | 15 +- ..._12_07_140219_create_job_manager_table.php | 36 +++ .../headings/invaders-filament-jsoneditor.css | 6 + .../headings/invaders-filament-jsoneditor.js | 1 + .../filament/forms/components/file-upload.js | 2 +- 47 files changed, 484 insertions(+), 520 deletions(-) rename _packages/jobs/config/{filament-job-manager.php => jobs.php} (80%) rename _packages/jobs/database/migrations/{create_filament-job-manager_table.php.stub => create_job_manager_table.php.stub} (99%) delete mode 100644 _packages/jobs/routes/web.php delete mode 100644 _packages/jobs/src/Controllers/QueueController.php delete mode 100644 _packages/jobs/src/FilamentJobManagerServiceProvider.php rename _packages/jobs/src/{FilamentJobBatchesPlugin.php => JobsBatchesPlugin.php} (83%) rename _packages/jobs/src/{FilamentFailedJobsPlugin.php => JobsFailedPlugin.php} (80%) rename _packages/jobs/src/{FilamentJobsPlugin.php => JobsPlugin.php} (84%) create mode 100644 _packages/jobs/src/JobsServiceProvider.php rename _packages/jobs/src/{FilamentWaitingJobsPlugin.php => JobsWaitingPlugin.php} (83%) delete mode 100644 database/migrations/2014_10_12_000000_create_users_table.php delete mode 100644 database/migrations/2014_10_12_100000_create_password_resets_table.php delete mode 100644 database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php delete mode 100644 database/migrations/2020_05_21_100000_create_teams_table.php delete mode 100644 database/migrations/2020_05_21_200000_create_team_user_table.php delete mode 100644 database/migrations/2020_05_21_300000_create_team_invitations_table.php rename database/migrations/{2019_08_19_000000_create_failed_jobs_table.php => 2023_12_07_135326_create_failed_jobs_table.php} (86%) create mode 100644 database/migrations/2023_12_07_135327_create_job_batches_table.php rename database/migrations/{2023_02_21_210252_create_sessions_table.php => 2023_12_07_135518_create_jobs_table.php} (50%) create mode 100644 database/migrations/2023_12_07_140219_create_job_manager_table.php create mode 100644 public/css/awcodes/headings/invaders-filament-jsoneditor.css create mode 100644 public/js/awcodes/headings/invaders-filament-jsoneditor.js diff --git a/.github/workflows/monorepo-split-packages.yml b/.github/workflows/monorepo-split-packages.yml index 05f7ad946..b7c5a0d41 100644 --- a/.github/workflows/monorepo-split-packages.yml +++ b/.github/workflows/monorepo-split-packages.yml @@ -17,6 +17,7 @@ jobs: matrix: package: - blog + - jobs steps: - uses: actions/checkout@v4 diff --git a/_packages/jobs/CHANGELOG.md b/_packages/jobs/CHANGELOG.md index 529f68efc..3b33142ab 100644 --- a/_packages/jobs/CHANGELOG.md +++ b/_packages/jobs/CHANGELOG.md @@ -1,37 +1,37 @@ # Changelog -All notable changes to `filament-job-manager` will be documented in this file. +All notable changes to `jobs` will be documented in this file. ## v0.6.1 - 2022-12-08 -- focus relevant information in failed jobs index table +- focus relevant information in failed jobs index table ## v0.6.0 - 2022-10-06 -- introduce https://github.com/invaders-xx/filament-jsoneditor for `payload` +- introduce https://github.com/invaders-xx/filament-jsoneditor for `payload` ## v0.5.1 - 2022-09-08 -- do not show 'options' column in JobBatchesResource +- do not show 'options' column in JobBatchesResource ## v0.5.0 - 2022-09-08 -- place FailedJobResource and JobBatchesResource in 'jobs' Navigation Group +- place FailedJobResource and JobBatchesResource in 'jobs' Navigation Group ## v0.4.0 - 2022-08-29 -- introduced ability to delete failed jobs or job batches +- introduced ability to delete failed jobs or job batches ## v0.3.2 - 2022-08-29 -- introduced `job_batches` Resource (if the sql table is present) +- introduced `job_batches` Resource (if the sql table is present) ## v0.2.0 - 2022-08-09 -- introduced 'view' ViewAction to see job details as popup -- introduced Bulk Action for Retry -- introduced 'Retry all failed jobs' Button +- introduced 'view' ViewAction to see job details as popup +- introduced Bulk Action for Retry +- introduced 'Retry all failed jobs' Button ## v0.1.0 - 2022-08-09 -- initial release +- initial release diff --git a/_packages/jobs/README.md b/_packages/jobs/README.md index 2cd216d0a..fa716feff 100644 --- a/_packages/jobs/README.md +++ b/_packages/jobs/README.md @@ -1,5 +1,3 @@ - - ![filament-banner](./docs/filament-banner.jpg) # Filament Job Manager @@ -43,13 +41,13 @@ This Laravel package is made for Filament 3 and the awesome TALL-Stack. Install the package via Composer: ```bash -composer require adrolli/filament-job-manager +composer require adrolli/jobs ``` Create the necessary tables: ```bash -php artisan vendor:publish --tag="filament-job-manager-migrations" +php artisan vendor:publish --tag="jobs-migrations" # Queue tables, if using the database driver instead of Redis queue backend php artisan queue:table @@ -62,7 +60,7 @@ php artisan migrate Publish the config file with: ```bash -php artisan vendor:publish --tag="filament-job-manager-config" +php artisan vendor:publish --tag="jobs-config" ``` This is the content of the published config file: @@ -78,7 +76,7 @@ return [ 'navigation_icon' => 'heroicon-o-play', 'navigation_sort' => 1, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\JobsResource::class, + 'resource' => Moox\Jobs\Resources\JobsResource::class, ], 'jobs_waiting' => [ 'enabled' => true, @@ -88,7 +86,7 @@ return [ 'navigation_icon' => 'heroicon-o-pause', 'navigation_sort' => 2, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\WaitingJobsResource::class, + 'resource' => Moox\Jobs\Resources\WaitingJobsResource::class, ], 'failed_jobs' => [ 'enabled' => true, @@ -98,7 +96,7 @@ return [ 'navigation_icon' => 'heroicon-o-exclamation-triangle', 'navigation_sort' => 3, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\FailedJobsResource::class, + 'resource' => Moox\Jobs\Resources\FailedJobsResource::class, ], 'job_batches' => [ 'enabled' => true, @@ -108,7 +106,7 @@ return [ 'navigation_icon' => 'heroicon-o-inbox-stack', 'navigation_sort' => 4, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\JobBatchesResource::class, + 'resource' => Moox\Jobs\Resources\JobBatchesResource::class, ], ], 'pruning' => [ @@ -122,10 +120,10 @@ Register the Plugins in `app/Providers/Filament/AdminPanelProvider.php`: ```php ->plugins([ - FilamentJobsPlugin::make(), - FilamentWaitingJobsPlugin::make(), - FilamentFailedJobsPlugin::make(), - FilamentJobBatchesPlugin::make(), + JobsPlugin::make(), + JobsWaitingPlugin::make(), + JobsFailedPlugin::make(), + JobsBatchesPlugin::make(), ]) ``` @@ -133,7 +131,7 @@ Instead of publishing and modifying the config-file, you can also do all setting ```php ->plugins([ - FilamentJobsPlugin::make() + JobsPlugin::make() ->label('Job runs') ->pluralLabel('Jobs that seems to run') ->enableNavigation(true) @@ -143,7 +141,7 @@ Instead of publishing and modifying the config-file, you can also do all setting ->navigationCountBadge(true) ->enablePruning(true) ->pruningRetention(7), - FilamentWaitingJobsPlugin::make() + JobsWaitingPlugin::make() ->label('Job waiting') ->pluralLabel('Jobs waiting in line') ->enableNavigation(true) @@ -151,7 +149,7 @@ Instead of publishing and modifying the config-file, you can also do all setting ->navigationGroup('My Jobs and Queues') ->navigationSort(5) ->navigationCountBadge(true) - FilamentFailedJobsPlugin::make() + JobsFailedPlugin::make() ->label('Job failed') ->pluralLabel('Jobs that failed hard') ->enableNavigation(true) @@ -182,7 +180,7 @@ You do not need to change anything in your Jobs to work with Filament Job Monito namespace App\Jobs; -use Adrolli\FilamentJobManager\Traits\JobProgress; +use Moox\Jobs\Traits\JobProgress; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -221,9 +219,9 @@ If you would like to prevent certain users from accessing your page, you can reg ```php use App\Policies\JobMonitorPolicy; -use Adrolli\FilamentJobManager\Models\FailedJob; -use Adrolli\FilamentJobManager\Models\JobBatch; -use Adrolli\FilamentJobManager\Models\JobMonitor; +use Moox\Jobs\Models\FailedJob; +use Moox\Jobs\Models\JobBatch; +use Moox\Jobs\Models\JobMonitor; class AuthServiceProvider extends ServiceProvider { diff --git a/_packages/jobs/composer.json b/_packages/jobs/composer.json index 16e37f781..1ab9921be 100644 --- a/_packages/jobs/composer.json +++ b/_packages/jobs/composer.json @@ -1,6 +1,6 @@ { - "name": "adrolli/filament-job-manager", - "description": "A Filament panel for managing job queues including failed jobs and batches.", + "name": "moox/jobs", + "description": "Manage Job Queues, Failed Jobs and Batches in Filament.", "keywords": [ "laravel", "filament", @@ -11,7 +11,7 @@ "monitor", "redis" ], - "homepage": "https://github.com/adrolli/filament-job-manager", + "homepage": "https://github.com/mooxphp/jobs", "license": "MIT", "authors": [ { @@ -29,7 +29,7 @@ "require-dev": {}, "autoload": { "psr-4": { - "Adrolli\\FilamentJobManager\\": "src" + "Moox\\Jobs\\": "src" } }, "config": { @@ -38,11 +38,11 @@ "extra": { "laravel": { "providers": [ - "Adrolli\\FilamentJobManager\\FilamentJobManagerServiceProvider", - "Adrolli\\FilamentJobManager\\JobManagerProvider" + "Moox\\Jobs\\JobsServiceProvider", + "Moox\\Jobs\\JobManagerProvider" ], "aliases": { - "JobMonitor": "Adrolli\\FilamentJobManager\\JobManagerProvider\\Facade" + "JobMonitor": "Moox\\Jobs\\JobManagerProvider\\Facade" } } }, diff --git a/_packages/jobs/config/filament-job-manager.php b/_packages/jobs/config/jobs.php similarity index 80% rename from _packages/jobs/config/filament-job-manager.php rename to _packages/jobs/config/jobs.php index 131354264..c8b7cc1e0 100644 --- a/_packages/jobs/config/filament-job-manager.php +++ b/_packages/jobs/config/jobs.php @@ -10,7 +10,7 @@ 'navigation_icon' => 'heroicon-o-play', 'navigation_sort' => 1, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\JobsResource::class, + 'resource' => Moox\Jobs\Resources\JobsResource::class, ], 'jobs_waiting' => [ 'enabled' => true, @@ -20,7 +20,7 @@ 'navigation_icon' => 'heroicon-o-pause', 'navigation_sort' => 2, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\WaitingJobsResource::class, + 'resource' => Moox\Jobs\Resources\WaitingJobsResource::class, ], 'failed_jobs' => [ 'enabled' => true, @@ -30,7 +30,7 @@ 'navigation_icon' => 'heroicon-o-exclamation-triangle', 'navigation_sort' => 3, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\FailedJobsResource::class, + 'resource' => Moox\Jobs\Resources\FailedJobsResource::class, ], 'job_batches' => [ 'enabled' => true, @@ -40,7 +40,7 @@ 'navigation_icon' => 'heroicon-o-inbox-stack', 'navigation_sort' => 4, 'navigation_count_badge' => true, - 'resource' => Adrolli\FilamentJobManager\Resources\JobBatchesResource::class, + 'resource' => Moox\Jobs\Resources\JobBatchesResource::class, ], ], 'pruning' => [ diff --git a/_packages/jobs/database/migrations/create_filament-job-manager_table.php.stub b/_packages/jobs/database/migrations/create_job_manager_table.php.stub similarity index 99% rename from _packages/jobs/database/migrations/create_filament-job-manager_table.php.stub rename to _packages/jobs/database/migrations/create_job_manager_table.php.stub index c9bb2bd47..1b7916e50 100644 --- a/_packages/jobs/database/migrations/create_filament-job-manager_table.php.stub +++ b/_packages/jobs/database/migrations/create_job_manager_table.php.stub @@ -33,4 +33,4 @@ return new class extends Migration { Schema::dropIfExists('job_manager'); } -}; \ No newline at end of file +}; diff --git a/_packages/jobs/routes/web.php b/_packages/jobs/routes/web.php deleted file mode 100644 index 83210f1b6..000000000 --- a/_packages/jobs/routes/web.php +++ /dev/null @@ -1,11 +0,0 @@ -group(function () { -Route::get('queue/status', [QueueController::class, 'queueStatus']); -Route::get('queue/start', [QueueController::class, 'startQueue']); -Route::get('queue/stop', [QueueController::class, 'stopQueue']); -//}); diff --git a/_packages/jobs/src/Controllers/QueueController.php b/_packages/jobs/src/Controllers/QueueController.php deleted file mode 100644 index 7fdd982c0..000000000 --- a/_packages/jobs/src/Controllers/QueueController.php +++ /dev/null @@ -1,49 +0,0 @@ - true]); - - $this->queueStatus(); - } - - public function stopQueue() - { - // Stop the queue worker - // Find the queue worker process ID - // $pidFilePath = storage_path('app/queue_worker.pid'); - $pidFilePath = base_path('storage/app/queue_worker.pid'); - - $pid = file_get_contents($pidFilePath); - - if ($pid) { - posix_kill($pid, SIGTERM); - - // Wait for the process to exit - while (posix_kill($pid, 0)) { - usleep(100000); // Sleep for 0.1 seconds - } - - $this->info("Queue worker with PID $pid has stopped."); - } else { - $this->info('No queue worker process found.'); - } - - $this->queueStatus(); - } -} diff --git a/_packages/jobs/src/FilamentJobManagerServiceProvider.php b/_packages/jobs/src/FilamentJobManagerServiceProvider.php deleted file mode 100644 index d5f7d3910..000000000 --- a/_packages/jobs/src/FilamentJobManagerServiceProvider.php +++ /dev/null @@ -1,18 +0,0 @@ -name('filament-job-manager') - ->hasConfigFile() - ->hasTranslations() - ->hasMigration('create_filament-job-manager_table') - ->hasRoutes('web'); - } -} diff --git a/_packages/jobs/src/JobManagerProvider.php b/_packages/jobs/src/JobManagerProvider.php index 5bf10381a..d312917ad 100644 --- a/_packages/jobs/src/JobManagerProvider.php +++ b/_packages/jobs/src/JobManagerProvider.php @@ -1,8 +1,7 @@ resource ?? config('filament-job-manager.resources.job_batches.resource'); + return $this->resource ?? config('jobs.resources.job_batches.resource'); } /** @@ -126,7 +126,7 @@ public function resource(string $resource): static */ public function getLabel(): ?string { - return $this->evaluate($this->label) ?? config('filament-job-manager.resources.job_batches.label'); + return $this->evaluate($this->label) ?? config('jobs.resources.job_batches.label'); } /** @@ -144,7 +144,7 @@ public function label(string $label): static */ public function getPluralLabel(): ?string { - return $this->evaluate($this->pluralLabel) ?? config('filament-job-manager.resources.job_batches.plural_label'); + return $this->evaluate($this->pluralLabel) ?? config('jobs.resources.job_batches.plural_label'); } /** @@ -162,7 +162,7 @@ public function pluralLabel(string $pluralLabel): static */ public function getNavigationGroup(): ?string { - return $this->navigationGroup ?? config('filament-job-manager.resources.job_batches.navigation_group'); + return $this->navigationGroup ?? config('jobs.resources.job_batches.navigation_group'); } /** @@ -180,7 +180,7 @@ public function navigationGroup(string $navigationGroup): static */ public function getNavigationIcon(): ?string { - return $this->navigationIcon ?? config('filament-job-manager.resources.job_batches.navigation_icon'); + return $this->navigationIcon ?? config('jobs.resources.job_batches.navigation_icon'); } /** @@ -198,7 +198,7 @@ public function navigationIcon(string $navigationIcon): static */ public function getNavigationSort(): ?int { - return $this->navigationSort ?? config('filament-job-manager.resources.job_batches.navigation_sort'); + return $this->navigationSort ?? config('jobs.resources.job_batches.navigation_sort'); } /** @@ -216,7 +216,7 @@ public function navigationSort(int $navigationSort): static */ public function getNavigationCountBadge(): ?bool { - return $this->navigationCountBadge ?? config('filament-job-manager.resources.job_batches.navigation_count_badge'); + return $this->navigationCountBadge ?? config('jobs.resources.job_batches.navigation_count_badge'); } /** @@ -234,7 +234,7 @@ public function navigationCountBadge(bool $navigationCountBadge = true): static */ public function shouldRegisterNavigation(): bool { - return $this->navigation ?? config('filament-job-manager.resources.job_batches.enabled'); + return $this->navigation ?? config('jobs.resources.job_batches.enabled'); } /** @@ -288,6 +288,6 @@ public function pruningRetention(int $pruningRetention): static */ public function getBreadcrumb(): string { - return __('filament-job-manager::translations.breadcrumb'); + return __('jobs::translations.breadcrumb'); } } diff --git a/_packages/jobs/src/FilamentFailedJobsPlugin.php b/_packages/jobs/src/JobsFailedPlugin.php similarity index 80% rename from _packages/jobs/src/FilamentFailedJobsPlugin.php rename to _packages/jobs/src/JobsFailedPlugin.php index 6da220638..75a764163 100644 --- a/_packages/jobs/src/FilamentFailedJobsPlugin.php +++ b/_packages/jobs/src/JobsFailedPlugin.php @@ -1,13 +1,13 @@ resource ?? config('filament-job-manager.resources.failed_jobs.resource'); + return $this->resource ?? config('jobs.resources.failed_jobs.resource'); } /** @@ -126,7 +126,7 @@ public function resource(string $resource): static */ public function getLabel(): ?string { - return $this->evaluate($this->label) ?? config('filament-job-manager.resources.failed_jobs.label'); + return $this->evaluate($this->label) ?? config('jobs.resources.failed_jobs.label'); } /** @@ -144,7 +144,7 @@ public function label(string $label): static */ public function getPluralLabel(): ?string { - return $this->evaluate($this->pluralLabel) ?? config('filament-job-manager.resources.failed_jobs.plural_label'); + return $this->evaluate($this->pluralLabel) ?? config('jobs.resources.failed_jobs.plural_label'); } /** @@ -162,7 +162,7 @@ public function pluralLabel(string $pluralLabel): static */ public function getNavigationGroup(): ?string { - return $this->navigationGroup ?? config('filament-job-manager.resources.failed_jobs.navigation_group'); + return $this->navigationGroup ?? config('jobs.resources.failed_jobs.navigation_group'); } /** @@ -180,7 +180,7 @@ public function navigationGroup(string $navigationGroup): static */ public function getNavigationIcon(): ?string { - return $this->navigationIcon ?? config('filament-job-manager.resources.failed_jobs.navigation_icon'); + return $this->navigationIcon ?? config('jobs.resources.failed_jobs.navigation_icon'); } /** @@ -198,7 +198,7 @@ public function navigationIcon(string $navigationIcon): static */ public function getNavigationSort(): ?int { - return $this->navigationSort ?? config('filament-job-manager.resources.failed_jobs.navigation_sort'); + return $this->navigationSort ?? config('jobs.resources.failed_jobs.navigation_sort'); } /** @@ -216,7 +216,7 @@ public function navigationSort(int $navigationSort): static */ public function getNavigationCountBadge(): ?bool { - return $this->navigationCountBadge ?? config('filament-job-manager.resources.failed_jobs.navigation_count_badge'); + return $this->navigationCountBadge ?? config('jobs.resources.failed_jobs.navigation_count_badge'); } /** @@ -234,7 +234,7 @@ public function navigationCountBadge(bool $navigationCountBadge = true): static */ public function shouldRegisterNavigation(): bool { - return $this->navigation ?? config('filament-job-manager.resources.failed_jobs.enabled'); + return $this->navigation ?? config('jobs.resources.failed_jobs.enabled'); } /** @@ -252,7 +252,7 @@ public function enableNavigation(bool $status = true): static */ public function getPruning(): ?bool { - return $this->pruning ?? config('filament-job-manager.pruning.enabled'); + return $this->pruning ?? config('jobs.pruning.enabled'); } /** @@ -270,7 +270,7 @@ public function enablePruning(bool $status = true): static */ public function getPruningRetention(): ?int { - return $this->pruningRetention ?? config('filament-job-manager.pruning.retention_days'); + return $this->pruningRetention ?? config('jobs.pruning.retention_days'); } /** @@ -288,6 +288,6 @@ public function pruningRetention(int $pruningRetention): static */ public function getBreadcrumb(): string { - return __('filament-job-manager::translations.breadcrumb'); + return __('jobs::translations.breadcrumb'); } } diff --git a/_packages/jobs/src/FilamentJobsPlugin.php b/_packages/jobs/src/JobsPlugin.php similarity index 84% rename from _packages/jobs/src/FilamentJobsPlugin.php rename to _packages/jobs/src/JobsPlugin.php index 31e8029aa..4413b8fb9 100644 --- a/_packages/jobs/src/FilamentJobsPlugin.php +++ b/_packages/jobs/src/JobsPlugin.php @@ -1,13 +1,13 @@ resource ?? config('filament-job-manager.resources.jobs.resource'); + return $this->resource ?? config('jobs.resources.jobs.resource'); } /** @@ -126,7 +126,7 @@ public function resource(string $resource): static */ public function getLabel(): ?string { - return $this->evaluate($this->label) ?? config('filament-job-manager.resources.jobs.label'); + return $this->evaluate($this->label) ?? config('jobs.resources.jobs.label'); } /** @@ -144,7 +144,7 @@ public function label(string $label): static */ public function getPluralLabel(): ?string { - return $this->evaluate($this->pluralLabel) ?? config('filament-job-manager.resources.jobs.plural_label'); + return $this->evaluate($this->pluralLabel) ?? config('jobs.resources.jobs.plural_label'); } /** @@ -162,7 +162,7 @@ public function pluralLabel(string $pluralLabel): static */ public function getNavigationGroup(): ?string { - return $this->navigationGroup ?? config('filament-job-manager.resources.jobs.navigation_group'); + return $this->navigationGroup ?? config('jobs.resources.jobs.navigation_group'); } /** @@ -180,7 +180,7 @@ public function navigationGroup(string $navigationGroup): static */ public function getNavigationIcon(): ?string { - return $this->navigationIcon ?? config('filament-job-manager.resources.jobs.navigation_icon'); + return $this->navigationIcon ?? config('jobs.resources.jobs.navigation_icon'); } /** @@ -198,7 +198,7 @@ public function navigationIcon(string $navigationIcon): static */ public function getNavigationSort(): ?int { - return $this->navigationSort ?? config('filament-job-manager.resources.jobs.navigation_sort'); + return $this->navigationSort ?? config('jobs.resources.jobs.navigation_sort'); } /** @@ -216,7 +216,7 @@ public function navigationSort(int $navigationSort): static */ public function getNavigationCountBadge(): ?bool { - return $this->navigationCountBadge ?? config('filament-job-manager.resources.jobs.navigation_count_badge'); + return $this->navigationCountBadge ?? config('jobs.resources.jobs.navigation_count_badge'); } /** @@ -234,7 +234,7 @@ public function navigationCountBadge(bool $navigationCountBadge = true): static */ public function shouldRegisterNavigation(): bool { - return $this->navigation ?? config('filament-job-manager.resources.jobs.enabled'); + return $this->navigation ?? config('jobs.resources.jobs.enabled'); } /** @@ -288,6 +288,6 @@ public function pruningRetention(int $pruningRetention): static */ public function getBreadcrumb(): string { - return __('filament-job-manager::translations.breadcrumb'); + return __('jobs::translations.breadcrumb'); } } diff --git a/_packages/jobs/src/JobsServiceProvider.php b/_packages/jobs/src/JobsServiceProvider.php new file mode 100644 index 000000000..720622c9b --- /dev/null +++ b/_packages/jobs/src/JobsServiceProvider.php @@ -0,0 +1,17 @@ +name('jobs') + ->hasConfigFile() + ->hasTranslations() + ->hasMigration('create_job_manager_table'); + } +} diff --git a/_packages/jobs/src/FilamentWaitingJobsPlugin.php b/_packages/jobs/src/JobsWaitingPlugin.php similarity index 83% rename from _packages/jobs/src/FilamentWaitingJobsPlugin.php rename to _packages/jobs/src/JobsWaitingPlugin.php index 2920df312..2a699aa97 100644 --- a/_packages/jobs/src/FilamentWaitingJobsPlugin.php +++ b/_packages/jobs/src/JobsWaitingPlugin.php @@ -1,13 +1,13 @@ resource ?? config('filament-job-manager.resources.jobs_waiting.resource'); + return $this->resource ?? config('jobs.resources.jobs_waiting.resource'); } /** @@ -126,7 +126,7 @@ public function resource(string $resource): static */ public function getLabel(): ?string { - return $this->evaluate($this->label) ?? config('filament-job-manager.resources.jobs_waiting.label'); + return $this->evaluate($this->label) ?? config('jobs.resources.jobs_waiting.label'); } /** @@ -144,7 +144,7 @@ public function label(string $label): static */ public function getPluralLabel(): ?string { - return $this->evaluate($this->pluralLabel) ?? config('filament-job-manager.resources.jobs_waiting.plural_label'); + return $this->evaluate($this->pluralLabel) ?? config('jobs.resources.jobs_waiting.plural_label'); } /** @@ -162,7 +162,7 @@ public function pluralLabel(string $pluralLabel): static */ public function getNavigationGroup(): ?string { - return $this->navigationGroup ?? config('filament-job-manager.resources.jobs_waiting.navigation_group'); + return $this->navigationGroup ?? config('jobs.resources.jobs_waiting.navigation_group'); } /** @@ -180,7 +180,7 @@ public function navigationGroup(string $navigationGroup): static */ public function getNavigationIcon(): ?string { - return $this->navigationIcon ?? config('filament-job-manager.resources.jobs_waiting.navigation_icon'); + return $this->navigationIcon ?? config('jobs.resources.jobs_waiting.navigation_icon'); } /** @@ -198,7 +198,7 @@ public function navigationIcon(string $navigationIcon): static */ public function getNavigationSort(): ?int { - return $this->navigationSort ?? config('filament-job-manager.resources.jobs_waiting.navigation_sort'); + return $this->navigationSort ?? config('jobs.resources.jobs_waiting.navigation_sort'); } /** @@ -216,7 +216,7 @@ public function navigationSort(int $navigationSort): static */ public function getNavigationCountBadge(): ?bool { - return $this->navigationCountBadge ?? config('filament-job-manager.resources.jobs_waiting.navigation_count_badge'); + return $this->navigationCountBadge ?? config('jobs.resources.jobs_waiting.navigation_count_badge'); } /** @@ -234,7 +234,7 @@ public function navigationCountBadge(bool $navigationCountBadge = true): static */ public function shouldRegisterNavigation(): bool { - return $this->navigation ?? config('filament-job-manager.resources.jobs_waiting.enabled'); + return $this->navigation ?? config('jobs.resources.jobs_waiting.enabled'); } /** @@ -288,6 +288,6 @@ public function pruningRetention(int $pruningRetention): static */ public function getBreadcrumb(): string { - return __('filament-job-manager::translations.breadcrumb'); + return __('jobs::translations.breadcrumb'); } } diff --git a/_packages/jobs/src/Models/FailedJob.php b/_packages/jobs/src/Models/FailedJob.php index ccb324608..adc8219df 100644 --- a/_packages/jobs/src/Models/FailedJob.php +++ b/_packages/jobs/src/Models/FailedJob.php @@ -1,6 +1,6 @@ subDays(config('filament-job-manager.pruning.retention_days'))); + if (config('jobs.pruning.activate')) { + return static::where('created_at', '<=', now()->subDays(config('jobs.pruning.retention_days'))); } return false; diff --git a/_packages/jobs/src/Resources/FailedJobsResource.php b/_packages/jobs/src/Resources/FailedJobsResource.php index 4d7fad573..dabd4bf3e 100644 --- a/_packages/jobs/src/Resources/FailedJobsResource.php +++ b/_packages/jobs/src/Resources/FailedJobsResource.php @@ -1,10 +1,7 @@ getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; + return JobsFailedPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; } public static function getModelLabel(): string { - return FilamentFailedJobsPlugin::get()->getLabel(); + return JobsFailedPlugin::get()->getLabel(); } public static function getPluralModelLabel(): string { - return FilamentFailedJobsPlugin::get()->getPluralLabel(); + return JobsFailedPlugin::get()->getPluralLabel(); } public static function getNavigationLabel(): string @@ -47,27 +47,27 @@ public static function getNavigationLabel(): string public static function getNavigationGroup(): ?string { - return FilamentFailedJobsPlugin::get()->getNavigationGroup(); + return JobsFailedPlugin::get()->getNavigationGroup(); } public static function getNavigationSort(): ?int { - return FilamentFailedJobsPlugin::get()->getNavigationSort(); + return JobsFailedPlugin::get()->getNavigationSort(); } public static function getBreadcrumb(): string { - return FilamentFailedJobsPlugin::get()->getBreadcrumb(); + return JobsFailedPlugin::get()->getBreadcrumb(); } public static function shouldRegisterNavigation(): bool { - return FilamentFailedJobsPlugin::get()->shouldRegisterNavigation(); + return JobsFailedPlugin::get()->shouldRegisterNavigation(); } public static function getNavigationIcon(): string { - return FilamentFailedJobsPlugin::get()->getNavigationIcon(); + return JobsFailedPlugin::get()->getNavigationIcon(); } public static function form(Form $form): Form diff --git a/_packages/jobs/src/Resources/FailedJobsResource/Pages/ListFailedJobs.php b/_packages/jobs/src/Resources/FailedJobsResource/Pages/ListFailedJobs.php index e8f6cd13c..dee2a5950 100644 --- a/_packages/jobs/src/Resources/FailedJobsResource/Pages/ListFailedJobs.php +++ b/_packages/jobs/src/Resources/FailedJobsResource/Pages/ListFailedJobs.php @@ -1,13 +1,13 @@ getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; + return JobsBatchesPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; } public static function getModelLabel(): string { - return FilamentJobBatchesPlugin::get()->getLabel(); + return JobsBatchesPlugin::get()->getLabel(); } public static function getPluralModelLabel(): string { - return FilamentJobBatchesPlugin::get()->getPluralLabel(); + return JobsBatchesPlugin::get()->getPluralLabel(); } public static function getNavigationLabel(): string @@ -37,27 +37,27 @@ public static function getNavigationLabel(): string public static function getNavigationGroup(): ?string { - return FilamentJobBatchesPlugin::get()->getNavigationGroup(); + return JobsBatchesPlugin::get()->getNavigationGroup(); } public static function getNavigationSort(): ?int { - return FilamentJobBatchesPlugin::get()->getNavigationSort(); + return JobsBatchesPlugin::get()->getNavigationSort(); } public static function getBreadcrumb(): string { - return FilamentJobBatchesPlugin::get()->getBreadcrumb(); + return JobsBatchesPlugin::get()->getBreadcrumb(); } public static function shouldRegisterNavigation(): bool { - return FilamentJobBatchesPlugin::get()->shouldRegisterNavigation(); + return JobsBatchesPlugin::get()->shouldRegisterNavigation(); } public static function getNavigationIcon(): string { - return FilamentJobBatchesPlugin::get()->getNavigationIcon(); + return JobsBatchesPlugin::get()->getNavigationIcon(); } public static function table(Table $table): Table diff --git a/_packages/jobs/src/Resources/JobBatchesResource/Pages/ListJobBatches.php b/_packages/jobs/src/Resources/JobBatchesResource/Pages/ListJobBatches.php index 92d674508..e332465cb 100644 --- a/_packages/jobs/src/Resources/JobBatchesResource/Pages/ListJobBatches.php +++ b/_packages/jobs/src/Resources/JobBatchesResource/Pages/ListJobBatches.php @@ -1,12 +1,12 @@ columns([ TextColumn::make('status') ->badge() - ->label(__('filament-job-manager::translations.status')) + ->label(__('jobs::translations.status')) ->sortable() - ->formatStateUsing(fn (string $state): string => __("filament-job-manager::translations.{$state}")) + ->formatStateUsing(fn (string $state): string => __("jobs::translations.{$state}")) ->color(fn (string $state): string => match ($state) { 'running' => 'primary', 'succeeded' => 'success', 'failed' => 'danger', }), TextColumn::make('name') - ->label(__('filament-job-manager::translations.name')) + ->label(__('jobs::translations.name')) ->sortable(), TextColumn::make('queue') - ->label(__('filament-job-manager::translations.queue')) + ->label(__('jobs::translations.queue')) ->sortable(), TextColumn::make('progress') - ->label(__('filament-job-manager::translations.progress')) + ->label(__('jobs::translations.progress')) ->formatStateUsing(fn (string $state) => "{$state}%") ->sortable(), - // ProgressColumn::make('progress')->label(__('filament-job-manager::translations.progress'))->color('warning'), + // ProgressColumn::make('progress')->label(__('jobs::translations.progress'))->color('warning'), TextColumn::make('started_at') - ->label(__('filament-job-manager::translations.started_at')) + ->label(__('jobs::translations.started_at')) ->since() ->sortable(), ]) @@ -104,17 +104,17 @@ public static function getWidgets(): array public static function getNavigationBadge(): ?string { - return FilamentJobsPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; + return JobsPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; } public static function getModelLabel(): string { - return FilamentJobsPlugin::get()->getLabel(); + return JobsPlugin::get()->getLabel(); } public static function getPluralModelLabel(): string { - return FilamentJobsPlugin::get()->getPluralLabel(); + return JobsPlugin::get()->getPluralLabel(); } public static function getNavigationLabel(): string @@ -124,26 +124,26 @@ public static function getNavigationLabel(): string public static function getNavigationGroup(): ?string { - return FilamentJobsPlugin::get()->getNavigationGroup(); + return JobsPlugin::get()->getNavigationGroup(); } public static function getNavigationSort(): ?int { - return FilamentJobsPlugin::get()->getNavigationSort(); + return JobsPlugin::get()->getNavigationSort(); } public static function getBreadcrumb(): string { - return FilamentJobsPlugin::get()->getBreadcrumb(); + return JobsPlugin::get()->getBreadcrumb(); } public static function shouldRegisterNavigation(): bool { - return FilamentJobsPlugin::get()->shouldRegisterNavigation(); + return JobsPlugin::get()->shouldRegisterNavigation(); } public static function getNavigationIcon(): string { - return FilamentJobsPlugin::get()->getNavigationIcon(); + return JobsPlugin::get()->getNavigationIcon(); } } diff --git a/_packages/jobs/src/Resources/JobsResource/Pages/ListJobs.php b/_packages/jobs/src/Resources/JobsResource/Pages/ListJobs.php index 1c85ba4eb..fceded25d 100644 --- a/_packages/jobs/src/Resources/JobsResource/Pages/ListJobs.php +++ b/_packages/jobs/src/Resources/JobsResource/Pages/ListJobs.php @@ -1,10 +1,10 @@ first(); return [ - Stat::make(__('filament-job-manager::translations.total_jobs'), $aggregatedInfo->count ?? 0), - Stat::make(__('filament-job-manager::translations.execution_time'), ($this->formatSeconds($aggregatedInfo->total_time_elapsed ?? 0) ?? '0 s')), - Stat::make(__('filament-job-manager::translations.average_time'), ceil((float) $aggregatedInfo->average_time_elapsed).'s' ?? 0), + Stat::make(__('jobs::translations.total_jobs'), $aggregatedInfo->count ?? 0), + Stat::make(__('jobs::translations.execution_time'), ($this->formatSeconds($aggregatedInfo->total_time_elapsed ?? 0) ?? '0 s')), + Stat::make(__('jobs::translations.average_time'), ceil((float) $aggregatedInfo->average_time_elapsed).'s' ?? 0), ]; } } diff --git a/_packages/jobs/src/Resources/WaitingJobsResource.php b/_packages/jobs/src/Resources/WaitingJobsResource.php index 518035219..2323cbe8d 100644 --- a/_packages/jobs/src/Resources/WaitingJobsResource.php +++ b/_packages/jobs/src/Resources/WaitingJobsResource.php @@ -1,11 +1,7 @@ columns([ TextColumn::make('status') ->badge() - ->label(__('filament-job-manager::translations.status')) + ->label(__('jobs::translations.status')) ->sortable() - ->formatStateUsing(fn (string $state): string => __("filament-job-manager::translations.{$state}")) + ->formatStateUsing(fn (string $state): string => __("jobs::translations.{$state}")) ->color(fn (string $state): string => match ($state) { 'running' => 'primary', 'waiting' => 'success', 'failed' => 'danger', }), TextColumn::make('display_name') - ->label(__('filament-job-manager::translations.name')) + ->label(__('jobs::translations.name')) ->sortable(), TextColumn::make('queue') - ->label(__('filament-job-manager::translations.queue')) + ->label(__('jobs::translations.queue')) ->sortable(), TextColumn::make('attempts') - ->label(__('filament-job-manager::translations.attempts')) + ->label(__('jobs::translations.attempts')) ->sortable(), TextColumn::make('reserved_at') - ->label(__('filament-job-manager::translations.created_at')) + ->label(__('jobs::translations.created_at')) ->since() ->sortable(), TextColumn::make('created_at') - ->label(__('filament-job-manager::translations.created_at')) + ->label(__('jobs::translations.created_at')) ->since() ->sortable(), ]) @@ -104,17 +104,17 @@ public static function getWidgets(): array public static function getNavigationBadge(): ?string { - return FilamentWaitingJobsPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; + return JobsWaitingPlugin::get()->getNavigationCountBadge() ? number_format(static::getModel()::count()) : null; } public static function getModelLabel(): string { - return FilamentWaitingJobsPlugin::get()->getLabel(); + return JobsWaitingPlugin::get()->getLabel(); } public static function getPluralModelLabel(): string { - return FilamentWaitingJobsPlugin::get()->getPluralLabel(); + return JobsWaitingPlugin::get()->getPluralLabel(); } public static function getNavigationLabel(): string @@ -124,26 +124,26 @@ public static function getNavigationLabel(): string public static function getNavigationGroup(): ?string { - return FilamentWaitingJobsPlugin::get()->getNavigationGroup(); + return JobsWaitingPlugin::get()->getNavigationGroup(); } public static function getNavigationSort(): ?int { - return FilamentWaitingJobsPlugin::get()->getNavigationSort(); + return JobsWaitingPlugin::get()->getNavigationSort(); } public static function getBreadcrumb(): string { - return FilamentWaitingJobsPlugin::get()->getBreadcrumb(); + return JobsWaitingPlugin::get()->getBreadcrumb(); } public static function shouldRegisterNavigation(): bool { - return FilamentWaitingJobsPlugin::get()->shouldRegisterNavigation(); + return JobsWaitingPlugin::get()->shouldRegisterNavigation(); } public static function getNavigationIcon(): string { - return FilamentWaitingJobsPlugin::get()->getNavigationIcon(); + return JobsWaitingPlugin::get()->getNavigationIcon(); } } diff --git a/_packages/jobs/src/Resources/WaitingJobsResource/Pages/ListJobsWaiting.php b/_packages/jobs/src/Resources/WaitingJobsResource/Pages/ListJobsWaiting.php index aeab91bba..e0203490c 100644 --- a/_packages/jobs/src/Resources/WaitingJobsResource/Pages/ListJobsWaiting.php +++ b/_packages/jobs/src/Resources/WaitingJobsResource/Pages/ListJobsWaiting.php @@ -1,10 +1,10 @@ first(); return [ - Stat::make(__('filament-job-manager::translations.waiting_jobs'), $jobsWaiting->count ?? 0), - Stat::make(__('filament-job-manager::translations.execution_time'), ($this->formatSeconds($aggregatedInfo->total_time_elapsed) ?? '0 s')), - Stat::make(__('filament-job-manager::translations.average_time'), ceil((float) $aggregatedInfo->average_time_elapsed).'s' ?? 0), + Stat::make(__('jobs::translations.waiting_jobs'), $jobsWaiting->count ?? 0), + Stat::make(__('jobs::translations.execution_time'), ($this->formatSeconds($aggregatedInfo->total_time_elapsed) ?? '0 s')), + Stat::make(__('jobs::translations.average_time'), ceil((float) $aggregatedInfo->average_time_elapsed).'s' ?? 0), ]; } } diff --git a/_packages/jobs/src/Traits/FormatSeconds.php b/_packages/jobs/src/Traits/FormatSeconds.php index 2536145ca..e219d3207 100644 --- a/_packages/jobs/src/Traits/FormatSeconds.php +++ b/_packages/jobs/src/Traits/FormatSeconds.php @@ -1,6 +1,6 @@ plugins([ - BuilderPlugin::make(), + // BuilderPlugin::make(), + JobsPlugin::make(), + JobsWaitingPlugin::make(), + JobsFailedPlugin::make(), + JobsBatchesPlugin::make(), ]); } } diff --git a/composer.json b/composer.json index d5165c601..7b61f24c3 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,10 @@ { "type": "path", "url": "_other/builder" + }, + { + "type": "path", + "url": "_packages/jobs" } ], "license": "MIT", @@ -27,8 +31,9 @@ "laravel/framework": "^10.0", "laravel/tinker": "^2.8", "livewire/livewire": "^3.0", - "wikimedia/composer-merge-plugin": "^2.1", - "moox/builder": "*" + "moox/builder": "*", + "moox/jobs": "*", + "wikimedia/composer-merge-plugin": "^2.1" }, "require-dev": { "fakerphp/faker": "^1.23.1", diff --git a/composer.lock b/composer.lock index 12b3a2e6b..2be2c5526 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "462cffd1ab100f431795c82593be5fee", + "content-hash": "2da639b6297b14cb04ca9db509b754a8", "packages": [ { "name": "blade-ui-kit/blade-heroicons", @@ -1102,16 +1102,16 @@ }, { "name": "filament/actions", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "9fa7c1d94db998d71dd1c2afc0443dd92de3e29f" + "reference": "14b89222a5de0c987fdde16797fa0cadf6b62d99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/9fa7c1d94db998d71dd1c2afc0443dd92de3e29f", - "reference": "9fa7c1d94db998d71dd1c2afc0443dd92de3e29f", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/14b89222a5de0c987fdde16797fa0cadf6b62d99", + "reference": "14b89222a5de0c987fdde16797fa0cadf6b62d99", "shasum": "" }, "require": { @@ -1149,20 +1149,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-05T13:29:08+00:00" + "time": "2023-12-07T12:32:28+00:00" }, { "name": "filament/filament", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "f98febc72564b8d180a345ea919b29601f953229" + "reference": "afe0c3316db11cdabfc2b12e201b7999d1146029" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/f98febc72564b8d180a345ea919b29601f953229", - "reference": "f98febc72564b8d180a345ea919b29601f953229", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/afe0c3316db11cdabfc2b12e201b7999d1146029", + "reference": "afe0c3316db11cdabfc2b12e201b7999d1146029", "shasum": "" }, "require": { @@ -1214,20 +1214,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-06T13:27:30+00:00" + "time": "2023-12-07T12:32:31+00:00" }, { "name": "filament/forms", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "f17e0810499613cb86c5b9359db97651e39445ae" + "reference": "56c3f923784b45f59b58ac76ce98ec044f4a106f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/f17e0810499613cb86c5b9359db97651e39445ae", - "reference": "f17e0810499613cb86c5b9359db97651e39445ae", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/56c3f923784b45f59b58ac76ce98ec044f4a106f", + "reference": "56c3f923784b45f59b58ac76ce98ec044f4a106f", "shasum": "" }, "require": { @@ -1270,20 +1270,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-06T15:58:44+00:00" + "time": "2023-12-07T12:32:31+00:00" }, { "name": "filament/infolists", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "719ba0d5995575750dd011185241b1a908295eb6" + "reference": "00798e2aa59602e9dc85f56d5d1743d16842125f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/719ba0d5995575750dd011185241b1a908295eb6", - "reference": "719ba0d5995575750dd011185241b1a908295eb6", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/00798e2aa59602e9dc85f56d5d1743d16842125f", + "reference": "00798e2aa59602e9dc85f56d5d1743d16842125f", "shasum": "" }, "require": { @@ -1321,20 +1321,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-05T13:29:06+00:00" + "time": "2023-12-07T12:32:29+00:00" }, { "name": "filament/notifications", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "b0a917a041bee3819a3b58c543d82ba463ffb20c" + "reference": "13029b0f257ce9f0f9691b5fe8de933c581d03bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/b0a917a041bee3819a3b58c543d82ba463ffb20c", - "reference": "b0a917a041bee3819a3b58c543d82ba463ffb20c", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/13029b0f257ce9f0f9691b5fe8de933c581d03bc", + "reference": "13029b0f257ce9f0f9691b5fe8de933c581d03bc", "shasum": "" }, "require": { @@ -1373,11 +1373,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-02T22:24:00+00:00" + "time": "2023-12-07T12:32:30+00:00" }, { "name": "filament/support", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", @@ -1434,16 +1434,16 @@ }, { "name": "filament/tables", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "03fa12c2824a0031e02000c3efb3fa01c33df09d" + "reference": "e595f934dcbc9c227c76f35a719291b94fd8fa28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/03fa12c2824a0031e02000c3efb3fa01c33df09d", - "reference": "03fa12c2824a0031e02000c3efb3fa01c33df09d", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/e595f934dcbc9c227c76f35a719291b94fd8fa28", + "reference": "e595f934dcbc9c227c76f35a719291b94fd8fa28", "shasum": "" }, "require": { @@ -1483,11 +1483,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-12-06T15:59:04+00:00" + "time": "2023-12-07T12:32:45+00:00" }, { "name": "filament/widgets", - "version": "v3.1.14", + "version": "v3.1.15", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -2073,18 +2073,92 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "invaders-xx/filament-jsoneditor", + "version": "3.1", + "source": { + "type": "git", + "url": "https://github.com/invaders-xx/filament-jsoneditor.git", + "reference": "d34e5ec15acb4dd217d74b1d00eaa11bec4f6183" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/invaders-xx/filament-jsoneditor/zipball/d34e5ec15acb4dd217d74b1d00eaa11bec4f6183", + "reference": "d34e5ec15acb4dd217d74b1d00eaa11bec4f6183", + "shasum": "" + }, + "require": { + "filament/filament": "^3.0", + "illuminate/contracts": "^8.74|^9.0|^10.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9.2" + }, + "require-dev": { + "nunomaduro/collision": "^6.0", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^7.0", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-laravel": "^1.1", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "InvadersXX\\FilamentJsoneditor\\FilamentJsoneditorServiceProvider" + ], + "aliases": { + "FilamentJsoneditor": "InvadersXX\\FilamentJsoneditor\\Facades\\FilamentJsoneditor" + } + } + }, + "autoload": { + "psr-4": { + "InvadersXX\\FilamentJsoneditor\\": "src", + "InvadersXX\\FilamentJsoneditor\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Vincent", + "email": "envahisseur@gmail.com", + "role": "Owner" + } + ], + "description": "Filament's JSON Editor input", + "homepage": "https://github.com/invaders-xx/filament-jsoneditor", + "keywords": [ + "filament-jsoneditor", + "invaders-xx", + "jsoneditor", + "laravel" + ], + "support": { + "issues": "https://github.com/invaders-xx/filament-jsoneditor/issues", + "source": "https://github.com/invaders-xx/filament-jsoneditor/tree/3.1" + }, + "time": "2023-11-13T12:11:14+00:00" + }, { "name": "kirschbaum-development/eloquent-power-joins", - "version": "3.3.3", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", - "reference": "e55fa70dfa4a5e897443454825b9d4ce6081786a" + "reference": "9238fcb53d777265ee9d8d139810e2cadecde079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/e55fa70dfa4a5e897443454825b9d4ce6081786a", - "reference": "e55fa70dfa4a5e897443454825b9d4ce6081786a", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/9238fcb53d777265ee9d8d139810e2cadecde079", + "reference": "9238fcb53d777265ee9d8d139810e2cadecde079", "shasum": "" }, "require": { @@ -2131,9 +2205,9 @@ ], "support": { "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", - "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.3.3" + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.4.0" }, - "time": "2023-10-31T18:01:18+00:00" + "time": "2023-12-07T10:44:41+00:00" }, { "name": "laravel/framework", @@ -3427,7 +3501,7 @@ "dist": { "type": "path", "url": "_other/builder", - "reference": "494d838fee6f7f85448cbcfe9badf0de6e7ab274" + "reference": "6ea60582942a1a7f03ac7200ec77c3ebb14b3fa6" }, "require": { "filament/filament": "^3.0", @@ -3457,7 +3531,7 @@ } ], "description": "This template is used for generating all Moox packages.", - "homepage": "https://github.com/mooxphp/", + "homepage": "https://moox.org/", "keywords": [ "Filament", "Filament plugin", @@ -3468,6 +3542,63 @@ "relative": true } }, + { + "name": "moox/jobs", + "version": "dev-main", + "dist": { + "type": "path", + "url": "_packages/jobs", + "reference": "28c2c4062e3c1574eedde080bfffb7c1768ab6ac" + }, + "require": { + "filament/filament": "^3.0", + "invaders-xx/filament-jsoneditor": "^3.0", + "php": "^8.0.2", + "spatie/laravel-package-tools": "^1.9.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Moox\\Jobs\\JobsServiceProvider", + "Moox\\Jobs\\JobManagerProvider" + ], + "aliases": { + "JobMonitor": "Moox\\Jobs\\JobManagerProvider\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Moox\\Jobs\\": "src" + } + }, + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alf Drollinger", + "email": "alf@drollinger.info", + "role": "Developer" + } + ], + "description": "Manage Job Queues, Failed Jobs and Batches in Filament.", + "homepage": "https://github.com/mooxphp/jobs", + "keywords": [ + "batches", + "failed-jobs", + "filament", + "jobs", + "laravel", + "monitor", + "queues", + "redis" + ], + "transport-options": { + "relative": true + } + }, { "name": "nesbot/carbon", "version": "2.72.0", @@ -12384,5 +12515,5 @@ "php": "^8.2" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php deleted file mode 100644 index f56e5c64f..000000000 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ /dev/null @@ -1,34 +0,0 @@ -id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->foreignId('current_team_id')->nullable(); - $table->string('profile_photo_path', 2048)->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('users'); - } -}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php deleted file mode 100644 index fcacb80b3..000000000 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ /dev/null @@ -1,32 +0,0 @@ -string('email')->index(); - $table->string('token'); - $table->timestamp('created_at')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('password_resets'); - } -}; diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php deleted file mode 100644 index e828ad818..000000000 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ /dev/null @@ -1,33 +0,0 @@ -id(); - $table->morphs('tokenable'); - $table->string('name'); - $table->string('token', 64)->unique(); - $table->text('abilities')->nullable(); - $table->timestamp('last_used_at')->nullable(); - $table->timestamp('expires_at')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('personal_access_tokens'); - } -}; diff --git a/database/migrations/2020_05_21_100000_create_teams_table.php b/database/migrations/2020_05_21_100000_create_teams_table.php deleted file mode 100644 index 3e1b8bab4..000000000 --- a/database/migrations/2020_05_21_100000_create_teams_table.php +++ /dev/null @@ -1,30 +0,0 @@ -id(); - $table->foreignId('user_id')->index(); - $table->string('name'); - $table->boolean('personal_team'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('teams'); - } -}; diff --git a/database/migrations/2020_05_21_200000_create_team_user_table.php b/database/migrations/2020_05_21_200000_create_team_user_table.php deleted file mode 100644 index 3e2787630..000000000 --- a/database/migrations/2020_05_21_200000_create_team_user_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignId('team_id'); - $table->foreignId('user_id'); - $table->string('role')->nullable(); - $table->timestamps(); - - $table->unique(['team_id', 'user_id']); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('team_user'); - } -}; diff --git a/database/migrations/2020_05_21_300000_create_team_invitations_table.php b/database/migrations/2020_05_21_300000_create_team_invitations_table.php deleted file mode 100644 index d59cd113f..000000000 --- a/database/migrations/2020_05_21_300000_create_team_invitations_table.php +++ /dev/null @@ -1,32 +0,0 @@ -id(); - $table->foreignId('team_id')->constrained()->cascadeOnDelete(); - $table->string('email'); - $table->string('role')->nullable(); - $table->timestamps(); - - $table->unique(['team_id', 'email']); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('team_invitations'); - } -}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2023_12_07_135326_create_failed_jobs_table.php similarity index 86% rename from database/migrations/2019_08_19_000000_create_failed_jobs_table.php rename to database/migrations/2023_12_07_135326_create_failed_jobs_table.php index 17191986b..249da8171 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2023_12_07_135326_create_failed_jobs_table.php @@ -8,10 +8,8 @@ { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { $table->id(); @@ -26,10 +24,8 @@ public function up() /** * Reverse the migrations. - * - * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('failed_jobs'); } diff --git a/database/migrations/2023_12_07_135327_create_job_batches_table.php b/database/migrations/2023_12_07_135327_create_job_batches_table.php new file mode 100644 index 000000000..50e38c20f --- /dev/null +++ b/database/migrations/2023_12_07_135327_create_job_batches_table.php @@ -0,0 +1,35 @@ +string('id')->primary(); + $table->string('name'); + $table->integer('total_jobs'); + $table->integer('pending_jobs'); + $table->integer('failed_jobs'); + $table->longText('failed_job_ids'); + $table->mediumText('options')->nullable(); + $table->integer('cancelled_at')->nullable(); + $table->integer('created_at'); + $table->integer('finished_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('job_batches'); + } +}; diff --git a/database/migrations/2023_02_21_210252_create_sessions_table.php b/database/migrations/2023_12_07_135518_create_jobs_table.php similarity index 50% rename from database/migrations/2023_02_21_210252_create_sessions_table.php rename to database/migrations/2023_12_07_135518_create_jobs_table.php index f60625bb5..6098d9b12 100644 --- a/database/migrations/2023_02_21_210252_create_sessions_table.php +++ b/database/migrations/2023_12_07_135518_create_jobs_table.php @@ -11,13 +11,14 @@ */ public function up(): void { - Schema::create('sessions', function (Blueprint $table) { - $table->string('id')->primary(); - $table->foreignId('user_id')->nullable()->index(); - $table->string('ip_address', 45)->nullable(); - $table->text('user_agent')->nullable(); + Schema::create('jobs', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('queue')->index(); $table->longText('payload'); - $table->integer('last_activity')->index(); + $table->unsignedTinyInteger('attempts'); + $table->unsignedInteger('reserved_at')->nullable(); + $table->unsignedInteger('available_at'); + $table->unsignedInteger('created_at'); }); } @@ -26,6 +27,6 @@ public function up(): void */ public function down(): void { - Schema::dropIfExists('sessions'); + Schema::dropIfExists('jobs'); } }; diff --git a/database/migrations/2023_12_07_140219_create_job_manager_table.php b/database/migrations/2023_12_07_140219_create_job_manager_table.php new file mode 100644 index 000000000..1b7916e50 --- /dev/null +++ b/database/migrations/2023_12_07_140219_create_job_manager_table.php @@ -0,0 +1,36 @@ +id(); + $table->string('job_id')->index(); + $table->string('name')->nullable(); + $table->string('queue')->nullable(); + $table->timestamp('started_at')->nullable()->index(); + $table->timestamp('finished_at')->nullable(); + $table->boolean('failed')->default(false)->index(); + $table->integer('attempt')->default(0); + $table->integer('progress')->nullable(); + $table->text('exception_message')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('job_manager'); + } +}; diff --git a/public/css/awcodes/headings/invaders-filament-jsoneditor.css b/public/css/awcodes/headings/invaders-filament-jsoneditor.css new file mode 100644 index 000000000..b632326af --- /dev/null +++ b/public/css/awcodes/headings/invaders-filament-jsoneditor.css @@ -0,0 +1,6 @@ +.jsoneditor input,.jsoneditor input:not([type]),.jsoneditor input[type=search],.jsoneditor input[type=text],.jsoneditor-modal input,.jsoneditor-modal input:not([type]),.jsoneditor-modal input[type=search],.jsoneditor-modal input[type=text]{height:auto;border:inherit;box-shadow:none;font-size:inherit;box-sizing:inherit;padding:inherit;font-family:inherit;transition:none;line-height:inherit}.jsoneditor input:focus,.jsoneditor input:not([type]):focus,.jsoneditor input[type=search]:focus,.jsoneditor input[type=text]:focus,.jsoneditor-modal input:focus,.jsoneditor-modal input:not([type]):focus,.jsoneditor-modal input[type=search]:focus,.jsoneditor-modal input[type=text]:focus{border:inherit;box-shadow:inherit}.jsoneditor textarea,.jsoneditor-modal textarea{height:inherit}.jsoneditor select,.jsoneditor-modal select{display:inherit;height:inherit}.jsoneditor label,.jsoneditor-modal label{font-size:inherit;font-weight:inherit;color:inherit}.jsoneditor table,.jsoneditor-modal table{border-collapse:collapse;width:auto}.jsoneditor td,.jsoneditor th,.jsoneditor-modal td,.jsoneditor-modal th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.jsoneditor .autocomplete.dropdown{position:absolute;background:#fff;box-shadow:2px 2px 12px rgba(128,128,128,.3);border:1px solid #d3d3d3;overflow-x:hidden;overflow-y:auto;cursor:default;margin:0;padding:5px;text-align:left;outline:0;font-family:consolas,menlo,monaco,"Ubuntu Mono",source-code-pro,monospace;font-size:14px}.jsoneditor .autocomplete.dropdown .item{color:#1a1a1a}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ebebeb}.jsoneditor .autocomplete.hint{color:#a1a1a1;top:4px;left:4px}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;box-sizing:content-box;z-index:2}.jsoneditor-contextmenu .jsoneditor-menu{position:relative;left:0;top:0;width:128px;height:auto;background:#fff;border:1px solid #d3d3d3;box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 8px 0 0;margin:0;width:128px;height:auto;border:none;cursor:pointer;color:#4d4d4d;background:0 0;font-size:14px;font-family:arial,sans-serif;box-sizing:border-box;text-align:left}.jsoneditor-contextmenu .jsoneditor-menu button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-default{width:96px}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu .jsoneditor-menu li{overflow:hidden}.jsoneditor-contextmenu .jsoneditor-menu li ul{display:none;position:relative;left:-10px;top:0;border:none;box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu .jsoneditor-menu li ul .jsoneditor-icon{margin-left:24px}.jsoneditor-contextmenu .jsoneditor-menu li ul li button{padding-left:24px;animation:all ease-in-out 1s}.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(./img/jsoneditor-icons.svg);background-position:0 -72px}.jsoneditor-contextmenu .jsoneditor-icon{position:absolute;top:0;left:0;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(./img/jsoneditor-icons.svg)}.jsoneditor-contextmenu .jsoneditor-text{padding:4px 0 4px 24px;word-wrap:break-word}.jsoneditor-contextmenu .jsoneditor-text.jsoneditor-right-margin{padding-right:24px}.jsoneditor-contextmenu .jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.jsoneditor-remove .jsoneditor-icon{background-position:-24px 0}.jsoneditor-contextmenu button.jsoneditor-append .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-insert .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-duplicate .jsoneditor-icon{background-position:-48px 0}.jsoneditor-contextmenu button.jsoneditor-sort-asc .jsoneditor-icon{background-position:-168px 0}.jsoneditor-contextmenu button.jsoneditor-sort-desc .jsoneditor-icon{background-position:-192px 0}.jsoneditor-contextmenu button.jsoneditor-transform .jsoneditor-icon{background-position:-216px 0}.jsoneditor-contextmenu button.jsoneditor-extract .jsoneditor-icon{background-position:0 -24px}.jsoneditor-contextmenu button.jsoneditor-type-string .jsoneditor-icon{background-position:-144px 0}.jsoneditor-contextmenu button.jsoneditor-type-auto .jsoneditor-icon{background-position:-120px 0}.jsoneditor-contextmenu button.jsoneditor-type-object .jsoneditor-icon{background-position:-72px 0}.jsoneditor-contextmenu button.jsoneditor-type-array .jsoneditor-icon{background-position:-96px 0}.jsoneditor-contextmenu button.jsoneditor-type-modes .jsoneditor-icon{background-image:none;width:6px}.jsoneditor-contextmenu li,.jsoneditor-contextmenu ul{box-sizing:content-box;position:relative}.jsoneditor-contextmenu .jsoneditor-menu button:focus,.jsoneditor-contextmenu .jsoneditor-menu button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:focus,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}.jsoneditor-contextmenu .jsoneditor-menu li ul li button:focus,.jsoneditor-contextmenu .jsoneditor-menu li ul li button:hover{background-color:#f5f5f5}.jsoneditor-modal{max-width:95%;border-radius:2px!important;padding:45px 15px 15px 15px!important;box-shadow:2px 2px 12px rgba(128,128,128,.3);color:#4d4d4d;line-height:1.3em}.jsoneditor-modal.jsoneditor-modal-transform{width:600px!important}.jsoneditor-modal .pico-modal-header{position:absolute;box-sizing:border-box;top:0;left:0;width:100%;padding:0 10px;height:30px;line-height:30px;font-family:arial,sans-serif;font-size:11pt;background:#3883fa;color:#fff}.jsoneditor-modal table{width:100%}.jsoneditor-modal table td{padding:3px 0}.jsoneditor-modal table td.jsoneditor-modal-input{text-align:right;padding-right:0;white-space:nowrap}.jsoneditor-modal table td.jsoneditor-modal-actions{padding-top:15px}.jsoneditor-modal table th{vertical-align:middle}.jsoneditor-modal p:first-child{margin-top:0}.jsoneditor-modal a{color:#3883fa}.jsoneditor-modal .jsoneditor-jmespath-block{margin-bottom:10px}.jsoneditor-modal .pico-close{background:0 0!important;font-size:24px!important;top:7px!important;right:7px!important;color:#fff}.jsoneditor-modal input{padding:4px}.jsoneditor-modal input[type=text]{cursor:inherit}.jsoneditor-modal input[disabled]{background:#d3d3d3;color:grey}.jsoneditor-modal .jsoneditor-select-wrapper{position:relative;display:inline-block}.jsoneditor-modal .jsoneditor-select-wrapper:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #666;position:absolute;right:8px;top:14px;pointer-events:none}.jsoneditor-modal select{padding:3px 24px 3px 10px;min-width:180px;max-width:350px;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:0;text-overflow:"";font-size:14px;line-height:1.5em}.jsoneditor-modal select::-ms-expand{display:none}.jsoneditor-modal .jsoneditor-button-group input{padding:4px 10px;margin:0;border-radius:0;border-left-style:none}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left-style:solid}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.jsoneditor-modal .jsoneditor-transform-preview{background:#f5f5f5;height:200px}.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error{color:#ee422e}.jsoneditor-modal .jsoneditor-jmespath-wizard{line-height:1.2em;width:100%;padding:0;border-radius:3px}.jsoneditor-modal .jsoneditor-jmespath-label{font-weight:700;color:#1e90ff;margin-top:20px;margin-bottom:5px}.jsoneditor-modal .jsoneditor-jmespath-wizard-table{width:100%;border-collapse:collapse}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px 0}.jsoneditor-modal .jsoneditor-inline{position:relative;display:inline-block;width:100%;padding-top:2px;padding-bottom:2px}.jsoneditor-modal .jsoneditor-inline:not(:last-child){padding-right:2px}.jsoneditor-modal .jsoneditor-jmespath-filter{display:flex;flex-wrap:wrap}.jsoneditor-modal .jsoneditor-jmespath-filter-field{width:180px}.jsoneditor-modal .jsoneditor-jmespath-filter-relation{width:100px}.jsoneditor-modal .jsoneditor-jmespath-filter-value{min-width:180px;flex:1}.jsoneditor-modal .jsoneditor-jmespath-sort-field{width:170px}.jsoneditor-modal .jsoneditor-jmespath-sort-order{width:150px}.jsoneditor-modal .jsoneditor-jmespath-select-fields{width:100%}.jsoneditor-modal .selectr-selected{border-color:#d3d3d3;padding:4px 28px 4px 8px}.jsoneditor-modal .selectr-selected .selectr-tag{background-color:#3883fa;border-radius:5px}.jsoneditor-modal table td,.jsoneditor-modal table th{text-align:left;vertical-align:middle;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal input[type=text]:focus,.jsoneditor-modal select,.jsoneditor-modal textarea{background:#fff;border:1px solid #d3d3d3;color:#4d4d4d;border-radius:3px;padding:4px}.jsoneditor-modal #query,.jsoneditor-modal textarea{border-radius:unset}.jsoneditor-modal,.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal option,.jsoneditor-modal select,.jsoneditor-modal table td,.jsoneditor-modal table th,.jsoneditor-modal textarea{font-size:10.5pt;font-family:arial,sans-serif}.jsoneditor-modal #query,.jsoneditor-modal .jsoneditor-transform-preview{font-family:consolas,menlo,monaco,"Ubuntu Mono",source-code-pro,monospace;font-size:14px;width:100%;box-sizing:border-box}.jsoneditor-modal input[type=button],.jsoneditor-modal input[type=submit]{background:#f5f5f5;padding:4px 20px}.jsoneditor-modal input,.jsoneditor-modal select{cursor:pointer}.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc{background:#3883fa;border-color:#3883fa;color:#fff}.jsoneditor{color:#1a1a1a;border:thin solid #3883fa;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;position:relative;padding:0;line-height:100%}div.jsoneditor-default,div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;line-height:16px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-value.jsoneditor-empty::after{content:"value"}div.jsoneditor-value.jsoneditor-string{color:#006000}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ed0}div.jsoneditor-value.jsoneditor-color-value{color:#1a1a1a}div.jsoneditor-value.jsoneditor-invalid{color:#1a1a1a}div.jsoneditor-readonly{min-width:16px;color:grey}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty::after{content:"field"}div.jsoneditor td{vertical-align:top}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:grey}div.jsoneditor td.jsoneditor-tree{vertical-align:top}div.jsoneditor.busy pre.jsoneditor-preview{background:#f5f5f5;color:grey}div.jsoneditor.busy div.jsoneditor-busy{display:inherit}div.jsoneditor code.jsoneditor-preview{background:0 0}div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview{width:100%;height:100%;box-sizing:border-box;overflow:auto;padding:2px;margin:0;white-space:pre-wrap;word-break:break-all}div.jsoneditor-default{color:grey;padding-left:10px}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto;background:#fff}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background-color:transparent;background-image:url(./img/jsoneditor-icons.svg)}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu-button{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background-image:url(./img/jsoneditor-icons.svg);background-position:-72px -72px;cursor:move}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree div.jsoneditor-show-more{display:inline-block;padding:3px 4px;margin:2px 0;background-color:#e5e5e5;border-radius:3px;color:grey;font-family:arial,sans-serif;font-size:14px}div.jsoneditor-tree div.jsoneditor-show-more a{display:inline-block;color:grey}div.jsoneditor-tree div.jsoneditor-color{display:inline-block;width:12px;height:12px;margin:4px;border:1px solid grey;cursor:pointer}div.jsoneditor-tree div.jsoneditor-color.jsoneditor-color-readonly{cursor:inherit}div.jsoneditor-tree div.jsoneditor-date{background:#a1a1a1;color:#fff;font-family:arial,sans-serif;border-radius:3px;display:inline-block;padding:3px;margin:0 3px}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%}div.jsoneditor-tree .jsoneditor-button{display:block}div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background-image:url(./img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}div.jsoneditor-outer{position:static;width:100%;height:100%;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}div.jsoneditor-outer.has-nav-bar{margin-top:-26px;padding-top:26px}div.jsoneditor-outer.has-nav-bar.has-main-menu-bar{margin-top:-61px;padding-top:61px}div.jsoneditor-outer.has-status-bar{margin-bottom:-26px;padding-bottom:26px}div.jsoneditor-outer.has-main-menu-bar{margin-top:-35px;padding-top:35px}div.jsoneditor-busy{position:absolute;top:15%;left:0;box-sizing:border-box;width:100%;text-align:center;display:none}div.jsoneditor-busy span{background-color:#ffffab;border:1px solid #fe0;border-radius:3px;padding:5px 15px;box-shadow:0 0 5px rgba(0,0,0,.4)}div.jsoneditor-field.jsoneditor-empty::after,div.jsoneditor-value.jsoneditor-empty::after{pointer-events:none;color:#d3d3d3;font-size:8pt}a.jsoneditor-value.jsoneditor-url,div.jsoneditor-value.jsoneditor-url{color:#006000;text-decoration:underline}a.jsoneditor-value.jsoneditor-url{display:inline-block;padding:2px;margin:2px}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#ffffab;border:1px solid #fe0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px}div.jsoneditor-tree button.jsoneditor-contextmenu-button.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu-button:focus,div.jsoneditor-tree button.jsoneditor-contextmenu-button:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button{background-position:-48px -48px}div.jsoneditor-tree div.jsoneditor-show-more a:focus,div.jsoneditor-tree div.jsoneditor-show-more a:hover{color:#ee422e}.ace-jsoneditor,textarea.jsoneditor-text{min-height:150px}.ace-jsoneditor.ace_editor,textarea.jsoneditor-text.ace_editor{font-family:consolas,menlo,monaco,"Ubuntu Mono",source-code-pro,monospace}textarea.jsoneditor-text{width:100%;height:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#d3d3d3}tr.jsoneditor-selected button.jsoneditor-contextmenu-button,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}.jsoneditor-popover,.jsoneditor-schema-error,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value,pre.jsoneditor-preview{font-family:consolas,menlo,monaco,"Ubuntu Mono",source-code-pro,monospace;font-size:14px;color:#1a1a1a}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}.jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;padding:7px 10px;position:absolute;cursor:auto;width:200px}.jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;right:-14px;left:inherit;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;left:-14px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:"";display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-text-errors tr.jump-to-line:hover{text-decoration:underline;cursor:pointer}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;animation:fade-in .3s linear 1,move-up .3s linear 1}@keyframes fade-in{from{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-validation-errors-container{max-height:130px;overflow-y:auto}.jsoneditor .jsoneditor-validation-errors{width:100%;overflow:hidden}.jsoneditor .jsoneditor-additional-errors{position:absolute;margin:auto;bottom:31px;left:calc(50% - 92px);color:grey;background-color:#ebebeb;padding:7px 15px;border-radius:8px}.jsoneditor .jsoneditor-additional-errors.visible{visibility:visible;opacity:1;transition:opacity 2s linear}.jsoneditor .jsoneditor-additional-errors.hidden{visibility:hidden;opacity:0;transition:visibility 0s 2s,opacity 2s linear}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;border-top:1px solid #ffc700}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor .jsoneditor-text-errors td pre{margin:0;white-space:pre-wrap}.jsoneditor .jsoneditor-text-errors tr{background-color:#ffffab}.jsoneditor .jsoneditor-text-errors tr.parse-error{background-color:#ee2e2e70}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;cursor:pointer}.jsoneditor-text-errors tr .jsoneditor-schema-error{background-image:url(./img/jsoneditor-icons.svg);background-position:-168px -48px;background-color:transparent}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background-image:url(./img/jsoneditor-icons.svg);background-position:-25px 0;background-color:transparent}.jsoneditor-anchor{cursor:pointer}.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.jsoneditor-modal input[type=search].selectr-input{border:1px solid #d3d3d3;width:calc(100% - 4px);margin:2px;padding:4px;box-sizing:border-box}.jsoneditor-modal button.selectr-input-clear{right:8px}.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}.jsoneditor-menu>.jsoneditor-modes>button,.jsoneditor-menu>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background-color:transparent;background-image:url(./img/jsoneditor-icons.svg);color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:14px;float:left}.jsoneditor-menu>.jsoneditor-modes>button:hover,.jsoneditor-menu>button:hover{background-color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:rgba(255,255,255,.3)}.jsoneditor-menu>.jsoneditor-modes>button:disabled,.jsoneditor-menu>button:disabled{opacity:.5;background-color:transparent;border:none}.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}.jsoneditor-menu>button.jsoneditor-sort{background-position:-120px -96px}.jsoneditor-menu>button.jsoneditor-transform{background-position:-144px -96px}.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-transform,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-transform{display:none}.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}.jsoneditor-menu>button.jsoneditor-repair{background-position:-96px -96px}.jsoneditor-menu>.jsoneditor-modes{display:inline-block;float:left}.jsoneditor-menu>.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor-menu>.jsoneditor-modes>button.jsoneditor-separator,.jsoneditor-menu>button.jsoneditor-separator{margin-left:10px}.jsoneditor-menu a{font-family:arial,sans-serif;font-size:14px;color:#fff;opacity:.8;vertical-align:middle}.jsoneditor-menu a:hover{opacity:1}.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor-navigation-bar{width:100%;height:26px;line-height:26px;padding:0;margin:0;border-bottom:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:grey;background-color:#ebebeb;overflow:hidden;font-family:arial,sans-serif;font-size:14px}.jsoneditor-search{font-family:arial,sans-serif;position:absolute;right:4px;top:4px;border-collapse:collapse;border-spacing:0;display:flex}.jsoneditor-search input{color:#1a1a1a;width:120px;border:none;outline:0;margin:1px;line-height:20px;font-family:arial,sans-serif}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(./img/jsoneditor-icons.svg);vertical-align:top}.jsoneditor-search button:hover{background-color:transparent}.jsoneditor-search button.jsoneditor-refresh{width:18px;background-position:-99px -73px}.jsoneditor-search button.jsoneditor-next{cursor:pointer;background-position:-124px -73px}.jsoneditor-search button.jsoneditor-next:hover{background-position:-124px -49px}.jsoneditor-search button.jsoneditor-previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor-search button.jsoneditor-previous:hover{background-position:-148px -49px}.jsoneditor-results{font-family:arial,sans-serif;color:#fff;padding-right:5px;line-height:26px}.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}.jsoneditor-statusbar{line-height:26px;height:26px;color:grey;background-color:#ebebeb;border-top:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}.jsoneditor-statusbar>.jsoneditor-curserinfo-val{margin-right:12px}.jsoneditor-statusbar>.jsoneditor-curserinfo-count{margin-left:4px}.jsoneditor-statusbar>.jsoneditor-validation-error-icon{float:right;width:24px;height:24px;padding:0;margin-top:1px;background-image:url(./img/jsoneditor-icons.svg);background-position:-168px -48px;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-validation-error-count{float:right;margin:0 4px 0 0;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-parse-error-icon{float:right;width:24px;height:24px;padding:0;margin:1px;background-image:url(./img/jsoneditor-icons.svg);background-position:-25px 0}.jsoneditor-statusbar .jsoneditor-array-info a{color:inherit}div.jsoneditor-statusbar>.jsoneditor-curserinfo-label,div.jsoneditor-statusbar>.jsoneditor-size-info{margin:0 4px}.jsoneditor-treepath{padding:0 5px;overflow:hidden;white-space:nowrap;outline:0}.jsoneditor-treepath.show-all{word-wrap:break-word;white-space:normal;position:absolute;background-color:#ebebeb;z-index:1;box-shadow:2px 2px 12px rgba(128,128,128,.3)}.jsoneditor-treepath.show-all span.jsoneditor-treepath-show-all-btn{display:none}.jsoneditor-treepath div.jsoneditor-contextmenu-root{position:absolute;left:0}.jsoneditor-treepath .jsoneditor-treepath-show-all-btn{position:absolute;background-color:#ebebeb;left:0;height:20px;padding:0 3px;cursor:pointer}.jsoneditor-treepath .jsoneditor-treepath-element{margin:1px;font-family:arial,sans-serif;font-size:14px}.jsoneditor-treepath .jsoneditor-treepath-seperator{margin:2px;font-size:9pt;font-family:arial,sans-serif}.jsoneditor-treepath span.jsoneditor-treepath-element:hover,.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover{cursor:pointer;text-decoration:underline}/*! + * Selectr 2.4.0 + * https://github.com/Mobius1/Selectr + * + * Released under the MIT license + */.selectr-container{position:relative}.selectr-container li{list-style:none}.selectr-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:-1px;padding:0;border:0 none}.selectr-visible{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:11}.selectr-desktop.multiple .selectr-visible{display:none}.selectr-desktop.multiple.native-open .selectr-visible{top:100%;min-height:200px!important;height:auto;opacity:1;display:block}.selectr-container.multiple.selectr-mobile .selectr-selected{z-index:0}.selectr-selected{position:relative;z-index:1;box-sizing:border-box;width:100%;padding:7px 28px 7px 14px;cursor:pointer;border:1px solid #999;border-radius:3px;background-color:#fff}.selectr-selected::before{position:absolute;top:50%;right:10px;width:0;height:0;content:"";-o-transform:rotate(0) translate3d(0,-50%,0);-ms-transform:rotate(0) translate3d(0,-50%,0);-moz-transform:rotate(0) translate3d(0,-50%,0);-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0);border-width:4px 4px 0 4px;border-style:solid;border-color:#6c7a86 transparent transparent}.selectr-container.native-open .selectr-selected::before,.selectr-container.open .selectr-selected::before{border-width:0 4px 4px 4px;border-style:solid;border-color:transparent transparent #6c7a86}.selectr-label{display:none;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.selectr-placeholder{color:#6c7a86}.selectr-tags{margin:0;padding:0;white-space:normal}.has-selected .selectr-tags{margin:0 0 -2px}.selectr-tag{list-style:none;position:relative;float:left;padding:2px 25px 2px 8px;margin:0 2px 2px 0;cursor:default;color:#fff;border:medium none;border-radius:10px;background:#acb7bf none repeat scroll 0 0}.selectr-container.multiple.has-selected .selectr-selected{padding:5px 28px 5px 5px}.selectr-options-container{position:absolute;z-index:10000;top:calc(100% - 1px);left:0;display:none;box-sizing:border-box;width:100%;border-width:0 1px 1px;border-style:solid;border-color:transparent #999 #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.open .selectr-options-container{display:block}.selectr-input-container{position:relative;display:none}.selectr-clear,.selectr-input-clear,.selectr-tag-remove{position:absolute;top:50%;right:22px;width:20px;height:20px;padding:0;cursor:pointer;-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);border:medium none;background-color:transparent;z-index:11}.selectr-clear,.selectr-input-clear{display:none}.selectr-container.has-selected .selectr-clear,.selectr-input-container.active .selectr-input-clear{display:block}.selectr-selected .selectr-tag-remove{right:2px}.selectr-clear::after,.selectr-clear::before,.selectr-input-clear::after,.selectr-input-clear::before,.selectr-tag-remove::after,.selectr-tag-remove::before{position:absolute;top:5px;left:9px;width:2px;height:10px;content:" ";background-color:#6c7a86}.selectr-tag-remove::after,.selectr-tag-remove::before{top:4px;width:3px;height:12px;background-color:#fff}.selectr-clear:before,.selectr-input-clear::before,.selectr-tag-remove::before{-o-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.selectr-clear:after,.selectr-input-clear::after,.selectr-tag-remove::after{-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.selectr-input-container.active,.selectr-input-container.active .selectr-clear{display:block}.selectr-input{top:5px;left:5px;box-sizing:border-box;width:calc(100% - 30px);margin:10px 15px;padding:7px 30px 7px 9px;border:1px solid #999;border-radius:3px}.selectr-notice{display:none;box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.notice .selectr-notice{display:block}.selectr-container.notice .selectr-selected{border-radius:3px 3px 0 0}.selectr-options{position:relative;top:calc(100% + 2px);display:none;overflow-x:auto;overflow-y:scroll;max-height:200px;margin:0;padding:0}.selectr-container.notice .selectr-options-container,.selectr-container.open .selectr-input-container,.selectr-container.open .selectr-options{display:block}.selectr-option{position:relative;display:block;padding:5px 20px;list-style:outside none none;cursor:pointer;font-weight:400}.selectr-options.optgroups>.selectr-option{padding-left:25px}.selectr-optgroup{font-weight:700;padding:0}.selectr-optgroup--label{font-weight:700;margin-top:10px;padding:5px 15px}.selectr-match{text-decoration:underline}.selectr-option.selected{background-color:#ddd}.selectr-option.active{color:#fff;background-color:#5897fb}.selectr-option.disabled{opacity:.4}.selectr-option.excluded{display:none}.selectr-container.open .selectr-selected{border-color:#999 #999 transparent #999;border-radius:3px 3px 0 0}.selectr-container.open .selectr-selected::after{-o-transform:rotate(180deg) translate3d(0,50%,0);-ms-transform:rotate(180deg) translate3d(0,50%,0);-moz-transform:rotate(180deg) translate3d(0,50%,0);-webkit-transform:rotate(180deg) translate3d(0,50%,0);transform:rotate(180deg) translate3d(0,50%,0)}.selectr-disabled{opacity:.6}.has-selected .selectr-placeholder,.selectr-empty{display:none}.has-selected .selectr-label{display:block}.taggable .selectr-selected{padding:4px 28px 4px 4px}.taggable .selectr-selected::after{display:table;content:" ";clear:both}.taggable .selectr-label{width:auto}.taggable .selectr-tags{float:left;display:block}.taggable .selectr-placeholder{display:none}.input-tag{float:left;min-width:90px;width:auto}.selectr-tag-input{border:medium none;padding:3px 10px;width:100%;font-family:inherit;font-weight:inherit;font-size:inherit}.selectr-input-container.loading::after{position:absolute;top:50%;right:20px;width:20px;height:20px;content:"";-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-o-transform-origin:50% 0 0;-ms-transform-origin:50% 0 0;-moz-transform-origin:50% 0 0;-webkit-transform-origin:50% 0 0;transform-origin:50% 0 0;-moz-animation:.5s linear 0s normal forwards infinite running selectr-spin;-webkit-animation:.5s linear 0s normal forwards infinite running selectr-spin;animation:.5s linear 0s normal forwards infinite running selectr-spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}@keyframes selectr-spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}.selectr-container.open.inverted .selectr-selected{border-color:transparent #999 #999;border-radius:0 0 3px 3px}.selectr-container.inverted .selectr-options-container{border-width:1px 1px 0;border-color:#999 #999 transparent;border-radius:3px 3px 0 0;background-color:#fff}.selectr-container.inverted .selectr-options-container{top:auto;bottom:calc(100% - 1px)}.selectr-container ::-webkit-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-moz-placeholder{color:#6c7a86;opacity:1}.selectr-container :-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::placeholder{color:#6c7a86;opacity:1} diff --git a/public/js/awcodes/headings/invaders-filament-jsoneditor.js b/public/js/awcodes/headings/invaders-filament-jsoneditor.js new file mode 100644 index 000000000..8da840944 --- /dev/null +++ b/public/js/awcodes/headings/invaders-filament-jsoneditor.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(self,(function(){return t={897:function(e,t,i){"use strict";i.d(t,{x:function(){return a}});var n=i(2602),r=i(9791),o=i(7907);function s(e,t){for(var i=0;ic.top&&(s=!1),i=o?0:l.top-a.top;s?(o=t.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=i+o+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(a=s?c.bottom-l.bottom-10:l.top-c.top-10,this.dom.list.style.maxHeight=a+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,r.getSelection)(),this.anchor=t,setTimeout((function(){h.dom.focusButton.focus()}),0),e.visibleMenu&&e.visibleMenu.hide(),e.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose&&this.onClose()),e.visibleMenu===this&&(e.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(e){var t,i=this,n=e===this.expandedItem,o=this.expandedItem;o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout((function(){i.expandedItem!==o&&(o.ul.style.display="",r.removeClassName)(o.ul.parentNode,"jsoneditor-selected")}),300),this.expandedItem=void 0),n||((t=e.ul).style.display="block",t.clientHeight,setTimeout((function(){if(i.expandedItem===e){for(var n=0,r=0;r/gi,"\n"))),a.appendChild(o),s.appendChild(a)),s.onclick=function(){r.onFocusLine(n)},i.appendChild(s)})),this.dom.validationErrors=o,this.dom.validationErrorsContainer.appendChild(o),this.dom.additionalErrorsIndication.title=e.length+" errors total",this.dom.validationErrorsContainer.clientHeighte[0].length)||(e=t,i=o,this.options.flex));o++);return e?((n=e[0].match(/\n.*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,i,n){switch(i){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}},t.parser=i,t.parse=i.parse.bind(i)},3879:function(e){"use strict";function t(){}var i={defaultSelected:!0,width:"auto",disabled:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag..."},n=(t.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){this._events=this._events||{},e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=0)for(var t=0;t"+t.label+""}),n.each(t.children,(function(e,t){t.idx=c,l.appendChild(a.call(this,t,l)),c++}),this)):(t.idx=c,a.call(this,t),c++)}),this),this.config.data&&Array.isArray(this.config.data)&&(t=!(this.data=[]),l=!1,c=0,n.each(this.config.data,(function(e,o){r(o,"children")?(t=n.createElement("optgroup",{label:o.text}),l=n.createElement("ul",{class:"selectr-optgroup",role:"group",html:"
  • "+o.text+"
  • "}),n.each(o.children,(function(e,n){(i=new Option(n.text,n.value,!1,n.hasOwnProperty("selected")&&!0===n.selected)).disabled=r(n,"disabled"),this.options.push(i),t.appendChild(i),i.idx=c,l.appendChild(a.call(this,i,n)),this.data[c]=n,c++}),this)):((i=new Option(o.text,o.value,!1,o.hasOwnProperty("selected")&&!0===o.selected)).disabled=r(o,"disabled"),this.options.push(i),i.idx=c,a.call(this,i,o),this.data[c]=o,c++)}),this)),this.setSelected(!0);for(var h=this.navIndex=0;hthis.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndexthis.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(e.top+e.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&l.call(this)):0===this.navIndex?this.tree.scrollTop=0:e.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(e.top-this.optsRect.top)),i&&n.removeClass(i,"active"),n.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",(function(t){t.changedTouches[0].target===e.el&&e.toggle()})),(this.config.nativeDropdown||this.mobileDevice)&&this.container.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),t.target===e.el&&e.toggle()})),this.el.addEventListener("change",(function(t){var i;e.el.multiple?(i=e.getSelectedProperties("idx"),i=function(e,t){for(var i,n=[],r=e.slice(0),o=0;oi?(n.addClass(this.container,"inverted"),this.isInverted=!0):(n.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=n.rect(this.tree)},h.prototype.getOptionByIndex=function(e){return this.options[e]},h.prototype.getOptionByValue=function(e){for(var t=!1,i=0,n=this.options.length;ithis.limit&&1r.EX?((0,p.addClassName)((i=this).frame,"busy"),i.dom.busyContent.innerText=t,setTimeout((function(){e(),(0,p.removeClassName)(i.frame,"busy"),i.dom.busyContent.innerText=""}),100)):e()},t.validate=i.validate,t._renderErrors=i._renderErrors,[{mode:"preview",mixin:t,data:"json"}])},6210:function(e,t,i){"use strict";i.r(t),i.d(t,{showSortModal:function(){return s}});t=i(483);var n=i.n(t),r=i(7907),o=i(9791);function s(e,t,i,s){var a=Array.isArray(t)?(0,o.getChildPaths)(t):[""],l=s&&s.path&&(0,o.contains)(a,s.path)?s.path:a[0],c=s&&s.direction||"asc";t='
    '+(0,r.Iu)("sort")+"
    "+(0,r.Iu)("sortFieldLabel")+'
    '+(0,r.Iu)("sortDirectionLabel")+'
    ';n()({parent:e,content:t,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate((function(e){var t=e.modalElem().querySelector("form"),n=e.modalElem().querySelector("#ok"),r=e.modalElem().querySelector("#field"),o=e.modalElem().querySelector("#direction");function s(e){o.value=e,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}a.forEach((function(e){var t,i=document.createElement("option");i.text=""===(t=e)?"@":"."===t[0]?t.slice(1):t,i.value=e,r.appendChild(i)})),r.value=l||a[0],s(c||"asc"),o.onclick=function(e){s(e.target.getAttribute("data-value"))},n.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.close(),i({path:r.value,direction:o.value})},t&&(t.onsubmit=n.onclick)})).afterClose((function(e){e.destroy()})).show()}},2558:function(e,t,i){"use strict";i.r(t),i.d(t,{showTransformModal:function(){return d}});t=i(483);var n=i.n(t),r=(t=i(3879),i.n(t)),o=i(7907);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,i,n){if("boolean"==typeof e||e instanceof Boolean||null===e||"number"==typeof e||e instanceof Number||"string"==typeof e||e instanceof String||e instanceof Date)return JSON.stringify(e);if(Array.isArray(e)){for(var r=e,o=t,l=i,c=n,h=o?l+o:void 0,d=o?"[\n":"[",u=0;uc)return d+"..."}return d+(o?"\n"+l+"]":"]")}if(e&&"object"===s(e)){var p,m=e,f=t,C=(l=i,n),I=f?l+f:void 0,v=!0,A=f?"{\n":"{";if("function"==typeof m.toJSON)return a(m.toJSON(),f,l,C);for(p in m)if(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(m,p)){if(v?v=!1:A+=f?",\n":",",(A=(A+=f?I+'"'+p+'": ':'"'+p+'":')+a(m[p],f,I,C)).length>C)return A+"..."}return A+(f?"\n"+l+"}":"}")}}function l(e,t){for(var i="";0JMESPath query to filter, sort, or transform the JSON data.
    To learn JMESPath, go to the interactive tutorial.':s,d=e.createQuery,u=e.executeQuery,g=e.onTransform,p=i;e='