_panel_graph.scss 7.6 KB

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