"Edit Menu" to access legacy Mango pages
-
Hello,
I am using Mango 3.3.3 and Centos 7.4.I would like all of our users to have left hand menu items for the following:
- Data Points (already available)
- Events (already available)
- Watchlists (already available)
- Help (already available)
- Reports (from reports.shtm)
- Excel Reports (from excel-reports.shtm)
- Custom Graphics dashboard (not created yet but will be used as the home page)
I am stuck on the first menu item that I am trying to set up: Reports.
I have created the menu item as shown in the screen shot:The Report item appears in the menu list as you can see in the screen shot, it also appears in the menu list for my users. However, clicking the Report menu item does not open the reports page. If I right click and choose open in a new tab or new window I can access the reports page.
Have I configured the menu item wrong?
Cheers,
Brian -
Hi BG,
I was able to link to the reports page using the configuration you have provided. I wonder, might you have another tab open that you already opened into the legacy UI? With the "Target Window" being set to the "Mango legacy window" that means it will attempt to redirect that existing tab (the one with the matching tab name, probably opened the first time you opened the legacy UI from the new UI) to the configured page. Is it possible it was redirecting that tab? I would have expected it to focus on that tab, though, as it does in my browser.
If that's not what's happening and you're up to date, check the developer tools to see if there's an error when you click it normally.
-
Hello Phil,
Thank you for your reply.
I have deleted the menu item and created a new one. It now works.I think the URL wasn't being picked up correctly with the previous menu item. When you go into edit the menu item it showed the correct URL, but when the menu item was displayed in the item list the URL was not the same.
Cheers
Brian -
Strange. Thanks for sharing the resolution!
-
Hello,
I am revisiting this thread because I have moved one step further in my requirements.
The reports and excel reports menu items are working and opening a new tab in legacy view for Mango 3. I have amended the web address to include the commands to remove the header, footer and toolbar as shown in the screen shot below:However, if the user deletes part of the text in the address bar, the toolbar comes back as shown below:
My fear is that the user will then continue to use the legacy buttons for the Data Points Details, Events, Watchlist and Graphics View.
Where can I edit the toolbar to remove the buttons for the items that are now incorporated into the Mango 3 UI?
Thank you for your help.
Cheers
Brian -
Hi Brian,
You will need to modify a few files, but it should be pretty easy. You can then put the modified files into the Mango/overrides/web/ directory in the same place they were in the Mango/web directory. Specifically, you will want to modify Mango/web/WEB-INF/tags/page.tag, change
<page:header showHeader="${showHeader}"/> <page:toolbar showToolbar="${showToolbar}"/>
to
<c:choose> <c:when test="${!empty sessionUser && sessionUser.admin}"> <page:header showHeader="${showHeader}"/> <page:toolbar showToolbar="${showToolbar}"/> </c:when> <c:otherwise> <page:header showHeader="false"/> <page:toolbar showToolbar="false"/> </c:otherwise> </c:choose>
and
<c:if test="${empty showFooter || showFooter == true}">
to
<c:if test="${empty showFooter || showFooter == true && (empty sessionUser || sessionUser.admin)}">
Then you'll want to modify the header.tag, toolbar.tag, and footer.tag files in Mango/web/WEB-INF/tags/html5/. Specifically, I would wrap everything in the outer most HTML tag in a
<c:if test="${!empty sessionUser && sessionUser.admin}"></c:if>
The header for instance,<header> <img id="application_logo" src="<%=Common.applicationLogo%>?v=${lastUpgrade}" alt="Logo" /> <c:if test="${!empty instanceDescription}"><span class="instance-description">${instanceDescription}</span></c:if> <div class="event-summary"> <div class="level-summary none-event" style="display:none"></div> <div class="level-summary information-event" style="display:none"></div> <div class="level-summary important-event" style="display:none"></div> <div class="level-summary warning-event" style="display:none"></div> <div class="level-summary urgent-event" style="display:none"></div> <div class="level-summary critical-event" style="display:none"></div> <div class="level-summary life-safety-event" style="display:none"></div> </div> </header>
<header> <c:if test="${!empty sessionUser && sessionUser.admin}"> <img id="application_logo" src="<%=Common.applicationLogo%>?v=${lastUpgrade}" alt="Logo" /> <c:if test="${!empty instanceDescription}"><span class="instance-description">${instanceDescription}</span></c:if> <div class="event-summary"> <div class="level-summary none-event" style="display:none"></div> <div class="level-summary information-event" style="display:none"></div> <div class="level-summary important-event" style="display:none"></div> <div class="level-summary warning-event" style="display:none"></div> <div class="level-summary urgent-event" style="display:none"></div> <div class="level-summary critical-event" style="display:none"></div> <div class="level-summary life-safety-event" style="display:none"></div> </div> </c:if> </header>
-
Thank you Phil,
I will give this a try.Cheers
Brian -
Hello Phil,
Fantastic! That works perfectly now.Cheers
Brian -
Glad to hear it :D
As I'm sure you saw, you can probably drop all the URL parameters for hiding things now.