Improvement: add serve dashboard command / static page
| Q | A |
|---|---|
| Bug report? | no |
| Feature request? | yes |
| Library version | latest |
It would be great to see results in a dashboard. I know that Symfony Insight has one and it's awesome.
It will increase the readability of issues.
I wouldn't mind to tackle this… 🔥 🔥 🔥
We have a PR for adding formatters #201, which will make doing this a lot easier.
I see two ways of implementing this. Either create a new formatter called html, which generates a site from the output. Or create a site which can load the data from the json format.
@olivernybroe in each run we could add a new JSON file to a specific folder that a HTML would read an present the key figures and charts.
Feels like the best approach, and also to show the progress of the insights results.
@caneco Sounds like a good idea. I think the JSON way is more robust and extendable in the future.
Would also do so you could compare your results for each run 👍
Maybe this dashboard should be a package for itself that you can just composer require in?
Could be something installed if needed with npm run install && npm run build/serve?
@caneco Yeah, it makes a ton of sense to use npm instead as it is front end stuff.
Another question…
Should the dashboard be:
- only available by running a local server (
npm run serve) - available as a "static" website in the repo (
npm run build) - or… both
I think a static site might be the best choice, if that is not too much work. Else just do what you find easiest.
Love the idea of a static site !
Thanks to @olivernybroe, we can know get json format from phpinsights.
I also would like static html files more. And at the end it's just adding tag wrappers around the already present text format?
<dl>, <ul> and this kind of stuff should do the trick?
Will try to add a HTML formatter which generates a static file.
I'm 💯 % not in design! But this is my first/working result. I've tried to rebuild the console output - because I'm a lazy-bitch I use bootstrap. 🙈 My idea is that anyone else can make it pretty if wanted, but for the moment it should be fine!?

@caneco
I'm 100 % not in design! But this is my first/working result. I've tried to rebuild the console output - because I'm a lazy-bitch I use bootstrap. see_no_evil My idea is that anyone else can make it pretty if wanted, but for the moment it should be fine!?
love this one, can we have that one?
@Gummibeer what's the present status of your html output/format? And, just as importantly, where is it? :)
It's there https://github.com/nunomaduro/phpinsights/pull/258/files and the PR status says it all. 😉
I am not sure if this is already present. I can't see it in the docs.