_explore.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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. // Graph panel needs a bit extra padding at top
  17. .panel-container {
  18. padding: $panel-padding;
  19. padding-top: 10px;
  20. }
  21. // Make sure wrap buttons around on small screens
  22. .navbar {
  23. flex-wrap: wrap;
  24. height: auto;
  25. }
  26. .navbar-page-btn {
  27. margin-right: 1rem;
  28. // Explore icon in header
  29. .fa {
  30. font-size: 100%;
  31. opacity: 0.75;
  32. margin-right: 0.5em;
  33. }
  34. }
  35. // Toggle mode
  36. .navbar-button.active {
  37. color: $btn-active-text-color;
  38. background-color: $btn-active-bg;
  39. }
  40. .navbar-button--no-icon {
  41. line-height: 18px;
  42. }
  43. .result-options {
  44. margin: 2 * $panel-margin 0;
  45. }
  46. .time-series-disclaimer {
  47. width: 300px;
  48. margin: $panel-margin auto;
  49. padding: 10px 0;
  50. border-radius: $border-radius;
  51. text-align: center;
  52. background-color: $panel-bg;
  53. .disclaimer-icon {
  54. color: $yellow;
  55. margin-right: $panel-margin/2;
  56. }
  57. .show-all-time-series {
  58. cursor: pointer;
  59. color: $external-link-color;
  60. }
  61. }
  62. .navbar .elapsed-time {
  63. position: absolute;
  64. left: 0;
  65. right: 0;
  66. top: 3.5rem;
  67. text-align: center;
  68. font-size: 0.8rem;
  69. }
  70. .graph-legend {
  71. flex-wrap: wrap;
  72. }
  73. .explore-panel__loader {
  74. height: 2px;
  75. position: relative;
  76. overflow: hidden;
  77. background: $text-color-faint;
  78. margin: $panel-margin / 2;
  79. }
  80. .explore-panel__loader:after {
  81. content: ' ';
  82. display: block;
  83. width: 25%;
  84. top: 0;
  85. top: -50%;
  86. height: 250%;
  87. position: absolute;
  88. animation: loader 2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  89. animation-iteration-count: 100;
  90. z-index: 2;
  91. background: $blue;
  92. }
  93. @keyframes loader {
  94. from {
  95. left: -25%;
  96. }
  97. to {
  98. left: 100%;
  99. }
  100. }
  101. .datasource-picker {
  102. min-width: 200px;
  103. }
  104. .timepicker {
  105. display: flex;
  106. &-rangestring {
  107. margin-left: 0.5em;
  108. }
  109. }
  110. .run-icon {
  111. margin-left: 0.5em;
  112. transform: rotate(90deg);
  113. }
  114. .relative {
  115. position: relative;
  116. }
  117. .link {
  118. text-decoration: underline;
  119. }
  120. }
  121. .explore + .explore {
  122. border-left: 1px dotted $table-border;
  123. }
  124. .query-row {
  125. display: flex;
  126. position: relative;
  127. & + & {
  128. margin-top: 0.5rem;
  129. }
  130. }
  131. .query-row-tools {
  132. white-space: nowrap;
  133. }
  134. .query-row-status {
  135. position: absolute;
  136. top: 0;
  137. right: 90px;
  138. z-index: 1024;
  139. display: flex;
  140. flex-direction: column;
  141. justify-content: center;
  142. height: 34px;
  143. }
  144. .query-row-field {
  145. margin-right: 3px;
  146. width: 100%;
  147. }
  148. .query-transactions {
  149. display: table;
  150. }
  151. .query-transaction {
  152. display: table-row;
  153. color: $text-color-faint;
  154. line-height: 1.44;
  155. }
  156. .query-transaction--loading {
  157. animation: query-loading-color-change 1s alternate 100;
  158. }
  159. @keyframes query-loading-color-change {
  160. from {
  161. color: $text-color-faint;
  162. }
  163. to {
  164. color: $blue;
  165. }
  166. }
  167. .query-transaction__type,
  168. .query-transaction__duration {
  169. display: table-cell;
  170. font-size: $font-size-xs;
  171. text-align: right;
  172. padding-right: 0.25em;
  173. }
  174. .explore {
  175. .logs {
  176. .logs-entries {
  177. display: grid;
  178. grid-column-gap: 1rem;
  179. grid-row-gap: 0.1rem;
  180. grid-template-columns: 4px minmax(100px, max-content) 1fr;
  181. font-family: $font-family-monospace;
  182. }
  183. .logs-row-match-highlight {
  184. // Undoing mark styling
  185. background: inherit;
  186. padding: inherit;
  187. color: $typeahead-selected-color;
  188. border-bottom: 1px solid $typeahead-selected-color;
  189. background-color: lighten($typeahead-selected-color, 60%);
  190. }
  191. .logs-row-level {
  192. background-color: transparent;
  193. margin: 6px 0;
  194. border-radius: 2px;
  195. opacity: 0.8;
  196. }
  197. .logs-row-level-crit,
  198. .logs-row-level-error,
  199. .logs-row-level-err {
  200. background-color: $red;
  201. }
  202. .logs-row-level-warn {
  203. background-color: $orange;
  204. }
  205. .logs-row-level-info {
  206. background-color: $green;
  207. }
  208. }
  209. }
  210. // Prometheus-specifics, to be extracted to datasource soon
  211. .explore {
  212. .prom-query-field {
  213. display: flex;
  214. }
  215. .prom-query-field-wrapper {
  216. width: 100%;
  217. }
  218. .prom-query-field-info {
  219. margin: 0.25em 0.5em 0.5em;
  220. display: flex;
  221. details {
  222. margin-left: 1em;
  223. }
  224. }
  225. }
  226. // ReactTable basic overrides (does not include pivot/groups/filters)
  227. // When integrating ReactTable as new panel plugin, move to _panel_table.scss
  228. .ReactTable {
  229. border: none;
  230. // Allow some space for the no-data text
  231. min-height: 120px;
  232. }
  233. .ReactTable .rt-thead.-header {
  234. box-shadow: none;
  235. background: $list-item-bg;
  236. border-top: 2px solid $body-bg;
  237. border-bottom: 2px solid $body-bg;
  238. height: 2em;
  239. }
  240. .ReactTable .rt-thead.-header .rt-th {
  241. text-align: left;
  242. color: $blue;
  243. font-weight: 500;
  244. }
  245. .ReactTable .rt-thead .rt-td,
  246. .ReactTable .rt-thead .rt-th {
  247. padding: 0.45em 0 0.45em 1.1em;
  248. border-right: none;
  249. box-shadow: none;
  250. }
  251. .ReactTable .rt-tbody .rt-td {
  252. padding: 0.45em 0 0.45em 1.1em;
  253. border-bottom: 2px solid $body-bg;
  254. border-right: 2px solid $body-bg;
  255. }
  256. .ReactTable .rt-tbody .rt-td:last-child {
  257. border-right: none;
  258. }
  259. .ReactTable .-pagination .-btn {
  260. color: $blue;
  261. background: $list-item-bg;
  262. }
  263. .ReactTable .-pagination input,
  264. .ReactTable .-pagination select {
  265. color: $input-color;
  266. background-color: $input-bg;
  267. }
  268. .ReactTable .-loading {
  269. background: $input-bg;
  270. }
  271. .ReactTable .-loading.-active {
  272. opacity: 0.8;
  273. }
  274. .ReactTable .-loading > div {
  275. color: $input-color;
  276. }
  277. .ReactTable .rt-tr .rt-td:last-child {
  278. text-align: right;
  279. }
  280. // TODO Experimental
  281. .cheat-sheet-item {
  282. margin: 2*$panel-margin 0;
  283. width: 50%;
  284. }
  285. .cheat-sheet-item__title {
  286. font-size: $font-size-h3;
  287. }
  288. .cheat-sheet-item__expression {
  289. margin: $panel-margin/2 0;
  290. cursor: pointer;
  291. }