_explore.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. .explore {
  2. flex: 1 1 auto;
  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. background: $blue;
  116. }
  117. @keyframes loader {
  118. from {
  119. left: -25%;
  120. }
  121. to {
  122. left: 100%;
  123. }
  124. }
  125. .datasource-picker {
  126. min-width: 200px;
  127. }
  128. .timepicker {
  129. display: flex;
  130. &-rangestring {
  131. margin-left: 0.5em;
  132. }
  133. }
  134. .run-icon {
  135. margin-left: 0.25em;
  136. transform: rotate(90deg);
  137. }
  138. .relative {
  139. position: relative;
  140. }
  141. .link {
  142. text-decoration: underline;
  143. }
  144. }
  145. .explore + .explore {
  146. border-left: 1px dotted $table-border;
  147. }
  148. .query-row {
  149. display: flex;
  150. position: relative;
  151. & + & {
  152. margin-top: 0.5rem;
  153. }
  154. }
  155. .query-row-tools {
  156. white-space: nowrap;
  157. }
  158. .query-row-status {
  159. position: absolute;
  160. top: 0;
  161. right: 90px;
  162. z-index: 1015;
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: center;
  166. height: 34px;
  167. }
  168. .query-row-field {
  169. margin-right: 3px;
  170. width: 100%;
  171. }
  172. .query-transactions {
  173. display: table;
  174. }
  175. .query-transaction {
  176. display: table-row;
  177. color: $text-color-faint;
  178. line-height: 1.44;
  179. }
  180. .query-transaction--loading {
  181. animation: query-loading-color-change 1s alternate 100;
  182. }
  183. @keyframes query-loading-color-change {
  184. from {
  185. color: $text-color-faint;
  186. }
  187. to {
  188. color: $blue;
  189. }
  190. }
  191. .query-transaction__type,
  192. .query-transaction__duration {
  193. display: table-cell;
  194. font-size: $font-size-xs;
  195. text-align: right;
  196. padding-right: 0.25em;
  197. }
  198. // Prometheus-specifics, to be extracted to datasource soon
  199. .explore {
  200. .prom-query-field {
  201. display: flex;
  202. }
  203. .prom-query-field-wrapper {
  204. width: 100%;
  205. }
  206. .prom-query-field-info {
  207. margin: 0.25em 0.5em 0.5em;
  208. display: flex;
  209. details {
  210. margin-left: 1em;
  211. }
  212. }
  213. }
  214. // ReactTable basic overrides (does not include pivot/groups/filters)
  215. // When integrating ReactTable as new panel plugin, move to _panel_table.scss
  216. .ReactTable {
  217. border: none;
  218. }
  219. .ReactTable .rt-table {
  220. // Allow some space for the no-data text
  221. min-height: 90px;
  222. }
  223. .ReactTable .rt-thead.-header {
  224. box-shadow: none;
  225. background: $list-item-bg;
  226. border-top: 2px solid $body-bg;
  227. border-bottom: 2px solid $body-bg;
  228. height: 2em;
  229. }
  230. .ReactTable .rt-thead.-header .rt-th {
  231. text-align: left;
  232. color: $blue;
  233. font-weight: 500;
  234. }
  235. .ReactTable .rt-thead .rt-td,
  236. .ReactTable .rt-thead .rt-th {
  237. padding: 0.45em 0 0.45em 1.1em;
  238. border-right: none;
  239. box-shadow: none;
  240. }
  241. .ReactTable .rt-tbody .rt-td {
  242. padding: 0.45em 0 0.45em 1.1em;
  243. border-bottom: 2px solid $body-bg;
  244. border-right: 2px solid $body-bg;
  245. }
  246. .ReactTable .rt-tbody .rt-td:last-child {
  247. border-right: none;
  248. }
  249. .ReactTable .-pagination {
  250. border-top: none;
  251. box-shadow: none;
  252. margin-top: $panel-margin;
  253. }
  254. .ReactTable .-pagination .-btn {
  255. color: $blue;
  256. background: $list-item-bg;
  257. }
  258. .ReactTable .-pagination input,
  259. .ReactTable .-pagination select {
  260. color: $input-color;
  261. background-color: $input-bg;
  262. }
  263. .ReactTable .-loading {
  264. background: $input-bg;
  265. }
  266. .ReactTable .-loading.-active {
  267. opacity: 0.8;
  268. }
  269. .ReactTable .-loading > div {
  270. color: $input-color;
  271. }
  272. .ReactTable .rt-tr .rt-td:last-child {
  273. text-align: right;
  274. }
  275. .ReactTable .rt-noData {
  276. top: 60px;
  277. z-index: inherit;
  278. }
  279. // React-component cascade fix: show "loading" even though item can expand
  280. .rc-cascader-menu-item-loading:after {
  281. position: absolute;
  282. right: 12px;
  283. content: 'loading';
  284. color: #767980;
  285. font-style: italic;
  286. }
  287. // TODO Experimental
  288. .cheat-sheet-item {
  289. margin: 2*$panel-margin 0;
  290. width: 50%;
  291. }
  292. .cheat-sheet-item__title {
  293. font-size: $font-size-h3;
  294. }
  295. .cheat-sheet-item__expression {
  296. margin: $panel-margin/2 0;
  297. cursor: pointer;
  298. }