_panel_graph.scss 7.8 KB

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