_panel_graph.scss 7.5 KB

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