laravel-workflow / waterline

An elegant UI for monitoring Laravel Workflows.
MIT License
164 stars 10 forks source link

[FEATURE_REQUEST] - Base URL config similar to Horizon, already exists just need published config file #14

Closed LibbyJax closed 1 year ago

LibbyJax commented 1 year ago

Hi all, Great tool and I love how you kept the base GUI similar to other tools in the Laravel ecosystem.

I'd like to request a feature. The Laravel Horizon config has this in their config file (initial value is just 'horizon'): `
/*
-------------------------------------------------------------------------- Horizon Path
This is the URI path where Horizon will be accessible from. Feel free
to change this path to anything you like. Note that the URI will not
affect the paths of its internal API that aren't exposed to users.
*/

'path' => env('HORIZON_PATH', 'admin/horizon'),

` I'd like to have the same functionality in Waterline. I am also unconcerned with the underlying API URLs, just like Horizon.

I can probably build a pull request, but I'd have the spin-up time of learning the coding styles and code, along with trying to find out where it would break a URL. It may be something relatively quick for knowledgeable devs already steeped in this code. Let me know, I can go either route.

Once again, love your project!

Thanks!

LibbyJax commented 1 year ago

Just for some additional context, here is the output of my "php artisan route:list" after I configure the HORIZON_PATH environment variable to "admin/horizon": GET|HEAD admin/horizon/api/batches .................................................... horizon.jobs-batches.index › Laravel\Horizon › BatchesController@index POST admin/horizon/api/batches/retry/{id} ......................................... horizon.jobs-batches.retry › Laravel\Horizon › BatchesController@retry GET|HEAD admin/horizon/api/batches/{id} ................................................. horizon.jobs-batches.show › Laravel\Horizon › BatchesController@show GET|HEAD admin/horizon/api/jobs/completed ..................................... horizon.completed-jobs.index › Laravel\Horizon › CompletedJobsController@index GET|HEAD admin/horizon/api/jobs/failed .............................................. horizon.failed-jobs.index › Laravel\Horizon › FailedJobsController@index GET|HEAD admin/horizon/api/jobs/failed/{id} ........................................... horizon.failed-jobs.show › Laravel\Horizon › FailedJobsController@show GET|HEAD admin/horizon/api/jobs/pending ........................................... horizon.pending-jobs.index › Laravel\Horizon › PendingJobsController@index POST admin/horizon/api/jobs/retry/{id} ................................................. horizon.retry-jobs.show › Laravel\Horizon › RetryController@store GET|HEAD admin/horizon/api/jobs/silenced ........................................ horizon.silenced-jobs.index › Laravel\Horizon › SilencedJobsController@index GET|HEAD admin/horizon/api/jobs/{id} ............................................................... horizon.jobs.show › Laravel\Horizon › JobsController@show GET|HEAD admin/horizon/api/masters ................................................ horizon.masters.index › Laravel\Horizon › MasterSupervisorController@index GET|HEAD admin/horizon/api/metrics/jobs ............................................ horizon.jobs-metrics.index › Laravel\Horizon › JobMetricsController@index GET|HEAD admin/horizon/api/metrics/jobs/{id} ......................................... horizon.jobs-metrics.show › Laravel\Horizon › JobMetricsController@show GET|HEAD admin/horizon/api/metrics/queues ...................................... horizon.queues-metrics.index › Laravel\Horizon › QueueMetricsController@index GET|HEAD admin/horizon/api/metrics/queues/{id} ................................... horizon.queues-metrics.show › Laravel\Horizon › QueueMetricsController@show GET|HEAD admin/horizon/api/monitoring ................................................ horizon.monitoring.index › Laravel\Horizon › MonitoringController@index POST admin/horizon/api/monitoring ................................................ horizon.monitoring.store › Laravel\Horizon › MonitoringController@store GET|HEAD admin/horizon/api/monitoring/{tag} ................................ horizon.monitoring-tag.paginate › Laravel\Horizon › MonitoringController@paginate DELETE admin/horizon/api/monitoring/{tag} .................................. horizon.monitoring-tag.destroy › Laravel\Horizon › MonitoringController@destroy GET|HEAD admin/horizon/api/stats ...................................................... horizon.stats.index › Laravel\Horizon › DashboardStatsController@index GET|HEAD admin/horizon/api/workload ...................................................... horizon.workload.index › Laravel\Horizon › WorkloadController@index GET|HEAD admin/horizon/{view?} ........................................................................ horizon.index › Laravel\Horizon › HomeController@index

LibbyJax commented 1 year ago

After digging deeper, looks like you already have it covered: ` /**

I simply copied the horizon.php file from config to waterline.php, stripped it to just the variables you have above, and modified the values. Voila, my route is route:list changed. Awesome! I can work on a push request to publish a config file as part of the vendor assets, but it looks like you already planned it.

Once again, thanks for a great project!

LibbyJax commented 1 year ago

Added pull request: https://github.com/laravel-workflow/waterline/pull/15