glpi
glpi copied to clipboard
feat(socket): mutualize view from location and permit to link location to socket
Mutualize socket view between assets and Location

Allow to link Location to Socket (to represent socket outlets)

| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes/no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #number |
@rbrannath , @KongNan can you test this PR ?
@KongNan can you test this PR ? I met an error and replied that in #11893
@KongNan can you test this PR ? I met an error and replied that in #11893
Hi @KongNan
you can download a build for this PR (just install it as an official release)
https://github.com/stonebuzz/glpi/actions/runs/2595029352
I'm sorry, although I was able to install your build successfully, I (and my translation engine) don't recognize the French in your picture and I can't make any more judgments. However, from your description, you want to "represent" the outlet, which is great, and I hope that this representation appropriately reflects "an outlet located in a room". Thank you!
@stonebuzz, this is working as expected.
@trasher also this PR
Same answer. I'm already asked to do a review, please stop ping me.
Hi @KongNan can you do a functional review of current PR?
Best regards
@KongNan
Note that we have doubts about the addition of locations in the socket_type list.
A Location is not an asset.
Best regards
Note that we have doubts about the addition of locations in the
socket_typelist.
Little precision: this means current PR may never be merged. Fact is what you want to achieve is probably not possible with only a few changes like done here. There is a better solution we've been talking about in the team; but that would require much more time to be done. Maybe should you consider asking a specific development, contact pro services in that case.
Hi @KongNan can you do a functional review of current PR?
I'm very sorry, because my English is not good and I don't know French, so I feel helpless in this matter (as I said before: I (and my translation engine) don't recognize the French in your picture and I can't make any more judgments.)
Can you request @rbrannath to do it? He has great insight on the subject, as described in https://github.com/glpi-project/glpi/issues/10720#issuecomment-1077588981, but unfortunately that issue is closed. If possible, I hope you can address this scenario in your future considerations: https://github.com/glpi-project/glpi/issues/10720#issuecomment-1183446568 . If I continue to speak, it will probably only be to my superficial understanding to the detriment of actually solving the problem. So again, sorry, We need rbrannath .
Regards
you can download a build for this PR (just install it as an official release)
For completeness, I actually found https://github.com/stonebuzz/glpi/actions/runs/3005615443 at https://github.com/stonebuzz/glpi/actions and installed it.
Then used Google Lens to translate your screenshot from French to English and found Lieu for Location.
So I went into DropDown -> Locations, added the socket and took a screenshot comparing it as follows, just FYI.


@KongNan
Note that we have doubts about the addition of locations in the
socket_typelist.A
Locationis not anasset.Best regards @stonebuzz Agree,
Locationinsocket_typelist appeals to be a good idea at the first glance, but considering there is already a fieldLocationit might be confusing for some users (also your hint that is isn't an asset, is true as well).
Wouldn't it be the best and easiest approach, to simply add an field "is_outlet" to the socket and then disable/delete itemtype / asset connections to this socket?
Right now, I could live with the existing field Location and just leaving the itemtype / asset fields blank. In the Location form, there is already a functionality to add several sockets, but if no itemtype is selected, the socket is broken (because no itemtype).
Note that we have doubts about the addition of locations in the
socket_typelist.Little precision: this means current PR may never be merged. Fact is what you want to achieve is probably not possible with only a few changes like done here. There is a better solution we've been talking about in the team; but that would require much more time to be done. Maybe should you consider asking a specific development, contact pro services in that case.
@trasher, would you mind to share the approach you brought up in your team? I don't know, if this PR is the right place for this, though.
@rbrannath
A way to handle this would be to create a new NetworkOutlet asset type, that would clearly represent a network outlet. I personnaly think this is the best solution, as it would permit to handle it like any other asset. This is similar to what we have done with PassiveDCEquipment to handle patch panels in datacenters.
@trasher @orthagh Would you consider this solution as acceptable ?
yes
I close this PR as an alternative solution has to be proposed. See my previous comment.