_panel_graph.scss 7.7 KB

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