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

poe settings/status: Port ID update #34

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

davidk
Copy link
Collaborator

@davidk davidk commented Jun 30, 2023

Hi Martin,
This pull will change 'Port ID' to use the hidden form field instead of the value found in the UI.

resolves #33

Change 'Port ID' to use the form field instead of value in UI

resolves nitram509#33
@davidk davidk requested a review from nitram509 as a code owner June 30, 2023 05:53
@codecov-commenter
Copy link

Codecov Report

Merging #34 (b67f1da) into main (dfb7e91) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #34   +/-   ##
=======================================
  Coverage   40.90%   40.90%           
=======================================
  Files          14       14           
  Lines         660      660           
=======================================
  Hits          270      270           
  Misses        381      381           
  Partials        9        9           
Impacted Files Coverage Δ
poe_settings.go 69.73% <100.00%> (ø)
poe_status.go 70.12% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

# This patch only, with Port ID 1 set to a label
$ ./ntgrrc poe status -a gs308epp
| Port ID | Status   | PortPwr class | Voltage (V) | Current (mA) | PortPwr (W) | Temp. (°C) | Error status |
|---------|----------|---------------|-------------|--------------|-------------|------------|--------------|
| 1       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 2       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 3       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 4       | Disabled |               | 0           | 0            | 0.00        | 30         | No Error     |
| 5       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 6       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 7       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 8       | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
$ ./ntgrrc poe settings -a gs308epp
| Port ID | Port Power | Mode    | Priority | Limit Type | Limit (W) | Type     | Longer Detection Time |
|---------|------------|---------|----------|------------|-----------|----------|-----------------------|
| 1       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 2       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 3       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 4       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 5       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 6       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 7       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 8       | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

# The same changes above, adding in a new column and data for port name to validate that port name 
# being set does not cause issues with port ID numbering
$ ./ntgrrc poe status -a gs308epp
| Port ID | Port Name | Status   | PortPwr class | Voltage (V) | Current (mA) | PortPwr (W) | Temp. (°C) | Error status |
|---------|-----------|----------|---------------|-------------|--------------|-------------|------------|--------------|
| 1       | up-link   | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 2       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 3       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 4       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 5       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 6       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 7       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
| 8       |           | Disabled |               | 0           | 0            | 0.00        | 32         | No Error     |
$ ./ntgrrc poe settings -a gs308epp
| Port ID | Port Name | Port Power | Mode    | Priority | Limit Type | Limit (W) | Type     | Longer Detection Time |
|---------|-----------|------------|---------|----------|------------|-----------|----------|-----------------------|
| 1       | up-link   | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 2       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 3       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 4       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 5       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 6       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 7       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |
| 8       |           | disabled   | 802.3at | low      | user       | 30.0      | IEEE 802 | disable               |

@davidk davidk merged commit 036fba7 into nitram509:main Jul 6, 2023
@davidk davidk deleted the portID branch July 6, 2023 01:40
@nitram509
Copy link
Owner

Thank you David for solving this.

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

Successfully merging this pull request may close these issues.

Port ID always 0
3 participants