1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996 |
- import { createGlobalStyle } from 'styled-components';
- import { transparentize } from 'polished';
- import { borderRadius, color, fontSize } from 'weaveworks-ui-components/lib/theme/selectors';
- import '@fortawesome/fontawesome-free/css/all.css';
- import '@fortawesome/fontawesome-free/css/v4-shims.css';
- import 'rc-slider/dist/rc-slider.css';
- const scopeTheme = key => props => props.theme.scope[key];
- const hideable = props => `
- transition: opacity .5s ${props.theme.scope.baseEase};
- `;
- const palable = props => `
- transition: all .2s ${props.theme.scope.baseEase};
- `;
- const blinkable = props => `
- animation: blinking 1.5s infinite ${props.theme.scope.baseEase};
- `;
- const colorable = props => `
- transition: background-color .3s ${props.theme.scope.baseEase};
- `;
- /* add this class to truncate text with ellipsis, container needs width */
- const truncate = () => `
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- `;
- const shadow2 = props => `
- box-shadow: 0 3px 10px ${transparentize(0.84, props.theme.colors.black)}, 0 3px 10px ${transparentize(0.77, props.theme.colors.black)};
- `;
- const btnOpacity = props => `
- ${palable(props)};
- opacity: ${props.theme.scope.btnOpacityDefault};
- &-selected {
- opacity: ${props.theme.scope.btnOpacitySelected};
- }
- &[disabled] {
- cursor: default;
- opacity: ${props.theme.scope.btnOpacityDisabled};
- }
- &:not([disabled]):hover {
- opacity: ${props.theme.scope.btnOpacityHover};
- }
- `;
- /* From https://stackoverflow.com/a/18294634 */
- const fullyPannable = () => `
- width: 100%;
- height: 100%;
- /* stylelint-disable value-no-vendor-prefix */
- /* Grabbable */
- cursor: move; /* fallback if grab cursor is unsupported */
- cursor: grab;
- cursor: -moz-grab;
- cursor: -webkit-grab;
- &.panning {
- /* Grabbing */
- cursor: grabbing;
- cursor: -moz-grabbing;
- cursor: -webkit-grabbing;
- }
- /* stylelint-enable value-no-vendor-prefix */
- `;
- const overlayWrapper = props => `
- align-items: center;
- background-color: ${transparentize(0.1, props.theme.colors.purple25)};
- border-radius: ${props.theme.borderRadius.soft};
- color: ${props.theme.scope.textTertiaryColor};
- display: flex;
- font-size: ${props.theme.fontSizes.tiny};
- justify-content: center;
- padding: 5px;
- position: fixed;
- bottom: 11px;
- button {
- ${btnOpacity(props)};
- background-color: transparent;
- border: 1px solid transparent;
- border-radius: ${props.theme.borderRadius.soft};
- color: ${props.theme.scope.textSecondaryColor};
- cursor: pointer;
- line-height: 20px;
- padding: 1px 3px;
- outline: 0;
- i {
- font-size: ${props.theme.fontSizes.small};
- position: relative;
- top: 2px;
- }
- &:hover, &.selected {
- border: 1px solid ${props.theme.scope.textTertiaryColor};
- }
- &.active {
- & > * { ${blinkable(props)}; }
- border: 1px solid ${props.theme.scope.textTertiaryColor};
- }
- }
- `;
- const GlobalStyle = createGlobalStyle`
- /*
- * Contain all the styles in the root div instead of having them truly
- * global, so that they don't interfere with the app they're injected into.
- */
- .scope-app, .terminal-app {
- /* Extendable classes */
- .hideable { ${hideable}; }
- .palable { ${palable}; }
- .blinkable { ${blinkable}; }
- .colorable { ${colorable}; }
- .truncate { ${truncate}; }
- .shadow-2 { ${shadow2}; }
- .btn-opacity { ${btnOpacity}; }
- .fully-pannable { ${fullyPannable}; }
- .overlay-wrapper { ${overlayWrapper}; }
- /* General styles */
- -webkit-font-smoothing: antialiased;
- background: ${scopeTheme('bodyBackgroundColor')};
- bottom: 0;
- color: ${scopeTheme('textColor')};
- font-family: ${props => props.theme.fontFamilies.regular};
- font-size: ${fontSize('small')};
- height: auto;
- left: 0;
- line-height: 150%;
- margin: 0;
- overflow: auto;
- position: fixed;
- right: 0;
- top: 0;
- width: 100%;
- a {
- text-decoration: none;
- }
- .iAOmmf{
- font-size: ${fontSize('small')};
- }
- * {
- box-sizing: border-box;
- -webkit-tap-highlight-color: transparent;
- }
- *:before,
- *:after {
- box-sizing: border-box;
- }
- p {
- line-height: 20px;
- padding-top: 6px;
- margin-bottom: 14px;
- letter-spacing: 0;
- font-weight: 400;
- color: ${scopeTheme('textColor')};
- }
- h2 {
- font-size: ${fontSize('extraLarge')};
- line-height: 40px;
- padding-top: 8px;
- margin-bottom: 12px;
- font-weight: 400;
- }
- .browsehappy {
- margin: 0.2em 0;
- background: ${color('gray200')};
- color: ${color('black')};
- padding: 0.2em 0;
- }
- .hang-around {
- transition-delay: .5s;
- }
- .overlay {
- ${hideable};
- background-color: ${color('white')};
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- opacity: 0;
- pointer-events: none;
- z-index: ${props => props.theme.layers.modal};
- &.faded {
- /* NOTE: Not sure if we should block the pointer events here.. */
- pointer-events: all;
- cursor: wait;
- opacity: 0.5;
- }
- }
- .hide {
- opacity: 0;
- }
- &.time-travel-open {
- .details-wrapper {
- margin-top: ${scopeTheme('timelineHeight')} + 50px;
- }
- }
- .header {
- background-color: transparentize(${color('purple25')}, 0.2);
- z-index: ${props => props.theme.layers.front};
- padding: 15px 10px 0;
- position: relative;
- width: 100%;
- .selectors {
- display: flex;
- position: relative;
- > * {
- flex: 1 1;
- }
- .logo {
- margin: -16px 0 0 8px;
- height: 64px;
- max-width: 250px;
- min-width: 0;
- }
- }
- }
- .nodes-wrapper{
- height:calc(100% - 100px);
- }
- .rc-slider {
- .rc-slider-step { cursor: pointer; }
- .rc-slider-track { background-color: ${scopeTheme('textTertiaryColor')}; }
- .rc-slider-rail { background-color: ${scopeTheme('borderLightColor')}; }
- .rc-slider-handle { border-color: ${scopeTheme('textTertiaryColor')}; }
- }
- .footer {
- ${overlayWrapper};
- right: 43px;
- &-status {
- margin-right: 1em;
- }
- &-label, .pause-text {
- margin: 0 0.25em;
- }
- &-versionupdate {
- margin-right: 0.5em;
- }
- &-tools {
- display: flex;
- }
- &-icon {
- margin-left: 0.5em;
- }
- .tooltip-wrapper {
- position: relative;
- .tooltip {
- display: none;
- background-color: ${color('black')};
- position: absolute;
- color: ${color('white')};
- text-align: center;
- line-height: 22px;
- border-radius: ${borderRadius('soft')};
- font-size: ${fontSize('tiny')};
- margin-bottom: 25px;
- margin-left: -4px;
- opacity: 0.75;
- padding: 10px 20px;
- bottom: 0;
- left: 10px;
- transform: translateX(-50%);
- white-space: nowrap;
- z-index: ${props => props.theme.layers.tooltip};
- /* Adjusted from http://www.cssarrowplease.com/ */
- &:after {
- border: 6px solid transparent;
- content: ' ';
- top: 100%;
- left: 50%;
- height: 0;
- width: 0;
- position: absolute;
- border-color: transparent;
- border-top-color: ${color('black')};
- margin-left: -6px;
- }
- }
- &:hover .tooltip {
- display: block;
- }
- }
- }
- .zoomable-canvas svg {
- ${fullyPannable};
- }
- .topologies-selector {
- margin: 0 4px;
- display: flex;
- .topologies-item {
- margin: 0px 8px;
- &-label {
- font-size: ${fontSize('normal')};
- }
- }
- .topologies-sub {
- &-item {
- &-label {
- font-size: ${fontSize('small')};
- }
- }
- }
- .topologies-item-main,
- .topologies-sub-item {
- pointer-events: all;
- color: ${scopeTheme('textSecondaryColor')};
- ${btnOpacity};
- cursor: pointer;
- padding: 4px 8px;
- border-radius: ${borderRadius('soft')};
- opacity: 0.9;
- margin-bottom: 3px;
- border: 1px solid transparent;
- white-space: nowrap;
- &-active, &:hover {
- color: ${scopeTheme('textColor')};
- background-color: ${scopeTheme('backgroundDarkerColor')};
- }
- &-active {
- opacity: 0.85;
- }
- &-matched {
- border-color: ${color('blue400')};
- }
- }
- .topologies-sub-item {
- padding: 2px 8px;
- }
- }
- .nodes-chart-overlay {
- pointer-events: none;
- opacity: ${scopeTheme('nodeElementsInBackgroundOpacity')};
- &:not(.active) {
- display: none;
- }
- }
- .nodes-chart, .nodes-resources {
- &-error, &-loading {
- ${hideable};
- pointer-events: none;
- position: absolute;
- left: 50%;
- top: 50%;
- margin-left: -16.5%;
- margin-top: -275px;
- color: ${scopeTheme('textSecondaryColor')};
- width: 33%;
- height: 550px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- .heading {
- font-size: ${fontSize('normal')};
- }
- &-icon {
- text-align: center;
- opacity: 0.25;
- font-size: ${props => props.theme.overlayIconSize};
- }
- li { padding-top: 5px; }
- }
- /* Make watermarks blink only if actually shown (otherwise the FF performance decreses weirdly). */
- &-loading:not(.hide) &-error-icon-container {
- ${blinkable};
- }
- &-loading {
- text-align: center;
- }
- svg {
- ${hideable};
- position: absolute;
- top: 0px;
- }
- .logo {
- display: none;
- }
- svg.exported {
- .logo {
- display: inline;
- }
- }
- text {
- font-family: ${props => props.theme.fontFamilies.regular};
- fill: ${scopeTheme('textSecondaryColor')};
- }
- .nodes-chart-elements .matched-results {
- background-color: ${scopeTheme('labelBackgroundColor')};
- }
- .edge {
- .link-none {
- fill: none;
- display: none;
- }
- .link-storage {
- fill: none;
- stroke: ${scopeTheme('edgeColor')};
- stroke-dasharray: 1, 30;
- stroke-linecap: round;
- }
- .link {
- fill: none;
- stroke: ${scopeTheme('edgeColor')};
- }
- .shadow {
- fill: none;
- stroke: ${color('blue400')};
- stroke-opacity: 0;
- }
- &.highlighted {
- .shadow {
- stroke-opacity: ${scopeTheme('edgeHighlightOpacity')};
- }
- }
- }
- .edge-marker {
- color: ${scopeTheme('edgeColor')};
- fill: ${scopeTheme('edgeColor')};
- }
- }
- .matched-results {
- text-align: center;
- &-match {
- font-size: ${fontSize('small')};
- &-wrapper {
- display: inline-block;
- margin: 1px;
- padding: 2px 4px;
- background-color: transparentize(${color('blue400')}, 0.9);
- }
- &-label {
- color: ${scopeTheme('textSecondaryColor')};
- margin-right: 0.5em;
- }
- }
- &-more {
- font-size: ${fontSize('tiny')};
- color: ${color('blue700')};
- margin-top: -2px;
- }
- }
- .details {
- &-wrapper {
- position: fixed;
- display: flex;
- z-index: ${props => props.theme.layers.toolbar};
- right: ${scopeTheme('detailsWindowPaddingLeft')};
- top: 100px;
- bottom: 48px;
- transition: transform 0.33333s cubic-bezier(0,0,0.21,1), margin-top .15s ${scopeTheme('baseEase')};
- }
- }
- .node-details {
- height: 100%;
- width: ${scopeTheme('detailsWindowWidth')};
- display: flex;
- flex-flow: column;
- margin-bottom: 12px;
- padding-bottom: 2px;
- border-radius: ${borderRadius('soft')};
- background-color: ${color('white')};
- ${shadow2};
- /* keep node-details above the terminal. */
- z-index: ${props => props.theme.layers.front};
- overflow: hidden;
- &:last-child {
- margin-bottom: 0;
- }
- &-tools-wrapper {
- position: relative;
- }
- &-tools {
- position: absolute;
- top: 6px;
- right: 8px;
- .close-details {
- position: relative;
- z-index: ${props => props.theme.layers.front};
- }
- > i {
- ${btnOpacity};
- padding: 4px 5px;
- margin-left: 2px;
- font-size: ${fontSize('normal')};
- color: ${color('white')};
- cursor: pointer;
- border: 1px solid transparent;
- border-radius: ${borderRadius('soft')};
- span {
- font-family: ${props => props.theme.fontFamilies.regular};
- font-size: ${fontSize('small')};
- margin-left: 4px;
- span {
- text-transform: capitalize;
- font-size: ${fontSize('normal')};
- margin-left: 0;
- }
- }
- &:hover {
- border-color: ${props => transparentize(0.4, props.theme.colors.white)};
- }
- }
- }
- .match {
- background-color: ${props => transparentize(0.7, props.theme.colors.blue400)};
- border: 1px solid ${color('blue400')};
- }
- &-header {
- ${colorable};
- &-wrapper {
- padding: 12px 24px;
- }
- &-label {
- color: ${color('white')};
- margin: 0;
- width: 348px;
- padding-top: 0;
- }
- .details-tools {
- position: absolute;
- top: 16px;
- right: 24px;
- }
- &-notavailable {
- background-color: ${scopeTheme('backgroundDarkColor')};
- }
- }
- &-relatives {
- margin-top: 4px;
- font-size: ${fontSize('normal')};
- color: ${color('white')};
- &-link {
- ${truncate};
- ${btnOpacity};
- display: inline-block;
- margin-right: 0.5em;
- cursor: pointer;
- text-decoration: underline;
- opacity: ${scopeTheme('linkOpacityDefault')};
- max-width: 12em;
- }
- &-more {
- ${btnOpacity};
- padding: 0 2px;
- cursor: pointer;
- font-size: ${fontSize('tiny')};
- font-weight: bold;
- display: inline-block;
- position: relative;
- top: -5px;
- }
- }
- &-controls {
- white-space: nowrap;
- padding: 8px 0;
- font-size: ${fontSize('small')};
- &-wrapper {
- padding: 0 36px 0 32px;
- }
- .node-control-button {
- color: ${color('white')};
- }
- &-spinner {
- ${hideable};
- color: ${color('white')};
- margin-left: 8px;
- }
- &-error {
- ${truncate};
- float: right;
- width: 55%;
- padding-top: 6px;
- text-align: left;
- color: ${color('white')};
- &-icon {
- ${blinkable};
- margin-right: 0.5em;
- }
- }
- }
- &-content {
- flex: 1;
- padding: 0 24px 0 24px;
- overflow-y: auto;
- &-loading {
- margin-top: 48px;
- text-align: center;
- font-size: ${fontSize('huge')};
- color: ${scopeTheme('textTertiaryColor')};
- }
- &-section {
- margin: 16px 0;
- &-header {
- font-size: ${fontSize('normal')};
- color: ${scopeTheme('textTertiaryColor')};
- margin-bottom: 20px;
- }
- }
- }
- &-health {
- &-wrapper {
- display: flex;
- justify-content: space-around;
- align-content: center;
- text-align: center;
- flex-wrap: wrap;
- }
- &-overflow {
- ${btnOpacity};
- flex-basis: 33%;
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- align-items: center;
- opacity: 0.85;
- cursor: pointer;
- position: relative;
- padding-bottom: 16px;
- &-item {
- padding: 4px 8px;
- line-height: 1.2;
- flex-basis: 48%;
- &-value {
- color: ${scopeTheme('textSecondaryColor')};
- font-size: ${fontSize('normal')};
- }
- &-label {
- color: ${scopeTheme('textSecondaryColor')};
- font-size: ${fontSize('tiny')};
- }
- }
- }
- &-item {
- padding: 8px 16px;
- width: 33%;
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- &-label {
- color: ${scopeTheme('textSecondaryColor')};
- font-size: ${fontSize('small')};
- }
- &-sparkline {
- margin-top: auto;
- }
- &-placeholder {
- font-size: ${fontSize('large')};
- opacity: 0.2;
- margin-bottom: 0.2em;
- }
- }
- &-link-item {
- ${btnOpacity};
- cursor: pointer;
- opacity: ${scopeTheme('linkOpacityDefault')};
- width: 33%;
- display: flex;
- color: inherit;
- .node-details-health-item {
- width: auto;
- }
- }
- }
- &-info {
- &-field {
- display: flex;
- align-items: baseline;
- &-label {
- text-align: right;
- width: 30%;
- color: ${scopeTheme('textSecondaryColor')};
- padding: 0 0.5em 0 0;
- white-space: nowrap;
- font-size: ${fontSize('small')};
- &::after {
- content: ':';
- }
- }
- &-value {
- font-size: ${fontSize('small')};
- flex: 1;
- /* Now required (from chrome 48) to get overflow + flexbox behaving: */
- min-width: 0;
- color: ${scopeTheme('textColor')};
- }
- }
- }
- &-property-list {
- &-controls {
- margin-left: -4px;
- }
- &-field {
- display: flex;
- align-items: baseline;
- &-label {
- text-align: right;
- width: 50%;
- color: ${scopeTheme('textSecondaryColor')};
- padding: 0 0.5em 0 0;
- white-space: nowrap;
- font-size: ${fontSize('small')};
- &::after {
- content: ':';
- }
- }
- &-value {
- font-size: ${fontSize('small')};
- flex: 1;
- /* Now required (from chrome 48) to get overflow + flexbox behaving: */
- min-width: 0;
- color: ${scopeTheme('textColor')};
- }
- }
- }
- &-generic-table {
- width: 100%;
- tr {
- display: flex;
- th, td {
- padding: 0 5px;
- }
- }
- }
- &-table {
- width: 100%;
- border-spacing: 0;
- /* need fixed for truncating, but that does not extend wide columns dynamically */
- table-layout: fixed;
- &-wrapper {
- margin: 24px -4px;
- }
- &-header {
- color: ${scopeTheme('textTertiaryColor')};
- font-size: ${fontSize('small')};
- text-align: right;
- padding: 0;
- .node-details-table-header-sortable {
- padding: 3px 4px;
- cursor: pointer;
- }
- &-sorted {
- color: ${scopeTheme('textSecondaryColor')};
- }
- &-sorter {
- margin: 0 0.35em;
- }
- &:first-child {
- margin-right: 0;
- text-align: left;
- }
- }
- tbody {
- position: relative;
- .min-height-constraint {
- position: absolute;
- width: 0 !important;
- opacity: 0;
- top: 0;
- }
- }
- &-node {
- font-size: ${fontSize('small')};
- line-height: 1.5;
- &:hover, &.selected {
- background-color: ${color('white')};
- }
- > * {
- padding: 0 4px;
- }
- &-link {
- ${btnOpacity};
- text-decoration: underline;
- cursor: pointer;
- opacity: ${scopeTheme('linkOpacityDefault')};
- color: ${scopeTheme('textColor')};
- }
- &-value, &-metric {
- flex: 1;
- margin-left: 0.5em;
- text-align: right;
- }
- &-metric-link {
- ${btnOpacity};
- text-decoration: underline;
- cursor: pointer;
- opacity: ${scopeTheme('linkOpacityDefault')};
- color: ${scopeTheme('textColor')};
- }
- &-value-scalar {
- /* width: 2em; */
- text-align: right;
- margin-right: 0.5em;
- }
- &-value-minor,
- &-value-unit {
- font-size: ${fontSize('small')};
- color: ${scopeTheme('textSecondaryColor')};
- }
- }
- }
- }
- .node-resources {
- &-metric-box {
- ${palable};
- cursor: pointer;
- fill: ${props => transparentize(0.6, props.theme.colors.gray600)};
- &-info {
- background-color: ${props => transparentize(0.4, props.theme.colors.white)};
- border-radius: ${borderRadius('soft')};
- cursor: inherit;
- padding: 5px;
- .wrapper {
- display: block;
- &.label { font-size: ${fontSize('small')}; }
- &.consumption { font-size: ${fontSize('tiny')}; }
- }
- }
- }
- &-layer-topology {
- background-color: ${props => transparentize(0.05, props.theme.colors.gray50)};
- border-radius: ${borderRadius('soft')};
- border: 1px solid ${color('gray200')};
- color: ${scopeTheme('textTertiaryColor')};
- font-size: ${fontSize('normal')};
- font-weight: bold;
- padding-right: 20px;
- text-align: right;
- text-transform: capitalize;
- }
- }
- /* This part sets the styles only for the 'real' node details table, not applying
- them to the nodes grid, because there we control hovering from the JS.
- NOTE: Maybe it would be nice to separate the class names between the two places
- where node tables are used - i.e. it doesn't make sense that node-details-table
- can also refer to the tables in the nodes grid. */
- .details-wrapper .node-details-table {
- &-node {
- &:hover, &.selected {
- background-color: ${color('white')};
- }
- }
- }
- .node-control-button {
- ${btnOpacity};
- padding: 6px;
- margin-left: 2px;
- font-size: ${fontSize('small')};
- color: ${scopeTheme('textSecondaryColor')};
- cursor: pointer;
- border: 1px solid transparent;
- border-radius: ${borderRadius('soft')};
- &:hover {
- border-color: ${props => transparentize(0.4, props.theme.colors.white)};
- }
- &-pending, &-pending:hover {
- opacity: 0.2;
- border-color: transparent;
- cursor: not-allowed;
- }
- }
- .terminal {
- &-app {
- display: flex;
- flex-flow: column;
- }
- &-embedded {
- position: relative;
- /* shadow of animation-wrapper is 10px, let it fit in here without being
- overflow hiddened. */
- flex: 1;
- overflow-x: hidden;
- }
- &-animation-wrapper {
- position: absolute;
- /* some room for the drop shadow. */
- top: 10px;
- left: 10px;
- bottom: 10px;
- right: 0;
- transition: transform 0.5s cubic-bezier(0.230, 1.000, 0.320, 1.000);
- ${shadow2};
- }
- &-wrapper {
- width: 100%;
- height: 100%;
- border: 0px solid ${color('black')};
- color: ${color('gray50')};
- }
- &-header {
- ${truncate};
- color: ${color('white')};
- height: ${scopeTheme('terminalHeaderHeight')};
- padding: 8px 24px;
- background-color: ${scopeTheme('textColor')};
- position: relative;
- font-size: ${fontSize('small')};
- line-height: 28px;
- border-top-left-radius: ${borderRadius('soft')};
- &-title {
- cursor: default;
- }
- &-tools {
- position: absolute;
- right: 8px;
- top: 6px;
- &-item, &-item-icon {
- ${palable};
- padding: 4px 5px;
- color: ${color('white')};
- cursor: pointer;
- opacity: 0.7;
- border: 1px solid transparent;
- border-radius: ${borderRadius('soft')};
- font-size: ${fontSize('tiny')};
- font-weight: bold;
- &:hover {
- opacity: 1;
- border-color: ${props => transparentize(0.4, props.theme.colors.white)};
- }
- }
- &-item-icon {
- font-size: ${fontSize('normal')};
- }
- }
- }
- &-embedded { .terminal-inner { top: ${scopeTheme('terminalHeaderHeight')}; } }
- &-inner {
- cursor: text;
- font-family: ${props => props.theme.fontFamilies.monospace};
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- top: 0;
- background-color: ${color('black')};
- padding: 8px;
- box-sizing: content-box;
- border-bottom-left-radius: ${borderRadius('soft')};
- .terminal {
- background-color: transparent !important;
- }
- }
- &-status-bar {
- font-family: ${props => props.theme.fontFamilies.regular};
- position: absolute;
- bottom: 16px;
- right: 16px;
- width: 50%;
- padding: 16px 16px;
- opacity: 0.8;
- border-radius: ${borderRadius('soft')};
- h3 {
- margin: 4px 0;
- }
- &-message {
- margin: 4px 0;
- color: ${color('white')};
- }
- .link {
- font-weight: bold;
- cursor: pointer;
- float: right;
- }
- }
- &-cursor {
- color: ${color('black')};
- background: ${color('gray50')};
- }
- }
- .terminal-inactive .terminal-cursor {
- visibility: hidden;
- }
- .metric {
- &-unit {
- padding-left: 0.25em;
- }
- }
- .show-more {
- ${btnOpacity};
- border-top: 1px dotted ${scopeTheme('borderLightColor')};
- padding: 0px 0;
- margin-top: 4px;
- text-align: right;
- cursor: pointer;
- color: ${scopeTheme('textSecondaryColor')};
- font-size: ${fontSize('small')};
- &-icon {
- color: ${scopeTheme('textTertiaryColor')};
- font-size: ${fontSize('normal')};
- position: relative;
- top: 1px;
- }
- }
- .plugins {
- margin-right: 0.5em;
- &-label {
- margin-right: 0.25em;
- }
- &-plugin {
- cursor: default;
- }
- &-plugin + &-plugin:before {
- content: ', ';
- }
- &-plugin-icon {
- top: 1px;
- position: relative;
- font-size: ${fontSize('large')};
- margin-right: 2px;
- }
- .error {
- animation: blinking 2.0s 60 ${scopeTheme('baseEase')}; /* blink for 2 minutes */
- color: ${scopeTheme('textSecondaryColor')};
- }
- &-empty {
- opacity: ${scopeTheme('textSecondaryColor')};
- }
- }
- .status {
- padding: 2px 12px;
- background-color: ${scopeTheme('bodyBackgroundColor')};
- border-radius: ${borderRadius('soft')};
- color: ${scopeTheme('textSecondaryColor')};
- display: inline-block;
- opacity: 0.9;
- &-icon {
- font-size: ${fontSize('normal')};
- position: relative;
- top: 0.125rem;
- margin-right: 0.25rem;
- }
- &.status-loading {
- animation: blinking 2.0s 150 ${scopeTheme('baseEase')}; /* keep blinking for 5 minutes */
- text-transform: none;
- color: ${scopeTheme('textColor')};
- }
- }
- .topology-option, .metric-selector, .network-selector, .view-mode-selector, .time-control {
- font-size: ${fontSize('normal')};
- color: ${scopeTheme('textSecondaryColor')};
- margin-bottom: 6px;
- &:last-child {
- margin-bottom: 0;
- }
- i {
- font-size: ${fontSize('tiny')};
- margin-left: 4px;
- color: ${color('orange500')};
- }
- &-wrapper {
- pointer-events: all;
- border-radius: ${borderRadius('soft')};
- border: 1px solid ${scopeTheme('backgroundDarkerColor')};
- display: inline-block;
- white-space: nowrap;
- }
- &-action {
- ${btnOpacity};
- padding: 3px 12px;
- cursor: pointer;
- display: inline-block;
- background-color: ${scopeTheme('backgroundColor')};
- &-selected, &:not([disabled]):hover {
- color: ${scopeTheme('textDarkerColor')};
- background-color: ${scopeTheme('backgroundDarkerColor')};
- }
- &:first-child {
- border-left: none;
- border-top-left-radius: ${borderRadius('soft')};
- border-bottom-left-radius: ${borderRadius('soft')};
- }
- &:last-child {
- border-top-right-radius: ${borderRadius('soft')};
- border-bottom-right-radius: ${borderRadius('soft')};
- }
- }
- }
- .metric-selector {
- font-size: ${fontSize('small')};
- margin-top: 6px;
- }
- .view-mode-selector, .time-control {
- margin-left: 20px;
- &-wrapper {
- pointer-events: all;
- border-color: ${scopeTheme('backgroundDarkerSecondaryColor')};
- overflow: hidden;
- }
- &:first-child,
- &:last-child {
- .view-mode-selector-action {
- border-radius: ${borderRadius('none')};
- }
- }
- &-action {
- background-color: transparent;
- &-selected, &:not([disabled]):hover {
- background-color: ${scopeTheme('backgroundDarkerColor')};
- }
- &:not(:last-child) {
- border-right: 1px solid ${scopeTheme('backgroundDarkerSecondaryColor')};
- }
- }
- }
- .time-control {
- margin-right: 20px;
- &-controls {
- align-items: center;
- justify-content: flex-end;
- display: flex;
- }
- &-spinner {
- display: inline-block;
- margin-right: 15px;
- margin-top: 3px;
- i {
- color: ${scopeTheme('textSecondaryColor')};
- font-size: ${fontSize('normal')};
- }
- }
- &-info {
- ${blinkable};
- display: block;
- margin-top: 5px;
- text-align: right;
- pointer-events: all;
- font-size: ${fontSize('small')};
- }
- }
- .topology-option {
- &-wrapper {
- display: inline-flex;
- flex-wrap: wrap;
- overflow: hidden;
- max-height: 27px;
- transition: max-height 0.5s 0s ${scopeTheme('baseEase')};
- .topology-option-action {
- flex: 1 1 auto;
- text-align: center;
- }
- }
- &:last-child :hover {
- height: auto;
- max-height: calc((13px * 1.5 + 3px + 3px) * 8); /* expand to display 8 rows */
- overflow: auto;
- transition: max-height 0.5s 0s ${scopeTheme('baseEase')};
- }
- font-size: ${fontSize('small')};
- &-action {
- &-selected {
- cursor: default;
- }
- }
- }
- .view-mode-selector-wrapper, .time-control-wrapper {
- .label { margin-left: 4px; }
- i {
- margin-left: 0;
- color: ${scopeTheme('textSecondaryColor')};
- }
- }
- .network-selector-action {
- border-top: 3px solid transparent;
- border-bottom: 3px solid ${scopeTheme('backgroundDarkColor')};
- }
- .warning {
- display: inline-block;
- cursor: pointer;
- border: 1px dashed transparent;
- text-transform: none;
- border-radius: ${borderRadius('soft')};
- margin-left: 4px;
- &-wrapper {
- display: flex;
- }
- &-text {
- display: inline-block;
- color: ${scopeTheme('textSecondaryColor')};
- padding-left: 0.5em;
- }
- &-icon {
- ${btnOpacity};
- }
- &-expanded {
- margin-left: 0;
- padding: 2px 4px;
- border-color: ${scopeTheme('textTertiaryColor')};
- }
- &-expanded &-icon {
- position: relative;
- top: 4px;
- left: 2px;
- }
- }
- .sidebar {
- position: fixed;
- bottom: 11px;
- left: 11px;
- padding: 5px;
- font-size: ${fontSize('small')};
- border-radius: ${borderRadius('soft')};
- border: 1px solid transparent;
- pointer-events: none;
- max-width: 50%;
- }
- .sidebar-gridmode {
- background-color: ${color('purple50')};
- border-color: ${scopeTheme('backgroundDarkerColor')};
- opacity: 0.9;
- }
- .search {
- &-wrapper {
- margin: 0 8px;
- min-width: 160px;
- text-align: right;
- }
- }
- @keyframes blinking {
- 0%, 50%, 100% {
- opacity: 1.0;
- } 25% {
- opacity: 0.5;
- }
- }
- /*
- Help panel!
- */
- .help-panel {
- z-index: ${props => props.theme.layers.modal};
- background-color: ${color('white')};
- ${shadow2};
- display: flex;
- position: relative;
- &-wrapper {
- position: absolute;
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: flex-start;
- }
- &-header {
- background-color: ${color('blue400')};
- padding: 12px 24px;
- color: ${color('white')};
- h2 {
- margin: 0;
- font-size: ${fontSize('large')};
- }
- }
- &-tools {
- position: absolute;
- top: 6px;
- right: 8px;
- i {
- ${btnOpacity};
- padding: 4px 5px;
- margin-left: 2px;
- font-size: ${fontSize('normal')};
- color: ${color('purple400')};
- cursor: pointer;
- border: 1px solid transparent;
- border-radius: ${borderRadius('soft')};
- &:hover {
- border-color: ${props => transparentize(0.4, props.theme.colors.purple400)};
- }
- }
- }
- &-main {
- display: flex;
- padding: 12px 36px 36px 36px;
- flex-direction: row;
- align-items: stretch;
- h2 {
- line-height: 150%;
- font-size: ${fontSize('large')};
- color: ${color('purple400')};
- padding: 4px 0;
- border-bottom: 1px solid ${props => transparentize(0.9, props.theme.colors.purple400)};
- }
- h3 {
- font-size: ${fontSize('normal')};
- color: ${color('purple400')};
- padding: 4px 0;
- }
- p {
- margin: 0;
- }
- }
- &-shortcuts {
- margin-right: 36px;
- &-shortcut {
- kbd {
- display: inline-block;
- padding: 3px 5px;
- font-size: ${fontSize('tiny')};
- line-height: 10px;
- color: ${color('gray600')};
- vertical-align: middle;
- background-color: ${color('white')};
- border: solid 1px ${color('gray200')};
- border-bottom-color: ${color('gray600')};
- border-radius: ${borderRadius('soft')};
- box-shadow: inset 0 -1px 0 ${color('gray600')};
- }
- div.key {
- width: 60px;
- display: inline-block;
- }
- div.label {
- display: inline-block;
- }
- }
- }
- &-search {
- margin-right: 36px;
- &-row {
- display: flex;
- flex-direction: row;
- &-term {
- flex: 1;
- color: ${scopeTheme('textSecondaryColor')};
- i {
- margin-right: 5px;
- }
- }
- &-term-label {
- flex: 1;
- b {
- color: ${scopeTheme('textSecondaryColor')};
- }
- }
- }
- }
- &-fields {
- display: flex;
- flex-direction: column;
- &-current-topology {
- color: ${color('purple400')};
- }
- &-fields {
- display: flex;
- align-items: stretch;
- &-column {
- display: flex;
- flex-direction: column;
- flex: 1;
- margin-right: 12px;
- &-content {
- overflow: auto;
- /* 160px for top and bottom margins and the rest of the help window
- is about 160px too.
- Notes: Firefox gets a bit messy if you try and bubble
- heights + overflow up (min-height issue + still doesn't work v.well),
- so this is a bit of a hack. */
- max-height: calc(100vh - 160px - 160px - 160px);
- }
- }
- }
- }
- }
- /*
- Zoom control
- */
- .zoom-control {
- ${overlayWrapper};
- flex-direction: column;
- padding: 5px 7px 0;
- bottom: 50px;
- right: 40px;
- a:hover { border-color: transparent; }
- .rc-slider {
- margin: 5px 0;
- height: 60px;
- }
- }
- /*
- Debug panel!
- */
- .debug-panel {
- ${shadow2};
- background-color: ${color('white')};
- top: 80px;
- position: absolute;
- padding: 10px;
- left: 10px;
- z-index: ${props => props.theme.layers.modal};
- opacity: 0.3;
- &:hover {
- opacity: 1;
- }
- table {
- display: inline-block;
- border-collapse: collapse;
- margin: 4px 2px;
- td {
- width: 10px;
- height: 10px;
- }
- }
- }
- /*
- Nodes grid.
- */
- .nodes-grid {
- tr {
- border-radius: ${borderRadius('soft')};
- }
- &-label-minor {
- opacity: 0.7;
- }
- &-id-column {
- margin: -3px -4px;
- padding: 2px 4px;
- display: flex;
- div {
- flex: 1;
- }
- }
- .node-details-table-wrapper-wrapper {
- flex: 1;
- display: flex;
- flex-direction: row;
- width: 100%;
- .node-details-table-wrapper {
- margin: 0;
- flex: 1;
- }
- .nodes-grid-graph {
- position: relative;
- margin-top: 24px;
- }
- .node-details-table-node > * {
- padding: 3px 4px;
- }
- /* Keeping the row height fixed is important for locking the rows on hover. */
- .node-details-table-node, thead tr {
- height: 28px;
- }
- tr:nth-child(even) {
- background: ${color('gray100')};
- }
- tbody tr {
- border: 1px solid transparent;
- border-radius: ${borderRadius('soft')};
- cursor: pointer;
- }
- /* We fully control hovering of the grid rows from JS,
- because we want consistent behaviour between the
- visual and row locking logic that happens on hover. */
- tbody tr.selected, tbody tr.focused {
- background-color: ${props => transparentize(0.85, props.theme.colors.blue400)};
- border: 1px solid ${color('blue400')};
- }
- }
- .scroll-body {
- table {
- border-bottom: 1px solid ${color('gray200')};
- }
- thead, tbody tr {
- display: table;
- width: 100%;
- table-layout: fixed;
- }
- tbody:after {
- content: '';
- display: block;
- /* height of the controls so you can scroll the last row up above them
- and have a good look. */
- height: 140px;
- }
- thead {
- box-shadow: 0 4px 2px -2px ${props => transparentize(0.84, props.theme.colors.black)};
- border-bottom: 1px solid ${color('gray600')};
- }
- tbody {
- display: block;
- overflow-y: scroll;
- }
- }
- }
- .troubleshooting-menu {
- display: flex;
- position: relative;
- &-wrapper {
- height: 100%;
- width: 100%;
- align-items: center;
- display: flex;
- justify-content: center;
- position: absolute;
- }
- &-content {
- position: relative;
- background-color: ${color('white')};
- padding: 20px;
- ${shadow2};
- z-index: ${props => props.theme.layers.modal};
- }
- &-item {
- height: 40px;
- .soft { opacity: 0.6; }
- }
- button {
- border: 0;
- background-color: transparent;
- cursor: pointer;
- padding: 0;
- outline: 0;
- }
- button, a {
- color: ${color('purple900')};
- &:hover {
- color: ${scopeTheme('textColor')};
- }
- }
- i {
- width: 20px;
- text-align: center;
- margin-right: 10px;
- }
- .fa.fa-times {
- width: 25px;
- }
- }
- @media (max-width: 1330px) {
- .view-mode-selector .label { display: none; }
- }
- .ant-drawer-content-wrapper{
- position: fixed !important;
- display: flex!important ;
- transition: transform 0.33333s cubic-bezier(0, 0, 0.21, 1) 0s, margin-top 0.15s ease-in-out 0s !important;
- transform: translateX(0px) !important;
- }
- }
- /**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * https://github.com/chjj/term.js
- * @license MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- * Originally forked from (with the author's permission):
- * Fabrice Bellard's javascript vt100 for jslinux:
- * http://bellard.org/jslinux/
- * Copyright (c) 2011 Fabrice Bellard
- * The original design remains. The terminal itself
- * has been extended to include xterm CSI codes, among
- * other features.
- */
- /**
- * Default styles for xterm.js
- */
- .xterm {
- font-family: ${props => props.theme.fontFamilies.monospace};
- font-feature-settings: "liga" 0;
- position: relative;
- user-select: none;
- /* stylelint-disable property-no-vendor-prefix */
- -ms-user-select: none;
- -webkit-user-select: none;
- /* stylelint-enable property-no-vendor-prefix */
- }
- .xterm.focus,
- .xterm:focus {
- outline: none;
- }
- .xterm .xterm-helpers {
- position: absolute;
- top: 0;
- /**
- * The z-index of the helpers must be higher than the canvases in order for
- * IMEs to appear on top.
- */
- /* stylelint-disable sh-waqar/declaration-use-variable */
- z-index: 10;
- /* stylelint-enable sh-waqar/declaration-use-variable */
- }
- .xterm .xterm-helper-textarea {
- /*
- * HACK: to fix IE's blinking cursor
- * Move textarea out of the screen to the far left, so that the cursor is not visible.
- */
- position: absolute;
- opacity: 0;
- left: -9999em;
- top: 0;
- width: 0;
- height: 0;
- /* stylelint-disable sh-waqar/declaration-use-variable */
- z-index: -10;
- /* stylelint-enable sh-waqar/declaration-use-variable */
- /** Prevent wrapping so the IME appears against the textarea at the correct position */
- white-space: nowrap;
- overflow: hidden;
- resize: none;
- }
- .xterm .composition-view {
- /* TODO: Composition position got messed up somewhere */
- background: ${color('black')};
- color: ${color('white')};
- display: none;
- position: absolute;
- white-space: nowrap;
- z-index: ${props => props.theme.layers.front};
- }
- .xterm .composition-view.active {
- display: block;
- }
- .xterm .xterm-viewport {
- /* On OS X this is required in order for the scroll bar to appear fully opaque */
- background-color: ${color('black')};
- overflow-y: scroll;
- cursor: default;
- position: absolute;
- right: 0;
- left: 0;
- top: 0;
- bottom: 0;
- }
- .xterm .xterm-screen {
- position: relative;
- }
- .xterm .xterm-screen canvas {
- position: absolute;
- left: 0;
- top: 0;
- }
- .xterm .xterm-scroll-area {
- visibility: hidden;
- }
- .xterm-char-measure-element {
- display: inline-block;
- visibility: hidden;
- position: absolute;
- top: 0;
- left: -9999em;
- line-height: normal;
- }
- .xterm.enable-mouse-events {
- /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
- cursor: default;
- }
- .xterm:not(.enable-mouse-events) {
- cursor: text;
- }
- .xterm .xterm-accessibility,
- .xterm .xterm-message {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- /* stylelint-disable sh-waqar/declaration-use-variable */
- z-index: 100;
- /* stylelint-enable sh-waqar/declaration-use-variable */
- color: transparent;
- }
- .xterm .live-region {
- position: absolute;
- left: -9999px;
- width: 1px;
- height: 1px;
- overflow: hidden;
- }
- .xterm-cursor-pointer {
- cursor: pointer;
- }
- `;
- export default GlobalStyle;
|