diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index dfbaaf79ef66..7404034a0018 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -186,6 +186,9 @@ public class Functions { private static final AtomicLong iota = new AtomicLong(); private static Logger LOGGER = Logger.getLogger(Functions.class.getName()); + @Restricted(NoExternalUse.class) + public static /* non-final */ boolean UI_REFRESH = SystemProperties.getBoolean("jenkins.ui.refresh"); + public Functions() { } @@ -493,6 +496,16 @@ public static String getSystemProperty(String key) { return SystemProperties.getString(key); } + /** + * Returns true if and only if the UI refresh is enabled. + * + * @since TODO + */ + @Restricted(DoNotUse.class) + public static boolean isUiRefreshEnabled() { + return UI_REFRESH; + } + public static Map getEnvVars() { return new TreeMap<>(EnvVars.masterEnvVars); } diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly index c4809218dec2..b4b1c8bb2937 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.jelly @@ -27,7 +27,11 @@ THE SOFTWARE.
- ${it.activeAdministrativeMonitorsCount} + + + + ${it.activeAdministrativeMonitorsCount} +
@@ -41,7 +45,14 @@ THE SOFTWARE.
diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties index 60f6fe569480..a6f9d9eb11e9 100644 --- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties +++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/footer.properties @@ -1 +1,2 @@ -tooltip=There are {0} active administrative monitors. \ No newline at end of file +tooltip=There are {0} active administrative monitors. +monitors={0,choice,0#monitors|1#monitor|1
-
- - - + + +
- -
  • - -
  • + + ${%DISABLE AUTO REFRESH} -
  • -
  • + ${%ENABLE AUTO REFRESH}
    - - - - - - +
    +
    -
    diff --git a/core/src/main/resources/lib/layout/breadcrumbs.css b/core/src/main/resources/lib/layout/breadcrumbs.css index 26c4683a8a12..30b65c2c423c 100644 --- a/core/src/main/resources/lib/layout/breadcrumbs.css +++ b/core/src/main/resources/lib/layout/breadcrumbs.css @@ -1,70 +1,115 @@ #left-top-nav { - text-align: left; - color: #222; -} - -#right-top-nav { - float: right; - margin-right: 1em; - height: 2em; - line-height: 2em; + text-align: left; + color: #222; } #left-top-nav a { - color: black; + color: black; } #top-nav .a { - color: white; + color: white; +} + +.breadcrumbs__wrapper { + display: flex; + justify-content: space-between; + align-items: center; + min-height: 2.5rem; + font-size: 1rem; + line-height: 1.5; + font-family: Roboto, Helvetica, Arial, sans-serif; + padding: 0 1.25rem; + background-color: #F8F8F8; +} + +/* + Revert the font change to the options menu. + It's used all over the application and having Roboto may make it clash with other UI elements +*/ +#breadcrumb-menu { + font-family: Helvetica, Arial, sans-serif; } #breadcrumbs { list-style-type: none; - padding: 0 0 0 8px; margin: 0; - height: 2em; - border-bottom: 1px solid #d3d7cf; - display:block; + padding: 0; + min-height: 2.5rem; + display: block; + display: flex; + align-items: center; + flex: 1; + border-bottom: none; + flex-wrap: wrap; } #breadcrumbs LI { - float:left; - line-height:2em; - height: 2em; - color:#555753; display:inline-block; + min-height: 2.5rem; } -#breadcrumbs LI A { - display: block; - padding-left: 0.75em; - line-height: 2em; +#breadcrumbs LI A, +.breadcrumbs__auto-refresh { + display: inline-block; + display: inline-flex; + align-items: center; + height: 2.5rem; + padding: 0 0.5rem; } #breadcrumbs LI:hover, A.breadcrumbBarAnchor.mouseIsOverMenuSelector { background-color: #e0e4dc; } -#breadcrumbs LI A:link, #breadcrumbs LI A:visited { - text-decoration:none; - color:#555753; - display: block; + +#breadcrumbs LI A, #breadcrumbs LI A:link, #breadcrumbs LI A:visited, +.breadcrumbs__auto-refresh:link, .breadcrumbs__auto-refresh:visited { + /* is this still needed? */ max-width: 1330px; - float: left; + text-overflow: ellipsis; + text-decoration: none; overflow: hidden; white-space: nowrap; + font-weight: bold; + + display: inline-block; + display: inline-flex; + color: #4d545d; } -#breadcrumbs LI A:hover, #crumbs LI A:focus { - color:#3465a4; +#breadcrumbs LI A:hover, #breadcrumbs LI A:focus, +.breadcrumbs__auto-refresh:hover, .breadcrumbs__auto-refresh:focus { + /* TODO: change hover state + add it in the LI element so that it applies to the menuSeparator */ + text-decoration: underline; + outline-color: #3FB3F7; +} + +#breadcrumbs LI A:active, .breadcrumbs__auto-refresh:active { + background-color: #C8CEC2; +} + +#breadcrumbs LI A { + cursor: pointer; +} + +.breadcrumbs__auto-refresh { + text-transform: lowercase; + margin-left: 1.5rem; } #breadcrumbs LI.children, #breadcrumbs LI.separator {/* '>' separator between two items */ - width: 16px; + width: 1.25rem; + height: 100%; + display: inline-block; + display: inline-flex; + align-items: center; background-image: url(menu_right_arrow2.png); background-position: center center; background-repeat: no-repeat; + } #breadcrumbs LI.children { @@ -80,21 +125,21 @@ } #menuSelector {/* used for showing 'v' on the right of the anchor */ - background-color:transparent; - background-image: url(menu_down_arrow.png); - background-position: center center; - background-repeat: no-repeat; - width: 15px; - height:16px; - position: absolute; - visibility: hidden; - cursor: pointer; - z-index: 2000; + background-color:transparent; + background-image: url(menu_down_arrow.png); + background-position: center center; + background-repeat: no-repeat; + width: 15px; + height:16px; + position: absolute; + visibility: hidden; + cursor: pointer; + z-index: 2000; } #menuSelector.inverse { - background-image: url(menu_down_arrow2.png); + background-image: url(menu_down_arrow2.png); } A.model-link.inside, #breadcrumbs A.inside {/* additional 'inside' class allows pre-allocation of the context menu space */ - padding-right: 16px; + padding-right: 16px; } diff --git a/core/src/main/resources/lib/layout/html.jelly b/core/src/main/resources/lib/layout/html.jelly index 0a56c939ad03..5fa717b34748 100644 --- a/core/src/main/resources/lib/layout/html.jelly +++ b/core/src/main/resources/lib/layout/html.jelly @@ -80,7 +80,7 @@ THE SOFTWARE. - + ${h.checkPermission(it,permission)} diff --git a/core/src/main/resources/lib/layout/layout.jelly b/core/src/main/resources/lib/layout/layout.jelly index cac4b0d8934d..3cb5787cc411 100644 --- a/core/src/main/resources/lib/layout/layout.jelly +++ b/core/src/main/resources/lib/layout/layout.jelly @@ -92,7 +92,7 @@ THE SOFTWARE. - + ${h.checkPermission(it,permission)} @@ -101,8 +101,8 @@ THE SOFTWARE. ${h.appendIfNotNull(title, ' [Jenkins]', 'Jenkins')} - - + + @@ -156,6 +156,9 @@ THE SOFTWARE. + + + @@ -185,60 +188,12 @@ THE SOFTWARE.