_panel_graph.scss 7.3 KB

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