json 测试dashb.json

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json 测试dashb.json相关的知识,希望对你有一定的参考价值。

{
  "title": "All logs",
  "services": {
    "query": {
      "list": {
        "0": {
          "query": "type:\"java-app\"",
          "alias": "",
          "color": "#7EB26D",
          "id": 0,
          "pin": false,
          "type": "lucene",
          "enable": true
        },
        "1": {
          "id": 1,
          "color": "#EAB839",
          "alias": "",
          "pin": false,
          "type": "lucene",
          "enable": true,
          "query": "type:\"php-app\""
        },
        "2": {
          "id": 2,
          "color": "#6ED0E0",
          "alias": "",
          "pin": false,
          "type": "lucene",
          "enable": true,
          "query": "type:\"apache-access\""
        },
        "3": {
          "id": 3,
          "color": "#EF843C",
          "alias": "",
          "pin": false,
          "type": "lucene",
          "enable": true,
          "query": "type:\"apache-error\""
        }
      },
      "ids": [
        0,
        1,
        2,
        3
      ]
    },
    "filter": {
      "list": {
        "0": {
          "type": "time",
          "field": "@timestamp",
          "from": "now-30d",
          "to": "now",
          "mandate": "must",
          "active": true,
          "alias": "",
          "id": 0
        }
      },
      "ids": [
        0
      ]
    }
  },
  "rows": [
    {
      "title": "Graph",
      "height": "250px",
      "editable": true,
      "collapse": false,
      "collapsable": true,
      "panels": [
        {
          "error": false,
          "span": 3,
          "editable": true,
          "group": [
            "default"
          ],
          "type": "terms",
          "queries": {
            "mode": "all",
            "ids": [
              0,
              1,
              2,
              3
            ]
          },
          "field": "_type",
          "exclude": [],
          "missing": true,
          "other": true,
          "size": 100,
          "order": "count",
          "style": {
            "font-size": "10pt"
          },
          "donut": false,
          "tilt": false,
          "labels": true,
          "arrangement": "horizontal",
          "chart": "pie",
          "counter_pos": "none",
          "title": "Document types",
          "spyable": true,
          "tmode": "terms",
          "tstat": "total",
          "valuefield": ""
        },
        {
          "error": false,
          "span": 3,
          "editable": true,
          "group": [
            "default"
          ],
          "type": "terms",
          "queries": {
            "mode": "all",
            "ids": [
              0,
              1,
              2,
              3
            ]
          },
          "field": "_type",
          "exclude": [],
          "missing": true,
          "other": true,
          "size": 10,
          "order": "count",
          "style": {
            "font-size": "10pt"
          },
          "donut": false,
          "tilt": false,
          "labels": true,
          "arrangement": "horizontal",
          "chart": "table",
          "counter_pos": "above",
          "spyable": true,
          "title": "Document Types",
          "tmode": "terms",
          "tstat": "total",
          "valuefield": ""
        },
        {
          "span": 6,
          "editable": true,
          "type": "histogram",
          "loadingEditor": false,
          "mode": "count",
          "time_field": "@timestamp",
          "value_field": null,
          "x-axis": true,
          "y-axis": true,
          "scale": 1,
          "y_format": "none",
          "grid": {
            "max": null,
            "min": 0
          },
          "queries": {
            "mode": "all",
            "ids": [
              0,
              1,
              2,
              3
            ]
          },
          "annotate": {
            "enable": false,
            "query": "*",
            "size": 20,
            "field": "_type",
            "sort": [
              "_score",
              "desc"
            ]
          },
          "auto_int": false,
          "resolution": 100,
          "interval": "1d",
          "intervals": [
            "auto",
            "1s",
            "1m",
            "5m",
            "10m",
            "30m",
            "1h",
            "3h",
            "12h",
            "1d",
            "1w",
            "1y"
          ],
          "lines": false,
          "fill": 0,
          "linewidth": 3,
          "points": false,
          "pointradius": 5,
          "bars": true,
          "stack": true,
          "spyable": true,
          "zoomlinks": true,
          "options": true,
          "legend": true,
          "show_query": true,
          "interactive": true,
          "legend_counts": true,
          "timezone": "browser",
          "percentage": false,
          "zerofill": true,
          "derivative": false,
          "tooltip": {
            "value_type": "cumulative",
            "query_as_alias": true
          },
          "scaleSeconds": false
        }
      ],
      "notice": false
    },
    {
      "title": "Events",
      "height": "650px",
      "editable": true,
      "collapse": false,
      "collapsable": true,
      "panels": [
        {
          "error": false,
          "span": 12,
          "editable": true,
          "group": [
            "default"
          ],
          "type": "table",
          "size": 100,
          "pages": 5,
          "offset": 0,
          "sort": [
            "_score",
            "desc"
          ],
          "style": {
            "font-size": "9pt"
          },
          "overflow": "min-height",
          "fields": [
            "@timestamp",
            "message"
          ],
          "highlight": [],
          "sortable": true,
          "header": true,
          "paging": true,
          "spyable": true,
          "queries": {
            "mode": "all",
            "ids": [
              0,
              1,
              2,
              3
            ]
          },
          "field_list": true,
          "status": "Stable",
          "trimFactor": 300,
          "normTimes": true,
          "title": "Documents",
          "all_fields": false,
          "localTime": false,
          "timeField": "@timestamp"
        }
      ],
      "notice": false
    }
  ],
  "editable": true,
  "index": {
    "interval": "none",
    "pattern": "[logstash-]YYYY.MM.DD",
    "default": "_all",
    "warm_fields": false
  },
  "style": "dark",
  "failover": false,
  "panel_hints": true,
  "loader": {
    "save_gist": false,
    "save_elasticsearch": true,
    "save_local": true,
    "save_default": true,
    "save_temp": true,
    "save_temp_ttl_enable": true,
    "save_temp_ttl": "30d",
    "load_gist": true,
    "load_elasticsearch": true,
    "load_elasticsearch_size": 20,
    "load_local": true,
    "hide": false
  },
  "pulldowns": [
    {
      "type": "query",
      "collapse": true,
      "notice": false,
      "query": "*",
      "pinned": true,
      "history": [
        "type:\"apache-error\"",
        "type:\"apache-access\"",
        "type:\"php-app\"",
        "type:\"java-app\"",
        "type:php",
        "type:java",
        "type:error",
        "type:apache-access",
        "type:access",
        "*"
      ],
      "remember": 10,
      "enable": true
    },
    {
      "type": "filtering",
      "collapse": true,
      "notice": true,
      "enable": true
    }
  ],
  "nav": [
    {
      "type": "timepicker",
      "collapse": false,
      "notice": false,
      "status": "Stable",
      "time_options": [
        "5m",
        "15m",
        "1h",
        "6h",
        "12h",
        "24h",
        "2d",
        "7d",
        "30d"
      ],
      "refresh_intervals": [
        "5s",
        "10s",
        "30s",
        "1m",
        "5m",
        "15m",
        "30m",
        "1h",
        "2h",
        "1d"
      ],
      "timefield": "@timestamp",
      "enable": true,
      "now": true,
      "filter_id": 0
    }
  ],
  "refresh": false
}

以上是关于json 测试dashb.json的主要内容,如果未能解决你的问题,请参考以下文章

如何使用 json 模式文件测试 json 文件

使用 json server mock 进行角度测试

json 测试json

Golang Json测试

如何在 Jest 测试中导入 JSON 文件?

python接口测试之json模块的使用