Dashboard redesign

Hello,

Over the last couple of months I have been working on redesigning the main foreman dashboard.

The motivations behind this:

  1. Make more charts available as widgets that can be added to the dashboard.
  2. Allow more flexibility and customization for the users in what charts are displayed on their dashboard.
  3. Make "widgetizing" various charts and tables easier and more flexible.
  4. Make the dashboard consistent for the user across multiple computers/browsers. (Currently, the settings are preserved in local-storage)
  5. Permit plugins to more easily allow charts to be added to the dashboard, both as default and optionally.
  6. Try to create a standard layout for all widgets.

What I have done so far:

  1. Rewritten most of the current dashboard.
  2. Made widgets into a model that belongs to a user.
  3. Allowed widgets on the dashboard to be both hidden and deleted.
  4. Made both charts on the host view page and the trend charts addable to the dashboard.
  5. Separated default widgets from allowed widgets; any permitted widget template can be rendered on the dashboard (this is to prevent addition of arbitrary templates by the user).
  6. Moved the saved dashboard settings from local storage to the db.

I have reached a point where I feel it is time to get feedback from more people and to allow others to also take part.
Some of it is still fairly elementary hacks to "get it to work", I am sure a lot of the code has much room for improvement.

The current work is located on my fork on branch widgets: https://github.com/tbrisker/foreman/tree/widgets
There is still plenty to do and I would appreciate it if you could contribute by making PRs against my branch or letting me know where I have gone wrong.

Thank you and have a great 2015!

··· -- Have a nice day, Tomer Brisker

> Hello,
>
> Over the last couple of months I have been working on redesigning the main foreman dashboard.
>
> The motivations behind this:
> 1. Make more charts available as widgets that can be added to the dashboard.
> 2. Allow more flexibility and customization for the users in what charts are displayed on their dashboard.
> 3. Make "widgetizing" various charts and tables easier and more flexible.
> 4. Make the dashboard consistent for the user across multiple computers/browsers. (Currently, the settings are preserved in local-storage)
> 5. Permit plugins to more easily allow charts to be added to the dashboard, both as default and optionally.

This will be a big one… how can plugins customize the main dashboard.

> 6. Try to create a standard layout for all widgets.

This may or may not be related… but the ability to generate "reports"
from the dashboard. Specifically, I am thinking about

  • creating CSV's from widget lists
  • Generating PDF or robust html emails which can be sent to folks.

>
> What I have done so far:
> 1. Rewritten most of the current dashboard.
> 2. Made widgets into a model that belongs to a user.
> 3. Allowed widgets on the dashboard to be both hidden and deleted.
> 4. Made both charts on the host view page and the trend charts addable to the dashboard.
> 5. Separated default widgets from allowed widgets; any permitted widget template can be rendered on the dashboard (this is to prevent addition of arbitrary templates by the user).
> 6. Moved the saved dashboard settings from local storage to the db.
>
> I have reached a point where I feel it is time to get feedback from more people and to allow others to also take part.
> Some of it is still fairly elementary hacks to "get it to work", I am sure a lot of the code has much room for improvement.
>
> The current work is located on my fork on branch widgets: https://github.com/tbrisker/foreman/tree/widgets
> There is still plenty to do and I would appreciate it if you could contribute by making PRs against my branch or letting me know where I have gone wrong.
>
> Thank you and have a great 2015!
>

– bk

··· On 01/04/2015 05:42 AM, Tomer Brisker wrote:

>
>
>
>> Hello,
>>
>> Over the last couple of months I have been working on redesigning the
>> main foreman dashboard.
>>
>> The motivations behind this:
>> 1. Make more charts available as widgets that can be added to the
>> dashboard.
>> 2. Allow more flexibility and customization for the users in what charts
>> are displayed on their dashboard.
>> 3. Make "widgetizing" various charts and tables easier and more flexible.
>> 4. Make the dashboard consistent for the user across multiple
>> computers/browsers. (Currently, the settings are preserved in local-storage)
>> 5. Permit plugins to more easily allow charts to be added to the
>> dashboard, both as default and optionally.
>>
>
> This will be a big one… how can plugins customize the main dashboard.

Hmm… this is been out there for quite some time see [1]

>
>
> 6. Try to create a standard layout for all widgets.
>>
>
> This may or may not be related… but the ability to generate "reports"
> from the dashboard. Specifically, I am thinking about
>
> * creating CSV's from widget lists
> * Generating PDF or robust html emails which can be sent to folks.
>
> wont csv be mostly on lists?

>
>> What I have done so far:
>> 1. Rewritten most of the current dashboard.
>> 2. Made widgets into a model that belongs to a user.
>> 3. Allowed widgets on the dashboard to be both hidden and deleted.
>> 4. Made both charts on the host view page and the trend charts addable to
>> the dashboard.
>> 5. Separated default widgets from allowed widgets; any permitted widget
>> template can be rendered on the dashboard (this is to prevent addition of
>> arbitrary templates by the user).
>> 6. Moved the saved dashboard settings from local storage to the db.
>>
>> I have reached a point where I feel it is time to get feedback from more
>> people and to allow others to also take part.
>> Some of it is still fairly elementary hacks to "get it to work", I am
>> sure a lot of the code has much room for improvement.
>>
>> The current work is located on my fork on branch widgets:
>> https://github.com/tbrisker/foreman/tree/widgets
>> There is still plenty to do and I would appreciate it if you could
>> contribute by making PRs against my branch or letting me know where I have
>> gone wrong.
>>
>> Thank you and have a great 2015!
>>
>>
> – bk
>
>
> –
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

[1]
http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Adding-a-dashboard-widget

··· On Mon, Jan 5, 2015 at 2:55 PM, Bryan Kearney wrote: > On 01/04/2015 05:42 AM, Tomer Brisker wrote:

>
>
>
>
>
>
> Hello,
>
> Over the last couple of months I have been working on
> redesigning the main foreman dashboard.
>
> The motivations behind this:
> 1. Make more charts available as widgets that can be added to
> the dashboard.
> 2. Allow more flexibility and customization for the users in
> what charts are displayed on their dashboard.
> 3. Make "widgetizing" various charts and tables easier and more
> flexible.
> 4. Make the dashboard consistent for the user across multiple
> computers/browsers. (Currently, the settings are preserved in
> local-storage)
> 5. Permit plugins to more easily allow charts to be added to the
> dashboard, both as default and optionally.
>
>
> This will be a big one… how can plugins customize the main dashboard.
>
>
> Hmm… this is been out there for quite some time see [1]

ok… thanks.

>
>
>
> 6. Try to create a standard layout for all widgets.
>
>
> This may or may not be related… but the ability to generate
> "reports" from the dashboard. Specifically, I am thinking about
>
> * creating CSV's from widget lists
> * Generating PDF or robust html emails which can be sent to folks.
>
> wont csv be mostly on lists?

yes, I was assuming the second bullet was for the entire dashboard page.
That brings up another item… can I create my own dashboards? one by
default, and hten I can create page X, Page Y, Page Z?

– bk

··· On 01/05/2015 07:57 AM, Ohad Levy wrote: > On Mon, Jan 5, 2015 at 2:55 PM, Bryan Kearney > wrote: > On 01/04/2015 05:42 AM, Tomer Brisker wrote:

Update - a PR is open for this here [1], feel free to comment on it.

Responses to the questions inline below.

[1] - https://github.com/theforeman/foreman/pull/2046

> From: "Bryan Kearney" <bryan.kearney@gmail.com>
> To: foreman-dev@googlegroups.com
> Sent: Monday, January 5, 2015 4:48:57 PM
> Subject: Re: [foreman-dev] Dashboard redesign
>
>
>
> >
> >
> >
> >
> >
> >
> > Hello,
> >
> > Over the last couple of months I have been working on
> > redesigning the main foreman dashboard.
> >
> > The motivations behind this:
> > 1. Make more charts available as widgets that can be added to
> > the dashboard.
> > 2. Allow more flexibility and customization for the users in
> > what charts are displayed on their dashboard.
> > 3. Make "widgetizing" various charts and tables easier and more
> > flexible.
> > 4. Make the dashboard consistent for the user across multiple
> > computers/browsers. (Currently, the settings are preserved in
> > local-storage)
> > 5. Permit plugins to more easily allow charts to be added to the
> > dashboard, both as default and optionally.
> >
> >
> > This will be a big one… how can plugins customize the main dashboard.
> >
> >
> > Hmm… this is been out there for quite some time see [1]
>
> ok… thanks.
>

Right now plugins can only add widgets that are displayed by default on the dashboard.
My idea here is to allow plugins to also add widget templates that can be added with dynamic data to the dashboard by the user on demand (similar to what I have implemented so far for the host and trends charts).

> >
> >
> >
> > 6. Try to create a standard layout for all widgets.
> >
> >
> > This may or may not be related… but the ability to generate
> > "reports" from the dashboard. Specifically, I am thinking about
> >
> > * creating CSV's from widget lists
> > * Generating PDF or robust html emails which can be sent to folks.
> >
> > wont csv be mostly on lists?
>
> yes, I was assuming the second bullet was for the entire dashboard page.
> That brings up another item… can I create my own dashboards? one by
> default, and hten I can create page X, Page Y, Page Z?
>

Not really sure what you meant by creating csv's from the widget list…

I think generating reports as pdf/html mail from the dashboard should not be complicated to implement after this is merged.
Since the widgets are saved on the server, we can simply render the user's dashboard, dump it into a PDF/HTML file and mail it.

As to creating multiple dashboards, this isn't currently planned as part of this, but I think it will be possible to add in the future if needed.

··· ----- Original Message ----- > On 01/05/2015 07:57 AM, Ohad Levy wrote: > > On Mon, Jan 5, 2015 at 2:55 PM, Bryan Kearney > > wrote: > > On 01/04/2015 05:42 AM, Tomer Brisker wrote:

– bk


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.