_explore.scss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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. // Prometheus-specifics, to be extracted to datasource soon
  200. .explore {
  201. .prom-query-field {
  202. display: flex;
  203. }
  204. .prom-query-field-wrapper {
  205. width: 100%;
  206. }
  207. .prom-query-field-info {
  208. margin: 0.25em 0.5em 0.5em;
  209. display: flex;
  210. details {
  211. margin-left: 1em;
  212. }
  213. }
  214. }
  215. // ReactTable basic overrides (does not include pivot/groups/filters)
  216. // When integrating ReactTable as new panel plugin, move to _panel_table.scss
  217. .ReactTable {
  218. border: none;
  219. }
  220. .ReactTable .rt-table {
  221. // Allow some space for the no-data text
  222. min-height: 90px;
  223. }
  224. .ReactTable .rt-thead.-header {
  225. box-shadow: none;
  226. background: $list-item-bg;
  227. border-top: 2px solid $body-bg;
  228. border-bottom: 2px solid $body-bg;
  229. height: 2em;
  230. }
  231. .ReactTable .rt-thead.-header .rt-th {
  232. text-align: left;
  233. color: $blue;
  234. font-weight: 500;
  235. }
  236. .ReactTable .rt-thead .rt-td,
  237. .ReactTable .rt-thead .rt-th {
  238. padding: 0.45em 0 0.45em 1.1em;
  239. border-right: none;
  240. box-shadow: none;
  241. }
  242. .ReactTable .rt-tbody .rt-td {
  243. padding: 0.45em 0 0.45em 1.1em;
  244. border-bottom: 2px solid $body-bg;
  245. border-right: 2px solid $body-bg;
  246. }
  247. .ReactTable .rt-tbody .rt-td:last-child {
  248. border-right: none;
  249. }
  250. .ReactTable .-pagination {
  251. border-top: none;
  252. box-shadow: none;
  253. margin-top: $panel-margin;
  254. }
  255. .ReactTable .-pagination .-btn {
  256. color: $blue;
  257. background: $list-item-bg;
  258. }
  259. .ReactTable .-pagination input,
  260. .ReactTable .-pagination select {
  261. color: $input-color;
  262. background-color: $input-bg;
  263. }
  264. .ReactTable .-loading {
  265. background: $input-bg;
  266. }
  267. .ReactTable .-loading.-active {
  268. opacity: 0.8;
  269. }
  270. .ReactTable .-loading > div {
  271. color: $input-color;
  272. }
  273. .ReactTable .rt-tr .rt-td:last-child {
  274. text-align: right;
  275. }
  276. .ReactTable .rt-noData {
  277. top: 60px;
  278. z-index: inherit;
  279. }
  280. // React-component cascade fix: show "loading" even though item can expand
  281. .rc-cascader-menu-item-loading:after {
  282. position: absolute;
  283. right: 12px;
  284. content: 'loading';
  285. color: #767980;
  286. font-style: italic;
  287. }
  288. // TODO Experimental
  289. .cheat-sheet-item {
  290. margin: 2*$panel-margin 0;
  291. width: 50%;
  292. }
  293. .cheat-sheet-item__title {
  294. font-size: $font-size-h3;
  295. }
  296. .cheat-sheet-item__expression {
  297. margin: $panel-margin/2 0;
  298. cursor: pointer;
  299. }