_panel_graph.scss 7.6 KB

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