Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62533

Jenkins System Message CSS No Longer Works

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • None
    • Jenkins: 2.222.4 (jenkins/jenkins:2.222.4)
      OS: Jenkins running on Kubernetes
      Kubernetes: 1.15.6
      Browers: Chrome, Firefox, Safari

      Per https://stackoverflow.com/questions/42628297/displaying-announcement-on-all-jenkins-pages, we use some built in stylesheets to add highlighting to some System Description messages we post on our Jenkins masters. For example when we detect low disk space, we add the following to the Jenkins system description (screenshot attached)

      <div id="shutdown-msg"> *** ALERT - HIGH DISK USAGE: Used 60.99 GB (97.01%) out of 62.87 GB total available space *** </div>

      This worked fine while running Jenkins v2.204.2

      After upgrading to v2.222.4, this no longer works, there is no highlighting applied. 

      I can see the associated css id's are defined in JENKINS_HOME/war/css/style.css file (just as there were when it was working).

      When viewing the page source for both the working and non working versions, you ca see the div id's are getting stripped in the latest version of Jenkins LTS. 

       

      # Old - Working - v2.204.2
      <div id="systemmessage">
        <div id="shutdown-msg">
          *** ALERT - HIGH DISK USAGE: Used 62.69 GB (91.15%) out of 68.78 GB total available space ***&#9;<br> <a href="http://in/JenkinsDiskCleanup">How To Clean Up Disk Space</a>
        </div>
        <div id="jenkins-admins-msg">
          Jenkins Admins : []
        </div>
      </div>
      
      # New - Broken - v2.222.4
      <div id="systemmessage">
       <div>
         *** ALERT - HIGH DISK USAGE: Used 62.69 GB (91.15%) out of 68.78 GB total available space ***&#9;<br> <a href="http://in/JenkinsDiskCleanup">How To Clean Up Disk Space</a>
       </div>
       <div>
         Jenkins Admins : []
       </div>
      </div>

       

      Any idea on a workaround for this?

            Unassigned Unassigned
            mikenau_intuit Mike Nau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: