_explore.scss 8.9 KB

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