diff --git a/core/src/main/resources/jenkins/model/GlobalCloudConfiguration/index.groovy b/core/src/main/resources/jenkins/model/GlobalCloudConfiguration/index.groovy index 5fe75363d225..028183c15d5d 100644 --- a/core/src/main/resources/jenkins/model/GlobalCloudConfiguration/index.groovy +++ b/core/src/main/resources/jenkins/model/GlobalCloudConfiguration/index.groovy @@ -17,10 +17,12 @@ l.layout(norefresh:true, permission:app.SYSTEM_READ, title:my.displayName) { } } l.main_panel { - h1 { - l.icon(class: 'icon-health-40to59 icon-xlg') - // TODO more appropriate icon - text(my.displayName) + div(class: "jenkins-app-bar") { + div(class: "jenkins-app-bar__content") { + h1 { + text(my.displayName) + } + } } def clouds = Cloud.all() if (!clouds.isEmpty()) { diff --git a/core/src/main/resources/lib/form/radio.jelly b/core/src/main/resources/lib/form/radio.jelly index 8df9a57dfa40..c549bb49de65 100644 --- a/core/src/main/resources/lib/form/radio.jelly +++ b/core/src/main/resources/lib/form/radio.jelly @@ -43,9 +43,13 @@ THE SOFTWARE. toggles the radio. - - - - +
+ + +
+ +
+
diff --git a/core/src/main/resources/lib/form/serverTcpPort.groovy b/core/src/main/resources/lib/form/serverTcpPort.groovy index 81c70ff3ee26..b57f4453fa4f 100644 --- a/core/src/main/resources/lib/form/serverTcpPort.groovy +++ b/core/src/main/resources/lib/form/serverTcpPort.groovy @@ -9,38 +9,20 @@ package lib.form * port number. The getter method should just expose the port number integer. */ +int port = instance ? instance[field] : 0 -int port = instance?instance[field]:0 - -def f=namespace(lib.FormTagLib) +def f = namespace(lib.FormTagLib) def type = "${field}.type" -def id = "${field}Id" // TODO: get rid of this +def id = "${field}Id" // TODO: get rid of this -div(name:field) { - label { - f.radio(name: type, value:"fixed", - checked:port>0, onclick:"\$('${id}').disabled=false") - text(_("Fixed")) - text(" : ") +div(name: field) { + f.radio(name: type, value: "fixed", title: _("Fixed"), id: "radio-tcp-fixed", checked: port > 0) { + input(type: "number", class: "jenkins-input", name: "value", id: id, placeholder: _("Port"), + value: port > 0 ? port : null, min: 0, max: 65535, step: 1) } - input(type:"number", "class":"number", name:"value", id:id, - value: port>0 ? port : null, disabled: port>0 ? null : "true", - min:0, max:65535, step:1) - - raw(" ") //////////////////////////// - label { - f.radio(name:type, value:"random", - checked:port==0, onclick:"\$('${id}').disabled=true") - text(_("Random")) - } + f.radio(name: type, value: "random", title: _("Random"), id: "radio-tcp-random", checked: port == 0) - raw(" ") //////////////////////////// - - label { - f.radio(name:type, value:"disable", - checked:port==-1, onclick:"\$('${id}').disabled=true") - text(_("Disable")) - } + f.radio(name: type, value: "disable", title: _("Disable"), id: "radio-tcp-disable", checked: port == -1) } diff --git a/war/src/main/less/modules/form.less b/war/src/main/less/modules/form.less index 0611bfde798f..94b7510c452c 100644 --- a/war/src/main/less/modules/form.less +++ b/war/src/main/less/modules/form.less @@ -612,3 +612,19 @@ } } } + +.jenkins-server-tcp-port { + background: red; + display: flex; + align-items: center; + + .jenkins-radio { + margin-bottom: 0; + margin-right: 1rem; + } + + .jenkins-input { + max-width: 300px; + margin-right: 1rem; + } +}