_panel_graph.scss 7.5 KB

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