Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit display size of Intended/Actual config in Device tab #860

Closed
justinbrink opened this issue Jan 7, 2025 · 5 comments · Fixed by #861
Closed

Limit display size of Intended/Actual config in Device tab #860

justinbrink opened this issue Jan 7, 2025 · 5 comments · Fixed by #861

Comments

@justinbrink
Copy link
Contributor

Environment

  • Nautobot version: 2.3+
  • nautobot-golden-config version: next

Proposed Functionality

Limit the size of the intended and actual config panels in the Config Compliance Device tab with css max-height. These panels usually contain most of the same information and when the lines get beyond 50 it's completely unusable for comparison anyway. In some cases, they could be hundreds or thousands of lines of config. Making a simple change to the max-height on the fields allows them to fit together and scroll. This has no impact on the copy function for each config type. It also has no impact on the extra or missing sections, or any config that is smaller than the limit.

This could easily be a configuration option, by adding it to the Golden Config Settings, and even specify a desired max-height. This also pairs well with issue #789.

Without configuration, this only requires a minor CSS change in the configcompliance_devicetab.html template:

    #compliance-content td.config_hover span[id*="_intended"] pre {
        max-height: 300px;
    }
    #compliance-content td.config_hover span[id*="_actual"] pre {
        max-height: 300px;
    }

Use Case

Any user comparing config compliance on the device tab will have an easier time identifying compliance changes and a better user experience.

Original (not user friendly):
image

Limited (much more usable):
image

@itdependsnetworks
Copy link
Contributor

@jeffkala @cmsirbu thoughts?

@jeffkala
Copy link
Contributor

jeffkala commented Jan 8, 2025

Copy button still copy the whole block and not just what is currently visible? Otherwise I think this is a great update.

@justinbrink
Copy link
Contributor Author

@jeffkala Yeah, copy still works the same. I'll put in a PR for this today. Do we want to make this a config option, or just put it in as the default?

@cmsirbu
Copy link
Contributor

cmsirbu commented Jan 8, 2025

Agreed it's an improvement for the current layout! I vaguely remember seeing (maybe in the public slack?) someone suggesting a horizontal side-by-side layout instead for these tables for an even more condensed view, which I thought looked pretty good.

Found it... Dec 30th from user named Bal:

image

@justinbrink
Copy link
Contributor Author

I like the side by side, but I'd really like to see the intended/actual as an actual diff in a single scroll panel. I think this current limit and Matt's section collapse together would be good for now, and this horizontal kind of layout should be the next target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants