Feature request: Refactor templates #821

Closed
opened 2025-12-29 16:26:05 +01:00 by adam · 3 comments
Owner

Originally created by @marc-us on GitHub (Apr 2, 2017).

Hi,

I would like to refactor the templates.
1.) The menu is not so much intuitive. Instead of have separate menu for "import" and "add" would be good to move on the listing page. (it is also good for angular based refactor)
2.) Make global search always available.
3.) Move to some action menu the current buttons on top right to have more space for tables.
4.) Generate breadcrumbs, instead of static content.
5.) Changes done by other users accessible on all pages (notification bar) not just on home page. (This is a bigger change, so I think it need another FR)

I have done this for our project, but would like to contribute back some parts.:
screen shot 2017-04-02 at 02 29 52
screen shot 2017-04-02 at 02 30 29

But any idea is welcome to be implemented by me.

Originally created by @marc-us on GitHub (Apr 2, 2017). Hi, I would like to refactor the templates. 1.) The menu is not so much intuitive. Instead of have separate menu for "import" and "add" would be good to move on the listing page. (it is also good for angular based refactor) 2.) Make global search always available. 3.) Move to some action menu the current buttons on top right to have more space for tables. 4.) Generate breadcrumbs, instead of static content. 5.) Changes done by other users accessible on all pages (notification bar) not just on home page. (This is a bigger change, so I think it need another FR) I have done this for our project, but would like to contribute back some parts.: ![screen shot 2017-04-02 at 02 29 52](https://cloud.githubusercontent.com/assets/1804654/24583504/6f3a1b08-174c-11e7-9240-5245c0029119.png) ![screen shot 2017-04-02 at 02 30 29](https://cloud.githubusercontent.com/assets/1804654/24583503/6f2812aa-174c-11e7-8dca-157497935c17.png) But any idea is welcome to be implemented by me.
adam closed this issue 2025-12-29 16:26:05 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 3, 2017):

1.) The menu is not so much intuitive.

I disagree. The navigation menu follows the structure of the data model very closely, and I see no reason to rearrange it.

Instead of have separate menu for "import" and "add" would be good to move on the listing page.

I don't know what you mean by this. "Add" and "import" are separate links because they are different views.

2.) Make global search always available.

We can do this, but there's limited screen space to work with.

3.) Move to some action menu the current buttons on top right to have more space for tables.

The buttons at top right are rendered above the tables, opposite the page heading; they don't interfere with table size.

4.) Generate breadcrumbs, instead of static content.

NetBox already includes navigation breadcrumbs where appropriate. Again, I'm not sure what you mean.

5.) Changes done by other users accessible on all pages (notification bar) not just on home page.

What would be the benefit of this? It's just additional clutter that's usually not of interest.

@jeremystretch commented on GitHub (Apr 3, 2017): > 1.) The menu is not so much intuitive. I disagree. The navigation menu follows the structure of the data model very closely, and I see no reason to rearrange it. > Instead of have separate menu for "import" and "add" would be good to move on the listing page. I don't know what you mean by this. "Add" and "import" are separate links because they are different views. > 2.) Make global search always available. We can do this, but there's limited screen space to work with. > 3.) Move to some action menu the current buttons on top right to have more space for tables. The buttons at top right are rendered above the tables, opposite the page heading; they don't interfere with table size. > 4.) Generate breadcrumbs, instead of static content. NetBox already includes navigation breadcrumbs where appropriate. Again, I'm not sure what you mean. > 5.) Changes done by other users accessible on all pages (notification bar) not just on home page. What would be the benefit of this? It's just additional clutter that's usually not of interest.
Author
Owner

@marc-us commented on GitHub (Apr 3, 2017):

Hi,

The pictures comes from a working site. Not just demo.
1.) I have reorganised to two parts. (One is Inventory another is Networking) Just like usually the DCIM and IPAM is kept separately.
Instead of keeping all the menu point in the base.html I have moved out and generate it from yml file.
2.) On my template you can see that the search kept in right side of menu, any time could be accessed. It is just restructure of the views.py make the form always available.
3.) The buttons is not so much fancy. I have created an action or tool menu, from which the actions like (add, edit, delete, next, previous) could be accessed. Instead of buttons there is icons appear. I plan to move the groups and role management to that menu.
4.) The breadcrumbs is static content within the template. I have created a menu based breadcrumb generation. (somehow it is reuses 1. point)
5.) I have created a notification plugin. Mainly I use it for get the results of the playbook runs, however it is good to be notified if someone has made a change on some object. I have not implemented a read/unread status for them, but I plan to do it later.

Regards,
Mark

@marc-us commented on GitHub (Apr 3, 2017): Hi, The pictures comes from a working site. Not just demo. 1.) I have reorganised to two parts. (One is Inventory another is Networking) Just like usually the DCIM and IPAM is kept separately. Instead of keeping all the menu point in the base.html I have moved out and generate it from yml file. 2.) On my template you can see that the search kept in right side of menu, any time could be accessed. It is just restructure of the views.py make the form always available. 3.) The buttons is not so much fancy. I have created an action or tool menu, from which the actions like (add, edit, delete, next, previous) could be accessed. Instead of buttons there is icons appear. I plan to move the groups and role management to that menu. 4.) The breadcrumbs is static content within the template. I have created a menu based breadcrumb generation. (somehow it is reuses 1. point) 5.) I have created a notification plugin. Mainly I use it for get the results of the playbook runs, however it is good to be notified if someone has made a change on some object. I have not implemented a read/unread status for them, but I plan to do it later. Regards, Mark
Author
Owner

@jeremystretch commented on GitHub (Apr 3, 2017):

1.) I have reorganised to two parts. (One is Inventory another is Networking) Just like usually the DCIM and IPAM is kept separately.

NetBox has more than two parts, which is why the navigation is arranged as it is. For example, your demo has secrets under inventory, which makes no sense. Again, there's no reason to change this.

Instead of keeping all the menu point in the base.html I have moved out and generate it from yml file.

The navigation menu is static content. There is no reason to regenerate it for each view.

4.) The breadcrumbs is static content within the template.

Again, NetBox already generates breadcrumbs in the template. I'm not sure what your goal is here.

I'm going to close out this issue as it's a laundry list of unrelated changes. If there are any proposals you would still like to discuss, please open a new feature request for each one. (When doing so, please be sure to thoroughly describe both the proposed change and a use case.)

@jeremystretch commented on GitHub (Apr 3, 2017): > 1.) I have reorganised to two parts. (One is Inventory another is Networking) Just like usually the DCIM and IPAM is kept separately. NetBox has more than two parts, which is why the navigation is arranged as it is. For example, your demo has secrets under inventory, which makes no sense. Again, there's no reason to change this. > Instead of keeping all the menu point in the base.html I have moved out and generate it from yml file. The navigation menu is static content. There is no reason to regenerate it for each view. > 4.) The breadcrumbs is static content within the template. Again, NetBox already generates breadcrumbs in the template. I'm not sure what your goal is here. I'm going to close out this issue as it's a laundry list of unrelated changes. If there are any proposals you would still like to discuss, please open a new feature request for each one. (When doing so, please be sure to thoroughly describe both the proposed change and a use case.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#821