Menu on Management Portal
Has anybody tried to extend the Menu on Management Portal? I like to add a new page or a dashboard that will be created soon to the Management Portal and allow others to use it also. I understand there are risks that I could lose things during an upgrade. I am okay with that. Does InterSystems support such an effort?
Comments
Easiest way to do that is to add a favorite:
set sc = ##class(%SYS.Portal.Users).%AddFavorite("Community","https://community.intersystems.com")And your portal now looks like this:
.png)
Is the favorite visible to more than one user?
No, one user only.
You can iterate over users and add favorites for each.
Seems this trusty bit of code I've been using for a while no longer works on 2025.1
Direct set still works (must be executed in %SYS):
set^SYS("Portal","UsersD",$username,"Community")=$lb("","https://community.intersystems.com")FWIW, I would not recommend users touch this global. It is internal and InterSystems may (and does) change how it's used without notice.
Hi @Benjamin De Boe 😊
In general I agree 100%, BUT, if you need to add a favorite now, then the "right thing to do" would be:
- Open a WRC and explain the issue...may take some time depending on your luck...
- WRC open an issue, wait for developers to look at it and fix it
- Wait for patch/ad-hoc, how long? Probably 2~3 weeks for this not so critical issue
- Install the ad-hoc and...finally you get your favorite in Management Portal!
Another option is to fix it yourself, the problem is due to the property Data in %SYS.Portal.Users class that is defined as %List but in fact is used by the portal code as a string.
The "misuse" of Data property went unnoticed until version 2025 that implements/introduce %IsValid() method for %List datatype and that's why the %AddFavorite() method does not work anymore. Note that if you call %AddFavorite() passing (correctly) a %List ($list), then the method works, the favorite does not, because the portal code that read the Data property treat it as a String, not a $List!
Fixing this is simple, just edit %SYS.Portal.Users class (after modifying IRISLIB db to R/W and back when you are done...) and change Data datatype from %List to %String.
OR....just set the damn global, enjoy your favorite and go back to business! 😁
Anyone willing to report this to WRC? ...not me 😉
It is part of my job description to say you shouldn't touch internal globals ;-)
see you in Orlando!
It seems that adding to favorites via the management portal itself has also stopped working. Interestingly, there is no error in this case.
Add to favorites in Management Portal
@Eduard Lebedyuk - I just found this while looking to do the same thing. You say that adding a favorite is the easiest way - are there other approaches as well short of editing code you shouldn't edit?
No, the entire menu is hardcoded as is.
You can use DeepSee/BI User Portal (advantage: public items are available for everyone, disadvantage: requires navigation to a specific ns), but real SMP menu modification requires editing code you shouldn't edit.
Why not favorites? You can autopopulate it on ZSTART.