Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Modifying the customHeaderPage.jsp in MAS

  • 1.  Modifying the customHeaderPage.jsp in MAS

    Posted Wed August 07, 2024 07:10 AM

    I found the text below somewhere on a ideas page of IBM.

    "There is an existing slot below the black header bar of Manage that can be used to achieve this. It would display any custom information you might want, including the environment name/type. Try the
     system property: mxe.webclient.customPageHeader=true, and then add your custom content to this file:
    applications\maximo\maximouiweb\webmodule\webclient\customHeader\customHeaderPage.jsp"

    Setting the mxe.webclient.customPageHeader = True brings up indeed the custom Header. So that is good!

    I want to edit this jsp file but the question is where can I find this file?



    ------------------------------
    Vincent Wanders
    ------------------------------


  • 2.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Thu August 08, 2024 03:34 AM

    Hi Vincent,

    One way to do this is to fetch it from Pod's internal storage, provided you have access to OCP cluster. 

    Extract files from MAS OCP Cluster

    1. Login to OCP cluster using OC command line
    2. Switch to Manage project
    3. Execute rsync command
    4. oc rsync inst1-masdev-manage-maxinst-****:/opt/IBM/SMP/maximo/applications/maximo/businessobjects/classes/com/ibm/tivoli/maximo/assethealth/AssetType.class  ./home/myfiles
    5. File will be available to the local file system in WSL of linux adminstration host machine
    6. You can copy and modify as needed
    7. To deploy it back to MAS, use customization archive



    ------------------------------
    Chandan Singh
    ------------------------------



  • 3.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 05:09 AM

    Thanks... As I understand now is that people can connect and exchange files this between the IBM cloud (Openshift) and the local system.

    I did find the file indeed with the help all the reactions here. I only have now access to it through the webportal - and then using the Terminal.
    So many things to learn at this point!



    ------------------------------
    Vincent Wanders
    ------------------------------



  • 4.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Tue October 15, 2024 09:38 AM

    Thnx for your reply.

    It took us quite some time, but we are now able to fetch and edit the file and put it back on the maxinst.

    Is there any straight forward info on the "Deploy it back to MAS"/"Custom archive" part?





    ------------------------------
    Vincent Wanders
    ------------------------------



  • 5.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Thu August 08, 2024 12:59 PM

    Hi Vincent,

    as Chandan mentioned the file can be found in the maxinst POD under /opt/IBM/SMP/maximo/applications/maximo/maximouiweb/webmodule/webclient/customHeader.
    Once you apply desired changes put it under <customization-archive-root>/applications/maximo/maximouiweb/webmodule/webclient/customHeader in order to apply it back.

    If you put some love into CSS styling then you can get something like this.

    We dynamically style the box depending on current environment. You can do that using custom system properties or anything else available using Maximo Java APIs.


    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 6.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 02:28 AM

    In addition, you can use https://github.com/nishi2go/masmanagedev-cli to help you create your customisation file.



    ------------------------------
    If this post helps, please consider accepting it as a solution to help other members find it more quickly.

    Maycon Belfort
    Consultant
    BPD Zenith
    Melbourne
    ------------------------------



  • 7.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 05:11 AM

    Wow.... I like the red bar!
    My understanding of CSS is very basic, but I understand (and can imagine) that beautiful and functional things can be made.

    Many thanks! 



    ------------------------------
    Vincent Wanders
    ------------------------------



  • 8.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 10:29 AM

    "anything else available using Maximo Java APIs" ... like calling an autoscript so you don't have to redeploy to make changes.



    ------------------------------
    Blessings,
    Jason Uppenborn
    Sr. Technical Maximo Consultant
    Cohesive
    ------------------------------



  • 9.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 10:40 AM

    @Jason Uppenborn technically yes, I can imagine calling specific automation script to get whatever data you like. The other thing is how would you like to visualize it?

    The natural way of doing this would be to leave the visualization to the JSP and somehow generate the HTML wrapping the data produced by the automation script. Alternatively you could leave everything to the automation script so instead of returning the data only it can actually return the HTML content which you directly inject into JSP response.



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 10.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 05:06 AM

    Hi,

    I have a similar requirement, could you please let me know what changes have you done to achieve the change(Red header)?

    Thanks in advance.



    ------------------------------
    Aparna S V
    ------------------------------



  • 11.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 05:16 AM

    Hi Aparna,

    @Bartosz Marchewka can you fill in as you're the actual author of this specific header styling?

    However if you're running MAS9+ then as @Jan-Willem Steur pointed out there might be better ways of achieving similar result across all MAS applications - not only local to MAS Manage. If you're interested then just have a look at Jan-Willem's replies in this thread.



    ------------------------------
    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V.
    Wrocław, Poland
    ------------------------------



  • 12.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 06:10 AM

    Hi @Aparna SV

    The minimum changes that are required to have this style for environment header you can find below.

    1. <customization-archive-root>/applications/maximo/maximouiweb/webmodule/webclient/customHeader/customHeaderPage.jsp

    <div class="envRibbon">
    	<span>DEV-MASTER</span>
    </div>

    2. <customization-archive-root>/applications/maximo/maximouiweb/webmodule/webclient/skins/mas8/css/customHeaderPage.css

    .mx--custom-header {
      padding: 0rem 1rem;
      min-height: 0rem;
      background: #acacac;
      display: flex; 
      align-items: center;
    }
    
    .envRibbon {
      right: 50%;
      top: -35px;
      overflow: hidden;
      width: 25%;
      height: auto;
      text-align: center;
      position: fixed;
      left: 50%;
      transform: translate(-50%, 0%);
      background: linear-gradient(#40a020 0%, #008000 100%);
      box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
      border-radius:50px/100%;
      z-index: 2;
    }
    
    .envRibbon span {
      padding-top: 38px;
      color: #EFEFEF;
      font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-weight: bold;
      text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
      padding-bottom: 3px;
      color: white;
      display: inline-block;
      color: #EFEFEF;
      font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      font-style: normal;
      font-weight: bold;
      text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    }


    ------------------------------
    Bartosz Marchewka
    IBM Maximo Consultant
    AFRY
    ------------------------------



  • 13.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 12:25 PM

    Thanks for the reply. I have done the changes from OCP terminal (maxinst pod). After this the changes are not reflecting. I assumed that pods will rebuild on its own,  and i can see the changes, but its not. Am i missing any step here ?



    ------------------------------
    Aparna S V
    ------------------------------



  • 14.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 12:36 PM

    Hi Aparna,

    maxinst POD storage is ephemeral and is populated during the maxinst image build process being part of overall ManageWorkspace operator reconciliation process. Therefore whatever changes you make directly to a maxinst POD will not take any effect.

    As I mentioned in my earlier post once you apply desired changes you need to put the file under <customization-archive-root>/applications/maximo/maximouiweb/webmodule/webclient/customHeader (NOTE: customization-archive) and refer to this new customization archive in your ManageWorkspace resource configuration. This will trigger maxinst and manage ALL/UI/etc. images rebuild process which will effectively make use of your changes.



    ------------------------------
    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V.
    Wrocław, Poland
    ------------------------------



  • 15.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 28, 2025 09:50 AM

    Thanks a lot for quick reply. I have tried for MAS 9, and i am able to follow the steps in Tech zone environment. However, only challenge i am facing is the step to upload customization archive. I have reserved IBM Cloud Object Storage in Tech zone and also i am able to create a bucket and upload the customization archive(zip folder), but i am not able to get the URL for the same.



    ------------------------------
    Aparna S V
    ------------------------------



  • 16.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Mon April 07, 2025 06:47 AM

    Many thanks for quick reply. I tried in MAS 9 and i can change the header and logo. However, same thing i want to try in MAS 8x (once i get a TEST env)



    ------------------------------
    Aparna S V
    ------------------------------



  • 17.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 05:05 AM

    Hi Vincent,

    As from version MAS9 white labeling is part of front-end configuration in the MAS Core admin console. I have used this new feature and it enables you to change the banner color, add your own logo as well as change the titles.  As a test I have done this on the Maximo Secrets MAS9 instance that @Andrew Jeffery is using for his MaximoSecrets articles.

    A sneak preview:

    Regards,


    ------------------------------
    Jan-Willem Steur
    Manager Business Development
    ZNAPZ b.v.
    Breda
    +31 6 25639950
    Jan-Willem
    ------------------------------



  • 18.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 05:21 AM

    Great input @Jan-Willem Steur. Thank you!



    ------------------------------
    Andrzej Więcław
    Maximo Technical Consultant
    AFRY
    Wrocław, Poland
    ------------------------------



  • 19.  RE: Modifying the customHeaderPage.jsp in MAS

    Posted Fri August 09, 2024 05:28 AM

    In addition to my previous reply (since you can only edit the text and not add "forgotten images"), the MAS9 features also are visible in either manage, Health and other addons (except Monitor and WIOTP, since they are using different containers, jsp files and are not accessible via MAF-Tools directly. Another approach to add only a coloured TAG which is possible for all Graphite related apps (and manage-shell is also a graphite app) since MAS 8.7, and this works out for you if you don't have upgraded to MAS9 yet.







    ------------------------------
    Jan-Willem Steur
    Manager Business Development
    ZNAPZ b.v.
    Breda
    +31 6 25639950
    Jan-Willem
    ------------------------------