Toggle display of non-empty Connections on Device page #1520
pawsey-kbuckley
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
This sounds awful.
If I were to do something like this I'd just hide the rows in the connection table that aren't currently in use.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: pawsey-kbuckley ***@***.***>
Sent: Wednesday, February 28, 2024 9:35:02 PM
To: opendcim/openDCIM ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [opendcim/openDCIM] Toggle display of non-empty Connections on Device page (Discussion #1520)
We have recently deployed a number of switches (OK: these are Slingshot
switches!) where each "jack" gets a Y-cable plugged into it, which turns a
32-port switch into a Device that thus needs to have 64 "ports" associated
with it. plus its two "management ports"
This not only makes the Connections pane, on the Device page for such
switches, rather tall, but the sparse way in whcih Slingshot cables get
plugged in effectively forces one to scroll a lot to see all the "active"
connections, and so I thought it would be "nice" to try and toggle the
non-empty ports out of sight whilst presenting the connection info.
I worked out an SQL query to achieve this and then started looking
around for a way to get things displayed within the openDCIM web
front-end.
Best approack I have come up with so far would be to take the PHP
file behind the "Show Contacts" button - which pops up a new window
to display the contacts for the value of the Departmental Owner - and
modify that to display my required content, and then add a similar button
next to the word Connections in the Connections pane, which is handily
wrapped in an
<a id="net"> </a>
element, and tie a similar handler to my new button, following the existing
code that attaches the "Show Contacts" popup to its button by tying it to
the #Owner id (rather, that element's next() button in the DOM) of the
Departmental Owner element
Sounds great, even simple, when put like that, doesn't it?
But it doesn't work!
I never seem to get the handler attached to the toggle button, however,
when trying to attach my handler to the "Show Contacts" button - as
I already know I can go direct to the PHP file and see the correct
content displayed outside of a pop-up - I don't get my handler, but
get a new window with the devices.php content in it.
I feel like I have excreted the 99% perspiration, and so just need the
1% inspiration, so,
any inspirational clues as to what I need to check for to achive this?
—
Reply to this email directly, view it on GitHub<#1520>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMTY6SE6OR2JHDF2JIS3O3YV2QWNAVCNFSM6AAAAABD7FV7OWVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGI4TAMJWGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1520", "url": "#1520", "name": "View Discussion" }, "description": "View this Discussion on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have recently deployed a number of switches (OK: these are Slingshot
switches!) where each "jack" gets a Y-cable plugged into it, which turns a
32-port switch into a Device that thus needs to have 64 "ports" associated
with it. plus its two "management ports"
This not only makes the Connections pane, on the Device page for such
switches, rather tall, but the sparse way in whcih Slingshot cables get
plugged in effectively forces one to scroll a lot to see all the "active"
connections, and so I thought it would be "nice" to try and toggle the
non-empty ports out of sight whilst presenting the connection info.
I worked out an SQL query to achieve this and then started looking
around for a way to get things displayed within the openDCIM web
front-end.
Best approack I have come up with so far would be to take the PHP
file behind the "Show Contacts" button - which pops up a new window
to display the contacts for the value of the Departmental Owner - and
modify that to display my required content, and then add a similar button
next to the word Connections in the Connections pane, which is handily
wrapped in an
<a id="net"> </a>
element, and tie a similar handler to my new button, following the existing
code that attaches the "Show Contacts" popup to its button by tying it to
the
#Owner
id (rather, that element's next() button in the DOM) of theDepartmental Owner element
Sounds great, even simple, when put like that, doesn't it?
But it doesn't work!
I never seem to get the handler attached to the toggle button, however,
when trying to attach my handler to the "Show Contacts" button - as
I already know I can go direct to the PHP file and see the correct
content displayed outside of a pop-up - I don't get my handler, but
get a new window with the
devices.php
content in it.I feel like I have excreted the 99% perspiration, and so just need the
1% inspiration, so,
any inspirational clues as to what I need to check for to achive this?
Beta Was this translation helpful? Give feedback.
All reactions