_panel_graph.scss 7.6 KB

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