_panel_graph.scss 7.7 KB

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