_panel_graph.scss 7.5 KB

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