widgets.less 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. @import 'common.less';
  19. @undo-btn-margin: 10px;
  20. @controls-min-width: 55px;
  21. @combo-widget-width: 100px;
  22. @overriden-property-bg-color: rgba(211, 237, 247, 0.39);
  23. @overriden-property-widget-padding: 8px;
  24. @green: #6ebd45;
  25. @slider-light-grey: #e6e6e6;
  26. @slider-dark-grey: #aaaaaa;
  27. @slider-widget-border-color: #999;
  28. @slider-widget-width: 220px;
  29. @slider-widget-tooltip-background-color: @green;
  30. @slider-widget-selection-background-color: @slider-dark-grey;
  31. @slider-widget-body-height: 10px;
  32. @slider-widget-body-background-color: @slider-light-grey;
  33. @slider-widget-tick-height: 6px;
  34. @slider-widget-tick-width: 1px;
  35. @slider-widget-tick-background-color: @slider-dark-grey;
  36. @slider-widget-tick-label-color: @slider-dark-grey;
  37. @slider-widget-tooltip-background: @slider-widget-tooltip-background-color;
  38. @slider-widget-disabled-selection-background-color: lighten(@slider-widget-selection-background-color, 20%);
  39. @widget-config-override-action-color: #cbcbcb;
  40. @widget-config-override-action-active-color: #acacac;
  41. @toggle-widget-handle-background-color: #f3f3f3;
  42. @toggle-widget-text-color: #fff;
  43. @toggle-widget-text-size: 12px;
  44. @toggle-widget-on-background-color: #aaa;
  45. @toggle-widget-off-background-color: @green;
  46. .widget-config {
  47. margin-bottom: 11px;
  48. clear: both;
  49. .widget-config-label {
  50. font-size: 90%;
  51. width: 100%;
  52. &.text-success {
  53. color: @green;
  54. }
  55. .icon-warning-sign {
  56. &.warning {
  57. color: @health-status-yellow
  58. }
  59. }
  60. }
  61. .action-button {
  62. margin-right: @undo-btn-margin;
  63. }
  64. .widget-config-controls {
  65. float: right;
  66. display: inline-block;
  67. margin-left: 10px;
  68. min-height: 65px;
  69. min-width: @controls-min-width;
  70. z-index: 1;
  71. position: relative;
  72. &.version-labels {
  73. min-width: 52px;
  74. .label-current {
  75. padding: 2px 3px 3px 5px;
  76. }
  77. .icon-lock {
  78. position: relative;
  79. top: 2px;
  80. left: 2px;
  81. color: #ccc;
  82. }
  83. }
  84. .widget-col {
  85. width: 18px;
  86. &.left {
  87. float: left;
  88. }
  89. &.right {
  90. float: right;
  91. }
  92. }
  93. .widget-action {
  94. text-decoration: none;
  95. //display: block;
  96. }
  97. .widget-action-set-recommended,
  98. .widget-action-final,
  99. .widget-action-switch-view {
  100. padding-left: 1px;
  101. color: @widget-config-override-action-color;
  102. &.active {
  103. color: @widget-config-override-action-active-color;
  104. }
  105. &.text-error {
  106. color: #b94a48;
  107. }
  108. }
  109. }
  110. .clear-min-height {
  111. min-height: 0;
  112. }
  113. .widget-config-raw {
  114. width: calc(~"100% - 30px -"@controls-min-width);
  115. }
  116. &.slider-widget {
  117. width: 100%;
  118. margin-left: -20px;
  119. margin-right: 0;
  120. padding-left: 20px;
  121. }
  122. // background hack instead of increasing padding,
  123. // because we have lack of space for widget container.
  124. &.overridden-property {
  125. background-color: @overriden-property-bg-color;
  126. position: relative;
  127. &:before {
  128. height: 100%;
  129. width: @overriden-property-widget-padding;
  130. content: '';
  131. position: absolute;
  132. top: 0;
  133. display: block;
  134. background-color: @overriden-property-bg-color;
  135. }
  136. &:before {
  137. left: -@overriden-property-widget-padding;
  138. }
  139. }
  140. }
  141. .widget-config-comparison .widget-config&.slider-widget {
  142. overflow-x: visible;
  143. }
  144. .slider-widget .widget-config-comparison .version-labels {
  145. top: 20px;
  146. }
  147. .directory-textarea-wrapper {
  148. float: left;
  149. width: 80%;
  150. }
  151. .list-widget {
  152. li, li:active {
  153. a, a:hover, a:focus, a:active, a:visited {
  154. background-color: #fff !important;
  155. background-image: none !important;
  156. color: #333 !important;
  157. }
  158. }
  159. }
  160. .slider-widget {
  161. .widget-config-label {
  162. display: inline-block;
  163. padding-bottom: 13px;
  164. margin-bottom: 15px;
  165. }
  166. .slider-track {
  167. height: @slider-widget-body-height !important;
  168. border-radius: 0;
  169. .slider-track-high {
  170. background-color: @slider-widget-body-background-color;
  171. border-radius: 0;
  172. }
  173. }
  174. .slider.slider-horizontal {
  175. width: @slider-widget-width;
  176. .tooltip {
  177. margin-top: -24px;
  178. opacity: 1;
  179. font-size: 10px;
  180. line-height: 14px;
  181. min-width: 30px;
  182. z-index: 1;
  183. visibility: inherit;
  184. &.tooltip-min,
  185. &.tooltip-max {
  186. display: none;
  187. }
  188. .tooltip-inner {
  189. padding: 0 2px;
  190. background-color: @slider-widget-tooltip-background-color;
  191. text-align: center;
  192. }
  193. .tooltip-arrow {
  194. bottom: 2px;
  195. margin-left: -4px;
  196. border-top-color: @slider-widget-tooltip-background-color;
  197. border-width: 4px 4px 0;
  198. }
  199. }
  200. .slider-tick {
  201. width: 0;
  202. margin-top: 10px;
  203. margin-left: 0;
  204. font-size: 8px;
  205. &:before,
  206. &.in-selection:before {
  207. content: '';
  208. display: block;
  209. width: 1px;
  210. height: 8px;
  211. background-color: @slider-widget-tick-background-color;
  212. }
  213. &.last {
  214. margin-left: -1px;
  215. }
  216. &.slider-tick-default {
  217. width: 0;
  218. height: 0;
  219. border-left: 5px solid transparent;
  220. border-right: 5px solid transparent;
  221. border-bottom: 5px solid @slider-dark-grey;
  222. margin-left: -5px;
  223. > span {
  224. color: @slider-widget-tick-label-color;
  225. font-size: 10px;
  226. }
  227. &::before {
  228. display: none;
  229. }
  230. }
  231. }
  232. &.slider-disabled {
  233. .tooltip-arrow {
  234. border-top-color: lighten(@green, 20%);;
  235. }
  236. .tooltip-inner {
  237. background-color: lighten(@green, 20%);;
  238. }
  239. }
  240. }
  241. .slider-handle {
  242. margin-top: -4px !important;
  243. height: 14px;
  244. width: 3px;
  245. margin-left: -1px !important;
  246. background-color: @slider-widget-selection-background-color;
  247. background-image: none;
  248. border-radius: 0;
  249. }
  250. .slider-tick-label-container {
  251. margin-top: 0;
  252. }
  253. .slider-tick-label {
  254. color: @slider-widget-tick-label-color;
  255. font-size: 10px;
  256. .slider-tick-reset-label {
  257. color: @slider-widget-tick-label-color;
  258. margin-left: 6px;
  259. }
  260. }
  261. .slider-selection {
  262. background-image: none;
  263. background-color: @slider-widget-selection-background-color;
  264. border-radius: 0;
  265. box-shadow: none;
  266. }
  267. .ui-slider-wrapper {
  268. .ui-slider-wrapper-inner {
  269. width: 68%;
  270. width: calc(~"100% - 30px -"@controls-min-width);
  271. max-width: 68%;
  272. padding-left: 10px;
  273. .slider.slider-horizontal {
  274. width: 100%;
  275. }
  276. }
  277. .ui-slider-label {
  278. color: #aaa;
  279. line-height: 35px;
  280. }
  281. }
  282. .overrideField {
  283. margin-top: 30px;
  284. .ui-slider-wrapper-inner {
  285. padding-top: 20px;
  286. }
  287. }
  288. }
  289. .slider-disabled {
  290. .slider-track-high {
  291. background-color: @slider-widget-disabled-selection-background-color;
  292. border-bottom-right-radius: 12px;
  293. border-top-right-radius: 12px;
  294. }
  295. .slider-selection {
  296. background-color: @slider-widget-disabled-selection-background-color;
  297. }
  298. .slider-track {
  299. div.slider-handle {
  300. background-image: none;
  301. background-color: @slider-widget-disabled-selection-background-color;
  302. }
  303. }
  304. }
  305. .spinner-input-widget {
  306. .spinner-input {
  307. display: inline-block;
  308. padding: 0 5px;
  309. line-height: normal;
  310. float: left;
  311. .input-append.input-prepend {
  312. margin: 0;
  313. }
  314. input {
  315. width: 20px;
  316. font-size: 12px;
  317. text-align: center;
  318. }
  319. .btn {
  320. &:first-child {
  321. padding-left: 4px;
  322. padding-right: 2px;
  323. }
  324. &:last-child {
  325. padding-left: 2px;
  326. padding-right: 4px;
  327. }
  328. }
  329. .spinner-input-label {
  330. font-size: 11px;
  331. }
  332. }
  333. .undo-button {
  334. padding: 2px 10px;
  335. float: left;
  336. }
  337. }
  338. .toggle-widget {
  339. .undo-button {
  340. margin-left: @undo-btn-margin;
  341. }
  342. }
  343. .bootstrap-switch {
  344. &,
  345. &.bootstrap-switch-focused {
  346. border-color: transparent;
  347. box-shadow: none;
  348. }
  349. .bootstrap-switch-label {
  350. background-color: @toggle-widget-handle-background-color;
  351. background-image: none;
  352. text-shadow: none;
  353. border-width: 0;
  354. padding: 2px 8px;
  355. border-left: 1px solid transparent;
  356. border-right: 1px solid transparent;
  357. border-bottom: 1px solid @toggle-widget-handle-background-color;
  358. }
  359. .bootstrap-switch-handle-on,
  360. .bootstrap-switch-handle-off {
  361. color: @toggle-widget-text-color;
  362. font-size: @toggle-widget-text-size;
  363. background-image: none;
  364. text-shadow: none;
  365. border: none;
  366. padding: 2px 0;
  367. &:hover {
  368. text-shadow: none;
  369. color: @toggle-widget-text-color;
  370. }
  371. &.bootstrap-switch-default {
  372. background-color: @toggle-widget-on-background-color;
  373. }
  374. &.bootstrap-switch-success {
  375. background-color: @toggle-widget-off-background-color;
  376. }
  377. &.bootstrap-switch-default,
  378. &.bootstrap-switch-success {
  379. color: @toggle-widget-text-color;
  380. background-image: none;
  381. text-shadow: none;
  382. }
  383. }
  384. }
  385. .combo-widget {
  386. .input-append {
  387. .btn-group {
  388. display: inline-block;
  389. margin-left: -1px;
  390. > input {
  391. border-radius: 3px 0 0 3px;
  392. width: @combo-widget-width;
  393. &[disabled] {
  394. background: #fff;
  395. cursor: default;
  396. }
  397. }
  398. .btn {
  399. border-radius: 0 3px 3px 0;
  400. }
  401. }
  402. ul.dropdown-menu {
  403. z-index: 1100; // menu-items shouldn't be under popover
  404. }
  405. }
  406. .disabled {
  407. .dropdown {
  408. input[type="text"] {
  409. background-color: #eee;
  410. }
  411. }
  412. }
  413. .action-button {
  414. margin-left: @undo-btn-margin;
  415. }
  416. }
  417. .checkbox-widget {
  418. .widget-config-label {
  419. margin-left: 10px;
  420. width: auto;
  421. }
  422. .bootstrap-checkbox {
  423. &>button.btn {
  424. padding: 0;
  425. color: @green;
  426. &:focus {
  427. border-color: none;
  428. box-shadow: 0;
  429. outline: 0 none;
  430. }
  431. }
  432. .icon-check-empty {
  433. margin-left: -3px;
  434. }
  435. }
  436. }
  437. .text-field-widget {
  438. .text-field-wrapper {
  439. width: 70%;
  440. float: left;
  441. }
  442. }
  443. #serviceConfig {
  444. .text-field-widget {
  445. .with-unit input {
  446. width: 75%;
  447. }
  448. }
  449. }
  450. .label-current.icon-ok {
  451. color: white;
  452. }
  453. .compare-mode {
  454. background-color: rgba(211, 237, 247, 0.39);
  455. padding: 10px 5px 0 10px;
  456. }