_panel_graph.scss 7.4 KB

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