_explore.scss 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. .explore {
  2. width: 100%;
  3. &-container {
  4. padding: $dashboard-padding;
  5. }
  6. &-wrapper {
  7. display: flex;
  8. > .explore-split {
  9. width: 50%;
  10. }
  11. }
  12. // Push split button a bit
  13. .explore-first-button {
  14. margin-left: 15px;
  15. }
  16. .explore-panel {
  17. margin-top: $panel-margin;
  18. }
  19. .explore-panel__body {
  20. padding: $panel-padding;
  21. }
  22. .explore-panel__header {
  23. padding: $panel-padding;
  24. padding-top: 5px;
  25. padding-bottom: 0;
  26. display: flex;
  27. cursor: pointer;
  28. margin-bottom: 5px;
  29. transition: all 0.1s linear;
  30. }
  31. .explore-panel__header-label {
  32. font-weight: 500;
  33. margin-right: $panel-margin;
  34. font-size: $font-size-h6;
  35. box-shadow: $text-shadow-faint;
  36. }
  37. .explore-panel__header-buttons {
  38. margin-right: $panel-margin;
  39. font-size: $font-size-lg;
  40. line-height: $font-size-h6;
  41. }
  42. // Make sure wrap buttons around on small screens
  43. .navbar {
  44. flex-wrap: wrap;
  45. height: auto;
  46. }
  47. .navbar-page-btn {
  48. margin-right: 1rem;
  49. // Explore icon in header
  50. .fa {
  51. font-size: 100%;
  52. opacity: 0.75;
  53. margin-right: 0.5em;
  54. }
  55. }
  56. // Toggle mode
  57. .navbar-button.active {
  58. color: $btn-active-text-color;
  59. background-color: $btn-active-bg;
  60. }
  61. .navbar-button--no-icon {
  62. line-height: 18px;
  63. }
  64. .result-options {
  65. margin: 2 * $panel-margin 0;
  66. }
  67. .time-series-disclaimer {
  68. width: 300px;
  69. margin: $panel-margin auto;
  70. padding: 10px 0;
  71. border-radius: $border-radius;
  72. text-align: center;
  73. background-color: $panel-bg;
  74. .disclaimer-icon {
  75. color: $yellow;
  76. margin-right: $panel-margin/2;
  77. }
  78. .show-all-time-series {
  79. cursor: pointer;
  80. color: $external-link-color;
  81. }
  82. }
  83. .navbar .elapsed-time {
  84. position: absolute;
  85. left: 0;
  86. right: 0;
  87. top: 3.5rem;
  88. text-align: center;
  89. font-size: 0.8rem;
  90. }
  91. .graph-legend {
  92. flex-wrap: wrap;
  93. }
  94. .explore-panel__loader {
  95. height: 2px;
  96. position: relative;
  97. overflow: hidden;
  98. background: none;
  99. margin: $panel-margin / 2;
  100. transition: background-color 1s ease;
  101. }
  102. .explore-panel__loader--active {
  103. background: $text-color-faint;
  104. }
  105. .explore-panel__loader--active:after {
  106. content: ' ';
  107. display: block;
  108. width: 25%;
  109. top: 0;
  110. top: -50%;
  111. height: 250%;
  112. position: absolute;
  113. animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  114. animation-iteration-count: 100;
  115. z-index: 2;
  116. background: $blue;
  117. }
  118. @keyframes loader {
  119. from {
  120. left: -25%;
  121. }
  122. to {
  123. left: 100%;
  124. }
  125. }
  126. .datasource-picker {
  127. min-width: 200px;
  128. }
  129. .timepicker {
  130. display: flex;
  131. &-rangestring {
  132. margin-left: 0.5em;
  133. }
  134. }
  135. .run-icon {
  136. margin-left: 0.5em;
  137. transform: rotate(90deg);
  138. }
  139. .relative {
  140. position: relative;
  141. }
  142. .link {
  143. text-decoration: underline;
  144. }
  145. }
  146. .explore + .explore {
  147. border-left: 1px dotted $table-border;
  148. }
  149. .query-row {
  150. display: flex;
  151. position: relative;
  152. & + & {
  153. margin-top: 0.5rem;
  154. }
  155. }
  156. .query-row-tools {
  157. white-space: nowrap;
  158. }
  159. .query-row-status {
  160. position: absolute;
  161. top: 0;
  162. right: 90px;
  163. z-index: 1015;
  164. display: flex;
  165. flex-direction: column;
  166. justify-content: center;
  167. height: 34px;
  168. }
  169. .query-row-field {
  170. margin-right: 3px;
  171. width: 100%;
  172. }
  173. .query-transactions {
  174. display: table;
  175. }
  176. .query-transaction {
  177. display: table-row;
  178. color: $text-color-faint;
  179. line-height: 1.44;
  180. }
  181. .query-transaction--loading {
  182. animation: query-loading-color-change 1s alternate 100;
  183. }
  184. @keyframes query-loading-color-change {
  185. from {
  186. color: $text-color-faint;
  187. }
  188. to {
  189. color: $blue;
  190. }
  191. }
  192. .query-transaction__type,
  193. .query-transaction__duration {
  194. display: table-cell;
  195. font-size: $font-size-xs;
  196. text-align: right;
  197. padding-right: 0.25em;
  198. }
  199. .explore {
  200. .logs {
  201. .logs-controls {
  202. display: flex;
  203. background-color: $page-bg;
  204. padding: $panel-padding;
  205. padding-top: 10px;
  206. border-radius: $border-radius;
  207. margin: 2*$panel-margin 0;
  208. border: $panel-border;
  209. justify-items: flex-start;
  210. align-items: flex-start;
  211. > * {
  212. margin-right: 1em;
  213. }
  214. }
  215. .logs-nodata {
  216. > * {
  217. margin-left: 0.5em;
  218. }
  219. }
  220. .logs-meta {
  221. flex: 1;
  222. color: $text-color-weak;
  223. // Align first line with controls labels
  224. margin-top: -2px;
  225. }
  226. .logs-meta-item {
  227. margin-right: 1em;
  228. }
  229. .logs-meta-item__label {
  230. margin-right: 0.5em;
  231. font-size: 0.9em;
  232. font-weight: 500;
  233. }
  234. .logs-meta-item__value {
  235. font-family: $font-family-monospace;
  236. }
  237. .logs-meta-item__value-labels {
  238. // compensate for the labels padding
  239. position: relative;
  240. top: 4px;
  241. }
  242. .logs-entries {
  243. display: grid;
  244. grid-column-gap: 1rem;
  245. grid-row-gap: 0.1rem;
  246. font-family: $font-family-monospace;
  247. font-size: 12px;
  248. }
  249. .logs-row-match-highlight {
  250. // Undoing mark styling
  251. background: inherit;
  252. padding: inherit;
  253. color: $typeahead-selected-color;
  254. border-bottom: 1px solid $typeahead-selected-color;
  255. background-color: rgba($typeahead-selected-color, 0.1);
  256. }
  257. .logs-row-match-highlight--preview {
  258. background-color: rgba($typeahead-selected-color, 0.2);
  259. border-bottom-style: dotted;
  260. }
  261. .logs-row-level {
  262. background-color: transparent;
  263. margin: 2px 0;
  264. position: relative;
  265. opacity: 0.8;
  266. }
  267. .logs-row-level-critical,
  268. .logs-row-level-crit {
  269. background-color: #705da0;
  270. }
  271. .logs-row-level-error,
  272. .logs-row-level-err {
  273. background-color: #e24d42;
  274. }
  275. .logs-row-level-warning,
  276. .logs-row-level-warn {
  277. background-color: #eab839;
  278. }
  279. .logs-row-level-info {
  280. background-color: #7eb26d;
  281. }
  282. .logs-row-level-debug {
  283. background-color: #1f78c1;
  284. }
  285. .logs-row-level-trace {
  286. background-color: #6ed0e0;
  287. }
  288. .logs-row-duplicates {
  289. text-align: right;
  290. }
  291. .logs-label {
  292. display: inline-block;
  293. padding: 0 2px;
  294. background-color: $btn-inverse-bg;
  295. border-radius: $border-radius;
  296. margin: 0 4px 2px 0;
  297. text-overflow: ellipsis;
  298. white-space: nowrap;
  299. position: relative;
  300. }
  301. .logs-label__icon {
  302. border-left: $panel-border;
  303. padding: 0 2px;
  304. cursor: pointer;
  305. margin-left: 2px;
  306. }
  307. .logs-label__stats {
  308. position: absolute;
  309. top: 1.25em;
  310. left: -10px;
  311. z-index: 100;
  312. background-color: $popover-bg;
  313. color: $popover-color;
  314. border: 1px solid $popover-border-color;
  315. padding: 10px;
  316. border-radius: $border-radius;
  317. justify-content: space-between;
  318. box-shadow: $popover-shadow;
  319. }
  320. .logs-row-labels {
  321. line-height: 1.2;
  322. }
  323. .logs-stats__info {
  324. margin-bottom: $spacer / 2;
  325. }
  326. .logs-stats__icon {
  327. margin-left: 0.5em;
  328. cursor: pointer;
  329. }
  330. .logs-stats-row {
  331. margin: $spacer/1.75 0;
  332. &--active {
  333. color: $blue;
  334. position: relative;
  335. }
  336. &--active:after {
  337. display: inline;
  338. content: '*';
  339. position: absolute;
  340. top: 0;
  341. left: -8px;
  342. }
  343. &__label {
  344. display: flex;
  345. margin-bottom: 1px;
  346. }
  347. &__value {
  348. flex: 1;
  349. }
  350. &__count,
  351. &__percent {
  352. text-align: right;
  353. margin-left: 0.5em;
  354. }
  355. &__percent {
  356. width: 3em;
  357. }
  358. &__bar,
  359. &__innerbar {
  360. height: 4px;
  361. overflow: hidden;
  362. background: $text-color-faint;
  363. }
  364. &__innerbar {
  365. background-color: $blue;
  366. }
  367. }
  368. }
  369. }
  370. // Prometheus-specifics, to be extracted to datasource soon
  371. .explore {
  372. .prom-query-field {
  373. display: flex;
  374. }
  375. .prom-query-field-wrapper {
  376. width: 100%;
  377. }
  378. .prom-query-field-info {
  379. margin: 0.25em 0.5em 0.5em;
  380. display: flex;
  381. details {
  382. margin-left: 1em;
  383. }
  384. }
  385. }
  386. // ReactTable basic overrides (does not include pivot/groups/filters)
  387. // When integrating ReactTable as new panel plugin, move to _panel_table.scss
  388. .ReactTable {
  389. border: none;
  390. }
  391. .ReactTable .rt-table {
  392. // Allow some space for the no-data text
  393. min-height: 90px;
  394. }
  395. .ReactTable .rt-thead.-header {
  396. box-shadow: none;
  397. background: $list-item-bg;
  398. border-top: 2px solid $body-bg;
  399. border-bottom: 2px solid $body-bg;
  400. height: 2em;
  401. }
  402. .ReactTable .rt-thead.-header .rt-th {
  403. text-align: left;
  404. color: $blue;
  405. font-weight: 500;
  406. }
  407. .ReactTable .rt-thead .rt-td,
  408. .ReactTable .rt-thead .rt-th {
  409. padding: 0.45em 0 0.45em 1.1em;
  410. border-right: none;
  411. box-shadow: none;
  412. }
  413. .ReactTable .rt-tbody .rt-td {
  414. padding: 0.45em 0 0.45em 1.1em;
  415. border-bottom: 2px solid $body-bg;
  416. border-right: 2px solid $body-bg;
  417. }
  418. .ReactTable .rt-tbody .rt-td:last-child {
  419. border-right: none;
  420. }
  421. .ReactTable .-pagination {
  422. border-top: none;
  423. box-shadow: none;
  424. margin-top: $panel-margin;
  425. }
  426. .ReactTable .-pagination .-btn {
  427. color: $blue;
  428. background: $list-item-bg;
  429. }
  430. .ReactTable .-pagination input,
  431. .ReactTable .-pagination select {
  432. color: $input-color;
  433. background-color: $input-bg;
  434. }
  435. .ReactTable .-loading {
  436. background: $input-bg;
  437. }
  438. .ReactTable .-loading.-active {
  439. opacity: 0.8;
  440. }
  441. .ReactTable .-loading > div {
  442. color: $input-color;
  443. }
  444. .ReactTable .rt-tr .rt-td:last-child {
  445. text-align: right;
  446. }
  447. .ReactTable .rt-noData {
  448. top: 60px;
  449. z-index: inherit;
  450. }
  451. // React-component cascade fix: show "loading" even though item can expand
  452. .rc-cascader-menu-item-loading:after {
  453. position: absolute;
  454. right: 12px;
  455. content: 'loading';
  456. color: #767980;
  457. font-style: italic;
  458. }
  459. // TODO Experimental
  460. .cheat-sheet-item {
  461. margin: 2*$panel-margin 0;
  462. width: 50%;
  463. }
  464. .cheat-sheet-item__title {
  465. font-size: $font-size-h3;
  466. }
  467. .cheat-sheet-item__expression {
  468. margin: $panel-margin/2 0;
  469. cursor: pointer;
  470. }