Pārlūkot izejas kodu

color indicator

Peter Holmberg 7 gadi atpakaļ
vecāks
revīzija
3066f895fa

+ 1 - 1
public/app/plugins/panel/gauge/Thresholds.tsx

@@ -163,7 +163,7 @@ export default class Thresholds extends PureComponent<PanelOptionsProps<OptionsP
       const rowStyle = classNames({
         'threshold-row': true,
         'threshold-row-min': index === 0,
-        'threshold-row-max': index === thresholds.length,
+        'threshold-row-max': index === thresholds.length - 1,
       });
 
       return (

+ 4 - 5
public/sass/components/_thresholds.scss

@@ -4,7 +4,6 @@
 }
 
 .threshold-rows {
-  flex: 1 0 auto;
   margin-left: 5px;
 }
 
@@ -36,6 +35,7 @@
   display: flex;
   align-items: center;
   justify-content: center;
+  background-color: $input-bg;
 }
 
 .threshold-row-color-inner {
@@ -66,11 +66,11 @@
 }
 
 .threshold-row-min {
-  margin-top: -17px;
+  margin-top: -22px;
 }
 
 .threshold-row-max {
-  margin-bottom: -17px;
+  margin-bottom: -22px;
 }
 
 .threshold-row-remove {
@@ -107,7 +107,6 @@
 
 .color-indicators {
   width: 15px;
-  min-height: 40px;
-  flex: 0 1 auto;
   border-radius: $border-radius;
+  overflow: hidden;
 }