diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss index 5299425cb..3d0ef869d 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss @@ -256,7 +256,7 @@ } .doc-content > h1 { color: #e6522c; - font-size: 22px; + font-size: 24px; } .doc-content > h2 { @@ -343,6 +343,7 @@ article { /*外部引用 样式end*/ .explore .introduce-view .title-heard.info-room{ + position: relative; .logs-content { font-size: 16px; ul li{ @@ -356,6 +357,10 @@ article { padding: 5px; background-color: $--background-color-empty; } + .log-link:hover{ + cursor: pointer; + border-bottom: 1px solid #3C92F1; + } .fillbox{ display: block; line-height: 25px; @@ -368,7 +373,7 @@ article { } > h1,.page-header { color: #e6522c; - font-size: 22px; + font-size: 24px; font-weight: 600; text-transform: uppercase; margin-top: 15px; @@ -378,6 +383,20 @@ article { text-decoration: none; } } + > h1,.page-header-one { + color: #e6522c; + font-size: 22px; + font-weight: 600; + margin-top: 15px; + text-transform: none; + } + > h1,.page-header-two { + color: #e6522c; + font-size: 20px; + font-weight: 600; + margin-top: 15px; + text-transform: none; + } .title-heard__divider{ margin: 5px 0 5px 0; } @@ -416,4 +435,20 @@ article { } } } + .catalog{ + position: absolute; + top: 75px; + right: 25px; + background-color: $--background-color-empty; + padding: 15px 10px; + ul li{ + margin: 3px 14px 3px 24px; + list-style: circle; + color: #3C92F1; + } + span:hover{ + cursor: pointer; + border-bottom: 1px solid #3C92F1; + } + } } diff --git a/nezha-fronted/src/components/chart/chart/chartBubble.vue b/nezha-fronted/src/components/chart/chart/chartBubble.vue index 1ed1f5abe..7fd117587 100644 --- a/nezha-fronted/src/components/chart/chart/chartBubble.vue +++ b/nezha-fronted/src/components/chart/chart/chartBubble.vue @@ -110,6 +110,9 @@ export default { this.$nextTick(() => { d3.select(`#bubble-svg-${this.chartId}`).selectAll('g').remove()// 清空作图区域 const svg = document.getElementById(`bubble-svg-${this.chartId}`) + if (!svg) { + return false + } const width = svg.getBoundingClientRect().width const height = svg.getBoundingClientRect().height // 定义布局方式 diff --git a/nezha-fronted/src/components/chart/chart/chartSankey.vue b/nezha-fronted/src/components/chart/chart/chartSankey.vue index 85b6f0f71..05cc55b72 100644 --- a/nezha-fronted/src/components/chart/chart/chartSankey.vue +++ b/nezha-fronted/src/components/chart/chart/chartSankey.vue @@ -141,8 +141,11 @@ export default { // 获取svg宽高 初始化画布 const svgDom = document.getElementById(`sankey-svg-${this.chartId}`) - const width = svgDom && svgDom.getBoundingClientRect().width - const height = svgDom && svgDom.getBoundingClientRect().height + if (!svgDom) { + return false + } + const width = svgDom.getBoundingClientRect().width + const height = svgDom.getBoundingClientRect().height const margin1 = 100 const margin2 = 50 const svg = d3.select(`#sankey-svg-${this.chartId}`) diff --git a/nezha-fronted/src/components/common/js/validate.js b/nezha-fronted/src/components/common/js/validate.js index 7d5c2cf50..b9fe266ef 100644 --- a/nezha-fronted/src/components/common/js/validate.js +++ b/nezha-fronted/src/components/common/js/validate.js @@ -214,7 +214,7 @@ export function sysObjectIdInput (rule, value, callback) { if (sysId.test(value)) { callback() } else { - callback(new Error(vm.$t('validate.sysId'))) + callback(new Error(vm.$t('overall.oid'))) } }, 100) } diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 0a6c82e36..d65b6fd97 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -283,23 +283,23 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
-

LogQL: Log query language

+

LogQL: Log query language

LogQL is Grafana Loki’s PromQL-inspired query language. Queries act as if they are a distributed grep to aggregate log sources. LogQL uses labels and operators for filtering.

There are two types of LogQL queries:

    -
  • Log queries return the contents of log lines.
  • -
  • Metric queries extend log queries to calculate values based on query results.
  • +
  • Log queries return the contents of log lines.
  • +
  • Metric queries extend log queries to calculate values based on query results.
-

Log queries

+

Log queries

All LogQL queries contain a log stream selector.

-
+

Optionally, the log stream selector can be followed by a log pipeline. A log pipeline is a set of stage expressions that are chained together and applied to the selected log streams. Each expression can filter out, parse, or mutate log lines and their respective labels.

The following example shows a full log query in action:

{container="query-frontend",namespace="loki-dev"} |= "metrics.go" | logfmt | duration > 10s and throughput_mb < 500

@@ -312,7 +312,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
-

Log stream selector

+

Log stream selector

-

Log pipeline

+

Log pipeline

@@ -378,11 +378,11 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c

{instance=~"kafka-[23]",name="kafka"} != "kafka.server:type=ReplicaManager"

  • -

    Keep log lines that contain a substring that starts with tsdb-ops and ends with io:2003. A complete query with a regular expression:

    +

    Keep log lines that contain a substring that starts with tsdb-ops and ends with io:2003. A complete query with a regular expression:

    {name="kafka"} |~ "tsdb-ops.*io:2003"

  • -

    Keep log lines that contain a substring that starts with error=, and is followed by 1 or more word characters. A complete query with a regular expression:

    +

    Keep log lines that contain a substring that starts with error=, and is followed by 1 or more word characters. A complete query with a regular expression:

    {name="cassandra"} |~ `error=\w+`

  • @@ -411,7 +411,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
  • Number are floating-point number (64bits), such as 250, 89.923.
  • Bytes is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as “42MB”, “1.5Kib” or “20b”. Valid bytes units are “b”, “kib”, “kb”, “mib”, “mb”, “gib”, “gb”, “tib”, “tb”, “pib”, “pb”, “eib”, “eb”.
  • -

    String type work exactly like Prometheus label matchers use in log stream selector. This means you can use the same operations (=,!=,=~,!~).

    +

    String type work exactly like Prometheus label matchers use in log stream selector. This means you can use the same operations (=,!=,=~,!~).

    The string type is the only one that can filter out a log line with a label __error__.

    Using Duration, Number and Bytes will convert the label value prior to comparision and support the following comparators:

      @@ -446,16 +446,16 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c

      Parser expression

      @@ -646,10 +646,10 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
    -

    Log queries examples

    +

    Log queries examples

    -

    Multiple filtering

    +

    Multiple filtering

    -

    Formatting

    +

    Formatting