global-style.js 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996
  1. import { createGlobalStyle } from 'styled-components';
  2. import { transparentize } from 'polished';
  3. import { borderRadius, color, fontSize } from 'weaveworks-ui-components/lib/theme/selectors';
  4. import '@fortawesome/fontawesome-free/css/all.css';
  5. import '@fortawesome/fontawesome-free/css/v4-shims.css';
  6. import 'rc-slider/dist/rc-slider.css';
  7. const scopeTheme = key => props => props.theme.scope[key];
  8. const hideable = props => `
  9. transition: opacity .5s ${props.theme.scope.baseEase};
  10. `;
  11. const palable = props => `
  12. transition: all .2s ${props.theme.scope.baseEase};
  13. `;
  14. const blinkable = props => `
  15. animation: blinking 1.5s infinite ${props.theme.scope.baseEase};
  16. `;
  17. const colorable = props => `
  18. transition: background-color .3s ${props.theme.scope.baseEase};
  19. `;
  20. /* add this class to truncate text with ellipsis, container needs width */
  21. const truncate = () => `
  22. white-space: nowrap;
  23. overflow: hidden;
  24. text-overflow: ellipsis;
  25. `;
  26. const shadow2 = props => `
  27. box-shadow: 0 3px 10px ${transparentize(0.84, props.theme.colors.black)}, 0 3px 10px ${transparentize(0.77, props.theme.colors.black)};
  28. `;
  29. const btnOpacity = props => `
  30. ${palable(props)};
  31. opacity: ${props.theme.scope.btnOpacityDefault};
  32. &-selected {
  33. opacity: ${props.theme.scope.btnOpacitySelected};
  34. }
  35. &[disabled] {
  36. cursor: default;
  37. opacity: ${props.theme.scope.btnOpacityDisabled};
  38. }
  39. &:not([disabled]):hover {
  40. opacity: ${props.theme.scope.btnOpacityHover};
  41. }
  42. `;
  43. /* From https://stackoverflow.com/a/18294634 */
  44. const fullyPannable = () => `
  45. width: 100%;
  46. height: 100%;
  47. /* stylelint-disable value-no-vendor-prefix */
  48. /* Grabbable */
  49. cursor: move; /* fallback if grab cursor is unsupported */
  50. cursor: grab;
  51. cursor: -moz-grab;
  52. cursor: -webkit-grab;
  53. &.panning {
  54. /* Grabbing */
  55. cursor: grabbing;
  56. cursor: -moz-grabbing;
  57. cursor: -webkit-grabbing;
  58. }
  59. /* stylelint-enable value-no-vendor-prefix */
  60. `;
  61. const overlayWrapper = props => `
  62. align-items: center;
  63. background-color: ${transparentize(0.1, props.theme.colors.purple25)};
  64. border-radius: ${props.theme.borderRadius.soft};
  65. color: ${props.theme.scope.textTertiaryColor};
  66. display: flex;
  67. font-size: ${props.theme.fontSizes.tiny};
  68. justify-content: center;
  69. padding: 5px;
  70. position: fixed;
  71. bottom: 11px;
  72. button {
  73. ${btnOpacity(props)};
  74. background-color: transparent;
  75. border: 1px solid transparent;
  76. border-radius: ${props.theme.borderRadius.soft};
  77. color: ${props.theme.scope.textSecondaryColor};
  78. cursor: pointer;
  79. line-height: 20px;
  80. padding: 1px 3px;
  81. outline: 0;
  82. i {
  83. font-size: ${props.theme.fontSizes.small};
  84. position: relative;
  85. top: 2px;
  86. }
  87. &:hover, &.selected {
  88. border: 1px solid ${props.theme.scope.textTertiaryColor};
  89. }
  90. &.active {
  91. & > * { ${blinkable(props)}; }
  92. border: 1px solid ${props.theme.scope.textTertiaryColor};
  93. }
  94. }
  95. `;
  96. const GlobalStyle = createGlobalStyle`
  97. /*
  98. * Contain all the styles in the root div instead of having them truly
  99. * global, so that they don't interfere with the app they're injected into.
  100. */
  101. .scope-app, .terminal-app {
  102. /* Extendable classes */
  103. .hideable { ${hideable}; }
  104. .palable { ${palable}; }
  105. .blinkable { ${blinkable}; }
  106. .colorable { ${colorable}; }
  107. .truncate { ${truncate}; }
  108. .shadow-2 { ${shadow2}; }
  109. .btn-opacity { ${btnOpacity}; }
  110. .fully-pannable { ${fullyPannable}; }
  111. .overlay-wrapper { ${overlayWrapper}; }
  112. /* General styles */
  113. -webkit-font-smoothing: antialiased;
  114. background: ${scopeTheme('bodyBackgroundColor')};
  115. bottom: 0;
  116. color: ${scopeTheme('textColor')};
  117. font-family: ${props => props.theme.fontFamilies.regular};
  118. font-size: ${fontSize('small')};
  119. height: auto;
  120. left: 0;
  121. line-height: 150%;
  122. margin: 0;
  123. overflow: auto;
  124. position: fixed;
  125. right: 0;
  126. top: 0;
  127. width: 100%;
  128. a {
  129. text-decoration: none;
  130. }
  131. .iAOmmf{
  132. font-size: ${fontSize('small')};
  133. }
  134. * {
  135. box-sizing: border-box;
  136. -webkit-tap-highlight-color: transparent;
  137. }
  138. *:before,
  139. *:after {
  140. box-sizing: border-box;
  141. }
  142. p {
  143. line-height: 20px;
  144. padding-top: 6px;
  145. margin-bottom: 14px;
  146. letter-spacing: 0;
  147. font-weight: 400;
  148. color: ${scopeTheme('textColor')};
  149. }
  150. h2 {
  151. font-size: ${fontSize('extraLarge')};
  152. line-height: 40px;
  153. padding-top: 8px;
  154. margin-bottom: 12px;
  155. font-weight: 400;
  156. }
  157. .browsehappy {
  158. margin: 0.2em 0;
  159. background: ${color('gray200')};
  160. color: ${color('black')};
  161. padding: 0.2em 0;
  162. }
  163. .hang-around {
  164. transition-delay: .5s;
  165. }
  166. .overlay {
  167. ${hideable};
  168. background-color: ${color('white')};
  169. position: absolute;
  170. width: 100%;
  171. height: 100%;
  172. top: 0;
  173. left: 0;
  174. opacity: 0;
  175. pointer-events: none;
  176. z-index: ${props => props.theme.layers.modal};
  177. &.faded {
  178. /* NOTE: Not sure if we should block the pointer events here.. */
  179. pointer-events: all;
  180. cursor: wait;
  181. opacity: 0.5;
  182. }
  183. }
  184. .hide {
  185. opacity: 0;
  186. }
  187. &.time-travel-open {
  188. .details-wrapper {
  189. margin-top: ${scopeTheme('timelineHeight')} + 50px;
  190. }
  191. }
  192. .header {
  193. background-color: transparentize(${color('purple25')}, 0.2);
  194. z-index: ${props => props.theme.layers.front};
  195. padding: 15px 10px 0;
  196. position: relative;
  197. width: 100%;
  198. .selectors {
  199. display: flex;
  200. position: relative;
  201. > * {
  202. flex: 1 1;
  203. }
  204. .logo {
  205. margin: -16px 0 0 8px;
  206. height: 64px;
  207. max-width: 250px;
  208. min-width: 0;
  209. }
  210. }
  211. }
  212. .nodes-wrapper{
  213. height:calc(100% - 100px);
  214. }
  215. .rc-slider {
  216. .rc-slider-step { cursor: pointer; }
  217. .rc-slider-track { background-color: ${scopeTheme('textTertiaryColor')}; }
  218. .rc-slider-rail { background-color: ${scopeTheme('borderLightColor')}; }
  219. .rc-slider-handle { border-color: ${scopeTheme('textTertiaryColor')}; }
  220. }
  221. .footer {
  222. ${overlayWrapper};
  223. right: 43px;
  224. &-status {
  225. margin-right: 1em;
  226. }
  227. &-label, .pause-text {
  228. margin: 0 0.25em;
  229. }
  230. &-versionupdate {
  231. margin-right: 0.5em;
  232. }
  233. &-tools {
  234. display: flex;
  235. }
  236. &-icon {
  237. margin-left: 0.5em;
  238. }
  239. .tooltip-wrapper {
  240. position: relative;
  241. .tooltip {
  242. display: none;
  243. background-color: ${color('black')};
  244. position: absolute;
  245. color: ${color('white')};
  246. text-align: center;
  247. line-height: 22px;
  248. border-radius: ${borderRadius('soft')};
  249. font-size: ${fontSize('tiny')};
  250. margin-bottom: 25px;
  251. margin-left: -4px;
  252. opacity: 0.75;
  253. padding: 10px 20px;
  254. bottom: 0;
  255. left: 10px;
  256. transform: translateX(-50%);
  257. white-space: nowrap;
  258. z-index: ${props => props.theme.layers.tooltip};
  259. /* Adjusted from http://www.cssarrowplease.com/ */
  260. &:after {
  261. border: 6px solid transparent;
  262. content: ' ';
  263. top: 100%;
  264. left: 50%;
  265. height: 0;
  266. width: 0;
  267. position: absolute;
  268. border-color: transparent;
  269. border-top-color: ${color('black')};
  270. margin-left: -6px;
  271. }
  272. }
  273. &:hover .tooltip {
  274. display: block;
  275. }
  276. }
  277. }
  278. .zoomable-canvas svg {
  279. ${fullyPannable};
  280. }
  281. .topologies-selector {
  282. margin: 0 4px;
  283. display: flex;
  284. .topologies-item {
  285. margin: 0px 8px;
  286. &-label {
  287. font-size: ${fontSize('normal')};
  288. }
  289. }
  290. .topologies-sub {
  291. &-item {
  292. &-label {
  293. font-size: ${fontSize('small')};
  294. }
  295. }
  296. }
  297. .topologies-item-main,
  298. .topologies-sub-item {
  299. pointer-events: all;
  300. color: ${scopeTheme('textSecondaryColor')};
  301. ${btnOpacity};
  302. cursor: pointer;
  303. padding: 4px 8px;
  304. border-radius: ${borderRadius('soft')};
  305. opacity: 0.9;
  306. margin-bottom: 3px;
  307. border: 1px solid transparent;
  308. white-space: nowrap;
  309. &-active, &:hover {
  310. color: ${scopeTheme('textColor')};
  311. background-color: ${scopeTheme('backgroundDarkerColor')};
  312. }
  313. &-active {
  314. opacity: 0.85;
  315. }
  316. &-matched {
  317. border-color: ${color('blue400')};
  318. }
  319. }
  320. .topologies-sub-item {
  321. padding: 2px 8px;
  322. }
  323. }
  324. .nodes-chart-overlay {
  325. pointer-events: none;
  326. opacity: ${scopeTheme('nodeElementsInBackgroundOpacity')};
  327. &:not(.active) {
  328. display: none;
  329. }
  330. }
  331. .nodes-chart, .nodes-resources {
  332. &-error, &-loading {
  333. ${hideable};
  334. pointer-events: none;
  335. position: absolute;
  336. left: 50%;
  337. top: 50%;
  338. margin-left: -16.5%;
  339. margin-top: -275px;
  340. color: ${scopeTheme('textSecondaryColor')};
  341. width: 33%;
  342. height: 550px;
  343. display: flex;
  344. flex-direction: column;
  345. justify-content: center;
  346. .heading {
  347. font-size: ${fontSize('normal')};
  348. }
  349. &-icon {
  350. text-align: center;
  351. opacity: 0.25;
  352. font-size: ${props => props.theme.overlayIconSize};
  353. }
  354. li { padding-top: 5px; }
  355. }
  356. /* Make watermarks blink only if actually shown (otherwise the FF performance decreses weirdly). */
  357. &-loading:not(.hide) &-error-icon-container {
  358. ${blinkable};
  359. }
  360. &-loading {
  361. text-align: center;
  362. }
  363. svg {
  364. ${hideable};
  365. position: absolute;
  366. top: 0px;
  367. }
  368. .logo {
  369. display: none;
  370. }
  371. svg.exported {
  372. .logo {
  373. display: inline;
  374. }
  375. }
  376. text {
  377. font-family: ${props => props.theme.fontFamilies.regular};
  378. fill: ${scopeTheme('textSecondaryColor')};
  379. }
  380. .nodes-chart-elements .matched-results {
  381. background-color: ${scopeTheme('labelBackgroundColor')};
  382. }
  383. .edge {
  384. .link-none {
  385. fill: none;
  386. display: none;
  387. }
  388. .link-storage {
  389. fill: none;
  390. stroke: ${scopeTheme('edgeColor')};
  391. stroke-dasharray: 1, 30;
  392. stroke-linecap: round;
  393. }
  394. .link {
  395. fill: none;
  396. stroke: ${scopeTheme('edgeColor')};
  397. }
  398. .shadow {
  399. fill: none;
  400. stroke: ${color('blue400')};
  401. stroke-opacity: 0;
  402. }
  403. &.highlighted {
  404. .shadow {
  405. stroke-opacity: ${scopeTheme('edgeHighlightOpacity')};
  406. }
  407. }
  408. }
  409. .edge-marker {
  410. color: ${scopeTheme('edgeColor')};
  411. fill: ${scopeTheme('edgeColor')};
  412. }
  413. }
  414. .matched-results {
  415. text-align: center;
  416. &-match {
  417. font-size: ${fontSize('small')};
  418. &-wrapper {
  419. display: inline-block;
  420. margin: 1px;
  421. padding: 2px 4px;
  422. background-color: transparentize(${color('blue400')}, 0.9);
  423. }
  424. &-label {
  425. color: ${scopeTheme('textSecondaryColor')};
  426. margin-right: 0.5em;
  427. }
  428. }
  429. &-more {
  430. font-size: ${fontSize('tiny')};
  431. color: ${color('blue700')};
  432. margin-top: -2px;
  433. }
  434. }
  435. .details {
  436. &-wrapper {
  437. position: fixed;
  438. display: flex;
  439. z-index: ${props => props.theme.layers.toolbar};
  440. right: ${scopeTheme('detailsWindowPaddingLeft')};
  441. top: 100px;
  442. bottom: 48px;
  443. transition: transform 0.33333s cubic-bezier(0,0,0.21,1), margin-top .15s ${scopeTheme('baseEase')};
  444. }
  445. }
  446. .node-details {
  447. height: 100%;
  448. width: ${scopeTheme('detailsWindowWidth')};
  449. display: flex;
  450. flex-flow: column;
  451. margin-bottom: 12px;
  452. padding-bottom: 2px;
  453. border-radius: ${borderRadius('soft')};
  454. background-color: ${color('white')};
  455. ${shadow2};
  456. /* keep node-details above the terminal. */
  457. z-index: ${props => props.theme.layers.front};
  458. overflow: hidden;
  459. &:last-child {
  460. margin-bottom: 0;
  461. }
  462. &-tools-wrapper {
  463. position: relative;
  464. }
  465. &-tools {
  466. position: absolute;
  467. top: 6px;
  468. right: 8px;
  469. .close-details {
  470. position: relative;
  471. z-index: ${props => props.theme.layers.front};
  472. }
  473. > i {
  474. ${btnOpacity};
  475. padding: 4px 5px;
  476. margin-left: 2px;
  477. font-size: ${fontSize('normal')};
  478. color: ${color('white')};
  479. cursor: pointer;
  480. border: 1px solid transparent;
  481. border-radius: ${borderRadius('soft')};
  482. span {
  483. font-family: ${props => props.theme.fontFamilies.regular};
  484. font-size: ${fontSize('small')};
  485. margin-left: 4px;
  486. span {
  487. text-transform: capitalize;
  488. font-size: ${fontSize('normal')};
  489. margin-left: 0;
  490. }
  491. }
  492. &:hover {
  493. border-color: ${props => transparentize(0.4, props.theme.colors.white)};
  494. }
  495. }
  496. }
  497. .match {
  498. background-color: ${props => transparentize(0.7, props.theme.colors.blue400)};
  499. border: 1px solid ${color('blue400')};
  500. }
  501. &-header {
  502. ${colorable};
  503. &-wrapper {
  504. padding: 12px 24px;
  505. }
  506. &-label {
  507. color: ${color('white')};
  508. margin: 0;
  509. width: 348px;
  510. padding-top: 0;
  511. }
  512. .details-tools {
  513. position: absolute;
  514. top: 16px;
  515. right: 24px;
  516. }
  517. &-notavailable {
  518. background-color: ${scopeTheme('backgroundDarkColor')};
  519. }
  520. }
  521. &-relatives {
  522. margin-top: 4px;
  523. font-size: ${fontSize('normal')};
  524. color: ${color('white')};
  525. &-link {
  526. ${truncate};
  527. ${btnOpacity};
  528. display: inline-block;
  529. margin-right: 0.5em;
  530. cursor: pointer;
  531. text-decoration: underline;
  532. opacity: ${scopeTheme('linkOpacityDefault')};
  533. max-width: 12em;
  534. }
  535. &-more {
  536. ${btnOpacity};
  537. padding: 0 2px;
  538. cursor: pointer;
  539. font-size: ${fontSize('tiny')};
  540. font-weight: bold;
  541. display: inline-block;
  542. position: relative;
  543. top: -5px;
  544. }
  545. }
  546. &-controls {
  547. white-space: nowrap;
  548. padding: 8px 0;
  549. font-size: ${fontSize('small')};
  550. &-wrapper {
  551. padding: 0 36px 0 32px;
  552. }
  553. .node-control-button {
  554. color: ${color('white')};
  555. }
  556. &-spinner {
  557. ${hideable};
  558. color: ${color('white')};
  559. margin-left: 8px;
  560. }
  561. &-error {
  562. ${truncate};
  563. float: right;
  564. width: 55%;
  565. padding-top: 6px;
  566. text-align: left;
  567. color: ${color('white')};
  568. &-icon {
  569. ${blinkable};
  570. margin-right: 0.5em;
  571. }
  572. }
  573. }
  574. &-content {
  575. flex: 1;
  576. padding: 0 24px 0 24px;
  577. overflow-y: auto;
  578. &-loading {
  579. margin-top: 48px;
  580. text-align: center;
  581. font-size: ${fontSize('huge')};
  582. color: ${scopeTheme('textTertiaryColor')};
  583. }
  584. &-section {
  585. margin: 16px 0;
  586. &-header {
  587. font-size: ${fontSize('normal')};
  588. color: ${scopeTheme('textTertiaryColor')};
  589. margin-bottom: 20px;
  590. }
  591. }
  592. }
  593. &-health {
  594. &-wrapper {
  595. display: flex;
  596. justify-content: space-around;
  597. align-content: center;
  598. text-align: center;
  599. flex-wrap: wrap;
  600. }
  601. &-overflow {
  602. ${btnOpacity};
  603. flex-basis: 33%;
  604. display: flex;
  605. flex-direction: row;
  606. flex-wrap: wrap;
  607. align-items: center;
  608. opacity: 0.85;
  609. cursor: pointer;
  610. position: relative;
  611. padding-bottom: 16px;
  612. &-item {
  613. padding: 4px 8px;
  614. line-height: 1.2;
  615. flex-basis: 48%;
  616. &-value {
  617. color: ${scopeTheme('textSecondaryColor')};
  618. font-size: ${fontSize('normal')};
  619. }
  620. &-label {
  621. color: ${scopeTheme('textSecondaryColor')};
  622. font-size: ${fontSize('tiny')};
  623. }
  624. }
  625. }
  626. &-item {
  627. padding: 8px 16px;
  628. width: 33%;
  629. display: flex;
  630. flex-direction: column;
  631. flex-grow: 1;
  632. &-label {
  633. color: ${scopeTheme('textSecondaryColor')};
  634. font-size: ${fontSize('small')};
  635. }
  636. &-sparkline {
  637. margin-top: auto;
  638. }
  639. &-placeholder {
  640. font-size: ${fontSize('large')};
  641. opacity: 0.2;
  642. margin-bottom: 0.2em;
  643. }
  644. }
  645. &-link-item {
  646. ${btnOpacity};
  647. cursor: pointer;
  648. opacity: ${scopeTheme('linkOpacityDefault')};
  649. width: 33%;
  650. display: flex;
  651. color: inherit;
  652. .node-details-health-item {
  653. width: auto;
  654. }
  655. }
  656. }
  657. &-info {
  658. &-field {
  659. display: flex;
  660. align-items: baseline;
  661. &-label {
  662. text-align: right;
  663. width: 30%;
  664. color: ${scopeTheme('textSecondaryColor')};
  665. padding: 0 0.5em 0 0;
  666. white-space: nowrap;
  667. font-size: ${fontSize('small')};
  668. &::after {
  669. content: ':';
  670. }
  671. }
  672. &-value {
  673. font-size: ${fontSize('small')};
  674. flex: 1;
  675. /* Now required (from chrome 48) to get overflow + flexbox behaving: */
  676. min-width: 0;
  677. color: ${scopeTheme('textColor')};
  678. }
  679. }
  680. }
  681. &-property-list {
  682. &-controls {
  683. margin-left: -4px;
  684. }
  685. &-field {
  686. display: flex;
  687. align-items: baseline;
  688. &-label {
  689. text-align: right;
  690. width: 50%;
  691. color: ${scopeTheme('textSecondaryColor')};
  692. padding: 0 0.5em 0 0;
  693. white-space: nowrap;
  694. font-size: ${fontSize('small')};
  695. &::after {
  696. content: ':';
  697. }
  698. }
  699. &-value {
  700. font-size: ${fontSize('small')};
  701. flex: 1;
  702. /* Now required (from chrome 48) to get overflow + flexbox behaving: */
  703. min-width: 0;
  704. color: ${scopeTheme('textColor')};
  705. }
  706. }
  707. }
  708. &-generic-table {
  709. width: 100%;
  710. tr {
  711. display: flex;
  712. th, td {
  713. padding: 0 5px;
  714. }
  715. }
  716. }
  717. &-table {
  718. width: 100%;
  719. border-spacing: 0;
  720. /* need fixed for truncating, but that does not extend wide columns dynamically */
  721. table-layout: fixed;
  722. &-wrapper {
  723. margin: 24px -4px;
  724. }
  725. &-header {
  726. color: ${scopeTheme('textTertiaryColor')};
  727. font-size: ${fontSize('small')};
  728. text-align: right;
  729. padding: 0;
  730. .node-details-table-header-sortable {
  731. padding: 3px 4px;
  732. cursor: pointer;
  733. }
  734. &-sorted {
  735. color: ${scopeTheme('textSecondaryColor')};
  736. }
  737. &-sorter {
  738. margin: 0 0.35em;
  739. }
  740. &:first-child {
  741. margin-right: 0;
  742. text-align: left;
  743. }
  744. }
  745. tbody {
  746. position: relative;
  747. .min-height-constraint {
  748. position: absolute;
  749. width: 0 !important;
  750. opacity: 0;
  751. top: 0;
  752. }
  753. }
  754. &-node {
  755. font-size: ${fontSize('small')};
  756. line-height: 1.5;
  757. &:hover, &.selected {
  758. background-color: ${color('white')};
  759. }
  760. > * {
  761. padding: 0 4px;
  762. }
  763. &-link {
  764. ${btnOpacity};
  765. text-decoration: underline;
  766. cursor: pointer;
  767. opacity: ${scopeTheme('linkOpacityDefault')};
  768. color: ${scopeTheme('textColor')};
  769. }
  770. &-value, &-metric {
  771. flex: 1;
  772. margin-left: 0.5em;
  773. text-align: right;
  774. }
  775. &-metric-link {
  776. ${btnOpacity};
  777. text-decoration: underline;
  778. cursor: pointer;
  779. opacity: ${scopeTheme('linkOpacityDefault')};
  780. color: ${scopeTheme('textColor')};
  781. }
  782. &-value-scalar {
  783. /* width: 2em; */
  784. text-align: right;
  785. margin-right: 0.5em;
  786. }
  787. &-value-minor,
  788. &-value-unit {
  789. font-size: ${fontSize('small')};
  790. color: ${scopeTheme('textSecondaryColor')};
  791. }
  792. }
  793. }
  794. }
  795. .node-resources {
  796. &-metric-box {
  797. ${palable};
  798. cursor: pointer;
  799. fill: ${props => transparentize(0.6, props.theme.colors.gray600)};
  800. &-info {
  801. background-color: ${props => transparentize(0.4, props.theme.colors.white)};
  802. border-radius: ${borderRadius('soft')};
  803. cursor: inherit;
  804. padding: 5px;
  805. .wrapper {
  806. display: block;
  807. &.label { font-size: ${fontSize('small')}; }
  808. &.consumption { font-size: ${fontSize('tiny')}; }
  809. }
  810. }
  811. }
  812. &-layer-topology {
  813. background-color: ${props => transparentize(0.05, props.theme.colors.gray50)};
  814. border-radius: ${borderRadius('soft')};
  815. border: 1px solid ${color('gray200')};
  816. color: ${scopeTheme('textTertiaryColor')};
  817. font-size: ${fontSize('normal')};
  818. font-weight: bold;
  819. padding-right: 20px;
  820. text-align: right;
  821. text-transform: capitalize;
  822. }
  823. }
  824. /* This part sets the styles only for the 'real' node details table, not applying
  825. them to the nodes grid, because there we control hovering from the JS.
  826. NOTE: Maybe it would be nice to separate the class names between the two places
  827. where node tables are used - i.e. it doesn't make sense that node-details-table
  828. can also refer to the tables in the nodes grid. */
  829. .details-wrapper .node-details-table {
  830. &-node {
  831. &:hover, &.selected {
  832. background-color: ${color('white')};
  833. }
  834. }
  835. }
  836. .node-control-button {
  837. ${btnOpacity};
  838. padding: 6px;
  839. margin-left: 2px;
  840. font-size: ${fontSize('small')};
  841. color: ${scopeTheme('textSecondaryColor')};
  842. cursor: pointer;
  843. border: 1px solid transparent;
  844. border-radius: ${borderRadius('soft')};
  845. &:hover {
  846. border-color: ${props => transparentize(0.4, props.theme.colors.white)};
  847. }
  848. &-pending, &-pending:hover {
  849. opacity: 0.2;
  850. border-color: transparent;
  851. cursor: not-allowed;
  852. }
  853. }
  854. .terminal {
  855. &-app {
  856. display: flex;
  857. flex-flow: column;
  858. }
  859. &-embedded {
  860. position: relative;
  861. /* shadow of animation-wrapper is 10px, let it fit in here without being
  862. overflow hiddened. */
  863. flex: 1;
  864. overflow-x: hidden;
  865. }
  866. &-animation-wrapper {
  867. position: absolute;
  868. /* some room for the drop shadow. */
  869. top: 10px;
  870. left: 10px;
  871. bottom: 10px;
  872. right: 0;
  873. transition: transform 0.5s cubic-bezier(0.230, 1.000, 0.320, 1.000);
  874. ${shadow2};
  875. }
  876. &-wrapper {
  877. width: 100%;
  878. height: 100%;
  879. border: 0px solid ${color('black')};
  880. color: ${color('gray50')};
  881. }
  882. &-header {
  883. ${truncate};
  884. color: ${color('white')};
  885. height: ${scopeTheme('terminalHeaderHeight')};
  886. padding: 8px 24px;
  887. background-color: ${scopeTheme('textColor')};
  888. position: relative;
  889. font-size: ${fontSize('small')};
  890. line-height: 28px;
  891. border-top-left-radius: ${borderRadius('soft')};
  892. &-title {
  893. cursor: default;
  894. }
  895. &-tools {
  896. position: absolute;
  897. right: 8px;
  898. top: 6px;
  899. &-item, &-item-icon {
  900. ${palable};
  901. padding: 4px 5px;
  902. color: ${color('white')};
  903. cursor: pointer;
  904. opacity: 0.7;
  905. border: 1px solid transparent;
  906. border-radius: ${borderRadius('soft')};
  907. font-size: ${fontSize('tiny')};
  908. font-weight: bold;
  909. &:hover {
  910. opacity: 1;
  911. border-color: ${props => transparentize(0.4, props.theme.colors.white)};
  912. }
  913. }
  914. &-item-icon {
  915. font-size: ${fontSize('normal')};
  916. }
  917. }
  918. }
  919. &-embedded { .terminal-inner { top: ${scopeTheme('terminalHeaderHeight')}; } }
  920. &-inner {
  921. cursor: text;
  922. font-family: ${props => props.theme.fontFamilies.monospace};
  923. position: absolute;
  924. bottom: 0;
  925. left: 0;
  926. right: 0;
  927. top: 0;
  928. background-color: ${color('black')};
  929. padding: 8px;
  930. box-sizing: content-box;
  931. border-bottom-left-radius: ${borderRadius('soft')};
  932. .terminal {
  933. background-color: transparent !important;
  934. }
  935. }
  936. &-status-bar {
  937. font-family: ${props => props.theme.fontFamilies.regular};
  938. position: absolute;
  939. bottom: 16px;
  940. right: 16px;
  941. width: 50%;
  942. padding: 16px 16px;
  943. opacity: 0.8;
  944. border-radius: ${borderRadius('soft')};
  945. h3 {
  946. margin: 4px 0;
  947. }
  948. &-message {
  949. margin: 4px 0;
  950. color: ${color('white')};
  951. }
  952. .link {
  953. font-weight: bold;
  954. cursor: pointer;
  955. float: right;
  956. }
  957. }
  958. &-cursor {
  959. color: ${color('black')};
  960. background: ${color('gray50')};
  961. }
  962. }
  963. .terminal-inactive .terminal-cursor {
  964. visibility: hidden;
  965. }
  966. .metric {
  967. &-unit {
  968. padding-left: 0.25em;
  969. }
  970. }
  971. .show-more {
  972. ${btnOpacity};
  973. border-top: 1px dotted ${scopeTheme('borderLightColor')};
  974. padding: 0px 0;
  975. margin-top: 4px;
  976. text-align: right;
  977. cursor: pointer;
  978. color: ${scopeTheme('textSecondaryColor')};
  979. font-size: ${fontSize('small')};
  980. &-icon {
  981. color: ${scopeTheme('textTertiaryColor')};
  982. font-size: ${fontSize('normal')};
  983. position: relative;
  984. top: 1px;
  985. }
  986. }
  987. .plugins {
  988. margin-right: 0.5em;
  989. &-label {
  990. margin-right: 0.25em;
  991. }
  992. &-plugin {
  993. cursor: default;
  994. }
  995. &-plugin + &-plugin:before {
  996. content: ', ';
  997. }
  998. &-plugin-icon {
  999. top: 1px;
  1000. position: relative;
  1001. font-size: ${fontSize('large')};
  1002. margin-right: 2px;
  1003. }
  1004. .error {
  1005. animation: blinking 2.0s 60 ${scopeTheme('baseEase')}; /* blink for 2 minutes */
  1006. color: ${scopeTheme('textSecondaryColor')};
  1007. }
  1008. &-empty {
  1009. opacity: ${scopeTheme('textSecondaryColor')};
  1010. }
  1011. }
  1012. .status {
  1013. padding: 2px 12px;
  1014. background-color: ${scopeTheme('bodyBackgroundColor')};
  1015. border-radius: ${borderRadius('soft')};
  1016. color: ${scopeTheme('textSecondaryColor')};
  1017. display: inline-block;
  1018. opacity: 0.9;
  1019. &-icon {
  1020. font-size: ${fontSize('normal')};
  1021. position: relative;
  1022. top: 0.125rem;
  1023. margin-right: 0.25rem;
  1024. }
  1025. &.status-loading {
  1026. animation: blinking 2.0s 150 ${scopeTheme('baseEase')}; /* keep blinking for 5 minutes */
  1027. text-transform: none;
  1028. color: ${scopeTheme('textColor')};
  1029. }
  1030. }
  1031. .topology-option, .metric-selector, .network-selector, .view-mode-selector, .time-control {
  1032. font-size: ${fontSize('normal')};
  1033. color: ${scopeTheme('textSecondaryColor')};
  1034. margin-bottom: 6px;
  1035. &:last-child {
  1036. margin-bottom: 0;
  1037. }
  1038. i {
  1039. font-size: ${fontSize('tiny')};
  1040. margin-left: 4px;
  1041. color: ${color('orange500')};
  1042. }
  1043. &-wrapper {
  1044. pointer-events: all;
  1045. border-radius: ${borderRadius('soft')};
  1046. border: 1px solid ${scopeTheme('backgroundDarkerColor')};
  1047. display: inline-block;
  1048. white-space: nowrap;
  1049. }
  1050. &-action {
  1051. ${btnOpacity};
  1052. padding: 3px 12px;
  1053. cursor: pointer;
  1054. display: inline-block;
  1055. background-color: ${scopeTheme('backgroundColor')};
  1056. &-selected, &:not([disabled]):hover {
  1057. color: ${scopeTheme('textDarkerColor')};
  1058. background-color: ${scopeTheme('backgroundDarkerColor')};
  1059. }
  1060. &:first-child {
  1061. border-left: none;
  1062. border-top-left-radius: ${borderRadius('soft')};
  1063. border-bottom-left-radius: ${borderRadius('soft')};
  1064. }
  1065. &:last-child {
  1066. border-top-right-radius: ${borderRadius('soft')};
  1067. border-bottom-right-radius: ${borderRadius('soft')};
  1068. }
  1069. }
  1070. }
  1071. .metric-selector {
  1072. font-size: ${fontSize('small')};
  1073. margin-top: 6px;
  1074. }
  1075. .view-mode-selector, .time-control {
  1076. margin-left: 20px;
  1077. &-wrapper {
  1078. pointer-events: all;
  1079. border-color: ${scopeTheme('backgroundDarkerSecondaryColor')};
  1080. overflow: hidden;
  1081. }
  1082. &:first-child,
  1083. &:last-child {
  1084. .view-mode-selector-action {
  1085. border-radius: ${borderRadius('none')};
  1086. }
  1087. }
  1088. &-action {
  1089. background-color: transparent;
  1090. &-selected, &:not([disabled]):hover {
  1091. background-color: ${scopeTheme('backgroundDarkerColor')};
  1092. }
  1093. &:not(:last-child) {
  1094. border-right: 1px solid ${scopeTheme('backgroundDarkerSecondaryColor')};
  1095. }
  1096. }
  1097. }
  1098. .time-control {
  1099. margin-right: 20px;
  1100. &-controls {
  1101. align-items: center;
  1102. justify-content: flex-end;
  1103. display: flex;
  1104. }
  1105. &-spinner {
  1106. display: inline-block;
  1107. margin-right: 15px;
  1108. margin-top: 3px;
  1109. i {
  1110. color: ${scopeTheme('textSecondaryColor')};
  1111. font-size: ${fontSize('normal')};
  1112. }
  1113. }
  1114. &-info {
  1115. ${blinkable};
  1116. display: block;
  1117. margin-top: 5px;
  1118. text-align: right;
  1119. pointer-events: all;
  1120. font-size: ${fontSize('small')};
  1121. }
  1122. }
  1123. .topology-option {
  1124. &-wrapper {
  1125. display: inline-flex;
  1126. flex-wrap: wrap;
  1127. overflow: hidden;
  1128. max-height: 27px;
  1129. transition: max-height 0.5s 0s ${scopeTheme('baseEase')};
  1130. .topology-option-action {
  1131. flex: 1 1 auto;
  1132. text-align: center;
  1133. }
  1134. }
  1135. &:last-child :hover {
  1136. height: auto;
  1137. max-height: calc((13px * 1.5 + 3px + 3px) * 8); /* expand to display 8 rows */
  1138. overflow: auto;
  1139. transition: max-height 0.5s 0s ${scopeTheme('baseEase')};
  1140. }
  1141. font-size: ${fontSize('small')};
  1142. &-action {
  1143. &-selected {
  1144. cursor: default;
  1145. }
  1146. }
  1147. }
  1148. .view-mode-selector-wrapper, .time-control-wrapper {
  1149. .label { margin-left: 4px; }
  1150. i {
  1151. margin-left: 0;
  1152. color: ${scopeTheme('textSecondaryColor')};
  1153. }
  1154. }
  1155. .network-selector-action {
  1156. border-top: 3px solid transparent;
  1157. border-bottom: 3px solid ${scopeTheme('backgroundDarkColor')};
  1158. }
  1159. .warning {
  1160. display: inline-block;
  1161. cursor: pointer;
  1162. border: 1px dashed transparent;
  1163. text-transform: none;
  1164. border-radius: ${borderRadius('soft')};
  1165. margin-left: 4px;
  1166. &-wrapper {
  1167. display: flex;
  1168. }
  1169. &-text {
  1170. display: inline-block;
  1171. color: ${scopeTheme('textSecondaryColor')};
  1172. padding-left: 0.5em;
  1173. }
  1174. &-icon {
  1175. ${btnOpacity};
  1176. }
  1177. &-expanded {
  1178. margin-left: 0;
  1179. padding: 2px 4px;
  1180. border-color: ${scopeTheme('textTertiaryColor')};
  1181. }
  1182. &-expanded &-icon {
  1183. position: relative;
  1184. top: 4px;
  1185. left: 2px;
  1186. }
  1187. }
  1188. .sidebar {
  1189. position: fixed;
  1190. bottom: 11px;
  1191. left: 11px;
  1192. padding: 5px;
  1193. font-size: ${fontSize('small')};
  1194. border-radius: ${borderRadius('soft')};
  1195. border: 1px solid transparent;
  1196. pointer-events: none;
  1197. max-width: 50%;
  1198. }
  1199. .sidebar-gridmode {
  1200. background-color: ${color('purple50')};
  1201. border-color: ${scopeTheme('backgroundDarkerColor')};
  1202. opacity: 0.9;
  1203. }
  1204. .search {
  1205. &-wrapper {
  1206. margin: 0 8px;
  1207. min-width: 160px;
  1208. text-align: right;
  1209. }
  1210. }
  1211. @keyframes blinking {
  1212. 0%, 50%, 100% {
  1213. opacity: 1.0;
  1214. } 25% {
  1215. opacity: 0.5;
  1216. }
  1217. }
  1218. /*
  1219. Help panel!
  1220. */
  1221. .help-panel {
  1222. z-index: ${props => props.theme.layers.modal};
  1223. background-color: ${color('white')};
  1224. ${shadow2};
  1225. display: flex;
  1226. position: relative;
  1227. &-wrapper {
  1228. position: absolute;
  1229. width: 100%;
  1230. height: 100%;
  1231. display: flex;
  1232. justify-content: center;
  1233. align-items: flex-start;
  1234. }
  1235. &-header {
  1236. background-color: ${color('blue400')};
  1237. padding: 12px 24px;
  1238. color: ${color('white')};
  1239. h2 {
  1240. margin: 0;
  1241. font-size: ${fontSize('large')};
  1242. }
  1243. }
  1244. &-tools {
  1245. position: absolute;
  1246. top: 6px;
  1247. right: 8px;
  1248. i {
  1249. ${btnOpacity};
  1250. padding: 4px 5px;
  1251. margin-left: 2px;
  1252. font-size: ${fontSize('normal')};
  1253. color: ${color('purple400')};
  1254. cursor: pointer;
  1255. border: 1px solid transparent;
  1256. border-radius: ${borderRadius('soft')};
  1257. &:hover {
  1258. border-color: ${props => transparentize(0.4, props.theme.colors.purple400)};
  1259. }
  1260. }
  1261. }
  1262. &-main {
  1263. display: flex;
  1264. padding: 12px 36px 36px 36px;
  1265. flex-direction: row;
  1266. align-items: stretch;
  1267. h2 {
  1268. line-height: 150%;
  1269. font-size: ${fontSize('large')};
  1270. color: ${color('purple400')};
  1271. padding: 4px 0;
  1272. border-bottom: 1px solid ${props => transparentize(0.9, props.theme.colors.purple400)};
  1273. }
  1274. h3 {
  1275. font-size: ${fontSize('normal')};
  1276. color: ${color('purple400')};
  1277. padding: 4px 0;
  1278. }
  1279. p {
  1280. margin: 0;
  1281. }
  1282. }
  1283. &-shortcuts {
  1284. margin-right: 36px;
  1285. &-shortcut {
  1286. kbd {
  1287. display: inline-block;
  1288. padding: 3px 5px;
  1289. font-size: ${fontSize('tiny')};
  1290. line-height: 10px;
  1291. color: ${color('gray600')};
  1292. vertical-align: middle;
  1293. background-color: ${color('white')};
  1294. border: solid 1px ${color('gray200')};
  1295. border-bottom-color: ${color('gray600')};
  1296. border-radius: ${borderRadius('soft')};
  1297. box-shadow: inset 0 -1px 0 ${color('gray600')};
  1298. }
  1299. div.key {
  1300. width: 60px;
  1301. display: inline-block;
  1302. }
  1303. div.label {
  1304. display: inline-block;
  1305. }
  1306. }
  1307. }
  1308. &-search {
  1309. margin-right: 36px;
  1310. &-row {
  1311. display: flex;
  1312. flex-direction: row;
  1313. &-term {
  1314. flex: 1;
  1315. color: ${scopeTheme('textSecondaryColor')};
  1316. i {
  1317. margin-right: 5px;
  1318. }
  1319. }
  1320. &-term-label {
  1321. flex: 1;
  1322. b {
  1323. color: ${scopeTheme('textSecondaryColor')};
  1324. }
  1325. }
  1326. }
  1327. }
  1328. &-fields {
  1329. display: flex;
  1330. flex-direction: column;
  1331. &-current-topology {
  1332. color: ${color('purple400')};
  1333. }
  1334. &-fields {
  1335. display: flex;
  1336. align-items: stretch;
  1337. &-column {
  1338. display: flex;
  1339. flex-direction: column;
  1340. flex: 1;
  1341. margin-right: 12px;
  1342. &-content {
  1343. overflow: auto;
  1344. /* 160px for top and bottom margins and the rest of the help window
  1345. is about 160px too.
  1346. Notes: Firefox gets a bit messy if you try and bubble
  1347. heights + overflow up (min-height issue + still doesn't work v.well),
  1348. so this is a bit of a hack. */
  1349. max-height: calc(100vh - 160px - 160px - 160px);
  1350. }
  1351. }
  1352. }
  1353. }
  1354. }
  1355. /*
  1356. Zoom control
  1357. */
  1358. .zoom-control {
  1359. ${overlayWrapper};
  1360. flex-direction: column;
  1361. padding: 5px 7px 0;
  1362. bottom: 50px;
  1363. right: 40px;
  1364. a:hover { border-color: transparent; }
  1365. .rc-slider {
  1366. margin: 5px 0;
  1367. height: 60px;
  1368. }
  1369. }
  1370. /*
  1371. Debug panel!
  1372. */
  1373. .debug-panel {
  1374. ${shadow2};
  1375. background-color: ${color('white')};
  1376. top: 80px;
  1377. position: absolute;
  1378. padding: 10px;
  1379. left: 10px;
  1380. z-index: ${props => props.theme.layers.modal};
  1381. opacity: 0.3;
  1382. &:hover {
  1383. opacity: 1;
  1384. }
  1385. table {
  1386. display: inline-block;
  1387. border-collapse: collapse;
  1388. margin: 4px 2px;
  1389. td {
  1390. width: 10px;
  1391. height: 10px;
  1392. }
  1393. }
  1394. }
  1395. /*
  1396. Nodes grid.
  1397. */
  1398. .nodes-grid {
  1399. tr {
  1400. border-radius: ${borderRadius('soft')};
  1401. }
  1402. &-label-minor {
  1403. opacity: 0.7;
  1404. }
  1405. &-id-column {
  1406. margin: -3px -4px;
  1407. padding: 2px 4px;
  1408. display: flex;
  1409. div {
  1410. flex: 1;
  1411. }
  1412. }
  1413. .node-details-table-wrapper-wrapper {
  1414. flex: 1;
  1415. display: flex;
  1416. flex-direction: row;
  1417. width: 100%;
  1418. .node-details-table-wrapper {
  1419. margin: 0;
  1420. flex: 1;
  1421. }
  1422. .nodes-grid-graph {
  1423. position: relative;
  1424. margin-top: 24px;
  1425. }
  1426. .node-details-table-node > * {
  1427. padding: 3px 4px;
  1428. }
  1429. /* Keeping the row height fixed is important for locking the rows on hover. */
  1430. .node-details-table-node, thead tr {
  1431. height: 28px;
  1432. }
  1433. tr:nth-child(even) {
  1434. background: ${color('gray100')};
  1435. }
  1436. tbody tr {
  1437. border: 1px solid transparent;
  1438. border-radius: ${borderRadius('soft')};
  1439. cursor: pointer;
  1440. }
  1441. /* We fully control hovering of the grid rows from JS,
  1442. because we want consistent behaviour between the
  1443. visual and row locking logic that happens on hover. */
  1444. tbody tr.selected, tbody tr.focused {
  1445. background-color: ${props => transparentize(0.85, props.theme.colors.blue400)};
  1446. border: 1px solid ${color('blue400')};
  1447. }
  1448. }
  1449. .scroll-body {
  1450. table {
  1451. border-bottom: 1px solid ${color('gray200')};
  1452. }
  1453. thead, tbody tr {
  1454. display: table;
  1455. width: 100%;
  1456. table-layout: fixed;
  1457. }
  1458. tbody:after {
  1459. content: '';
  1460. display: block;
  1461. /* height of the controls so you can scroll the last row up above them
  1462. and have a good look. */
  1463. height: 140px;
  1464. }
  1465. thead {
  1466. box-shadow: 0 4px 2px -2px ${props => transparentize(0.84, props.theme.colors.black)};
  1467. border-bottom: 1px solid ${color('gray600')};
  1468. }
  1469. tbody {
  1470. display: block;
  1471. overflow-y: scroll;
  1472. }
  1473. }
  1474. }
  1475. .troubleshooting-menu {
  1476. display: flex;
  1477. position: relative;
  1478. &-wrapper {
  1479. height: 100%;
  1480. width: 100%;
  1481. align-items: center;
  1482. display: flex;
  1483. justify-content: center;
  1484. position: absolute;
  1485. }
  1486. &-content {
  1487. position: relative;
  1488. background-color: ${color('white')};
  1489. padding: 20px;
  1490. ${shadow2};
  1491. z-index: ${props => props.theme.layers.modal};
  1492. }
  1493. &-item {
  1494. height: 40px;
  1495. .soft { opacity: 0.6; }
  1496. }
  1497. button {
  1498. border: 0;
  1499. background-color: transparent;
  1500. cursor: pointer;
  1501. padding: 0;
  1502. outline: 0;
  1503. }
  1504. button, a {
  1505. color: ${color('purple900')};
  1506. &:hover {
  1507. color: ${scopeTheme('textColor')};
  1508. }
  1509. }
  1510. i {
  1511. width: 20px;
  1512. text-align: center;
  1513. margin-right: 10px;
  1514. }
  1515. .fa.fa-times {
  1516. width: 25px;
  1517. }
  1518. }
  1519. @media (max-width: 1330px) {
  1520. .view-mode-selector .label { display: none; }
  1521. }
  1522. .ant-drawer-content-wrapper{
  1523. position: fixed !important;
  1524. display: flex!important ;
  1525. transition: transform 0.33333s cubic-bezier(0, 0, 0.21, 1) 0s, margin-top 0.15s ease-in-out 0s !important;
  1526. transform: translateX(0px) !important;
  1527. }
  1528. }
  1529. /**
  1530. * Copyright (c) 2014 The xterm.js authors. All rights reserved.
  1531. * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
  1532. * https://github.com/chjj/term.js
  1533. * @license MIT
  1534. *
  1535. * Permission is hereby granted, free of charge, to any person obtaining a copy
  1536. * of this software and associated documentation files (the "Software"), to deal
  1537. * in the Software without restriction, including without limitation the rights
  1538. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  1539. * copies of the Software, and to permit persons to whom the Software is
  1540. * furnished to do so, subject to the following conditions:
  1541. *
  1542. * The above copyright notice and this permission notice shall be included in
  1543. * all copies or substantial portions of the Software.
  1544. *
  1545. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1546. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1547. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  1548. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1549. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  1550. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  1551. * THE SOFTWARE.
  1552. *
  1553. * Originally forked from (with the author's permission):
  1554. * Fabrice Bellard's javascript vt100 for jslinux:
  1555. * http://bellard.org/jslinux/
  1556. * Copyright (c) 2011 Fabrice Bellard
  1557. * The original design remains. The terminal itself
  1558. * has been extended to include xterm CSI codes, among
  1559. * other features.
  1560. */
  1561. /**
  1562. * Default styles for xterm.js
  1563. */
  1564. .xterm {
  1565. font-family: ${props => props.theme.fontFamilies.monospace};
  1566. font-feature-settings: "liga" 0;
  1567. position: relative;
  1568. user-select: none;
  1569. /* stylelint-disable property-no-vendor-prefix */
  1570. -ms-user-select: none;
  1571. -webkit-user-select: none;
  1572. /* stylelint-enable property-no-vendor-prefix */
  1573. }
  1574. .xterm.focus,
  1575. .xterm:focus {
  1576. outline: none;
  1577. }
  1578. .xterm .xterm-helpers {
  1579. position: absolute;
  1580. top: 0;
  1581. /**
  1582. * The z-index of the helpers must be higher than the canvases in order for
  1583. * IMEs to appear on top.
  1584. */
  1585. /* stylelint-disable sh-waqar/declaration-use-variable */
  1586. z-index: 10;
  1587. /* stylelint-enable sh-waqar/declaration-use-variable */
  1588. }
  1589. .xterm .xterm-helper-textarea {
  1590. /*
  1591. * HACK: to fix IE's blinking cursor
  1592. * Move textarea out of the screen to the far left, so that the cursor is not visible.
  1593. */
  1594. position: absolute;
  1595. opacity: 0;
  1596. left: -9999em;
  1597. top: 0;
  1598. width: 0;
  1599. height: 0;
  1600. /* stylelint-disable sh-waqar/declaration-use-variable */
  1601. z-index: -10;
  1602. /* stylelint-enable sh-waqar/declaration-use-variable */
  1603. /** Prevent wrapping so the IME appears against the textarea at the correct position */
  1604. white-space: nowrap;
  1605. overflow: hidden;
  1606. resize: none;
  1607. }
  1608. .xterm .composition-view {
  1609. /* TODO: Composition position got messed up somewhere */
  1610. background: ${color('black')};
  1611. color: ${color('white')};
  1612. display: none;
  1613. position: absolute;
  1614. white-space: nowrap;
  1615. z-index: ${props => props.theme.layers.front};
  1616. }
  1617. .xterm .composition-view.active {
  1618. display: block;
  1619. }
  1620. .xterm .xterm-viewport {
  1621. /* On OS X this is required in order for the scroll bar to appear fully opaque */
  1622. background-color: ${color('black')};
  1623. overflow-y: scroll;
  1624. cursor: default;
  1625. position: absolute;
  1626. right: 0;
  1627. left: 0;
  1628. top: 0;
  1629. bottom: 0;
  1630. }
  1631. .xterm .xterm-screen {
  1632. position: relative;
  1633. }
  1634. .xterm .xterm-screen canvas {
  1635. position: absolute;
  1636. left: 0;
  1637. top: 0;
  1638. }
  1639. .xterm .xterm-scroll-area {
  1640. visibility: hidden;
  1641. }
  1642. .xterm-char-measure-element {
  1643. display: inline-block;
  1644. visibility: hidden;
  1645. position: absolute;
  1646. top: 0;
  1647. left: -9999em;
  1648. line-height: normal;
  1649. }
  1650. .xterm.enable-mouse-events {
  1651. /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
  1652. cursor: default;
  1653. }
  1654. .xterm:not(.enable-mouse-events) {
  1655. cursor: text;
  1656. }
  1657. .xterm .xterm-accessibility,
  1658. .xterm .xterm-message {
  1659. position: absolute;
  1660. left: 0;
  1661. top: 0;
  1662. bottom: 0;
  1663. right: 0;
  1664. /* stylelint-disable sh-waqar/declaration-use-variable */
  1665. z-index: 100;
  1666. /* stylelint-enable sh-waqar/declaration-use-variable */
  1667. color: transparent;
  1668. }
  1669. .xterm .live-region {
  1670. position: absolute;
  1671. left: -9999px;
  1672. width: 1px;
  1673. height: 1px;
  1674. overflow: hidden;
  1675. }
  1676. .xterm-cursor-pointer {
  1677. cursor: pointer;
  1678. }
  1679. `;
  1680. export default GlobalStyle;