فهرست منبع

changed time region color modes

Marcus Efraimsson 7 سال پیش
والد
کامیت
a8e6b241d6
2فایلهای تغییر یافته به همراه14 افزوده شده و 22 حذف شده
  1. 1 1
      devenv/dev-dashboards/panel_tests_graph_time_regions.json
  2. 13 21
      public/app/plugins/panel/graph/time_region_manager.ts

+ 1 - 1
devenv/dev-dashboards/panel_tests_graph_time_regions.json

@@ -63,7 +63,7 @@
       "timeFrom": null,
       "timeRegions": [
         {
-          "colorMode": "background6",
+          "colorMode": "gray",
           "fill": true,
           "fillColor": "rgba(255, 255, 255, 0.03)",
           "from": "08:30",

+ 13 - 21
public/app/plugins/panel/graph/time_region_manager.ts

@@ -4,37 +4,29 @@ import moment from 'moment';
 import config from 'app/core/config';
 
 export const colorModes = {
-  custom: { title: 'Custom' },
+  gray: {
+    themeDependent: true,
+    title: 'Gray',
+    darkColor: { fill: 'rgba(255, 255, 255, 0.09)', line: 'rgba(255, 255, 255, 0.2)' },
+    lightColor: { fill: 'rgba(0, 0, 0, 0.09)', line: 'rgba(0, 0, 0, 0.2)' },
+  },
   red: {
     title: 'Red',
     color: { fill: 'rgba(234, 112, 112, 0.12)', line: 'rgba(237, 46, 24, 0.60)' },
   },
-  yellow: {
-    title: 'Yellow',
-    color: { fill: 'rgba(235, 138, 14, 0.12)', line: 'rgba(247, 149, 32, 0.60)' },
-  },
   green: {
     title: 'Green',
     color: { fill: 'rgba(11, 237, 50, 0.090)', line: 'rgba(6,163,69, 0.60)' },
   },
-  background3: {
-    themeDependent: true,
-    title: 'Background (3%)',
-    darkColor: { fill: 'rgba(255, 255, 255, 0.03)', line: 'rgba(255, 255, 255, 0.1)' },
-    lightColor: { fill: 'rgba(0, 0, 0, 0.03)', line: 'rgba(0, 0, 0, 0.1)' },
+  blue: {
+    title: 'Blue',
+    color: { fill: 'rgba(11, 125, 238, 0.12)', line: 'rgba(11, 125, 238, 0.60)' },
   },
-  background6: {
-    themeDependent: true,
-    title: 'Background (6%)',
-    darkColor: { fill: 'rgba(255, 255, 255, 0.06)', line: 'rgba(255, 255, 255, 0.15)' },
-    lightColor: { fill: 'rgba(0, 0, 0, 0.06)', line: 'rgba(0, 0, 0, 0.15)' },
-  },
-  background9: {
-    themeDependent: true,
-    title: 'Background (9%)',
-    darkColor: { fill: 'rgba(255, 255, 255, 0.09)', line: 'rgba(255, 255, 255, 0.2)' },
-    lightColor: { fill: 'rgba(0, 0, 0, 0.09)', line: 'rgba(0, 0, 0, 0.2)' },
+  yellow: {
+    title: 'Yellow',
+    color: { fill: 'rgba(235, 138, 14, 0.12)', line: 'rgba(247, 149, 32, 0.60)' },
   },
+  custom: { title: 'Custom' },
 };
 
 export function getColorModes() {