_panel_logs.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. $column-horizontal-spacing: 10px;
  2. .logs-panel-options {
  3. display: flex;
  4. background-color: $page-bg;
  5. padding: $space-sm $space-md $space-sm $space-md;
  6. border-radius: $border-radius;
  7. margin: $space-md 0 $space-sm;
  8. border: $panel-border;
  9. flex-direction: column;
  10. }
  11. .logs-panel-controls {
  12. display: flex;
  13. justify-items: flex-start;
  14. align-items: center;
  15. flex-wrap: wrap;
  16. > * {
  17. margin-right: $spacer * 2;
  18. }
  19. }
  20. .logs-panel-nodata {
  21. > * {
  22. margin-left: 0.5em;
  23. }
  24. }
  25. .logs-panel-meta {
  26. flex: 1;
  27. color: $text-color-weak;
  28. margin-bottom: $spacer;
  29. min-width: 30%;
  30. display: flex;
  31. }
  32. .logs-panel-meta__item {
  33. margin-right: $spacer;
  34. display: flex;
  35. align-items: baseline;
  36. }
  37. .logs-panel-meta__label {
  38. margin-right: $spacer / 2;
  39. font-size: $font-size-sm;
  40. font-weight: $font-weight-semi-bold;
  41. }
  42. .logs-panel-meta__value {
  43. font-family: $font-family-monospace;
  44. }
  45. .logs-panel-meta-item__labels {
  46. // compensate for the labels padding
  47. position: relative;
  48. top: 4px;
  49. }
  50. .logs-rows {
  51. font-family: $font-family-monospace;
  52. font-size: $font-size-sm;
  53. display: table;
  54. table-layout: fixed;
  55. width: 100%;
  56. }
  57. .logs-row {
  58. display: table-row;
  59. > div {
  60. display: table-cell;
  61. padding-right: $column-horizontal-spacing;
  62. border-top: 1px solid transparent;
  63. border-bottom: 1px solid transparent;
  64. height: 100%;
  65. }
  66. &:hover {
  67. background: $page-bg;
  68. }
  69. }
  70. .logs-row__time {
  71. white-space: nowrap;
  72. width: 19em;
  73. }
  74. .logs-row__localtime {
  75. white-space: nowrap;
  76. width: 12.5em;
  77. }
  78. .logs-row__labels {
  79. width: 20%;
  80. line-height: 1.2;
  81. position: relative;
  82. }
  83. .logs-row__message {
  84. word-break: break-all;
  85. }
  86. .logs-row__match-highlight {
  87. // Undoing mark styling
  88. background: inherit;
  89. padding: inherit;
  90. color: $typeahead-selected-color;
  91. border-bottom: 1px solid $typeahead-selected-color;
  92. background-color: rgba($typeahead-selected-color, 0.1);
  93. &--preview {
  94. background-color: rgba($typeahead-selected-color, 0.2);
  95. border-bottom-style: dotted;
  96. }
  97. }
  98. .logs-row__level {
  99. position: relative;
  100. width: 10px;
  101. &::after {
  102. content: '';
  103. display: block;
  104. position: absolute;
  105. top: 1px;
  106. bottom: 1px;
  107. width: 3px;
  108. background-color: $logs-color-unkown;
  109. }
  110. &--critical,
  111. &--crit {
  112. &::after {
  113. background-color: #705da0;
  114. }
  115. }
  116. &--error,
  117. &--err {
  118. &::after {
  119. background-color: #e24d42;
  120. }
  121. }
  122. &--warning,
  123. &--warn {
  124. &::after {
  125. background-color: $yellow;
  126. }
  127. }
  128. &--info {
  129. &::after {
  130. background-color: #7eb26d;
  131. }
  132. }
  133. &--debug {
  134. &::after {
  135. background-color: #1f78c1;
  136. }
  137. }
  138. &--trace {
  139. &::after {
  140. background-color: #6ed0e0;
  141. }
  142. }
  143. }
  144. .logs-row__duplicates {
  145. text-align: right;
  146. width: 4em;
  147. }
  148. .logs-row__field-highlight {
  149. // Undoing mark styling
  150. background: inherit;
  151. padding: inherit;
  152. border-bottom: 1px dotted $typeahead-selected-color;
  153. .logs-row__field-highlight--icon {
  154. margin-left: 0.5em;
  155. cursor: pointer;
  156. display: none;
  157. }
  158. }
  159. .logs-row__stats {
  160. margin: 5px 0;
  161. }
  162. .logs-row__field-highlight:hover {
  163. color: $typeahead-selected-color;
  164. border-bottom-style: solid;
  165. .logs-row__field-highlight--icon {
  166. display: inline;
  167. }
  168. }
  169. .logs-labels {
  170. display: flex;
  171. flex-wrap: wrap;
  172. }
  173. .logs-label {
  174. display: flex;
  175. padding: 0 2px;
  176. background-color: $btn-inverse-bg;
  177. border-radius: $border-radius;
  178. margin: 0 4px 2px 0;
  179. text-overflow: ellipsis;
  180. white-space: nowrap;
  181. overflow: hidden;
  182. }
  183. .logs-label__icon {
  184. border-left: $panel-border;
  185. padding: 0 2px;
  186. cursor: pointer;
  187. margin-left: 2px;
  188. }
  189. .logs-label__value {
  190. display: inline-block;
  191. max-width: 20em;
  192. text-overflow: ellipsis;
  193. overflow: hidden;
  194. }
  195. .logs-label__stats {
  196. position: absolute;
  197. top: 1.25em;
  198. left: -10px;
  199. z-index: 100;
  200. justify-content: space-between;
  201. box-shadow: $popover-shadow;
  202. }
  203. /*
  204. * Stats popover & message stats box
  205. */
  206. .logs-stats {
  207. background-color: $popover-bg;
  208. color: $popover-color;
  209. border: 1px solid $popover-border-color;
  210. border-radius: $border-radius;
  211. max-width: 500px;
  212. }
  213. .logs-stats__header {
  214. background: $popover-header-bg;
  215. padding: 6px 10px;
  216. display: flex;
  217. }
  218. .logs-stats__title {
  219. font-weight: $font-weight-semi-bold;
  220. padding-right: $spacer;
  221. overflow: hidden;
  222. display: inline-block;
  223. white-space: nowrap;
  224. text-overflow: ellipsis;
  225. flex-grow: 1;
  226. }
  227. .logs-stats__body {
  228. padding: 20px 10px 10px 10px;
  229. }
  230. .logs-stats__close {
  231. cursor: pointer;
  232. }
  233. .logs-stats-row {
  234. margin: $spacer/1.75 0;
  235. &--active {
  236. color: $blue;
  237. position: relative;
  238. }
  239. &--active::after {
  240. display: inline;
  241. content: '*';
  242. position: absolute;
  243. top: 0;
  244. left: -8px;
  245. }
  246. &__label {
  247. display: flex;
  248. margin-bottom: 1px;
  249. }
  250. &__value {
  251. flex: 1;
  252. text-overflow: ellipsis;
  253. overflow: hidden;
  254. }
  255. &__count,
  256. &__percent {
  257. text-align: right;
  258. margin-left: 0.5em;
  259. }
  260. &__percent {
  261. width: 3em;
  262. }
  263. &__bar,
  264. &__innerbar {
  265. height: 4px;
  266. overflow: hidden;
  267. background: $text-color-faint;
  268. }
  269. &__innerbar {
  270. background: $blue;
  271. }
  272. }