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

Frontend for configuring PoE in Portadmin #2759

Merged
merged 6 commits into from
Nov 24, 2023

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Nov 23, 2023

Adds frontend elements for changing PoE state in portadmin

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (f4707b0) 55.62% compared to head (6e8ff9f) 56.00%.
Report is 20 commits behind head on master.

Files Patch % Lines
python/nav/web/portadmin/views.py 4.34% 22 Missing ⚠️
python/nav/web/portadmin/utils.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2759      +/-   ##
==========================================
+ Coverage   55.62%   56.00%   +0.38%     
==========================================
  Files         567      567              
  Lines       41224    41279      +55     
==========================================
+ Hits        22932    23120     +188     
+ Misses      18292    18159     -133     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Nov 23, 2023

Test results

     12 files       12 suites   11m 41s ⏱️
3 291 tests 3 291 ✔️ 0 💤 0
9 348 runs  9 348 ✔️ 0 💤 0

Results for commit 6e8ff9f.

♻️ This comment has been updated with latest results.

@lunkwill42 lunkwill42 linked an issue Nov 24, 2023 that may be closed by this pull request
Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rough-cut looks a bit ugly, and I'm not sure where I can actually test it (if we have functioning test equipment, please do DM me)

The issue with the rows of the interface table breaking into two lines seems to be because of the magic rules of the "faketable" used.

The table uses a small-12 style, which apparently means that all the columns use medium-* styles to indicate their relative sizes in the table. All the columns' usages of medium-* classes need to add up to the available 12, apparently (which is why there is some magic on the save button column, which takes into account another collapsible column that comes and goes - so you may have to do more of that magic to ensure everything always adds up to 12 :P )

@lunkwill42
Copy link
Member

I can now add that I've tested against a Juniper switch, and functionality-wise this seems golden. Don't have access to a Cisco device, though.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does the trick!

However, it doesn't look optimal if the screen size is reduced to, say, a typical iPad (but it looks ok on a phone-sized screen). I'm not going to bother you with fixing that in this PR, but let's post an issue to fix it later (and get a front-end dev involved)

Great work, @stveit !

@lunkwill42 lunkwill42 merged commit f9a100f into Uninett:master Nov 24, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PoE options to PortAdmin frontend
2 participants