dotswan / filament-laravel-pulse

Enhance your Filament dashboard with comprehensive monitoring widgets.
MIT License
50 stars 4 forks source link

Pulse doesnt integrate properly #7

Closed cpass78 closed 1 month ago

cpass78 commented 1 month ago

Hello,

Trying to install this package but something seems to be missing from the docs. It always returns: Route [filament.admin.pages.pulse] not defined.

I followed along from here https://filamentphp.com/plugins/dotswan-laravel-pulse. Also using the latest versions of everything

Created my custom page named Pulse, published and migrated everything but always the route error above :confused:

Thanks for the help

mohaphez commented 1 month ago

Hello @cpass78

Can you share your custom page code ?

Will be good if show me your folder path structure which is you put custom page inside .

cpass78 commented 1 month ago

Hello @cpass78

Can you share your custom page code ?

Will be good if show me your folder path structure which is you put custom page inside .

I did a lot of toying around to get it to work but finally did albeit a bit buggy.

basically php artisan make:filament-page Pulse reads just like the docs do. The only custom code that I added while testing was from https://filamentphp.com/docs/3.x/panels/dashboard#creating-multiple-dashboards as the route error wouldn't go away without setting protected static string $routePath = 'pulse';

I've stashed the changes for now but the dark mode setting does reset when it wants to between light and dark theme.

pulse page path is app/Filament/Pages/Pulse.php

mohaphez commented 1 month ago

What do you mean reset setting in switching light dark theme ? Which settings ? Do you wanna show this pulse in root ('/') route ? Did you extend Pulse.php from \Filament\Pages\Dashboard ?

cpass78 commented 1 month ago

Essentially what happened with the switcher is pulse loads its own theme switcher which would default to lightmode for the whole app and the font would downsize as well.

The intention was to have a menu item = pulse that loads this page. If you extend \Filament\Pages\Dashboard the app crashes :shrug:

If you follow the docs exactly like I did, this wont work correctly. I just did a fresh install of everything, only added this pulse package and getting the same result

mohaphez commented 1 month ago

Thanks @cpass78 , Could you share your fresh project code on github ? Let me know , i'll go to check it . :zap:

cpass78 commented 1 month ago

Thanks @cpass78 , Could you share your fresh project code on github ? Let me know , i'll go to check it . ⚡

you bet and thanks https://github.com/cpass78/pulse-test

I was able to get it working finally by leaving it as extending Page but also had to copy the contents of views/vendor/pulse/dashboard.blade.php to resources/views/filament/pages/pulse.blade.php

mohaphez commented 1 month ago

Thanks @cpass78 :smiley: !

I have reviewed the changes and added the Pulse page dashboard. Everything seems to be working fine. Please review the PR: https://github.com/cpass78/pulse-test/pull/1. If you encounter any issues, please let me know.

cpass78 commented 1 month ago

Appreciate it, ill check it out.