_panel_graph.scss 7.2 KB

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