_panel_graph.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. .graph-panel {
  2. display: flex;
  3. flex-direction: column;
  4. height: 100%;
  5. &--legend-right {
  6. @include media-breakpoint-up(sm) {
  7. flex-direction: row;
  8. .graph-legend {
  9. flex: 0 1 10px;
  10. max-height: 100%;
  11. overflow-y: initial;
  12. }
  13. .graph-legend-series {
  14. display: block;
  15. padding-left: 4px;
  16. }
  17. .graph-legend-table .graph-legend-series {
  18. display: table-row;
  19. }
  20. }
  21. }
  22. }
  23. .graph-panel__chart {
  24. position: relative;
  25. cursor: crosshair;
  26. flex-grow: 1;
  27. min-height: 65%;
  28. }
  29. .datapoints-warning {
  30. position: absolute;
  31. top: 50%;
  32. left: 50%;
  33. z-index: 10;
  34. margin-top: -50px;
  35. margin-left: -100px;
  36. width: 200px;
  37. text-align: center;
  38. cursor: auto;
  39. padding: 10px;
  40. }
  41. .graph-legend {
  42. display: flex;
  43. flex: 0 1 auto;
  44. max-height: 35%;
  45. margin: 0;
  46. text-align: center;
  47. overflow-y: auto;
  48. padding-top: 6px;
  49. position: relative;
  50. .popover-content {
  51. padding: 0;
  52. }
  53. }
  54. .graph-legend-content {
  55. position: relative;
  56. }
  57. .graph-legend-icon {
  58. position: relative;
  59. padding-right: 4px;
  60. top: 1px;
  61. }
  62. .graph-legend-icon,
  63. .graph-legend-alias,
  64. .graph-legend-value {
  65. display: inline;
  66. cursor: pointer;
  67. white-space: nowrap;
  68. font-size: 12px;
  69. text-align: left;
  70. &.current::before {
  71. content: 'Current: ';
  72. }
  73. &.max::before {
  74. content: 'Max: ';
  75. }
  76. &.min::before {
  77. content: 'Min: ';
  78. }
  79. &.total::before {
  80. content: 'Total: ';
  81. }
  82. &.avg::before {
  83. content: 'Avg: ';
  84. }
  85. }
  86. .graph-legend-icon .fa {
  87. font-size: 135%;
  88. position: relative;
  89. top: 1px;
  90. }
  91. .graph-legend-series {
  92. float: left;
  93. white-space: nowrap;
  94. padding-left: 10px;
  95. display: flex;
  96. align-items: center;
  97. &--right-y {
  98. float: right;
  99. }
  100. }
  101. // Don't move series to the right if legend is on the right as well
  102. .graph-panel--legend-right .graph-legend-series--right-y {
  103. float: left;
  104. }
  105. .graph-legend-value {
  106. padding-left: 6px;
  107. }
  108. .graph-legend-table {
  109. padding-right: 5px;
  110. padding-left: 5px;
  111. .graph-legend-series {
  112. display: table-row;
  113. float: none;
  114. padding-left: 0;
  115. &--right-y {
  116. float: none;
  117. .graph-legend-alias::after {
  118. content: '(right-y)';
  119. padding: 0 5px;
  120. color: $text-color-weak;
  121. }
  122. }
  123. }
  124. td,
  125. .graph-legend-alias,
  126. .graph-legend-icon,
  127. .graph-legend-value {
  128. float: none;
  129. display: table-cell;
  130. white-space: nowrap;
  131. padding: 2px;
  132. text-align: right;
  133. }
  134. .graph-legend-icon {
  135. cursor: pointer;
  136. }
  137. .graph-legend-value {
  138. padding-left: 15px;
  139. }
  140. .graph-legend-alias {
  141. text-align: left;
  142. max-width: 650px;
  143. text-overflow: ellipsis;
  144. overflow: hidden;
  145. }
  146. .graph-legend-series:nth-child(even) {
  147. background: $table-bg-accent;
  148. }
  149. .graph-legend-value {
  150. &.current,
  151. &.max,
  152. &.min,
  153. &.total,
  154. &.avg {
  155. &::before {
  156. content: '';
  157. }
  158. }
  159. }
  160. th {
  161. text-align: right;
  162. padding: 0px 10px 1px 0;
  163. font-weight: bold;
  164. color: $blue;
  165. font-size: 85%;
  166. white-space: nowrap;
  167. }
  168. }
  169. .graph-legend-series__table-name {
  170. display: flex;
  171. align-items: center;
  172. }
  173. .graph-legend-series-hidden {
  174. .graph-legend-value,
  175. .graph-legend-alias {
  176. color: $link-color-disabled;
  177. }
  178. }
  179. .graph-legend-popover {
  180. width: 210px;
  181. label {
  182. display: inline-block;
  183. }
  184. .btn {
  185. padding: 1px 3px;
  186. margin-right: 0px;
  187. line-height: initial;
  188. }
  189. }
  190. .annotation-tags {
  191. color: $purple;
  192. }
  193. .graph-series-override__properties {
  194. margin-left: $space-md;
  195. }
  196. .graph-tooltip {
  197. white-space: nowrap;
  198. font-size: $font-size-sm;
  199. background-color: $graph-tooltip-bg;
  200. color: $text-color;
  201. .graph-tooltip-time {
  202. text-align: center;
  203. position: relative;
  204. top: -3px;
  205. padding: $space-xxs;
  206. font-weight: $font-weight-semi-bold;
  207. color: $text-color;
  208. }
  209. .graph-tooltip-list-item {
  210. display: table-row;
  211. &--highlight {
  212. color: $text-color-emphasis;
  213. font-weight: $font-weight-semi-bold;
  214. }
  215. }
  216. .graph-tooltip-series-name {
  217. display: table-cell;
  218. padding: $space-xxs;
  219. max-width: 650px;
  220. text-overflow: ellipsis;
  221. overflow: hidden;
  222. }
  223. .graph-tooltip-value {
  224. display: table-cell;
  225. font-weight: $font-weight-semi-bold;
  226. padding-left: 15px;
  227. text-align: right;
  228. }
  229. }
  230. .graph-annotation {
  231. .label-tag {
  232. margin-right: 4px;
  233. margin-top: 8px;
  234. }
  235. .graph-annotation__header {
  236. background: $popover-header-bg;
  237. padding: 4px 8px;
  238. display: flex;
  239. flex-wrap: nowrap;
  240. }
  241. .graph-annotation__title {
  242. font-weight: $font-weight-semi-bold;
  243. padding-right: $spacer;
  244. overflow: hidden;
  245. display: inline-block;
  246. white-space: nowrap;
  247. text-overflow: ellipsis;
  248. flex-grow: 1;
  249. }
  250. .graph-annotation__edit-icon {
  251. padding-left: $spacer;
  252. }
  253. .graph-annotation__time {
  254. color: $text-muted;
  255. font-style: italic;
  256. font-weight: normal;
  257. display: inline-block;
  258. position: relative;
  259. top: 1px;
  260. }
  261. .graph-annotation__body {
  262. padding: $space-sm;
  263. }
  264. .graph-annotation__user {
  265. img {
  266. border-radius: 50%;
  267. width: 16px;
  268. height: 16px;
  269. }
  270. }
  271. a[href] {
  272. color: $blue;
  273. text-decoration: underline;
  274. }
  275. }
  276. .left-yaxis-label {
  277. top: 50%;
  278. left: 8px;
  279. transform: translateX(-50%) translateY(-50%) rotate(-90deg);
  280. }
  281. .right-yaxis-label {
  282. top: 50%;
  283. right: 8px;
  284. transform: translateX(50%) translateY(-50%) rotate(90deg);
  285. }
  286. .axisLabel {
  287. display: inline-block;
  288. color: $text-color;
  289. font-size: $font-size-sm;
  290. position: absolute;
  291. text-align: center;
  292. }
  293. .alert-handle-wrapper {
  294. position: absolute;
  295. user-select: none;
  296. .alert-handle {
  297. z-index: 10;
  298. position: relative;
  299. float: right;
  300. box-shadow: $card-shadow;
  301. background: $card-background;
  302. cursor: move;
  303. width: 100px;
  304. font-size: $font-size-sm;
  305. border-radius: 4px;
  306. text-align: left;
  307. color: $text-muted;
  308. &:hover {
  309. background-color: $btn-inverse-bg-hl;
  310. }
  311. .icon-gf {
  312. font-size: 14px;
  313. position: relative;
  314. top: 0px;
  315. float: left;
  316. border-right: 1px solid $btn-divider-left;
  317. padding: 6px 4px 4px 6px;
  318. }
  319. }
  320. .alert-handle-value {
  321. border-left: 1px solid $btn-divider-right;
  322. padding: $space-xs $space-sm;
  323. padding: 7px;
  324. line-height: 24px;
  325. height: 24px;
  326. .alert-handle-grip {
  327. background: url($btn-drag-image) no-repeat 50% 50%;
  328. background-size: 8px;
  329. float: right;
  330. width: 16px;
  331. height: 24px;
  332. margin-right: 2px;
  333. }
  334. }
  335. &--T1 {
  336. right: -222px;
  337. width: 245px;
  338. .alert-handle-line {
  339. width: 145px;
  340. }
  341. }
  342. &--T0 {
  343. right: -104px;
  344. width: 129px;
  345. .alert-handle-line {
  346. width: 28px;
  347. }
  348. }
  349. &--no-value {
  350. .alert-handle-line {
  351. display: none;
  352. }
  353. }
  354. .alert-handle-line {
  355. float: left;
  356. height: 2px;
  357. margin-top: 13px;
  358. z-index: 0;
  359. position: relative;
  360. &--critical {
  361. background-color: rgba(237, 46, 24, 0.6);
  362. }
  363. &--warning {
  364. background-color: rgba(247, 149, 32, 0.6);
  365. }
  366. }
  367. }
  368. .thresholds-form-disabled {
  369. filter: blur(3px);
  370. }