diff --git a/README.md b/README.md index 5182cace1..85c15a2e7 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). @@ -1045,7 +1048,8 @@ Time series data can be imported into VictoriaMetrics via any supported data ing * `/api/v1/import/native` for importing data obtained from [/api/v1/export/native](#how-to-export-data-in-native-format). See [these docs](#how-to-import-data-in-native-format) for details. * `/api/v1/import/csv` for importing arbitrary CSV data. See [these docs](#how-to-import-csv-data) for details. -* `/api/v1/import/prometheus` for importing data in Prometheus exposition format. See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. +* `/api/v1/import/prometheus` for importing data in Prometheus exposition format and in [Pushgateway format](https://github.com/prometheus/pushgateway#url). + See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. ### How to import data in JSON line format @@ -1150,9 +1154,11 @@ Note that it could be required to flush response cache after importing historica ### How to import data in Prometheus exposition format -VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) -and in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) -via `/api/v1/import/prometheus` path. For example, the following line imports a single line in Prometheus exposition format into VictoriaMetrics: +VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format), +in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) +and in [Pushgateway format](https://github.com/prometheus/pushgateway#url) via `/api/v1/import/prometheus` path. + +For example, the following command imports a single line in Prometheus exposition format into VictoriaMetrics:
@@ -1178,6 +1184,16 @@ It should return something like the following: {"metric":{"__name__":"foo","bar":"baz"},"values":[123],"timestamps":[1594370496905]} ``` +The following command imports a single metric via [Pushgateway format](https://github.com/prometheus/pushgateway#url) with `{job="my_app",instance="host123"}` labels: + +
+ +```console +curl -d 'metric{label="abc"} 123' -X POST 'http://localhost:8428/api/v1/import/prometheus/metrics/job/my_app/instance/host123' +``` + +
+ Pass `Content-Encoding: gzip` HTTP request header to `/api/v1/import/prometheus` for importing gzipped data:
@@ -1189,8 +1205,8 @@ curl -X POST -H 'Content-Encoding: gzip' http://destination-victoriametrics:8428
-Extra labels may be added to all the imported metrics by passing `extra_label=name=value` query args. -For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. +Extra labels may be added to all the imported metrics either via [Pushgateway format](https://github.com/prometheus/pushgateway#url) +or by passing `extra_label=name=value` query args. For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. If timestamp is missing in ` ` Prometheus exposition format line, then the current timestamp is used during data ingestion. It can be overridden by passing unix timestamp in *milliseconds* via `timestamp` query arg. For example, `/api/v1/import/prometheus?timestamp=1594370496905`. @@ -1641,7 +1657,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter @@ -2030,6 +2048,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2048,7 +2068,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2059,7 +2079,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2163,7 +2183,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2258,7 +2278,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2272,9 +2292,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2288,7 +2308,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/app/vmagent/README.md b/app/vmagent/README.md index c98eb2c2d..456bd267b 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -545,7 +545,7 @@ The following articles contain useful information about Prometheus relabeling: * `keep_metrics`: keeps all the metrics with names matching the given `regex`, while dropping all the other metrics. For example, the following relabeling config keeps metrics - with `fo` and `bar` names, while dropping all the other metrics: + with `foo` and `bar` names, while dropping all the other metrics: ```yaml - action: keep_metrics @@ -1107,6 +1107,8 @@ vmagent collects metrics data via popular data ingestion protocols and routes th See the docs at https://docs.victoriametrics.com/vmagent.html . + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -1127,7 +1129,7 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -1178,30 +1180,30 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -insert.maxQueueDuration duration The maximum duration for waiting in the queue for insert requests due to -maxConcurrentInserts (default 1m0s) -kafka.consumer.topic array - Kafka topic names for data consumption. This flag is available only in enterprise version of VictoriaMetrics + Kafka topic names for data consumption. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.password array - Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.username array - Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.brokers array - List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in enterprise version of VictoriaMetrics + List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.defaultFormat string - Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in enterprise version of VictoriaMetrics (default "promremotewrite") + Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default "promremotewrite") -kafka.consumer.topic.format array - data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in enterprise version of VictoriaMetrics + data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.groupID array - Defines group.id for topic. This flag is available only in enterprise version of VictoriaMetrics + Defines group.id for topic. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.isGzipped array - Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in enterprise version of VictoriaMetrics + Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.options array - Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in enterprise version of VictoriaMetrics + Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -loggerDisableTimestamps Whether to disable writing timestamps in logs @@ -1242,6 +1244,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string diff --git a/app/vmagent/main.go b/app/vmagent/main.go index d02f490b4..4209603b1 100644 --- a/app/vmagent/main.go +++ b/app/vmagent/main.go @@ -217,6 +217,16 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { } path := strings.Replace(r.URL.Path, "//", "/", -1) + if strings.HasPrefix(path, "/prometheus/api/v1/import/prometheus") || strings.HasPrefix(path, "/api/v1/import/prometheus") { + prometheusimportRequests.Inc() + if err := prometheusimport.InsertHandler(nil, r); err != nil { + prometheusimportErrors.Inc() + httpserver.Errorf(w, r, "%s", err) + return true + } + w.WriteHeader(http.StatusNoContent) + return true + } if strings.HasPrefix(path, "datadog/") { // Trim suffix from paths starting from /datadog/ in order to support legacy DataDog agent. // See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2670 @@ -250,15 +260,6 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { } w.WriteHeader(http.StatusNoContent) return true - case "/prometheus/api/v1/import/prometheus", "/api/v1/import/prometheus": - prometheusimportRequests.Inc() - if err := prometheusimport.InsertHandler(nil, r); err != nil { - prometheusimportErrors.Inc() - httpserver.Errorf(w, r, "%s", err) - return true - } - w.WriteHeader(http.StatusNoContent) - return true case "/prometheus/api/v1/import/native", "/api/v1/import/native": nativeimportRequests.Inc() if err := native.InsertHandler(nil, r); err != nil { @@ -409,6 +410,16 @@ func processMultitenantRequest(w http.ResponseWriter, r *http.Request, path stri httpserver.Errorf(w, r, "cannot obtain auth token: %s", err) return true } + if strings.HasPrefix(p.Suffix, "prometheus/api/v1/import/prometheus") { + prometheusimportRequests.Inc() + if err := prometheusimport.InsertHandler(at, r); err != nil { + prometheusimportErrors.Inc() + httpserver.Errorf(w, r, "%s", err) + return true + } + w.WriteHeader(http.StatusNoContent) + return true + } if strings.HasPrefix(p.Suffix, "datadog/") { // Trim suffix from paths starting from /datadog/ in order to support legacy DataDog agent. // See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2670 @@ -442,15 +453,6 @@ func processMultitenantRequest(w http.ResponseWriter, r *http.Request, path stri } w.WriteHeader(http.StatusNoContent) return true - case "prometheus/api/v1/import/prometheus": - prometheusimportRequests.Inc() - if err := prometheusimport.InsertHandler(at, r); err != nil { - prometheusimportErrors.Inc() - httpserver.Errorf(w, r, "%s", err) - return true - } - w.WriteHeader(http.StatusNoContent) - return true case "prometheus/api/v1/import/native": nativeimportRequests.Inc() if err := native.InsertHandler(at, r); err != nil { diff --git a/app/vmagent/remotewrite/remotewrite.go b/app/vmagent/remotewrite/remotewrite.go index a7326f66e..ae5234ff4 100644 --- a/app/vmagent/remotewrite/remotewrite.go +++ b/app/vmagent/remotewrite/remotewrite.go @@ -13,6 +13,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/bloomfilter" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/memory" @@ -139,6 +140,8 @@ func Init() { logger.Fatalf("cannot load relabel configs: %s", err) } allRelabelConfigs.Store(rcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) if len(*remoteWriteURLs) > 0 { rwctxsDefault = newRemoteWriteCtxs(nil, *remoteWriteURLs) @@ -154,18 +157,31 @@ func Init() { case <-stopCh: return } + configReloads.Inc() logger.Infof("SIGHUP received; reloading relabel configs pointed by -remoteWrite.relabelConfig and -remoteWrite.urlRelabelConfig") rcs, err := loadRelabelConfigs() if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot reload relabel configs; preserving the previous configs; error: %s", err) continue } + allRelabelConfigs.Store(rcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) logger.Infof("Successfully reloaded relabel configs") } }() } +var ( + configReloads = metrics.NewCounter(`vmagent_relabel_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vmagent_relabel_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vmagent_relabel_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vmagent_relabel_config_last_reload_success_timestamp_seconds`) +) + func newRemoteWriteCtxs(at *auth.Token, urls []string) []*remoteWriteCtx { if len(urls) == 0 { logger.Panicf("BUG: urls must be non-empty") diff --git a/app/vmalert/README.md b/app/vmalert/README.md index b356b2f4c..6dcce9d67 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -673,10 +673,12 @@ See full description for these flags in `./vmalert -help`. ## Monitoring `vmalert` exports various metrics in Prometheus exposition format at `http://vmalert-host:8880/metrics` page. +The default list of alerting rules for these metric can be found [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker). We recommend setting up regular scraping of this page either through `vmagent` or by Prometheus so that the exported metrics may be analyzed later. -Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. Graphs on this dashboard contain useful hints - hover the `i` icon at the top left corner of each graph in order to read it. +Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. +Graphs on this dashboard contain useful hints - hover the `i` icon in the top left corner of each graph in order to read it. If you have suggestions for improvements or have found a bug - please open an issue on github or add a review to the dashboard. @@ -781,7 +783,7 @@ The shortlist of configuration flags is the following: {% raw %} ``` -clusterMode - If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -configCheckInterval duration Interval for checking for changes in '-rule' or '-notifier.config' files. By default the checking is disabled. Send SIGHUP signal in order to force config check for changes. -datasource.appendTypePrefix @@ -805,11 +807,11 @@ The shortlist of configuration flags is the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string @@ -835,9 +837,9 @@ The shortlist of configuration flags is the following: -datasource.url string Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect URL. Required parameter. E.g. http://127.0.0.1:8428 . See also '-datasource.disablePathAppend', '-datasource.showURL'. -defaultTenant.graphite string - Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -defaultTenant.prometheus string - Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -disableAlertgroupLabel Whether to disable adding group's Name as label to generated alerts and time series. -dryRun @@ -849,12 +851,11 @@ The shortlist of configuration flags is the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -evaluationInterval duration How often to evaluate the rules (default 1m0s) -external.alert.source string - External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used - If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. + External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. Supports an array of values separated by comma or specified via multiple flags. @@ -1002,7 +1003,7 @@ The shortlist of configuration flags is the following: -remoteRead.oauth2.scopes string Optional OAuth2 scopes to use for -remoteRead.url. Scopes must be delimited by ';'. -remoteRead.oauth2.tokenUrl string - Optional OAuth2 tokenURL to use for -remoteRead.url. + Optional OAuth2 tokenURL to use for -remoteRead.url. -remoteRead.showURL Whether to show -remoteRead.url in the exported metrics. It is hidden by default, since it can contain sensitive info such as auth key -remoteRead.tlsCAFile string diff --git a/app/vmauth/README.md b/app/vmauth/README.md index 2fad07707..89e102430 100644 --- a/app/vmauth/README.md +++ b/app/vmauth/README.md @@ -239,7 +239,7 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmbackup/README.md b/app/vmbackup/README.md index b194f9ce9..cfb2f96c1 100644 --- a/app/vmbackup/README.md +++ b/app/vmbackup/README.md @@ -196,7 +196,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmbackupmanager/README.md b/app/vmbackupmanager/README.md index 6c12c5c4c..281794ec6 100644 --- a/app/vmbackupmanager/README.md +++ b/app/vmbackupmanager/README.md @@ -299,6 +299,13 @@ The shortlist of configuration flags is the following: ``` vmbackupmanager performs regular backups according to the provided configs. +subcommands: + backup: provides auxiliary backup-related commands + restore: restores backup specified by restore mark if it exists + +command-line flags: + -apiURL string + vmbackupmanager address to perform API requests (default "http://127.0.0.1:8300") -concurrency int The number of concurrent workers. Higher concurrency may reduce backup duration (default 10) -configFilePath string @@ -328,7 +335,7 @@ vmbackupmanager performs regular backups according to the provided configs. -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -392,8 +399,6 @@ vmbackupmanager performs regular backups according to the provided configs. -pushmetrics.url array Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. - -restoreOnStart - Check if backup restore was requested and restore requested backup. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/app/vmgateway/README.md b/app/vmgateway/README.md index f32011537..dbfd17cc7 100644 --- a/app/vmgateway/README.md +++ b/app/vmgateway/README.md @@ -176,8 +176,8 @@ curl 'http://localhost:8431/api/v1/labels' -H 'Authorization: Bearer eyJhbGciOiJ The shortlist of configuration flags include the following: ```console - -auth.httpHeader - HTTP header name to look for JWT authorization token + -auth.httpHeader string + HTTP header name to look for JWT authorization token (default "Authorization") -clusterMode enable this for the cluster version -datasource.appendTypePrefix @@ -201,17 +201,17 @@ The shortlist of configuration flags include the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int @@ -241,7 +241,7 @@ The shortlist of configuration flags include the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vminsert/main.go b/app/vminsert/main.go index 05c9fd85e..dcfb8e21f 100644 --- a/app/vminsert/main.go +++ b/app/vminsert/main.go @@ -120,6 +120,16 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { staticServer.ServeHTTP(w, r) return true } + if strings.HasPrefix(path, "/prometheus/api/v1/import/prometheus") || strings.HasPrefix(path, "/api/v1/import/prometheus") { + prometheusimportRequests.Inc() + if err := prometheusimport.InsertHandler(r); err != nil { + prometheusimportErrors.Inc() + httpserver.Errorf(w, r, "%s", err) + return true + } + w.WriteHeader(http.StatusNoContent) + return true + } if strings.HasPrefix(path, "/datadog/") { // Trim suffix from paths starting from /datadog/ in order to support legacy DataDog agent. // See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2670 @@ -153,15 +163,6 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { } w.WriteHeader(http.StatusNoContent) return true - case "/prometheus/api/v1/import/prometheus", "/api/v1/import/prometheus": - prometheusimportRequests.Inc() - if err := prometheusimport.InsertHandler(r); err != nil { - prometheusimportErrors.Inc() - httpserver.Errorf(w, r, "%s", err) - return true - } - w.WriteHeader(http.StatusNoContent) - return true case "/prometheus/api/v1/import/native", "/api/v1/import/native": nativeimportRequests.Inc() if err := native.InsertHandler(r); err != nil { diff --git a/app/vminsert/relabel/relabel.go b/app/vminsert/relabel/relabel.go index 494280089..5c8db252e 100644 --- a/app/vminsert/relabel/relabel.go +++ b/app/vminsert/relabel/relabel.go @@ -6,6 +6,7 @@ import ( "sync/atomic" "github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompb" @@ -38,23 +39,38 @@ func Init() { logger.Fatalf("cannot load relabelConfig: %s", err) } pcsGlobal.Store(pcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) + if len(*relabelConfig) == 0 { return } go func() { for range sighupCh { + configReloads.Inc() logger.Infof("received SIGHUP; reloading -relabelConfig=%q...", *relabelConfig) pcs, err := loadRelabelConfig() if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot load the updated relabelConfig: %s; preserving the previous config", err) continue } pcsGlobal.Store(pcs) + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) logger.Infof("successfully reloaded -relabelConfig=%q", *relabelConfig) } }() } +var ( + configReloads = metrics.NewCounter(`vm_relabel_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vm_relabel_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vm_relabel_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vm_relabel_config_last_reload_success_timestamp_seconds`) +) + var pcsGlobal atomic.Value func loadRelabelConfig() (*promrelabel.ParsedConfigs, error) { diff --git a/app/vmrestore/README.md b/app/vmrestore/README.md index e26ca0890..960775d3f 100644 --- a/app/vmrestore/README.md +++ b/app/vmrestore/README.md @@ -100,7 +100,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index a39e58949..0932e555a 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -1090,7 +1090,10 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin startTime := time.Now() maxSeriesCount := sr.Init(qt, vmstorage.Storage, tfss, tr, sq.MaxMetrics, deadline.Deadline()) indexSearchDuration.UpdateDuration(startTime) - m := make(map[string][]blockRef, maxSeriesCount) + type blockRefs struct { + brs []blockRef + } + m := make(map[string]*blockRefs, maxSeriesCount) orderedMetricNames := make([]string, 0, maxSeriesCount) blocksRead := 0 samples := 0 @@ -1119,13 +1122,14 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin } metricName := sr.MetricBlockRef.MetricName brs := m[string(metricName)] - brs = append(brs, blockRef{ + if brs == nil { + brs = &blockRefs{} + } + brs.brs = append(brs.brs, blockRef{ partRef: br.PartRef(), addr: addr, }) - if len(brs) > 1 { - m[string(metricName)] = brs - } else { + if len(brs.brs) == 1 { // An optimization for big number of time series with long metricName values: // use only a single copy of metricName for both orderedMetricNames and m. orderedMetricNames = append(orderedMetricNames, string(metricName)) @@ -1174,7 +1178,7 @@ func ProcessSearchQuery(qt *querytracer.Tracer, sq *storage.SearchQuery, deadlin for i, metricName := range orderedMetricNames { pts[i] = packedTimeseries{ metricName: metricName, - brs: m[metricName], + brs: m[metricName].brs, pd: pm[metricName], } } diff --git a/app/vmselect/promql/eval.go b/app/vmselect/promql/eval.go index a0afdef0b..1118de005 100644 --- a/app/vmselect/promql/eval.go +++ b/app/vmselect/promql/eval.go @@ -488,6 +488,12 @@ func execBinaryOpArgs(qt *querytracer.Tracer, ec *EvalConfig, exprFirst, exprSec if err != nil { return nil, nil, err } + if len(tssFirst) == 0 && strings.ToLower(be.Op) != "or" { + // Fast path: there is no sense in executing the exprSecond when exprFirst returns an empty result, + // since the "exprFirst op exprSecond" would return an empty result in any case. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349 + return nil, nil, nil + } lfs := getCommonLabelFilters(tssFirst) lfs = metricsql.TrimFiltersByGroupModifier(lfs, be) exprSecond = metricsql.PushdownBinaryOpFilters(exprSecond, lfs) diff --git a/app/vmselect/promql/exec_test.go b/app/vmselect/promql/exec_test.go index ed04ba369..49eb8d540 100644 --- a/app/vmselect/promql/exec_test.go +++ b/app/vmselect/promql/exec_test.go @@ -2281,6 +2281,16 @@ func TestExecSuccess(t *testing.T) { resultExpected := []netstorage.Result{r} f(q, resultExpected) }) + t.Run(`limit_offset(too-big-offset)`, func(t *testing.T) { + t.Parallel() + q := `limit_offset(1, 10, sort_by_label(( + label_set(time()*1, "foo", "y"), + label_set(time()*2, "foo", "a"), + label_set(time()*3, "foo", "x"), + ), "foo"))` + resultExpected := []netstorage.Result{} + f(q, resultExpected) + }) t.Run(`limit_offset NaN`, func(t *testing.T) { t.Parallel() // q returns 3 time series, where foo=3 contains only NaN values @@ -6892,6 +6902,23 @@ func TestExecSuccess(t *testing.T) { resultExpected := []netstorage.Result{r} f(q, resultExpected) }) + t.Run(`range_normalize(time(),alias(-time(),"negative"))`, func(t *testing.T) { + t.Parallel() + q := `range_normalize(time(),alias(-time(), "negative"))` + r1 := netstorage.Result{ + MetricName: metricNameExpected, + Values: []float64{0, 0.2, 0.4, 0.6, 0.8, 1}, + Timestamps: timestampsExpected, + } + r2 := netstorage.Result{ + MetricName: metricNameExpected, + Values: []float64{1, 0.8, 0.6, 0.4, 0.2, 0}, + Timestamps: timestampsExpected, + } + r2.MetricName.MetricGroup = []byte("negative") + resultExpected := []netstorage.Result{r1, r2} + f(q, resultExpected) + }) t.Run(`range_first(time())`, func(t *testing.T) { t.Parallel() q := `range_first(time())` diff --git a/app/vmselect/promql/transform.go b/app/vmselect/promql/transform.go index 8b3f8d338..f4d151295 100644 --- a/app/vmselect/promql/transform.go +++ b/app/vmselect/promql/transform.go @@ -91,6 +91,7 @@ var transformFuncs = map[string]transformFunc{ "range_linear_regression": transformRangeLinearRegression, "range_max": newTransformFuncRange(runningMax), "range_min": newTransformFuncRange(runningMin), + "range_normalize": transformRangeNormalize, "range_quantile": transformRangeQuantile, "range_stddev": transformRangeStddev, "range_stdvar": transformRangeStdvar, @@ -142,6 +143,7 @@ var transformFuncsKeepMetricName = map[string]bool{ "range_linear_regression": true, "range_max": true, "range_min": true, + "range_normalize": true, "range_quantile": true, "range_stdvar": true, "range_sddev": true, @@ -1240,6 +1242,38 @@ func newTransformFuncRange(rf func(a, b float64, idx int) float64) transformFunc } } +func transformRangeNormalize(tfa *transformFuncArg) ([]*timeseries, error) { + args := tfa.args + var rvs []*timeseries + for _, tss := range args { + for _, ts := range tss { + values := ts.Values + vMin := inf + vMax := -inf + for _, v := range values { + if math.IsNaN(v) { + continue + } + if v < vMin { + vMin = v + } + if v > vMax { + vMax = v + } + } + d := vMax - vMin + if math.IsInf(d, 0) { + continue + } + for i, v := range values { + values[i] = (v - vMin) / d + } + rvs = append(rvs, ts) + } + } + return rvs, nil +} + func transformRangeLinearRegression(tfa *transformFuncArg) ([]*timeseries, error) { args := tfa.args if err := expectTransformArgsNum(args, 1); err != nil { @@ -1943,6 +1977,8 @@ func transformLimitOffset(tfa *transformFuncArg) ([]*timeseries, error) { rvs := removeEmptySeries(args[2]) if len(rvs) >= offset { rvs = rvs[offset:] + } else { + rvs = nil } if len(rvs) > limit { rvs = rvs[:limit] diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 32f4977d6..6f74669dd 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.0493d695.css", - "main.js": "./static/js/main.0b7317e2.js", + "main.css": "./static/css/main.0937c83d.css", + "main.js": "./static/js/main.e18cda26.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.0493d695.css", - "static/js/main.0b7317e2.js" + "static/css/main.0937c83d.css", + "static/js/main.e18cda26.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 85381f063..da2f5b3f9 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -VM UI
\ No newline at end of file +VM UI
\ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.0493d695.css b/app/vmselect/vmui/static/css/main.0493d695.css deleted file mode 100644 index bb6c3d361..000000000 --- a/app/vmselect/vmui/static/css/main.0493d695.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:1.3;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6)}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{background-color:var(--color-background-block);font-size:10px;left:8px;line-height:10px;padding:0 3px;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{bottom:-5px;color:var(--color-error)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);max-height:85vh;overflow:hidden;padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:16px;align-items:center;display:grid;gap:16px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.u-tooltip,.vm-line-chart_panning{pointer-events:none}.u-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:none;font-family:monospace;font-size:10px;font-weight:400;line-height:1.4;max-width:300px;padding:8px;position:absolute;z-index:100}.u-tooltip-data{align-items:center;display:flex;flex-wrap:wrap;line-height:150%}.u-tooltip-data__value{font-weight:700;padding:4px}.u-tooltip__info{grid-gap:4px;display:grid}.u-tooltip__marker{height:12px;margin-right:8px;width:12px}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-table-settings-popper{display:grid}.vm-table-settings-popper-list{grid-gap:8px;display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px 16px 24px}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-table-settings-popper__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:1fr 1fr;justify-content:center;min-width:200px;padding:0 16px 16px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;height:100%}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-custom-panel-body-header,.vm-predefined-panel-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15)}.vm-predefined-panel-header{grid-gap:8px;display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:9}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.0937c83d.css b/app/vmselect/vmui/static/css/main.0937c83d.css new file mode 100644 index 000000000..a90e47c5f --- /dev/null +++ b/app/vmselect/vmui/static/css/main.0937c83d.css @@ -0,0 +1 @@ +.vm-tabs{gap:16px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:16px 8px;text-decoration:none;text-transform:uppercase;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item__icon{display:grid;margin-right:8px;width:15px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);color:#110f0f;display:grid;font-size:14px;font-weight:500;gap:8px;grid-template-columns:20px 1fr;line-height:20px;padding:16px;position:relative}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{-webkit-filter:brightness(.6);filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{-webkit-animation:scale .15s cubic-bezier(.28,.84,.42,1);animation:scale .15s cubic-bezier(.28,.84,.42,1);opacity:1;pointer-events:auto;z-index:101}.vm-popper_open_slider{-webkit-animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);animation:slidePopper .3s cubic-bezier(.28,.84,.42,1.1);-webkit-transform-origin:top center;transform-origin:top center}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:10px;font-weight:500;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:hsla(0,6%,6%,.05)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{-webkit-transform:translateZ(-2px);transform:translateZ(-2px)}.vm-button:after{background-color:transparent;-webkit-transform:translateZ(-1px);transform:translateZ(-1px)}.vm-button span{align-items:center;display:grid;justify-content:center}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 6px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:hsla(0,6%,6%,.2)}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:hsla(0,6%,6%,.6)}.vm-button_contained_gray:before{background-color:hsla(0,6%,6%,.6)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:hsla(0,6%,6%,.6)}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid hsla(0,6%,6%,.6);color:hsla(0,6%,6%,.6)}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-execution-controls-list{font-size:12px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-tooltip{-webkit-animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:rgba(97,97,97,.92);border-radius:4px;box-shadow:0 2px 8px 0 hsla(0,6%,6%,.2);color:#fff;font-size:10px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@-webkit-keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes vm-scale{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}.vm-time-duration{font-size:12px;max-height:168px;overflow:auto}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:12px;grid-template-rows:auto 1fr auto;padding:16px;-webkit-user-select:none;user-select:none}.vm-calendar__tabs{border-top:1px solid hsla(0,6%,6%,.15);margin:16px -16px -16px}.vm-calendar-header{grid-gap:24px;align-items:center;display:grid;gap:24px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:16px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:#110f0f;font-size:12px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-left__select-year svg{width:100%}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.vm-calendar-header-right__next{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(6,32px)}.vm-calendar-body,.vm-calendar-body-cell{align-items:center;justify-content:center}.vm-calendar-body-cell{border-radius:50%;display:flex;height:100%;text-align:center}.vm-calendar-body-cell_weekday{color:hsla(0,6%,6%,.6)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:hsla(0,6%,6%,.05)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-time-picker{align-items:center;display:flex;flex-direction:column;justify-content:center}.vm-calendar-time-picker-clock{border:1px solid hsla(0,6%,6%,.15);border-radius:50%;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);box-sizing:initial;height:230px;position:relative;width:230px}.vm-calendar-time-picker-clock:after{background-color:var(--color-primary);border-radius:50%;content:"";height:6px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:6px}.vm-calendar-time-picker-clock__arrow{background-color:var(--color-primary);height:107px;left:114px;margin-top:8px;opacity:.8;position:absolute;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:2px;z-index:0}.vm-calendar-time-picker-clock__arrow_offset{height:73px;margin-top:42px;z-index:2}.vm-calendar-time-picker-clock__arrow:after{background-color:var(--color-primary);border-radius:50%;content:"";height:30px;left:50%;position:absolute;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:30px}.vm-calendar-time-picker-clock__time{align-items:flex-start;cursor:pointer;display:flex;height:115px;justify-content:center;left:100px;padding-top:8px;position:absolute;text-align:center;top:0;-webkit-transform-origin:bottom;transform-origin:bottom;width:30px;z-index:1}.vm-calendar-time-picker-clock__time_hide{display:none}.vm-calendar-time-picker-clock__time_offset{height:73px;margin-top:42px;padding:0;z-index:2}.vm-calendar-time-picker-clock__time:hover span{background-color:hsla(0,6%,6%,.1)}.vm-calendar-time-picker-clock__time span{align-items:center;border-radius:50%;display:grid;justify-content:center;min-height:30px;min-width:30px;position:relative;-webkit-transform-origin:center;transform-origin:center;transition:background-color .3s ease}.vm-calendar-time-picker-fields{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.vm-calendar-time-picker-fields span{margin:0 8px}.vm-calendar-time-picker-fields__input{border:1px solid #d8d8d8;border-radius:4px;font-size:14px;height:32px;padding:2px 8px;text-align:center;width:64px}.vm-calendar-time-picker-fields__input:focus{border-color:var(--color-primary)}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:16px 0}.vm-time-selector-left{border-right:1px solid hsla(0,6%,6%,.15);display:flex;flex-direction:column;gap:8px;padding:0 16px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-inputs__date{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);cursor:pointer;display:grid;gap:8px;grid-template-columns:1fr 14px;justify-content:center;margin-bottom:16px;padding-bottom:8px;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-time-selector-left-inputs__date:hover{border-bottom-color:var(--color-primary)}.vm-time-selector-left-inputs__date:hover,.vm-time-selector-left-inputs__date:hover svg{color:var(--color-primary)}.vm-time-selector-left-inputs__date label{color:hsla(0,6%,6%,.6);font-size:10px;grid-column:1/3}.vm-time-selector-left-inputs__date svg{color:hsla(0,6%,6%,.6);transition:color .2s ease-in-out}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:transparent;border:1px solid hsla(0,6%,6%,.15);font-size:12px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 16px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:10px;left:8px;line-height:10px;max-width:calc(100% - 16px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:hsla(0,6%,6%,.6);top:-5px}.vm-text-field__error{color:var(--color-error);top:calc(100% - 5px)}.vm-text-field__helper-text{bottom:-5px;color:hsla(0,6%,6%,.6)}.vm-text-field__input{border-radius:4px;display:block;min-height:34px;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border:1px solid var(--color-error)}.vm-text-field__input_icon-start{padding-left:42px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:hsla(0,6%,6%,.4)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:hsla(0,6%,6%,.6);display:flex;height:100%;justify-content:center;left:8px;max-width:15px;position:absolute;top:auto}.vm-text-field__icon-end svg,.vm-text-field__icon-start svg{height:auto;width:100%}.vm-text-field__icon-end{left:auto;right:8px}.vm-modal{align-items:center;background:hsla(0,6%,6%,.55);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal-content{background:#fff;border-radius:4px;box-shadow:0 0 24px hsla(0,6%,6%,.07);padding:22px}.vm-modal-content-header{align-items:center;display:grid;grid-template-columns:1fr auto;margin-bottom:22px}.vm-modal-content-header__title{font-size:14px;font-weight:700}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-header__close svg{height:auto;width:100%}.vm-server-configurator{grid-gap:24px;align-items:center;display:grid;gap:24px;width:600px}.vm-server-configurator__footer{align-items:center;display:inline-grid;gap:8px;grid-template-columns:repeat(2,1fr);justify-content:flex-end;margin-left:auto;margin-right:0}.vm-limits-configurator-title{align-items:center;display:flex;font-size:12px;font-weight:700;justify-content:flex-start;margin-bottom:16px}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:repeat(3,1fr);justify-content:space-between}.vm-shortcuts{min-width:400px}.vm-shortcuts-section{margin-bottom:24px}.vm-shortcuts-section__title{border-bottom:1px solid hsla(0,6%,6%,.15);font-weight:700;margin-bottom:16px;padding:8px 0}.vm-shortcuts-section-list{grid-gap:16px;display:grid;gap:16px}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:180px 1fr}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code{background-color:#fff;background-repeat:repeat-x;border:1px solid hsla(0,6%,6%,.15);border-radius:4px;color:#110f0f;display:inline-block;font-size:10px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__description{font-size:12px}.vm-header{align-items:center;display:flex;gap:48px;justify-content:flex-start;padding:8px 24px}.vm-header_app{padding:8px 0}.vm-header-logo{align-items:center;display:grid;justify-content:center}.vm-header-logo__icon{align-items:center;cursor:pointer;display:flex;margin-bottom:2px;position:relative;width:100%}.vm-header-logo__issue{color:inherit;cursor:pointer;font-size:10px;opacity:.4;text-align:center;text-decoration:underline;transition:opacity .2s;white-space:nowrap}.vm-header-logo__issue:hover{opacity:.8}.vm-header-nav{font-size:10px;font-weight:600}.vm-header__settings{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-container{display:flex;flex-direction:column;min-height:calc(100vh - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:24px}.vm-container-body_app{background-color:transparent;padding:8px 0}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:rgba(0,0,0,.07)}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform;z-index:100}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform;z-index:100}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{height:500px;pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:16px;word-wrap:break-word;background:rgba(97,97,97,.92);border-radius:8px;color:#fff;display:grid;font-family:JetBrains Mono,monospace;font-size:10px;font-weight:400;gap:16px;line-height:150%;padding:8px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:300px;z-index:98}.vm-chart-tooltip_sticky{background-color:#616161;pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-246.5px;margin-top:-20.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__close{color:#fff}.vm-chart-tooltip-header__drag{color:#fff;cursor:move}.vm-chart-tooltip-data{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:auto 1fr;line-height:12px;word-break:break-all}.vm-chart-tooltip-data__value{font-weight:700;padding:4px}.vm-chart-tooltip-data__marker{height:12px;width:12px}.vm-chart-tooltip-info{grid-gap:4px;display:grid}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;grid-template-columns:auto auto;justify-content:start;padding:8px 48px 8px 8px;transition:.2s ease}.vm-legend-item:hover{background-color:rgba(0,0,0,.1)}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400}.vm-legend-item-info__free-fields{cursor:pointer;padding:3px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-info__free-fields:not(:last-child):after{content:","}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;margin-top:24px;position:relative}.vm-legend-group{margin:0 16px 16px 0;min-width:23%}.vm-legend-group-title{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;margin-bottom:1px;padding:0 8px 8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 96px - var(--scrollbar-width))}.vm-autocomplete,.vm-query-editor-autocomplete{max-height:300px;overflow:auto}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:24px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-switch{align-items:center;cursor:pointer;display:flex;justify-content:flex-start}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:hsla(0,6%,6%,.4);border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-query-configurator{grid-gap:8px;display:grid;gap:8px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto}.vm-query-configurator-list-row_disabled{-webkit-filter:grayscale(100%);filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:flex-end;display:flex;gap:24px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,auto)}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:24px;z-index:2}.vm-json-view__code{font-size:12px;line-height:1.4;-webkit-transform:translateY(-32px);transform:translateY(-32px)}.vm-axes-limits{max-width:300px}.vm-axes-limits,.vm-axes-limits-list{grid-gap:16px;align-items:center;display:grid;gap:16px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:16px;display:grid;gap:16px;padding:0 0 16px}.vm-graph-settings-popper__body{grid-gap:8px;display:grid;gap:8px;padding:0 16px}.vm-spinner{align-items:center;-webkit-animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:hsla(0,0%,100%,.5);bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner__message{color:hsla(0,6%,6%,.9);font-size:14px;line-height:1.3;margin-top:24px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid transparent;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{-webkit-animation:half-circle-spinner-animation 1s infinite;animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{-webkit-animation:half-circle-spinner-animation 1s infinite alternate;animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@-webkit-keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes half-circle-spinner-animation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vm-fade{0%{opacity:0}to{opacity:1}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-tracings-view{grid-gap:24px;display:grid;gap:24px}.vm-tracings-view-trace-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;justify-content:space-between;padding:8px 8px 8px 24px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:14px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace__nav{padding:24px 24px 24px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:hsla(0,6%,6%,.6);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:hsla(0,6%,6%,.05);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{background-color:rgba(201,227,246,.4);border-radius:4px;margin-left:24px}.vm-nested-nav-header{grid-gap:8px;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;padding:8px;transition:background-color .2s ease-in-out}.vm-nested-nav-header:hover{background-color:hsla(0,6%,6%,.06)}.vm-nested-nav-header__icon{align-items:center;display:flex;justify-content:center;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-nested-nav-header__message,.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__duration{color:hsla(0,6%,6%,.6);grid-column:2}.vm-json-form{grid-gap:16px;display:grid;gap:16px;grid-template-rows:auto calc(90vh - 150px) auto;max-height:900px;max-width:1000px;width:70vw}.vm-json-form_one-field{grid-template-rows:calc(90vh - 150px) auto}.vm-json-form textarea{height:100%;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}.vm-table-settings-popper{display:grid;min-width:250px}.vm-table-settings-popper-list{grid-gap:8px;border-bottom:1px solid hsla(0,6%,6%,.15);display:grid;gap:8px;max-height:350px;overflow:auto;padding:16px}.vm-table-settings-popper-list-header{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between;min-height:25px}.vm-table-settings-popper-list-header__title{font-weight:700}.vm-table-settings-popper-list__item{font-size:12px;text-transform:capitalize}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{-webkit-transform:scale(1);transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:transparent;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;width:12px}.vm-checkbox-track__thumb svg{width:100%}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-custom-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:100%;height:100%}.vm-custom-panel__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:flex;font-size:10px;justify-content:space-between;margin:-24px -24px 24px;padding:0 24px;position:relative;z-index:1}.vm-table-view{margin-top:-24px;max-width:100%;overflow:auto}.vm-table-view table{margin-top:0}.vm-predefined-panel-header{grid-gap:8px;align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);display:grid;gap:8px;grid-template-columns:auto 1fr 160px auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{padding:8px 16px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;-webkit-transform:rotate(0);transform:rotate(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out}.vm-accordion-header__arrow_open{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-predefined-dashboard{background-color:transparent}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:14px;overflow:hidden;padding:16px;position:relative;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:12px}.vm-predefined-dashboard-header__count{font-size:10px;grid-column:2;margin-right:30px}.vm-predefined-dashboard-panels{grid-gap:16px;display:grid;gap:16px;grid-template-columns:repeat(12,1fr);padding:0}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{-webkit-transform:scale(1);transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:se-resize;height:20px;position:absolute;right:0;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid hsla(0,6%,6%,.2);border-right:2px solid hsla(0,6%,6%,.2);bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:16px;align-items:flex-start;display:grid;gap:16px}.vm-predefined-panels-tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start;overflow:hidden}.vm-predefined-panels-tabs__tab{border-right:1px solid hsla(0,6%,6%,.15);cursor:pointer;padding:16px;text-transform:uppercase;transition:opacity .2s ease-in-out,color .15s ease-in}.vm-predefined-panels-tabs__tab:hover{opacity:1}.vm-predefined-panels__dashboards{grid-gap:16px;display:grid;gap:16px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:0 24px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:1}.vm-cardinality-configurator-bottom{grid-gap:24px;align-items:flex-end;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-cardinality-configurator-bottom__info{font-size:12px}.u-legend{color:#110f0f;font-family:Lato,sans-serif;font-size:14px}.u-legend .u-thead{display:none}.u-legend .u-series{display:flex;gap:8px}.u-legend .u-series th{display:none}.u-legend .u-series td:nth-child(2):after{content:":";margin-left:8px}.u-legend .u-series .u-value{display:block;padding:0;text-align:left}.vm-metrics-content-header{margin:-24px -24px 24px}.vm-cardinality-panel{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-panel-header{margin:-24px -24px 24px}.vm-top-queries{grid-gap:24px;align-items:flex-start;display:grid;gap:24px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-bottom,.vm-top-queries-controls__fields{grid-gap:24px;display:grid;gap:24px;grid-template-columns:1fr auto}.vm-top-queries-controls-bottom{align-items:flex-end;justify-content:space-between}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:24px;display:grid;gap:24px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%;padding:16px}.vm-trace-page-controls{grid-gap:16px;align-items:center;display:grid;gap:16px;grid-template-columns:1fr 1fr;justify-content:center}.vm-trace-page-header{grid-gap:16px;align-items:start;display:grid;gap:16px;grid-template-columns:1fr auto;margin-bottom:24px}.vm-trace-page-header-errors{grid-gap:24px;align-items:flex-start;display:grid;gap:24px;grid-template-columns:1fr;justify-content:stretch}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:8px;text-align:center;white-space:pre-line}#root,body,html{background-attachment:fixed;background-repeat:no-repeat;color:#110f0f;cursor:default;font-family:Lato,sans-serif;font-size:12px;margin:0;min-height:100%}body{overflow:scroll}*{cursor:inherit;font:inherit}code{font-family:JetBrains Mono,monospace}b{font-weight:700}input,textarea{cursor:text}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{bottom:16px;left:16px;position:fixed;z-index:999}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::-webkit-input-placeholder{opacity:1;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::-webkit-input-placeholder{opacity:0;-webkit-transition:opacity .3s ease;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid hsla(0,6%,6%,.2)}.vm-list__item{background-color:transparent;cursor:pointer;padding:12px 16px;transition:background-color .2s ease}.vm-list__item:hover,.vm-list__item_active{background-color:hsla(0,6%,6%,.1)}.vm-popper-header{grid-gap:8px;align-items:center;background-color:#3f51b5;background-color:var(--color-primary);border-radius:4px 4px 0 0;color:#fff;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;padding:8px 8px 8px 16px}.vm-popper-header__title{font-weight:700}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 12px hsla(0,6%,6%,.08);padding:24px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid hsla(0,6%,6%,.15);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 24px}.vm-section-header__title{font-size:12px;font-weight:700}.vm-section-header__tabs{align-items:center;display:flex;font-size:10px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-24px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:hsla(0,6%,6%,.05)}.vm-table__row_header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-table__row_selected{background-color:rgba(26,144,255,.05)}.vm-table-cell{border-bottom:1px solid hsla(0,6%,6%,.15);height:40px;padding:8px;vertical-align:middle}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:hsla(0,6%,6%,.05)}.vm-table-cell_header{font-weight:700;text-align:left;text-transform:capitalize}.vm-table-cell_gray{color:hsla(0,6%,6%,.4)}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,-webkit-transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out;transition:opacity .2s ease,transform .2s ease-in-out,-webkit-transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0b7317e2.js b/app/vmselect/vmui/static/js/main.0b7317e2.js deleted file mode 100644 index 570878bc1..000000000 --- a/app/vmselect/vmui/static/js/main.0b7317e2.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.0b7317e2.js.LICENSE.txt */ -!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=A(e),r=n.length>0?n[0]:"",o=S("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=$(p,"Map"),A=$(Object,"create"),S=k?k.prototype:void 0,F=S?S.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var R=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function j(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,A="function"===typeof BigInt?BigInt.prototype.valueOf:null,S=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,$=U(P)?P:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function I(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return S&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,S)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if($&&"function"===typeof t[$]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),J("Map",o.call(t),ae,S)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),J("Set",c.call(t),ue,S)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!A)return!1;try{return A.call(e),!0}catch(t){}return!1}(t))return G(P(A.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":S?de+"{"+K(le,S)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(g.call(e,0,t.maxStringLength),t)+r}return R(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function G(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var $=a&&l(C)&&1===C.length?n+"[]":n,R=0;R0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,Z=r.__c,J=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),Z&&Z(e,t)},r.unmount=function(e){J&&J(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Ae={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Se=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Se(e,t,n,r)};var Fe=r.unmount;function Ne(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),P(h($e,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ie(e,t){var n=h(Re,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return $(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Ze,Je={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Je.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Je))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Ze=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Ze.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?R.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Ae,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Ie,createElement:h,createContext:I,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:It(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(It(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=Rt(h.location,e,t);n&&n(r,e);var i=$t(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Jt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function $n(e){return function(e){var t=ue(xn).outlet;return t?h(Sn.Provider,{value:e},t):t}(e.context)}function Rn(e){Kt(!1)}function In(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Jt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Ae.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==Rn&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return Rt("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:It(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(In,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries"},Qn={header:{timeSelector:!0,executionControls:!0,globalSettings:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0,globalSettings:!0}}),Vn),Zn=Wn;function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=I({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Ar=1,Sr=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},$r=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),Rr=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=$r.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=$r.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Ir=ur("g0.range_input"),jr=Rr({defaultDuration:Ir||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Ir?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=Rr({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=I({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Jr([e])},Zr=function(e){var t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(c){return t}},Jr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Zr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=I({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})})},Si=n(123),Fi=n.n(Si),Ni=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Oi=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Ti=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Ni("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Fi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Fi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Bi=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],Mi=function(){var e=ji().displayType,t=zi();return fr(Ti,{activeItem:e,items:Bi,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Li=ur("g0.tab",0),Pi=Bi.find((function(e){return e.prometheusCode===+Li||e.value===Li})),$i={displayType:(null===Pi||void 0===Pi?void 0:Pi.value)||"chart",nocache:Zr("NO_CACHE")||!1,isTracingEnabled:Zr("QUERY_TRACING")||!1};function Ri(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"TOGGLE_QUERY_TRACING":return Gr("QUERY_TRACING",!e.isTracingEnabled),Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Gr("NO_CACHE",!e.nocache),Kn(Kn({},e),{},{nocache:!e.nocache});default:throw new Error}}var Ii=I({}),ji=function(){return ue(Ii).state},zi=function(){return ue(Ii).dispatch},Ui={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Hi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Yi=I({}),Vi=function(){return ue(Yi).dispatch},qi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Wi(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Qi=I({}),Gi=function(){return ue(Qi).state},Zi=function(){return ue(Qi).dispatch},Ji={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi,eo=I({}),to=function(){return ue(eo).state},no={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},ro=function(e){var t=e.variant,n=e.children;return fr("div",{className:Fi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:no[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},io=I({showInfoMessage:function(){}}),oo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&uo(b,(function(){return v(!1)}),n);var x=Fi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},co=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},so=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],fo=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(so[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(so[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Fi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(co,{title:"Refresh dashboard",children:fr(ao,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(co,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ao,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Fi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(lo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:so.map((function(e){return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},ho=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:$r.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},po=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},vo=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},mo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],yo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[mo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Fi()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},go=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Fi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(Xi||(Xi={}));var _o,bo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(Xi.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===Xi.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case Xi.hour:return+l/12*360;case Xi.minutes:return+f/60*360;case Xi.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Fi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===Xi.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Fi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case Xi.hour:c(e),_.current&&_.current.focus();break;case Xi.minutes:d(e),b.current&&b.current.focus();break;case Xi.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(Xi.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(Xi.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(Xi.seconds),ref:b,type:"number",min:0,max:60})]})]})},Do=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],wo=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(Do[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(vo,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(yo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(go,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(bo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Ti,{activeItem:_,items:Do,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},xo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(lo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(wo,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),ko=xo,Co=function(){var e=re(null),t=po(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],A=C[1],S=re(null),F=function(){A(!1)};return uo(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:S,children:fr(co,{title:"Time range controls",children:fr(ao,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){A((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(lo,{open:E,buttonRef:S,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(ko,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(ko,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ao,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ao,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),A(!1)},children:"Cancel"}),fr(ao,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void A(!1)},children:"Apply"})]})]}),fr(ho,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),A(!1)}})]})})]})};!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it"}(_o||(_o={}));var Eo=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Fi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:"vm-text-field","data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Ao=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},So=function(e){var t=e.setServer,n=e.onEnter,r=hr().serverUrl,i=_t(X(""),2),o=i[0],a=i[1],u=_t(X(r),2),l=u[0],c=u[1];return fr(Eo,{autofocus:!0,label:"Server URL",value:l,error:o,onChange:function(e){var n=e||"";c(n),t(n),a(""),n||a(_o.emptyServer),Ao(n)||a(_o.validServer)},onEnter:function(){n(l)}})},Fo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ao,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},No="Setting Server URL",Oo=function(){var e=hr().serverUrl,t=pr(),n=_t(X(e),2),r=n[0],i=n[1],o=function(e){t({type:"SET_SERVER",payload:e||r}),c()},a=_t(X(!1),2),u=a[0],l=a[1],c=function(){return l(!1)};return fr(m,{children:[fr(co,{title:No,children:fr(ao,{className:"vm-header-button",variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return l(!0)}})}),u&&fr(Fo,{title:No,onClose:c,children:fr("div",{className:"vm-server-configurator",children:[fr("div",{className:"vm-server-configurator__input",children:fr(So,{setServer:i,onEnter:o})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ao,{variant:"outlined",color:"error",onClick:c,children:"Cancel"}),fr(ao,{variant:"contained",onClick:function(){o()},children:"apply"})]})]})})]})},To={windows:"Windows",mac:"Mac OS",linux:"Linux"},Bo=(Object.values(To).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===To.mac?"Cmd":"Ctrl",Mo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[Bo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[Bo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[Bo,"Scroll Up"],description:"Zoom in"},{keys:[Bo,"Scroll Down"],description:"Zoom out"},{keys:[Bo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[Bo,"Mouse Click"],description:"Toggle multiple series"}]}],Lo=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(co,{title:"Shortcut keys",placement:"bottom-center",children:fr(ao,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Fo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Mo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Po=function(){var e=er(),t=re(null),n=Gi().date,r=Zi(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(co,{title:"Date control",children:fr(ao,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(ko,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},$o=function(){var e=Ni("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=An(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Zn.home},{label:"Dashboards",value:Zn.dashboards,hide:t},{label:"Cardinality",value:Zn.cardinality},{label:"Top queries",value:Zn.topQueries}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Fi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Zn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Ti,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Co,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Po,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(fo,{}),(null===v||void 0===v?void 0:v.globalSettings)&&!t&&fr(Oo,{}),fr(Lo,{})]})]})},Ro=function(){var e=er();return fr("section",{className:"vm-container",children:[fr($o,{}),fr("div",{className:Fi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr($n,{})})]})};function Io(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var jo,zo,Uo="u-off",Ho="u-label",Yo="width",Vo="height",qo="top",Wo="bottom",Qo="left",Go="right",Zo="#000",Jo="#0000",Ko="mousemove",Xo="mousedown",ea="mouseup",ta="mouseenter",na="mouseleave",ra="dblclick",ia="change",oa="dppxchange",aa="undefined"!=typeof window,ua=aa?document:null,la=aa?window:null,ca=aa?navigator:null;function sa(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function fa(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function da(e,t,n){e.style[t]=n+"px"}function ha(e,t,n,r){var i=ua.createElement(e);return null!=t&&sa(i,t),null!=n&&n.insertBefore(i,r),i}function pa(e,t){return ha("div",e,t)}var va=new WeakMap;function ma(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=va.get(e)&&(e.style.transform=o,va.set(e,o),t<0||n<0||t>r||n>i?sa(e,Uo):fa(e,Uo))}var ya=new WeakMap;function ga(e,t,n){var r=t+n;r!=ya.get(e)&&(ya.set(e,r),e.style.background=t,e.style.borderColor=n)}var _a=new WeakMap;function ba(e,t,n,r){var i=t+""+n;i!=_a.get(e)&&(_a.set(e,i),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}var Da={passive:!0},wa=Kn(Kn({},Da),{},{capture:!0});function xa(e,t,n,r){t.addEventListener(e,n,r?wa:Da)}function ka(e,t,n,r){t.removeEventListener(e,n,r?wa:Da)}function Ca(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ya((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function Aa(e,t,n,r){var i=eu,o=-eu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=Wa(i,e[a]),o=Qa(o,e[a]));return[i,o]}function Sa(e,t,n){for(var r=eu,i=-eu,o=t;o<=n;o++)e[o]>0&&(r=Wa(r,e[o]),i=Qa(i,e[o]));return[r==eu?1:r,i==-eu?10:i]}aa&&function e(){var t=devicePixelRatio;jo!=t&&(jo=t,zo&&ka(ia,zo,e),zo=matchMedia("(min-resolution: ".concat(jo-.001,"dppx) and (max-resolution: ").concat(jo+.001,"dppx)")),xa(ia,zo,e),la.dispatchEvent(new CustomEvent(oa)))}();var Fa=[0,0];function Na(e,t,n,r){return Fa[0]=n<0?du(e,-n):e,Fa[1]=r<0?du(t,-r):t,Fa}function Oa(e,t,n,r){var i,o,a,u=Za(e),l=10==n?Ja:Ka;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ya(l(e)),o=qa(l(t)),e=(a=Na(Ga(n,i),Ga(n,o),i,o))[0],t=a[1]):(i=Ya(l(Ha(e))),o=Ya(l(Ha(t))),e=fu(e,(a=Na(Ga(n,i),Ga(n,o),i,o))[0]),t=su(t,a[1])),[e,t]}function Ta(e,t,n,r){var i=Oa(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var Ba={mode:3,pad:.1},Ma={pad:0,soft:null,mode:0},La={min:Ma,max:Ma};function Pa(e,t,n,r){return Du(n)?Ra(e,t,n):(Ma.pad=n,Ma.soft=r?0:null,Ma.mode=r?3:0,Ra(e,t,La))}function $a(e,t){return null==e?t:e}function Ra(e,t,n){var r=n.min,i=n.max,o=$a(r.pad,0),a=$a(i.pad,0),u=$a(r.hard,-eu),l=$a(i.hard,eu),c=$a(r.soft,eu),s=$a(i.soft,-eu),f=$a(r.mode,0),d=$a(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=eu&&(o=0),2==d&&s!=-eu&&(a=0)));var p=h||Ha(t)||1e3,v=Ja(p),m=Ga(10,Ya(v)),y=du(fu(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:eu,_=Qa(u,y=g?g:Wa(g,y)),b=du(su(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-eu,w=Wa(l,b>D&&t<=D?D:Qa(D,b));return _==w&&0==_&&(w=100),[_,w]}var Ia=new Intl.NumberFormat(aa?ca.language:"en-US"),ja=function(e){return Ia.format(e)},za=Math,Ua=za.PI,Ha=za.abs,Ya=za.floor,Va=za.round,qa=za.ceil,Wa=za.min,Qa=za.max,Ga=za.pow,Za=za.sign,Ja=za.log10,Ka=za.log2,Xa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return za.asinh(e/t)},eu=1/0;function tu(e){return 1+(0|Ja((e^e>>31)-(e>>31)))}function nu(e,t){return Va(e/t)*t}function ru(e,t,n){return Wa(Qa(e,t),n)}function iu(e){return"function"==typeof e?e:function(){return e}}var ou=function(e){return e},au=function(e,t){return t},uu=function(e){return null},lu=function(e){return!0},cu=function(e,t){return e==t};function su(e,t){return qa(e/t)*t}function fu(e,t){return Ya(e/t)*t}function du(e,t){return Va(e*(t=Math.pow(10,t)))/t}var hu=new Map;function pu(e){return((""+e).split(".")[1]||"").length}function vu(e,t,n,r){for(var i=[],o=r.map(pu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=du(s,f);i.push(d),hu.set(d,f)}return i}var mu={},yu=[],gu=[null,null],_u=Array.isArray;function bu(e){return"string"==typeof e}function Du(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function wu(e){return null!=e&&"object"==typeof e}var xu=Object.getPrototypeOf(Uint8Array);function ku(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Du;if(_u(e)){var r=e.find((function(e){return null!=e}));if(_u(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Mu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Mu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Pu(e,t){t=t||Bu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Lu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ya(c)-Ya(y))+su(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=du(N+f,1==e?0:3))>s);)if(B>1){var L=Ya(du(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,du(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var tl=_t(el(1),3),nl=tl[0],rl=tl[1],il=tl[2],ol=_t(el(.001),3),al=ol[0],ul=ol[1],ll=ol[2];function cl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function sl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function fl(e,t,n){return new Date(e,t,n)}function dl(e,t){return t(e)}vu(2,-53,53,[1]);function hl(e,t){return function(n,r){return t(e(r))}}var pl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};var vl=[0,0];function ml(e,t,n){return function(e){0==e.button&&n(e)}}function yl(e,t,n){return n}var gl={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return vl[0]=t,vl[1]=n,vl},points:{show:function(e,t){var n=e.cursor.points,r=pa(),i=n.size(e,t);da(r,Yo,i),da(r,Vo,i);var o=i/-2;da(r,"marginLeft",o),da(r,"marginTop",o);var a=n.width(e,t,i);return a&&da(r,"borderWidth",a),r},size:function(e,t){return Rl(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:ml,mouseup:ml,click:ml,dblclick:ml,mousemove:yl,mouseleave:yl,mouseenter:yl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},_l={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},bl=Cu({},_l,{filter:au}),Dl=Cu({},bl,{size:10}),wl=Cu({},_l,{show:!1}),xl='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',kl="bold "+xl,Cl={show:!0,scale:"x",stroke:Zo,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:kl,side:2,grid:bl,ticks:Dl,border:wl,font:xl,rotate:0},El={show:!0,scale:"x",auto:!1,sorted:1,min:eu,max:-eu,idxs:[]};function Al(e,t,n,r,i){return t.map((function(e){return null==e?"":ja(e)}))}function Sl(e,t,n,r,i,o,a){for(var u=[],l=hu.get(i)||0,c=n=a?n:du(su(n,i),l);c<=r;c=du(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Fl(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ya((10==l?Ja:Ka)(n));i=Ga(l,c),c<0&&(i=du(i,-c));var s=n;do{u.push(s),(s=du(s+i,hu.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function Nl(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Fl(e,t,Qa(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Fl(e,t,Qa(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Ol=/./,Tl=/[12357]/,Bl=/[125]/,Ml=/1/;function Ll(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Ol:l(7,a)-s>=c?Tl:l(5,a)-s>=c?Bl:Ml;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Pl(e,t){return null==t?"":ja(t)}var $l={show:!0,scale:"y",stroke:Zo,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:kl,side:3,grid:bl,ticks:Dl,border:wl,font:xl,rotate:0};function Rl(e,t){return du((3+2*(e||1))*t,3)}var Il={scale:null,auto:!0,sorted:0,min:eu,max:-eu},jl={show:!0,auto:!0,sorted:0,alpha:1,facets:[Cu({},Il,{scale:"x"}),Cu({},Il,{scale:"y"})]},zl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Ha(u-a)/(e.series[t].points.space*jo);return i[1]-i[0]<=l},filter:null},values:null,min:eu,max:-eu,idxs:[],path:null,clip:null};function Ul(e,t,n,r,i){return n/10}var Hl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Yl=Cu({},Hl,{time:!1,ori:1}),Vl={};function ql(e,t){var n=Vl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?oc:ac,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function Kl(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function Xl(e){return 0==e?ou:1==e?Va:function(t){return nu(t,e)}}function ec(e){var t=0==e?tc:nc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=Wa(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var tc=function(e,t,n){e.moveTo(t,n)},nc=function(e,t,n){e.moveTo(n,t)},rc=function(e,t,n){e.lineTo(t,n)},ic=function(e,t,n){e.lineTo(n,t)},oc=ec(0),ac=ec(1),uc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},lc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},cc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},sc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function fc(e){return function(e,t,n,r,i){return Wl(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=tc,m=uc):(v=nc,m=lc);var _=du(g.width*jo,3),b=(g.size-g.width)/2*jo,D=du(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,A=k.width,S=k.height;oc(x,C-D,E-D,A+2*D,S+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ua)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function dc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var hc=dc(rc),pc=dc(ic);function vc(e){var t=$a(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return Wl(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=rc,y=hc):(m=ic,y=pc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,A=eu,S=-eu,F=_(a[1==k?r:i]),N=Ea(u,r,i,1*k),O=Ea(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),A==eu&&(m(E,L,w),D=w),A=Wa(w,A),S=Qa(w,S)):(A!=eu&&(y(E,F,A,S,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),A=S=D=w):(A=eu,S=-eu),F=L)}A!=eu&&A!=S&&x!=F&&y(E,F,A,S,D,w);var P=_t(Ql(e,n),2),$=P[0],R=P[1];if(null!=o.fill||0!=$){var I=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,$));m(I,B,j),m(I,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(Kl(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=Jl(U,l.ori,d,h,p,v)}return 0!=R&&(C.band=2==R?[Zl(e,n,r,i,E,-1),Zl(e,n,r,i,E,1)]:Zl(e,n,r,i,E,R)),C}))}}function mc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?hu.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Xa(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=pa("uplot");(null!=e.id&&(s.id=e.id),sa(s,e.class),e.title)&&(pa("u-title",s).textContent=e.title);var f=ha("canvas"),d=r.ctx=f.getContext("2d"),h=pa("u-wrap",s),p=r.under=pa("u-under",h);h.appendChild(f);var v=r.over=pa("u-over",h),m=+$a((e=ku(e)).pxAlign,1),y=Xl(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Dc(e.series||[],El,zl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Cu({},t,e)}))}(e.series||[null],jl),b=r.axes=Dc(e.axes||[],Cl,$l,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=iu(e.fill||null),e.dir=$a(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Va((t._lpos+s)*jo);Je(t.labelFont[0],u,"center",2==n?qo:Wo),d.save(),1==i?(o=a=0,d.translate(f,Va(de+pe/2)),d.rotate((3==n?-Ua:Ua)/2)):(o=Va(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Va(t.gap*jo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,A=t.border,S=E.show?Va(E.size*jo):0,F=t._rotate*-Ua/180,N=y(t._pos*jo),O=N+(S+w)*c;a=0==i?O:0,o=1==i?O:0,Je(t.font[0],u,1==t.align?Qo:2==t.align?Go:F>0?Qo:F<0?Go:0==i?"center":3==n?Go:Qo,F||1==i?"middle":2==n?qo:Wo);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=ru(He-1,0,Ne-1),n=ru(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||mu)[t]||mu;if(null!=r.from)E(r.from),D[t]=Cu({},D[r.from],r,{key:t});else{(n=D[t]=Cu({},t==x?Hl:Yl,r)).key=t;var o=n.time,a=n.range,u=_u(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ba:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ba:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Du(a))){var l=a;a=function(e,t,n){return null==t?gu:Pa(t,n,l)}}n.range=iu(a||(o?kc:t==x?3==n.distr?Ac:4==n.distr?Fc:xc:3==n.distr?Ec:4==n.distr?Sc:Cc)),n.auto=iu(!u&&n.auto),n.clamp=iu(n.clamp||Ul),n._min=n._max=null}}}for(var A in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(A);var S,F,N=D[x],O=N.distr;0==N.ori?(sa(s,"u-hz"),S=a,F=u):(sa(s,"u-vt"),S=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Va(e/g))},$=e.fmtDate||Pu,R=1==g?il(P):ll(P),I=sl(P,cl(1==g?rl:ul,$)),j=hl(P,dl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",$)),z=[],U=r.legend=Cu({},pl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=iu(Y.width),Y.dash=iu(Y.dash),Y.stroke=iu(Y.stroke),Y.fill=iu(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var Z=_[1]?_[1].values:null;for(var J in V=(Q=null!=Z)?Z(r,1,0):{_:0})G[J]="--"}if(H)if(L=ha("table","u-legend",s),Q){var K=ha("tr","u-thead",L);for(var X in ha("th",null,K),V)ha("th",Ho,K).textContent=X}else sa(L,"u-inline"),U.live&&sa(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(xa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(ka(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Se[0]=e,Se[1]=n,Se[2]=t,Se[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=nu(ce*jo,.5),de=n.top=nu(se*jo,.5),he=n.width=nu(ue*jo,.5),pe=n.height=nu(le*jo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Cu({},gl,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=iu(xe.show),xe.size=iu(xe.size),xe.stroke=iu(xe.stroke),xe.width=iu(xe.width),xe.fill=iu(xe.fill);var ke=r.focus=Cu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Ae(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?bu(o)?hl(P,dl(o,$)):o||j:o||Pl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||_c||uu,e.fillTo=iu(e.fillTo||Gl),e.pxAlign=+$a(e.pxAlign,m),e.pxRound=Xl(e.pxAlign),e.stroke=iu(e.stroke||null),e.fill=iu(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=Rl(e.width,1),u=e.points=Cu({},{size:a,width:Qa(1,.2*a),stroke:e.stroke,space:2*a,paths:bc,_stroke:null,_fill:null},e.points);u.show=iu(u.show),u.filter=iu(u.filter),u.fill=iu(u.fill),u.stroke=iu(u.stroke),u.paths=iu(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return gu;var n=[],o=ha("tr","u-series",L,L.childNodes[t]);sa(o,e.class),e.show||sa(o,Uo);var a=ha("th",null,o);if(Y.show){var u=pa("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=pa(Ho,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ta,a,(function(t){we._lock||Pt(_.indexOf(e),$t,!0,an.setSeries)}))),V){var f=ha("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return sa(n,"u-cursor-pt"),sa(n,e.class),ma(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=wc(e,t=null==t?_.length:t,El,zl),_.splice(t,0,e),Ae(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Se=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Va(Cl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Va($l.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,$e,Re,Ie,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return iu($a(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Se,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:ku(e,wu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Oa(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(Ta(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Va(86400/g);else{var a=_t(Pa(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jo,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:yu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Jo,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Je(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=$e&&(d.font=$e=e),n!=Re&&(d.textAlign=Re=n),r!=Ie&&(d.textBaseline=Ie=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=$a(He,0),u=$a(Ye,i.length-1),l=null==n.min?3==e.distr?Sa(i,a,u):Aa(i,a,u,o):[n.min,n.max];e.min=Wa(e.min,n.min=l[0]),e.max=Qa(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=du(i.width*jo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*jo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||mu).band;_u(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=$a(t,0),n=$a(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Ze(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Ze(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Au(xt),Dt=!0)}function xt(){ve&&(!function(){var e=ku(D,wu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Cu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=eu,o.max=-eu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ca(u.min,t[0]),Ye=Ca(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==eu?null:c.min,c.max==-eu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?Ja(w.min):4==k?Xa(w.min,w.asinh):w.min,w._max=3==k?Ja(w.max):4==k?Xa(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(da(p,Qo,ce),da(p,qo,se),da(p,Yo,ue),da(p,Vo,le),da(v,Qo,ce),da(v,qo,se),da(v,Yo,ue),da(v,Vo,le),da(h,Yo,oe),da(h,Vo,ae),f.width=Va(oe*jo),f.height=Va(ae*jo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;da(t,a?"left":"top",i-(3===o||0===o?r:0)),da(t,a?"width":"height",r),da(t,a?"top":"left",a?se:ce),da(t,a?"height":"width",a?le:ue),fa(t,Uo)}else sa(t,Uo)})),Oe=Te=Be=Le=Pe=$e=Re=Ie=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ca(n.min,t[0]),n.max=Ca(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,At=Et.x,St=Et.y;we.show&&(we.x&&(lt=pa("u-cursor-x",v)),we.y&&(ct=pa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Cu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?pa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)da(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&fa(r,Uo):(r&&sa(r,Uo),Ee.length>1&&ma(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=iu(e.fill||null),e.dir=$a(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Cu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var $t={focus:!0};function Rt(e,t,n){var r=D[t];n&&(e=e/jo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?Ga(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return za.sinh(e)*t}(a,r.asinh):a}function It(e,t){da(Bt,Qo,Tt.left=e),da(Bt,Yo,Tt.width=t)}function jt(e,t){da(Bt,qo,Tt.top=e),da(Bt,Vo,Tt.height=t)}H&&Ce&&xa(na,L,(function(e){we._lock||null!=Ot&&Pt(null,$t,!0,an.setSeries)})),r.valToIdx=function(e){return Ca(e,t[0])},r.posToIdx=function(e,n){return Ca(Rt(e,x,n),t[0],He,Ye)},r.posToVal=Rt,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?It:jt,Ut=1==N.ori?It:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ma(st,Va(gt),0,ue,le),ft&&ma(ft,0,Va(bt),ue,le));var l=He>Ye;Ft=eu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ma(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,$t,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ca(p=Rt(0==N.ori?gt:bt,x),t[0],He,Ye),v=su(S(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:su(S(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:su(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var A=Ha(E-bt);A<=Ft&&(Ft=A,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){ga(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,$=!0,R=we.points.bbox;if(null!=R){$=!1;var I=R(r,m);L=I.left,P=I.top,B=I.width,M=I.height}else L=O,P=T,B=M=we.points.size(r,m);ba(Ee[m],B,M,$),ma(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],Z=_t(e.cursor.sync.scales,2),J=Z[0],K=Z[1],X=e.cursor.drag;if(At=X._x,St=X._y,At||St){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,J),ve=null!=Y&&W(Y,K);pe&&At?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=S(he(ee,J),ne,s,0),ie=S(he(ee+te,J),ne,s,0),zt(Wa(re,ie),Ha(ie-re))):zt(0,s),ve&&St?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(Wa(re,ie),Ha(ie-re))):Ut(0,f)}else Jt()}else{var me=Ha(mt-dt),ye=Ha(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}At=Et.x&&me>=Et.dist,St=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?At&&St&&(St=ye>=xe,(At=me>=xe)||St||(ye>me?St=!0:At=!0)):Et.x&&Et.y&&(At||St)&&(At=St=!0),At&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(Wa(be,De),Ha(De-be)),St||Ut(0,f)),St&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(Wa(be,De),Ha(De-be)),At||zt(0,s)),At||St||(zt(0,0),Ut(0,0))}if(Et._x=At,Et._y=St,null==e){if(o){if(null!=un){var Ae=_t(an.scales,2),Se=Ae[0],Fe=Ae[1];an.values[0]=null!=Se?Rt(0==N.ori?gt:bt,Se):null,an.values[1]=null!=Fe?Rt(1==N.ori?gt:bt,Fe):null}cn(Ko,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,$t,!0,Oe):Ft>Te?Pt(null,$t,!0,Oe):Nt!=Ot&&Pt(Nt,$t,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,A=1==N.ori?ue:le,S=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/S),i=null!=b?k(h,b)?l(y,D[h],A,0):-10:A*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=nu(n,ue)),(i<=1||i>=le-1)&&(i=nu(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Zt={width:0,height:0};function Jt(){Mt(Zt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,At=St=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(ea,ua,Xt),cn(Xo,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),At&&Lt(x,Rt(h,x),Rt(h+p,x)),St)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=eu&&Lt(y,Rt(v+m,y),Rt(v,y))}Jt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(ea,ua),cn(ea,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Jt(),null!=e&&cn(ra,r,gt,bt,ue,le,null)}function tn(){b.forEach(Tc),be(r.width,r.height,!0)}xa(oa,la,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(Xo,v,Kt),re(Ko,v,Qt),re(ta,v,Wt),re(na,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=At,c=St):(l=St,c=At),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Ll:au)),e.font=Oc(e.font),e.labelFont=Oc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Se[t]=!0,e._el=pa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}Bc.assign=Cu,Bc.fmtNum=ja,Bc.rangeNum=Pa,Bc.rangeLog=Oa,Bc.rangeAsinh=Ta,Bc.orient=Wl,Bc.pxRatio=jo,Bc.join=function(e,t){for(var n=new Set,r=0;r=o&&S<=a;S+=k){var F=c[S];if(null!=F){var N=_(l[S]),O=b(F);1==t?D(x,N,C):D(x,A,O),D(x,N,O),C=O,A=N}}var T=_t(Ql(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,A,P),D(L,E,P)}if(!u.spanGaps){var $,R=[];($=R).push.apply($,bt(Kl(l,c,o,a,k,_,r)));var I=u.width*jo/2,j=n||1==t?I:-I,z=n||-1==t?-I:I;R.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=R=u.gaps(e,i,o,a,R),w.clip=Jl(R,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[Zl(e,i,o,a,x,-1),Zl(e,i,o,a,x,1)]:Zl(e,i,o,a,x,M)),w}))}},Mc.bars=function(e){var t=$a((e=e||mu).size,[.6,eu,1]),n=e.align||0,r=(e.gap||0)*jo,i=$a(e.radius,0),o=1-t[0],a=$a(t[1],eu)*jo,u=$a(t[2],1)*jo,l=$a(e.disp,mu),c=$a(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return Wl(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,A=p.pxRound,S=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?oc:ac,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(Ql(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),$=A(p.width*jo),R=!1,I=null,j=null,z=null,U=null;null==s||0!=$&&null==f||(R=!0,I=s.values(e,t,d,h),j=new Map,new Set(I).forEach((function(e){null!=e&&j.set(e,new Path2D)})),$>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=A((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-$),C=1==S?-$/2:E+$/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=S){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b($a(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=A(oe-C),le=A(Qa(ae,P)),ce=A(Wa(ae,P)),se=le-ce,fe=i*E;null!=ie&&(R?($>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ya($/2),E,Qa(0,se-$),fe),null!=I[Q]&&N(j.get(I[Q]),ue,ce+Ya($/2),E,Qa(0,se-$),fe)):N(X,ue,ce+Ya($/2),E,Qa(0,se-$),fe),O(e,t,Q,ue-$/2,ce,E+$,se)),0!=M&&(F*M==1?(le=ce,ce=J):(ce=le,le=J),N(ee,ue-$/2,ce,E+$,Qa(0,se=le-ce),0))}}return $>0&&(K.stroke=R?U:X),K.fill=R?j:X,K}))}},Mc.spline=function(e){return function(e,t){var n=$a(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return Wl(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=tc,_=rc,g=cc):(y=nc,_=ic,g=sc);var x=c.dir*(0==c.ori?1:-1);i=Ea(l,i,o,1),o=Ea(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],A=[],S=1==x?i:o;S>=i&&S<=o;S+=x)if(null!=l[S]){var F=D(u[S]);E.push(C=F),A.push(w(l[S]))}var N={stroke:e(E,A,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(Ql(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var $,R=[];($=R).push.apply($,bt(Kl(u,l,i,o,x,D,n))),N.gaps=R=a.gaps(t,r,i,o,R),N.clip=Jl(R,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[Zl(t,r,i,o,O,-1),Zl(t,r,i,o,O,1)]:Zl(t,r,i,o,O,M)),N}))}}(mc,e)};var Lc,Pc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},$c=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},Rc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Ic=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},jc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},zc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Uc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat($c(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Yc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Vc=function(e){var t,n,r=e.u,i=e.tooltipIdx,o=e.metrics,a=e.series,u=e.tooltip,l=e.tooltipOffset,c=e.unit,s=void 0===c?"":c,f=i.seriesIdx,d=i.dataIdx;if(null!==f&&void 0!==d){var h=r.data[f][d],p=r.data[0][d],v=(null===(t=o[f-1])||void 0===t?void 0:t.metric)||{},m=a[f],y=Ic(m.label||""),g=r.over.getBoundingClientRect(),_=g.width,b=g.height,D=r.valToPos(h||0,(null===(n=a[f])||void 0===n?void 0:n.scale)||"1"),w=r.valToPos(p,"x"),x=u.getBoundingClientRect(),k=x.width,C=x.height,E=w+k>=_,A=D+C>=b;u.style.display="grid",u.style.top="".concat(l.top+D+10-(A?C+10:0),"px"),u.style.left="".concat(l.left+w+10-(E?k+20:0),"px");var S=(m.label||"").replace(/{.+}/gim,"").trim(),F=jc(S),N=yr()(new Date(1e3*p)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)"),O=Object.keys(v).filter((function(e){return"__name__"!==e})).map((function(e){return"
".concat(e,": ").concat(v[e],"
")})).join(""),T='
');u.innerHTML="
".concat(N,'
\n
\n ').concat(T).concat(F,': ').concat($c(h)," ").concat(s,'\n
\n
').concat(O,"
")}},qc=n(61),Wc=n.n(qc);!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Lc||(Lc={}));var Qc=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],h=f[1],p=_t(X({min:o.start,max:o.end}),2),v=p[0],m=p[1],y=_t(X(),2),g=y[0],_=y[1],b=po(c),D=document.createElement("div");D.className="u-tooltip";var w={seriesIdx:null,dataIdx:void 0},x={left:0,top:0},k=ae(Wc()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),C=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iSr||(t.setScale("x",{min:n,max:r}),m({min:n,max:r}),k({min:n,max:r}))},E=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(g&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(v.max-v.min)/10*(a?1:-1);C({u:g,min:v.min+u,max:v.max-u})}}},A=function(){return[v.min,v.max]},S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return a.limits.enable?a.limits.range[r]:Yc(t,n)},F=Kn(Kn({},Pc),{},{series:n,axes:Hc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:A}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(e,n,r,t)}}})),e}()),width:b.width||400,plugins:[{hooks:{ready:function(e){var t;x.left=parseFloat(e.over.style.left),x.top=parseFloat(e.over.style.top),null===(t=e.root.querySelector(".u-wrap"))||void 0===t||t.appendChild(D),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:h,setPlotScale:C,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return C({u:e,min:u,max:l})}))}}))},setCursor:function(e){w.dataIdx!==e.cursor.idx&&(w.dataIdx=e.cursor.idx||0,null!==w.seriesIdx&&void 0!==w.dataIdx&&Vc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}))},setSeries:function(e,t){w.seriesIdx!==t&&(w.seriesIdx=t,t&&void 0!==w.dataIdx?Vc({u:e,tooltipIdx:w,metrics:i,series:n,tooltip:D,tooltipOffset:x,unit:u}):D.style.display="none")}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");C({u:e,min:t,max:n})}]}}),N=function(e){if(g){switch(e){case Lc.xRange:g.scales.x.range=A;break;case Lc.yRange:Object.keys(a.limits.range).forEach((function(e){g.scales[e]&&(g.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return S(t,n,r,e)})}));break;case Lc.data:g.setData(t)}d||g.redraw()}};return te((function(){return m({min:o.start,max:o.end})}),[o]),te((function(){if(s.current){var e=new Bc(F,t,s.current);return _(e),m({min:o.start,max:o.end}),e.destroy}}),[s.current,n,b]),te((function(){return window.addEventListener("keydown",E),function(){window.removeEventListener("keydown",E)}}),[v]),te((function(){return N(Lc.data)}),[t]),te((function(){return N(Lc.xRange)}),[v]),te((function(){return N(Lc.yRange)}),[a]),fr("div",{className:Fi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:fr("div",{ref:s})})};function Gc(){Gc=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(S){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==St(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Zc(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function Jc(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Zc(o,r,i,a,u,"next",e)}function u(e){Zc(o,r,i,a,u,"throw",e)}a(void 0)}))}}var Kc=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=Jc(Gc().mark((function e(t,n){return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Fi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:jc(t.label)}),"\xa0{",a.map((function(e){return fr(co,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},Xc=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(Kc,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function es(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ts=["__name__"],ns=function(e,t,n){var r=function(e,t){var n=e.metric,r=n.__name__,i=es(n,ts),o=t||r||"";return 0===Object.keys(e.metric).length?o||"Result ".concat(e.group):"".concat(o," {").concat(Object.entries(i).map((function(e){return"".concat(e[0],": ").concat(e[1])})).join(", "),"}")}(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Ic(i),show:!is(i,t),scale:"1",points:{size:4.2,width:1.4}}},rs=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},is=function(e,t){return t.includes("".concat(e))},os=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},as=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),A=E[0],S=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Uc(n),i=zc(n);return t[1]=Yc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=ns(n,A,h);o.push(r),i.push(rs(r,n.group));var a,u=t[n.group]||[],l=Io(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(os(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Io(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=ns(n,A,h);t.push(r),e.push(rs(r,n.group))})),w(t),C(e)}),[A]);var N=re(null);return fr("div",{className:Fi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(Qc,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(Xc,{labels:k,query:o,onChange:function(e,t){S(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=is(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:A,legend:e,metaKey:t,series:D}))}})]})},us=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,s=e.label,f=_t(X(-1),2),d=f[0],h=f[1],p=_t(X(!1),2),v=p[0],m=p[1],y=re(null),g=re(null),_=oe((function(){if(h(0),!v)return[];try{var e=new RegExp(String(t),"i");return l.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[v,l]),b=function(){m(!1)},D=function(e){return function(){n(e),b()}};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;m(a&&t.length>2&&e<=1)}),[a,t]),te((function(){if(g.current){var e=g.current.childNodes[d];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}),[d]),uo(y,(function(){return m(!1)}),g),fr("div",{className:"vm-query-editor",ref:y,children:[fr(Eo,{value:t,label:s,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,a=e.ctrlKey,u=e.metaKey,l=e.shiftKey,c=a||u,s="ArrowUp"===t,f="ArrowDown"===t,p="Enter"===t,y=v&&_.length,g=s||f;(g&&y||g&&c||p&&y)&&e.preventDefault(),s&&y&&!c?h((function(e){return 0===e?0:e-1})):s&&c&&i(),f&&y&&!c?h((function(e){return e>=_.length-1?_.length-1:e+1})):f&&c&&o(),p&&y&&!l&&!c?(n(_[d]),m(!1)):p&&!l&&r()},onChange:n}),fr(lo,{open:v,buttonRef:y,placement:"bottom-left",onClose:b,children:fr("div",{className:"vm-query-editor-autocomplete",ref:g,children:_.map((function(e,t){return fr("div",{className:Fi()({"vm-list__item":!0,"vm-list__item_active":t===d}),id:"$autocomplete$".concat(e),onClick:D(e),children:e},e)}))})})]})},ls=n(936),cs=n.n(ls),ss=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(cs()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(Eo,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(co,{title:"Reset step to default",children:fr(ao,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},fs=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(cs()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(Eo,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(co,{title:"Define tenant id if you need request to another storage",children:fr(ao,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ds=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Fi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},hs=function(){var e=Vi(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=ji(),o=i.nocache,a=i.isTracingEnabled,u=zi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ds,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ds,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ds,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(ss,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(fs,{})})]})};var ps=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},vs=function(e){var t=e.error,n=e.queryOptions,r=ni(),i=r.query,o=r.queryHistory,a=r.autocomplete,u=ri(),l=Qr(),c=_t(X(i||[]),2),s=c[0],f=c[1],d=ps(s),h=function(){u({type:"SET_QUERY_HISTORY",payload:s.map((function(e,t){var n=o[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),u({type:"SET_QUERY",payload:s}),l({type:"RUN_QUERY"})},p=function(e,t){f((function(n){return n.map((function(n,r){return r===t?e:n}))}))},v=function(e,t){return function(){!function(e,t){var n=o[t],r=n.index,i=n.values,a=r+e;a<0||a>=i.length||(p(i[a]||"",t),u({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:a},queryNumber:t}}))}(e,t)}},m=function(e){return function(t){p(t,e)}},y=function(e){return function(){var t;t=e,f((function(e){return e.filter((function(e,n){return n!==t}))}))}};return te((function(){d&&s.length1&&fr(co,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ao,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:y(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(hs,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[s.length<4&&fr(ao,{variant:"outlined",onClick:function(){f((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ao,{variant:"contained",onClick:h,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function ms(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new ys(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function ys(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return ys=function(e){this.s=e,this.n=e.next},ys.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new ys(e)}var gs=0,_s=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.tracingChildren=void 0,this.query=void 0,this.id=void 0,this.tracing=t,this.query=n,this.id=gs++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}}]),e}(),bs=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=ni().query,a=Wr().period,u=ji(),l=u.displayType,c=u.nocache,s=u.isTracingEnabled,f=hr().serverUrl,d=_t(X(!1),2),h=d[0],p=d[1],v=_t(X(),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],A=_t(X(),2),S=A[0],F=A[1],N=_t(X([]),2),O=N[0],T=N[1];te((function(){C&&(y(void 0),b(void 0),x(void 0))}),[C]);var B=function(){var e=Jc(Gc().mark((function e(t,n,r,i){var o,a,u,l,c,s;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,T([].concat(bt(n),[o])),e.prev=2,e.delegateYield(Gc().mark((function e(){var n,f,d,h,p,v,m,g,_,D,w,k;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="chart"===r,f=or[r],d=[],h=[],p=1,v=0,a=!1,u=!1,e.prev=8,c=ms(t);case 10:return e.next=12,c.next();case 12:if(!(a=!(s=e.sent).done)){e.next=24;break}return m=s.value,e.next=16,fetch(m,{signal:o.signal});case 16:return g=e.sent,e.next=19,g.json();case 19:_=e.sent,g.ok?(E(void 0),_.trace&&(D=new _s(_.trace,i[p-1]),h.push(D)),w=f-d.length,_.data.result.slice(0,w).forEach((function(e){e.group=p,d.push(e)})),v+=_.data.result.length,p++):E("".concat(_.errorType,"\r\n").concat(null===_||void 0===_?void 0:_.error));case 21:a=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),u=!0,l=e.t0;case 30:if(e.prev=30,e.prev=31,!a||null==c.return){e.next=35;break}return e.next=35,c.return();case 35:if(e.prev=35,!u){e.next=38;break}throw l;case 38:return e.finish(35);case 39:return e.finish(30);case 40:k="Showing ".concat(f," series out of ").concat(v," series due to performance reasons. Please narrow down the query, so it returns less series"),F(v>f?k:""),n?y(d):b(d),x(h);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",4);case 4:e.next=9;break;case 6:e.prev=6,e.t1=e.catch(2),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&E("".concat(e.t1.name,": ").concat(e.t1.message));case 9:p(!1);case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(t,n,r,i){return e.apply(this,arguments)}}(),M=ae(cs()(B,800),[]),L=oe((function(){var e=null!==t&&void 0!==t?t:o,n="chart"===(r||l);if(a)if(f)if(e.every((function(e){return!e.trim()})))E(_o.validQuery);else{if(Ao(f)){var u=Kn({},a);return u.step=i,e.filter((function(e){return e.trim()})).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(f,e,u,c,s):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(f,e,u,s)}))}E(_o.validServer)}else E(_o.emptyServer)}),[f,a,l,i]);return te((function(){n&&null!==L&&void 0!==L&&L.length&&(p(!0),M(L,O,r||l,null!==t&&void 0!==t?t:o))}),[L,n]),te((function(){var e=O.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),T(O.filter((function(e){return!e.signal.aborted}))))}),[O]),{fetchUrl:L,isLoading:h,graphData:m,liveData:_,error:C,warning:S,traces:w}},Ds=function(e){var t=e.data,n=ue(io).showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ao,{variant:"outlined",fullWidth:!1,onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},ws=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(cs()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ds,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(Eo,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(Eo,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},xs="Axes settings",ks=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);uo(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(co,{title:xs,children:fr("div",{ref:l,children:fr(ao,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(lo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:xs}),fr(ao,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(ws,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Cs=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Es=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=Jc(Gc().mark((function t(){var n,i,o;return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},As=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},Ss=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Fi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(As,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Fs=function(e){var t=e.traces,n=e.onDeleteClick;if(!t.length)return fr(ro,{variant:"info",children:"Please re-run the query to see results of the tracing"});return fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(co,{title:"Remove trace",children:fr(ao,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:(t=e,function(){n(t)})})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr(Ss,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))})},Ns=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Os=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Fi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Ai,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Ts="Display columns",Bs=function(e){var t=e.data,n=e.defaultColumns,r=e.onChange,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=Ns(t),c=oe((function(){return!l.length}),[l]),s=_t(X(l.map((function(e){return e.key}))),2),f=s[0],d=s[1],h=function(){u(!1),d(n||l.map((function(e){return e.key})))},p=function(e){return function(){!function(e){d((function(t){return f.includes(e)?t.filter((function(t){return t!==e})):[].concat(bt(t),[e])}))}(e)}};return te((function(){d(l.map((function(e){return e.key})))}),[l]),fr("div",{className:"vm-table-settings",children:[fr(co,{title:Ts,children:fr("div",{ref:i,children:fr(ao,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))},disabled:c})})}),fr(lo,{open:a,onClose:h,placement:"bottom-right",buttonRef:i,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Ts}),fr(ao,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:l.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Os,{checked:f.includes(e.key),onChange:p(e.key),label:e.key})},e.key)}))}),fr("div",{className:"vm-table-settings-popper__footer",children:[fr(ao,{color:"error",variant:"outlined",size:"small",onClick:function(){u(!1);var e=l.map((function(e){return e.key}));d(e),r(e)},children:"Reset"}),fr(ao,{variant:"contained",size:"small",onClick:function(){u(!1),r(f)},children:"apply"})]})]})})]})};function Ms(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var Ls=function(e){var t=e.data,n=e.displayColumns,r=Ns(t,n),i=_t(X(""),2),o=i[0],a=i[1],u=_t(X("asc"),2),l=u[0],c=u[1],s=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:r.map((function(t){return e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-"}})),n="Value"===o,i=r.findIndex((function(e){return e.key===o}));return n||-1!==i?e.sort((function(e,t){var r=n?Number(e.value):e.metadata[i],o=n?Number(t.value):t.metadata[i];return("asc"===l?ro)?-1:1})):e}),[r,t,o,l]),f=function(e){return function(){d(e)}},d=function(e){c((function(t){return"asc"===t&&o===e?"desc":"asc"})),a(e)};return s.length?fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:f(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":o===e.key,"vm-table__sort-icon_desc":"desc"===l&&o===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:f("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===o,"vm-table__sort-icon_desc":"desc"===l}),children:fr(vi,{})}),"Value"]})})]})}),fr("tbody",{className:"vm-table-body",children:s.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Fi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":s[t-1]&&s[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value})]},t)}))})]}):fr(ro,{variant:"warning",children:"No data to show"})},Ps=function(){var e=ji(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=ji().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Bi.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Ms(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=ue(Yi).state,h=d.customStep,p=d.yaxis,v=Vi(),m=function(e){v({type:"SET_YAXIS_LIMITS",payload:e})},y=Es().queryOptions,g=bs({visible:!0,customStep:h}),_=g.isLoading,b=g.liveData,D=g.graphData,w=g.error,x=g.warning,k=g.traces;return te((function(){k&&f([].concat(bt(s),bt(k)))}),[k]),te((function(){f([])}),[t]),fr("div",{className:"vm-custom-panel",children:[fr(vs,{error:w,queryOptions:y}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(Fs,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),w&&fr(ro,{variant:"error",children:w}),x&&fr(ro,{variant:"warning",children:x}),fr("div",{className:"vm-custom-panel-body vm-block",children:[_&&fr(Cs,{}),fr("div",{className:"vm-custom-panel-body-header",children:[fr(Mi,{}),"chart"===t&&fr(ks,{yaxis:p,setYaxisLimits:m,toggleEnableLimits:function(){v({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Bs,{data:b||[],defaultColumns:u,onChange:l})]}),D&&i&&"chart"===t&&fr(as,{data:D,period:i,customStep:h,query:r,yaxis:p,setYaxisLimits:m,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),b&&"code"===t&&fr(Ds,{data:b}),b&&"table"===t&&fr(Ls,{data:b,displayColumns:u})]})]})},$s=function(){var e=Jc(Gc().mark((function e(t){var n,r;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Rs=Jc(Gc().mark((function e(){var t;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=Jc(Gc().mark((function e(t){return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",$s(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Is(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var js={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var zs=/[&<>"']/,Us=/[&<>"']/g,Hs=/[<>"']|&(?!#?\w+;)/,Ys=/[<>"']|&(?!#?\w+;)/g,Vs={"&":"&","<":"<",">":">",'"':""","'":"'"},qs=function(e){return Vs[e]};function Ws(e,t){if(t){if(zs.test(e))return e.replace(Us,qs)}else if(Hs.test(e))return e.replace(Ys,qs);return e}var Qs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Gs(e){return e.replace(Qs,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var Zs=/(^|[^\[])\^/g;function Js(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(Zs,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var Ks=/[^\w:]/g,Xs=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ef(e,t,n){if(e){var r;try{r=decodeURIComponent(Gs(n)).replace(Ks,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!Xs.test(n)&&(n=function(e,t){tf[" "+e]||(nf.test(e)?tf[" "+e]=e+"/":tf[" "+e]=cf(e,"/",!0));var n=-1===(e=tf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(rf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(of,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var tf={},nf=/^[^:]+:\/*[^/]*$/,rf=/^([^:]+:)[\s\S]*$/,of=/^([^:]+:\/*[^/]*)[\s\S]*$/;var af={exec:function(){}};function uf(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function df(e,t,n,r){var i=t.href,o=t.title?Ws(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:Ws(a)}}var hf=function(){function e(t){Dt(this,e),this.options=t||js}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:cf(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=cf(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):Ws(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:lf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ws(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=cf(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),df(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return df(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=Ws(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=Ws(this.options.mangle?t(i[1]):i[1])):n=Ws(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=Ws(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=Ws(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Ws(r[0]):r[0]:Ws(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),pf={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:af,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};pf.def=Js(pf.def).replace("label",pf._label).replace("title",pf._title).getRegex(),pf.bullet=/(?:[*+-]|\d{1,9}[.)])/,pf.listItemStart=Js(/^( *)(bull) */).replace("bull",pf.bullet).getRegex(),pf.list=Js(pf.list).replace(/bull/g,pf.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pf.def.source+")").getRegex(),pf._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pf._comment=/|$)/,pf.html=Js(pf.html,"i").replace("comment",pf._comment).replace("tag",pf._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pf.paragraph=Js(pf._paragraph).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pf._tag).getRegex(),pf.blockquote=Js(pf.blockquote).replace("paragraph",pf.paragraph).getRegex(),pf.normal=uf({},pf),pf.gfm=uf({},pf.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pf.gfm.table=Js(pf.gfm.table).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pf._tag).getRegex(),pf.gfm.paragraph=Js(pf._paragraph).replace("hr",pf.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",pf.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pf._tag).getRegex(),pf.pedantic=uf({},pf.normal,{html:Js("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",pf._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:af,paragraph:Js(pf.normal._paragraph).replace("hr",pf.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",pf.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var vf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:af,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:af,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}vf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",vf.punctuation=Js(vf.punctuation).replace(/punctuation/g,vf._punctuation).getRegex(),vf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,vf._comment=Js(pf._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vf.emStrong.lDelim=Js(vf.emStrong.lDelim).replace(/punct/g,vf._punctuation).getRegex(),vf.emStrong.rDelimAst=Js(vf.emStrong.rDelimAst,"g").replace(/punct/g,vf._punctuation).getRegex(),vf.emStrong.rDelimUnd=Js(vf.emStrong.rDelimUnd,"g").replace(/punct/g,vf._punctuation).getRegex(),vf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vf._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,vf.autolink=Js(vf.autolink).replace("scheme",vf._scheme).replace("email",vf._email).getRegex(),vf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vf.tag=Js(vf.tag).replace("comment",vf._comment).replace("attribute",vf._attribute).getRegex(),vf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vf.link=Js(vf.link).replace("label",vf._label).replace("href",vf._href).replace("title",vf._title).getRegex(),vf.reflink=Js(vf.reflink).replace("label",vf._label).replace("ref",pf._label).getRegex(),vf.nolink=Js(vf.nolink).replace("ref",pf._label).getRegex(),vf.reflinkSearch=Js(vf.reflinkSearch,"g").replace("reflink",vf.reflink).replace("nolink",vf.nolink).getRegex(),vf.normal=uf({},vf),vf.pedantic=uf({},vf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Js(/^!?\[(label)\]\((.*?)\)/).replace("label",vf._label).getRegex(),reflink:Js(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vf._label).getRegex()}),vf.gfm=uf({},vf.normal,{escape:Js(vf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)}))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),!(n=a[a.length-1])||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),!(n=a[a.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else if(r=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],i&&"paragraph"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),i=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),(n=a[a.length-1])&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+ff("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+ff("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)}))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),(n=l[l.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),(n=l[l.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e,yf))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,yf))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,mf))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:pf,inline:vf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),_f=function(){function e(t){Dt(this,e),this.options=t||js}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:Ws(e,!0))+"
\n":"
"+(n?e:Ws(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"
\n".concat(e,"
\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
\n":"
\n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=ef(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"}},{key:"image",value:function(e,t,n){if(null===(e=ef(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),bf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Df=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),wf=function(){function e(t){Dt(this,e),this.options=t||js,this.options.renderer=this.options.renderer||new _f,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new bf,this.slugger=new Df}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+Ws(e.message+"",!0)+"
    ";throw e}try{var l=gf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(xf.walkTokens(l,t.walkTokens)).then((function(){return wf.parse(l,t)})).catch(u);xf.walkTokens(l,t.walkTokens)}return wf.parse(l,t)}catch(c){u(c)}}xf.options=xf.setOptions=function(e){var t;return uf(xf.defaults,e),t=xf.defaults,js=t,xf},xf.getDefaults=Is,xf.defaults=js,xf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+Ws(c.message+"",!0)+"
    ";throw c}},xf.Parser=wf,xf.parser=wf.parse,xf.Renderer=_f,xf.TextRenderer=bf,xf.Lexer=gf,xf.lexer=gf.lex,xf.Tokenizer=hf,xf.Slugger=Df,xf.parse=xf;xf.options,xf.setOptions,xf.use,xf.walkTokens,xf.parseInline,wf.parse,gf.lex;var kf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=bs({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,A=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(ro,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var S=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:xf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(co,{title:fr(S,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(ss,{defaultStep:l.step,setStep:y})}),fr(ks,{yaxis:_,setYaxisLimits:A,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Cs,{}),C&&fr(ro,{variant:"error",children:C}),E&&fr(ro,{variant:"warning",children:E}),k&&fr(as,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},Cf=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},Ef=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=po(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(Cf,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Fi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(kf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(ro,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Af=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Ms((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Rs().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(ro,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Ti,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr(Ef,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(ro,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},Sf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},Ff=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Nf,seriesCountByLabelName:Of,seriesCountByFocusLabelValue:Tf,seriesCountByLabelValuePair:Bf,labelValueCountByLabelName:Mf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Nf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Of=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Tf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Bf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Mf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],Lf={seriesCountByMetricName:function(e,t){return Pf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Pf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Pf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Pf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},$f=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Es().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(us,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Eo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(Eo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ds,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ao,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Rf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Fi()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function If(e,t,n){return t[n]e[n]?1:0}function jf(e,t){return"desc"===e?function(e,n){return If(e,n,t)}:function(e,n){return-If(e,n,t)}}function zf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var Uf=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=zf(t,jf(a,c));return fr("table",{className:"vm-table",children:[fr(Rf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Fi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},Hf=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(As,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(co,{title:"Filter by ".concat(t.name),children:fr(ao,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},Yf=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=po(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new Bc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},Vf=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},qf=1,Wf=function(e,t,n,r){return Vf(t+e*(n+r),6)},Qf=function(e,t,n,r,i){var o=1-t,a=n===qf?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===qf?0:2===n?a/2:3===n?a:0,l=t/e,c=Vf(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function Zf(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var Jf={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new Zf(t+r,n,r,i,o),new Zf(t,n,r,i,o),new Zf(t,n+i,r,i,o),new Zf(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,Bc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new Zf(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return Qf(e,n,p,null,(function(e,n,i){Qf(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&Bc.assign(e,{paths:g,points:{show:_}})}))}}}((Kf=[1],Xf=0,ed=1,td=0,nd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:Kf,ori:Xf,dir:ed,radius:td,disp:nd}))]},id=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Ti,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(Uf,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(Hf,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(Yf,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:rd})]})]})},od=function(){var e=Gi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=Zi();!function(){var e=Gi(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Ms({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new Ff,t=Gi(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=Jc(Gc().mark((function t(n){var r,i,o,a;return Gc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=Sf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Cs,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr($f,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(ro,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(id,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=Lf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},ad=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return zf(t,jf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Fi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},ud=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),ld=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Ti,{activeItem:String(a),items:ud,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(ad,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Ds,{data:t})]})]})},cd=function(){var e=function(){var e=hr().serverUrl,t=to(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=Jc(Gc().mark((function e(){var t,n;return Gc().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=to(),o=i.topN,a=i.maxLifetime,u=ue(eo).dispatch;!function(){var e=to(),t=e.topN,n=e.maxLifetime,r=function(){var e=Ms({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?$c(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Cs,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(Eo,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(Eo,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(co,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(co,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ao,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(ro,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(ld,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(ld,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(ld,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},sd=["primary","secondary","error","warning","info","success"],fd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){sd.forEach((function(e){var t=function(e){var t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"}(Ni("color-".concat(e)));Oi("".concat(e,"-text"),t)}))};return te((function(){sd.forEach((function(e){var t=r[e];t&&Oi("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Oi("scrollbar-width","".concat(t-i,"px")),Oi("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},dd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Cs,{}),fr(fd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(oo,{children:fr(jn,{children:fr(Rn,{path:"/",element:fr(Ro,{}),children:[fr(Rn,{path:Zn.home,element:fr(Ps,{})}),fr(Rn,{path:Zn.dashboards,element:fr(Af,{})}),fr(Rn,{path:Zn.cardinality,element:fr(od,{})}),fr(Rn,{path:Zn.topQueries,element:fr(cd,{})})]})})})})})},hd=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},pd=document.getElementById("root");pd&&Ye(fr(dd,{}),pd),hd()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.e18cda26.js b/app/vmselect/vmui/static/js/main.e18cda26.js new file mode 100644 index 000000000..6c631acf0 --- /dev/null +++ b/app/vmselect/vmui/static/js/main.e18cda26.js @@ -0,0 +1,2 @@ +/*! For license information please see main.e18cda26.js.LICENSE.txt */ +!function(){var e={680:function(e,t,n){"use strict";var r=n(476),i=n(962),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},962:function(e,t,n){"use strict";var r=n(199),i=n(476),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(a,o),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),s=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(d){c=null}e.exports=function(e){var t=u(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+s(0,e.length-(arguments.length-1))})}return t};var f=function(){return u(r,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},123:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()1)return e(a[0])}else{var u=t.name;b[u]=t,i=u}return!r&&i&&(_=i),i||!r&&_},x=function(e,t){if(D(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new C(n)},k=g;k.l=w,k.i=D,k.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var i=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return k},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=x(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return x(e)1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=A("%"+r+"%",t),u=o.name,c=o.value,s=!1,f=o.alias;f&&(r=f[0],D(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var g=l(c,p);c=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:c[p]}else h=_(c,p),c=c[p];h&&!s&&(v[u]=c)}}return c}},520:function(e,t,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(541);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},541:function(e){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},838:function(e,t,n){"use strict";var r=n(199);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},936:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,h=Math.min,p=function(){return s.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||a.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,u,l,c=0,s=!1,f=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function _(e){return c=e,u=setTimeout(D,t),s?g(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=o}function D(){var e=p();if(b(e))return w(e);u=setTimeout(D,function(e){var n=t-(e-l);return f?h(n,o-(e-c)):n}(e))}function w(e){return u=void 0,y&&r?g(e):(r=i=void 0,a)}function x(){var e=p(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return _(l);if(f)return u=setTimeout(D,t),g(l)}return void 0===u&&(u=setTimeout(D,t)),a}return t=m(t)||0,v(n)&&(s=!!n.leading,o=(f="maxWait"in n)?d(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=l=i=u=void 0},x.flush=function(){return void 0===u?a:w(p())},x}},7:function(e,t,n){var r="__lodash_hash_undefined__",i="[object Function]",o="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=d||h||Function("return this")();var v=Array.prototype,m=Function.prototype,y=Object.prototype,g=p["__core-js_shared__"],_=function(){var e=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),b=m.toString,D=y.hasOwnProperty,w=y.toString,x=RegExp("^"+b.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p.Symbol,C=v.splice,E=I(p,"Map"),S=I(Object,"create"),A=k?k.prototype:void 0,F=A?A.toString:void 0;function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=B(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new N,map:new(E||O),string:new N}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this};var $=j((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return F?F.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(s,"$1"):t||e)})),n}));function R(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function j(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(j.Cache||T),n}j.Cache=T;var z=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:M(e,t);return void 0===r?n:r}},61:function(e,t,n){var r="Expected a function",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,f=c||s||Function("return this")(),d=Object.prototype.toString,h=Math.max,p=Math.min,v=function(){return f.Date.now()};function m(e,t,n){var i,o,a,u,l,c,s=0,f=!1,d=!1,m=!0;if("function"!=typeof e)throw new TypeError(r);function _(t){var n=i,r=o;return i=o=void 0,s=t,u=e.apply(r,n)}function b(e){return s=e,l=setTimeout(w,t),f?_(e):u}function D(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-s>=a}function w(){var e=v();if(D(e))return x(e);l=setTimeout(w,function(e){var n=t-(e-c);return d?p(n,a-(e-s)):n}(e))}function x(e){return l=void 0,m&&i?_(e):(i=o=void 0,u)}function k(){var e=v(),n=D(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return b(c);if(d)return l=setTimeout(w,t),_(c)}return void 0===l&&(l=setTimeout(w,t)),u}return t=g(t)||0,y(n)&&(f=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,m="trailing"in n?!!n.trailing:m),k.cancel=function(){void 0!==l&&clearTimeout(l),s=0,i=c=o=l=void 0},k.flush=function(){return void 0===l?u:x(v())},k}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),m(e,t,{leading:i,maxWait:t,trailing:o})}},154:function(e,t,n){var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,u="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=u&&l&&"function"===typeof l.get?l.get:null,s=u&&Set.prototype.forEach,f="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,v=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,g=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,D=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,S="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,F="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===N||"symbol")?Symbol.toStringTag:null,T=Object.prototype.propertyIsEnumerable,B=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var i=String(r),o=g.call(t,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var L=n(654),P=L.custom,I=U(P)?P:null;function $(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function R(e){return _.call(String(e),/"/g,""")}function j(e){return"[object Array]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===V(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(N)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!F)return!1;try{return F.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var u=n||{};if(Y(u,"quoteStyle")&&"single"!==u.quoteStyle&&"double"!==u.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Y(u,"maxStringLength")&&("number"===typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!Y(u,"customInspect")||u.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Y(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Y(u,"numericSeparator")&&"boolean"!==typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,u);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var b=String(t);return v?M(t,b):b}if("bigint"===typeof t){var w=String(t)+"n";return v?M(t,w):w}var E="undefined"===typeof u.depth?5:u.depth;if("undefined"===typeof r&&(r=0),r>=E&&E>0&&"object"===typeof t)return j(t)?"[Array]":"[Object]";var A=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(u,r);if("undefined"===typeof i)i=[];else if(q(i,t)>=0)return"[Circular]";function P(t,n,o){if(n&&(i=C.call(i)).push(n),o){var a={depth:u.depth};return Y(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),e(t,a,r+1,i)}return e(t,u,r+1,i)}if("function"===typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=X(t,P);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(U(t)){var ee=N?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(t);return"object"!==typeof t||N?ee:G(ee)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var te="<"+D.call(String(t.nodeName)),ne=t.attributes||[],re=0;re"}if(j(t)){if(0===t.length)return"[]";var ie=X(t,P);return A&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,A)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return"[object Error]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var oe=X(t,P);return"cause"in Error.prototype||!("cause"in t)||T.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+P(t.cause),oe),", ")+" }"}if("object"===typeof t&&l){if(I&&"function"===typeof t[I]&&L)return L(t,{depth:E-r});if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(te){return!0}return e instanceof Map}catch(t){}return!1}(t)){var ae=[];return a.call(t,(function(e,n){ae.push(P(n,t,!0)+" => "+P(e,t))})),Z("Map",o.call(t),ae,A)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ue=[];return s.call(t,(function(e){ue.push(P(e,t))})),Z("Set",c.call(t),ue,A)}if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(te){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(te){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return J("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return J("WeakRef");if(function(e){return"[object Number]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(Number(t)));if(function(e){if(!e||"object"!==typeof e||!S)return!1;try{return S.call(e),!0}catch(t){}return!1}(t))return G(P(S.call(t)));if(function(e){return"[object Boolean]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(p.call(t));if(function(e){return"[object String]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t))return G(P(String(t)));if(!function(e){return"[object Date]"===V(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var le=X(t,P),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ce&&O&&Object(t)===t&&O in t?g.call(V(t),8,-1):se?"Object":"",de=(ce||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+k.call(x.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?de+"{}":A?de+"{"+K(le,A)+"}":de+"{ "+k.call(le,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function Y(e,t){return H.call(e,t)}function V(e){return v.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(g.call(e,0,t.maxStringLength),t)+r}return $(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function G(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?K(n,r):k.call(n,", "))+"}"}function K(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=u?o.slice(0,u.index):o,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var f=0;n.depth>0&&null!==(u=a.exec(o))&&f=0;--o){var a,u=e[o];if("[]"===u&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);n.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(s,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var s="string"===typeof e?function(e,t){var n,c={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=s.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,v)?c[v]=r.combine(c[v],m):c[v]=m}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(s),h=0;h0?C.join(",")||null:void 0}];else if(l(h))M=h;else{var P=Object.keys(C);M=m?P.sort(m):P}for(var I=a&&l(C)&&1===C.length?n+"[]":n,$=0;$0?D+b:""}},837:function(e,t,n){"use strict";var r=n(609),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),u=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===r.RFC1738&&(40===s||41===s)?l+=u.charAt(c):s<128?l+=a[s]:s<2048?l+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?l+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(c)),l+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r2&&(u.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return p(e,u,i,o,null)}function p(e,t,n,o,a){var u={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(u),u}function v(){return{current:null}}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function g(e,t){if(null==t)return e.__?g(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?p(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(v=w[d])||v&&y.key==v.key&&y.type===v.type)w[d]=void 0;else for(h=0;h2&&(u.children=arguments.length>3?t.call(arguments,2):r),p(e.type,u,i||e.key,o||e.ref,null)}function R(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}t=c.slice,r={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},i=0,y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},y.prototype.render=m,o=[],D.__r=0,u=0;var j,z,U,H,Y=0,V=[],q=[],W=r.__b,Q=r.__r,G=r.diffed,J=r.__c,Z=r.unmount;function K(e,t){r.__h&&r.__h(z,e,Y||t),Y=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:q}),n.__[e]}function X(e){return Y=1,ee(ye,e)}function ee(e,t,n){var r=K(j++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ye(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=!1;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,n))}}return r.__N||r.__}function te(e,t){var n=K(j++,3);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__H.__h.push(n))}function ne(e,t){var n=K(j++,4);!r.__s&&me(n.__H,t)&&(n.__=e,n.i=t,z.__h.push(n))}function re(e){return Y=5,oe((function(){return{current:e}}),[])}function ie(e,t,n){Y=6,ne((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function oe(e,t){var n=K(j++,7);return me(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Y=8,oe((function(){return e}),t)}function ue(e){var t=z.context[e.__c],n=K(j++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function le(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function ce(e){var t=K(j++,10),n=X();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function se(){var e=K(j++,11);if(!e.__){for(var t=z.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function fe(){for(var e;e=V.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(u){e.__H.__h=[],r.__e(u,e.__v)}}r.__b=function(e){z=null,W&&W(e)},r.__r=function(e){Q&&Q(e),j=0;var t=(z=e.__c).__H;t&&(U===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=q,e.__N=e.i=void 0}))):(t.__h.forEach(pe),t.__h.forEach(ve),t.__h=[])),U=z},r.diffed=function(e){G&&G(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==V.push(t)&&H===r.requestAnimationFrame||((H=r.requestAnimationFrame)||he)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==q&&(e.__=e.__V),e.i=void 0,e.__V=q}))),U=z=null},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(pe),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(i,e.__v)}})),J&&J(e,t)},r.unmount=function(e){Z&&Z(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{pe(e)}catch(e){t=e}})),n.__H=void 0,t&&r.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function he(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function pe(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ve(e){var t=z;e.__c=e.__(),z=t}function me(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ye(e,t){return"function"==typeof t?t(e):t}function ge(e,t){for(var n in t)e[n]=t[n];return e}function _e(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function be(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function De(e){this.props=e}function we(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:_e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,h(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(De.prototype=new y).isPureReactComponent=!0,De.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var ke="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ce(e){function t(t){var n=ge({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ke,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ee=function(e,t){return null==e?null:k(k(e).map(t))},Se={map:Ee,forEach:Ee,count:function(e){return e?k(e).length:0},only:function(e){var t=k(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:k},Ae=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);Ae(e,t,n,r)};var Fe=r.unmount;function Ne(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=ge({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ne(e,t,n)}))),e}function Oe(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Te(){this.__u=0,this.t=null,this.__b=null}function Be(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return h(n,i)}return i.displayName="Lazy",i.__f=!0,i}function Le(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Fe&&Fe(e)},(Te.prototype=new y).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Be(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oe(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Te.prototype.componentWillUnmount=function(){this.t=[]},Te.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ne(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&h(m,null,e.fallback);return i&&(i.__h=null),[h(m,null,t.__a?null:e.children),i]};var Pe=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),P(h(Ie,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Re(e,t){var n=h($e,{__v:e,i:t});return n.containerInfo=t,n}(Le.prototype=new y).__a=function(e){var t=this,n=Be(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Pe(t,e,r)):i()};n?n(o):o()}},Le.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Le.prototype.componentDidUpdate=Le.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Pe(e,n,t)}))};var je="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ue="undefined"!=typeof document,He=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),P(e,t),"function"==typeof n&&n(),e?e.__c:null}function Ve(e,t,n){return I(e,t),"function"==typeof n&&n(),e?e.__c:null}y.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(y.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var qe=r.event;function We(){}function Qe(){return this.cancelBubble}function Ge(){return this.defaultPrevented}r.event=function(e){return qe&&(e=qe(e)),e.persist=We,e.isPropagationStopped=Qe,e.isDefaultPrevented=Ge,e.nativeEvent=e};var Je,Ze={configurable:!0,get:function(){return this.class}},Ke=r.vnode;r.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var o in r={},n){var a=n[o];Ue&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==a||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===a?a="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!He(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&ze.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),r[o]&&(o="oninputCapture")),r[o]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=k(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=k(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ze.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ze))}e.$$typeof=je,Ke&&Ke(e)};var Xe=r.__r;r.__r=function(e){Xe&&Xe(e),Je=e.__c};var et={ReactCurrentDispatcher:{current:{readContext:function(e){return Je.__n[e.__c].props.value}}}},tt="17.0.2";function nt(e){return h.bind(null,e)}function rt(e){return!!e&&e.$$typeof===je}function it(e){return rt(e)?$.apply(null,arguments):e}function ot(e){return!!e.__k&&(P(null,e),!0)}function at(e){return e&&(e.base||1===e.nodeType&&e)||null}var ut=function(e,t){return e(t)},lt=function(e,t){return e(t)},ct=m;function st(e){e()}function ft(e){return e}function dt(){return[!1,st]}var ht=ne;function pt(e,t){var n=t(),r=X({h:{__:n,v:t}}),i=r[0].h,o=r[1];return ne((function(){i.__=n,i.v=t,be(i.__,t())||o({h:i})}),[e,n,t]),te((function(){return be(i.__,i.v())||o({h:i}),e((function(){be(i.__,i.v())||o({h:i})}))}),[e]),n}var vt,mt={useState:X,useId:se,useReducer:ee,useEffect:te,useLayoutEffect:ne,useInsertionEffect:ht,useTransition:dt,useDeferredValue:ft,useSyncExternalStore:pt,startTransition:st,useRef:re,useImperativeHandle:ie,useMemo:oe,useCallback:ae,useContext:ue,useDebugValue:le,version:"17.0.2",Children:Se,render:Ye,hydrate:Ve,unmountComponentAtNode:ot,createPortal:Re,createElement:h,createContext:R,createFactory:nt,cloneElement:it,createRef:v,Fragment:m,isValidElement:rt,findDOMNode:at,Component:y,PureComponent:De,memo:we,forwardRef:Ce,flushSync:lt,unstable_batchedUpdates:ut,StrictMode:ct,Suspense:Te,SuspenseList:Le,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:et};function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zt(e){var t="undefined"!==typeof window&&"undefined"!==typeof window.location&&"null"!==window.location.origin?window.location.origin:"unknown://unknown",n="string"===typeof e?e:Rt(e);return new URL(n,t)}function Ut(e,t,n,r){void 0===r&&(r={});var i=r,o=i.window,a=void 0===o?document.defaultView:o,u=i.v5Compat,l=void 0!==u&&u,c=a.history,s=vt.Pop,f=null;function d(){s=vt.Pop,f&&f({action:s,location:h.location})}var h={get action(){return s},get location(){return e(a,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Lt,d),f=e,function(){a.removeEventListener(Lt,d),f=null}},createHref:function(e){return t(a,e)},encodeLocation:function(e){var t=zt(Rt(e));return Bt({},e,{pathname:t.pathname,search:t.search,hash:t.hash})},push:function(e,t){s=vt.Push;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);try{c.pushState(i,"",o)}catch(u){a.location.assign(o)}l&&f&&f({action:s,location:h.location})},replace:function(e,t){s=vt.Replace;var r=$t(h.location,e,t);n&&n(r,e);var i=It(r),o=h.createHref(r);c.replaceState(i,"",o),l&&f&&f({action:s,location:h.location})},go:function(e){return c.go(e)}};return h}function Ht(e,t,n){void 0===n&&(n="/");var r=Zt(("string"===typeof t?jt(t):t).pathname||"/",n);if(null==r)return null;var i=Yt(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(i);for(var o=null,a=0;null==o&&a0&&(Kt(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),Yt(e.children,t,u,a)),(null!=e.path||e.index)&&t.push({path:a,score:Wt(a,e.index),routesMeta:u})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(Mt||(Mt={}));var Vt=/^:\w+$/,qt=function(e){return"*"===e};function Wt(e,t){var n=e.split("/"),r=n.length;return n.some(qt)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!qt(e)})).reduce((function(e,t){return e+(Vt.test(t)?3:""===t?1:10)}),r)}function Qt(e,t){for(var n=e.routesMeta,r={},i="/",o=[],a=0;a and the router will parse it for you.'}function tn(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function nn(e,t,n,r){var i;void 0===r&&(r=!1),"string"===typeof e?i=jt(e):(Kt(!(i=Bt({},e)).pathname||!i.pathname.includes("?"),en("?","pathname","search",i)),Kt(!i.pathname||!i.pathname.includes("#"),en("#","pathname","hash",i)),Kt(!i.search||!i.search.includes("#"),en("#","search","hash",i)));var o,a=""===e||""===i.pathname,u=a?"/":i.pathname;if(r||null==u)o=n;else{var l=t.length-1;if(u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),l-=1;i.pathname=c.join("/")}o=l>=0?t[l]:"/"}var s=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?jt(e):e,r=n.pathname,i=n.search,o=void 0===i?"":i,a=n.hash,u=void 0===a?"":a,l=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:l,search:an(o),hash:un(u)}}(i,o),f=u&&"/"!==u&&u.endsWith("/"),d=(a||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!f&&!d||(s.pathname+="/"),s}var rn=function(e){return e.join("/").replace(/\/\/+/g,"/")},on=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},an=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},un=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""};Error;var ln=xt((function e(t,n,r){Dt(this,e),this.status=t,this.statusText=n||"",this.data=r}));function cn(e){return e instanceof ln}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var sn=new Set(["POST","PUT","PATCH","DELETE"]);new Set(["GET","HEAD"].concat(bt(sn)));function fn(){return fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t")))}var Nn,On,Tn=function(e){Ct(n,e);var t=Nt(n);function n(e){var r;return Dt(this,n),(r=t.call(this,e)).state={location:e.location,error:e.error},r}return xt(n,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?h(kn.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),n}(y);function Bn(e){var t=e.routeContext,n=e.match,r=e.children,i=ue(gn);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),h(xn.Provider,{value:t},r)}function Mn(e,t,n){if(void 0===t&&(t=[]),null==e){if(null==n||!n.errors)return null;e=n.matches}var r=e,i=null==n?void 0:n.errors;if(null!=i){var o=r.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));o>=0||Kt(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((function(e,o,a){var u=o.route.id?null==i?void 0:i[o.route.id]:null,l=n?o.route.errorElement||h(Fn,null):null,c=function(){return h(Bn,{match:o,routeContext:{outlet:e,matches:t.concat(r.slice(0,a+1))}},u?l:void 0!==o.route.element?o.route.element:e)};return n&&(o.route.errorElement||0===a)?h(Tn,{location:n.location,component:l,error:u,children:c()}):c()}),null)}function Ln(e){var t=ue(bn);return t||Kt(!1),t}!function(e){e.UseRevalidator="useRevalidator"}(Nn||(Nn={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(On||(On={}));var Pn;function In(e){return function(e){var t=ue(xn).outlet;return t?h(An.Provider,{value:e},t):t}(e.context)}function $n(e){Kt(!1)}function Rn(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,u=void 0===a?vt.Pop:a,l=e.navigator,c=e.static,s=void 0!==c&&c;Cn()&&Kt(!1);var f=n.replace(/^\/*/,"/"),d=oe((function(){return{basename:f,navigator:l,static:s}}),[f,l,s]);"string"===typeof o&&(o=jt(o));var p=o,v=p.pathname,m=void 0===v?"/":v,y=p.search,g=void 0===y?"":y,_=p.hash,b=void 0===_?"":_,D=p.state,w=void 0===D?null:D,x=p.key,k=void 0===x?"default":x,C=oe((function(){var e=Zt(m,f);return null==e?null:{pathname:e,search:g,hash:b,state:w,key:k}}),[f,m,g,b,w,k]);return null==C?null:h(Dn.Provider,{value:d},h(wn.Provider,{children:i,value:{location:C,navigationType:u}}))}function jn(e){var t=e.children,n=e.location,r=ue(_n);return function(e,t){Cn()||Kt(!1);var n,r=ue(bn),i=ue(xn).matches,o=i[i.length-1],a=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/"),l=(o&&o.route,En());if(t){var c,s="string"===typeof t?jt(t):t;"/"===u||(null==(c=s.pathname)?void 0:c.startsWith(u))||Kt(!1),n=s}else n=l;var f=n.pathname||"/",d=Ht(e,{pathname:"/"===u?f:f.slice(u.length)||"/"}),p=Mn(d&&d.map((function(e){return Object.assign({},e,{params:Object.assign({},a,e.params),pathname:rn([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:rn([u,e.pathnameBase])})})),i,r||void 0);return t&&p?h(wn.Provider,{value:{location:fn({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:vt.Pop}},p):p}(r&&!t?r.router.routes:zn(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pn||(Pn={}));new Promise((function(){}));function zn(e,t){void 0===t&&(t=[]);var n=[];return Se.forEach(e,(function(e,r){if(rt(e))if(e.type!==m){e.type!==$n&&Kt(!1),e.props.index&&e.props.children&&Kt(!1);var i=[].concat(bt(t),[r]),o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=zn(e.props.children,i)),n.push(o)}else n.push.apply(n,zn(e.props.children,t))})),n}function Un(e){var t=e.basename,n=e.children,r=e.window,i=re();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),Ut((function(e,t){var n=jt(e.location.hash.substr(1)),r=n.pathname,i=void 0===r?"/":r,o=n.search,a=void 0===o?"":o,u=n.hash;return $t("",{pathname:i,search:a,hash:void 0===u?"":u},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){var n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){var i=e.location.href,o=i.indexOf("#");r=-1===o?i:i.slice(0,o)}return r+"#"+("string"===typeof t?t:Rt(t))}),(function(e,t){Pt("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:r,v5Compat:!0}));var o=i.current,a=_t(X({action:o.action,location:o.location}),2),u=a[0],l=a[1];return ne((function(){return o.listen(l)}),[o]),h(Rn,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})}var Hn,Yn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Hn||(Hn={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Yn||(Yn={}));var Vn;function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wn={home:"/",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace"},Qn={header:{timeSelector:!0,executionControls:!0}},Gn=(qn(Vn={},Wn.home,Qn),qn(Vn,Wn.dashboards,Qn),qn(Vn,Wn.cardinality,{header:{cardinalityDatePicker:!0}}),Vn),Jn=Wn;function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:window.location.search,r=nr().parse(n,{ignoreQueryPrefix:!0});return ir()(r,e,t||"")},lr={serverUrl:Xn().serverURL||window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),tenantId:Number(ur("g0.tenantID",0))};function cr(e,t){switch(t.type){case"SET_SERVER":return Kn(Kn({},e),{},{serverUrl:t.payload});case"SET_TENANT_ID":return Kn(Kn({},e),{},{tenantId:t.payload});default:throw new Error}}var sr=0;function fr(e,t,n,i,o){var a,u,l={};for(u in t)"ref"==u?a=t[u]:l[u]=t[u];var c={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--sr,__source:o,__self:i};if("function"==typeof e&&(a=e.defaultProps))for(u in a)void 0===l[u]&&(l[u]=a[u]);return r.vnode&&r.vnode(c),c}var dr=R({}),hr=function(){return ue(dr).state},pr=function(){return ue(dr).dispatch},vr=Object.entries(lr).reduce((function(e,t){var n=_t(t,2),r=n[0],i=n[1];return Kn(Kn({},e),{},qn({},r,ur(r)||i))}),{}),mr=n(658),yr=n.n(mr),gr=n(446),_r=n.n(gr),br=n(635),Dr=n.n(br),wr="YYYY-MM-DD",xr="YYYY-MM-DD HH:mm:ss",kr="YYYY-MM-DD[T]HH:mm:ss";yr().extend(_r()),yr().extend(Dr());var Cr,Er=window.innerWidth/4,Sr=1,Ar=1578e8,Fr=[{long:"days",short:"d",possible:"day"},{long:"weeks",short:"w",possible:"week"},{long:"months",short:"M",possible:"mon"},{long:"years",short:"y",possible:"year"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}].map((function(e){return e.short})),Nr=function(e){return Math.round(1e3*e)/1e3},Or=function(e){var t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Fr.includes(n[0]))return qn({},n[0],t[0])},Tr=function(e,t){var n=(t||new Date).valueOf()/1e3,r=e.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{}),i=yr().duration(r).asSeconds();return{start:n-i,end:n,step:Nr(i/Er)||.001,date:Br(t||new Date)}},Br=function(e){return yr()(e).utc().format(kr)},Mr=function(e){return yr()(e).format(kr)},Lr=function(e){var t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),i=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),a=["d","h","m","s","ms"],u=[o,i,r,n,t].map((function(e,t){return e?"".concat(e).concat(a[t]):""}));return u.filter((function(e){return e})).join(" ")},Pr=function(e){return new Date(1e3*e)},Ir=[{title:"Last 5 minutes",duration:"5m"},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!0},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:function(){return yr()().subtract(1,"day").endOf("day").toDate()}},{title:"Today",duration:"1d",until:function(){return yr()().endOf("day").toDate()}}].map((function(e){return Kn({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:function(){return yr()().toDate()}},e)})),$r=function(e){var t,n=e.relativeTimeId,r=e.defaultDuration,i=e.defaultEndInput,o=null===(t=Ir.find((function(e){return e.isDefault})))||void 0===t?void 0:t.id,a=n||ur("g0.relative_time",o),u=Ir.find((function(e){return e.id===a}));return{relativeTimeId:u?a:"none",duration:u?u.duration:r,endInput:u?u.until():i}},Rr=ur("g0.range_input"),jr=$r({defaultDuration:Rr||"1h",defaultEndInput:new Date((Cr=ur("g0.end_input",new Date(yr()().utc().format(kr))),yr()(Cr).utcOffset(0,!0).local().format(kr))),relativeTimeId:Rr?ur("g0.relative_time","none"):void 0}),zr=jr.duration,Ur=jr.endInput,Hr=jr.relativeTimeId,Yr={duration:zr,period:Tr(zr,Ur),relativeTime:Hr};function Vr(e,t){switch(t.type){case"SET_DURATION":return Kn(Kn({},e),{},{duration:t.payload,period:Tr(t.payload,Pr(e.period.end)),relativeTime:"none"});case"SET_RELATIVE_TIME":return Kn(Kn({},e),{},{duration:t.payload.duration,period:Tr(t.payload.duration,new Date(t.payload.until)),relativeTime:t.payload.id});case"SET_PERIOD":var n=function(e){var t=e.to.valueOf()-e.from.valueOf();return Lr(t)}(t.payload);return Kn(Kn({},e),{},{duration:n,period:Tr(n,t.payload.to),relativeTime:"none"});case"RUN_QUERY":var r=$r({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:Pr(e.period.end)}),i=r.duration,o=r.endInput;return Kn(Kn({},e),{},{period:Tr(i,o)});case"RUN_QUERY_TO_NOW":return Kn(Kn({},e),{},{period:Tr(e.duration)});default:throw new Error}}var qr=R({}),Wr=function(){return ue(qr).state},Qr=function(){return ue(qr).dispatch},Gr=function(e,t){t?window.localStorage.setItem(e,JSON.stringify({value:t})):Zr([e])},Jr=function(e){var t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(c){return t}},Zr=function(e){return e.forEach((function(e){return window.localStorage.removeItem(e)}))},Kr=function(){var e,t=(null===(e=window.location.search.match(/g\d+.expr/gim))||void 0===e?void 0:e.length)||1;return new Array(t>4?4:t).fill(1).map((function(e,t){return ur("g".concat(t,".expr"),"")}))}(),Xr={query:Kr,queryHistory:Kr.map((function(e){return{index:0,values:[e]}})),autocomplete:Jr("AUTOCOMPLETE")||!1};function ei(e,t){switch(t.type){case"SET_QUERY":return Kn(Kn({},e),{},{query:t.payload.map((function(e){return e}))});case"SET_QUERY_HISTORY":return Kn(Kn({},e),{},{queryHistory:t.payload});case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),Kn(Kn({},e),{},{queryHistory:e.queryHistory});case"TOGGLE_AUTOCOMPLETE":return Gr("AUTOCOMPLETE",!e.autocomplete),Kn(Kn({},e),{},{autocomplete:!e.autocomplete});default:throw new Error}}var ti=R({}),ni=function(){return ue(ti).state},ri=function(){return ue(ti).dispatch},ii=function(){return fr("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:[fr("path",{d:"M6.11771 9.47563C6.4774 9.7554 6.91935 9.90875 7.37507 9.9119H7.42685C7.9076 9.90451 8.38836 9.71964 8.67681 9.46823C10.1856 8.18898 14.5568 4.18115 14.5568 4.18115C15.7254 3.09415 12.4637 2.00716 7.42685 1.99977H7.36768C2.33084 2.00716 -0.930893 3.09415 0.237711 4.18115C0.237711 4.18115 4.60888 8.18898 6.11771 9.47563ZM8.67681 11.6422C8.31807 11.9246 7.87603 12.0806 7.41945 12.0859H7.37507C6.91849 12.0806 6.47645 11.9246 6.11771 11.6422C5.08224 10.7549 1.38413 7.41995 0.00103198 6.14809V8.07806C0.00103198 8.2925 0.0823905 8.57349 0.222919 8.70659L0.293358 8.77097L0.293386 8.77099C1.33788 9.72556 4.83907 12.9253 6.11771 14.0159C6.47645 14.2983 6.91849 14.4543 7.37507 14.4595H7.41945C7.9076 14.4447 8.38096 14.2599 8.67681 14.0159C9.98594 12.9067 13.6249 9.57175 14.5642 8.70659C14.7121 8.57349 14.7861 8.2925 14.7861 8.07806V6.14809C12.7662 7.99781 10.7297 9.82926 8.67681 11.6422ZM7.41945 16.6261C7.87517 16.623 8.31712 16.4696 8.67681 16.1898C10.7298 14.3744 12.7663 12.5405 14.7861 10.6883V12.6257C14.7861 12.8327 14.7121 13.1137 14.5642 13.2468C13.6249 14.1194 9.98594 17.4469 8.67681 18.5561C8.38096 18.8075 7.9076 18.9924 7.41945 18.9998H7.37507C6.91935 18.9966 6.4774 18.8433 6.11771 18.5635C4.91431 17.5371 1.74223 14.6362 0.502336 13.5023C0.3934 13.4027 0.299379 13.3167 0.222919 13.2468C0.0823905 13.1137 0.00103198 12.8327 0.00103198 12.6257V10.6883C1.38413 11.9528 5.08224 15.2951 6.11771 16.1825C6.47645 16.4649 6.91849 16.6209 7.37507 16.6261H7.41945Z",fill:"currentColor"}),fr("path",{d:"M35 3.54L29.16 18H26.73L20.89 3.54H23.05C23.2833 3.54 23.4733 3.59667 23.62 3.71C23.7667 3.82333 23.8767 3.97 23.95 4.15L27.36 12.97C27.4733 13.2567 27.58 13.5733 27.68 13.92C27.7867 14.26 27.8867 14.6167 27.98 14.99C28.06 14.6167 28.1467 14.26 28.24 13.92C28.3333 13.5733 28.4367 13.2567 28.55 12.97L31.94 4.15C31.9933 3.99667 32.0967 3.85667 32.25 3.73C32.41 3.60333 32.6033 3.54 32.83 3.54H35ZM52.1767 3.54V18H49.8067V8.66C49.8067 8.28667 49.8267 7.88333 49.8667 7.45L45.4967 15.66C45.2901 16.0533 44.9734 16.25 44.5467 16.25H44.1667C43.7401 16.25 43.4234 16.0533 43.2167 15.66L38.7967 7.42C38.8167 7.64 38.8334 7.85667 38.8467 8.07C38.8601 8.28333 38.8667 8.48 38.8667 8.66V18H36.4967V3.54H38.5267C38.6467 3.54 38.7501 3.54333 38.8367 3.55C38.9234 3.55667 39.0001 3.57333 39.0667 3.6C39.1401 3.62667 39.2034 3.67 39.2567 3.73C39.3167 3.79 39.3734 3.87 39.4267 3.97L43.7567 12C43.8701 12.2133 43.9734 12.4333 44.0667 12.66C44.1667 12.8867 44.2634 13.12 44.3567 13.36C44.4501 13.1133 44.5467 12.8767 44.6467 12.65C44.7467 12.4167 44.8534 12.1933 44.9667 11.98L49.2367 3.97C49.2901 3.87 49.3467 3.79 49.4067 3.73C49.4667 3.67 49.5301 3.62667 49.5967 3.6C49.6701 3.57333 49.7501 3.55667 49.8367 3.55C49.9234 3.54333 50.0267 3.54 50.1467 3.54H52.1767ZM61.063 17.27C61.743 17.27 62.3496 17.1533 62.883 16.92C63.423 16.68 63.8796 16.35 64.253 15.93C64.6263 15.51 64.9096 15.0167 65.103 14.45C65.303 13.8767 65.403 13.26 65.403 12.6V3.85H66.423V12.6C66.423 13.38 66.2996 14.11 66.053 14.79C65.8063 15.4633 65.4496 16.0533 64.983 16.56C64.523 17.06 63.9596 17.4533 63.293 17.74C62.633 18.0267 61.8896 18.17 61.063 18.17C60.2363 18.17 59.4896 18.0267 58.823 17.74C58.163 17.4533 57.5996 17.06 57.133 16.56C56.673 16.0533 56.3196 15.4633 56.073 14.79C55.8263 14.11 55.703 13.38 55.703 12.6V3.85H56.733V12.59C56.733 13.25 56.8296 13.8667 57.023 14.44C57.223 15.0067 57.5063 15.5 57.873 15.92C58.2463 16.34 58.6996 16.67 59.233 16.91C59.773 17.15 60.383 17.27 61.063 17.27ZM71.4442 18H70.4142V3.85H71.4442V18Z",fill:"currentColor"})]})},oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})})},ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})})},ui=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})})},li=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})})},ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})})},si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})})},fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})})},hi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})})},pi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})})},vi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m7 10 5 5 5-5z"})})},mi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[fr("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),fr("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},yi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})})},gi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})})},_i=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})})},bi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8 5v14l11-7z"})})},Di=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})})},wi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})})},xi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})})},ki=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})})},Ci=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})})},Ei=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})},Si=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})})},Ai=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})})},Fi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})})},Ni=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})})},Oi=function(){return fr("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:fr("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})})},Ti=n(123),Bi=n.n(Ti),Mi=function(e){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(e))},Li=function(e,t){document.documentElement.style.setProperty("--".concat(e),t)},Pi=function(e){var t=e.activeItem,n=e.items,r=e.color,i=void 0===r?Mi("color-primary"):r,o=e.onChange,a=e.indicatorPlacement,u=void 0===a?"bottom":a,l=re(null),c=_t(X({left:0,width:0,bottom:0}),2),s=c[0],f=c[1];return te((function(){if(l.current){var e=l.current,t=e.offsetLeft,n=e.offsetWidth,r=e.offsetHeight;f({left:t,width:n,bottom:"top"===u?r-2:0})}}),[t,l,n]),fr("div",{className:"vm-tabs",children:[n.map((function(e){return fr("div",{className:Bi()(qn({"vm-tabs-item":!0,"vm-tabs-item_active":t===e.value},e.className||"",e.className)),ref:t===e.value?l:void 0,style:{color:i},onClick:(n=e.value,function(){o(n)}),children:[e.icon&&fr("div",{className:Bi()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!e.label}),children:e.icon}),e.label]},e.value);var n})),fr("div",{className:"vm-tabs__indicator",style:Kn(Kn({},s),{},{borderColor:i})})]})},Ii=[{value:"chart",icon:fr(wi,{}),label:"Graph",prometheusCode:0},{value:"code",icon:fr(ki,{}),label:"JSON",prometheusCode:3},{value:"table",icon:fr(xi,{}),label:"Table",prometheusCode:1}],$i=function(){var e=Vi().displayType,t=qi();return fr(Pi,{activeItem:e,items:Ii,onChange:function(n){var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Ri=ur("g0.tab",0),ji=Ii.find((function(e){return e.prometheusCode===+Ri||e.value===Ri})),zi=Jr("SERIES_LIMITS"),Ui={displayType:(null===ji||void 0===ji?void 0:ji.value)||"chart",nocache:!1,isTracingEnabled:!1,seriesLimits:zi?JSON.parse(Jr("SERIES_LIMITS")):or,tableCompact:Jr("TABLE_COMPACT")||!1};function Hi(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return Kn(Kn({},e),{},{displayType:t.payload});case"SET_SERIES_LIMITS":return Gr("SERIES_LIMITS",JSON.stringify(t.payload)),Kn(Kn({},e),{},{seriesLimits:t.payload});case"TOGGLE_QUERY_TRACING":return Kn(Kn({},e),{},{isTracingEnabled:!e.isTracingEnabled});case"TOGGLE_NO_CACHE":return Kn(Kn({},e),{},{nocache:!e.nocache});case"TOGGLE_TABLE_COMPACT":return Gr("TABLE_COMPACT",!e.tableCompact),Kn(Kn({},e),{},{tableCompact:!e.tableCompact});default:throw new Error}}var Yi=R({}),Vi=function(){return ue(Yi).state},qi=function(){return ue(Yi).dispatch},Wi={customStep:parseFloat(ur("g0.step_input","0")),yaxis:{limits:{enable:!1,range:{1:[0,0]}}}};function Qi(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{enable:!e.yaxis.limits.enable})})});case"SET_CUSTOM_STEP":return Kn(Kn({},e),{},{customStep:t.payload});case"SET_YAXIS_LIMITS":return Kn(Kn({},e),{},{yaxis:Kn(Kn({},e.yaxis),{},{limits:Kn(Kn({},e.yaxis.limits),{},{range:t.payload})})});default:throw new Error}}var Gi=R({}),Ji=function(){return ue(Gi).dispatch},Zi={runQuery:0,topN:ur("topN",10),date:ur("date",yr()(new Date).format(wr)),focusLabel:ur("focusLabel",""),match:ur("match",""),extraLabel:ur("extra_label","")};function Ki(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_DATE":return Kn(Kn({},e),{},{date:t.payload});case"SET_MATCH":return Kn(Kn({},e),{},{match:t.payload});case"SET_EXTRA_LABEL":return Kn(Kn({},e),{},{extraLabel:t.payload});case"SET_FOCUS_LABEL":return Kn(Kn({},e),{},{focusLabel:t.payload});case"RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var Xi=R({}),eo=function(){return ue(Xi).state},to=function(){return ue(Xi).dispatch},no={topN:ur("topN",null),maxLifetime:ur("maxLifetime",""),runQuery:0};function ro(e,t){switch(t.type){case"SET_TOP_N":return Kn(Kn({},e),{},{topN:t.payload});case"SET_MAX_LIFE_TIME":return Kn(Kn({},e),{},{maxLifetime:t.payload});case"SET_RUN_QUERY":return Kn(Kn({},e),{},{runQuery:e.runQuery+1});default:throw new Error}}var io,oo=R({}),ao=function(){return ue(oo).state},uo={success:fr(fi,{}),error:fr(si,{}),warning:fr(ci,{}),info:fr(li,{})},lo=function(e){var t=e.variant,n=e.children;return fr("div",{className:Bi()(qn({"vm-alert":!0},"vm-alert_".concat(t),t)),children:[fr("div",{className:"vm-alert__icon",children:uo[t||"info"]}),fr("div",{className:"vm-alert__content",children:n})]})},co=R({showInfoMessage:function(){}}),so=function(){return ue(co)},fo=function(){for(var e=arguments.length,t=new Array(e),n=0;nd,v=r.top-20<0,m=r.left+g.width+20>f,y=r.left-20<0;return h&&(r.top=t.top-g.height-u),v&&(r.top=t.height+t.top+u),m&&(r.left=t.right-g.width-l),y&&(r.left=t.left+l),r}),[n,i,p,t]);d&&po(b,(function(){return v(!1)}),n);var x=Bi()(qn({"vm-popper":!0,"vm-popper_open":p},"vm-popper_open_".concat(l),l));return fr(m,{children:p&&mt.createPortal(fr("div",{className:x,ref:b,style:w,children:t}),document.body)})},mo=function(e){var t=e.children,n=e.title,r=e.open,i=e.placement,o=void 0===i?"bottom-center":i,a=e.offset,u=void 0===a?{top:6,left:0}:a,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X({width:0,height:0}),2),d=f[0],h=f[1],p=re(null),v=re(null),y=function(){return s(!1)};te((function(){return window.addEventListener("scroll",y),function(){window.removeEventListener("scroll",y)}}),[]),te((function(){v.current&&c&&h({width:v.current.clientWidth,height:v.current.clientHeight})}),[c]);var g=oe((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(!t||!c)return{};var n=t.getBoundingClientRect(),r={top:0,left:0},i="bottom-right"===o||"top-right"===o,a="bottom-left"===o||"top-left"===o,l=null===o||void 0===o?void 0:o.includes("top"),s=(null===u||void 0===u?void 0:u.top)||0,f=(null===u||void 0===u?void 0:u.left)||0;r.left=n.left-(d.width-n.width)/2+f,r.top=n.height+n.top+s,i&&(r.left=n.right-d.width),a&&(r.left=n.left+f),l&&(r.top=n.top-d.height-s);var h=window,v=h.innerWidth,m=h.innerHeight,y=r.top+d.height+20>m,g=r.top-20<0,_=r.left+d.width+20>v,b=r.left-20<0;return y&&(r.top=n.top-d.height-s),g&&(r.top=n.height+n.top+s),_&&(r.left=n.right-d.width-f),b&&(r.left=n.left+f),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[p,o,c,d]),_=function(){"boolean"!==typeof r&&s(!0)},b=function(){s(!1)};return te((function(){"boolean"===typeof r&&s(r)}),[r]),te((function(){var e,t=null===p||void 0===p||null===(e=p.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",b),function(){t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",b)}}),[p]),fr(m,{children:[fr(m,{ref:p,children:t}),c&&mt.createPortal(fr("div",{className:"vm-tooltip",ref:v,style:g,children:n}),document.body)]})},yo=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],go=function(){var e=Qr(),t=er(),n=_t(X(!1),2),r=n[0],i=n[1],o=_t(X(yo[0]),2),a=o[0],u=o[1];te((function(){var t,n=a.seconds;return r?t=setInterval((function(){e({type:"RUN_QUERY"})}),1e3*n):u(yo[0]),function(){t&&clearInterval(t)}}),[a,r]);var l=_t(X(!1),2),c=l[0],s=l[1],f=re(null),d=function(e){return function(){!function(e){(r&&!e.seconds||!r&&e.seconds)&&i((function(e){return!e})),u(e),s(!1)}(e)}};return fr(m,{children:[fr("div",{className:"vm-execution-controls",children:fr("div",{className:Bi()({"vm-execution-controls-buttons":!0,"vm-header-button":!t}),children:[fr(mo,{title:"Refresh dashboard",children:fr(ho,{variant:"contained",color:"primary",onClick:function(){e({type:"RUN_QUERY"})},startIcon:fr(di,{})})}),fr(mo,{title:"Auto-refresh control",children:fr("div",{ref:f,children:fr(ho,{variant:"contained",color:"primary",fullWidth:!0,endIcon:fr("div",{className:Bi()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":c}),children:fr(hi,{})}),onClick:function(){s((function(e){return!e}))},children:a.title})})})]})}),fr(vo,{open:c,placement:"bottom-right",onClose:function(){s(!1)},buttonRef:f,children:fr("div",{className:"vm-execution-controls-list",children:yo.map((function(e){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":e.seconds===a.seconds}),onClick:d(e),children:e.title},e.seconds)}))})})]})},_o=function(e){var t=e.relativeTime,n=e.setDuration;return fr("div",{className:"vm-time-duration",children:Ir.map((function(e){var r,i=e.id,o=e.duration,a=e.until,u=e.title;return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":i===t}),onClick:(r={duration:o,until:a(),id:i},function(){n(r)}),children:u||o},i)}))})},bo=function(e){var t=_t(X({width:0,height:0}),2),n=t[0],r=t[1];return te((function(){var t=new ResizeObserver((function(e){var t=e[0].contentRect,n=t.width,i=t.height;r({width:n,height:i})}));return e&&t.observe(e),function(){e&&t.unobserve(e)}}),[]),n},Do=function(e){var t=e.viewDate,n=e.displayYears,r=e.onChangeViewDate;return fr("div",{className:"vm-calendar-header",children:[fr("div",{className:"vm-calendar-header-left",onClick:e.toggleDisplayYears,children:[fr("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),fr("div",{className:"vm-calendar-header-left__select-year",children:fr(vi,{})})]}),!n&&fr("div",{className:"vm-calendar-header-right",children:[fr("div",{className:"vm-calendar-header-right__prev",onClick:function(){r(t.subtract(1,"month"))},children:fr(hi,{})}),fr("div",{className:"vm-calendar-header-right__next",onClick:function(){r(t.add(1,"month"))},children:fr(hi,{})})]})]})},wo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xo=function(e){var t=e.viewDate,n=e.selectDate,r=e.onChangeSelectDate,i=yr()().startOf("day"),o=oe((function(){var e=new Array(42).fill(null),n=t.startOf("month"),r=t.endOf("month").diff(n,"day")+1,i=new Array(r).fill(n).map((function(e,t){return e.add(t,"day")})),o=n.day();return e.splice.apply(e,[o,r].concat(bt(i))),e}),[t]),a=function(e){return function(){e&&r(e)}};return fr("div",{className:"vm-calendar-body",children:[wo.map((function(e){return fr("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]},e)})),o.map((function(e,t){return fr("div",{className:Bi()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.toISOString())===n.startOf("day").toISOString(),"vm-calendar-body-cell_day_today":(e&&e.toISOString())===i.toISOString()}),onClick:a(e),children:e&&e.format("D")},e?e.toISOString():t)}))]})},ko=function(e){var t=e.viewDate,n=e.onChangeViewDate,r=oe((function(){return t.format("YYYY")}),[t]),i=oe((function(){var e=yr()().subtract(103,"year");return new Array(206).fill(e).map((function(e,t){return e.add(t,"year")}))}),[t]);te((function(){var e=document.getElementById("vm-calendar-year-".concat(r));e&&e.scrollIntoView({block:"center"})}),[]);return fr("div",{className:"vm-calendar-years",children:i.map((function(e){return fr("div",{className:Bi()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===r}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,function(){n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})};!function(e){e[e.hour=0]="hour",e[e.minutes=1]="minutes",e[e.seconds=2]="seconds"}(io||(io={}));var Co,Eo=function(e){var t=e.selectDate,n=e.onChangeTime,r=e.onClose,i=_t(X(io.hour),2),o=i[0],a=i[1],u=_t(X(t.format("HH")),2),l=u[0],c=u[1],s=_t(X(t.format("mm")),2),f=s[0],d=s[1],h=_t(X(t.format("ss")),2),p=h[0],v=h[1],m=oe((function(){return o===io.hour?new Array(24).fill("00").map((function(e,t){return{value:t,degrees:t/12*360,offset:0===t||t>12,title:t?"".concat(t):e}})):new Array(60).fill("00").map((function(e,t){return{value:t,degrees:t/60*360,offset:!1,title:t?"".concat(t):e}}))}),[o,l,f,p]),y=oe((function(){switch(o){case io.hour:return+l/12*360;case io.minutes:return+f/60*360;case io.seconds:return+p/60*360}}),[o,l,f,p]),g=re(null),_=re(null),b=re(null),D=function(e){return function(t){!function(e,t){t.target.select(),a(e)}(e,t)}};return te((function(){n("".concat(l,":").concat(f,":").concat(p))}),[l,f,p]),te((function(){c(t.format("HH")),d(t.format("mm")),v(t.format("ss"))}),[t]),te((function(){g.current&&g.current.focus()}),[]),fr("div",{className:"vm-calendar-time-picker",children:[fr("div",{className:"vm-calendar-time-picker-clock",children:[fr("div",{className:Bi()({"vm-calendar-time-picker-clock__arrow":!0,"vm-calendar-time-picker-clock__arrow_offset":o===io.hour&&("00"===l||+l>12)}),style:{transform:"rotate(".concat(y,"deg)")}}),m.map((function(e){return fr("div",{className:Bi()({"vm-calendar-time-picker-clock__time":!0,"vm-calendar-time-picker-clock__time_offset":e.offset,"vm-calendar-time-picker-clock__time_hide":m.length>24&&e.value%5}),style:{transform:"rotate(".concat(e.degrees,"deg)")},onClick:(t=e.value,function(){var e=String(t);switch(o){case io.hour:c(e),_.current&&_.current.focus();break;case io.minutes:d(e),b.current&&b.current.focus();break;case io.seconds:v(e),r()}}),children:fr("span",{style:{transform:"rotate(-".concat(e.degrees,"deg)")},children:e.title})},e.value);var t}))]}),fr("div",{className:"vm-calendar-time-picker-fields",children:[fr("input",{className:"vm-calendar-time-picker-fields__input",value:l,onChange:function(e){var t=e.target,n=t.value,r=+n>23?"23":n;t.value=r,c(r),n.length>1&&_.current&&_.current.focus()},onFocus:D(io.hour),ref:g,type:"number",min:0,max:24}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:f,onChange:function(e){var t=e.target,n=t.value,r=+n>59?"59":n;t.value=r,d(r),n.length>1&&b.current&&b.current.focus()},onFocus:D(io.minutes),ref:_,type:"number",min:0,max:60}),fr("span",{children:":"}),fr("input",{className:"vm-calendar-time-picker-fields__input",value:p,onChange:function(e){var t=e.target,n=t.value,i=+n>59?"59":n;t.value=i,v(i),n.length>1&&b.current&&r()},onFocus:D(io.seconds),ref:b,type:"number",min:0,max:60})]})]})},So=[{value:"date",icon:fr(yi,{})},{value:"time",icon:fr(mi,{})}],Ao=function(e){var t=e.date,n=e.timepicker,r=void 0!==n&&n,i=e.format,o=void 0===i?xr:i,a=e.onChange,u=e.onClose,l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(yr()(t)),2),d=f[0],h=f[1],p=_t(X(yr()(t)),2),v=p[0],y=p[1],g=_t(X(So[0].value),2),_=g[0],b=g[1],D=function(e){h(e),s(!1)};return te((function(){v.format()!==yr()(t).format()&&a(v.format(o))}),[v]),fr("div",{className:"vm-calendar",children:["date"===_&&fr(Do,{viewDate:d,onChangeViewDate:D,toggleDisplayYears:function(){s((function(e){return!e}))},displayYears:c}),"date"===_&&fr(m,{children:[!c&&fr(xo,{viewDate:d,selectDate:v,onChangeSelectDate:function(e){y(e),r&&b("time")}}),c&&fr(ko,{viewDate:d,onChangeViewDate:D})]}),"time"===_&&fr(Eo,{selectDate:v,onChangeTime:function(e){var t=_t(e.split(":"),3),n=t[0],r=t[1],i=t[2];y((function(e){return e.set("hour",+n).set("minute",+r).set("second",+i)}))},onClose:function(){u&&u()}}),r&&fr("div",{className:"vm-calendar__tabs",children:fr(Pi,{activeItem:_,items:So,onChange:function(e){b(e)},indicatorPlacement:"top"})})]})},Fo=Ce((function(e,t){var n=e.date,r=e.targetRef,i=e.format,o=void 0===i?xr:i,a=e.timepicker,u=e.onChange,l=_t(X(!1),2),c=l[0],s=l[1],f=oe((function(){return n?yr()(n):yr()()}),[n]),d=function(){s((function(e){return!e}))},h=function(){s(!1)},p=function(e){"Escape"!==e.key&&"Enter"!==e.key||h()};return te((function(){var e;return null===(e=r.current)||void 0===e||e.addEventListener("click",d),function(){var e;null===(e=r.current)||void 0===e||e.removeEventListener("click",d)}}),[r]),te((function(){return window.addEventListener("keyup",p),function(){window.removeEventListener("keyup",p)}}),[]),fr(m,{children:fr(vo,{open:c,buttonRef:r,placement:"bottom-right",onClose:h,children:fr("div",{ref:t,children:fr(Ao,{date:f,format:o,timepicker:a,onChange:function(e){a||h(),u(e)},onClose:h})})})})})),No=Fo,Oo=function(){var e=re(null),t=bo(document.body),n=oe((function(){return t.width>1120}),[t]),r=_t(X(),2),i=r[0],o=r[1],a=_t(X(),2),u=a[0],l=a[1],c=oe((function(){return yr()(u).format(xr)}),[u]),s=oe((function(){return yr()(i).format(xr)}),[i]),f=Wr(),d=f.period,h=d.end,p=d.start,v=f.relativeTime,y=Qr(),g=er();te((function(){o(Mr(Pr(h)))}),[h]),te((function(){l(Mr(Pr(p)))}),[p]);var _=oe((function(){return{start:yr()(Pr(p)).format(xr),end:yr()(Pr(h)).format(xr)}}),[p,h]),b=oe((function(){return v&&"none"!==v?v.replace(/_/g," "):"".concat(_.start," - ").concat(_.end)}),[v,_]),D=re(null),w=re(null),x=re(null),k=re(null),C=_t(X(!1),2),E=C[0],S=C[1],A=re(null),F=function(){S(!1)};return po(e,(function(e){var t,n,r=e.target,i=(null===D||void 0===D?void 0:D.current)&&D.current.contains(r),o=(null===w||void 0===w?void 0:w.current)&&w.current.contains(r),a=(null===x||void 0===x?void 0:x.current)&&(null===x||void 0===x||null===(t=x.current)||void 0===t?void 0:t.contains(r)),u=(null===k||void 0===k?void 0:k.current)&&(null===k||void 0===k||null===(n=k.current)||void 0===n?void 0:n.contains(r));i||o||a||u||F()})),fr(m,{children:[fr("div",{ref:A,children:fr(mo,{title:"Time range controls",children:fr(ho,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(mi,{}),onClick:function(){S((function(e){return!e}))},children:n&&fr("span",{children:b})})})}),fr(vo,{open:E,buttonRef:A,placement:"bottom-right",onClose:F,clickOutside:!1,children:fr("div",{className:"vm-time-selector",ref:e,children:[fr("div",{className:"vm-time-selector-left",children:[fr("div",{className:"vm-time-selector-left-inputs",children:[fr("div",{className:"vm-time-selector-left-inputs__date",ref:D,children:[fr("label",{children:"From:"}),fr("span",{children:c}),fr(yi,{}),fr(No,{ref:x,date:u||"",onChange:function(e){return l(e)},targetRef:D,timepicker:!0})]}),fr("div",{className:"vm-time-selector-left-inputs__date",ref:w,children:[fr("label",{children:"To:"}),fr("span",{children:s}),fr(yi,{}),fr(No,{ref:k,date:i||"",onChange:function(e){return o(e)},targetRef:w,timepicker:!0})]})]}),fr(ho,{variant:"text",startIcon:fr(gi,{}),onClick:function(){return y({type:"RUN_QUERY_TO_NOW"})},children:"switch to now"}),fr("div",{className:"vm-time-selector-left__controls",children:[fr(ho,{color:"error",variant:"outlined",onClick:function(){o(Mr(Pr(h))),l(Mr(Pr(p))),S(!1)},children:"Cancel"}),fr(ho,{color:"primary",onClick:function(){return u&&i&&y({type:"SET_PERIOD",payload:{from:new Date(u),to:new Date(i)}}),void S(!1)},children:"Apply"})]})]}),fr(_o,{relativeTime:v||"",setDuration:function(e){var t=e.duration,n=e.until,r=e.id;y({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),S(!1)}})]})})]})};!function(e){e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number"}(Co||(Co={}));var To=function(e){var t=e.label,n=e.value,r=e.type,i=void 0===r?"text":r,o=e.error,a=void 0===o?"":o,u=e.endIcon,l=e.startIcon,c=e.disabled,s=void 0!==c&&c,f=e.autofocus,d=void 0!==f&&f,h=e.helperText,p=e.onChange,v=e.onEnter,m=e.onKeyDown,y=re(null),g=re(null),_=oe((function(){return"textarea"===i?g:y}),[i]),b=Bi()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_icon-start":l,"vm-text-field__input_disabled":s,"vm-text-field__input_textarea":"textarea"===i}),D=function(e){m&&m(e),"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v&&v())},w=function(e){s||p&&p(e.target.value)};return te((function(){var e;d&&(null===_||void 0===_||null===(e=_.current)||void 0===e?void 0:e.focus)&&_.current.focus()}),[_,d]),fr("label",{className:Bi()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===i}),"data-replicated-value":n,children:[l&&fr("div",{className:"vm-text-field__icon-start",children:l}),u&&fr("div",{className:"vm-text-field__icon-end",children:u}),"textarea"===i?fr("textarea",{className:b,disabled:s,ref:g,value:n,onInput:w,onKeyDown:D,rows:1}):fr("input",{className:b,disabled:s,ref:y,value:n,onInput:w,onKeyDown:D,type:i}),t&&fr("span",{className:"vm-text-field__label",children:t}),fr("span",{className:"vm-text-field__error","data-show":!!a,children:a}),h&&!a&&fr("span",{className:"vm-text-field__helper-text",children:h})]})},Bo=function(e){var t;try{t=new URL(e)}catch(g){return!1}return"http:"===t.protocol||"https:"===t.protocol},Mo=function(e){var t=e.serverUrl,n=e.onChange,r=e.onEnter,i=_t(X(""),2),o=i[0],a=i[1];return fr(To,{autofocus:!0,label:"Server URL",value:t,error:o,onChange:function(e){var t=e||"";n(t),a(""),t||a(Co.emptyServer),Bo(t)||a(Co.validServer)},onEnter:r})},Lo=function(e){var t=e.title,n=e.children,r=e.onClose,i=function(e){"Escape"===e.key&&r()};return te((function(){return window.addEventListener("keyup",i),function(){window.removeEventListener("keyup",i)}}),[]),mt.createPortal(fr("div",{className:"vm-modal",onMouseDown:r,children:fr("div",{className:"vm-modal-content",children:[fr("div",{className:"vm-modal-content-header",children:[t&&fr("div",{className:"vm-modal-content-header__title",children:t}),fr("div",{className:"vm-modal-header__close",children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(ai,{})})})]}),fr("div",{className:"vm-modal-content-body",onMouseDown:function(e){e.stopPropagation()},children:n})]})}),document.body)},Po=[{label:"Graph",type:"chart"},{label:"JSON",type:"code"},{label:"Table",type:"table"}],Io=function(e){var t=e.limits,n=e.onChange,r=e.onEnter,i=_t(X({table:"",chart:"",code:""}),2),o=i[0],a=i[1],u=function(e){return function(r){!function(e,r){var i=e||"";a((function(e){return Kn(Kn({},e),{},qn({},r,+i<0?Co.positiveNumber:""))})),n(Kn(Kn({},t),{},qn({},r,i||1/0)))}(r,e)}};return fr("div",{className:"vm-limits-configurator",children:[fr("div",{className:"vm-limits-configurator-title",children:["Series limits by tabs",fr(mo,{title:"To disable limits set to 0",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(li,{})})}),fr("div",{className:"vm-limits-configurator-title__reset",children:fr(ho,{variant:"text",color:"primary",size:"small",startIcon:fr(ui,{}),onClick:function(){n(or)},children:"Reset"})})]}),fr("div",{className:"vm-limits-configurator__inputs",children:Po.map((function(e){return fr(To,{label:e.label,value:t[e.type],error:o[e.type],onChange:u(e.type),onEnter:r,type:"number"},e.type)}))})]})},$o="Settings",Ro=function(){var e=er(),t=hr().serverUrl,n=Vi().seriesLimits,r=pr(),i=qi(),o=_t(X(t),2),a=o[0],u=o[1],l=_t(X(n),2),c=l[0],s=l[1],f=_t(X(!1),2),d=f[0],h=f[1],p=function(){return h(!1)},v=function(){r({type:"SET_SERVER",payload:a}),i({type:"SET_SERIES_LIMITS",payload:c}),p()};return fr(m,{children:[fr(mo,{title:$o,children:fr(ho,{className:Bi()({"vm-header-button":!e}),variant:"contained",color:"primary",startIcon:fr(oi,{}),onClick:function(){return h(!0)}})}),d&&fr(Lo,{title:$o,onClose:p,children:fr("div",{className:"vm-server-configurator",children:[!e&&fr("div",{className:"vm-server-configurator__input",children:fr(Mo,{serverUrl:a,onChange:u,onEnter:v})}),fr("div",{className:"vm-server-configurator__input",children:fr(Io,{limits:c,onChange:s,onEnter:v})}),fr("div",{className:"vm-server-configurator__footer",children:[fr(ho,{variant:"outlined",color:"error",onClick:p,children:"Cancel"}),fr(ho,{variant:"contained",onClick:v,children:"apply"})]})]})})]})},jo={windows:"Windows",mac:"Mac OS",linux:"Linux"},zo=(Object.values(jo).find((function(e){return navigator.userAgent.indexOf(e)>=0}))||"unknown")===jo.mac?"Cmd":"Ctrl",Uo=[{title:"Query",list:[{keys:["Enter"],description:"Run"},{keys:["Shift","Enter"],description:"Multi-line queries"},{keys:[zo,"Arrow Up"],description:"Previous command from the Query history"},{keys:[zo,"Arrow Down"],description:"Next command from the Query history"}]},{title:"Graph",list:[{keys:[zo,"Scroll Up"],description:"Zoom in"},{keys:[zo,"Scroll Down"],description:"Zoom out"},{keys:[zo,"Click and Drag"],description:"Move the graph left/right"}]},{title:"Legend",list:[{keys:["Mouse Click"],description:"Select series"},{keys:[zo,"Mouse Click"],description:"Toggle multiple series"}]}],Ho=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=er();return fr(m,{children:[fr(mo,{title:"Shortcut keys",placement:"bottom-center",children:fr(ho,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(_i,{}),onClick:function(){n(!0)}})}),t&&fr(Lo,{title:"Shortcut keys",onClose:function(){n(!1)},children:fr("div",{className:"vm-shortcuts",children:Uo.map((function(e){return fr("div",{className:"vm-shortcuts-section",children:[fr("h3",{className:"vm-shortcuts-section__title",children:e.title}),fr("div",{className:"vm-shortcuts-section-list",children:e.list.map((function(e){return fr("div",{className:"vm-shortcuts-section-list-item",children:[fr("div",{className:"vm-shortcuts-section-list-item__key",children:e.keys.map((function(t,n){return fr(m,{children:[fr("code",{children:t},t),n!==e.keys.length-1?"+":""]})}))}),fr("p",{className:"vm-shortcuts-section-list-item__description",children:e.description})]},e.keys.join("+"))}))})]},e.title)}))})})]})},Yo=function(){var e=er(),t=re(null),n=eo().date,r=to(),i=oe((function(){return yr()(n).format(wr)}),[n]);return fr("div",{children:[fr("div",{ref:t,children:fr(mo,{title:"Date control",children:fr(ho,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:fr(yi,{}),children:i})})}),fr(No,{date:n||"",format:wr,onChange:function(e){r({type:"SET_DATE",payload:e})},targetRef:t})]})},Vo=function(){var e=Mi("color-primary"),t=er(),n=Xn().headerStyles,r=(n=void 0===n?{}:n).background,i=void 0===r?t?"#FFF":e:r,o=n.color,a=void 0===o?t?e:"#FFF":o,u=Sn(),l=En(),c=l.search,s=l.pathname,f=oe((function(){return[{label:"Custom panel",value:Jn.home},{label:"Dashboards",value:Jn.dashboards,hide:t},{label:"Cardinality",value:Jn.cardinality},{label:"Top queries",value:Jn.topQueries},{label:"Trace analyzer",value:Jn.trace}]}),[t]),d=_t(X(s),2),h=d[0],p=d[1],v=oe((function(){return(Gn[s]||{}).header||{}}),[s]),m=function(e){u({pathname:e,search:c})};return te((function(){p(s)}),[s]),fr("header",{className:Bi()({"vm-header":!0,"vm-header_app":t}),style:{background:i,color:a},children:[!t&&fr("div",{className:"vm-header-logo",style:{color:a},children:[fr("div",{className:"vm-header-logo__icon",onClick:function(){m(Jn.home),ar({}),window.location.reload()},children:fr(ii,{})}),fr("a",{className:"vm-header-logo__issue",target:"_blank",href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new",rel:"noreferrer",children:"create an issue"})]}),fr("div",{className:"vm-header-nav",children:fr(Pi,{activeItem:h,items:f.filter((function(e){return!e.hide})),color:a,onChange:function(e){p(e),u(e)}})}),fr("div",{className:"vm-header__settings",children:[(null===v||void 0===v?void 0:v.timeSelector)&&fr(Oo,{}),(null===v||void 0===v?void 0:v.cardinalityDatePicker)&&fr(Yo,{}),(null===v||void 0===v?void 0:v.executionControls)&&fr(go,{}),fr(Ro,{}),fr(Ho,{})]})]})},qo=function(){var e=er();return fr("section",{className:"vm-container",children:[fr(Vo,{}),fr("div",{className:Bi()({"vm-container-body":!0,"vm-container-body_app":e}),children:fr(In,{})})]})};function Wo(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=gt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}var Qo,Go,Jo="u-off",Zo="u-label",Ko="width",Xo="height",ea="top",ta="bottom",na="left",ra="right",ia="#000",oa="#0000",aa="mousemove",ua="mousedown",la="mouseup",ca="mouseenter",sa="mouseleave",fa="dblclick",da="change",ha="dppxchange",pa="undefined"!=typeof window,va=pa?document:null,ma=pa?window:null,ya=pa?navigator:null;function ga(e,t){if(null!=t){var n=e.classList;!n.contains(t)&&n.add(t)}}function _a(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function ba(e,t,n){e.style[t]=n+"px"}function Da(e,t,n,r){var i=va.createElement(e);return null!=t&&ga(i,t),null!=n&&n.insertBefore(i,r),i}function wa(e,t){return Da("div",e,t)}var xa=new WeakMap;function ka(e,t,n,r,i){var o="translate("+t+"px,"+n+"px)";o!=xa.get(e)&&(e.style.transform=o,xa.set(e,o),t<0||n<0||t>r||n>i?ga(e,Jo):_a(e,Jo))}var Ca=new WeakMap;function Ea(e,t,n){var r=t+n;r!=Ca.get(e)&&(Ca.set(e,r),e.style.background=t,e.style.borderColor=n)}var Sa=new WeakMap;function Aa(e,t,n,r){var i=t+""+n;i!=Sa.get(e)&&(Sa.set(e,i),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}var Fa={passive:!0},Na=Kn(Kn({},Fa),{},{capture:!0});function Oa(e,t,n,r){t.addEventListener(e,n,r?Na:Fa)}function Ta(e,t,n,r){t.removeEventListener(e,n,r?Na:Fa)}function Ba(e,t,n,r){var i;n=n||0;for(var o=(r=r||t.length-1)<=2147483647;r-n>1;)t[i=o?n+r>>1:Ka((n+r)/2)]=t&&i<=n;i+=r)if(null!=e[i])return i;return-1}function La(e,t,n,r){var i=lu,o=-lu;if(1==r)i=e[t],o=e[n];else if(-1==r)i=e[n],o=e[t];else for(var a=t;a<=n;a++)null!=e[a]&&(i=tu(i,e[a]),o=nu(o,e[a]));return[i,o]}function Pa(e,t,n){for(var r=lu,i=-lu,o=t;o<=n;o++)e[o]>0&&(r=tu(r,e[o]),i=nu(i,e[o]));return[r==lu?1:r,i==-lu?10:i]}pa&&function e(){var t=devicePixelRatio;Qo!=t&&(Qo=t,Go&&Ta(da,Go,e),Go=matchMedia("(min-resolution: ".concat(Qo-.001,"dppx) and (max-resolution: ").concat(Qo+.001,"dppx)")),Oa(da,Go,e),ma.dispatchEvent(new CustomEvent(ha)))}();var Ia=[0,0];function $a(e,t,n,r){return Ia[0]=n<0?bu(e,-n):e,Ia[1]=r<0?bu(t,-r):t,Ia}function Ra(e,t,n,r){var i,o,a,u=iu(e),l=10==n?ou:au;return e==t&&(-1==u?(e*=n,t/=n):(e/=n,t*=n)),r?(i=Ka(l(e)),o=eu(l(t)),e=(a=$a(ru(n,i),ru(n,o),i,o))[0],t=a[1]):(i=Ka(l(Za(e))),o=Ka(l(Za(t))),e=_u(e,(a=$a(ru(n,i),ru(n,o),i,o))[0]),t=gu(t,a[1])),[e,t]}function ja(e,t,n,r){var i=Ra(e,t,n,r);return 0==e&&(i[0]=0),0==t&&(i[1]=0),i}var za={mode:3,pad:.1},Ua={pad:0,soft:null,mode:0},Ha={min:Ua,max:Ua};function Ya(e,t,n,r){return Fu(n)?qa(e,t,n):(Ua.pad=n,Ua.soft=r?0:null,Ua.mode=r?3:0,qa(e,t,Ha))}function Va(e,t){return null==e?t:e}function qa(e,t,n){var r=n.min,i=n.max,o=Va(r.pad,0),a=Va(i.pad,0),u=Va(r.hard,-lu),l=Va(i.hard,lu),c=Va(r.soft,lu),s=Va(i.soft,-lu),f=Va(r.mode,0),d=Va(i.mode,0),h=t-e;h<1e-9&&(h=0,0!=e&&0!=t||(h=1e-9,2==f&&c!=lu&&(o=0),2==d&&s!=-lu&&(a=0)));var p=h||Za(t)||1e3,v=ou(p),m=ru(10,Ka(v)),y=bu(_u(e-p*(0==h?0==e?.1:1:o),m/10),9),g=e>=c&&(1==f||3==f&&y<=c||2==f&&y>=c)?c:lu,_=nu(u,y=g?g:tu(g,y)),b=bu(gu(t+p*(0==h?0==t?.1:1:a),m/10),9),D=t<=s&&(1==d||3==d&&b>=s||2==d&&b<=s)?s:-lu,w=tu(l,b>D&&t<=D?D:nu(D,b));return _==w&&0==_&&(w=100),[_,w]}var Wa=new Intl.NumberFormat(pa?ya.language:"en-US"),Qa=function(e){return Wa.format(e)},Ga=Math,Ja=Ga.PI,Za=Ga.abs,Ka=Ga.floor,Xa=Ga.round,eu=Ga.ceil,tu=Ga.min,nu=Ga.max,ru=Ga.pow,iu=Ga.sign,ou=Ga.log10,au=Ga.log2,uu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.asinh(e/t)},lu=1/0;function cu(e){return 1+(0|ou((e^e>>31)-(e>>31)))}function su(e,t){return Xa(e/t)*t}function fu(e,t,n){return tu(nu(e,t),n)}function du(e){return"function"==typeof e?e:function(){return e}}var hu=function(e){return e},pu=function(e,t){return t},vu=function(e){return null},mu=function(e){return!0},yu=function(e,t){return e==t};function gu(e,t){return eu(e/t)*t}function _u(e,t){return Ka(e/t)*t}function bu(e,t){return Xa(e*(t=Math.pow(10,t)))/t}var Du=new Map;function wu(e){return((""+e).split(".")[1]||"").length}function xu(e,t,n,r){for(var i=[],o=r.map(wu),a=t;a=0&&a>=0?0:u)+(a>=o[c]?0:o[c]),d=bu(s,f);i.push(d),Du.set(d,f)}return i}var ku={},Cu=[],Eu=[null,null],Su=Array.isArray;function Au(e){return"string"==typeof e}function Fu(e){var t=!1;if(null!=e){var n=e.constructor;t=null==n||n==Object}return t}function Nu(e){return null!=e&&"object"==typeof e}var Ou=Object.getPrototypeOf(Uint8Array);function Tu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fu;if(Su(e)){var r=e.find((function(e){return null!=e}));if(Su(r)||n(r)){t=Array(e.length);for(var i=0;io){for(r=a-1;r>=0&&null==e[r];)e[r--]=null;for(r=a+1;r12?t-12:t},AA:function(e){return e.getHours()>=12?"PM":"AM"},aa:function(e){return e.getHours()>=12?"pm":"am"},a:function(e){return e.getHours()>=12?"p":"a"},mm:function(e){return Uu(e.getMinutes())},m:function(e){return e.getMinutes()},ss:function(e){return Uu(e.getSeconds())},s:function(e){return e.getSeconds()},fff:function(e){return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Yu(e,t){t=t||zu;for(var n,r=[],i=/\{([a-z]+)\}|[^{]+/gi;n=i.exec(e);)r.push("{"==n[0][0]?Hu[n[1]]:n[0]);return function(e){for(var n="",i=0;i=a,v=f>=o&&f=i?i:f,N=_+(Ka(c)-Ka(y))+gu(y-_,F);h.push(N);for(var O=t(N),T=O.getHours()+O.getMinutes()/n+O.getSeconds()/r,B=f/r,M=d/u.axes[l]._space;!((N=bu(N+f,1==e?0:3))>s);)if(B>1){var L=Ka(bu(T+B,6))%24,P=t(N).getHours()-L;P>1&&(P=-1),T=(T+B)%24,bu(((N-=P*r)-h[h.length-1])/f,3)*M>=.7&&h.push(N)}else h.push(N)}return h}}]}var cl=_t(ll(1),3),sl=cl[0],fl=cl[1],dl=cl[2],hl=_t(ll(.001),3),pl=hl[0],vl=hl[1],ml=hl[2];function yl(e,t){return e.map((function(e){return e.map((function(n,r){return 0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)}))}))}function gl(e,t){return function(n,r,i,o,a){var u,l,c,s,f,d,h=t.find((function(e){return a>=e[0]}))||t[t.length-1];return r.map((function(t){var n=e(t),r=n.getFullYear(),i=n.getMonth(),o=n.getDate(),a=n.getHours(),p=n.getMinutes(),v=n.getSeconds(),m=r!=u&&h[2]||i!=l&&h[3]||o!=c&&h[4]||a!=s&&h[5]||p!=f&&h[6]||v!=d&&h[7]||h[1];return u=r,l=i,c=o,s=a,f=p,d=v,m(n)}))}}function _l(e,t,n){return new Date(e,t,n)}function bl(e,t){return t(e)}xu(2,-53,53,[1]);function Dl(e,t){return function(n,r){return t(e(r))}}var wl={show:!0,live:!0,isolate:!1,markers:{show:!0,width:2,stroke:function(e,t){var n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};var xl=[0,0];function kl(e,t,n){return function(e){0==e.button&&n(e)}}function Cl(e,t,n){return n}var El={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return xl[0]=t,xl[1]=n,xl},points:{show:function(e,t){var n=e.cursor.points,r=wa(),i=n.size(e,t);ba(r,Ko,i),ba(r,Xo,i);var o=i/-2;ba(r,"marginLeft",o),ba(r,"marginTop",o);var a=n.width(e,t,i);return a&&ba(r,"borderWidth",a),r},size:function(e,t){return ql(e.series[t].points.width,1)},width:0,stroke:function(e,t){var n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){var n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:kl,mouseup:kl,click:kl,dblclick:kl,mousemove:Cl,mouseleave:Cl,mouseenter:Cl},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,_x:!1,_y:!1},focus:{prox:-1},left:-10,top:-10,idx:null,dataIdx:function(e,t,n){return n},idxs:null},Sl={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Al=Bu({},Sl,{filter:pu}),Fl=Bu({},Al,{size:10}),Nl=Bu({},Sl,{show:!1}),Ol='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Tl="bold "+Ol,Bl={show:!0,scale:"x",stroke:ia,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:2,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0},Ml={show:!0,scale:"x",auto:!1,sorted:1,min:lu,max:-lu,idxs:[]};function Ll(e,t,n,r,i){return t.map((function(e){return null==e?"":Qa(e)}))}function Pl(e,t,n,r,i,o,a){for(var u=[],l=Du.get(i)||0,c=n=a?n:bu(gu(n,i),l);c<=r;c=bu(c+i,l))u.push(Object.is(c,-0)?0:c);return u}function Il(e,t,n,r,i,o,a){var u=[],l=e.scales[e.axes[t].scale].log,c=Ka((10==l?ou:au)(n));i=ru(l,c),c<0&&(i=bu(i,-c));var s=n;do{u.push(s),(s=bu(s+i,Du.get(i)))>=i*l&&(i=s)}while(s<=r);return u}function $l(e,t,n,r,i,o,a){var u=e.scales[e.axes[t].scale].asinh,l=r>u?Il(e,t,nu(u,n),r,i):[u],c=r>=0&&n<=0?[0]:[];return(n<-u?Il(e,t,nu(u,-r),-n,i):[u]).reverse().map((function(e){return-e})).concat(c,l)}var Rl=/./,jl=/[12357]/,zl=/[125]/,Ul=/1/;function Hl(e,t,n,r,i){var o=e.axes[n],a=o.scale,u=e.scales[a];if(3==u.distr&&2==u.log)return t;var l=e.valToPos,c=o._space,s=l(10,a),f=l(9,a)-s>=c?Rl:l(7,a)-s>=c?jl:l(5,a)-s>=c?zl:Ul;return t.map((function(e){return 4==u.distr&&0==e||f.test(e)?e:null}))}function Yl(e,t){return null==t?"":Qa(t)}var Vl={show:!0,scale:"y",stroke:ia,space:30,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Tl,side:3,grid:Al,ticks:Fl,border:Nl,font:Ol,rotate:0};function ql(e,t){return bu((3+2*(e||1))*t,3)}var Wl={scale:null,auto:!0,sorted:0,min:lu,max:-lu},Ql={show:!0,auto:!0,sorted:0,alpha:1,facets:[Bu({},Wl,{scale:"x"}),Bu({},Wl,{scale:"y"})]},Gl={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:function(e,t,n,r,i){return i},alpha:1,points:{show:function(e,t){var n=e.series[0],r=n.scale,i=n.idxs,o=e._data[0],a=e.valToPos(o[i[0]],r,!0),u=e.valToPos(o[i[1]],r,!0),l=Za(u-a)/(e.series[t].points.space*Qo);return i[1]-i[0]<=l},filter:null},values:null,min:lu,max:-lu,idxs:[],path:null,clip:null};function Jl(e,t,n,r,i){return n/10}var Zl={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Kl=Bu({},Zl,{time:!1,ori:1}),Xl={};function ec(e,t){var n=Xl[e];return n||(n={key:e,plots:[],sub:function(e){n.plots.push(e)},unsub:function(e){n.plots=n.plots.filter((function(t){return t!=e}))},pub:function(e,t,r,i,o,a,u){for(var l=0;l0){a=new Path2D;for(var u=0==t?hc:pc,l=n,c=0;cs[0]){var f=s[0]-l;f>0&&u(a,l,r,f,r+o),l=s[1]}}var d=n+i-l;d>0&&u(a,l,r,d,r+o)}return a}function ac(e,t,n,r,i,o,a){for(var u=[],l=1==i?n:r;l>=n&&l<=r;l+=i){if(null===t[l]){var c=l,s=l;if(1==i)for(;++l<=r&&null===t[l];)s=l;else for(;--l>=n&&null===t[l];)s=l;var f=o(e[c]),d=s==c?f:o(e[s]);f=a<=0?o(e[c-i]):f,(d=a>=0?o(e[s+i]):d)>=f&&u.push([f,d])}}return u}function uc(e){return 0==e?hu:1==e?Xa:function(t){return su(t,e)}}function lc(e){var t=0==e?cc:sc,n=0==e?function(e,t,n,r,i,o){e.arcTo(t,n,r,i,o)}:function(e,t,n,r,i,o){e.arcTo(n,t,i,r,o)},r=0==e?function(e,t,n,r,i){e.rect(t,n,r,i)}:function(e,t,n,r,i){e.rect(n,t,i,r)};return function(e,i,o,a,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;0==l?r(e,i,o,a,u):(l=tu(l,a/2,u/2),t(e,i+l,o),n(e,i+a,o,i+a,o+u,l),n(e,i+a,o+u,i,o+u,l),n(e,i,o+u,i,o,l),n(e,i,o,i+a,o,l),e.closePath())}}var cc=function(e,t,n){e.moveTo(t,n)},sc=function(e,t,n){e.moveTo(n,t)},fc=function(e,t,n){e.lineTo(t,n)},dc=function(e,t,n){e.lineTo(n,t)},hc=lc(0),pc=lc(1),vc=function(e,t,n,r,i,o){e.arc(t,n,r,i,o)},mc=function(e,t,n,r,i,o){e.arc(n,t,r,i,o)},yc=function(e,t,n,r,i,o,a){e.bezierCurveTo(t,n,r,i,o,a)},gc=function(e,t,n,r,i,o,a){e.bezierCurveTo(n,t,i,r,a,o)};function _c(e){return function(e,t,n,r,i){return tc(e,t,(function(t,o,a,u,l,c,s,f,d,h,p){var v,m,y=t.pxRound,g=t.points;0==u.ori?(v=cc,m=vc):(v=sc,m=mc);var _=bu(g.width*Qo,3),b=(g.size-g.width)/2*Qo,D=bu(2*b,3),w=new Path2D,x=new Path2D,k=e.bbox,C=k.left,E=k.top,S=k.width,A=k.height;hc(x,C-D,E-D,S+2*D,A+2*D);var F=function(e){if(null!=a[e]){var t=y(c(o[e],u,h,f)),n=y(s(a[e],l,p,d));v(w,t+b,n),m(w,t,n,b,0,2*Ja)}};if(i)i.forEach(F);else for(var N=n;N<=r;N++)F(N);return{stroke:_>0?w:null,fill:w,clip:x,flags:3}}))}}function bc(e){return function(t,n,r,i,o,a){r!=i&&(o!=r&&a!=r&&e(t,n,r),o!=i&&a!=i&&e(t,n,i),e(t,n,a))}}var Dc=bc(fc),wc=bc(dc);function xc(e){var t=Va(null===e||void 0===e?void 0:e.alignGaps,0);return function(e,n,r,i){return tc(e,n,(function(o,a,u,l,c,s,f,d,h,p,v){var m,y,g=o.pxRound,_=function(e){return g(s(e,l,p,d))},b=function(e){return g(f(e,c,v,h))};0==l.ori?(m=fc,y=Dc):(m=dc,y=wc);for(var D,w,x,k=l.dir*(0==l.ori?1:-1),C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:1},E=C.stroke,S=lu,A=-lu,F=_(a[1==k?r:i]),N=Ma(u,r,i,1*k),O=Ma(u,r,i,-1*k),T=_(a[N]),B=_(a[O]),M=1==k?r:i;M>=r&&M<=i;M+=k){var L=_(a[M]);L==F?null!=u[M]&&(w=b(u[M]),S==lu&&(m(E,L,w),D=w),S=tu(w,S),A=nu(w,A)):(S!=lu&&(y(E,F,S,A,D,w),x=F),null!=u[M]?(m(E,L,w=b(u[M])),S=A=D=w):(S=lu,A=-lu),F=L)}S!=lu&&S!=A&&x!=F&&y(E,F,S,A,D,w);var P=_t(nc(e,n),2),I=P[0],$=P[1];if(null!=o.fill||0!=I){var R=C.fill=new Path2D(E),j=b(o.fillTo(e,n,o.min,o.max,I));m(R,B,j),m(R,T,j)}if(!o.spanGaps){var z,U=[];(z=U).push.apply(z,bt(ac(a,u,r,i,k,_,t))),C.gaps=U=o.gaps(e,n,r,i,U),C.clip=oc(U,l.ori,d,h,p,v)}return 0!=$&&(C.band=2==$?[ic(e,n,r,i,E,-1),ic(e,n,r,i,E,1)]:ic(e,n,r,i,E,$)),C}))}}function kc(e,t,n,r,i,o){var a=e.length;if(a<2)return null;var u=new Path2D;if(n(u,e[0],t[0]),2==a)r(u,e[1],t[1]);else{for(var l=Array(a),c=Array(a-1),s=Array(a-1),f=Array(a-1),d=0;d0!==c[h]>0?l[h]=0:(l[h]=3*(f[h-1]+f[h])/((2*f[h]+f[h-1])/c[h-1]+(f[h]+2*f[h-1])/c[h]),isFinite(l[h])||(l[h]=0));l[a-1]=c[a-2];for(var p=0;p=i&&o+(l<5?Du.get(l):0)<=17)return[l,c]}while(++u0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?uu(e,t.asinh):e)-t._min)/(t._max-t._min)}function a(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?1-i:i)}function u(e,t,n,r){var i=o(e,t);return r+n*(-1==t.dir?i:1-i)}function l(e,t,n,r){return 0==t.ori?a(e,t,n,r):u(e,t,n,r)}r.valToPosH=a,r.valToPosV=u;var c=!1;r.status=0;var s=r.root=wa("uplot");(null!=e.id&&(s.id=e.id),ga(s,e.class),e.title)&&(wa("u-title",s).textContent=e.title);var f=Da("canvas"),d=r.ctx=f.getContext("2d"),h=wa("u-wrap",s),p=r.under=wa("u-under",h);h.appendChild(f);var v=r.over=wa("u-over",h),m=+Va((e=Tu(e)).pxAlign,1),y=uc(m);(e.plugins||[]).forEach((function(t){t.opts&&(e=t.opts(r,e)||e)}));var g=e.ms||.001,_=r.series=1==i?Fc(e.series||[],Ml,Gl,!1):function(e,t){return e.map((function(e,n){return 0==n?null:Bu({},t,e)}))}(e.series||[null],Ql),b=r.axes=Fc(e.axes||[],Bl,Vl,!0),D=r.scales={},w=r.bands=e.bands||[];w.forEach((function(e){e.fill=du(e.fill||null),e.dir=Va(e.dir,-1)}));var x=2==i?_[1].facets[0].scale:_[0].scale,k={axes:function(){for(var e=function(e){var t=b[e];if(!t.show||!t._show)return"continue";var n=t.side,i=n%2,o=void 0,a=void 0,u=t.stroke(r,e),c=0==n||3==n?-1:1;if(t.label){var s=t.labelGap*c,f=Xa((t._lpos+s)*Qo);Ze(t.labelFont[0],u,"center",2==n?ea:ta),d.save(),1==i?(o=a=0,d.translate(f,Xa(de+pe/2)),d.rotate((3==n?-Ja:Ja)/2)):(o=Xa(fe+he/2),a=f),d.fillText(t.label,o,a),d.restore()}var h=_t(t._found,2),p=h[0],v=h[1];if(0==v)return"continue";var m=D[t.scale],g=0==i?he:pe,_=0==i?fe:de,w=Xa(t.gap*Qo),x=t._splits,k=2==m.distr?x.map((function(e){return qe[e]})):x,C=2==m.distr?qe[x[1]]-qe[x[0]]:p,E=t.ticks,S=t.border,A=E.show?Xa(E.size*Qo):0,F=t._rotate*-Ja/180,N=y(t._pos*Qo),O=N+(A+w)*c;a=0==i?O:0,o=1==i?O:0,Ze(t.font[0],u,1==t.align?na:2==t.align?ra:F>0?na:F<0?ra:0==i?"center":3==n?ra:na,F||1==i?"middle":2==n?ea:ta);for(var T=1.5*t.font[1],B=x.map((function(e){return y(l(e,m,g,_))})),M=t._values,L=0;L0&&(_.forEach((function(e,n){if(n>0&&e.show&&null==e._paths){var i=function(e){var t=fu(He-1,0,Ne-1),n=fu(Ye+1,0,Ne-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n0&&e.show){je!=e.alpha&&(d.globalAlpha=je=e.alpha),Xe(t,!1),e._paths&&et(t,!1),Xe(t,!0);var n=e.points.show(r,t,He,Ye),i=e.points.filter(r,t,n,e._paths?e._paths.gaps:null);(n||i)&&(e.points._paths=e.points.paths(r,t,He,Ye,i),et(t,!0)),1!=je&&(d.globalAlpha=je=1),on("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((function(e){return k[e]}));function E(t){var n=D[t];if(null==n){var r=(e.scales||ku)[t]||ku;if(null!=r.from)E(r.from),D[t]=Bu({},D[r.from],r,{key:t});else{(n=D[t]=Bu({},t==x?Zl:Kl,r)).key=t;var o=n.time,a=n.range,u=Su(a);if((t!=x||2==i&&!o)&&(!u||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?za:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?za:{mode:1,hard:a[1],soft:a[1]}},u=!1),!u&&Fu(a))){var l=a;a=function(e,t,n){return null==t?Eu:Ya(t,n,l)}}n.range=du(a||(o?Tc:t==x?3==n.distr?Lc:4==n.distr?Ic:Oc:3==n.distr?Mc:4==n.distr?Pc:Bc)),n.auto=du(!u&&n.auto),n.clamp=du(n.clamp||Jl),n._min=n._max=null}}}for(var S in E("x"),E("y"),1==i&&_.forEach((function(e){E(e.scale)})),b.forEach((function(e){E(e.scale)})),e.scales)E(S);var A,F,N=D[x],O=N.distr;0==N.ori?(ga(s,"u-hz"),A=a,F=u):(ga(s,"u-vt"),A=u,F=a);var T={};for(var B in D){var M=D[B];null==M.min&&null==M.max||(T[B]={min:M.min,max:M.max},M.min=M.max=null)}var L,P=e.tzDate||function(e){return new Date(Xa(e/g))},I=e.fmtDate||Yu,$=1==g?dl(P):ml(P),R=gl(P,yl(1==g?fl:vl,I)),j=Dl(P,bl("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",I)),z=[],U=r.legend=Bu({},wl,e.legend),H=U.show,Y=U.markers;U.idxs=z,Y.width=du(Y.width),Y.dash=du(Y.dash),Y.stroke=du(Y.stroke),Y.fill=du(Y.fill);var V,q=[],W=[],Q=!1,G={};if(U.live){var J=_[1]?_[1].values:null;for(var Z in V=(Q=null!=J)?J(r,1,0):{_:0})G[Z]="--"}if(H)if(L=Da("table","u-legend",s),Q){var K=Da("tr","u-thead",L);for(var X in Da("th",null,K),V)Da("th",Zo,K).textContent=X}else ga(L,"u-inline"),U.live&&ga(L,"u-live");var ee={show:!0},te={show:!1};var ne=new Map;function re(e,t,n){var i=ne.get(t)||{},o=we.bind[e](r,t,n);o&&(Oa(e,t,i[e]=o),ne.set(t,i))}function ie(e,t,n){var r=ne.get(t)||{};for(var i in r)null!=e&&i!=e||(Ta(i,t,r[i]),delete r[i]);null==e&&ne.delete(t)}var oe=0,ae=0,ue=0,le=0,ce=0,se=0,fe=0,de=0,he=0,pe=0;r.bbox={};var ve=!1,me=!1,ye=!1,ge=!1,_e=!1;function be(e,t,n){(n||e!=r.width||t!=r.height)&&De(e,t),ut(!1),ye=!0,me=!0,ge=_e=we.left>=0,wt()}function De(e,t){r.width=oe=ue=e,r.height=ae=le=t,ce=se=0,function(){var e=!1,t=!1,n=!1,r=!1;b.forEach((function(i,o){if(i.show&&i._show){var a=i.side,u=a%2,l=i._size+(null!=i.label?i.labelSize:0);l>0&&(u?(ue-=l,3==a?(ce+=l,r=!0):n=!0):(le-=l,0==a?(se+=l,e=!0):t=!0))}})),Ae[0]=e,Ae[1]=n,Ae[2]=t,Ae[3]=r,ue-=Ue[1]+Ue[3],ce+=Ue[3],le-=Ue[2]+Ue[0],se+=Ue[0]}(),function(){var e=ce+ue,t=se+le,n=ce,r=se;function i(i,o){switch(i){case 1:return(e+=o)-o;case 2:return(t+=o)-o;case 3:return(n-=o)+o;case 0:return(r-=o)+o}}b.forEach((function(e,t){if(e.show&&e._show){var n=e.side;e._pos=i(n,e._size),null!=e.label&&(e._lpos=i(n,e.labelSize))}}))}();var n=r.bbox;fe=n.left=su(ce*Qo,.5),de=n.top=su(se*Qo,.5),he=n.width=su(ue*Qo,.5),pe=n.height=su(le*Qo,.5)}r.setSize=function(e){be(e.width,e.height)};var we=r.cursor=Bu({},El,{drag:{y:2==i}},e.cursor);we.idxs=z,we._lock=!1;var xe=we.points;xe.show=du(xe.show),xe.size=du(xe.size),xe.stroke=du(xe.stroke),xe.width=du(xe.width),xe.fill=du(xe.fill);var ke=r.focus=Bu({},e.focus||{alpha:.3},we.focus),Ce=ke.prox>=0,Ee=[null];function Se(e,t){if(1==i||t>0){var n=1==i&&D[e.scale].time,o=e.value;e.value=n?Au(o)?Dl(P,bl(o,I)):o||j:o||Yl,e.label=e.label||(n?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Sc||vu,e.fillTo=du(e.fillTo||rc),e.pxAlign=+Va(e.pxAlign,m),e.pxRound=uc(e.pxAlign),e.stroke=du(e.stroke||null),e.fill=du(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;var a=ql(e.width,1),u=e.points=Bu({},{size:a,width:nu(1,.2*a),stroke:e.stroke,space:2*a,paths:Ac,_stroke:null,_fill:null},e.points);u.show=du(u.show),u.filter=du(u.filter),u.fill=du(u.fill),u.stroke=du(u.stroke),u.paths=du(u.paths),u.pxAlign=e.pxAlign}if(H){var l=function(e,t){if(0==t&&(Q||!U.live||2==i))return Eu;var n=[],o=Da("tr","u-series",L,L.childNodes[t]);ga(o,e.class),e.show||ga(o,Jo);var a=Da("th",null,o);if(Y.show){var u=wa("u-marker",a);if(t>0){var l=Y.width(r,t);l&&(u.style.border=l+"px "+Y.dash(r,t)+" "+Y.stroke(r,t)),u.style.background=Y.fill(r,t)}}var c=wa(Zo,a);for(var s in c.textContent=e.label,t>0&&(Y.show||(c.style.color=e.width>0?Y.stroke(r,t):Y.fill(r,t)),re("click",a,(function(t){if(!we._lock){var n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=U.isolate){var r=_.some((function(e,t){return t>0&&t!=n&&e.show}));_.forEach((function(e,t){t>0&&Pt(t,r?t==n?ee:te:ee,!0,an.setSeries)}))}else Pt(n,{show:!e.show},!0,an.setSeries)}})),Ce&&re(ca,a,(function(t){we._lock||Pt(_.indexOf(e),It,!0,an.setSeries)}))),V){var f=Da("td","u-value",o);f.textContent="--",n.push(f)}return[o,n]}(e,t);q.splice(t,0,l[0]),W.splice(t,0,l[1]),U.values.push(null)}if(we.show){z.splice(t,0,null);var c=function(e,t){if(t>0){var n=we.points.show(r,t);if(n)return ga(n,"u-cursor-pt"),ga(n,e.class),ka(n,-10,-10,ue,le),v.insertBefore(n,Ee[t]),n}}(e,t);c&&Ee.splice(t,0,c)}on("addSeries",t)}r.addSeries=function(e,t){e=Nc(e,t=null==t?_.length:t,Ml,Gl),_.splice(t,0,e),Se(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),H){U.values.splice(e,1),W.splice(e,1);var t=q.splice(e,1)[0];ie(null,t.firstChild),t.remove()}we.show&&(z.splice(e,1),Ee.length>1&&Ee.splice(e,1)[0].remove()),on("delSeries",e)};var Ae=[!1,!1,!1,!1];function Fe(e,t,n,r){var i=_t(n,4),o=i[0],a=i[1],u=i[2],l=i[3],c=t%2,s=0;return 0==c&&(l||a)&&(s=0==t&&!o||2==t&&!u?Xa(Bl.size/3):0),1==c&&(o||u)&&(s=1==t&&!a||3==t&&!l?Xa(Vl.size/2):0),s}var Ne,Oe,Te,Be,Me,Le,Pe,Ie,$e,Re,je,ze=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((function(e){return du(Va(e,Fe))})),Ue=r._padding=ze.map((function(e,t){return e(r,t,Ae,0)})),He=null,Ye=null,Ve=1==i?_[0].idxs:null,qe=null,We=!1;function Qe(e,n){if(t=null==e?[]:Tu(e,Nu),2==i){Ne=0;for(var o=1;o<_.length;o++)Ne+=t[o][0].length;r.data=t=e}else if(null==t[0]&&(t[0]=[]),r.data=t.slice(),qe=t[0],Ne=qe.length,2==O){t[0]=Array(Ne);for(var a=0;a=0,_e=!0,wt()}}function Ge(){var e,n;if(We=!0,1==i)if(Ne>0){if(He=Ve[0]=0,Ye=Ve[1]=Ne-1,e=t[0][He],n=t[0][Ye],2==O)e=He,n=Ye;else if(1==Ne)if(3==O){var r=_t(Ra(e,e,N.log,!1),2);e=r[0],n=r[1]}else if(4==O){var o=_t(ja(e,e,N.log,!1),2);e=o[0],n=o[1]}else if(N.time)n=e+Xa(86400/g);else{var a=_t(Ya(e,n,.1,!0),2);e=a[0],n=a[1]}}else He=Ve[0]=e=null,Ye=Ve[1]=n=null;Lt(x,e,n)}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oa,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cu,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"butt",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:oa,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"round";e!=Oe&&(d.strokeStyle=Oe=e),i!=Te&&(d.fillStyle=Te=i),t!=Be&&(d.lineWidth=Be=t),o!=Le&&(d.lineJoin=Le=o),r!=Pe&&(d.lineCap=Pe=r),n!=Me&&d.setLineDash(Me=n)}function Ze(e,t,n,r){t!=Te&&(d.fillStyle=Te=t),e!=Ie&&(d.font=Ie=e),n!=$e&&(d.textAlign=$e=n),r!=Re&&(d.textBaseline=Re=r)}function Ke(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(i.length>0&&e.auto(r,We)&&(null==t||null==t.min)){var a=Va(He,0),u=Va(Ye,i.length-1),l=null==n.min?3==e.distr?Pa(i,a,u):La(i,a,u,o):[n.min,n.max];e.min=tu(e.min,n.min=l[0]),e.max=nu(e.max,n.max=l[1])}}function Xe(e,t){var n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function et(e,n){var i=n?_[e].points:_[e],o=i._stroke,a=i._fill,u=i._paths,l=u.stroke,c=u.fill,s=u.clip,f=u.flags,h=null,p=bu(i.width*Qo,3),v=p%2/2;n&&null==a&&(a=p>0?"#fff":o);var m=1==i.pxAlign;if(m&&d.translate(v,v),!n){var y=fe,g=de,b=he,D=pe,x=p*Qo/2;0==i.min&&(D+=x),0==i.max&&(g-=x,D+=x),(h=new Path2D).rect(y,g,b,D)}n?tt(o,p,i.dash,i.cap,a,l,c,f,s):function(e,n,i,o,a,u,l,c,s,f,d){var h=!1;w.forEach((function(p,v){if(p.series[0]==e){var m,y=_[p.series[1]],g=t[p.series[1]],b=(y._paths||ku).band;Su(b)&&(b=1==p.dir?b[0]:b[1]);var D=null;y.show&&b&&function(e,t,n){for(t=Va(t,0),n=Va(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,He,Ye)?(D=p.fill(r,v)||u,m=y._paths.clip):b=null,tt(n,i,o,a,D,l,c,s,f,d,m,b),h=!0}})),h||tt(n,i,o,a,u,l,c,s,f,d)}(e,o,p,i.dash,i.cap,a,l,c,f,h,s),m&&d.translate(-v,-v)}r.setData=Qe;function tt(e,t,n,r,i,o,a,u,l,c,s,f){Je(e,t,n,r,i),(l||c||f)&&(d.save(),l&&d.clip(l),c&&d.clip(c)),f?3==(3&u)?(d.clip(f),s&&d.clip(s),rt(i,a),nt(e,o,t)):2&u?(rt(i,a),d.clip(f),nt(e,o,t)):1&u&&(d.save(),d.clip(f),s&&d.clip(s),rt(i,a),d.restore(),nt(e,o,t)):(rt(i,a),nt(e,o,t)),(l||c||f)&&d.restore()}function nt(e,t,n){n>0&&(t instanceof Map?t.forEach((function(e,t){d.strokeStyle=Oe=t,d.stroke(e)})):null!=t&&e&&d.stroke(t))}function rt(e,t){t instanceof Map?t.forEach((function(e,t){d.fillStyle=Te=t,d.fill(e)})):null!=t&&e&&d.fill(t)}function it(e,t,n,r,i,o,a,u,l,c){var s=a%2/2;1==m&&d.translate(s,s),Je(u,a,l,c,u),d.beginPath();var f,h,p,v,y=i+(0==r||3==r?-o:o);0==n?(h=i,v=y):(f=i,p=y);for(var g=0;g0&&(t._paths=null,e&&(1==i?(t.min=null,t.max=null):t.facets.forEach((function(e){e.min=null,e.max=null}))))}))}var lt,ct,st,ft,dt,ht,pt,vt,mt,yt,gt,bt,Dt=!1;function wt(){Dt||(Lu(xt),Dt=!0)}function xt(){ve&&(!function(){var e=Tu(D,Nu);for(var n in e){var o=e[n],a=T[n];if(null!=a&&null!=a.min)Bu(o,a),n==x&&ut(!0);else if(n!=x||2==i)if(0==Ne&&null==o.from){var u=o.range(r,null,null,n);o.min=u[0],o.max=u[1]}else o.min=lu,o.max=-lu}if(Ne>0)for(var l in _.forEach((function(n,o){if(1==i){var a=n.scale,u=e[a],l=T[a];if(0==o){var c=u.range(r,u.min,u.max,a);u.min=c[0],u.max=c[1],He=Ba(u.min,t[0]),Ye=Ba(u.max,t[0]),t[0][He]u.max&&Ye--,n.min=qe[He],n.max=qe[Ye]}else n.show&&n.auto&&Ke(u,l,n,t[o],n.sorted);n.idxs[0]=He,n.idxs[1]=Ye}else if(o>0&&n.show&&n.auto){var s=_t(n.facets,2),f=s[0],d=s[1],h=f.scale,p=d.scale,v=_t(t[o],2),m=v[0],y=v[1];Ke(e[h],T[h],f,m,f.sorted),Ke(e[p],T[p],d,y,d.sorted),n.min=d.min,n.max=d.max}})),e){var c=e[l],s=T[l];if(null==c.from&&(null==s||null==s.min)){var f=c.range(r,c.min==lu?null:c.min,c.max==-lu?null:c.max,l);c.min=f[0],c.max=f[1]}}for(var d in e){var h=e[d];if(null!=h.from){var p=e[h.from];if(null==p.min)h.min=h.max=null;else{var v=h.range(r,p.min,p.max,d);h.min=v[0],h.max=v[1]}}}var m={},y=!1;for(var g in e){var b=e[g],w=D[g];if(w.min!=b.min||w.max!=b.max){w.min=b.min,w.max=b.max;var k=w.distr;w._min=3==k?ou(w.min):4==k?uu(w.min,w.asinh):w.min,w._max=3==k?ou(w.max):4==k?uu(w.max,w.asinh):w.max,m[g]=y=!0}}if(y){for(var C in _.forEach((function(e,t){2==i?t>0&&m.y&&(e._paths=null):m[e.scale]&&(e._paths=null)})),m)ye=!0,on("setScale",C);we.show&&(ge=_e=we.left>=0)}for(var E in T)T[E]=null}(),ve=!1),ye&&(!function(){for(var e=!1,t=0;!e;){var n=ot(++t),i=at(t);(e=3==t||n&&i)||(De(r.width,r.height),me=!0)}}(),ye=!1),me&&(ba(p,na,ce),ba(p,ea,se),ba(p,Ko,ue),ba(p,Xo,le),ba(v,na,ce),ba(v,ea,se),ba(v,Ko,ue),ba(v,Xo,le),ba(h,Ko,oe),ba(h,Xo,ae),f.width=Xa(oe*Qo),f.height=Xa(ae*Qo),b.forEach((function(e){var t=e._el,n=e._show,r=e._size,i=e._pos,o=e.side;if(null!=t)if(n){var a=o%2==1;ba(t,a?"left":"top",i-(3===o||0===o?r:0)),ba(t,a?"width":"height",r),ba(t,a?"top":"left",a?se:ce),ba(t,a?"height":"width",a?le:ue),_a(t,Jo)}else ga(t,Jo)})),Oe=Te=Be=Le=Pe=Ie=$e=Re=Me=null,je=1,Wt(!0),on("setSize"),me=!1),oe>0&&ae>0&&(d.clearRect(0,0,f.width,f.height),on("drawClear"),C.forEach((function(e){return e()})),on("draw")),we.show&&ge&&(Vt(null,!0,!1),ge=!1),c||(c=!0,r.status=1,on("ready")),We=!1,Dt=!1}function kt(e,n){var i=D[e];if(null==i.from){if(0==Ne){var o=i.range(r,n.min,n.max,e);n.min=o[0],n.max=o[1]}if(n.min>n.max){var a=n.min;n.min=n.max,n.max=a}if(Ne>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==x&&2==i.distr&&Ne>0&&(n.min=Ba(n.min,t[0]),n.max=Ba(n.max,t[0]),n.min==n.max&&n.max++),T[e]=n,ve=!0,wt()}}r.redraw=function(e,t){ye=t||!1,!1!==e?Lt(x,N.min,N.max):wt()},r.setScale=kt;var Ct=!1,Et=we.drag,St=Et.x,At=Et.y;we.show&&(we.x&&(lt=wa("u-cursor-x",v)),we.y&&(ct=wa("u-cursor-y",v)),0==N.ori?(st=lt,ft=ct):(st=ct,ft=lt),gt=we.left,bt=we.top);var Ft,Nt,Ot,Tt=r.select=Bu({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Tt.show?wa("u-select",Tt.over?v:p):null;function Mt(e,t){if(Tt.show){for(var n in e)ba(Bt,n,Tt[n]=e[n]);!1!==t&&on("setSelect")}}function Lt(e,t,n){kt(e,{min:t,max:n})}function Pt(e,t,n,o){null!=t.focus&&function(e){if(e!=Ot){var t=null==e,n=1!=ke.alpha;_.forEach((function(r,i){var o=t||0==i||i==e;r._focus=t?null:o,n&&function(e,t){_[e].alpha=t,we.show&&Ee[e]&&(Ee[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(i,o?1:ke.alpha)})),Ot=e,n&&wt()}}(e),null!=t.show&&_.forEach((function(n,r){r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){var n=_[e],r=H?q[e]:null;n.show?r&&_a(r,Jo):(r&&ga(r,Jo),Ee.length>1&&ka(Ee[e],-10,-10,ue,le))}(r,t.show),Lt(2==i?n.facets[1].scale:n.scale,null,null),wt())})),!1!==n&&on("setSeries",e,t),o&&cn("setSeries",r,e,t)}r.setSelect=Mt,r.setSeries=Pt,r.addBand=function(e,t){e.fill=du(e.fill||null),e.dir=Va(e.dir,-1),t=null==t?w.length:t,w.splice(t,0,e)},r.setBand=function(e,t){Bu(w[e],t)},r.delBand=function(e){null==e?w.length=0:w.splice(e,1)};var It={focus:!0};function $t(e,t,n){var r=D[t];n&&(e=e/Qo-(1==r.ori?se:ce));var i=ue;1==r.ori&&(e=(i=le)-e),-1==r.dir&&(e=i-e);var o=r._min,a=o+(r._max-o)*(e/i),u=r.distr;return 3==u?ru(10,a):4==u?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ga.sinh(e)*t}(a,r.asinh):a}function Rt(e,t){ba(Bt,na,Tt.left=e),ba(Bt,Ko,Tt.width=t)}function jt(e,t){ba(Bt,ea,Tt.top=e),ba(Bt,Xo,Tt.height=t)}H&&Ce&&Oa(sa,L,(function(e){we._lock||null!=Ot&&Pt(null,It,!0,an.setSeries)})),r.valToIdx=function(e){return Ba(e,t[0])},r.posToIdx=function(e,n){return Ba($t(e,x,n),t[0],He,Ye)},r.posToVal=$t,r.valToPos=function(e,t,n){return 0==D[t].ori?a(e,D[t],n?he:ue,n?fe:0):u(e,D[t],n?pe:le,n?de:0)},r.batch=function(e){e(r),wt()},r.setCursor=function(e,t,n){gt=e.left,bt=e.top,Vt(null,t,n)};var zt=0==N.ori?Rt:jt,Ut=1==N.ori?Rt:jt;function Ht(e,t){if(null!=e){var n=e.idx;U.idx=n,_.forEach((function(e,t){(t>0||!Q)&&Yt(t,n)}))}H&&U.live&&function(){if(H&&U.live)for(var e=2==i?1:0;e<_.length;e++)if(0!=e||!Q){var t=U.values[e],n=0;for(var r in t)W[e][n++].firstChild.nodeValue=t[r]}}(),_e=!1,!1!==t&&on("setLegend")}function Yt(e,n){var i;if(null==n)i=G;else{var o=_[e],a=0==e&&2==O?qe:t[e];i=Q?o.values(r,e,n):{_:o.value(r,a[n],e,n)}}U.values[e]=i}function Vt(e,n,o){mt=gt,yt=bt;var a,u=_t(we.move(r,gt,bt),2);gt=u[0],bt=u[1],we.show&&(st&&ka(st,Xa(gt),0,ue,le),ft&&ka(ft,0,Xa(bt),ue,le));var l=He>Ye;Ft=lu;var s=0==N.ori?ue:le,f=1==N.ori?ue:le;if(gt<0||0==Ne||l){a=null;for(var d=0;d<_.length;d++)d>0&&Ee.length>1&&ka(Ee[d],-10,-10,ue,le);if(Ce&&Pt(null,It,!0,null==e&&an.setSeries),U.live){z.fill(null),_e=!0;for(var h=0;h<_.length;h++)U.values[h]=G}}else{var p,v;1==i&&(a=Ba(p=$t(0==N.ori?gt:bt,x),t[0],He,Ye),v=gu(A(t[0][a],N,s,0),.5));for(var m=2==i?1:0;m<_.length;m++){var y=_[m],g=z[m],b=1==i?t[m][g]:t[m][1][g],w=we.dataIdx(r,m,a,p),k=1==i?t[m][w]:t[m][1][w];_e=_e||k!=b||w!=g,z[m]=w;var C=w==a?v:gu(A(1==i?t[0][w]:t[m][0][w],N,s,0),.5);if(m>0&&y.show){var E=null==k?-10:gu(F(k,1==i?D[y.scale]:D[y.facets[1].scale],f,0),.5);if(E>0&&1==i){var S=Za(E-bt);S<=Ft&&(Ft=S,Nt=m)}var O=void 0,T=void 0;if(0==N.ori?(O=C,T=E):(O=E,T=C),_e&&Ee.length>1){Ea(Ee[m],we.points.fill(r,m),we.points.stroke(r,m));var B=void 0,M=void 0,L=void 0,P=void 0,I=!0,$=we.points.bbox;if(null!=$){I=!1;var R=$(r,m);L=R.left,P=R.top,B=R.width,M=R.height}else L=O,P=T,B=M=we.points.size(r,m);Aa(Ee[m],B,M,I),ka(Ee[m],L,P,ue,le)}}if(U.live){if(!_e||0==m&&Q)continue;Yt(m,w)}}}if(we.idx=a,we.left=gt,we.top=bt,_e&&(U.idx=a,Ht()),Tt.show&&Ct)if(null!=e){var j=_t(an.scales,2),H=j[0],Y=j[1],V=_t(an.match,2),q=V[0],W=V[1],J=_t(e.cursor.sync.scales,2),Z=J[0],K=J[1],X=e.cursor.drag;if(St=X._x,At=X._y,St||At){var ee,te,ne,re,ie,oe=e.select,ae=oe.left,ce=oe.top,se=oe.width,fe=oe.height,de=e.scales[H].ori,he=e.posToVal,pe=null!=H&&q(H,Z),ve=null!=Y&&W(Y,K);pe&&St?(0==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[H],re=A(he(ee,Z),ne,s,0),ie=A(he(ee+te,Z),ne,s,0),zt(tu(re,ie),Za(ie-re))):zt(0,s),ve&&At?(1==de?(ee=ae,te=se):(ee=ce,te=fe),ne=D[Y],re=F(he(ee,K),ne,f,0),ie=F(he(ee+te,K),ne,f,0),Ut(tu(re,ie),Za(ie-re))):Ut(0,f)}else Zt()}else{var me=Za(mt-dt),ye=Za(yt-ht);if(1==N.ori){var ge=me;me=ye,ye=ge}St=Et.x&&me>=Et.dist,At=Et.y&&ye>=Et.dist;var be,De,xe=Et.uni;null!=xe?St&&At&&(At=ye>=xe,(St=me>=xe)||At||(ye>me?At=!0:St=!0)):Et.x&&Et.y&&(St||At)&&(St=At=!0),St&&(0==N.ori?(be=pt,De=gt):(be=vt,De=bt),zt(tu(be,De),Za(De-be)),At||Ut(0,f)),At&&(1==N.ori?(be=pt,De=gt):(be=vt,De=bt),Ut(tu(be,De),Za(De-be)),St||zt(0,s)),St||At||(zt(0,0),Ut(0,0))}if(Et._x=St,Et._y=At,null==e){if(o){if(null!=un){var Se=_t(an.scales,2),Ae=Se[0],Fe=Se[1];an.values[0]=null!=Ae?$t(0==N.ori?gt:bt,Ae):null,an.values[1]=null!=Fe?$t(1==N.ori?gt:bt,Fe):null}cn(aa,r,gt,bt,ue,le,a)}if(Ce){var Oe=o&&an.setSeries,Te=ke.prox;null==Ot?Ft<=Te&&Pt(Nt,It,!0,Oe):Ft>Te?Pt(null,It,!0,Oe):Nt!=Ot&&Pt(Nt,It,!0,Oe)}}c&&!1!==n&&on("setCursor")}r.setLegend=Ht;var qt=null;function Wt(e){!0===e?qt=null:on("syncRect",qt=v.getBoundingClientRect())}function Qt(e,t,n,r,i,o,a){we._lock||(Gt(e,t,n,r,i,o,a,!1,null!=e),null!=e?Vt(null,!0,!0):Vt(t,!0,!1))}function Gt(e,t,n,i,o,a,u,c,s){if(null==qt&&Wt(!1),null!=e)n=e.clientX-qt.left,i=e.clientY-qt.top;else{if(n<0||i<0)return gt=-10,void(bt=-10);var f=_t(an.scales,2),d=f[0],h=f[1],p=t.cursor.sync,v=_t(p.values,2),m=v[0],y=v[1],g=_t(p.scales,2),_=g[0],b=g[1],w=_t(an.match,2),x=w[0],k=w[1],C=t.axes[0].side%2==1,E=0==N.ori?ue:le,S=1==N.ori?ue:le,A=C?a:o,F=C?o:a,O=C?i:n,T=C?n:i;if(n=null!=_?x(d,_)?l(m,D[d],E,0):-10:E*(O/A),i=null!=b?k(h,b)?l(y,D[h],S,0):-10:S*(T/F),1==N.ori){var B=n;n=i,i=B}}if(s&&((n<=1||n>=ue-1)&&(n=su(n,ue)),(i<=1||i>=le-1)&&(i=su(i,le))),c){dt=n,ht=i;var M=_t(we.move(r,n,i),2);pt=M[0],vt=M[1]}else gt=n,bt=i}var Jt={width:0,height:0};function Zt(){Mt(Jt,!1)}function Kt(e,t,n,i,o,a,u){Ct=!0,St=At=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!0,!1),null!=e&&(re(la,va,Xt),cn(ua,r,pt,vt,ue,le,null))}function Xt(e,t,n,i,o,a,u){Ct=Et._x=Et._y=!1,Gt(e,t,n,i,o,a,0,!1,!0);var l=Tt.left,c=Tt.top,s=Tt.width,f=Tt.height,d=s>0||f>0;if(d&&Mt(Tt),Et.setScale&&d){var h=l,p=s,v=c,m=f;if(1==N.ori&&(h=c,p=f,v=l,m=s),St&&Lt(x,$t(h,x),$t(h+p,x)),At)for(var y in D){var g=D[y];y!=x&&null==g.from&&g.min!=lu&&Lt(y,$t(v+m,y),$t(v,y))}Zt()}else we.lock&&(we._lock=!we._lock,we._lock||Vt(null,!0,!1));null!=e&&(ie(la,va),cn(la,r,gt,bt,ue,le,null))}function en(e,t,n,i,o,a,u){Ge(),Zt(),null!=e&&cn(fa,r,gt,bt,ue,le,null)}function tn(){b.forEach(jc),be(r.width,r.height,!0)}Oa(ha,ma,tn);var nn={};nn.mousedown=Kt,nn.mousemove=Qt,nn.mouseup=Xt,nn.dblclick=en,nn.setSeries=function(e,t,n,r){Pt(n,r,!0,!1)},we.show&&(re(ua,v,Kt),re(aa,v,Qt),re(ca,v,Wt),re(sa,v,(function(e,t,n,r,i,o,a){if(!we._lock){var u=Ct;if(Ct){var l,c,s=!0,f=!0;0==N.ori?(l=St,c=At):(l=At,c=St),l&&c&&(s=gt<=10||gt>=ue-10,f=bt<=10||bt>=le-10),l&&s&&(gt=gt=3?Hl:pu)),e.font=Rc(e.font),e.labelFont=Rc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(Ae[t]=!0,e._el=wa("u-axis",h))}})),n?n instanceof HTMLElement?(n.appendChild(s),sn()):n(r,sn):sn(),r}zc.assign=Bu,zc.fmtNum=Qa,zc.rangeNum=Ya,zc.rangeLog=Ra,zc.rangeAsinh=ja,zc.orient=tc,zc.pxRatio=Qo,zc.join=function(e,t){for(var n=new Set,r=0;r=o&&A<=a;A+=k){var F=c[A];if(null!=F){var N=_(l[A]),O=b(F);1==t?D(x,N,C):D(x,S,O),D(x,N,O),C=O,S=N}}var T=_t(nc(e,i),2),B=T[0],M=T[1];if(null!=u.fill||0!=B){var L=w.fill=new Path2D(x),P=b(u.fillTo(e,i,u.min,u.max,B));D(L,S,P),D(L,E,P)}if(!u.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(l,c,o,a,k,_,r)));var R=u.width*Qo/2,j=n||1==t?R:-R,z=n||-1==t?-R:R;$.forEach((function(e){e[0]+=j,e[1]+=z})),w.gaps=$=u.gaps(e,i,o,a,$),w.clip=oc($,s.ori,p,v,m,y)}return 0!=M&&(w.band=2==M?[ic(e,i,o,a,x,-1),ic(e,i,o,a,x,1)]:ic(e,i,o,a,x,M)),w}))}},Uc.bars=function(e){var t=Va((e=e||ku).size,[.6,lu,1]),n=e.align||0,r=(e.gap||0)*Qo,i=Va(e.radius,0),o=1-t[0],a=Va(t[1],lu)*Qo,u=Va(t[2],1)*Qo,l=Va(e.disp,ku),c=Va(e.each,(function(e){})),s=l.fill,f=l.stroke;return function(e,t,d,h){return tc(e,t,(function(p,v,m,y,g,_,b,D,w,x,k){var C,E,S=p.pxRound,A=y.dir*(0==y.ori?1:-1),F=g.dir*(1==g.ori?1:-1),N=0==y.ori?hc:pc,O=0==y.ori?c:function(e,t,n,r,i,o,a){c(e,t,n,i,r,a,o)},T=_t(nc(e,t),2),B=T[0],M=T[1],L=3==g.distr?1==B?g.max:g.min:0,P=b(L,g,k,w),I=S(p.width*Qo),$=!1,R=null,j=null,z=null,U=null;null==s||0!=I&&null==f||($=!0,R=s.values(e,t,d,h),j=new Map,new Set(R).forEach((function(e){null!=e&&j.set(e,new Path2D)})),I>0&&(z=f.values(e,t,d,h),U=new Map,new Set(z).forEach((function(e){null!=e&&U.set(e,new Path2D)}))));var H=l.x0,Y=l.size;if(null!=H&&null!=Y){v=H.values(e,t,d,h),2==H.unit&&(v=v.map((function(t){return e.posToVal(D+t*x,y.key,!0)})));var V=Y.values(e,t,d,h);E=S((E=2==Y.unit?V[0]*x:_(V[0],y,x,D)-_(0,y,x,D))-I),C=1==A?-I/2:E+I/2}else{var q=x;if(v.length>1)for(var W=null,Q=0,G=1/0;Q=d&&Q<=h;Q+=A){var ie=m[Q];if(void 0!==ie){var oe=_(2!=y.distr||null!=l?v[Q]:Q,y,x,D),ae=b(Va(ie,L),g,k,w);null!=re&&null!=ie&&(P=b(re[Q],g,k,w));var ue=S(oe-C),le=S(nu(ae,P)),ce=S(tu(ae,P)),se=le-ce,fe=i*E;null!=ie&&($?(I>0&&null!=z[Q]&&N(U.get(z[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe),null!=R[Q]&&N(j.get(R[Q]),ue,ce+Ka(I/2),E,nu(0,se-I),fe)):N(X,ue,ce+Ka(I/2),E,nu(0,se-I),fe),O(e,t,Q,ue-I/2,ce,E+I,se)),0!=M&&(F*M==1?(le=ce,ce=Z):(ce=le,le=Z),N(ee,ue-I/2,ce,E+I,nu(0,se=le-ce),0))}}return I>0&&(K.stroke=$?U:X),K.fill=$?j:X,K}))}},Uc.spline=function(e){return function(e,t){var n=Va(null===t||void 0===t?void 0:t.alignGaps,0);return function(t,r,i,o){return tc(t,r,(function(a,u,l,c,s,f,d,h,p,v,m){var y,g,_,b=a.pxRound,D=function(e){return b(f(e,c,v,h))},w=function(e){return b(d(e,s,m,p))};0==c.ori?(y=cc,_=fc,g=yc):(y=sc,_=dc,g=gc);var x=c.dir*(0==c.ori?1:-1);i=Ma(l,i,o,1),o=Ma(l,i,o,-1);for(var k=D(u[1==x?i:o]),C=k,E=[],S=[],A=1==x?i:o;A>=i&&A<=o;A+=x)if(null!=l[A]){var F=D(u[A]);E.push(C=F),S.push(w(l[A]))}var N={stroke:e(E,S,y,_,g,b),fill:null,clip:null,band:null,gaps:null,flags:1},O=N.stroke,T=_t(nc(t,r),2),B=T[0],M=T[1];if(null!=a.fill||0!=B){var L=N.fill=new Path2D(O),P=w(a.fillTo(t,r,a.min,a.max,B));_(L,C,P),_(L,k,P)}if(!a.spanGaps){var I,$=[];(I=$).push.apply(I,bt(ac(u,l,i,o,x,D,n))),N.gaps=$=a.gaps(t,r,i,o,$),N.clip=oc($,c.ori,h,p,v,m)}return 0!=M&&(N.band=2==M?[ic(t,r,i,o,O,-1),ic(t,r,i,o,O,1)]:ic(t,r,i,o,O,M)),N}))}}(kc,e)};var Hc,Yc={height:500,legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:function(){return null},dblclick:function(){return null}}}},Vc=function(e){return void 0===e||null===e?"":e.toLocaleString("en-US",{maximumSignificantDigits:20})},qc=function(e,t,n,r){var i,o=e.axes[n];if(r>1)return o._size||60;var a=6+((null===o||void 0===o||null===(i=o.ticks)||void 0===i?void 0:i.size)||0)+(o.gap||0),u=(null!==t&&void 0!==t?t:[]).reduce((function(e,t){return t.length>e.length?t:e}),"");return""!=u&&(a+=function(e,t){var n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);var r=n.offsetWidth;return n.remove(),r}(u,e.ctx.font)),Math.ceil(a)},Wc=function(e){return function(e){for(var t=0,n=0;n>8*i&255).toString(16)).substr(-2);return r}(e)},Qc=function(e){return e.replace(/^\[\d+]/,"").replace(/{.+}/gim,"")},Gc=function(e){for(var t=e.length,n=-1/0;t--;){var r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Jc=function(e){for(var t=e.length,n=1/0;t--;){var r=e[t];Number.isFinite(r)&&r2&&void 0!==arguments[2]?arguments[2]:"";return t.map((function(e){return"".concat(Vc(e)," ").concat(n)}))}(e,n,t)}};return e?Number(e)%2?n:Kn(Kn({},n),{},{side:1}):{space:80}}))},Kc=function(e,t){if(null==e||null==t)return[-1,1];var n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Xc=n(61),es=n.n(Xc),ts=function(e){var t=e.u,n=e.id,r=e.unit,i=void 0===r?"":r,o=e.metrics,a=e.series,u=e.tooltipIdx,l=e.tooltipOffset,c=e.isSticky,s=e.onClose,f=re(null),d=_t(X({top:-999,left:-999}),2),h=d[0],p=d[1],v=_t(X(!1),2),y=v[0],g=v[1],_=_t(X(!1),2),b=_[0],D=_[1],w=_t(X(u.seriesIdx),2),x=w[0],k=w[1],C=_t(X(u.dataIdx),2),E=C[0],S=C[1],A=oe((function(){return t.root.querySelector(".u-wrap")}),[t]),F=oe((function(){return ir()(t,["data",x,E],0)}),[t,x,E]),N=oe((function(){return Vc(F)}),[F]),O=oe((function(){return t.data[0][E]}),[t,E]),T=oe((function(){return yr()(new Date(1e3*O)).format("YYYY-MM-DD HH:mm:ss:SSS (Z)")}),[O]),B=oe((function(){var e;return Wc((null===(e=a[x])||void 0===e?void 0:e.label)||"")}),[a,x]),M=oe((function(){var e,t=((null===(e=a[x])||void 0===e?void 0:e.label)||"").replace(/{.+}/gim,"").trim();return Qc(t)}),[]),L=oe((function(){var e,t=(null===(e=o[x-1])||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((function(e){return"__name__"!==e}));return n.map((function(e){return"".concat(e,'="').concat(t[e],'"')}))}),[o,x]),P=function(e){if(y){var t=e.clientX,n=e.clientY;p({top:n,left:t})}},I=function(){g(!1)};return te((function(){var e;if(f.current){var n=t.valToPos(F||0,(null===(e=a[x])||void 0===e?void 0:e.scale)||"1"),r=t.valToPos(O,"x"),i=f.current.getBoundingClientRect(),o=i.width,u=i.height,c=t.over.getBoundingClientRect(),s=r+o>=c.width?o+20:0,d=n+u>=c.height?u+20:0;p({top:n+l.top+10-d,left:r+l.left+10-s})}}),[t,F,O,x,l,f]),te((function(){k(u.seriesIdx),S(u.dataIdx)}),[u]),te((function(){return y&&(document.addEventListener("mousemove",P),document.addEventListener("mouseup",I)),function(){document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",I)}}),[y]),!A||u.seriesIdx<0||u.dataIdx<0?null:mt.createPortal(fr("div",{className:Bi()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":c,"vm-chart-tooltip_moved":b}),ref:f,style:h,children:[fr("div",{className:"vm-chart-tooltip-header",children:[fr("div",{className:"vm-chart-tooltip-header__date",children:T}),c&&fr(m,{children:[fr(ho,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:fr(Oi,{}),onMouseDown:function(e){D(!0),g(!0);var t=e.clientX,n=e.clientY;p({top:n,left:t})}}),fr(ho,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:fr(ai,{}),onClick:function(){s&&s(n)}})]})]}),fr("div",{className:"vm-chart-tooltip-data",children:[fr("div",{className:"vm-chart-tooltip-data__marker",style:{background:B}}),fr("p",{children:[M,":",fr("b",{className:"vm-chart-tooltip-data__value",children:N}),i]})]}),!!L.length&&fr("div",{className:"vm-chart-tooltip-info",children:L.map((function(e,t){return fr("div",{children:e},"".concat(e,"_").concat(t))}))})]}),A)};!function(e){e.xRange="xRange",e.yRange="yRange",e.data="data"}(Hc||(Hc={}));var ns=function(e){var t=e.data,n=e.series,r=e.metrics,i=void 0===r?[]:r,o=e.period,a=e.yaxis,u=e.unit,l=e.setPeriod,c=e.container,s=re(null),f=_t(X(!1),2),d=f[0],p=f[1],v=_t(X({min:o.start,max:o.end}),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=bo(c),w=_t(X(!1),2),x=w[0],k=w[1],C=_t(X({seriesIdx:-1,dataIdx:-1}),2),E=C[0],S=C[1],A=_t(X({left:0,top:0}),2),F=A[0],N=A[1],O=_t(X([]),2),T=O[0],B=O[1],M=oe((function(){return"".concat(E.seriesIdx,"_").concat(E.dataIdx)}),[E]),L=ae(es()((function(e){var t=e.min,n=e.max;l({from:new Date(1e3*t),to:new Date(1e3*n)})}),500),[]),P=function(e){var t=e.u,n=e.min,r=e.max,i=1e3*(r-n);iAr||(t.setScale("x",{min:n,max:r}),y({min:n,max:r}),L({min:n,max:r}))},I=function(e){var t=e.target,n=e.ctrlKey,r=e.metaKey,i=e.key,o=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(_&&!o){var a="+"===i||"="===i;if(("-"===i||a)&&!n&&!r){e.preventDefault();var u=(m.max-m.min)/10*(a?1:-1);P({u:_,min:m.min+u,max:m.max-u})}}},$=function(){var e="".concat(E.seriesIdx,"_").concat(E.dataIdx),t={id:e,unit:u,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F};if(!T.find((function(t){return t.id===e}))){var r=JSON.parse(JSON.stringify(t));B((function(e){return[].concat(bt(e),[r])}))}},R=function(e){B((function(t){return t.filter((function(t){return t.id!==e}))}))},j=function(){return[m.min,m.max]},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0;return a.limits.enable?a.limits.range[r]:Kc(t,n)},U=Kn(Kn({},Yc),{},{series:n,axes:Zc([{},{scale:"1"}],u),scales:Kn({},function(){var e={x:{range:j}},t=Object.keys(a.limits.range);return(t.length?t:["1"]).forEach((function(t){e[t]={range:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(e,n,r,t)}}})),e}()),width:D.width||400,plugins:[{hooks:{ready:function(e){N({left:parseFloat(e.over.style.left),top:parseFloat(e.over.style.top)}),e.over.addEventListener("mousedown",(function(t){var n=t.ctrlKey,r=t.metaKey;0===t.button&&(n||r)&&function(e){var t=e.e,n=e.factor,r=void 0===n?.85:n,i=e.u,o=e.setPanning,a=e.setPlotScale;t.preventDefault(),o(!0);var u=t.clientX,l=i.posToVal(1,"x")-i.posToVal(0,"x"),c=i.scales.x.min||0,s=i.scales.x.max||0,f=function(e){e.preventDefault();var t=l*((e.clientX-u)*r);a({u:i,min:c-t,max:s-t})};document.addEventListener("mousemove",f),document.addEventListener("mouseup",(function e(){o(!1),document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",e)}))}({u:e,e:t,setPanning:p,setPlotScale:P,factor:.9})})),e.over.addEventListener("wheel",(function(t){if(t.ctrlKey||t.metaKey){t.preventDefault();var n=e.over.getBoundingClientRect().width,r=e.cursor.left&&e.cursor.left>0?e.cursor.left:0,i=e.posToVal(r,"x"),o=(e.scales.x.max||0)-(e.scales.x.min||0),a=t.deltaY<0?.9*o:o/.9,u=i-r/n*a,l=u+a;e.batch((function(){return P({u:e,min:u,max:l})}))}}))},setCursor:function(e){var t,n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{dataIdx:n})}))},setSeries:function(e,t){var n=null!==t&&void 0!==t?t:-1;S((function(e){return Kn(Kn({},e),{},{seriesIdx:n})}))}}}],hooks:{setSelect:[function(e){var t=e.posToVal(e.select.left,"x"),n=e.posToVal(e.select.left+e.select.width,"x");P({u:e,min:t,max:n})}]}}),H=function(e){if(_){switch(e){case Hc.xRange:_.scales.x.range=j;break;case Hc.yRange:Object.keys(a.limits.range).forEach((function(e){_.scales[e]&&(_.scales[e].range=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return z(t,n,r,e)})}));break;case Hc.data:_.setData(t)}d||_.redraw()}};return te((function(){return y({min:o.start,max:o.end})}),[o]),te((function(){if(B([]),S({seriesIdx:-1,dataIdx:-1}),s.current){var e=new zc(U,t,s.current);return b(e),y({min:o.start,max:o.end}),e.destroy}}),[s.current,n,D]),te((function(){return window.addEventListener("keydown",I),function(){window.removeEventListener("keydown",I)}}),[m]),te((function(){return H(Hc.data)}),[t]),te((function(){return H(Hc.xRange)}),[m]),te((function(){return H(Hc.yRange)}),[a]),te((function(){var e=-1!==E.dataIdx&&-1!==E.seriesIdx;return k(e),e&&window.addEventListener("click",$),function(){window.removeEventListener("click",$)}}),[E,T]),fr("div",{className:Bi()({"vm-line-chart":!0,"vm-line-chart_panning":d}),children:[fr("div",{className:"vm-line-chart__u-plot",ref:s}),_&&x&&fr(ts,{unit:u,u:_,series:n,metrics:i,tooltipIdx:E,tooltipOffset:F,id:M}),_&&T.map((function(e){return h(ts,Kn(Kn({},e),{},{isSticky:!0,u:_,key:e.id,onClose:R}))}))]})};function rs(){rs=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(A){l=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),u=new C(i||[]);return r(a,"_invoke",{value:D(e,n,u)}),a}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function d(){}function h(){}function p(){}var v={};l(v,o,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,o)&&(v=y);var g=p.prototype=d.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function i(r,o,a,u){var l=s(e[r],e,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==At(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,a,u)}),(function(e){i("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function D(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var u=w(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function is(e,t,n,r,i,o,a){try{var u=e[o](a),l=u.value}catch(c){return void n(c)}u.done?t(l):Promise.resolve(l).then(r,i)}function os(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){is(o,r,i,a,u,"next",e)}function u(e){is(o,r,i,a,u,"throw",e)}a(void 0)}))}}var as=function(e){var t=e.legend,n=e.onChange,r=_t(X(""),2),i=r[0],o=r[1],a=oe((function(){return function(e){var t=Object.keys(e.freeFormFields).filter((function(e){return"__name__"!==e}));return t.map((function(t){var n="".concat(t,'="').concat(e.freeFormFields[t],'"');return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))}(t)}),[t]),u=function(){var e=os(rs().mark((function e(t,n){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:o(n),setTimeout((function(){return o("")}),2e3);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return fr("div",{className:Bi()({"vm-legend-item":!0,"vm-legend-item_hide":!t.checked}),onClick:function(e){return function(t){n(e,t.ctrlKey||t.metaKey)}}(t),children:[fr("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),fr("div",{className:"vm-legend-item-info",children:[fr("span",{className:"vm-legend-item-info__label",children:Qc(t.label)}),"\xa0{",a.map((function(e){return fr(mo,{open:i===e.id,title:"Copied!",placement:"top-center",children:fr("span",{className:"vm-legend-item-info__free-fields",onClick:(t=e.freeField,n=e.id,function(e){e.stopPropagation(),u(t,n)}),children:e.freeField},e.key)},e.id);var t,n})),"}"]})]})},us=function(e){var t=e.labels,n=e.query,r=e.onChange,i=oe((function(){return Array.from(new Set(t.map((function(e){return e.group}))))}),[t]);return fr(m,{children:fr("div",{className:"vm-legend",children:i.map((function(e){return fr("div",{className:"vm-legend-group",children:[fr("div",{className:"vm-legend-group-title",children:[fr("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),fr("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),fr("div",{children:t.filter((function(t){return t.group===e})).map((function(e){return fr(as,{legend:e,onChange:r},e.label)}))})]},e)}))})})};function ls(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var cs=["__name__"],ss=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.metric,o=i.__name__,a=ls(i,cs),u=t||o||"";return 0===Object.keys(e.metric).length?u||"Result ".concat(e.group):"".concat(u," {").concat(Object.entries(a).map((function(e){return"".concat(e[0]).concat(n).concat(r?'"'.concat(e[1],'"'):e[1])})).join(", "),"}")},fs=function(e,t,n){var r=ss(e,n[e.group-1]),i="[".concat(e.group,"]").concat(r);return{label:i,freeFormFields:e.metric,width:1.4,stroke:Wc(i),show:!hs(i,t),scale:"1",points:{size:4.2,width:1.4}}},ds=function(e,t){return{group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields}},hs=function(e,t){return t.includes("".concat(e))},ps=function(e){switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},vs=function(e){var t=e.data,n=void 0===t?[]:t,r=e.period,i=e.customStep,o=e.query,a=e.yaxis,u=e.unit,l=e.showLegend,c=void 0===l||l,s=e.setYaxisLimits,f=e.setPeriod,d=e.alias,h=void 0===d?[]:d,p=e.fullWidth,v=void 0===p||p,m=oe((function(){return i||r.step||1}),[r.step,i]),y=_t(X([[]]),2),g=y[0],_=y[1],b=_t(X([]),2),D=b[0],w=b[1],x=_t(X([]),2),k=x[0],C=x[1],E=_t(X([]),2),S=E[0],A=E[1],F=function(e){var t=function(e){var t={},n=Object.values(e).flat(),r=Jc(n),i=Gc(n);return t[1]=Kc(r,i),t}(e);s(t)};te((function(){var e=[],t={},i=[],o=[{}];null===n||void 0===n||n.forEach((function(n){var r=fs(n,S,h);o.push(r),i.push(ds(r,n.group));var a,u=t[n.group]||[],l=Wo(n.values);try{for(l.s();!(a=l.n()).done;){var c=a.value;e.push(c[0]),u.push(ps(c[1]))}}catch(s){l.e(s)}finally{l.f()}t[n.group]=u}));var a=function(e,t,n){for(var r=Array.from(new Set(e)).sort((function(e,t){return e-t})),i=n.start,o=Nr(n.end+t),a=0,u=[];i<=o;){for(;a=r.length||r[a]>i)&&u.push(i)}for(;u.length<2;)u.push(i),i=Nr(i+t);return u}(e,m,r),u=n.map((function(e){var t,n=[],r=e.values,i=r.length,o=0,u=Wo(a);try{for(u.s();!(t=u.n()).done;){for(var l=t.value;o1e10*h?n.map((function(){return f})):n}));u.unshift(a),F(t),_(u),w(o),C(i)}),[n]),te((function(){var e=[],t=[{}];null===n||void 0===n||n.forEach((function(n){var r=fs(n,S,h);t.push(r),e.push(ds(r,n.group))})),w(t),C(e)}),[S]);var N=re(null);return fr("div",{className:Bi()({"vm-graph-view":!0,"vm-graph-view_full-width":v}),ref:N,children:[(null===N||void 0===N?void 0:N.current)&&fr(ns,{data:g,series:D,metrics:n,period:r,yaxis:a,unit:u,setPeriod:f,container:null===N||void 0===N?void 0:N.current}),c&&fr(us,{labels:k,query:o,onChange:function(e,t){A(function(e){var t=e.hideSeries,n=e.legend,r=e.metaKey,i=e.series,o=n.label,a=hs(o,t),u=i.map((function(e){return e.label||""}));return r?a?t.filter((function(e){return e!==o})):[].concat(bt(t),[o]):t.length?a?bt(u.filter((function(e){return e!==o}))):[]:bt(u.filter((function(e){return e!==o})))}({hideSeries:S,legend:e,metaKey:t,series:D}))}})]})},ms=function(e){var t=e.value,n=e.options,r=e.anchor,i=e.disabled,o=e.maxWords,a=void 0===o?1:o,u=e.onSelect,l=re(null),s=_t(X(!1),2),f=s[0],d=s[1],h=_t(X(-1),2),p=h[0],v=h[1],m=oe((function(){if(!f)return[];try{var e=new RegExp(String(t),"i");return n.filter((function(n){return e.test(n)&&n!==t})).sort((function(t,n){var r,i;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(i=n.match(e))||void 0===i?void 0:i.index)||0)}))}catch(c){return[]}}),[f,n,t]),y=function(){d(!1)},g=function(e){var t=e.key,n=e.ctrlKey,r=e.metaKey,i=e.shiftKey,o=n||r||i;if("ArrowUp"!==t||o||(e.preventDefault(),v((function(e){return e<=0?0:e-1}))),"ArrowDown"===t&&!o){e.preventDefault();var a=m.length-1;v((function(e){return e>=a?a:e+1}))}if("Enter"===t){var l=m[p];l&&u(l),y()}"Escape"===t&&y()};return te((function(){var e=(t.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm)||[]).length;d(t.length>2&&e<=a)}),[t]),te((function(){return function(){if(l.current){var e=l.current.childNodes[p];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}}(),window.addEventListener("keydown",g),function(){window.removeEventListener("keydown",g)}}),[p,m]),te((function(){v(-1)}),[m]),po(l,y),fr(vo,{open:f,buttonRef:r,placement:"bottom-left",onClose:y,children:fr("div",{className:"vm-autocomplete",ref:l,children:m.map((function(e,t){return fr("div",{className:Bi()({"vm-list__item":!0,"vm-list__item_active":t===p}),id:"$autocomplete$".concat(e),onClick:(n=e,function(){i||(u(n),y())}),children:e},e);var n}))})})},ys=function(e){var t=e.value,n=e.onChange,r=e.onEnter,i=e.onArrowUp,o=e.onArrowDown,a=e.autocomplete,u=e.error,l=e.options,c=e.label,s=e.disabled,f=void 0!==s&&s,d=re(null);return fr("div",{className:"vm-query-editor",ref:d,children:[fr(To,{value:t,label:c,type:"textarea",autofocus:!!t,error:u,onKeyDown:function(e){var t=e.key,n=e.ctrlKey,a=e.metaKey,u=e.shiftKey,l=n||a,c="ArrowDown"===t,s="Enter"===t;"ArrowUp"===t&&l&&(e.preventDefault(),i()),c&&l&&(e.preventDefault(),o()),s&&!u&&r()},onChange:n,disabled:f}),a&&fr(ms,{value:t,options:l,anchor:d,onSelect:function(e){n(e)}})]})},gs=n(936),_s=n.n(gs),bs=function(e){var t=e.defaultStep,n=e.setStep,r=_t(X(t),2),i=r[0],o=r[1],a=_t(X(""),2),u=a[0],l=a[1],c=ae(_s()((function(e){return n(e||1)}),700),[]),s=function(e){e>0?(o(e),c(e),l("")):l("step is out of allowed range")};return te((function(){t&&s(t)}),[t]),fr(To,{label:"Step value",type:"number",value:i,error:u,onChange:function(e){var t=+e;t&&s(t)},endIcon:fr(mo,{title:"Reset step to default",children:fr(ho,{variant:"text",size:"small",startIcon:fr(ui,{}),onClick:function(){s(t||1)}})})})},Ds=function(){var e=Xn().serverURL,t=hr().tenantId,n=pr(),r=Qr(),i=_t(X(t||0),2),o=i[0],a=i[1],u=ae(_s()((function(t){var i=Number(t);if(n({type:"SET_TENANT_ID",payload:i}),e){var o=e.replace(/(\/select\/)([\d]+)(\/prometheus)/gim,"$1".concat(i,"$3"));n({type:"SET_SERVER",payload:o}),r({type:"RUN_QUERY"})}}),700),[]);return te((function(){o!==t&&a(t)}),[t]),fr(To,{label:"Tenant ID",type:"number",value:o,onChange:function(e){a(e),u(e)},endIcon:fr(mo,{title:"Define tenant id if you need request to another storage",children:fr(ho,{variant:"text",size:"small",startIcon:fr(li,{})})})})},ws=function(e){var t,n=e.value,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-switch":!0,"vm-switch_disabled":o,"vm-switch_active":r},"vm-switch_".concat(l,"_active"),r),qn(t,"vm-switch_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-switch-track",children:fr("div",{className:"vm-switch-track__thumb"})}),a&&fr("span",{className:"vm-switch__label",children:a})]})},xs=function(){var e=Ji(),t=Xn().inputTenantID,n=ni().autocomplete,r=ri(),i=Vi(),o=i.nocache,a=i.isTracingEnabled,u=qi(),l=Wr().period.step;return fr("div",{className:"vm-additional-settings",children:[fr(ws,{label:"Autocomplete",value:n,onChange:function(){r({type:"TOGGLE_AUTOCOMPLETE"})}}),fr(ws,{label:"Disable cache",value:o,onChange:function(){u({type:"TOGGLE_NO_CACHE"})}}),fr(ws,{label:"Trace query",value:a,onChange:function(){u({type:"TOGGLE_QUERY_TRACING"})}}),fr("div",{className:"vm-additional-settings__input",children:fr(bs,{defaultStep:l,setStep:function(t){e({type:"SET_CUSTOM_STEP",payload:t})}})}),!!t&&fr("div",{className:"vm-additional-settings__input",children:fr(Ds,{})})]})};var ks=function(e){var t=re();return te((function(){t.current=e}),[e]),t.current},Cs=function(e){var t=e.error,n=e.queryOptions,r=e.onHideQuery,i=ni(),o=i.query,a=i.queryHistory,u=i.autocomplete,l=ri(),c=Qr(),s=_t(X(o||[]),2),f=s[0],d=s[1],h=_t(X([]),2),p=h[0],v=h[1],m=ks(f),y=function(){l({type:"SET_QUERY_HISTORY",payload:f.map((function(e,t){var n=a[t]||{values:[]},r=e===n.values[n.values.length-1];return{index:n.values.length-Number(r),values:!r&&e?[].concat(bt(n.values),[e]):n.values}}))}),l({type:"SET_QUERY",payload:f}),c({type:"RUN_QUERY"})},g=function(e,t){d((function(n){return n.map((function(n,r){return r===t?e:n}))}))},_=function(e,t){return function(){!function(e,t){var n=a[t],r=n.index,i=n.values,o=r+e;o<0||o>=i.length||(g(i[o]||"",t),l({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:i,index:o},queryNumber:t}}))}(e,t)}},b=function(e){return function(t){g(t,e)}},D=function(e){return function(){var t;t=e,d((function(e){return e.filter((function(e,n){return n!==t}))})),v((function(t){return t.map((function(t){return t>e?t-1:t}))}))}},w=function(e){return function(){var t;t=e,v((function(e){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(bt(e),[t])}))}};return te((function(){m&&f.length1&&fr(mo,{title:"Remove Query",children:fr("div",{className:"vm-query-configurator-list-row__button",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:D(r)})})})]},r)}))}),fr("div",{className:"vm-query-configurator-settings",children:[fr(xs,{}),fr("div",{className:"vm-query-configurator-settings__buttons",children:[f.length<4&&fr(ho,{variant:"outlined",onClick:function(){d((function(e){return[].concat(bt(e),[""])}))},startIcon:fr(Ei,{}),children:"Add Query"}),fr(ho,{variant:"contained",onClick:y,startIcon:fr(bi,{}),children:"Execute Query"})]})]})]})};function Es(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Ss(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Ss(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return Ss=function(e){this.s=e,this.n=e.next},Ss.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Ss(e)}var As=0,Fs=function(){function e(t,n){Dt(this,e),this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=t,this.originalTracing=JSON.parse(JSON.stringify(t)),this.query=n,this.id=As++;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n)}))}return xt(e,[{key:"queryValue",get:function(){return this.query}},{key:"idValue",get:function(){return this.id}},{key:"children",get:function(){return this.tracingChildren}},{key:"message",get:function(){return this.tracing.message}},{key:"duration",get:function(){return this.tracing.duration_msec}},{key:"JSON",get:function(){return JSON.stringify(this.tracing,null,2)}},{key:"originalJSON",get:function(){return JSON.stringify(this.originalTracing,null,2)}},{key:"setTracing",value:function(t){var n=this;this.tracing=t;var r=t.children||[];this.tracingChildren=r.map((function(t){return new e(t,n.query)}))}},{key:"setQuery",value:function(e){this.query=e}},{key:"resetTracing",value:function(){this.tracing=this.originalTracing}}]),e}(),Ns=function(e){var t=e.predefinedQuery,n=e.visible,r=e.display,i=e.customStep,o=e.hideQuery,a=e.showAllSeries,u=ni().query,l=Wr().period,c=Vi(),s=c.displayType,f=c.nocache,d=c.isTracingEnabled,h=c.seriesLimits,p=hr().serverUrl,v=_t(X(!1),2),m=v[0],y=v[1],g=_t(X(),2),_=g[0],b=g[1],D=_t(X(),2),w=D[0],x=D[1],k=_t(X(),2),C=k[0],E=k[1],S=_t(X(),2),A=S[0],F=S[1],N=_t(X(),2),O=N[0],T=N[1],B=_t(X([]),2),M=B[0],L=B[1];te((function(){A&&(b(void 0),x(void 0),E(void 0))}),[A]);var P=function(){var e=os(rs().mark((function e(t){var n,r,i,o,a,u,l,c,s,f,d,h;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.fetchUrl,r=t.fetchQueue,i=t.displayType,o=t.query,a=t.stateSeriesLimits,u=t.showAllSeries,l=new AbortController,L([].concat(bt(r),[l])),e.prev=3,e.delegateYield(rs().mark((function e(){var t,r,p,v,m,y,g,_,D,w,k,C;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="chart"===i,r=u?1/0:a[i],p=[],v=[],m=1,y=0,c=!1,s=!1,e.prev=8,d=Es(n);case 10:return e.next=12,d.next();case 12:if(!(c=!(h=e.sent).done)){e.next=24;break}return g=h.value,e.next=16,fetch(g,{signal:l.signal});case 16:return _=e.sent,e.next=19,_.json();case 19:D=e.sent,_.ok?(F(void 0),D.trace&&(w=new Fs(D.trace,o[m-1]),v.push(w)),k=r-p.length,D.data.result.slice(0,k).forEach((function(e){e.group=m,p.push(e)})),y+=D.data.result.length,m++):F("".concat(D.errorType,"\r\n").concat(null===D||void 0===D?void 0:D.error));case 21:c=!1,e.next=10;break;case 24:e.next=30;break;case 26:e.prev=26,e.t0=e.catch(8),s=!0,f=e.t0;case 30:if(e.prev=30,e.prev=31,!c||null==d.return){e.next=35;break}return e.next=35,d.return();case 35:if(e.prev=35,!s){e.next=38;break}throw f;case 38:return e.finish(35);case 39:return e.finish(30);case 40:C="Showing ".concat(r," series out of ").concat(y," series due to performance reasons. Please narrow down the query, so it returns less series"),T(y>r?C:""),t?b(p):x(p),E(v);case 44:case"end":return e.stop()}}),e,null,[[8,26,30,40],[31,,35,39]])}))(),"t0",5);case 5:e.next=10;break;case 7:e.prev=7,e.t1=e.catch(3),e.t1 instanceof Error&&"AbortError"!==e.t1.name&&F("".concat(e.t1.name,": ").concat(e.t1.message));case 10:y(!1);case 11:case"end":return e.stop()}}),e,null,[[3,7]])})));return function(t){return e.apply(this,arguments)}}(),I=ae(_s()(P,800),[]),$=function(e,t){var n=e.trim(),r=!o||!o.includes(t);return n&&r},R=oe((function(){var e=null!==t&&void 0!==t?t:u,n="chart"===(r||s);if(l)if(p)if(e.every((function(e){return!e.trim()})))F(Co.validQuery);else{if(Bo(p)){var o=Kn({},l);return o.step=i,e.filter($).map((function(e){return n?function(e,t,n,r,i){return"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(i?"&trace=1":"")}(p,e,o,f,d):function(e,t,n,r){return"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&trace=1":"")}(p,e,o,d)}))}F(Co.validServer)}else F(Co.emptyServer)}),[p,l,s,i,o]);return te((function(){n&&null!==R&&void 0!==R&&R.length&&(y(!0),I({fetchUrl:R,fetchQueue:M,displayType:r||s,query:null!==t&&void 0!==t?t:u,stateSeriesLimits:h,showAllSeries:a}))}),[R,n,h,a]),te((function(){var e=M.slice(0,-1);e.length&&(e.map((function(e){return e.abort()})),L(M.filter((function(e){return!e.signal.aborted}))))}),[M]),{fetchUrl:R,isLoading:m,graphData:_,liveData:w,error:A,warning:O,traces:C}},Os=function(e){var t=e.data,n=so().showInfoMessage,r=oe((function(){return JSON.stringify(t,null,2)}),[t]);return fr("div",{className:"vm-json-view",children:[fr("div",{className:"vm-json-view__copy",children:fr(ho,{variant:"outlined",onClick:function(){navigator.clipboard.writeText(r),n({text:"Formatted JSON has been copied",type:"success"})},children:"Copy JSON"})}),fr("pre",{className:"vm-json-view__code",children:fr("code",{children:r})})]})},Ts=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=oe((function(){return Object.keys(t.limits.range)}),[t.limits.range]),o=ae(_s()((function(e,r,i){var o=t.limits.range;o[r][i]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),a=function(e,t){return function(n){o(n,e,t)}};return fr("div",{className:"vm-axes-limits",children:[fr(ws,{value:t.limits.enable,onChange:r,label:"Fix the limits for y-axis"}),fr("div",{className:"vm-axes-limits-list",children:i.map((function(e){return fr("div",{className:"vm-axes-limits-list__inputs",children:[fr(To,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:a(e,0)}),fr(To,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:a(e,1)})]},e)}))})]})},Bs="Axes settings",Ms=function(e){var t=e.yaxis,n=e.setYaxisLimits,r=e.toggleEnableLimits,i=re(null),o=_t(X(!1),2),a=o[0],u=o[1],l=re(null);po(i,(function(){return u(!1)}),l);var c=function(){u(!1)};return fr("div",{className:"vm-graph-settings",children:[fr(mo,{title:Bs,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){u((function(e){return!e}))}})})}),fr(vo,{open:a,buttonRef:l,placement:"bottom-right",onClose:c,children:fr("div",{className:"vm-graph-settings-popper",ref:i,children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Bs}),fr(ho,{size:"small",startIcon:fr(ai,{}),onClick:c})]}),fr("div",{className:"vm-graph-settings-popper__body",children:fr(Ts,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:r})})]})})]})},Ls=function(e){var t=e.containerStyles,n=void 0===t?{}:t,r=e.message;return fr("div",{className:"vm-spinner",style:n&&{},children:[fr("div",{className:"half-circle-spinner",children:[fr("div",{className:"circle circle-1"}),fr("div",{className:"circle circle-2"})]}),r&&fr("div",{className:"vm-spinner__message",children:r})]})},Ps=function(){var e=hr().serverUrl,t=_t(X([]),2),n=t[0],r=t[1],i=function(){var t=os(rs().mark((function t(){var n,i,o;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return");case 2:return n="".concat(e,"/api/v1/label/__name__/values"),t.prev=3,t.next=6,fetch(n);case 6:return i=t.sent,t.next=9,i.json();case 9:o=t.sent,i.ok&&r(o.data),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(3),console.error(t.t0);case 16:case"end":return t.stop()}}),t,null,[[3,13]])})));return function(){return t.apply(this,arguments)}}();return te((function(){i()}),[e]),{queryOptions:n}},Is=function(e){var t=e.value;return fr("div",{className:"vm-line-progress",children:[fr("div",{className:"vm-line-progress-track",children:fr("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),fr("span",{children:[t.toFixed(2),"%"]})]})},$s=function e(t){var n,r=t.trace,i=t.totalMsec,o=_t(X({}),2),a=o[0],u=o[1],l=r.children&&!!r.children.length,c=r.duration/i*100;return fr("div",{className:"vm-nested-nav",children:[fr("div",{className:"vm-nested-nav-header",onClick:(n=r.idValue,function(){u((function(e){return Kn(Kn({},e),{},qn({},n,!e[n]))}))}),children:[l&&fr("div",{className:Bi()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":a[r.idValue]}),children:fr(pi,{})}),fr("div",{className:"vm-nested-nav-header__progress",children:fr(Is,{value:c})}),fr("div",{className:"vm-nested-nav-header__message",children:r.message}),fr("div",{className:"vm-nested-nav-header__duration",children:"duration: ".concat(r.duration," ms")})]}),a[r.idValue]&&fr("div",{children:l&&r.children.map((function(t){return fr(e,{trace:t,totalMsec:i},t.duration)}))})]})},Rs=function(e){var t=e.editable,n=void 0!==t&&t,r=e.defaultTile,i=void 0===r?"JSON":r,o=e.displayTitle,a=void 0===o||o,u=e.defaultJson,l=void 0===u?"":u,s=e.resetValue,f=void 0===s?"":s,d=e.onClose,h=e.onUpload,p=so().showInfoMessage,v=_t(X(l),2),m=v[0],y=v[1],g=_t(X(i),2),_=g[0],b=g[1],D=_t(X(""),2),w=D[0],x=D[1],k=_t(X(""),2),C=k[0],E=k[1],S=oe((function(){try{var e=JSON.parse(m),t=e.trace||e;return t.duration_msec?(new Fs(t,""),""):Co.traceNotFound}catch(c){return c instanceof Error?c.message:"Unknown error"}}),[m]),A=function(){var e=os(rs().mark((function e(){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(m);case 2:p({text:"Formatted JSON has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){E(S),_.trim()||x(Co.emptyTitle),S||w||(h(m,_),d())};return fr("div",{className:Bi()({"vm-json-form":!0,"vm-json-form_one-field":!a}),children:[a&&fr(To,{value:_,label:"Title",error:w,onEnter:F,onChange:function(e){b(e)}}),fr(To,{value:m,label:"JSON",type:"textarea",error:C,autofocus:!0,onChange:function(e){E(""),y(e)},disabled:!n}),fr("div",{className:"vm-json-form-footer",children:[fr("div",{className:"vm-json-form-footer__controls",children:[fr(ho,{variant:"outlined",startIcon:fr(Ni,{}),onClick:A,children:"Copy JSON"}),f&&fr(ho,{variant:"text",startIcon:fr(ui,{}),onClick:function(){y(f)},children:"Reset JSON"})]}),fr("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[fr(ho,{variant:"outlined",color:"error",onClick:d,children:"Cancel"}),fr(ho,{variant:"contained",onClick:F,children:"apply"})]})]})]})},js=function(e){var t=e.traces,n=e.jsonEditor,r=void 0!==n&&n,i=e.onDeleteClick,o=_t(X(null),2),a=o[0],u=o[1],l=function(){u(null)};if(!t.length)return fr(lo,{variant:"info",children:"Please re-run the query to see results of the tracing"});var s=function(e){return function(){i(e)}};return fr(m,{children:[fr("div",{className:"vm-tracings-view",children:t.map((function(e){return fr("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[fr("div",{className:"vm-tracings-view-trace-header",children:[fr("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",fr("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),fr(mo,{title:"Open JSON",children:fr(ho,{variant:"text",startIcon:fr(ki,{}),onClick:(t=e,function(){u(t)})})}),fr(mo,{title:"Remove trace",children:fr(ho,{variant:"text",color:"error",startIcon:fr(Ci,{}),onClick:s(e)})})]}),fr("nav",{className:"vm-tracings-view-trace__nav",children:fr($s,{trace:e,totalMsec:e.duration})})]},e.idValue);var t}))}),a&&fr(Lo,{title:a.queryValue,onClose:l,children:fr(Rs,{editable:r,displayTitle:r,defaultTile:a.queryValue,defaultJson:a.JSON,resetValue:a.originalJSON,onClose:l,onUpload:function(e,t){if(r&&a)try{a.setTracing(JSON.parse(e)),a.setQuery(t),u(null)}catch(c){console.error(c)}}})})]})},zs=function(e,t){return oe((function(){var n={};e.forEach((function(e){return Object.entries(e.metric).forEach((function(e){return n[e[0]]?n[e[0]].options.add(e[1]):n[e[0]]={options:new Set([e[1]])}}))}));var r=Object.entries(n).map((function(e){return{key:e[0],variations:e[1].options.size}})).sort((function(e,t){return e.variations-t.variations}));return t?r.filter((function(e){return t.includes(e.key)})):r}),[e,t])},Us=function(e){var t,n=e.checked,r=void 0!==n&&n,i=e.disabled,o=void 0!==i&&i,a=e.label,u=e.color,l=void 0===u?"secondary":u,c=e.onChange;return fr("div",{className:Bi()((qn(t={"vm-checkbox":!0,"vm-checkbox_disabled":o,"vm-checkbox_active":r},"vm-checkbox_".concat(l,"_active"),r),qn(t,"vm-checkbox_".concat(l),l),t)),onClick:function(){o||c(!r)},children:[fr("div",{className:"vm-checkbox-track",children:fr("div",{className:"vm-checkbox-track__thumb",children:fr(Si,{})})}),a&&fr("span",{className:"vm-checkbox__label",children:a})]})},Hs="Table settings",Ys=function(e){var t=e.data,n=e.defaultColumns,r=void 0===n?[]:n,i=e.onChange,o=Vi().tableCompact,a=qi(),u=zs(t),l=re(null),c=_t(X(!1),2),s=c[0],f=c[1],d=oe((function(){return!u.length}),[u]),h=function(){f(!1)},p=function(e){return function(){!function(e){i(r.includes(e)?r.filter((function(t){return t!==e})):[].concat(bt(r),[e]))}(e)}};return te((function(){var e=u.map((function(e){return e.key}));(function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))})(e,r)||i(e)}),[u]),fr("div",{className:"vm-table-settings",children:[fr(mo,{title:Hs,children:fr("div",{ref:l,children:fr(ho,{variant:"text",startIcon:fr(oi,{}),onClick:function(){f((function(e){return!e}))},disabled:d})})}),fr(vo,{open:s,onClose:h,placement:"bottom-right",buttonRef:l,children:fr("div",{className:"vm-table-settings-popper",children:[fr("div",{className:"vm-popper-header",children:[fr("h3",{className:"vm-popper-header__title",children:Hs}),fr(ho,{onClick:h,startIcon:fr(ai,{}),size:"small"})]}),fr("div",{className:"vm-table-settings-popper-list",children:fr(ws,{label:"Compact view",value:o,onChange:function(){a({type:"TOGGLE_TABLE_COMPACT"})}})}),fr("div",{className:"vm-table-settings-popper-list",children:[fr("div",{className:"vm-table-settings-popper-list-header",children:[fr("h3",{className:"vm-table-settings-popper-list-header__title",children:"Display columns"}),fr(mo,{title:"Reset to default",children:fr(ho,{color:"primary",variant:"text",size:"small",onClick:function(){f(!1),i(u.map((function(e){return e.key})))},startIcon:fr(ui,{})})})]}),u.map((function(e){return fr("div",{className:"vm-table-settings-popper-list__item",children:fr(Us,{checked:r.includes(e.key),onChange:p(e.key),label:e.key,disabled:o})},e.key)}))]})]})})]})};function Vs(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(function(e){return!!e[1]}))}var qs=["__name__"],Ws=function(e){var t=e.data,n=e.displayColumns,r=so().showInfoMessage,i=Vi().tableCompact,o=bo(document.body),a=re(null),u=_t(X(0),2),l=u[0],c=u[1],s=_t(X(0),2),f=s[0],d=s[1],h=_t(X(""),2),p=h[0],v=h[1],m=_t(X("asc"),2),y=m[0],g=m[1],_=i?zs([{group:0,metric:{Data:"Data"}}],["Data"]):zs(t,n),b=function(e){var t=e.__name__,n=ls(e,qs);return t||Object.keys(n).length?"".concat(t," ").concat(JSON.stringify(n)):""},D=oe((function(){var e=null===t||void 0===t?void 0:t.map((function(e){return{metadata:_.map((function(t){return i?ss(e,void 0,"=",!0):e.metric[t.key]||"-"})),value:e.value?e.value[1]:"-",copyValue:b(e.metric)}})),n="Value"===p,r=_.findIndex((function(e){return e.key===p}));return n||-1!==r?e.sort((function(e,t){var i=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===y?io)?-1:1})):e}),[_,t,p,y,i]),w=oe((function(){return D.some((function(e){return e.copyValue}))}),[D]),x=function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,navigator.clipboard.writeText(t);case 2:r({text:"Row has been copied",type:"success"});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(e){return function(){!function(e){g((function(t){return"asc"===t&&p===e?"desc":"asc"})),v(e)}(e)}},C=function(){if(a.current){var e=a.current.getBoundingClientRect().top;d(e<0?window.scrollY-l:0)}};return te((function(){return window.addEventListener("scroll",C),function(){window.removeEventListener("scroll",C)}}),[a,l,o]),te((function(){if(a.current){var e=a.current.getBoundingClientRect().top;c(e+window.scrollY)}}),[a,o]),D.length?fr("div",{className:"vm-table-view",children:fr("table",{className:"vm-table",ref:a,children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",style:{transform:"translateY(".concat(f,"px)")},children:[_.map((function(e,t){return fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:k(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":p===e.key,"vm-table__sort-icon_desc":"desc"===y&&p===e.key}),children:fr(vi,{})})]})},t)})),fr("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:k("Value"),children:fr("div",{className:"vm-table-cell__content",children:[fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===p,"vm-table__sort-icon_desc":"desc"===y}),children:fr(vi,{})}),"Value"]})}),w&&fr("td",{className:"vm-table-cell vm-table-cell_header"})]})}),fr("tbody",{className:"vm-table-body",children:D.map((function(e,t){return fr("tr",{className:"vm-table__row",children:[e.metadata.map((function(e,n){return fr("td",{className:Bi()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":D[t-1]&&D[t-1].metadata[n]===e}),children:e},n)})),fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.value}),w&&fr("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Copy row",children:fr(ho,{variant:"text",color:"gray",size:"small",startIcon:fr(Ni,{}),onClick:(n=e.copyValue,function(){x(n)})})})})})]},t);var n}))})]})}):fr(lo,{variant:"warning",children:"No data to show"})},Qs=function(){var e=Vi(),t=e.displayType,n=e.isTracingEnabled,r=ni().query,i=Wr().period,o=Qr();!function(){var e=hr().tenantId,t=Vi().displayType,n=ni().query,r=Wr(),i=r.duration,o=r.relativeTime,a=r.period,u=a.date,l=a.step,c=function(){var r={};n.forEach((function(n,a){var c,s="g".concat(a);r["".concat(s,".expr")]=n,r["".concat(s,".range_input")]=i,r["".concat(s,".end_input")]=u,r["".concat(s,".step_input")]=l,r["".concat(s,".tab")]=(null===(c=Ii.find((function(e){return e.value===t})))||void 0===c?void 0:c.prometheusCode)||0,r["".concat(s,".relative_time")]=o,r["".concat(s,".tenantID")]=e})),ar(Vs(r))};te(c,[e,t,n,i,o,u,l]),te(c,[])}();var a=_t(X(),2),u=a[0],l=a[1],c=_t(X([]),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=_t(X(!1),2),m=v[0],y=v[1],g=ue(Gi).state,_=g.customStep,b=g.yaxis,D=Ji(),w=Ps().queryOptions,x=Ns({visible:!0,customStep:_,hideQuery:h,showAllSeries:m}),k=x.isLoading,C=x.liveData,E=x.graphData,S=x.error,A=x.warning,F=x.traces,N=function(e){D({type:"SET_YAXIS_LIMITS",payload:e})};return te((function(){F&&f([].concat(bt(s),bt(F)))}),[F]),te((function(){f([])}),[t]),te((function(){y(!1)}),[r]),fr("div",{className:"vm-custom-panel",children:[fr(Cs,{error:S,queryOptions:w,onHideQuery:function(e){p(e)}}),n&&fr("div",{className:"vm-custom-panel__trace",children:fr(js,{traces:s,onDeleteClick:function(e){var t=s.filter((function(t){return t.idValue!==e.idValue}));f(bt(t))}})}),k&&fr(Ls,{}),S&&fr(lo,{variant:"error",children:S}),A&&fr(lo,{variant:"warning",children:fr("div",{className:"vm-custom-panel__warning",children:[fr("p",{children:A}),fr(ho,{color:"warning",variant:"outlined",onClick:function(){y(!0)},children:"Show all"})]})}),fr("div",{className:"vm-custom-panel-body vm-block",children:[fr("div",{className:"vm-custom-panel-body-header",children:[fr($i,{}),"chart"===t&&fr(Ms,{yaxis:b,setYaxisLimits:N,toggleEnableLimits:function(){D({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})}}),"table"===t&&fr(Ys,{data:C||[],defaultColumns:u,onChange:l})]}),E&&i&&"chart"===t&&fr(vs,{data:E,period:i,customStep:_,query:r,yaxis:b,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;o({type:"SET_PERIOD",payload:{from:t,to:n}})}}),C&&"code"===t&&fr(Os,{data:C}),C&&"table"===t&&fr(Ws,{data:C,displayColumns:u})]})]})},Gs=function(){var e=os(rs().mark((function e(t){var n,r;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("./dashboards/".concat(t));case 2:return n=e.sent,e.next=5,n.json();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Js=os(rs().mark((function e(){var t;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__VMUI_PREDEFINED_DASHBOARDS__,e.next=3,Promise.all(t.map(function(){var e=os(rs().mark((function e(t){return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Gs(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));function Zs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var Ks={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var Xs=/[&<>"']/,ef=/[&<>"']/g,tf=/[<>"']|&(?!#?\w+;)/,nf=/[<>"']|&(?!#?\w+;)/g,rf={"&":"&","<":"<",">":">",'"':""","'":"'"},of=function(e){return rf[e]};function af(e,t){if(t){if(Xs.test(e))return e.replace(ef,of)}else if(tf.test(e))return e.replace(nf,of);return e}var uf=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function lf(e){return e.replace(uf,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var cf=/(^|[^\[])\^/g;function sf(e,t){e="string"===typeof e?e:e.source,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(cf,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n}var ff=/[^\w:]/g,df=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function hf(e,t,n){if(e){var r;try{r=decodeURIComponent(lf(n)).replace(ff,"").toLowerCase()}catch(c){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!df.test(n)&&(n=function(e,t){pf[" "+e]||(vf.test(e)?pf[" "+e]=e+"/":pf[" "+e]=Df(e,"/",!0));var n=-1===(e=pf[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(mf,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(yf,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(c){return null}return n}var pf={},vf=/^[^:]+:\/*[^/]*$/,mf=/^([^:]+:)[\s\S]*$/,yf=/^([^:]+:\/*[^/]*)[\s\S]*$/;var gf={exec:function(){}};function _f(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function kf(e,t,n,r){var i=t.href,o=t.title?af(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var u={type:"link",raw:n,href:i,title:o,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,u}return{type:"image",raw:n,href:i,title:o,text:af(a)}}var Cf=function(){function e(t){Dt(this,e),this.options=t||Ks}return xt(e,[{key:"space",value:function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}},{key:"code",value:function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Df(n,"\n")}}}},{key:"fences",value:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:_t(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}},{key:"heading",value:function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var r=Df(n,"#");this.options.pedantic?n=r.trim():r&&!/ $/.test(r)||(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}},{key:"hr",value:function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}},{key:"blockquote",value:function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}}},{key:"list",value:function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,i,o,a,u,l,c,s,f,d,h,p=t[1].trim(),v=p.length>1,m={type:"list",raw:"",ordered:v,start:v?+p.slice(0,-1):"",loose:!1,items:[]};p=v?"\\d{1,9}\\".concat(p.slice(-1)):"\\".concat(p),this.options.pedantic&&(p=v?p:"[*+-]");for(var y=new RegExp("^( {0,3}".concat(p,")((?:[\t ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],s=e.split("\n",1)[0],this.options.pedantic?(o=2,d=c.trimLeft()):(o=(o=t[2].search(/[^ ]/))>4?1:o,d=c.slice(o),o+=t[1].length),u=!1,!c&&/^ *$/.test(s)&&(n+=s+"\n",e=e.substring(s.length+1),h=!0),!h)for(var g=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))")),_=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),D=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(c=f=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!b.test(c))&&!D.test(c)&&!g.test(c)&&!_.test(e);){if(c.search(/[^ ]/)>=o||!c.trim())d+="\n"+c.slice(o);else{if(u)break;d+="\n"+c}u||c.trim()||(u=!0),n+=f+"\n",e=e.substring(f.length+1)}m.loose||(l?m.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d))&&(i="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,"")),m.items.push({type:"list_item",raw:n,task:!!r,checked:i,loose:!1,text:d}),m.raw+=n}m.items[m.items.length-1].raw=n.trimRight(),m.items[m.items.length-1].text=d.trimRight(),m.raw=m.raw.trimRight();var w=m.items.length;for(a=0;a1)return!0}}catch(i){r.e(i)}finally{r.f()}return!1}));!m.loose&&x.length&&k&&(m.loose=!0,m.items[a].loose=!0)}return m}}},{key:"html",value:function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var r=this.options.sanitizer?this.options.sanitizer(t[0]):af(t[0]);n.type="paragraph",n.text=r,n.tokens=this.lexer.inline(r)}return n}}},{key:"def",value:function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2]?t[2].replace(this.rules.inline._escapes,"$1"):t[2],title:t[3]?t[3].replace(this.rules.inline._escapes,"$1"):t[3]}}},{key:"table",value:function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:bf(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i,o,a,u=n.align.length;for(r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):af(t[0]):t[0]}}},{key:"link",value:function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;var r=Df(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],u="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);l&&(a=l[1],u=l[3])}else u=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^$/.test(n)?a.slice(1):a.slice(1,-1)),kf(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:u?u.replace(this.rules.inline._escapes,"$1"):u},t[0],this.lexer)}}},{key:"reflink",value:function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return kf(n,r,n[0],this.lexer)}}},{key:"emStrong",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&(!r[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/))){var i=r[1]||r[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,u=r[0].length-1,l=u,c=0,s="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+u);null!=(r=s.exec(t));)if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6])if(a=o.length,r[3]||r[4])l+=a;else if(!((r[5]||r[6])&&u%3)||(u+a)%3){if(!((l-=a)>0)){a=Math.min(a,a+l+c);var f=e.slice(0,u+r.index+(r[0].length-o.length)+a);if(Math.min(u,a)%2){var d=f.slice(1,-1);return{type:"em",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}var h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}else c+=a}}}},{key:"codespan",value:function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return r&&i&&(n=n.substring(1,n.length-1)),n=af(n,!0),{type:"codespan",raw:t[0],text:n}}}},{key:"br",value:function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}},{key:"del",value:function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}},{key:"autolink",value:function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=af(this.options.mangle?t(i[1]):i[1])):n=af(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}},{key:"url",value:function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=af(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=af(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,t){var n,r=this.rules.inline.text.exec(e);if(r)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):af(r[0]):r[0]:af(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}]),e}(),Ef={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:gf,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Ef.def=sf(Ef.def).replace("label",Ef._label).replace("title",Ef._title).getRegex(),Ef.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ef.listItemStart=sf(/^( *)(bull) */).replace("bull",Ef.bullet).getRegex(),Ef.list=sf(Ef.list).replace(/bull/g,Ef.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ef.def.source+")").getRegex(),Ef._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ef._comment=/|$)/,Ef.html=sf(Ef.html,"i").replace("comment",Ef._comment).replace("tag",Ef._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ef.paragraph=sf(Ef._paragraph).replace("hr",Ef.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ef._tag).getRegex(),Ef.blockquote=sf(Ef.blockquote).replace("paragraph",Ef.paragraph).getRegex(),Ef.normal=_f({},Ef),Ef.gfm=_f({},Ef.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ef.gfm.table=sf(Ef.gfm.table).replace("hr",Ef.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ef._tag).getRegex(),Ef.gfm.paragraph=sf(Ef._paragraph).replace("hr",Ef.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ef.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ef._tag).getRegex(),Ef.pedantic=_f({},Ef.normal,{html:sf("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ef._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gf,paragraph:sf(Ef.normal._paragraph).replace("hr",Ef.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ef.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Sf={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:gf,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:gf,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Sf._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Sf.punctuation=sf(Sf.punctuation).replace(/punctuation/g,Sf._punctuation).getRegex(),Sf.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Sf.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Sf._comment=sf(Ef._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Sf.emStrong.lDelim=sf(Sf.emStrong.lDelim).replace(/punct/g,Sf._punctuation).getRegex(),Sf.emStrong.rDelimAst=sf(Sf.emStrong.rDelimAst,"g").replace(/punct/g,Sf._punctuation).getRegex(),Sf.emStrong.rDelimUnd=sf(Sf.emStrong.rDelimUnd,"g").replace(/punct/g,Sf._punctuation).getRegex(),Sf._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Sf._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Sf._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Sf.autolink=sf(Sf.autolink).replace("scheme",Sf._scheme).replace("email",Sf._email).getRegex(),Sf._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Sf.tag=sf(Sf.tag).replace("comment",Sf._comment).replace("attribute",Sf._attribute).getRegex(),Sf._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Sf._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Sf._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Sf.link=sf(Sf.link).replace("label",Sf._label).replace("href",Sf._href).replace("title",Sf._title).getRegex(),Sf.reflink=sf(Sf.reflink).replace("label",Sf._label).replace("ref",Ef._label).getRegex(),Sf.nolink=sf(Sf.nolink).replace("ref",Ef._label).getRegex(),Sf.reflinkSearch=sf(Sf.reflinkSearch,"g").replace("reflink",Sf.reflink).replace("nolink",Sf.nolink).getRegex(),Sf.normal=_f({},Sf),Sf.pedantic=_f({},Sf.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:sf(/^!?\[(label)\]\((.*?)\)/).replace("label",Sf._label).getRegex(),reflink:sf(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sf._label).getRegex()}),Sf.gfm=_f({},Sf.normal,{escape:sf(Sf.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+" ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(t=n.call({lexer:o},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)}))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),!(n=a[a.length-1])||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),!(n=a[a.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else if(r=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startBlock.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],i&&"paragraph"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),i=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),(n=a[a.length-1])&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}return this.state.top=!0,a}},{key:"inline",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}},{key:"inlineTokens",value:function(e){var t,n,r,i,o,a,u=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],c=e;if(this.tokens.links){var s=Object.keys(this.tokens.links);if(s.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)s.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+xf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+xf("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index+i[0].length-2)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(t=n.call({lexer:u},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)}))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),(n=l[l.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),(n=l[l.length-1])&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,c,a))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e,Ff))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e,Ff))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;u.options.extensions.startInline.forEach((function(e){"number"===typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),t=this.tokenizer.inlineText(r,Af))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(a=t.raw.slice(-1)),o=!0,(n=l[l.length-1])&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){var f="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(f);break}throw new Error(f)}}else e=e.substring(t.raw.length),l.push(t);return l}}],[{key:"rules",get:function(){return{block:Ef,inline:Sf}}},{key:"lex",value:function(t,n){return new e(n).lex(t)}},{key:"lexInline",value:function(t,n){return new e(n).inlineTokens(t)}}]),e}(),Of=function(){function e(t){Dt(this,e),this.options=t||Ks}return xt(e,[{key:"code",value:function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:af(e,!0))+"
    \n":"
    "+(n?e:af(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(n);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"\n\n"+e+"\n"+t+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,t){var n=t.header?"th":"td";return(t.align?"<".concat(n,' align="').concat(t.align,'">'):"<".concat(n,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,t,n){if(null===(e=hf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "}},{key:"image",value:function(e,t,n){if(null===(e=hf(this.options.sanitize,this.options.baseUrl,e)))return n;var r='').concat(n,'":">"}},{key:"text",value:function(e){return e}}]),e}(),Tf=function(){function e(){Dt(this,e)}return xt(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,t,n){return""+n}},{key:"image",value:function(e,t,n){return""+n}},{key:"br",value:function(){return""}}]),e}(),Bf=function(){function e(){Dt(this,e),this.seen={}}return xt(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{n=e+"-"+ ++r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}},{key:"slug",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}]),e}(),Mf=function(){function e(t){Dt(this,e),this.options=t||Ks,this.options.renderer=this.options.renderer||new Of,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Tf,this.slugger=new Bf}return xt(e,[{key:"parse",value:function(e){var t,n,r,i,o,a,u,l,c,s,f,d,h,p,v,m,y,g,_,b=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],D="",w=e.length;for(t=0;t0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=g+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=g+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:g}):p+=g),p+=this.parse(v.tokens,h),c+=this.renderer.listitem(p,y,m);D+=this.renderer.list(c,f,d);continue;case"html":D+=this.renderer.html(s.text);continue;case"paragraph":D+=this.renderer.paragraph(this.parseInline(s.tokens));continue;case"text":for(c=s.tokens?this.parseInline(s.tokens):s.text;t+1An error occurred:

    "+af(e.message+"",!0)+"
    ";throw e}try{var l=Nf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Lf.walkTokens(l,t.walkTokens)).then((function(){return Mf.parse(l,t)})).catch(u);Lf.walkTokens(l,t.walkTokens)}return Mf.parse(l,t)}catch(c){u(c)}}Lf.options=Lf.setOptions=function(e){var t;return _f(Lf.defaults,e),t=Lf.defaults,Ks=t,Lf},Lf.getDefaults=Zs,Lf.defaults=Ks,Lf.use=function(){for(var e=arguments.length,t=new Array(e),n=0;nAn error occurred:

    "+af(c.message+"",!0)+"
    ";throw c}},Lf.Parser=Mf,Lf.parser=Mf.parse,Lf.Renderer=Of,Lf.TextRenderer=Tf,Lf.Lexer=Nf,Lf.lexer=Nf.lex,Lf.Tokenizer=Cf,Lf.Slugger=Bf,Lf.parse=Lf;Lf.options,Lf.setOptions,Lf.use,Lf.walkTokens,Lf.parseInline,Mf.parse,Nf.lex;var Pf=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=Wr().period,c=Qr(),s=re(null),f=_t(X(!0),2),d=f[0],h=f[1],p=_t(X(l.step||1),2),v=p[0],y=p[1],g=_t(X({limits:{enable:!1,range:{1:[0,0]}}}),2),_=g[0],b=g[1],D=oe((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),w=Ns({predefinedQuery:D?i:[],display:"chart",visible:d,customStep:v}),x=w.isLoading,k=w.graphData,C=w.error,E=w.warning,S=function(e){var t=Kn({},_);t.limits.range=e,b(t)};if(te((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return h(e.isIntersecting)}))}),{threshold:.1});return s.current&&e.observe(s.current),function(){s.current&&e.unobserve(s.current)}}),[]),!D)return fr(lo,{variant:"error",children:[fr("code",{children:'"expr"'})," not found. Check the configuration file ",fr("b",{children:a}),"."]});var A=function(){return fr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&fr(m,{children:[fr("div",{children:[fr("span",{children:"Description:"}),fr("div",{dangerouslySetInnerHTML:{__html:Lf.parse(n)}})]}),fr("hr",{})]}),fr("div",{children:[fr("span",{children:"Queries:"}),fr("div",{children:i.map((function(e,t){return fr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return fr("div",{className:"vm-predefined-panel",ref:s,children:[fr("div",{className:"vm-predefined-panel-header",children:[fr(mo,{title:fr(A,{}),children:fr("div",{className:"vm-predefined-panel-header__info",children:fr(li,{})})}),fr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),fr("div",{className:"vm-predefined-panel-header__step",children:fr(bs,{defaultStep:l.step,setStep:y})}),fr(Ms,{yaxis:_,setYaxisLimits:S,toggleEnableLimits:function(){var e=Kn({},_);e.limits.enable=!e.limits.enable,b(e)}})]}),fr("div",{className:"vm-predefined-panel-body",children:[x&&fr(Ls,{}),C&&fr(lo,{variant:"error",children:C}),E&&fr(lo,{variant:"warning",children:E}),k&&fr(vs,{data:k,period:l,customStep:v,query:i,yaxis:_,unit:r,alias:u,showLegend:o,setYaxisLimits:S,setPeriod:function(e){var t=e.from,n=e.to;c({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},If=function(e){var t=e.defaultExpanded,n=void 0!==t&&t,r=e.onChange,i=e.title,o=e.children,a=_t(X(n),2),u=a[0],l=a[1];return te((function(){r&&r(u)}),[u]),fr(m,{children:[fr("header",{className:"vm-accordion-header ".concat(u&&"vm-accordion-header_open"),onClick:function(){l((function(e){return!e}))},children:[i,fr("div",{className:"vm-accordion-header__arrow ".concat(u&&"vm-accordion-header__arrow_open"),children:fr(hi,{})})]}),u&&fr("section",{className:"vm-accordion-section",children:o},"content")]})},$f=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=bo(document.body),a=oe((function(){return o.width/12}),[o]),u=_t(X(!t),2),l=u[0],c=u[1],s=_t(X([]),2),f=s[0],d=s[1];te((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=_t(X({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(Kn(Kn({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return te((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),fr("div",{className:"vm-predefined-dashboard",children:fr(If,{defaultExpanded:l,onChange:function(e){return c(e)},title:fr((function(){return fr("div",{className:Bi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&fr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&fr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:fr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return fr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[fr(Pf,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),fr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):fr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:fr(lo,{variant:"error",children:[fr("code",{children:'"panels"'})," not found. Check the configuration file ",fr("b",{children:i}),"."]})})})})})},Rf=function(){!function(){var e=Wr(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=Vs((qn(e={},"g0.range_input",t),qn(e,"g0.end_input",i),qn(e,"g0.step_input",o),qn(e,"g0.relative_time",n),e));ar(r)};te(a,[t,n,i,o]),te(a,[])}();var e=_t(X([]),2),t=e[0],n=e[1],r=_t(X("0"),2),i=r[0],o=r[1],a=oe((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=oe((function(){return t[+i]||{}}),[t,i]),l=oe((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=oe((function(){return u.title||u.filename||""}),[u]),s=oe((function(){return Array.isArray(l)&&!!l.length}),[l]);return te((function(){Js().then((function(e){return e.length&&n(e)}))}),[]),fr("div",{className:"vm-predefined-panels",children:[!t.length&&fr(lo,{variant:"info",children:"Dashboards not found"}),a.length>1&&fr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:fr(Pi,{activeItem:i,items:a,onChange:function(e){o(e)}})}),fr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return fr($f,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&fr(lo,{variant:"error",children:[fr("code",{children:'"rows"'})," not found. Check the configuration file ",fr("b",{children:c}),"."]})]})]})},jf=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},zf=function(){function e(){Dt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return xt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return Kn(Kn({},t),{},{tabs:Kn(Kn({},t.tabs),{},qn({},n,e.tabsNames)),containerRefs:Kn(Kn({},t.containerRefs),{},qn({},n,re(null))),defaultActiveTab:Kn(Kn({},t.defaultActiveTab),{},qn({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:Uf,seriesCountByLabelName:Hf,seriesCountByFocusLabelValue:Yf,seriesCountByLabelValuePair:Vf,labelValueCountByLabelName:qf}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Uf=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Hf=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Yf=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],Vf=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],qf=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],Wf={seriesCountByMetricName:function(e,t){return Qf("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return Qf(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return Qf(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},Qf=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},Gf=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=ni().autocomplete,v=ri(),m=Ps().queryOptions,y=oe((function(){return t<1?"Number must be bigger than zero":""}),[t]);return fr("div",{className:"vm-cardinality-configurator vm-block",children:[fr("div",{className:"vm-cardinality-configurator-controls",children:[fr("div",{className:"vm-cardinality-configurator-controls__query",children:fr(ys,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(To,{label:"Focus label",type:"text",value:h||"",onChange:l})}),fr("div",{className:"vm-cardinality-configurator-controls__item",children:fr(ws,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),fr("div",{className:"vm-cardinality-configurator-bottom",children:[fr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",fr("b",{children:c})," series with ",fr("b",{children:s}),' "label=value" pairs at ',fr("b",{children:f}),d&&fr("span",{children:[" for series selector ",fr("b",{children:d})]}),". Show top ",t," entries per table."]}),fr(ho,{startIcon:fr(bi,{}),onClick:o,children:"Execute Query"})]})]})};function Jf(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return fr("th",{className:Bi()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(i=e.id,function(e){r(e,i)}),children:fr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:fr(vi,{})})]})},e.id);var i}))})})}function Zf(e,t,n){return t[n]e[n]?1:0}function Kf(e,t){return"desc"===e?function(e,n){return Zf(e,n,t)}:function(e,n){return-Zf(e,n,t)}}function Xf(e,t){var n=e.map((function(e,t){return[e,t]}));return n.sort((function(e,n){var r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((function(e){return e[0]}))}var ed=function(e){var t=e.rows,n=e.headerCells,r=e.defaultSortColumn,i=e.tableCells,o=_t(X("desc"),2),a=o[0],u=o[1],l=_t(X(r),2),c=l[0],s=l[1],f=_t(X([]),2),d=f[0],h=f[1],p=function(e){return function(){var t=d.indexOf(e),n=[];-1===t?n=n.concat(d,e):0===t?n=n.concat(d.slice(1)):t===d.length-1?n=n.concat(d.slice(0,-1)):t>0&&(n=n.concat(d.slice(0,t),d.slice(t+1))),h(n)}},v=Xf(t,Kf(a,c));return fr("table",{className:"vm-table",children:[fr(Jf,{numSelected:d.length,order:a,orderBy:c,onSelectAllClick:function(e){if(e.target.checked){var n=t.map((function(e){return e.name}));h(n)}else h([])},onRequestSort:function(e,t){u(c===t&&"asc"===a?"desc":"asc"),s(t)},rowCount:t.length,headerCells:n}),fr("tbody",{className:"vm-table-header",children:v.map((function(e){return fr("tr",{className:Bi()({"vm-table__row":!0,"vm-table__row_selected":(t=e.name,-1!==d.indexOf(t))}),onClick:p(e.name),children:i(e)},e.name);var t}))})]})},td=function(e){var t=e.row,n=e.totalSeries,r=e.onActionClick,i=n>0?t.value/n*100:-1;return fr(m,{children:[fr("td",{className:"vm-table-cell",children:t.name},t.name),fr("td",{className:"vm-table-cell",children:t.value},t.value),i>0&&fr("td",{className:"vm-table-cell",children:fr(Is,{value:i})},t.progressValue),fr("td",{className:"vm-table-cell vm-table-cell_right",children:fr("div",{className:"vm-table-cell__content",children:fr(mo,{title:"Filter by ".concat(t.name),children:fr(ho,{variant:"text",size:"small",onClick:r,children:fr(Di,{})})})})},"action")]})},nd=function(e){var t=e.data,n=e.container,r=e.configs,i=re(null),o=_t(X(),2),a=o[0],u=o[1],l=bo(n),c=Kn(Kn({},r),{},{width:l.width||400});return te((function(){if(i.current){var e=new zc(c,t,i.current);return u(e),e.destroy}}),[i.current,l]),te((function(){a&&a.setData(t)}),[t]),fr("div",{style:{height:"100%"},children:fr("div",{ref:i})})},rd=function(e,t){return Math.round(e*(t=Math.pow(10,t)))/t},id=1,od=function(e,t,n,r){return rd(t+e*(n+r),6)},ad=function(e,t,n,r,i){var o=1-t,a=n===id?o/(e-1):2===n?o/e:3===n?o/(e+1):0;(isNaN(a)||a===1/0)&&(a=0);var u=n===id?0:2===n?a/2:3===n?a:0,l=t/e,c=rd(l,6);if(null==r)for(var s=0;s=n&&e<=i&&t>=r&&t<=o};function ld(e,t,n,r,i){var o=this;o.x=e,o.y=t,o.w=n,o.h=r,o.l=i||0,o.o=[],o.q=null}var cd={split:function(){var e=this,t=e.x,n=e.y,r=e.w/2,i=e.h/2,o=e.l+1;e.q=[new ld(t+r,n,r,i,o),new ld(t,n,r,i,o),new ld(t,n+i,r,i,o),new ld(t+r,n+i,r,i,o)]},quads:function(e,t,n,r,i){var o=this,a=o.q,u=o.x+o.w/2,l=o.y+o.h/2,c=tu,d=t+r>l;c&&f&&i(a[0]),s&&c&&i(a[1]),s&&d&&i(a[2]),f&&d&&i(a[3])},add:function(e){var t=this;if(null!=t.q)t.quads(e.x,e.y,e.w,e.h,(function(t){t.add(e)}));else{var n=t.o;if(n.push(e),n.length>10&&t.l<4){t.split();for(var r=function(e){var r=n[e];t.quads(r.x,r.y,r.w,r.h,(function(e){e.add(r)}))},i=0;i=0?"left":"right",e.ctx.textBaseline=1===s?"middle":i[n]>=0?"bottom":"top",e.ctx.fillText(i[n],f,g)}}))})),e.ctx.restore()}function b(e,t,n){return[0,zc.rangeNum(0,n,.05,!0)[1]]}return{hooks:{drawClear:function(t){var n;if((y=y||new ld(0,0,t.bbox.width,t.bbox.height)).clear(),t.series.forEach((function(e){e._paths=null})),l=d?[null].concat(m(t.data.length-1-o.length,t.data[0].length)):2===t.series.length?[null].concat(m(t.data[0].length,1)):[null].concat(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h,r=Array.from({length:t},(function(){return{offs:Array(e).fill(0),size:Array(e).fill(0)}}));return ad(e,n,p,null,(function(e,n,i){ad(t,1,v,null,(function(t,o,a){r[t].offs[e]=n+i*o,r[t].size[e]=i*a}))})),r}(t.data[0].length,t.data.length-1-o.length,1===t.data[0].length?1:h)),null!=(null===(n=e.disp)||void 0===n?void 0:n.fill)){c=[null];for(var r=1;r0&&!o.includes(t)&&zc.assign(e,{paths:g,points:{show:_}})}))}}}((sd=[1],fd=0,dd=1,hd=0,pd=function(e,t){return{stroke:e,fill:t}}({unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}},{unit:3,values:function(e){return e.data[1].map((function(e,t){return 0!==t?"#33BB55":"#F79420"}))}}),{which:sd,ori:fd,dir:dd,radius:hd,disp:pd}))]},md=function(e){var t=e.rows,n=e.activeTab,r=e.onChange,i=e.tabs,o=e.chartContainer,a=e.totalSeries,u=e.tabId,l=e.onActionClick,c=e.sectionTitle,s=e.tableHeaderCells,f=oe((function(){return i.map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:wi,{})}}))}),[i]);return fr("div",{className:"vm-metrics-content vm-block",children:[fr("div",{className:"vm-metrics-content-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:c}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(n),items:f,onChange:function(e){r(e,u)}})})]}),fr("div",{ref:o,children:[0===n&&fr(ed,{rows:t,headerCells:s,defaultSortColumn:"value",tableCells:function(e){return fr(td,{row:e,totalSeries:a,onActionClick:l})}}),1===n&&fr(nd,{data:[t.map((function(e){return e.name})),t.map((function(e){return e.value})),t.map((function(e,t){return t%12==0?1:t%10==0?2:0}))],container:(null===o||void 0===o?void 0:o.current)||null,configs:vd})]})]})},yd=function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=to();!function(){var e=eo(),t=e.topN,n=e.match,r=e.date,i=e.focusLabel,o=e.extraLabel,a=function(){var e=Vs({topN:t,date:r,match:n,extraLabel:o,focusLabel:i});ar(e)};te(a,[t,n,r,i,o]),te(a,[])}();var a=_t(X(n||""),2),u=a[0],l=a[1],c=_t(X(0),2),s=c[0],f=c[1],d=_t(X([]),2),h=d[0],p=d[1],v=function(){var e=new zf,t=eo(),n=t.topN,r=t.extraLabel,i=t.match,o=t.date,a=t.runQuery,u=t.focusLabel,l=hr().serverUrl,c=_t(X(!1),2),s=c[0],f=c[1],d=_t(X(),2),h=d[0],p=d[1],v=_t(X(e.defaultTSDBStatus),2),m=v[0],y=v[1];te((function(){h&&(y(e.defaultTSDBStatus),f(!1))}),[h]);var g=function(){var t=os(rs().mark((function t(n){var r,i,o,a;return rs().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=2;break}return t.abrupt("return");case 2:return p(""),f(!0),y(e.defaultTSDBStatus),r=jf(l,n),t.prev=6,t.next=9,fetch(r);case 9:return i=t.sent,t.next=12,i.json();case 12:o=t.sent,i.ok?(a=o.data,y(Kn({},a)),f(!1)):(p(o.error),y(e.defaultTSDBStatus),f(!1)),t.next=20;break;case 16:t.prev=16,t.t0=t.catch(6),f(!1),t.t0 instanceof Error&&p("".concat(t.t0.name,": ").concat(t.t0.message));case 20:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(e){return t.apply(this,arguments)}}();return te((function(){g({topN:n,extraLabel:r,match:i,date:o,focusLabel:u})}),[l,a,o]),e.tsdbStatusData=m,{isLoading:s,appConfigurator:e,error:h}}(),m=v.isLoading,y=v.appConfigurator,g=v.error,_=_t(X(y.defaultState.defaultActiveTab),2),b=_[0],D=_[1],w=y.tsdbStatusData,x=y.defaultState,k=y.tablesHeaders,C=function(e,t){D(Kn(Kn({},b),{},qn({},t,+e)))};return fr("div",{className:"vm-cardinality-panel",children:[m&&fr(Ls,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),fr(Gf,{error:"",query:u,topN:t,date:r,match:n,totalSeries:w.totalSeries,totalLabelValuePairs:w.totalLabelValuePairs,focusLabel:i,onRunQuery:function(){p((function(e){return[].concat(bt(e),[u])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:u}),o({type:"RUN_QUERY"})},onSetQuery:function(e){l(e)},onSetHistory:function(e){var t=s+e;t<0||t>=h.length||(f(t),l(h[t]))},onTopNChange:function(e){o({type:"SET_TOP_N",payload:+e})},onFocusLabelChange:function(e){o({type:"SET_FOCUS_LABEL",payload:e})}}),g&&fr(lo,{variant:"error",children:g}),y.keys(i).map((function(e){return fr(md,{sectionTitle:y.sectionsTitles(i)[e],activeTab:b[e],rows:w[e],onChange:C,onActionClick:(t=e,function(e){var n=e.currentTarget.id,r=Wf[t](i,n);l(r),p((function(e){return[].concat(bt(e),[r])})),f((function(e){return e+1})),o({type:"SET_MATCH",payload:r});var a="";"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(a=n),o({type:"SET_FOCUS_LABEL",payload:a}),o({type:"RUN_QUERY"})}),tabs:x.tabs[e],chartContainer:x.containerRefs[e],totalSeries:y.totalSeries(e),tabId:e,tableHeaderCells:k[e]},e);var t}))]})},gd=function(e){var t=e.rows,n=e.columns,r=_t(X(e.defaultOrderBy||"count"),2),i=r[0],o=r[1],a=_t(X("desc"),2),u=a[0],l=a[1],c=oe((function(){return Xf(t,Kf(u,i))}),[t,i,u]),s=function(e){return function(){var t;t=e,l((function(e){return"asc"===e&&i===t?"desc":"asc"})),o(t)}};return fr("table",{className:"vm-table",children:[fr("thead",{className:"vm-table-header",children:fr("tr",{className:"vm-table__row vm-table__row_header",children:n.map((function(e){return fr("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:s(e.key),children:fr("div",{className:"vm-table-cell__content",children:[e.title||e.key,fr("div",{className:Bi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===u&&i===e.key}),children:fr(vi,{})})]})},e.key)}))})}),fr("tbody",{className:"vm-table-body",children:c.map((function(e,t){return fr("tr",{className:"vm-table__row",children:n.map((function(t){return fr("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key)}))},t)}))})]})},_d=["table","JSON"].map((function(e,t){return{value:String(t),label:e,icon:fr(0===t?xi:ki,{})}})),bd=function(e){var t=e.rows,n=e.title,r=e.columns,i=e.defaultOrderBy,o=_t(X(0),2),a=o[0],u=o[1];return fr("div",{className:"vm-top-queries-panel vm-block",children:[fr("div",{className:"vm-top-queries-panel-header vm-section-header",children:[fr("h5",{className:"vm-section-header__title",children:n}),fr("div",{className:"vm-section-header__tabs",children:fr(Pi,{activeItem:String(a),items:_d,onChange:function(e){u(+e)}})})]}),fr("div",{children:[0===a&&fr(gd,{rows:t,columns:r,defaultOrderBy:i}),1===a&&fr(Os,{data:t})]})]})},Dd=function(){var e=function(){var e=hr().serverUrl,t=ao(),n=t.topN,r=t.maxLifetime,i=t.runQuery,o=_t(X(null),2),a=o[0],u=o[1],l=_t(X(!1),2),c=l[0],s=l[1],f=_t(X(),2),d=f[0],h=f[1],p=oe((function(){return function(e,t,n){return"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||"")}(e,n,r)}),[e,n,r]),v=function(){var e=os(rs().mark((function e(){var t,n;return rs().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(!0),e.prev=1,e.next=4,fetch(p);case 4:return t=e.sent,e.next=7,t.json();case 7:n=e.sent,t.ok&&["topByAvgDuration","topByCount","topBySumDuration"].forEach((function(e){var t=n[e];Array.isArray(t)&&t.forEach((function(e){return e.timeRangeHours=+(e.timeRangeSeconds/3600).toFixed(2)}))})),u(t.ok?n:null),h(String(n.error||"")),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&"AbortError"!==e.t0.name&&h("".concat(e.t0.name,": ").concat(e.t0.message));case 16:s(!1);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(){return e.apply(this,arguments)}}();return te((function(){v()}),[i]),{data:a,error:d,loading:c}}(),t=e.data,n=e.error,r=e.loading,i=ao(),o=i.topN,a=i.maxLifetime,u=ue(oo).dispatch;!function(){var e=ao(),t=e.topN,n=e.maxLifetime,r=function(){var e=Vs({topN:String(t),maxLifetime:n});ar(e)};te(r,[t,n]),te(r,[])}();var l=oe((function(){var e=a.trim().split(" ").reduce((function(e,t){var n=Or(t);return n?Kn(Kn({},e),n):Kn({},e)}),{});return!!yr().duration(e).asMilliseconds()}),[a]),c=oe((function(){return!!o&&o<1}),[o]),s=oe((function(){return c?"Number must be bigger than zero":""}),[c]),f=oe((function(){return l?"":"Invalid duration value"}),[l]),d=function(e){if(!t)return e;var n=t[e];return"number"===typeof n?Vc(n):n||e},h=function(){u({type:"SET_RUN_QUERY"})},p=function(e){"Enter"===e.key&&h()};return te((function(){t&&(o||u({type:"SET_TOP_N",payload:+t.topN}),a||u({type:"SET_MAX_LIFE_TIME",payload:t.maxLifetime}))}),[t]),fr("div",{className:"vm-top-queries",children:[r&&fr(Ls,{containerStyles:{height:"500px"}}),fr("div",{className:"vm-top-queries-controls vm-block",children:[fr("div",{className:"vm-top-queries-controls__fields",children:[fr(To,{label:"Max lifetime",value:a,error:f,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:function(e){u({type:"SET_MAX_LIFE_TIME",payload:e})},onKeyDown:p}),fr(To,{label:"Number of returned queries",type:"number",value:o||"",error:s,onChange:function(e){u({type:"SET_TOP_N",payload:+e})},onKeyDown:p})]}),fr("div",{className:"vm-top-queries-controls-bottom",children:[fr("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",fr(mo,{title:"search.queryStats.lastQueriesCount",children:fr("b",{children:d("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",fr(mo,{title:"search.queryStats.minQueryDuration",children:fr("b",{children:d("search.queryStats.minQueryDuration")})})]}),fr("div",{className:"vm-top-queries-controls-bottom__button",children:fr(ho,{startIcon:fr(bi,{}),onClick:h,children:"Execute"})})]})]}),n&&fr(lo,{variant:"error",children:n}),t&&fr(m,{children:fr("div",{className:"vm-top-queries-panels",children:[fr(bd,{rows:t.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}]}),fr(bd,{rows:t.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),fr(bd,{rows:t.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, seconds"},{key:"timeRangeHours",title:"time range, hours"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"})]})})]})},wd=["primary","secondary","error","warning","info","success"],xd=function(e){var t=e.setLoadingTheme,n=Xn().palette,r=void 0===n?{}:n,i=function(){wd.forEach((function(e){var t=function(e){var t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"}(Mi("color-".concat(e)));Li("".concat(e,"-text"),t)}))};return te((function(){wd.forEach((function(e){var t=r[e];t&&Li("color-".concat(e),t)})),function(){var e=window,t=e.innerWidth,n=e.innerHeight,r=document.documentElement,i=r.clientWidth,o=r.clientHeight;Li("scrollbar-width","".concat(t-i,"px")),Li("scrollbar-height","".concat(n-o,"px"))}(),i(),t(!1)}),[]),null},kd=function(){var e=_t(X(!1),2),t=e[0],n=e[1],r=_t(X([]),2),i=r[0],o=r[1],a=_t(X([]),2),u=a[0],l=a[1],s=oe((function(){return!!i.length}),[i]),f=function(){n(!0)},d=function(){n(!1)},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l((function(n){return[{filename:t,text:": ".concat(e.message)}].concat(bt(n))}))},p=function(e,t){try{var n=JSON.parse(e),r=n.trace||n;if(!r.duration_msec)return void h(new Error(Co.traceNotFound),t);var i=new Fs(r,t);o((function(e){return[i].concat(bt(e))}))}catch(c){c instanceof Error&&h(c,t)}},v=function(e){l([]),Array.from(e.target.files||[]).map((function(e){var t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=function(e){var t,r=String(null===(t=e.target)||void 0===t?void 0:t.result);p(r,n)},t.readAsText(e)})),e.target.value=""},m=function(e){return function(){!function(e){l((function(t){return t.filter((function(t,n){return n!==e}))}))}(e)}},y=function(){return fr("div",{className:"vm-trace-page-controls",children:[fr(ho,{variant:"outlined",onClick:f,children:"Paste JSON"}),fr(mo,{title:"The file must contain tracing information in JSON format",children:fr(ho,{children:["Upload Files",fr("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:v})]})})]})};return fr("div",{className:"vm-trace-page",children:[fr("div",{className:"vm-trace-page-header",children:[fr("div",{className:"vm-trace-page-header-errors",children:u.map((function(e,t){return fr("div",{className:"vm-trace-page-header-errors-item",children:[fr(lo,{variant:"error",children:[fr("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),fr("span",{children:e.text})]}),fr(ho,{className:"vm-trace-page-header-errors-item__close",startIcon:fr(ai,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))}))}),fr("div",{children:s&&fr(y,{})})]}),s&&fr("div",{children:fr(js,{jsonEditor:!0,traces:i,onDeleteClick:function(e){var t=i.filter((function(t){return t.idValue!==e.idValue}));o(bt(t))}})}),!s&&fr("div",{className:"vm-trace-page-preview",children:[fr("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain tracing information in JSON format.","\n","In order to use tracing please refer to the doc:\xa0",fr("a",{href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload."]}),fr(y,{})]}),t&&fr(Lo,{title:"Paste JSON",onClose:d,children:fr(Rs,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(i.length+1),onClose:d,onUpload:p})})]})},Cd=function(){var e=_t(X(!0),2),t=e[0],n=e[1];return fr(m,t?{children:[fr(Ls,{}),fr(xd,{setLoadingTheme:n}),";"]}:{children:fr(Un,{children:fr(fo,{children:fr(jn,{children:fr($n,{path:"/",element:fr(qo,{}),children:[fr($n,{path:Jn.home,element:fr(Qs,{})}),fr($n,{path:Jn.dashboards,element:fr(Rf,{})}),fr($n,{path:Jn.cardinality,element:fr(yd,{})}),fr($n,{path:Jn.topQueries,element:fr(Dd,{})}),fr($n,{path:Jn.trace,element:fr(kd,{})})]})})})})})},Ed=function(e){e&&n.e(27).then(n.bind(n,27)).then((function(t){var n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)}))},Sd=document.getElementById("root");Sd&&Ye(fr(Cd,{}),Sd),Ed()}()}(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0b7317e2.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.e18cda26.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.0b7317e2.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.e18cda26.js.LICENSE.txt diff --git a/app/vmui/Dockerfile-web b/app/vmui/Dockerfile-web index 326121fba..c29bf28ea 100644 --- a/app/vmui/Dockerfile-web +++ b/app/vmui/Dockerfile-web @@ -6,7 +6,7 @@ COPY web/ /build/ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o web-amd64 github.com/VictoriMetrics/vmui/ && \ GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o web-windows github.com/VictoriMetrics/vmui/ -FROM alpine:3.16.2 +FROM alpine:3.17.0 USER root COPY --from=build-web-stage /build/web-amd64 /app/web diff --git a/app/vmui/packages/vmui/src/App.tsx b/app/vmui/packages/vmui/src/App.tsx index 4ab8a19aa..4a199c79b 100644 --- a/app/vmui/packages/vmui/src/App.tsx +++ b/app/vmui/packages/vmui/src/App.tsx @@ -9,6 +9,7 @@ import CardinalityPanel from "./pages/CardinalityPanel"; import TopQueries from "./pages/TopQueries"; import ThemeProvider from "./components/Main/ThemeProvider/ThemeProvider"; import Spinner from "./components/Main/Spinner/Spinner"; +import TracePage from "./pages/TracePage"; const App: FC = () => { @@ -45,6 +46,10 @@ const App: FC = () => { path={router.topQueries} element={} /> + } + /> diff --git a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx new file mode 100644 index 000000000..099771946 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/ChartTooltip.tsx @@ -0,0 +1,181 @@ +import React, { FC, useEffect, useMemo, useRef, useState } from "preact/compat"; +import uPlot, { Series } from "uplot"; +import { MetricResult } from "../../../api/types"; +import { formatPrettyNumber, getColorLine, getLegendLabel } from "../../../utils/uplot/helpers"; +import dayjs from "dayjs"; +import { DATE_FULL_TIMEZONE_FORMAT } from "../../../constants/date"; +import ReactDOM from "react-dom"; +import get from "lodash.get"; +import Button from "../../Main/Button/Button"; +import { CloseIcon, DragIcon } from "../../Main/Icons"; +import classNames from "classnames"; +import { MouseEvent as ReactMouseEvent } from "react"; +import "./style.scss"; + +export interface ChartTooltipProps { + id: string, + u: uPlot, + metrics: MetricResult[], + series: Series[], + unit?: string, + isSticky?: boolean, + tooltipOffset: { left: number, top: number }, + tooltipIdx: { seriesIdx: number, dataIdx: number }, + onClose?: (id: string) => void +} + +const ChartTooltip: FC = ({ + u, + id, + unit = "", + metrics, + series, + tooltipIdx, + tooltipOffset, + isSticky, + onClose +}) => { + const tooltipRef = useRef(null); + + const [position, setPosition] = useState({ top: -999, left: -999 }); + const [moving, setMoving] = useState(false); + const [moved, setMoved] = useState(false); + + const [seriesIdx, setSeriesIdx] = useState(tooltipIdx.seriesIdx); + const [dataIdx, setDataIdx] = useState(tooltipIdx.dataIdx); + + const targetPortal = useMemo(() => u.root.querySelector(".u-wrap"), [u]); + + const value = useMemo(() => get(u, ["data", seriesIdx, dataIdx], 0), [u, seriesIdx, dataIdx]); + const valueFormat = useMemo(() => formatPrettyNumber(value), [value]); + const dataTime = useMemo(() => u.data[0][dataIdx], [u, dataIdx]); + const date = useMemo(() => dayjs(new Date(dataTime * 1000)).format(DATE_FULL_TIMEZONE_FORMAT), [dataTime]); + + const color = useMemo(() => getColorLine(series[seriesIdx]?.label || ""), [series, seriesIdx]); + + const name = useMemo(() => { + const metricName = (series[seriesIdx]?.label || "").replace(/{.+}/gmi, "").trim(); + return getLegendLabel(metricName); + }, []); + + const fields = useMemo(() => { + const metric = metrics[seriesIdx - 1]?.metric || {}; + const fields = Object.keys(metric).filter(k => k !== "__name__"); + return fields.map(key => `${key}="${metric[key]}"`); + }, [metrics, seriesIdx]); + + const handleClose = () => { + onClose && onClose(id); + }; + + const handleMouseDown = (e: ReactMouseEvent) => { + setMoved(true); + setMoving(true); + const { clientX, clientY } = e; + setPosition({ top: clientY, left: clientX }); + }; + + const handleMouseMove = (e: MouseEvent) => { + if (!moving) return; + const { clientX, clientY } = e; + setPosition({ top: clientY, left: clientX }); + }; + + const handleMouseUp = () => { + setMoving(false); + }; + + const calcPosition = () => { + if (!tooltipRef.current) return; + + const topOnChart = u.valToPos((value || 0), series[seriesIdx]?.scale || "1"); + const leftOnChart = u.valToPos(dataTime, "x"); + const { width: tooltipWidth, height: tooltipHeight } = tooltipRef.current.getBoundingClientRect(); + const { width, height } = u.over.getBoundingClientRect(); + + const margin = 10; + const overflowX = leftOnChart + tooltipWidth >= width ? tooltipWidth + (2 * margin) : 0; + const overflowY = topOnChart + tooltipHeight >= height ? tooltipHeight + (2 * margin) : 0; + + setPosition({ + top: topOnChart + tooltipOffset.top + margin - overflowY, + left: leftOnChart + tooltipOffset.left + margin - overflowX + }); + }; + + useEffect(calcPosition, [u, value, dataTime, seriesIdx, tooltipOffset, tooltipRef]); + + useEffect(() => { + setSeriesIdx(tooltipIdx.seriesIdx); + setDataIdx(tooltipIdx.dataIdx); + }, [tooltipIdx]); + + useEffect(() => { + if (moving) { + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("mouseup", handleMouseUp); + } + + return () => { + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("mouseup", handleMouseUp); + }; + }, [moving]); + + if (!targetPortal || tooltipIdx.seriesIdx < 0 || tooltipIdx.dataIdx < 0) return null; + + return ReactDOM.createPortal(( +
    +
    +
    {date}
    + {isSticky && ( + <> +
    +
    +
    +

    + {name}: + {valueFormat} + {unit} +

    +
    + {!!fields.length && ( +
    + {fields.map((f, i) => ( +
    {f}
    + ))} +
    + )} +
    + ), targetPortal); +}; + +export default ChartTooltip; diff --git a/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss new file mode 100644 index 000000000..5d1a9fe5e --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Chart/ChartTooltip/style.scss @@ -0,0 +1,80 @@ +@use "src/styles/variables" as *; +$chart-tooltip-width: 300px; +$chart-tooltip-icon-width: 25px; +$chart-tooltip-half-icon: calc($chart-tooltip-icon-width/2); +$chart-tooltip-date-width: $chart-tooltip-width - (2*$chart-tooltip-icon-width) - (2*$padding-global) - $padding-small; +$chart-tooltip-x: -1 * ($padding-small + $padding-global + $chart-tooltip-date-width + $chart-tooltip-half-icon); +$chart-tooltip-y: -1 * ($padding-small + $chart-tooltip-half-icon); + +.vm-chart-tooltip { + position: absolute; + display: grid; + gap: $padding-global; + width: $chart-tooltip-width; + padding: $padding-small; + border-radius: $border-radius-medium; + background: $color-background-tooltip; + color: $color-white; + font-size: $font-size-small; + font-weight: normal; + line-height: 150%; + word-wrap: break-word; + font-family: $font-family-monospace; + z-index: 98; + user-select: text; + pointer-events: none; + + &_sticky { + background-color: $color-dove-gray; + pointer-events: auto; + z-index: 99; + } + + &_moved { + position: fixed; + margin-top: $chart-tooltip-y; + margin-left: $chart-tooltip-x; + } + + &-header { + display: grid; + grid-template-columns: 1fr $chart-tooltip-icon-width $chart-tooltip-icon-width; + gap: $padding-small; + align-items: center; + justify-content: center; + min-height: 25px; + + &__close { + color: $color-white; + } + + &__drag { + color: $color-white; + cursor: move; + } + } + + &-data { + display: grid; + grid-template-columns: auto 1fr; + gap: $padding-small; + align-items: flex-start; + word-break: break-all; + line-height: 12px; + + &__value { + padding: 4px; + font-weight: bold; + } + + &__marker { + width: 12px; + height: 12px; + } + } + + &-info { + display: grid; + grid-gap: 4px; + } +} diff --git a/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx b/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx index b8c37503f..1e7e4ff7c 100644 --- a/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx +++ b/app/vmui/packages/vmui/src/components/Chart/LineChart/LineChart.tsx @@ -1,9 +1,15 @@ -import React, { FC, useCallback, useEffect, useRef, useState } from "preact/compat"; -import uPlot, { AlignedData as uPlotData, Options as uPlotOptions, Series as uPlotSeries, Range, Scales, Scale } from "uplot"; +import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from "preact/compat"; +import uPlot, { + AlignedData as uPlotData, + Options as uPlotOptions, + Series as uPlotSeries, + Range, + Scales, + Scale, +} from "uplot"; import { defaultOptions } from "../../../utils/uplot/helpers"; import { dragChart } from "../../../utils/uplot/events"; import { getAxes, getMinMaxBuffer } from "../../../utils/uplot/axes"; -import { setTooltip } from "../../../utils/uplot/tooltip"; import { MetricResult } from "../../../api/types"; import { limitsDurations } from "../../../utils/time"; import throttle from "lodash.throttle"; @@ -13,6 +19,7 @@ import { YaxisState } from "../../../state/graph/reducer"; import "uplot/dist/uPlot.min.css"; import "./style.scss"; import classNames from "classnames"; +import ChartTooltip, { ChartTooltipProps } from "../ChartTooltip/ChartTooltip"; export interface LineChartProps { metrics: MetricResult[]; @@ -24,21 +31,30 @@ export interface LineChartProps { setPeriod: ({ from, to }: {from: Date, to: Date}) => void; container: HTMLDivElement | null } + enum typeChartUpdate {xRange = "xRange", yRange = "yRange", data = "data"} -const LineChart: FC = ({ data, series, metrics = [], - period, yaxis, unit, setPeriod, container }) => { - +const LineChart: FC = ({ + data, + series, + metrics = [], + period, + yaxis, + unit, + setPeriod, + container +}) => { const uPlotRef = useRef(null); const [isPanning, setPanning] = useState(false); const [xRange, setXRange] = useState({ min: period.start, max: period.end }); const [uPlotInst, setUPlotInst] = useState(); const layoutSize = useResize(container); - const tooltip = document.createElement("div"); - tooltip.className = "u-tooltip"; - const tooltipIdx: {seriesIdx: number | null, dataIdx: number | undefined} = { seriesIdx: null, dataIdx: undefined }; - const tooltipOffset = { left: 0, top: 0 }; + const [showTooltip, setShowTooltip] = useState(false); + const [tooltipIdx, setTooltipIdx] = useState({ seriesIdx: -1, dataIdx: -1 }); + const [tooltipOffset, setTooltipOffset] = useState({ left: 0, top: 0 }); + const [stickyTooltips, setStickyToolTips] = useState([]); + const tooltipId = useMemo(() => `${tooltipIdx.seriesIdx}_${tooltipIdx.dataIdx}`, [tooltipIdx]); const setScale = ({ min, max }: { min: number, max: number }): void => { setPeriod({ from: new Date(min * 1000), to: new Date(max * 1000) }); @@ -54,12 +70,13 @@ const LineChart: FC = ({ data, series, metrics = [], const onReadyChart = (u: uPlot) => { const factor = 0.9; - tooltipOffset.left = parseFloat(u.over.style.left); - tooltipOffset.top = parseFloat(u.over.style.top); - u.root.querySelector(".u-wrap")?.appendChild(tooltip); + setTooltipOffset({ + left: parseFloat(u.over.style.left), + top: parseFloat(u.over.style.top) + }); u.over.addEventListener("mousedown", e => { - const { ctrlKey, metaKey } = e; - const leftClick = e.button === 0; + const { ctrlKey, metaKey, button } = e; + const leftClick = button === 0; const leftClickWithMeta = leftClick && (ctrlKey || metaKey); if (leftClickWithMeta) { // drag pan @@ -98,21 +115,37 @@ const LineChart: FC = ({ data, series, metrics = [], } }; - const setCursor = (u: uPlot) => { - if (tooltipIdx.dataIdx === u.cursor.idx) return; - tooltipIdx.dataIdx = u.cursor.idx || 0; - if (tooltipIdx.seriesIdx !== null && tooltipIdx.dataIdx !== undefined) { - setTooltip({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit }); + const handleClick = () => { + const id = `${tooltipIdx.seriesIdx}_${tooltipIdx.dataIdx}`; + const props = { + id, + unit, + series, + metrics, + tooltipIdx, + tooltipOffset, + }; + + if (!stickyTooltips.find(t => t.id === id)) { + const tooltipProps = JSON.parse(JSON.stringify(props)); + setStickyToolTips(prev => [...prev, tooltipProps]); } }; - const seriesFocus = (u: uPlot, sidx: (number | null)) => { - if (tooltipIdx.seriesIdx === sidx) return; - tooltipIdx.seriesIdx = sidx; - sidx && tooltipIdx.dataIdx !== undefined - ? setTooltip({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit }) - : tooltip.style.display = "none"; + const handleUnStick = (id:string) => { + setStickyToolTips(prev => prev.filter(t => t.id !== id)); }; + + const setCursor = (u: uPlot) => { + const dataIdx = u.cursor.idx ?? -1; + setTooltipIdx(prev => ({ ...prev, dataIdx })); + }; + + const seriesFocus = (u: uPlot, sidx: (number | null)) => { + const seriesIdx = sidx ?? -1; + setTooltipIdx(prev => ({ ...prev, seriesIdx })); + }; + const getRangeX = (): Range.MinMax => [xRange.min, xRange.max]; const getRangeY = (u: uPlot, min = 0, max = 1, axis: string): Range.MinMax => { if (yaxis.limits.enable) return yaxis.limits.range[axis]; @@ -168,6 +201,8 @@ const LineChart: FC = ({ data, series, metrics = [], useEffect(() => setXRange({ min: period.start, max: period.end }), [period]); useEffect(() => { + setStickyToolTips([]); + setTooltipIdx({ seriesIdx: -1, dataIdx: -1 }); if (!uPlotRef.current) return; const u = new uPlot(options, data, uPlotRef.current); setUPlotInst(u); @@ -187,6 +222,17 @@ const LineChart: FC = ({ data, series, metrics = [], useEffect(() => updateChart(typeChartUpdate.xRange), [xRange]); useEffect(() => updateChart(typeChartUpdate.yRange), [yaxis]); + useEffect(() => { + const show = tooltipIdx.dataIdx !== -1 && tooltipIdx.seriesIdx !== -1; + setShowTooltip(show); + + if (show) window.addEventListener("click", handleClick); + + return () => { + window.removeEventListener("click", handleClick); + }; + }, [tooltipIdx, stickyTooltips]); + return (
    = ({ data, series, metrics = [], "vm-line-chart_panning": isPanning })} > -
    +
    + {uPlotInst && showTooltip && ( + + )} + + {uPlotInst && stickyTooltips.map(t => ( + + ))}
    ); }; diff --git a/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss b/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss index d1b3b26de..30186608f 100644 --- a/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss +++ b/app/vmui/packages/vmui/src/components/Chart/LineChart/style.scss @@ -7,45 +7,8 @@ &_panning { pointer-events: none; } -} -.u-tooltip { - position: absolute; - display: none; - grid-gap: $padding-global; - max-width: 300px; - padding: $padding-small; - border-radius: $border-radius-medium; - background: $color-background-tooltip; - color: $color-white; - font-size: $font-size-small; - font-weight: normal; - line-height: 1.4; - word-wrap: break-word; - font-family: monospace; - pointer-events: none; - z-index: 100; - - &-data { - display: flex; - flex-wrap: wrap; - align-items: center; - line-height: 150%; - - &__value { - padding: 4px; - font-weight: bold; - } - } - - &__info { - display: grid; - grid-gap: 4px; - } - - &__marker { - width: 12px; - height: 12px; - margin-right: $padding-small; + &__u-plot { + position: relative; } } diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx index 2676a159e..09e351f67 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/GlobalSettings.tsx @@ -6,32 +6,42 @@ import Button from "../../Main/Button/Button"; import Modal from "../../Main/Modal/Modal"; import "./style.scss"; import Tooltip from "../../Main/Tooltip/Tooltip"; +import LimitsConfigurator from "./LimitsConfigurator/LimitsConfigurator"; +import { SeriesLimits } from "../../../types"; +import { useCustomPanelDispatch, useCustomPanelState } from "../../../state/customPanel/CustomPanelStateContext"; +import { getAppModeEnable } from "../../../utils/app-mode"; +import classNames from "classnames"; -const title = "Setting Server URL"; +const title = "Settings"; const GlobalSettings: FC = () => { - const { serverUrl } = useAppState(); + const appModeEnable = getAppModeEnable(); + const { serverUrl: stateServerUrl } = useAppState(); + const { seriesLimits } = useCustomPanelState(); + const dispatch = useAppDispatch(); - const [changedServerUrl, setChangedServerUrl] = useState(serverUrl); + const customPanelDispatch = useCustomPanelDispatch(); - const setServer = (url?: string) => { - dispatch({ type: "SET_SERVER", payload: url || changedServerUrl }); - handleClose(); - }; - - const createSetServer = () => () => { - setServer(); - }; + const [serverUrl, setServerUrl] = useState(stateServerUrl); + const [limits, setLimits] = useState(seriesLimits); const [open, setOpen] = useState(false); const handleOpen = () => setOpen(true); const handleClose = () => setOpen(false); + const handlerApply = () => { + dispatch({ type: "SET_SERVER", payload: serverUrl }); + customPanelDispatch({ type: "SET_SERIES_LIMITS", payload: limits }); + handleClose(); + }; + return <> diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx new file mode 100644 index 000000000..3267b3857 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/LimitsConfigurator.tsx @@ -0,0 +1,88 @@ +import React, { FC, useState } from "preact/compat"; +import { DisplayType, ErrorTypes, SeriesLimits } from "../../../../types"; +import TextField from "../../../Main/TextField/TextField"; +import Tooltip from "../../../Main/Tooltip/Tooltip"; +import { InfoIcon, RestartIcon } from "../../../Main/Icons"; +import Button from "../../../Main/Button/Button"; +import { DEFAULT_MAX_SERIES } from "../../../../constants/graph"; +import "./style.scss"; + +export interface ServerConfiguratorProps { + limits: SeriesLimits + onChange: (limits: SeriesLimits) => void + onEnter: () => void +} + +const fields: {label: string, type: DisplayType}[] = [ + { label: "Graph", type: "chart" }, + { label: "JSON", type: "code" }, + { label: "Table", type: "table" } +]; + +const LimitsConfigurator: FC = ({ limits, onChange , onEnter }) => { + + const [error, setError] = useState({ + table: "", + chart: "", + code: "" + }); + + const handleChange = (val: string, type: DisplayType) => { + const value = val || ""; + setError(prev => ({ ...prev, [type]: +value < 0 ? ErrorTypes.positiveNumber : "" })); + onChange({ + ...limits, + [type]: !value ? Infinity : value + }); + }; + + const handleReset = () => { + onChange(DEFAULT_MAX_SERIES); + }; + + const createChangeHandler = (type: DisplayType) => (val: string) => { + handleChange(val, type); + }; + + return ( +
    +
    + Series limits by tabs + + +
    +
    +
    + {fields.map(f => ( + + ))} +
    +
    + ); +}; + +export default LimitsConfigurator; diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss new file mode 100644 index 000000000..4443b82d9 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/LimitsConfigurator/style.scss @@ -0,0 +1,28 @@ +@use "src/styles/variables" as *; + +.vm-limits-configurator { + + &-title { + display: flex; + align-items: center; + justify-content: flex-start; + font-size: $font-size; + font-weight: bold; + margin-bottom: $padding-global; + + &__reset { + display: flex; + align-items: center; + justify-content: flex-end; + flex-grow: 1; + } + } + + &__inputs { + display: grid; + grid-template-columns: repeat(3, 1fr); + align-items: center; + justify-content: space-between; + gap: $padding-global; + } +} diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx index 620a9c8f5..3e62f3788 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/ServerConfigurator/ServerConfigurator.tsx @@ -1,41 +1,34 @@ import React, { FC, useState } from "preact/compat"; -import { useAppState } from "../../../../state/common/StateContext"; import { ErrorTypes } from "../../../../types"; import TextField from "../../../Main/TextField/TextField"; import { isValidHttpUrl } from "../../../../utils/url"; export interface ServerConfiguratorProps { - setServer: (url: string) => void - onEnter: (url: string) => void + serverUrl: string + onChange: (url: string) => void + onEnter: () => void } -const ServerConfigurator: FC = ({ setServer , onEnter }) => { +const ServerConfigurator: FC = ({ serverUrl, onChange , onEnter }) => { - const { serverUrl } = useAppState(); const [error, setError] = useState(""); - const [changedServerUrl, setChangedServerUrl] = useState(serverUrl); const onChangeServer = (val: string) => { const value = val || ""; - setChangedServerUrl(value); - setServer(value); + onChange(value); setError(""); if (!value) setError(ErrorTypes.emptyServer); if (!isValidHttpUrl(value)) setError(ErrorTypes.validServer); }; - const handleEnter = () => { - onEnter(changedServerUrl); - }; - return ( ); }; diff --git a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss index 1b1ff9089..5f40cf32d 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss +++ b/app/vmui/packages/vmui/src/components/Configurators/GlobalSettings/style.scss @@ -3,7 +3,7 @@ .vm-server-configurator { display: grid; align-items: center; - gap: $padding-global; + gap: $padding-medium; width: 600px; &__input { diff --git a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx index 2fabde6bf..53ea0a7ad 100644 --- a/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx +++ b/app/vmui/packages/vmui/src/components/Configurators/QueryEditor/QueryEditor.tsx @@ -1,11 +1,9 @@ -import React, { FC, useEffect, useMemo, useRef, useState } from "preact/compat"; +import React, { FC, useRef } from "preact/compat"; import { KeyboardEvent } from "react"; import { ErrorTypes } from "../../../types"; import TextField from "../../Main/TextField/TextField"; -import Popper from "../../Main/Popper/Popper"; -import useClickOutside from "../../../hooks/useClickOutside"; +import Autocomplete from "../../Main/Autocomplete/Autocomplete"; import "./style.scss"; -import classNames from "classnames"; export interface QueryEditorProps { onChange: (query: string) => void; @@ -18,7 +16,7 @@ export interface QueryEditorProps { error?: ErrorTypes | string; options: string[]; label: string; - size?: "small" | "medium" | undefined; + disabled?: boolean } const QueryEditor: FC = ({ @@ -31,25 +29,14 @@ const QueryEditor: FC = ({ error, options, label, + disabled = false }) => { - const [focusOption, setFocusOption] = useState(-1); - const [openAutocomplete, setOpenAutocomplete] = useState(false); - const autocompleteAnchorEl = useRef(null); - const wrapperEl = useRef(null); - const foundOptions = useMemo(() => { - setFocusOption(0); - if (!openAutocomplete) return []; - try { - const regexp = new RegExp(String(value), "i"); - const found = options.filter((item) => regexp.test(item) && (item !== value)); - return found.sort((a,b) => (a.match(regexp)?.index || 0) - (b.match(regexp)?.index || 0)); - } catch (e) { - return []; - } - }, [openAutocomplete, options]); + const handleSelect = (val: string) => { + onChange(val); + }; const handleKeyDown = (e: KeyboardEvent) => { const { key, ctrlKey, metaKey, shiftKey } = e; @@ -59,62 +46,24 @@ const QueryEditor: FC = ({ const arrowDown = key === "ArrowDown"; const enter = key === "Enter"; - const hasAutocomplete = openAutocomplete && foundOptions.length; - - const isArrows = arrowUp || arrowDown; - const arrowsByOptions = isArrows && hasAutocomplete; - const arrowsByHistory = isArrows && ctrlMetaKey; - const enterByOptions = enter && hasAutocomplete; - - if (arrowsByOptions || arrowsByHistory || enterByOptions) { + // prev value from history + if (arrowUp && ctrlMetaKey) { e.preventDefault(); - } - - // ArrowUp - if (arrowUp && hasAutocomplete && !ctrlMetaKey) { - setFocusOption((prev) => prev === 0 ? 0 : prev - 1); - } else if (arrowUp && ctrlMetaKey) { onArrowUp(); } - // ArrowDown - if (arrowDown && hasAutocomplete && !ctrlMetaKey) { - setFocusOption((prev) => prev >= foundOptions.length - 1 ? foundOptions.length - 1 : prev + 1); - } else if (arrowDown && ctrlMetaKey) { + // next value from history + if (arrowDown && ctrlMetaKey) { + e.preventDefault(); onArrowDown(); } - // Enter - if (enter && hasAutocomplete && !shiftKey && !ctrlMetaKey) { - onChange(foundOptions[focusOption]); - setOpenAutocomplete(false); - } else if (enter && !shiftKey) { + // execute query + if (enter && !shiftKey) { onEnter(); } }; - const handleCloseAutocomplete = () => { - setOpenAutocomplete(false); - }; - - const createHandlerOnChangeAutocomplete = (item: string) => () => { - onChange(item); - handleCloseAutocomplete(); - }; - - useEffect(() => { - const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; - setOpenAutocomplete(autocomplete && value.length > 2 && words <= 1); - }, [autocomplete, value]); - - useEffect(() => { - if (!wrapperEl.current) return; - const target = wrapperEl.current.childNodes[focusOption] as HTMLElement; - if (target?.scrollIntoView) target.scrollIntoView({ block: "center" }); - }, [focusOption]); - - useClickOutside(autocompleteAnchorEl, () => setOpenAutocomplete(false), wrapperEl); - return
    = ({ error={error} onKeyDown={handleKeyDown} onChange={onChange} + disabled={disabled} /> - -
    - {foundOptions.map((item, i) => -
    - {item} -
    )} -
    -
    + {autocomplete && ( + + )}
    ; }; diff --git a/app/vmui/packages/vmui/src/components/Header/Header.tsx b/app/vmui/packages/vmui/src/components/Header/Header.tsx index 8d047e5e7..b11206829 100644 --- a/app/vmui/packages/vmui/src/components/Header/Header.tsx +++ b/app/vmui/packages/vmui/src/components/Header/Header.tsx @@ -43,6 +43,10 @@ const Header: FC = () => { { label: "Top queries", value: router.topQueries, + }, + { + label: "Trace analyzer", + value: router.trace, } ]), [appModeEnable]); @@ -111,7 +115,7 @@ const Header: FC = () => { {headerSetup?.timeSelector && } {headerSetup?.cardinalityDatePicker && } {headerSetup?.executionControls && } - {headerSetup?.globalSettings && !appModeEnable && } +
    ; diff --git a/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx b/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx index 6d1312839..f8e418186 100644 --- a/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Alert/Alert.tsx @@ -1,8 +1,8 @@ import React, { FC } from "preact/compat"; import { ReactNode } from "react"; import classNames from "classnames"; -import "./style.scss"; import { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from "../Icons"; +import "./style.scss"; interface AlertProps { variant?: "success" | "error" | "info" | "warning" diff --git a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss index 4bef64257..929129fa8 100644 --- a/app/vmui/packages/vmui/src/components/Main/Alert/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Alert/style.scss @@ -13,7 +13,7 @@ font-size: $font-size-medium; font-weight: 500; color: $color-text; - line-height: 1.3; + line-height: 20px; &:after { position: absolute; @@ -41,6 +41,7 @@ &__content { filter: brightness(0.6); + white-space: pre-line; } &_success { diff --git a/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx b/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx new file mode 100644 index 000000000..021e05797 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Main/Autocomplete/Autocomplete.tsx @@ -0,0 +1,132 @@ +import React, { FC, Ref, useEffect, useMemo, useRef, useState } from "preact/compat"; +import classNames from "classnames"; +import useClickOutside from "../../../hooks/useClickOutside"; +import Popper from "../Popper/Popper"; +import "./style.scss"; + +interface AutocompleteProps { + value: string + options: string[] + anchor: Ref + disabled?: boolean + maxWords?: number + onSelect: (val: string) => void +} + +const Autocomplete: FC = ({ + value, + options, + anchor, + disabled, + maxWords = 1, + onSelect, +}) => { + const wrapperEl = useRef(null); + + const [openAutocomplete, setOpenAutocomplete] = useState(false); + const [focusOption, setFocusOption] = useState(-1); + + const foundOptions = useMemo(() => { + if (!openAutocomplete) return []; + try { + const regexp = new RegExp(String(value), "i"); + const found = options.filter((item) => regexp.test(item) && (item !== value)); + return found.sort((a,b) => (a.match(regexp)?.index || 0) - (b.match(regexp)?.index || 0)); + } catch (e) { + return []; + } + }, [openAutocomplete, options, value]); + + const handleCloseAutocomplete = () => { + setOpenAutocomplete(false); + }; + + const createHandlerSelect = (item: string) => () => { + if (disabled) return; + onSelect(item); + handleCloseAutocomplete(); + }; + + const scrollToValue = () => { + if (!wrapperEl.current) return; + const target = wrapperEl.current.childNodes[focusOption] as HTMLElement; + if (target?.scrollIntoView) target.scrollIntoView({ block: "center" }); + }; + + const handleKeyDown = (e: KeyboardEvent) => { + const { key, ctrlKey, metaKey, shiftKey } = e; + const modifiers = ctrlKey || metaKey || shiftKey; + + if (key === "ArrowUp" && !modifiers) { + e.preventDefault(); + setFocusOption((prev) => prev <= 0 ? 0 : prev - 1); + } + + if (key === "ArrowDown" && !modifiers) { + e.preventDefault(); + const lastIndex = foundOptions.length - 1; + setFocusOption((prev) => prev >= lastIndex ? lastIndex : prev + 1); + } + + if (key === "Enter") { + const value = foundOptions[focusOption]; + value && onSelect(value); + handleCloseAutocomplete(); + } + + if (key === "Escape") { + handleCloseAutocomplete(); + } + }; + + useEffect(() => { + const words = (value.match(/[a-zA-Z_:.][a-zA-Z0-9_:.]*/gm) || []).length; + setOpenAutocomplete(value.length > 2 && words <= maxWords); + }, [value]); + + useEffect(() => { + scrollToValue(); + + window.addEventListener("keydown", handleKeyDown); + + return () => { + window.removeEventListener("keydown", handleKeyDown); + }; + }, [focusOption, foundOptions]); + + useEffect(() => { + setFocusOption(-1); + }, [foundOptions]); + + useClickOutside(wrapperEl, handleCloseAutocomplete); + + return ( + +
    + {foundOptions.map((option, i) => +
    + {option} +
    + )} +
    +
    + ); +}; + +export default Autocomplete; diff --git a/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss b/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss new file mode 100644 index 000000000..ad4d07ae6 --- /dev/null +++ b/app/vmui/packages/vmui/src/components/Main/Autocomplete/style.scss @@ -0,0 +1,6 @@ +@use "src/styles/variables" as *; + +.vm-autocomplete { + max-height: 300px; + overflow: auto; +} diff --git a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx index 81a2584ff..5d939e609 100644 --- a/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Button/Button.tsx @@ -5,7 +5,7 @@ import "./style.scss"; interface ButtonProps { variant?: "contained" | "outlined" | "text" - color?: "primary" | "secondary" | "success" | "error" + color?: "primary" | "secondary" | "success" | "error" | "gray" | "warning" size?: "small" | "medium" | "large" endIcon?: ReactNode startIcon?: ReactNode @@ -14,6 +14,7 @@ interface ButtonProps { children?: ReactNode className?: string onClick?: (e: ReactMouseEvent) => void + onMouseDown?: (e: ReactMouseEvent) => void } const Button: FC = ({ @@ -27,6 +28,7 @@ const Button: FC = ({ className, disabled, onClick, + onMouseDown, }) => { const classesButton = classNames({ @@ -45,6 +47,7 @@ const Button: FC = ({ className={classesButton} disabled={disabled} onClick={onClick} + onMouseDown={onMouseDown} > <> {startIcon && {startIcon}} diff --git a/app/vmui/packages/vmui/src/components/Main/Button/style.scss b/app/vmui/packages/vmui/src/components/Main/Button/style.scss index 331f11e60..5b07823b6 100644 --- a/app/vmui/packages/vmui/src/components/Main/Button/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Button/style.scss @@ -135,6 +135,23 @@ $button-radius: 6px; } } + &_contained_gray { + color: $color-text-secondary; + + &:before { + background-color: $color-text-secondary; + } + } + + &_contained_warning { + color: $color-warning; + + &:before { + background-color: $color-warning; + opacity: 0.2; + } + } + /* variant TEXT */ &_text_primary { @@ -153,6 +170,14 @@ $button-radius: 6px; color: $color-error; } + &_text_gray { + color: $color-text-secondary; + } + + &_text_warning { + color: $color-warning; + } + /* variant OUTLINED */ &_outlined_primary { @@ -174,4 +199,14 @@ $button-radius: 6px; border: 1px solid $color-success; color: $color-success; } + + &_outlined_gray { + border: 1px solid $color-text-secondary; + color: $color-text-secondary; + } + + &_outlined_warning { + border: 1px solid $color-warning; + color: $color-warning; + } } diff --git a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx index d7e2db9b2..cd7ea24dc 100644 --- a/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx +++ b/app/vmui/packages/vmui/src/components/Main/Icons/index.tsx @@ -267,3 +267,45 @@ export const DoneIcon = () => ( /> ); + +export const VisibilityIcon = () => ( + + + +); + +export const VisibilityOffIcon = () => ( + + + +); + +export const CopyIcon = () => ( + + + +); + +export const DragIcon = () => ( + + + +); diff --git a/app/vmui/packages/vmui/src/components/Main/Modal/style.scss b/app/vmui/packages/vmui/src/components/Main/Modal/style.scss index 1b5f5e9de..65ff3946b 100644 --- a/app/vmui/packages/vmui/src/components/Main/Modal/style.scss +++ b/app/vmui/packages/vmui/src/components/Main/Modal/style.scss @@ -16,11 +16,9 @@ $padding-modal: 22px; &-content { padding: $padding-modal; - max-height: 85vh; background: $color-white; box-shadow: 0 0 24px rgba($color-black, 0.07); border-radius: $border-radius-small; - overflow: hidden; &-header { display: grid; diff --git a/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx b/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx index b02fef559..7e1436a2f 100644 --- a/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx +++ b/app/vmui/packages/vmui/src/components/Main/TextField/TextField.tsx @@ -64,7 +64,10 @@ const TextField: FC = ({ }, [fieldRef, autofocus]); return
    + +
    +
    +
    +

    Display columns

    + +
    {columns.map(col => (
    ))}
    -
    - - -
    diff --git a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss index fcc9bb0b3..d1b45cb50 100644 --- a/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss +++ b/app/vmui/packages/vmui/src/pages/CardinalityPanel/Table/TableSettings/style.scss @@ -2,27 +2,31 @@ .vm-table-settings-popper { display: grid; + min-width: 250px; &-list { display: grid; gap: $padding-small; - padding: $padding-global $padding-global $padding-medium; + padding: $padding-global; max-height: 350px; overflow: auto; + border-bottom: $border-divider; + + &-header { + display: grid; + align-items: center; + justify-content: space-between; + grid-template-columns: 1fr auto; + min-height: 25px; + + &__title { + font-weight: bold; + } + } &__item { font-size: $font-size; text-transform: capitalize; } } - - &__footer { - min-width: 200px; - display: inline-grid; - grid-template-columns: 1fr 1fr; - gap: $padding-small; - align-items: center; - justify-content: center; - padding: 0 $padding-global $padding-global; - } } diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx index 4fd10243a..543e91c1b 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/QueryConfigurator.tsx @@ -6,24 +6,28 @@ import usePrevious from "../../../hooks/usePrevious"; import { MAX_QUERY_FIELDS } from "../../../constants/graph"; import { useQueryDispatch, useQueryState } from "../../../state/query/QueryStateContext"; import { useTimeDispatch } from "../../../state/time/TimeStateContext"; -import { DeleteIcon, PlayIcon, PlusIcon } from "../../../components/Main/Icons"; +import { DeleteIcon, PlayIcon, PlusIcon, VisibilityIcon, VisibilityOffIcon } from "../../../components/Main/Icons"; import Button from "../../../components/Main/Button/Button"; import "./style.scss"; import Tooltip from "../../../components/Main/Tooltip/Tooltip"; +import classNames from "classnames"; export interface QueryConfiguratorProps { error?: ErrorTypes | string; queryOptions: string[] + onHideQuery: (queries: number[]) => void } -const QueryConfigurator: FC = ({ error, queryOptions }) => { +const QueryConfigurator: FC = ({ error, queryOptions, onHideQuery }) => { const { query, queryHistory, autocomplete } = useQueryState(); const queryDispatch = useQueryDispatch(); const timeDispatch = useTimeDispatch(); const [stateQuery, setStateQuery] = useState(query || []); + const [hideQuery, setHideQuery] = useState([]); const prevStateQuery = usePrevious(stateQuery) as (undefined | string[]); + const updateHistory = () => { queryDispatch({ type: "SET_QUERY_HISTORY", payload: stateQuery.map((q, i) => { @@ -51,6 +55,10 @@ const QueryConfigurator: FC = ({ error, queryOptions }) setStateQuery(prev => prev.filter((q, i) => i !== index)); }; + const onToggleHideQuery = (index: number) => { + setHideQuery(prev => prev.includes(index) ? prev.filter(n => n !== index) : [...prev, index]); + }; + const handleChangeQuery = (value: string, index: number) => { setStateQuery(prev => prev.map((q, i) => i === index ? value : q)); }; @@ -76,6 +84,11 @@ const QueryConfigurator: FC = ({ error, queryOptions }) const createHandlerRemoveQuery = (i: number) => () => { onRemoveQuery(i); + setHideQuery(prev => prev.map(n => n > i ? n - 1: n)); + }; + + const createHandlerHideQuery = (i: number) => () => { + onToggleHideQuery(i); }; useEffect(() => { @@ -84,11 +97,18 @@ const QueryConfigurator: FC = ({ error, queryOptions }) } }, [stateQuery]); + useEffect(() => { + onHideQuery(hideQuery); + }, [hideQuery]); + return
    {stateQuery.map((q, i) => (
    = ({ error, queryOptions }) onEnter={onRunQuery} onChange={createHandlerChangeQuery(i)} label={`Query ${i + 1}`} - size={"small"} + disabled={hideQuery.includes(i)} /> + +
    +
    +
    {stateQuery.length > 1 && (
    diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss index cfbbf2d90..678988f10 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/QueryConfigurator/style.scss @@ -9,10 +9,15 @@ &-row { display: grid; - grid-template-columns: 1fr auto; + grid-template-columns: 1fr auto auto; align-items: center; gap: $padding-small; + &_disabled { + filter: grayscale(100%); + opacity: 0.5; + } + &__button { display: grid; width: 36px; diff --git a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx index c95997886..76abebd2f 100644 --- a/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx +++ b/app/vmui/packages/vmui/src/pages/CustomPanel/index.tsx @@ -19,6 +19,7 @@ import { useSetQueryParams } from "./hooks/useSetQueryParams"; import "./style.scss"; import Alert from "../../components/Main/Alert/Alert"; import TableView from "../../components/Views/TableView/TableView"; +import Button from "../../components/Main/Button/Button"; const CustomPanel: FC = () => { const { displayType, isTracingEnabled } = useCustomPanelState(); @@ -29,10 +30,20 @@ const CustomPanel: FC = () => { const [displayColumns, setDisplayColumns] = useState(); const [tracesState, setTracesState] = useState([]); + const [hideQuery, setHideQuery] = useState([]); + const [showAllSeries, setShowAllSeries] = useState(false); const { customStep, yaxis } = useGraphState(); const graphDispatch = useGraphDispatch(); + const { queryOptions } = useFetchQueryOptions(); + const { isLoading, liveData, graphData, error, warning, traces } = useFetchQuery({ + visible: true, + customStep, + hideQuery, + showAllSeries + }); + const setYaxisLimits = (limits: AxisRange) => { graphDispatch({ type: "SET_YAXIS_LIMITS", payload: limits }); }; @@ -45,17 +56,19 @@ const CustomPanel: FC = () => { timeDispatch({ type: "SET_PERIOD", payload: { from, to } }); }; - const { queryOptions } = useFetchQueryOptions(); - const { isLoading, liveData, graphData, error, warning, traces } = useFetchQuery({ - visible: true, - customStep - }); + const handleShowAll = () => { + setShowAllSeries(true); + }; const handleTraceDelete = (trace: Trace) => { const updatedTraces = tracesState.filter((data) => data.idValue !== trace.idValue); setTracesState([...updatedTraces]); }; + const handleHideQuery = (queries: number[]) => { + setHideQuery(queries); + }; + useEffect(() => { if (traces) { setTracesState([...tracesState, ...traces]); @@ -66,11 +79,16 @@ const CustomPanel: FC = () => { setTracesState([]); }, [displayType]); + useEffect(() => { + setShowAllSeries(false); + }, [query]); + return (
    {isTracingEnabled && (
    @@ -80,22 +98,37 @@ const CustomPanel: FC = () => { />
    )} + {isLoading && } {error && {error}} - {warning && {warning}} + {warning && +
    +

    {warning}

    + +
    +
    }
    - {isLoading && }
    - {displayType === "chart" && } - {displayType === "table" && } + {displayType === "chart" && ( + + )} + {displayType === "table" && ( + + )}
    {graphData && period && (displayType === "chart") && ( { setPeriod={setPeriod} /> )} - {liveData && (displayType === "code") && } + {liveData && (displayType === "code") && ( + + )} {liveData && (displayType === "table") && ( void + onClose: () => void +} + +const JsonForm: FC = ({ + editable = false, + defaultTile = "JSON", + displayTitle = true, + defaultJson = "", + resetValue= "", + onClose, + onUpload, +}) => { + const { showInfoMessage } = useSnack(); + + const [json, setJson] = useState(defaultJson); + const [title, setTitle] = useState(defaultTile); + const [errorTitle, setErrorTitle] = useState(""); + const [error, setError] = useState(""); + + const errorJson = useMemo(() => { + try { + const resp = JSON.parse(json); + const traceData = resp.trace || resp; + if (!traceData.duration_msec) return ErrorTypes.traceNotFound; + new Trace(traceData, ""); + return ""; + } catch (e) { + return e instanceof Error ? e.message : "Unknown error"; + } + }, [json]); + + const handleChangeTitle = (val: string) => { + setTitle(val); + }; + + const handleChangeJson = (val: string) => { + setError(""); + setJson(val); + }; + + const handlerCopy = async () => { + await navigator.clipboard.writeText(json); + showInfoMessage({ text: "Formatted JSON has been copied", type: "success" }); + }; + + const handleReset = () => { + setJson(resetValue); + }; + + const handleApply = () => { + setError(errorJson); + const titleTrim = title.trim(); + if (!titleTrim) setErrorTitle(ErrorTypes.emptyTitle); + if (errorJson || errorTitle) return; + onUpload(json, title); + onClose(); + }; + + return ( +
    + {displayTitle && ( + + )} + +
    +
    + + {resetValue && ( + + )} +
    +
    + + +
    +
    +
    + ); +}; + +export default JsonForm; diff --git a/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss b/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss new file mode 100644 index 000000000..a315094ba --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/JsonForm/style.scss @@ -0,0 +1,41 @@ +@use "src/styles/variables" as *; + +.vm-json-form { + display: grid; + grid-template-rows: auto calc(90vh - 78px - ($padding-medium*3)) auto; + gap: $padding-global; + width: 70vw; + max-width: 1000px; + max-height: 900px; + + &_one-field { + grid-template-rows: calc(90vh - 78px - ($padding-medium*3)) auto; + } + + textarea { + overflow: auto; + width: 100%; + height: 100%; + } + + &-footer { + display: flex; + align-items: center; + justify-content: space-between; + gap: $padding-small; + + &__controls { + flex-grow: 1; + display: flex; + align-items: center; + justify-content: flex-start; + gap: $padding-small; + + &_right { + display: grid; + grid-template-columns: repeat(2, 90px); + justify-content: flex-end; + } + } + } +} diff --git a/app/vmui/packages/vmui/src/pages/TracePage/index.tsx b/app/vmui/packages/vmui/src/pages/TracePage/index.tsx new file mode 100644 index 000000000..440c093ae --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/index.tsx @@ -0,0 +1,177 @@ +import React, { FC, useMemo, useState } from "preact/compat"; +import { ChangeEvent } from "react"; +import Trace from "../../components/TraceQuery/Trace"; +import TracingsView from "../../components/TraceQuery/TracingsView"; +import Tooltip from "../../components/Main/Tooltip/Tooltip"; +import Button from "../../components/Main/Button/Button"; +import Alert from "../../components/Main/Alert/Alert"; +import "./style.scss"; +import { CloseIcon } from "../../components/Main/Icons"; +import Modal from "../../components/Main/Modal/Modal"; +import JsonForm from "./JsonForm/JsonForm"; +import { ErrorTypes } from "../../types"; + +const TracePage: FC = () => { + const [openModal, setOpenModal] = useState(false); + const [tracesState, setTracesState] = useState([]); + const [errors, setErrors] = useState<{filename: string, text: string}[]>([]); + const hasTraces = useMemo(() => !!tracesState.length, [tracesState]); + + const handleOpenModal = () => { + setOpenModal(true); + }; + + const handleCloseModal = () => { + setOpenModal(false); + }; + + const handleError = (e: Error, filename = "") => { + setErrors(prev => [{ filename, text: `: ${e.message}` }, ...prev]); + }; + + const handleOnload = (result: string, filename: string) => { + try { + const resp = JSON.parse(result); + const traceData = resp.trace || resp; + if (!traceData.duration_msec) { + handleError(new Error(ErrorTypes.traceNotFound), filename); + return; + } + const trace = new Trace(traceData, filename); + setTracesState(prev => [trace, ...prev]); + } catch (e) { + if (e instanceof Error) handleError(e, filename); + } + }; + + const handleChange = (e: ChangeEvent) => { + setErrors([]); + const files = Array.from(e.target.files || []); + files.map(f => { + const reader = new FileReader(); + const filename = f?.name || ""; + reader.onload = (e) => { + const result = String(e.target?.result); + handleOnload(result, filename); + }; + reader.readAsText(f); + }); + e.target.value = ""; + }; + + const handleTraceDelete = (trace: Trace) => { + const updatedTraces = tracesState.filter((data) => data.idValue !== trace.idValue); + setTracesState([...updatedTraces]); + }; + + const handleCloseError = (index: number) => { + setErrors(prev => prev.filter((e,i) => i !== index)); + }; + + const createHandlerCloseError = (index: number) => () => { + handleCloseError(index); + }; + + const UploadButtons = () => ( +
    + + + + +
    + ); + + return ( +
    + ); +}; + +export default TracePage; diff --git a/app/vmui/packages/vmui/src/pages/TracePage/style.scss b/app/vmui/packages/vmui/src/pages/TracePage/style.scss new file mode 100644 index 000000000..9745370c2 --- /dev/null +++ b/app/vmui/packages/vmui/src/pages/TracePage/style.scss @@ -0,0 +1,66 @@ +@use "src/styles/variables" as *; + +.vm-trace-page { + display: flex; + flex-direction: column; + padding: $padding-global; + min-height: 100%; + + &-controls { + display: grid; + grid-template-columns: 1fr 1fr; + gap: $padding-global; + align-items: center; + justify-content: center; + } + + &-header { + display: grid; + grid-template-columns: 1fr auto; + align-items: start; + gap: $padding-global; + margin-bottom: $padding-medium; + + &-errors { + display: grid; + align-items: flex-start; + justify-content: stretch; + grid-template-columns: 1fr; + gap: $padding-medium; + + &-item { + position: relative; + display: grid; + align-items: center; + justify-content: stretch; + + &__filename { + min-height: 20px; + } + + &__close { + position: absolute; + top: auto; + right: $padding-small; + z-index: 2; + } + } + } + } + + &-preview { + flex-grow: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + &__text { + margin-bottom: $padding-small; + font-size: $font-size-medium; + white-space: pre-line; + text-align: center; + line-height: 1.8; + } + } +} diff --git a/app/vmui/packages/vmui/src/router/index.ts b/app/vmui/packages/vmui/src/router/index.ts index e81f665a8..2b1714966 100644 --- a/app/vmui/packages/vmui/src/router/index.ts +++ b/app/vmui/packages/vmui/src/router/index.ts @@ -3,6 +3,7 @@ const router = { dashboards: "/dashboards", cardinality: "/cardinality", topQueries: "/top-queries", + trace: "/trace" }; export interface RouterOptions { @@ -18,7 +19,6 @@ const routerOptionsDefault = { header: { timeSelector: true, executionControls: true, - globalSettings: true, } }; @@ -28,7 +28,6 @@ export const routerOptions: {[key: string]: RouterOptions} = { [router.cardinality]: { header: { cardinalityDatePicker: true, - globalSettings: true, } } }; diff --git a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts index cc28d05dc..1b7a885ba 100644 --- a/app/vmui/packages/vmui/src/state/customPanel/reducer.ts +++ b/app/vmui/packages/vmui/src/state/customPanel/reducer.ts @@ -1,25 +1,34 @@ import { DisplayType, displayTypeTabs } from "../../pages/CustomPanel/DisplayTypeSwitch"; -import { getFromStorage, saveToStorage } from "../../utils/storage"; import { getQueryStringValue } from "../../utils/query-string"; +import { getFromStorage, saveToStorage } from "../../utils/storage"; +import { SeriesLimits } from "../../types"; +import { DEFAULT_MAX_SERIES } from "../../constants/graph"; export interface CustomPanelState { displayType: DisplayType; nocache: boolean; isTracingEnabled: boolean; + seriesLimits: SeriesLimits + tableCompact: boolean; } export type CustomPanelAction = | { type: "SET_DISPLAY_TYPE", payload: DisplayType } + | { type: "SET_SERIES_LIMITS", payload: SeriesLimits } | { type: "TOGGLE_NO_CACHE"} | { type: "TOGGLE_QUERY_TRACING" } + | { type: "TOGGLE_TABLE_COMPACT" } const queryTab = getQueryStringValue("g0.tab", 0) as string; const displayType = displayTypeTabs.find(t => t.prometheusCode === +queryTab || t.value === queryTab); +const limitsStorage = getFromStorage("SERIES_LIMITS") as string; export const initialCustomPanelState: CustomPanelState = { displayType: (displayType?.value || "chart") as DisplayType, - nocache: getFromStorage("NO_CACHE") as boolean || false, - isTracingEnabled: getFromStorage("QUERY_TRACING") as boolean || false, + nocache: false, + isTracingEnabled: false, + seriesLimits: limitsStorage ? JSON.parse(getFromStorage("SERIES_LIMITS") as string) : DEFAULT_MAX_SERIES, + tableCompact: getFromStorage("TABLE_COMPACT") as boolean || false, }; export function reducer(state: CustomPanelState, action: CustomPanelAction): CustomPanelState { @@ -29,19 +38,29 @@ export function reducer(state: CustomPanelState, action: CustomPanelAction): Cus ...state, displayType: action.payload }; + case "SET_SERIES_LIMITS": + saveToStorage("SERIES_LIMITS", JSON.stringify(action.payload)); + return { + ...state, + seriesLimits: action.payload + }; case "TOGGLE_QUERY_TRACING": - saveToStorage("QUERY_TRACING", !state.isTracingEnabled); return { ...state, isTracingEnabled: !state.isTracingEnabled, }; case "TOGGLE_NO_CACHE": - saveToStorage("NO_CACHE", !state.nocache); return { ...state, nocache: !state.nocache }; + case "TOGGLE_TABLE_COMPACT": + saveToStorage("TABLE_COMPACT", !state.tableCompact); + return { + ...state, + tableCompact: !state.tableCompact + }; default: throw new Error(); } diff --git a/app/vmui/packages/vmui/src/styles/core.scss b/app/vmui/packages/vmui/src/styles/core.scss index e5a3c5fbb..1fc75cd73 100644 --- a/app/vmui/packages/vmui/src/styles/core.scss +++ b/app/vmui/packages/vmui/src/styles/core.scss @@ -28,6 +28,11 @@ b { font-weight: bold; } +textarea, +input { + cursor: text; +} + input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; @@ -38,5 +43,5 @@ input[type=number]::-webkit-outer-spin-button { position: fixed; left: $padding-global; bottom: $padding-global; - z-index: 9; + z-index: 999; } diff --git a/app/vmui/packages/vmui/src/styles/variables.scss b/app/vmui/packages/vmui/src/styles/variables.scss index 094acc677..a3c55ae3d 100644 --- a/app/vmui/packages/vmui/src/styles/variables.scss +++ b/app/vmui/packages/vmui/src/styles/variables.scss @@ -18,6 +18,7 @@ $color-text-secondary: rgba($color-text, 0.6); $color-text-disabled: rgba($color-text, 0.4); $color-black: #110f0f; +$color-dove-gray: #616161; $color-silver: #C4C4C4; $color-alto: #D8D8D8; $color-white: #ffffff; @@ -30,7 +31,7 @@ $color-tropical-blue: #C9E3F6; $color-background-body: var(--color-background-body); $color-background-block: var(--color-background-block); $color-background-modal: rgba($color-black, 0.7); -$color-background-tooltip: rgba(97, 97, 97, 0.92); +$color-background-tooltip: rgba($color-dove-gray, 0.92); /************* padding *************/ diff --git a/app/vmui/packages/vmui/src/types/index.ts b/app/vmui/packages/vmui/src/types/index.ts index 14b876273..be5d2a56c 100644 --- a/app/vmui/packages/vmui/src/types/index.ts +++ b/app/vmui/packages/vmui/src/types/index.ts @@ -35,12 +35,16 @@ export interface DataSeries extends MetricBase{ export interface InstantDataSeries { metadata: string[]; // just ordered columns value: string; + copyValue: string; } export enum ErrorTypes { emptyServer = "Please enter Server URL", validServer = "Please provide a valid Server URL", - validQuery = "Please enter a valid Query and execute it" + validQuery = "Please enter a valid Query and execute it", + traceNotFound = "Not found the tracing information", + emptyTitle = "Please enter title", + positiveNumber = "Please enter positive number" } export interface PanelSettings { @@ -95,3 +99,9 @@ export interface TopQueriesData extends TopQueryStats{ topByCount: TopQuery[] topBySumDuration: TopQuery[] } + +export interface SeriesLimits { + table: number, + chart: number, + code: number, +} diff --git a/app/vmui/packages/vmui/src/utils/metric.ts b/app/vmui/packages/vmui/src/utils/metric.ts index f4b145377..bfc4615bb 100644 --- a/app/vmui/packages/vmui/src/utils/metric.ts +++ b/app/vmui/packages/vmui/src/utils/metric.ts @@ -1,6 +1,6 @@ import { MetricBase } from "../api/types"; -export const getNameForMetric = (result: MetricBase, alias?: string): string => { +export const getNameForMetric = (result: MetricBase, alias?: string, connector = ": ", quoteValue = false): string => { const { __name__, ...freeFormFields } = result.metric; const name = alias || __name__ || ""; @@ -8,5 +8,7 @@ export const getNameForMetric = (result: MetricBase, alias?: string): string => return name || `Result ${result.group}`; // a bit better than just {} for case of aggregation functions } - return `${name} {${Object.entries(freeFormFields).map(e => `${e[0]}: ${e[1]}`).join(", ")}}`; + return `${name} {${Object.entries(freeFormFields).map(e => + `${e[0]}${connector}${(quoteValue ? `"${e[1]}"` : e[1])}` + ).join(", ")}}`; }; diff --git a/app/vmui/packages/vmui/src/utils/storage.ts b/app/vmui/packages/vmui/src/utils/storage.ts index 9185e8a4a..f08833577 100644 --- a/app/vmui/packages/vmui/src/utils/storage.ts +++ b/app/vmui/packages/vmui/src/utils/storage.ts @@ -4,6 +4,8 @@ export type StorageKeys = "BASIC_AUTH_DATA" | "AUTOCOMPLETE" | "NO_CACHE" | "QUERY_TRACING" + | "SERIES_LIMITS" + | "TABLE_COMPACT" export const saveToStorage = (key: StorageKeys, value: string | boolean | Record): void => { if (value) { diff --git a/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts b/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts deleted file mode 100644 index 970da5b5e..000000000 --- a/app/vmui/packages/vmui/src/utils/uplot/tooltip.ts +++ /dev/null @@ -1,36 +0,0 @@ -import dayjs from "dayjs"; -import { SetupTooltip } from "./types"; -import { getColorLine, formatPrettyNumber, getLegendLabel } from "./helpers"; -import { DATE_FULL_TIMEZONE_FORMAT } from "../../constants/date"; - -// TODO create jsx component -export const setTooltip = ({ u, tooltipIdx, metrics, series, tooltip, tooltipOffset, unit = "" }: SetupTooltip): void => { - const { seriesIdx, dataIdx } = tooltipIdx; - if (seriesIdx === null || dataIdx === undefined) return; - const dataSeries = u.data[seriesIdx][dataIdx]; - const dataTime = u.data[0][dataIdx]; - const metric = metrics[seriesIdx - 1]?.metric || {}; - const selectedSeries = series[seriesIdx]; - const color = getColorLine(selectedSeries.label || ""); - - const { width, height } = u.over.getBoundingClientRect(); - const top = u.valToPos((dataSeries || 0), series[seriesIdx]?.scale || "1"); - const lft = u.valToPos(dataTime, "x"); - const { width: tooltipWidth, height: tooltipHeight } = tooltip.getBoundingClientRect(); - const overflowX = lft + tooltipWidth >= width; - const overflowY = top + tooltipHeight >= height; - - tooltip.style.display = "grid"; - tooltip.style.top = `${tooltipOffset.top + top + 10 - (overflowY ? tooltipHeight + 10 : 0)}px`; - tooltip.style.left = `${tooltipOffset.left + lft + 10 - (overflowX ? tooltipWidth + 20 : 0)}px`; - const metricName = (selectedSeries.label || "").replace(/{.+}/gmi, "").trim(); - const name = getLegendLabel(metricName); - const date = dayjs(new Date(dataTime * 1000)).format(DATE_FULL_TIMEZONE_FORMAT); - const info = Object.keys(metric).filter(k => k !== "__name__").map(k => `
    ${k}: ${metric[k]}
    `).join(""); - const marker = `
    `; - tooltip.innerHTML = `
    ${date}
    -
    - ${marker}${name}: ${formatPrettyNumber(dataSeries)} ${unit} -
    -
    ${info}
    `; -}; diff --git a/app/vmui/packages/vmui/src/utils/uplot/types.ts b/app/vmui/packages/vmui/src/utils/uplot/types.ts index 604b86549..e46850228 100644 --- a/app/vmui/packages/vmui/src/utils/uplot/types.ts +++ b/app/vmui/packages/vmui/src/utils/uplot/types.ts @@ -1,21 +1,4 @@ import uPlot, { Series } from "uplot"; -import { MetricResult } from "../../api/types"; - -export interface SetupTooltip { - u: uPlot, - metrics: MetricResult[], - series: Series[], - tooltip: HTMLDivElement, - unit?: string, - tooltipOffset: { - left: number, - top: number - }, - tooltipIdx: { - seriesIdx: number | null, - dataIdx: number | undefined - } -} export interface HideSeriesArgs { hideSeries: string[], diff --git a/dashboards/clusterbytenant.json b/dashboards/clusterbytenant.json index 4d5e0a597..2c316acf5 100644 --- a/dashboards/clusterbytenant.json +++ b/dashboards/clusterbytenant.json @@ -1,14 +1,5 @@ { - "__inputs": [ - { - "name": "DS_VICTORIAMETRICS", - "label": "VictoriaMetrics", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], + "__inputs": [], "__elements": [], "__requires": [ { @@ -116,7 +107,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(increase(vm_tenant_inserted_rows_total{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\", projectID=~\"$project\"}[1m])/60) by (accountID,projectID) ", "interval": "", @@ -214,7 +205,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "editorMode": "code", "expr": "sum(rate(vm_tenant_select_requests_total{job=~\"$job\", instance=~\"$instance.*\",accountID=~\"$account\", projectID=~\"$project\"}[$__rate_interval])) by (accountID,projectID) ", @@ -320,7 +311,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(vm_tenant_active_timeseries{job=~\"$job\", instance=~\"$instance.*\",accountID=~\"$account\",projectID=~\"$project\"}) by(accountID,projectID)", "format": "time_series", @@ -418,7 +409,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "expr": "sum(increase(vm_tenant_timeseries_created_total{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\", projectID=~\"$project\"}[1m])/60) by(accountID,projectID)", "interval": "", @@ -513,7 +504,7 @@ { "datasource": { "type": "prometheus", - "uid": "${DS_VICTORIAMETRICS}" + "uid": "${ds}" }, "editorMode": "code", "expr": "sum(vm_tenant_used_tenant_bytes{job=~\"$job\", instance=~\"$instance\",accountID=~\"$account\",projectID=~\"$project\"}) by(accountID,projectID)", diff --git a/dashboards/operator.json b/dashboards/operator.json index f75b84965..b7e7fe3d2 100644 --- a/dashboards/operator.json +++ b/dashboards/operator.json @@ -4,8 +4,8 @@ { "builtIn": 1, "datasource": { - "type": "grafana", - "uid": "-- Grafana --" + "type": "datasource", + "uid": "grafana" }, "enable": true, "hide": true, diff --git a/dashboards/victoriametrics-cluster.json b/dashboards/victoriametrics-cluster.json index 70e047bed..89ee61be0 100644 --- a/dashboards/victoriametrics-cluster.json +++ b/dashboards/victoriametrics-cluster.json @@ -6,13 +6,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "9.0.3" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph (old)", - "version": "" + "version": "9.1.0" }, { "type": "datasource", @@ -31,6 +25,18 @@ "id": "table", "name": "Table", "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { @@ -52,15 +58,25 @@ "type": "dashboard" }, "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "enable": true, + "expr": "sum(ALERTS{alertgroup=\"vmcluster\",alertstate=\"firing\",show_at=\"dashboard\"}) by(alertname)", + "iconColor": "red", + "name": "alerts", + "titleFormat": "{{alertname}}" } ] }, - "description": "Overview for cluster VictoriaMetrics v1.79.0 or higher", + "description": "Overview for cluster VictoriaMetrics v1.83.0 or higher", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 1, "id": null, - "iteration": 1663928613745, "links": [ { "icon": "doc", @@ -90,10 +106,9 @@ "liveNow": false, "panels": [ { - "collapsed": true, + "collapsed": false, "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "gridPos": { "h": 1, @@ -102,752 +117,767 @@ "y": 0 }, "id": 137, - "panels": [ - { - "datasource": { - "uid": "$ds" + "panels": [], + "title": "Stats", + "type": "row" + }, + { + "datasource": { + "uid": "$ds" + }, + "description": "How many datapoints are in storage", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "description": "How many datapoints are in storage", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 1 - }, - "id": 131, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total datapoints", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "The minimum free disk space left among all storage nodes.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 124, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "min(vm_free_disk_space_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Min free disk space", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Average disk usage per datapoint.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 112, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Bytes per point", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Total size of allowed memory via flag `-memory.allowedPercent` for all VM components", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 130, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_allowed_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Allowed memory", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee more details here https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 3 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Active series", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Total amount of used disk space", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 3 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": false, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Disk space usage", - "type": "stat" - }, - { - "datasource": { - "uid": "$ds" - }, - "description": "Total number of available CPUs for all VM components. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 3 - }, - "id": 126, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Available CPU", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Total size of available memory for all VM components.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 18, - "y": 3 - }, - "id": 128, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Available memory", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false, - "minWidth": 50 - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value" - }, - "properties": [ - { - "id": "displayName", - "value": "Count" - } - ] + "color": "green", + "value": null } ] }, - "gridPos": { - "h": 5, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 149, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "9.0.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(job, short_version)", - "format": "table", - "instant": true, - "range": false, - "refId": "A" - } - ], - "type": "table" + "unit": "short" }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 131, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 5, - "w": 16, - "x": 8, - "y": 5 - }, - "hiddenSeries": false, - "id": 62, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sort(sum(up{job=~\"$job\", instance=~\"$instance\"}) by (job, instance))", - "format": "time_series", - "instant": false, - "legendFormat": "{{instance}}({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Uptime", - "tooltip": { - "shared": true, - "sort": 1, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1177", - "decimals": 0, - "format": "none", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1178", - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": 2 - } + "exemplar": true, + "expr": "sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "title": "Stats", - "type": "row" + "title": "Total datapoints", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the datapoints ingestion rate, including replication factor.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 124, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) ", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": false, + "refId": "A" + } + ], + "title": "Ingestion rate", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the rate of HTTP read requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "req/s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 130, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance\", path=~\"/select/.*\"}[$__rate_interval]))", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Read requests", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total number of available CPUs for all VM components. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 126, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Available CPU", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee more details here https://docs.victoriametrics.com/FAQ.html#what-is-an-active-time-series", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 4 + }, + "id": 34, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(max_over_time(vm_cache_entries{job=~\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"}[1h]))", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Active series", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total amount of used disk space", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 4 + }, + "id": 35, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "exemplar": false, + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Disk space usage", + "type": "stat" + }, + { + "datasource": { + "uid": "$ds" + }, + "description": "Average disk usage per datapoint.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 12, + "y": 4 + }, + "id": 112, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "exemplar": true, + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", type!=\"indexdb\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Bytes per point", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Total size of available memory for all VM components.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 18, + "y": 4 + }, + "id": 128, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Available memory", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false, + "minWidth": 50 + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "displayName", + "value": "Count" + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 7 + }, + "id": 149, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Count" + } + ] + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(vm_app_version{job=~\"$job\", instance=~\"$instance\"}) by(job, short_version)", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 16, + "x": 8, + "y": 7 + }, + "id": 62, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(min_over_time(up{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (job)", + "format": "time_series", + "instant": false, + "legendFormat": "{{job}}", + "refId": "A" + } + ], + "title": "Uptime ($job)", + "type": "timeseries" }, { "collapsed": false, @@ -858,7 +888,7 @@ "h": 1, "w": 24, "x": 0, - "y": 1 + "y": 12 }, "id": 10, "panels": [], @@ -866,574 +896,95 @@ "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "How many datapoints are inserted into storage per second by protocol and accountID", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 2 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(vm_rows_inserted_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type,accountID) > 0 ", - "interval": "", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Datapoints ingestion rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 2 - }, - "hiddenSeries": false, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance.*\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{path}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:3307", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:3308", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 10 - }, - "hiddenSeries": false, - "id": 52, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance.*\"}[$__rate_interval])) by (path) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{path}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Requests error rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "The less time it takes is better.\n* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 10 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "max(vm_request_duration_seconds{job=~\"$job\", instance=~\"$instance\", quantile=~\"(0.5|0.99)\"}) by (path, quantile) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{quantile}} ({{path}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Query duration ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:423", - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:424", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "RPC errors are interconnection errors between cluster components. Errors rate should be 0 if network connection is stable and all components are up and operational.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 44, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rpc_connection_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Connection", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rpc_dial_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Dial", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rpc_handshake_errors_total{job=~\"$job\",instance=~\"$instance.*\"}[$__rate_interval]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Handshake", - "refId": "E" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "RPC errors ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Shows the rate of logging the messages by their level. Unexpected spike in rate is a good reason to check logs.", + "description": "How many datapoints are inserted into cluster per second by protocol before the replication.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 18 + "x": 0, + "y": 13 }, - "hiddenSeries": false, - "id": 104, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 2, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -1442,7 +993,536 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_log_messages_total{job=~\"$job\",instance=~\"$instance.*\", level!=\"info\"}[$__rate_interval])) by (job, level) > 0", + "expr": "sum(rate(vm_rows_inserted_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type) > 0 ", + "interval": "", + "legendFormat": "{{type}}", + "range": true, + "refId": "A" + } + ], + "title": "Datapoints ingestion rate ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 6, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{path}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests rate ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$ds" + }, + "description": "Shows the number of active time series with new data points inserted during the last hour across all storage nodes. High value may result in ingestion slowdown. \n\nSee following link for details:", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 12, + "links": [ + { + "targetBlank": true, + "title": "troubleshooting", + "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Active time series", + "refId": "A" + } + ], + "title": "Active time series ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The less time it takes is better.\n* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 8, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "max(vm_request_duration_seconds{job=~\"$job\", instance=~\"$instance\", quantile=\"0.99\"}) by (path) > 0", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{path}}", + "range": true, + "refId": "A" + } + ], + "title": "Query duration 0.99 quantile ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 52, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(rate(vm_http_request_errors_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (job, path) > 0", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{path}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "Requests error rate ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the rate of logging the messages by their level. Unexpected spike in rate is a good reason to check logs.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 104, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(vm_log_messages_total{job=~\"$job\",instance=~\"$instance\", level!=\"info\"}[$__rate_interval])) by (job, level) > 0", "format": "time_series", "hide": false, "interval": "5m", @@ -1452,253 +1532,8 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Logging rate", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:78", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:79", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows the percentage of remaining disk space at `-storageDataPath` by instance", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "hiddenSeries": false, - "id": 110, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) /\n(\n sum(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) +\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance)\n)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [ - { - "$$hashKey": "object:89", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.8, - "yaxis": "left" - } - ], - "timeRegions": [], - "title": "Disk space used ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows the number of active time series with new data points inserted during the last hour. High value may result in ingestion slowdown. \n\nSee following link for details:", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "troubleshooting", - "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_cache_entries{job=~\"$job\", instance=~\"$instance.*\", type=\"storage/hour_metric_ids\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Active time series", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Active time series ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:253", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:254", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": true, @@ -1709,1128 +1544,1018 @@ "h": 1, "w": 24, "x": 0, - "y": 34 + "y": 37 }, "id": 46, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Amount of used memory (resident)\nContains memory share which can be freed by OS when needed.", + "description": "Percentage of used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 66, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}) by (job, instance)", + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "interval": "", - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "RSS memory usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "RSS memory % usage ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "RSS share for memory allocated by the process itself. This share cannot be freed by the OS, so it must be taken into account by OOM killer.", + "description": "Share for memory allocated by the process itself. When memory usage reaches 100% it will be likely OOM-killed.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=190&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 3 }, - "hiddenSeries": false, "id": 138, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}) by (job, instance)", + "expr": "max(\n max_over_time(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "interval": "", - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "RSS anonymous memory usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:271", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:272", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "RSS anonymous memory % usage ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 11 - }, - "hiddenSeries": false, - "id": 64, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Shows the CPU usage in the percentage from the limit.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=${__field.labels.job}&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, - "x": 12, + "x": 0, "y": 11 }, - "hiddenSeries": false, - "id": 146, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 64, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "exemplar": false, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance) / sum(process_cpu_cores_available{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_cpu_cores{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:195", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.9, - "yaxis": "left" - } - ], - "timeRegions": [], - "title": "CPU percentage ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:75", - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:76", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "CPU ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Panel shows the number of open file descriptors in the OS.\nReaching the limit of open files can cause various issues and must be prevented.\n\nSee how to change limits here https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 117, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/max.*/", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(process_open_fds{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(process_max_fds{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "max {{instance}} ({{job}})", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Open FDs ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 2, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows average GC duration by instance", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 19 - }, - "hiddenSeries": false, - "id": 72, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(go_gc_duration_seconds_sum{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)\n/\nsum(rate(go_gc_duration_seconds_count{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "GC duration ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 68, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(go_goroutines{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Goroutines ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows the number of bytes read/write from the storage layer.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/read .*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 122, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(process_io_storage_read_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job) > 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "read {{job}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(rate(process_io_storage_written_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job) > 0", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "write {{job}}", + "range": true, + "refId": "B" + } + ], + "title": "Disk writes/reads ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the percentage of open file descriptors compared to the limit set in the OS.\nReaching the limit of open files can cause various issues and must be prevented.\n\nSee how to change limits here https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/max.*/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 117, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(process_open_fds{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_max_fds{job=~\"$job\", instance=~\"$instance\"}\n) by(job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{job}}", + "range": true, + "refId": "A" + } + ], + "title": "Open FDs usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 119, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(max_over_time(vm_tcplistener_conns{job=~\"$job\", instance=~\"$instance\"}[$__interval])) by(job)", + "interval": "", + "legendFormat": "{{job}}", + "range": true, + "refId": "A" + } + ], + "title": "TCP connections ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 27 + }, + "id": 68, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(max_over_time(go_goroutines{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Goroutines ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 27 }, - "hiddenSeries": false, - "id": 122, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 120, "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:331", - "alias": "/read .*/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(process_io_storage_read_bytes_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "hide": false, + "expr": "sum(rate(vm_tcplistener_accepts_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", "interval": "", - "intervalFactor": 1, - "legendFormat": "read {{instance}}", + "legendFormat": "__auto", + "range": true, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(process_io_storage_written_bytes_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "write {{instance}}", - "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "Disk writes/reads ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:338", - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:339", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "TCP connections rate ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 35 }, - "hiddenSeries": false, "id": 70, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(process_num_threads{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", + "expr": "sum(max_over_time(process_num_threads{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job)", "format": "time_series", "interval": "", "intervalFactor": 2, - "legendFormat": "{{instance}} ({{job}})", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Threads ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "hiddenSeries": false, - "id": 119, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_tcplistener_conns{job=~\"$job\", instance=~\"$instance\"}) by(job, instance)", - "interval": "", - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "TCP connections ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 43 - }, - "hiddenSeries": false, - "id": 120, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(vm_tcplistener_accepts_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", - "interval": "", - "legendFormat": "{{instance}} ({{job}})", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "TCP connections rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "Resource usage ($job)", @@ -2845,67 +2570,112 @@ "h": 1, "w": 24, "x": 0, - "y": 35 + "y": 38 }, "id": 106, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "Shows the rate and total number of new series created over last 24h.\n\nHigh churn rate tightly connected with database performance and may result in unexpected OOM's or slow queries. It is recommended to always keep an eye on this metric to avoid unexpected cardinality \"explosions\".\n\nThe higher churn rate is, the more resources required to handle it. Consider to keep the churn rate as low as possible.\n\nTo investigate stats about most expensive series use `api/v1/status/tsdb` handler. More details here https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format\n\nGood references to read:\n* https://www.robustperception.io/cardinality-is-key\n* https://valyala.medium.com/high-cardinality-tsdb-benchmarks-victoriametrics-vs-timescaledb-vs-influxdb-13e6ee64dd6b", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "new series over 24h" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisSoftMin", + "value": 0 + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 15 }, - "hiddenSeries": false, "id": 102, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "new series over 24h", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -2931,295 +2701,304 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Churn rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Shows the rate of adding new items to the index. It should correlate with `Slow inserts` and `Churn rate` graphs and could help to determine the pressure on indexdb.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 4 - }, - "hiddenSeries": false, - "id": 147, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(rate(vm_indexdb_items_added_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval]))", - "interval": "", - "legendFormat": "items", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "IndexDB items rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:92", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:93", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, "description": "The percentage of slow inserts comparing to total insertion rate during the last 5 minutes. \n\nThe less value is better. If percentage remains high (>10%) during extended periods of time, then it is likely more RAM is needed for optimal handling of the current number of active time series. \n\nIn general, VictoriaMetrics requires ~1KB or RAM per active time series, so it should be easy calculating the required amounts of RAM for the current workload according to capacity planning docs. But the resulting number may be far from the real number because the required amounts of memory depends on may other factors such as the number of labels per time series and the length of label values.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent" + }, + { + "color": "red", + "value": 0.1 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 12 + "x": 12, + "y": 15 }, - "hiddenSeries": false, "id": 108, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_slow_row_inserts_total{job=~\"$job_storage\"}[$__rate_interval])) / sum(rate(vm_rows_inserted_total{job=~\"$job_insert\"}[$__rate_interval]))", + "editorMode": "code", + "expr": "max(\n rate(vm_slow_row_inserts_total{job=~\"$job_storage\"}[$__rate_interval]) \n / rate(vm_rows_added_to_storage_total{job=~\"$job_storage\"}[$__rate_interval])\n)", "interval": "", "legendFormat": "slow inserts", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:72", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.1, - "yaxis": "left" - } - ], - "timeRegions": [], "title": "Slow inserts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:738", - "format": "percentunit", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:739", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The value is above 0 when the vmstorage at the given `addr` communicates to the given vminsert node that it cannot accept new data because it is in the read-only mode.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 + }, + "id": 142, + "links": [ + { + "targetBlank": true, + "title": "Readonly mode", + "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(vm_rpc_vmstorage_is_read_only{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance, addr) > 0", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}} => {{addr}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage in readonly status for vminsert ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "Slow queries according to `search.logSlowQueryDuration` flag, which is `5s` by default.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 12 + "y": 23 }, - "hiddenSeries": false, "id": 107, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3232,201 +3011,199 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Slow queries rate ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:892", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:893", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "The value is above 0 when the vmstorage at the given `addr` communicates to the given vminsert node that it cannot accept new data because it is in the read-only mode.", + "description": "Merge assist happens when vmstorage can't keep up with merging parts. This is usually a sign of overload for vmstorage.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 20 + "y": 31 }, - "hiddenSeries": false, - "id": 142, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Readonly mode", - "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" - } - ], - "nullPointMode": "null", + "id": 170, + "links": [], "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(vm_rpc_vmstorage_is_read_only{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance, addr)", + "expr": "sum(increase(vm_assisted_merges_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type) > 0", "format": "time_series", - "interval": "", + "interval": "5m", "intervalFactor": 1, - "legendFormat": "{{instance}} => {{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Storage in readonly status for vminsert ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:536", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:537", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Assisted merges ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "VictoriaMetrics limits the number of labels per each metric with `-maxLabelsPerTimeseries` command-line flag.\n\nThis prevents from ingesting metrics with too many labels. The value of `maxLabelsPerTimeseries` must be adjusted for your workload.\n\nWhen limit is exceeded (graph is > 0) - extra labels are dropped, which could result in unexpected identical time series.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 20 + "y": 31 }, - "hiddenSeries": false, "id": 116, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3443,95 +3220,91 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Labels limit exceeded ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1046", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1047", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "Merge assist happens when vmstorage can't keep up with merging parts. This is usually a sign of overload for vmstorage.", + "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 8, + "h": 9, "w": 12, "x": 0, - "y": 28 + "y": 39 }, - "hiddenSeries": false, - "id": 170, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", + "id": 144, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -3540,142 +3313,250 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(increase(vm_assisted_merges_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type, instance) > 0", + "expr": "max(\n vm_cache_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n /\n vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}\n) by(type)", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Cache usage % by type ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows cache miss ratio. Lower is better.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 58, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(vm_cache_misses_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n /\n rate(vm_cache_requests_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])\n) by(type)", "format": "time_series", - "interval": "5m", + "hide": false, + "interval": "", "intervalFactor": 1, "legendFormat": "__auto", "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Assisted merges ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:536", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:537", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Cache miss ratio ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", - "uid": "$ds" + "uid": "${ds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.hidden", + "value": true + } + ] + } + ] }, - "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", - "fill": 0, - "fillGradient": 0, "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 28 + "h": 7, + "w": 24, + "x": 0, + "y": 48 }, - "hiddenSeries": false, - "id": 144, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 183, "options": { - "alertThreshold": true + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "job" + } + ] }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", - "uid": "$ds" + "uid": "${ds}" }, "editorMode": "code", - "exemplar": true, - "expr": "vm_cache_size_bytes{job=~\"$job_storage\", instance=~\"$instance\"} / vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}", - "interval": "", - "legendFormat": "{{ instance }} / {{ type }}", - "range": true, + "exemplar": false, + "expr": "sum(flag{is_set=\"true\", job=~\"$job\", instance=~\"$instance\"}) by(job, instance, name, value)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Cache usage % by vmstorage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ + "title": "Non-default flags", + "transformations": [ { - "$$hashKey": "object:107", - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:108", - "format": "short", - "logBase": 1, - "show": true + "id": "groupBy", + "options": { + "fields": { + "instance": { + "aggregations": [ + "uniqueValues" + ], + "operation": "aggregate" + }, + "job": { + "aggregations": [], + "operation": "groupby" + }, + "name": { + "aggregations": [], + "operation": "groupby" + }, + "value": { + "aggregations": [], + "operation": "groupby" + } + } + } } ], - "yaxis": { - "align": false - } + "type": "table" } ], "title": "Troubleshooting", @@ -3690,73 +3571,107 @@ "h": 1, "w": 24, "x": 0, - "y": 36 + "y": 39 }, "id": 48, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows number of pushed and sent rows. \n* `Pushed rows` - rows added to internal inserter buffers before send\n* `Sent rows` - successfully transmitted rows to storage nodes\n\nPlease note, it could be that `Sent > Pushed` because of the replication factor.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 5 }, - "hiddenSeries": false, "id": 76, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_rpc_rows_pushed_total{job=~\"$job\",instance=~\"$instance\"}[2m]))", + "editorMode": "code", + "expr": "sum(rate(vm_rpc_rows_pushed_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Pushed", + "range": true, "refId": "B" }, { @@ -3764,109 +3679,115 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_rpc_rows_sent_total{job=~\"$job\",instance=~\"$instance\"}[2m]))", + "editorMode": "code", + "expr": "sum(rate(vm_rpc_rows_sent_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Sent", + "range": true, "refId": "E" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1108", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1109", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Rate of RPC errors by type:\n* `Connection` - the number of connection errors to vmstorage node\n* `Dial` - the number of dial errors to vmstorage node.\n* `Handshake` - the number of handshake errors to vmstorage node\n* `Rerouted` - errors appeared during rerouting of rows from un-healthy storage node to a healthy one.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 5 }, - "hiddenSeries": false, "id": 86, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_rpc_connection_errors_total{job=~\"$job\",instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "intervalFactor": 1, "legendFormat": "Connection", + "range": true, "refId": "A" }, { @@ -3892,42 +3813,10 @@ "refId": "E" } ], - "thresholds": [], - "timeRegions": [], "title": "RPC errors ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -3935,101 +3824,104 @@ "description": "The number of rows rerouted to the vmstorage node from other nodes when they were unhealthy.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 }, - "hiddenSeries": false, "id": 80, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, "expr": "sum(rate(vm_rpc_rows_rerouted_to_here_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(addr) > 0", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance) rerouted to ", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:701", - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:702", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -4037,48 +3929,83 @@ "description": "The number of rows rerouted from the vmstorage node to healthy nodes when the given node was unhealthy.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "rps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 }, - "hiddenSeries": false, "id": 78, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4094,97 +4021,105 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows ($instance) rerouted from", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:761", - "format": "rps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:762", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "uid": "$ds" }, "description": "The number of rows or bytes that vminesrt internal buffer contains at the moment.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "bytes" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 22 }, - "hiddenSeries": false, "id": 82, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "bytes", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4205,133 +4140,108 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Pending", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:821", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:822", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Network usage by internal VictoriaMetrics RPC protocol", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 22 }, - "hiddenSeries": false, "id": 74, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "expr": "sum(rate(vm_tcpdialer_written_bytes_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) * 8", "legendFormat": "network usage", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "RPC network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "Interconnection ($job)", @@ -4346,180 +4256,97 @@ "h": 1, "w": 24, "x": 0, - "y": 37 + "y": 40 }, - "id": 60, + "id": 24, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "VictoriaMetrics stores various caches in RAM. Memory size for these caches may be limited with -`memory.allowedPercent` flag. Line `max allowed` shows max allowed memory size for cache.", + "description": "Shows the number of datapoints ingested into storage nodes per second. This metric doesn't show all stored datapoints since some of them may be dropped because of wrong timestamps or decode errors.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 24, + "w": 12, "x": 0, "y": 6 }, - "hiddenSeries": false, - "id": 57, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 100, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "max allowed", - "color": "#C4162A", - "fill": 0, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_cache_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type)", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_allowed_memory_bytes{job=~\"$job\", instance=~\"$instance\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "max allowed", - "refId": "B" + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "thresholds": [], - "timeRegions": [], - "title": "Cache size ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:889", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:890", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Shows the percentage of used cache size from the allowed size by type. \nValues close to 100% show the maximum potential utilization.\nValues close to 0% show that cache is underutilized.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 14 - }, - "hiddenSeries": false, - "id": 172, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -4527,1387 +4354,130 @@ "uid": "$ds" }, "editorMode": "code", - "exemplar": true, - "expr": "sum(vm_cache_size_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type) / \nsum(vm_cache_size_max_bytes{job=~\"$job\", instance=~\"$instance\"}) by(type)", - "interval": "", - "legendFormat": "{{ type }}", + "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) ", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "ingestion rate", "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Cache usage % ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:107", - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:108", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "VictoriaMetrics stores various caches in RAM. Memory size for these caches may be limited with -`memory.allowedPercent` flag. Line `max allowed` shows max allowed memory size for cache.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 58, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "1 - (\n sum(rate(vm_cache_misses_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type) /\n sum(rate(vm_cache_requests_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (type)\n)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Cache hit ratio ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "title": "Caches ($job)", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "uid": "$ds" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 24, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many rows per second every storage node accepts. This metric doesn't show all stored rows since some of them may be dropped because of wrong timestamps or decode errors.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 7 - }, - "hiddenSeries": false, - "id": 100, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_vminsert_metrics_read_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], "title": "Ingestion rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Shows the time needed to reach the 100% of disk capacity based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", + "description": "Shows the approx time needed to reach 100% of disk capacity for at least one vmstorage node based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=196&${__url_time_range}&${__all_variables}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 7 + "y": 6 }, - "hiddenSeries": false, "id": 113, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} / ignoring(path) ((rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d]) - ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[1d])) * scalar(sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) / sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})))", + "editorMode": "code", + "expr": "min(vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n - \n ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[1d])\n ) * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})\n )\n))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "min ETA", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Storage full ETA ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:87", - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:88", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many datapoints are in the storage.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 15 - }, - "hiddenSeries": false, - "id": 16, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Datapoints ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1330", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1331", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "How many datapoints are in RAM queue waiting to be written into storage. The number of pending data points should be in the range from 0 to `2*`, since VictoriaMetrics pushes pending data to persistent storage every second. The index datapoints value in general is much lower.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 15 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "pending index entries", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"storage\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "pending datapoints", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"})", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "pending index entries", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Pending datapoints ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1262", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1263", - "decimals": 3, - "format": "none", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows amount of on-disk space occupied by data points.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 23 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Disk space usage (datapoints) ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows amount of on-disk space occupied by inverted index.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 23 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"}) by(instance)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Disk space usage (index) ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "The number of on-going merges in storage nodes. It is expected to have high numbers for `storage/small` metric.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 54, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(vm_active_merges{job=~\"$job_storage\", instance=~\"$instance\"}) by(type)", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Active merges ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1399", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1400", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "The number of rows merged per second by storage nodes.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 31 - }, - "hiddenSeries": false, - "id": 55, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_rows_merged_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Merge speed", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1516", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1517", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "uid": "$ds" - }, - "description": "Shows how many rows were ignored on insertion due to corrupted or out of retention timestamps.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 39 - }, - "hiddenSeries": false, - "id": 135, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(vm_rows_ignored_total{job=~\"$job_storage\", instance=~\"$instance\"}) by (reason)", - "interval": "", - "legendFormat": "{{reason}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Rows ignored ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1584", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1585", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "The max number of data parts of LSM tree across all storage nodes.\nHigh number of parts (the hard limit is 512) is an evidence of slow merge performance - check the resource utilization.\n* `indexdb` - inverted index\n* `storage/small` - recently added parts of data ingested into storage (hot data)\n* `storage/big` - small parts gradually merged into big parts (cold data)", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 39 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "max(sum(vm_parts{job=~\"$job_storage\", instance=~\"$instance\"}) by (type, instance)) by(type)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "LSM parts ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1644", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1645", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Value > 0 means vmstorage is in readonly mode.", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 47 - }, - "hiddenSeries": false, - "id": 141, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Readonly mode", - "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "vm_storage_is_read_only{job=~\"$job_storage\", instance=~\"$instance\"}", - "interval": "", - "legendFormat": "{{ instance }}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Readonly mode", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:131", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:132", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "description": "Shows how many ongoing insertions (not API /write calls) on disk are taking place, where:\n* `max` - equal to number of CPUs;\n* `current` - current number of goroutines busy with inserting rows into underlying storage.\n\nEvery successful API /write call results into flush on disk. The `max` is an internal limit and can't be changed. It is always equal to the number of CPUs. \n\nWhen `current` hits `max` constantly, it means storage is overloaded and requires more CPU or faster disk.", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 47 - }, - "hiddenSeries": false, - "id": 133, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [ - { - "targetBlank": true, - "title": "Related discussion", - "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/632" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "max", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "max(vm_concurrent_addrows_capacity{job=~\"$job_storage\", instance=~\"$instance\"})", - "interval": "", - "legendFormat": "max", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "exemplar": true, - "expr": "sum(avg_over_time(vm_concurrent_addrows_current{job=~\"$job_storage\", instance=~\"$instance\"}[1m])) by(instance)", - "hide": false, - "interval": "", - "legendFormat": "{{instance}}", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Concurrent flushes on disk ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1768", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1769", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -5915,54 +4485,91 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_storage&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, - "y": 55 + "y": 14 }, - "hiddenSeries": false, "id": 151, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -5970,12 +4577,12 @@ "uid": "$ds" }, "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", + "exemplar": false, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", "range": true, "refId": "A" }, @@ -5985,105 +4592,129 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"})", + "exemplar": false, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", "hide": false, - "legendFormat": "limit", + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", "range": true, "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1827", - "format": "short", - "logBase": 1, - "min": "0", - "show": true }, { - "$$hashKey": "object:1828", - "format": "short", - "logBase": 1, - "show": true + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" } ], - "yaxis": { - "align": false - } + "title": "CPU usage % ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, + "description": "Percentage of used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_storage&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, - "y": 55 + "y": 14 }, - "hiddenSeries": false, "id": 167, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -6092,11 +4723,11 @@ }, "editorMode": "code", "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_storage\", instance=~\"$instance\"}) by(instance) ", + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", "range": true, "refId": "A" }, @@ -6106,45 +4737,1038 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"})", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", "hide": false, - "legendFormat": "limit", + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_storage\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Value > 0 means vmstorage is in readonly mode.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 141, + "links": [ + { + "targetBlank": true, + "title": "Readonly mode", + "url": "https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode" + } + ], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "vm_storage_is_read_only{job=~\"$job_storage\", instance=~\"$instance\"} > 0", + "interval": "", + "legendFormat": "{{ instance }}", + "range": true, + "refId": "A" + } + ], + "title": "Readonly mode", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows how many ongoing insertions (not API /write calls) on disk are taking place, where:\n* `max` - equal to number of CPUs;\n* `current` - current number of goroutines busy with inserting rows into underlying storage.\n\nEvery successful API /write call results into flush on disk. The `max` is an internal limit and can't be changed. It is always equal to the number of CPUs. \n\nWhen `current` hits `max` constantly, it means storage is overloaded and requires more CPU or faster disk.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 133, + "links": [ + { + "targetBlank": true, + "title": "Related discussion", + "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/632" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(vm_concurrent_addrows_current{job=~\"$job_storage\", \n instance=~\"$instance\"}[$__rate_interval])\n)", + "interval": "", + "legendFormat": "current", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(vm_concurrent_addrows_capacity{job=~\"$job_storage\", instance=~\"$instance\"})", + "hide": false, + "interval": "", + "legendFormat": "max", "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" + "title": "Concurrent flushes on disk ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true + "description": "The number of on-going merges in storage nodes. It is expected to have high numbers for `storage/small` metric.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 54, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_active_merges{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", + "legendFormat": "__auto", + "range": true, + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "Active merges ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The number of rows merged per second by storage nodes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 55, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(rate(vm_rows_merged_total{job=~\"$job_storage\", instance=~\"$instance\"}[$__rate_interval])) by(type)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Merge speed", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows amount of on-disk space occupied by data points.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 37 + }, + "id": 18, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"}) ", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "disk usage", + "range": true, + "refId": "A" + } + ], + "title": "Disk space usage (datapoints) ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "The max number of data parts of LSM tree across all storage nodes.\nHigh number of parts (the hard limit is 512) is an evidence of slow merge performance - check the resource utilization.\n* `indexdb` - inverted index\n* `storage/small` - recently added parts of data ingested into storage (hot data)\n* `storage/big` - small parts gradually merged into big parts (cold data)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 37 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "max(vm_parts{job=~\"$job_storage\", instance=~\"$instance\"}) by(type)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "LSM parts max by type ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows amount of on-disk space occupied by inverted index.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 20, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "disk usage", + "range": true, + "refId": "A" + } + ], + "title": "Disk space usage (index) ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "How many datapoints are in RAM queue waiting to be written into storage. The number of pending data points should be in the range from 0 to `2*`, since VictoriaMetrics pushes pending data to persistent storage every second. The index datapoints value in general is much lower.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pending index entries" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "decimals", + "value": 3 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 14, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"storage\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "pending datapoints", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "sum(max_over_time(vm_pending_rows{job=~\"$job_storage\", instance=~\"$instance\", type=\"indexdb\"}[$__rate_interval]))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "pending index entries", + "range": true, + "refId": "B" + } + ], + "title": "Pending datapoints ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows how many rows were ignored on insertion due to corrupted or out of retention timestamps.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 53 + }, + "id": 135, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(vm_rows_ignored_total{job=~\"$job_storage\", instance=~\"$instance\"}[1h])) by (reason)", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Rows ignored for last 1h ($instance)", + "type": "timeseries" } ], "title": "vmstorage ($instance)", @@ -6159,15 +5783,11 @@ "h": 1, "w": 24, "x": 0, - "y": 39 + "y": 41 }, "id": 42, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -6175,100 +5795,104 @@ "description": "Request rate accepted by vmselect nodes", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 7 }, - "hiddenSeries": false, "id": 92, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_http_requests_total{job=~\"$job_select\", instance=~\"$instance.*\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", + "editorMode": "code", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job_select\", instance=~\"$instance\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "{{path}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2088", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2089", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -6276,68 +5900,119 @@ "description": "Shows the max number of concurrent selects across instances.\n* `max` - equal to number of CPU * 2 by default. May be configured with `search.maxConcurrentRequests` flag\n* `current` - current number of goroutines busy with processing requests\n\nWhen `current` hits `max` constantly, it means one or more vmselect nodes are overloaded and require more CPU or better load balancing. If CPU panel shows there are free resources - try increasing `search.maxConcurrentRequests`.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 7 }, - "hiddenSeries": false, "id": 95, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2150", - "alias": "max", - "color": "#C4162A", - "fill": 0 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "max(max_over_time(vm_concurrent_select_current{job=~\"$job_select\", instance=~\"$instance\"}[1m])) ", + "editorMode": "code", + "expr": "max(max_over_time(vm_concurrent_select_current{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) ", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "current", + "range": true, "refId": "A" }, { @@ -6352,523 +6027,835 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Concurrent selects ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2159", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2160", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of series read per query.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_select&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 15 + }, + "id": 163, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "CPU usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_select&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 165, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "99th percentile of the number of time series read per query.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 23 }, - "hiddenSeries": false, "id": 178, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_series_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_series_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "series", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Series read per query ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples read per query.", + "description": "99th percentile of number of raw datapoints read per queried time series.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 23 }, - "hiddenSeries": false, - "id": 179, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 180, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_read_per_series_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows read per query ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints read per series ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples read per queried series.", + "description": "99th percentile of number of raw datapoints read per query.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 31 }, - "hiddenSeries": false, - "id": 180, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, + "id": 179, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_read_per_series_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_read_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows read per series ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints read per query ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" }, - "description": "99th percentile of number of raw samples scanner per query.\n\nThis number can exceed number of RowsReadPerQuery if `step` query arg passed to [/api/v1/query_range](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) is smaller than the lookbehind window set in square brackets of [rollup function](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions). For example, if `increase(some_metric[1h])` is executed with the `step=5m`, then the same raw samples on a hour time range are scanned `1h/5m=12` times. See [this article](https://valyala.medium.com/how-to-optimize-promql-and-metricsql-queries-85a1b75bf986) for details.", + "description": "99th percentile of number of raw datapoints scanner per query.\n\nThis number can exceed number of DatapointsReadPerQuery if `step` query arg passed to [/api/v1/query_range](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) is smaller than the lookbehind window set in square brackets of [rollup function](https://docs.victoriametrics.com/MetricsQL.html#rollup-functions). For example, if `increase(some_metric[1h])` is executed with the `step=5m`, then the same raw samples on a hour time range are scanned `1h/5m=12` times. See [this article](https://valyala.medium.com/how-to-optimize-promql-and-metricsql-queries-85a1b75bf986) for details.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 24 + "y": 31 }, - "hiddenSeries": false, "id": 181, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(rate(vm_rows_scanned_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "sum(histogram_quantile(0.99, sum(rate(vm_rows_scanned_per_query_bucket{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "datapoints", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], - "title": "Rows scanned per series ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "title": "Datapoints scanned per series ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/read.*/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 32 + "y": 39 }, - "hiddenSeries": false, "id": 93, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2229", - "alias": "/read.*/", - "transform": "negative-Y" + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "editorMode": "code", + "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "intervalFactor": 1, - "legendFormat": "read - {{instance}}", + "legendFormat": "read", + "range": true, "refId": "A" }, { @@ -6876,287 +6863,18 @@ "type": "prometheus", "uid": "$ds" }, - "expr": "sum(rate(vm_tcplistener_written_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "editorMode": "code", + "expr": "sum(rate(vm_tcplistener_written_bytes_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "hide": false, "intervalFactor": 1, - "legendFormat": "write - {{instance}}", + "legendFormat": "write ", + "range": true, "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2236", - "format": "bps", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2237", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 163, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_select\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_select\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2303", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2304", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "hiddenSeries": false, - "id": 165, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_select\", instance=~\"$instance\"}) by(instance) ", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_select\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "vmselect ($instance)", @@ -7171,173 +6889,97 @@ "h": 1, "w": 24, "x": 0, - "y": 40 + "y": 42 }, "id": 40, "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 41 + "y": 8 }, - "hiddenSeries": false, "id": 97, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance.*\", path!~\"/favicon.ico\"}[$__rate_interval])) by (path) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{path}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Requests rate ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2715", - "format": "short", - "logBase": 1, - "min": "0", - "show": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true }, - { - "$$hashKey": "object:2716", - "format": "short", - "logBase": 1, - "min": "0", - "show": true + "tooltip": { + "mode": "multi", + "sort": "desc" } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" }, - "description": "Shows how many ongoing insertions are taking place.\n* `max` - equal to number of CPU * 4 by default. May be configured with `maxConcurrentInserts` flag;\n* `current` - current number of goroutines busy with processing requests.\n\n`-maxConcurrentInserts` limits the number of insert requests which may be actively processed at any given point in time. All the other insert requests are queued for up to `-insert.maxQueueDuration` in the hope they will get a chance to be processed. This queue is used mostly for absorbing spikes for incoming insert request rate.\n\nWhen `current` hits `max` constantly, it means vminsert node is overloaded and requires more CPU or higher limits.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 41 - }, - "hiddenSeries": false, - "id": 99, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:2777", - "alias": "max", - "color": "#C4162A", - "fill": 0 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { @@ -7345,11 +6987,137 @@ "uid": "$ds" }, "editorMode": "code", - "expr": "max(vm_concurrent_insert_current{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance)", + "expr": "sum(rate(vm_http_requests_total{job=~\"$job_insert\", instance=~\"$instance\", path!~\"/favicon.ico|/metrics\"}[$__rate_interval])) by (path) > 0", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Requests rate ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the max number of ongoing insertions.\n* `max` - equal to number of CPU * 4 by default. May be configured with `maxConcurrentInserts` flag;\n* `current` - current number of goroutines busy with processing requests.\n\n`-maxConcurrentInserts` limits the number of insert requests which may be actively processed at any given point in time. All the other insert requests are queued for up to `-insert.maxQueueDuration` in the hope they will get a chance to be processed. This queue is used mostly for absorbing spikes for incoming insert request rate.\n\nWhen `current` hits `max` constantly, it means vminsert node is overloaded and requires more CPU or higher limits.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 99, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "max(max_over_time(vm_concurrent_insert_current{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval]))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "current", "range": true, "refId": "A" }, @@ -7367,47 +7135,298 @@ "refId": "B" } ], - "thresholds": [], - "timeRegions": [], "title": "Concurrent inserts ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2786", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2787", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=192&var-job=$job_insert&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 185, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "CPU usage % ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Drilldown", + "url": "/d/oS7Bi_0Wz?viewPanel=189&var-job=$job_insert&var-ds=$ds&var-instance=$instance&${__url_time_range}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 187, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "min(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "min", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(\n max_over_time(process_resident_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])\n /\n vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"}\n)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "avg", + "range": true, + "refId": "C" + } + ], + "title": "Memory usage % ($instance)", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { "type": "prometheus", "uid": "$ds" @@ -7415,660 +7434,874 @@ "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bps" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 49 + "y": 24 }, - "hiddenSeries": false, "id": 90, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) by (instance) * 8 > 0", + "expr": "sum(rate(vm_tcplistener_read_bytes_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) * 8 > 0", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "read", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Network usage ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bps", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 49 + "y": 24 }, - "hiddenSeries": false, "id": 88, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "histogram_quantile(0.99, sum(increase(vm_rows_per_insert_bucket{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange))", + "editorMode": "code", + "expr": "max(histogram_quantile(0.99, sum(increase(vm_rows_per_insert_bucket{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by (instance, vmrange)))", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}}", + "legendFormat": "max", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Rows per insert ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2848", - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2849", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, "description": "Shows the saturation level of connection between vminsert and vmstorage components. If the threshold of 0.9sec is reached, then the connection is saturated by more than 90% and vminsert won't be able to keep up. This usually means that more vminsert or vmstorage nodes must be added to the cluster in order to increase the total number of vminsert -> vmstorage links.\n", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent" + }, + { + "color": "red", + "value": 0.9 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 57 + "y": 32 }, - "hiddenSeries": false, "id": 139, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, + "editorMode": "code", "exemplar": true, - "expr": "rate(vm_rpc_send_duration_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "expr": "max(rate(vm_rpc_send_duration_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(addr)", "format": "time_series", "interval": "", "intervalFactor": 1, - "legendFormat": "{{instance}} => {{addr}}", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "$$hashKey": "object:234", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.9, - "yaxis": "left" - } - ], - "timeRegions": [], "title": "Storage connection saturation ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:156", - "decimals": 0, - "format": "s", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:157", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": { + "type": "prometheus", "uid": "$ds" }, - "description": "Shows if vmstorage node is reachable for vminsert. If below 1 means vmstorage is not reachable at this moment of time. ", + "description": "Shows when vmstorage node is unreachable for vminsert.", "fieldConfig": { "defaults": { - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 57 + "y": 32 }, - "hiddenSeries": false, "id": 114, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "9.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "$ds" }, - "expr": "vm_rpc_vmstorage_is_reachable{job=~\"$job\", instance=~\"$instance\"}", + "editorMode": "code", + "expr": "vm_rpc_vmstorage_is_reachable{job=~\"$job\", instance=~\"$instance\"} != 1", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "{{instance}} => {{addr}}", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Storage reachability ($instance)", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1534", - "decimals": 0, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1535", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 65 - }, - "hiddenSeries": false, - "id": 164, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job_insert\", instance=~\"$instance\"}[$__rate_interval])) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(process_cpu_cores_available{job=~\"$job_insert\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:887", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:888", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 65 - }, - "hiddenSeries": false, - "id": 169, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.0.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:186", - "alias": "limit", - "color": "#C4162A" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "exemplar": true, - "expr": "sum(process_resident_memory_anon_bytes{job=~\"$job_insert\", instance=~\"$instance\"}) by(instance)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "$ds" - }, - "editorMode": "code", - "expr": "min(vm_available_memory_bytes{job=~\"$job_insert\", instance=~\"$instance\"})", - "hide": false, - "legendFormat": "limit", - "range": true, - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory ($instance)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:164", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:165", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" } ], "title": "vminsert ($instance)", "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 194, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 198, + "options": { + "content": "Drilldown row is used by other panels on the dashboard to show more detailed metrics per-instance.", + "mode": "markdown" + }, + "pluginVersion": "9.1.0", + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the used memory (resident).\nThe application's performance will significantly degrade when memory usage is close to 100%.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 189, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max_over_time(process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "", + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "RSS memory usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "RSS share for memory allocated by the process itself. This share cannot be freed by the OS, so it must be taken into account by OOM killer.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 190, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max_over_time(process_resident_memory_anon_bytes{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])", + "interval": "", + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "RSS anonymous memory usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 192, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])) by(job, instance)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}} ({{job}})", + "range": true, + "refId": "A" + } + ], + "title": "CPU usage ($instance)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "description": "Shows the approx time needed to reach 100% of disk capacity based on the following params:\n* free disk space;\n* row ingestion rate;\n* dedup rate;\n* compression.\n\nUse this panel for capacity planning in order to estimate the time remaining for running out of the disk space.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 196, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "$ds" + }, + "editorMode": "code", + "expr": "vm_free_disk_space_bytes{job=~\"$job_storage\", instance=~\"$instance\"} \n/ \nignoring(path) (\n (\n rate(vm_rows_added_to_storage_total{job=~\"$job_storage\", instance=~\"$instance\"}[1d])\n - \n ignoring(type) rate(vm_deduplicated_samples_total{job=~\"$job_storage\", instance=~\"$instance\", type=\"merge\"}[1d])\n ) * scalar(\n sum(vm_data_size_bytes{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})\n / \n sum(vm_rows{job=~\"$job_storage\", instance=~\"$instance\", type!=\"indexdb\"})\n )\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage full ETA ($instance)", + "type": "timeseries" + } + ], + "title": "Drilldown", + "type": "row" } ], "refresh": false, - "schemaVersion": 36, + "schemaVersion": 37, "style": "dark", "tags": [], "templating": { diff --git a/dashboards/victoriametrics.json b/dashboards/victoriametrics.json index 8d4d8de9e..ce74a665a 100644 --- a/dashboards/victoriametrics.json +++ b/dashboards/victoriametrics.json @@ -1713,7 +1713,6 @@ "collapsed": true, "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "gridPos": { "h": 1, @@ -2031,7 +2030,6 @@ { "datasource": { "type": "prometheus", - "uid": "P4169E866C3094E38" }, "refId": "A" } diff --git a/deployment/docker/Makefile b/deployment/docker/Makefile index a0484b571..80e6bd7d8 100644 --- a/deployment/docker/Makefile +++ b/deployment/docker/Makefile @@ -2,8 +2,8 @@ DOCKER_NAMESPACE := victoriametrics -ROOT_IMAGE ?= alpine:3.16.2 -CERTS_IMAGE := alpine:3.16.2 +ROOT_IMAGE ?= alpine:3.17.0 +CERTS_IMAGE := alpine:3.17.0 GO_BUILDER_IMAGE := golang:1.19.3-alpine BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr :/ __)-1 BASE_IMAGE := local/base:1.1.3-$(shell echo $(ROOT_IMAGE) | tr :/ __)-$(shell echo $(CERTS_IMAGE) | tr :/ __) diff --git a/deployment/docker/alerts-cluster.yml b/deployment/docker/alerts-cluster.yml index c4918c2a1..1a99a08fb 100644 --- a/deployment/docker/alerts-cluster.yml +++ b/deployment/docker/alerts-cluster.yml @@ -54,6 +54,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=52&var-instance={{ $labels.instance }}" summary: "Too many errors served for {{ $labels.job }} path {{ $labels.path }} (instance {{ $labels.instance }})" @@ -72,6 +73,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=44&var-instance={{ $labels.instance }}" summary: "Too many RPC errors for {{ $labels.job }} (instance {{ $labels.instance }})" @@ -83,6 +85,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=133&var-instance={{ $labels.instance }}" summary: "vmstorage on instance {{ $labels.instance }} is constantly hitting concurrent flushes limit" @@ -179,6 +182,7 @@ groups: for: 15m labels: severity: warning + show_at: dashboard annotations: dashboard: "http://localhost:3000/d/oS7Bi_0Wz?viewPanel=139&var-instance={{ $labels.instance }}" summary: "Connection between vminsert on {{ $labels.instance }} and vmstorage on {{ $labels.addr }} is saturated" @@ -186,3 +190,4 @@ groups: is saturated by more than 90% and vminsert won't be able to keep up.\n This usually means that more vminsert or vmstorage nodes must be added to the cluster in order to increase the total number of vminsert -> vmstorage links." + diff --git a/deployment/docker/alerts-vmagent.yml b/deployment/docker/alerts-vmagent.yml index 0fd9b8d56..3c65b3009 100644 --- a/deployment/docker/alerts-vmagent.yml +++ b/deployment/docker/alerts-vmagent.yml @@ -119,4 +119,16 @@ groups: dashboard: "http://localhost:3000/d/G7Z9GzMGz?viewPanel=90&var-instance={{ $labels.instance }}" summary: "Instance {{ $labels.instance }} reached 90% of the limit" description: "Max series limit set via -remoteWrite.maxDailySeries flag is close to reaching the max value. - Then samples for new time series will be dropped instead of sending them to remote storage systems." \ No newline at end of file + Then samples for new time series will be dropped instead of sending them to remote storage systems." + + - alert: ConfigurationReloadFailure + expr: | + vm_promscrape_config_last_reload_successful != 1 + or + vmagent_relabel_config_last_reload_successful != 1 + labels: + severity: warning + annotations: + summary: "Configuration reload failed for vmagent instance {{ $labels.instance }}" + description: "Configuration hot-reload failed for vmagent on instance {{ $labels.instance }}. + Check vmagent's logs for detailed error message." diff --git a/deployment/docker/alerts-vmalert.yml b/deployment/docker/alerts-vmalert.yml new file mode 100644 index 000000000..5e84ea4b6 --- /dev/null +++ b/deployment/docker/alerts-vmalert.yml @@ -0,0 +1,72 @@ +# File contains default list of alerts for мьфдуке service. +# The alerts below are just recommendations and may require some updates +# and threshold calibration according to every specific setup. +groups: + # Alerts group for vmalert assumes that Grafana dashboard + # https://grafana.com/grafana/dashboards/14950-victoriametrics-vmalert is installed. + # Pls update the `dashboard` annotation according to your setup. + - name: vmalert + interval: 30s + rules: + - alert: ConfigurationReloadFailure + expr: vmalert_config_last_reload_successful != 1 + labels: + severity: warning + annotations: + summary: "Configuration reload failed for vmalert instance {{ $labels.instance }}" + description: "Configuration hot-reload failed for vmalert on instance {{ $labels.instance }}. + Check vmalert's logs for detailed error message." + + - alert: AlertingRulesError + expr: sum(vmalert_alerting_rules_error) by(job, instance, group) > 0 + for: 5m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=13&var-instance={{ $labels.instance }}&var-group={{ $labels.group }}" + summary: "Alerting rules are failing for vmalert instance {{ $labels.instance }}" + description: "Alerting rules execution is failing for group \"{{ $labels.group }}\". + Check vmalert's logs for detailed error message." + + - alert: RecordingRulesError + expr: sum(vmalert_recording_rules_error) by(job, instance, group) > 0 + for: 5m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=30&var-instance={{ $labels.instance }}&var-group={{ $labels.group }}" + summary: "Recording rules are failing for vmalert instance {{ $labels.instance }}" + description: "Recording rules execution is failing for group \"{{ $labels.group }}\". + Check vmalert's logs for detailed error message." + + - alert: RecordingRulesNoData + expr: sum(vmalert_recording_rules_last_evaluation_samples) by(job, group, recording) < 1 + for: 30m + labels: + severity: warning + annotations: + dashboard: "http://localhost:3000/d/LzldHAVnz?viewPanel=33&var-group={{ $labels.group }}" + summary: "Recording rule {{ $labels.recording }} ({ $labels.group }}) produces no data" + description: "Recording rule \"{{ $labels.recording }}\" from group \"{{ $labels.group }}\" + produces 0 samples over the last 30min. It might be caused by a misconfiguration + or incorrect query expression." + + - alert: RemoteWriteErrors + expr: sum(increase(vmalert_remotewrite_errors_total[5m])) by(job, instance) > 0 + for: 15m + labels: + severity: warning + annotations: + summary: "vmalert instance {{ $labels.instance }} is failing to push metrics to remote write URL" + description: "vmalert instance {{ $labels.instance }} is failing to push metrics generated via alerting + or recording rules to the configured remote write URL. Check vmalert's logs for detailed error message." + + - alert: AlertmanagerErrors + expr: sum(increase(vmalert_alerts_send_errors_total[5m])) by(job, instance, addr) > 0 + for: 15m + labels: + severity: warning + annotations: + summary: "vmalert instance {{ $labels.instance }} is failing to send notifications to Alertmanager" + description: "vmalert instance {{ $labels.instance }} is failing to send alert notifications to \"{{ $labels.addr }}\". + Check vmalert's logs for detailed error message." diff --git a/deployment/docker/docker-compose-cluster.yml b/deployment/docker/docker-compose-cluster.yml index 2b6621e6f..1069e6674 100644 --- a/deployment/docker/docker-compose-cluster.yml +++ b/deployment/docker/docker-compose-cluster.yml @@ -91,6 +91,7 @@ services: - ./alerts-cluster.yml:/etc/alerts/alerts.yml - ./alerts-health.yml:/etc/alerts/alerts-health.yml - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml + - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - '--datasource.url=http://vmselect:8481/select/0/prometheus' - '--remoteRead.url=http://vmselect:8481/select/0/prometheus' diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 3f1733403..3d6a8a47c 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -66,6 +66,7 @@ services: - ./alerts.yml:/etc/alerts/alerts.yml - ./alerts-health.yml:/etc/alerts/alerts-health.yml - ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml + - ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml command: - "--datasource.url=http://victoriametrics:8428/" - "--remoteRead.url=http://victoriametrics:8428/" diff --git a/docs/Articles.md b/docs/Articles.md index 61996462a..5dfd39f03 100644 --- a/docs/Articles.md +++ b/docs/Articles.md @@ -108,6 +108,8 @@ See also [case studies](https://docs.victoriametrics.com/CaseStudies.html). ### Other articles -* [How ClickHouse inspired us to build a high performance time series database](https://www.youtube.com/watch?v=p9qjb_yoBro). See also [slides](https://docs.google.com/presentation/d/1SdFrwsyR-HMXfbzrY8xfDZH_Dg6E7E5NJ84tQozMn3w/edit?usp=sharing). +* [How ClickHouse inspired us to build a high performance time series database](https://www.youtube.com/watch?v=p9qjb_yoBro). See also [slides](https://docs.google.com/presentation/d/1SdFrwsyR-HMXfbzrY8xfDZH_Dg6E7E5NJ84tQozMn3w/edit?usp=sharing) +* [OSA Con 2022: Specifics of data analysis in Time Series Databases](https://www.youtube.com/watch?v=_zORxrgLtec) +* [CNCF Paris Meetup 2022-09-15 - VictoriaMetrics - The cost of scale in Prometheus ecosystem](https://www.youtube.com/watch?v=gcZYHpri2Hw). See also [slides](https://docs.google.com/presentation/d/1jhZuKnAXi15M-mdBP5a4ZAiyrMeHhYmzO8xcZ6pMyLc/edit?usp=sharing) * [Comparing Thanos to VictoriaMetrics cluster](https://faun.pub/comparing-thanos-to-victoriametrics-cluster-b193bea1683) * [Evaluation performance and correctness: VictoriaMetrics response](https://valyala.medium.com/evaluating-performance-and-correctness-victoriametrics-response-e27315627e87) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cf8bb1029..da50cdb50 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,12 +15,34 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip + +## [v1.84.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.84.0) + +Released at 25-11-2022 + +* FEATURE: add support for [Pushgateway data import format](https://github.com/prometheus/pushgateway#url) via `/api/v1/import/prometheus` url. See [these docs](https://docs.victoriametrics.com/#how-to-import-data-in-prometheus-exposition-format) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1415). Thanks to @PerGon for [the intial implementation](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3360). +* FEATURE: [VictoriaMetrics cluster](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html): add `http://:8481/admin/tenants` API endpoint for returning a list of registered tenants. See [these docs](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format) for details. +* FEATURE: [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise.html): add `-storageNode.filter` command-line flag for filtering the [discovered vmstorage nodes](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery) with arbitrary regular expressions. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3353). +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): allow using numeric values with `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes inside MetricsQL queries. For example `8Ki` equals to `8*1024`, while `8.2M` equals to `8.2*1000*1000`. +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_normalize](https://docs.victoriametrics.com/MetricsQL.html#range_normalize) function for normalizing multiple time series into `[0...1]` value range. This function is useful for correlation analysis of time series with distinct value ranges. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3167). * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_linear_regression](https://docs.victoriametrics.com/MetricsQL.html#range_linear_regression) function for calculating [simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression) over the input time series on the selected time range. This function is useful for predictions and capacity planning. For example, `range_linear_regression(process_resident_memory_bytes)` can predict future memory usage based on the past memory usage. * FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): add [range_stddev](https://docs.victoriametrics.com/MetricsQL.html#range_stddev) and [range_stdvar](https://docs.victoriametrics.com/MetricsQL.html#range_stdvar) functions. -* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): improve structure project, change state management, reduce bundle size, remove Material-UI. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298) +* FEATURE: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): optimize `expr1 op expr2` query when `expr1` returns an empty result. In this case there is no sense in executing `expr2` for `op` not equal to `or`, since the end result will be empty according to [PromQL series matching rules](https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3349). Thanks to @jianglinjian for pointing to this case. +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to upload/paste JSON to investigate the trace. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3308) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3310). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): reduce JS bundle size from 200Kb to 100Kb. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3298). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to hide results of a particular query by clicking the `eye` icon. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3359). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add copy button to row on Table view. The button copies row in MetricQL format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2815). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add compact table view. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3241). +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to "stick" a tooltip on the chart by clicking on a data point. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3321) and [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3376) +* FEATURE: [vmui](https://docs.victoriametrics.com/#vmui): add the ability to set up series custom limits. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3297). +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add default alert list for vmalert's metrics. See [alerts-vmalert.yml](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-vmalert.yml). +* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): expose `vmagent_relabel_config_*`, `vm_relabel_config_*` and `vm_promscrape_config_*` metrics for tracking relabel and scrape configuration hot-reloads. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3345). -* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): save the value of the switches "Trace request" and "Disable cache" after page reload. -* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly show the tab when navigating from the Prometheus URL in Grafana. +* BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly return an empty result from [limit_offset](https://docs.victoriametrics.com/MetricsQL.html#limit_offset) if the `offset` arg exceeds the number of inner time series. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3312). +* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly discover GCE zones when `filter` option is set at [gce_sd_configs](https://docs.victoriametrics.com/sd_configs.html#gce_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202). +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display the requested graph on the requested time range when navigating from Prometheus URL in Grafana. +* BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): properly display wide tables. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3153). +* BUGFIX: reduce CPU usage spikes and memory usage spikes under high data ingestion rate introduced in [v1.83.0](https://docs.victoriametrics.com/CHANGELOG.html#v1830). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3343). ## [v1.83.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.83.1) diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index c2d072ef9..05e0b341d 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -61,6 +61,10 @@ when different tenants have different amounts of data and different query load. - VictoriaMetrics doesn't support querying multiple tenants in a single request. +- The list of registered tenants can be obtained via `http://:8481/admin/tenants` url. See [these docs](#url-format). + +- VictoriaMetrics exposes various per-tenant statistics via metrics - see [these docs](https://docs.victoriametrics.com/PerTenantStatistic.html). + See also [multitenancy via labels](#multitenancy-via-labels). @@ -215,6 +219,10 @@ For example, `-storageNode='dns+srv:vmstorage-hot' -storageNode='dns+srv:vmstora It is OK to pass regular static `vmstorage` addresses together with `dns+srv` addresses at `-storageNode`. For example, `-storageNode=vmstorage1,vmstorage2 -storageNode='dns+srv:vmstorage-autodiscovery'`. +The discovered addresses can be filtered with optional `-storageNode.filter` command-line flag, which can contain arbitrary regular expression filter. +For example, `-storageNode.filter='^[^:]+:8400$'` would leave discovered addresses ending with `8400` port only, e.g. the default port used +for sending data from `vminsert` to `vmstorage` node according to `-vminsertAddr` command-line flag. + The currently discovered `vmstorage` nodes can be [monitored](#monitoring) with `vm_rpc_vmstorage_is_reachable` and `vm_rpc_vmstorage_is_read_only` metrics. ## mTLS protection @@ -284,7 +292,7 @@ See [troubleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html - `prometheus/api/v1/import` - for importing data obtained via `api/v1/export` at `vmselect` (see below). - `prometheus/api/v1/import/native` - for importing data obtained via `api/v1/export/native` on `vmselect` (see below). - `prometheus/api/v1/import/csv` - for importing arbitrary CSV data. See [these docs](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-import-csv-data) for details. - - `prometheus/api/v1/import/prometheus` - for importing data in [Prometheus text exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) and in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md). See [these docs](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-import-data-in-prometheus-exposition-format) for details. + - `prometheus/api/v1/import/prometheus` - for importing data in [Prometheus text exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) and in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md). This endpoint also supports [Pushgateway protocol](https://github.com/prometheus/pushgateway#url). See [these docs](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-import-data-in-prometheus-exposition-format) for details. - URLs for [Prometheus querying API](https://prometheus.io/docs/prometheus/latest/querying/api/): `http://:8481/select//prometheus/`, where: - `` is an arbitrary number identifying data namespace for the query (aka tenant) @@ -328,6 +336,9 @@ See [troubleshooting docs](https://docs.victoriametrics.com/Troubleshooting.html Note that the `delete_series` handler should be used only in exceptional cases such as deletion of accidentally ingested incorrect time series. It shouldn't be used on a regular basis, since it carries non-zero overhead. +- URL for listing [tenants](#multitenancy) with the ingested data on the given time range: `http://:8481/admin/tenants?start=...&end=...` . +The `start` and `end` query args are optional. If they are missing, then all the tenants with at least one sample stored in VictoriaMetrics are returned. + - URL for accessing [vmalert's](https://docs.victoriametrics.com/vmalert.html) UI: `http://:8481/select//prometheus/vmalert/`. This URL works only when `-vmalert.proxyURL` flag is set. See more about vmalert [here](#vmalert). @@ -708,6 +719,8 @@ Report bugs and propose new features [here](https://github.com/VictoriaMetrics/V Below is the output for `/path/to/vminsert -help`: ``` + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -cluster.tls Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection .This flag is available only in enterprise version of VictoriaMetrics -cluster.tlsCAFile string @@ -719,7 +732,7 @@ Below is the output for `/path/to/vminsert -help`: -cluster.tlsKeyFile string Path to client-side TLS key file to use when connecting to -storageNode if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics -clusternativeListenAddr string - TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 must be set. Doesn't work if empty + TCP address to listen for data from other vminsert nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8400 should be set to match default vmstorage port for vminsert. Disabled work if empty -csvTrimTimestamp duration Trim timestamps when importing csv data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -datadog.maxInsertRequestSize size @@ -740,7 +753,7 @@ Below is the output for `/path/to/vminsert -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -833,6 +846,8 @@ Below is the output for `/path/to/vminsert -help`: Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -pushmetrics.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. @@ -854,6 +869,8 @@ Below is the output for `/path/to/vminsert -help`: -storageNode array Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. + -storageNode.filter string + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -880,6 +897,8 @@ Below is the output for `/path/to/vmselect -help`: ``` -cacheDataPath string Path to directory for cache files. Cache isn't saved if empty + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -cluster.tls Whether to use TLS for connections to -storageNode. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection .This flag is available only in enterprise version of VictoriaMetrics -cluster.tlsCAFile string @@ -912,13 +931,13 @@ Below is the output for `/path/to/vmselect -help`: -clusternative.tlsKeyFile string Path to server-side TLS key file to use when accepting connections at -clusternativeListenAddr if -clusternative.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection -clusternativeListenAddr string - TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 must be set. Doesn't work if empty + TCP address to listen for requests from other vmselect nodes in multi-level cluster setup. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup . Usually :8401 should be set to match default vmstorage port for vmselect. Disabled work if empty -dedup.minScrapeInterval duration Leave only the last sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -927,7 +946,7 @@ Below is the output for `/path/to/vmselect -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -975,6 +994,8 @@ Below is the output for `/path/to/vmselect -help`: Auth key for /metrics endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -pushmetrics.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. @@ -984,7 +1005,7 @@ Below is the output for `/path/to/vmselect -help`: Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. -replicationFactor int - How many copies of every time series is available on vmstorage nodes. See -replicationFactor command-line flag for vminsert nodes (default 1) + How many copies of every time series is available on vmstorage nodes. vmselect cancels responses from the slowest -replicationFactor-1 vmstorage nodes if -replicationFactor is set by assuming it already received complete data. It isn't recommended setting this flag to values other than 1 at vmselect nodes, since it may result in incomplete responses after adding new vmstorage nodes even if the replication is enabled at vminsert nodes (default 1) -search.cacheTimestampOffset duration The maximum duration since the current time for response data, which is always queried from the original raw data, without using the response cache. Increase this value if you see gaps in responses due to time synchronization issues between VictoriaMetrics and data sources (default 5m0s) -search.denyPartialResponse @@ -992,9 +1013,9 @@ Below is the output for `/path/to/vmselect -help`: -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -1008,7 +1029,7 @@ Below is the output for `/path/to/vmselect -help`: -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size @@ -1061,8 +1082,10 @@ Below is the output for `/path/to/vmselect -help`: Comma-separated addresses of vmselect nodes; usage: -selectNode=vmselect-host1,...,vmselect-hostN Supports an array of values separated by comma or specified via multiple flags. -storageNode array - Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs .See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery + Comma-separated addresses of vmstorage nodes; usage: -storageNode=vmstorage-host1,...,vmstorage-hostN . Enterprise version of VictoriaMetrics supports automatic discovery of vmstorage addresses via dns+srv records. For example, -storageNode=dns+srv:vmstorage.addrs . See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery Supports an array of values separated by comma or specified via multiple flags. + -storageNode.filter string + An optional regexp filter for discovered -storageNode addresses according to https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#automatic-vmstorage-discovery. Discovered addresses matching the filter are retained, while other addresses are ignored. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -tls Whether to enable TLS for incoming HTTP requests at -httpListenAddr (aka https). -tlsCertFile and -tlsKeyFile must be set if -tls is set -tlsCertFile string @@ -1089,19 +1112,21 @@ Below is the output for `/path/to/vmstorage -help`: ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -cluster.tls - Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Whether to use TLS when accepting connections from vminsert and vmselect. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCAFile string - Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to TLS CA file to use for verifying certificates provided by vminsert and vmselect if -cluster.tls flag is set. By default system CA is used. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCertFile string - Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to server-side TLS certificate file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsCipherSuites array - Optional list of TLS cipher suites used for connections from vminsert and vmselect if -cluster.tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants .This flag is available only in enterprise version of VictoriaMetrics + Optional list of TLS cipher suites used for connections from vminsert and vmselect if -cluster.tls flag is set. See the list of supported cipher suites at https://pkg.go.dev/crypto/tls#pkg-constants .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -cluster.tlsInsecureSkipVerify - Whether to skip verification of TLS certificates provided by vminsert and vmselect if -cluster.tls flag is set. Note that disabled TLS certificate verification breaks security. This flag is available only in enterprise version of VictoriaMetrics + Whether to skip verification of TLS certificates provided by vminsert and vmselect if -cluster.tls flag is set. Note that disabled TLS certificate verification breaks security. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -cluster.tlsKeyFile string - Path to server-side TLS key file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in enterprise version of VictoriaMetrics + Path to server-side TLS key file to use when accepting connections from vminsert and vmselect if -cluster.tls flag is set. See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#mtls-protection . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -dedup.minScrapeInterval duration Leave only the last sample in every time series per each discrete interval equal to -dedup.minScrapeInterval > 0. See https://docs.victoriametrics.com/#deduplication for details -denyQueriesOutsideRetention @@ -1109,7 +1134,7 @@ Below is the output for `/path/to/vmstorage -help`: -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -enableTCP6 Whether to enable IPv6 for listening and dialing. By default only IPv4 TCP and UDP is used @@ -1118,7 +1143,7 @@ Below is the output for `/path/to/vmstorage -help`: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -1175,7 +1200,7 @@ Below is the output for `/path/to/vmstorage -help`: -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) -prevCacheRemovalPercent float - The previous cache is removed when the percent of requests it serves becomes lower than this value. Higher values reduce average memory usage at the cost of higher CPU usage (default 0.2) + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -pushmetrics.extraLabel array Optional labels to add to metrics pushed to -pushmetrics.url . For example, -pushmetrics.extraLabel='instance="foo"' adds instance="foo" label to all the metrics pushed to -pushmetrics.url Supports an array of values separated by comma or specified via multiple flags. @@ -1185,7 +1210,7 @@ Below is the output for `/path/to/vmstorage -help`: Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter diff --git a/docs/MetricsQL.md b/docs/MetricsQL.md index 33d1b9c92..67bd9aa61 100644 --- a/docs/MetricsQL.md +++ b/docs/MetricsQL.md @@ -73,6 +73,7 @@ The list of MetricsQL features: * The duration suffix is optional. The duration is in seconds if the suffix is missing. For example, `rate(m[300] offset 1800)` is equivalent to `rate(m[5m]) offset 30m`. * The duration can be placed anywhere in the query. For example, `sum_over_time(m[1h]) / 1h` is equivalent to `sum_over_time(m[1h]) / 3600`. +* Numeric values can have `K`, `Ki`, `M`, `Mi`, `G`, `Gi`, `T` and `Ti` suffixes. For example, `8K` is equivalent to `8000`, while `1.2Mi` is equvalent to `1.2*1024*1024`. * Trailing commas on all the lists are allowed - label filters, function args and with expressions. For instance, the following queries are valid: `m{foo="bar",}`, `f(a, b,)`, `WITH (x=y,) x`. This simplifies maintenance of multi-line queries. @@ -1051,6 +1052,8 @@ See also [histogram_quantile](#histogram_quantile). `histogram_share(le, buckets)` is a [transform function](#transform-functions), which calculates the share (in the range `[0...1]`) for `buckets` that fall below `le`. This function is useful for calculating SLI and SLO. This is inverse to [histogram_quantile](#histogram_quantile). +The function accepts optional third arg - `boundsLabel`. In this case it returns `lower` and `upper` bounds for the estimated share with the given `boundsLabel` label. + #### histogram_stddev `histogram_stddev(buckets)` is a [transform function](#transform-functions), which calculates standard deviation for the given `buckets`. @@ -1220,6 +1223,11 @@ over the selected time range per each time series returned by `q`. This function `range_min(q)` is a [transform function](#transform-functions), which calculates the min value across points per each time series returned by `q`. +#### range_normalize + +`range_normalize(q1, ...)` is a [transform function](#transform-functions), which normalizes values for time series returned by `q1, ...` into `[0 ... 1]` range. +This function is useful for correlating time series with distinct value ranges. + #### range_quantile `range_quantile(phi, q)` is a [transform function](#transform-functions), which returns `phi`-quantile across points per each time series returned by `q`. diff --git a/docs/README.md b/docs/README.md index 346e513f3..dce732e89 100644 --- a/docs/README.md +++ b/docs/README.md @@ -290,7 +290,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). @@ -1046,7 +1049,8 @@ Time series data can be imported into VictoriaMetrics via any supported data ing * `/api/v1/import/native` for importing data obtained from [/api/v1/export/native](#how-to-export-data-in-native-format). See [these docs](#how-to-import-data-in-native-format) for details. * `/api/v1/import/csv` for importing arbitrary CSV data. See [these docs](#how-to-import-csv-data) for details. -* `/api/v1/import/prometheus` for importing data in Prometheus exposition format. See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. +* `/api/v1/import/prometheus` for importing data in Prometheus exposition format and in [Pushgateway format](https://github.com/prometheus/pushgateway#url). + See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. ### How to import data in JSON line format @@ -1151,9 +1155,11 @@ Note that it could be required to flush response cache after importing historica ### How to import data in Prometheus exposition format -VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) -and in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) -via `/api/v1/import/prometheus` path. For example, the following line imports a single line in Prometheus exposition format into VictoriaMetrics: +VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format), +in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) +and in [Pushgateway format](https://github.com/prometheus/pushgateway#url) via `/api/v1/import/prometheus` path. + +For example, the following command imports a single line in Prometheus exposition format into VictoriaMetrics:
    @@ -1179,6 +1185,16 @@ It should return something like the following: {"metric":{"__name__":"foo","bar":"baz"},"values":[123],"timestamps":[1594370496905]} ``` +The following command imports a single metric via [Pushgateway format](https://github.com/prometheus/pushgateway#url) with `{job="my_app",instance="host123"}` labels: + +
    + +```console +curl -d 'metric{label="abc"} 123' -X POST 'http://localhost:8428/api/v1/import/prometheus/metrics/job/my_app/instance/host123' +``` + +
    + Pass `Content-Encoding: gzip` HTTP request header to `/api/v1/import/prometheus` for importing gzipped data:
    @@ -1190,8 +1206,8 @@ curl -X POST -H 'Content-Encoding: gzip' http://destination-victoriametrics:8428
    -Extra labels may be added to all the imported metrics by passing `extra_label=name=value` query args. -For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. +Extra labels may be added to all the imported metrics either via [Pushgateway format](https://github.com/prometheus/pushgateway#url) +or by passing `extra_label=name=value` query args. For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. If timestamp is missing in ` ` Prometheus exposition format line, then the current timestamp is used during data ingestion. It can be overridden by passing unix timestamp in *milliseconds* via `timestamp` query arg. For example, `/api/v1/import/prometheus?timestamp=1594370496905`. @@ -1642,7 +1658,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter @@ -2031,6 +2049,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2049,7 +2069,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2060,7 +2080,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2163,6 +2183,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2257,7 +2279,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2271,9 +2293,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2287,7 +2309,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index de6ae201e..7a9908aab 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -293,7 +293,10 @@ When querying the [backfilled data](https://docs.victoriametrics.com/#backfillin VMUI automatically adjusts the interval between datapoints on the graph depending on the horizontal resolution and on the selected time range. The step value can be customized by changing `Step value` input. -VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, enter an additional query in the newly appeared input field and press `Ctrl+Enter`. Results for all the queries should be displayed simultaneously on the same graph. +VMUI allows investigating correlations between multiple queries on the same graph. Just click `Add Query` button, +enter an additional query in the newly appeared input field and press `Enter`. +Results for all the queries are displayed simultaneously on the same graph. +Graphs for a particular query can be temporarily hidden by clicking the `eye` icon on the right side of the input field. See the [example VMUI at VictoriaMetrics playground](https://play.victoriametrics.com/select/accounting/1/6a716b0f-38bc-4856-90ce-448fd713e3fe/prometheus/graph/?g0.expr=100%20*%20sum(rate(process_cpu_seconds_total))%20by%20(job)&g0.range_input=1d). @@ -1049,7 +1052,8 @@ Time series data can be imported into VictoriaMetrics via any supported data ing * `/api/v1/import/native` for importing data obtained from [/api/v1/export/native](#how-to-export-data-in-native-format). See [these docs](#how-to-import-data-in-native-format) for details. * `/api/v1/import/csv` for importing arbitrary CSV data. See [these docs](#how-to-import-csv-data) for details. -* `/api/v1/import/prometheus` for importing data in Prometheus exposition format. See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. +* `/api/v1/import/prometheus` for importing data in Prometheus exposition format and in [Pushgateway format](https://github.com/prometheus/pushgateway#url). + See [these docs](#how-to-import-data-in-prometheus-exposition-format) for details. ### How to import data in JSON line format @@ -1154,9 +1158,11 @@ Note that it could be required to flush response cache after importing historica ### How to import data in Prometheus exposition format -VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) -and in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) -via `/api/v1/import/prometheus` path. For example, the following line imports a single line in Prometheus exposition format into VictoriaMetrics: +VictoriaMetrics accepts data in [Prometheus exposition format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format), +in [OpenMetrics format](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md) +and in [Pushgateway format](https://github.com/prometheus/pushgateway#url) via `/api/v1/import/prometheus` path. + +For example, the following command imports a single line in Prometheus exposition format into VictoriaMetrics:
    @@ -1182,6 +1188,16 @@ It should return something like the following: {"metric":{"__name__":"foo","bar":"baz"},"values":[123],"timestamps":[1594370496905]} ``` +The following command imports a single metric via [Pushgateway format](https://github.com/prometheus/pushgateway#url) with `{job="my_app",instance="host123"}` labels: + +
    + +```console +curl -d 'metric{label="abc"} 123' -X POST 'http://localhost:8428/api/v1/import/prometheus/metrics/job/my_app/instance/host123' +``` + +
    + Pass `Content-Encoding: gzip` HTTP request header to `/api/v1/import/prometheus` for importing gzipped data:
    @@ -1193,8 +1209,8 @@ curl -X POST -H 'Content-Encoding: gzip' http://destination-victoriametrics:8428
    -Extra labels may be added to all the imported metrics by passing `extra_label=name=value` query args. -For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. +Extra labels may be added to all the imported metrics either via [Pushgateway format](https://github.com/prometheus/pushgateway#url) +or by passing `extra_label=name=value` query args. For example, `/api/v1/import/prometheus?extra_label=foo=bar` would add `{foo="bar"}` label to all the imported metrics. If timestamp is missing in ` ` Prometheus exposition format line, then the current timestamp is used during data ingestion. It can be overridden by passing unix timestamp in *milliseconds* via `timestamp` query arg. For example, `/api/v1/import/prometheus?timestamp=1594370496905`. @@ -1645,7 +1661,9 @@ All the durations and timestamps in traces are in milliseconds. Query tracing is allowed by default. It can be denied by passing `-denyQueryTracing` command-line flag to VictoriaMetrics. -[VMUI](#vmui) provides an UI for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +[VMUI](#vmui) provides an UI: +- for query tracing - just click `Trace query` checkbox and re-run the query in order to investigate its' trace. +- for exploring custom trace - go to the tab `Trace analyzer` and upload or paste JSON with trace information. ## Cardinality limiter @@ -2034,6 +2052,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li ``` -bigMergeConcurrency int The maximum number of CPU cores to use for big merges. Default value is used if set to 0 + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -2052,7 +2072,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -denyQueryTracing Whether to disable the ability to trace queries. See https://docs.victoriametrics.com/#query-tracing -downsampling.period array - Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in enterprise version of VictoriaMetrics + Comma-separated downsampling periods in the format 'offset:period'. For example, '30d:10m' instructs to leave a single sample per 10 minutes for samples older than 30 days. See https://docs.victoriametrics.com/#downsampling for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -dryRun Whether to check only -promscrape.config and then exit. Unknown config entries aren't allowed in -promscrape.config by default. This can be changed with -promscrape.config.strictParse=false command-line flag @@ -2063,7 +2083,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -finalMergeDelay duration The delay before starting final merge for per-month partition after no new data is ingested into it. Final merge may require additional disk IO and CPU resources. Final merge may increase query speed and reduce disk space usage in some cases. Zero value disables final merge -flagsAuthKey string @@ -2166,6 +2186,8 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings -precisionBits int The number of precision bits to store per each value. Lower precision bits improves data compression at the cost of precision loss (default 64) + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string @@ -2260,7 +2282,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -relabelDebug Whether to log metrics before and after relabeling with -relabelConfig. If the -relabelDebug is enabled, then the metrics aren't sent to storage. This is useful for debugging the relabeling configs -retentionFilter array - Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in enterprise version of VictoriaMetrics + Retention filter in the format 'filter:retention'. For example, '{env="dev"}:3d' configures the retention for time series with env="dev" label to 3 days. See https://docs.victoriametrics.com/#retention-filters for details. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -retentionPeriod value Data with timestamps outside the retentionPeriod is automatically deleted. See also -retentionFilter @@ -2274,9 +2296,9 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.disableCache Whether to disable response caching. This may be useful during data backfilling -search.graphiteMaxPointsPerSeries int - The maximum number of points per series Graphite render API can return. This flag is available only in enterprise version of VictoriaMetrics (default 1000000) + The maximum number of points per series Graphite render API can return. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 1000000) -search.graphiteStorageStep duration - The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in enterprise version of VictoriaMetrics (default 10s) + The interval between datapoints stored in the database. It is used at Graphite Render API handler for normalizing the interval between datapoints in case it isn't normalized. It can be overridden by sending 'storage_step' query arg to /render API or by sending the desired interval via 'Storage-Step' http header during querying /render API. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 10s) -search.latencyOffset duration The time when data points become visible in query results after the collection. Too small value can result in incomplete last points for query results (default 30s) -search.logSlowQueryDuration duration @@ -2290,7 +2312,7 @@ Pass `-help` to VictoriaMetrics in order to see the list of supported command-li -search.maxFederateSeries int The maximum number of time series, which can be returned from /federate. This option allows limiting memory usage (default 1000000) -search.maxGraphiteSeries int - The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in enterprise version of VictoriaMetrics (default 300000) + The maximum number of time series, which can be scanned during queries to Graphite Render API. See https://docs.victoriametrics.com/#graphite-render-api-usage . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default 300000) -search.maxLookback duration Synonym to -search.lookback-delta from Prometheus. The value is dynamically detected from interval between time series datapoints if not set. It can be overridden on per-query basis via max_lookback arg. See also '-search.maxStalenessInterval' flag, which has the same meaining due to historical reasons -search.maxMemoryPerQuery size diff --git a/docs/vmagent.md b/docs/vmagent.md index 29052bc08..70b35ba74 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -549,7 +549,7 @@ The following articles contain useful information about Prometheus relabeling: * `keep_metrics`: keeps all the metrics with names matching the given `regex`, while dropping all the other metrics. For example, the following relabeling config keeps metrics - with `fo` and `bar` names, while dropping all the other metrics: + with `foo` and `bar` names, while dropping all the other metrics: ```yaml - action: keep_metrics @@ -1111,6 +1111,8 @@ vmagent collects metrics data via popular data ingestion protocols and routes th See the docs at https://docs.victoriametrics.com/vmagent.html . + -cacheExpireDuration duration + Items are removed from in-memory caches after they aren't accessed for this duration. Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent (default 30m0s) -configAuthKey string Authorization key for accessing /config page. It must be passed via authKey query arg -csvTrimTimestamp duration @@ -1131,7 +1133,7 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -1182,30 +1184,30 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . -insert.maxQueueDuration duration The maximum duration for waiting in the queue for insert requests due to -maxConcurrentInserts (default 1m0s) -kafka.consumer.topic array - Kafka topic names for data consumption. This flag is available only in enterprise version of VictoriaMetrics + Kafka topic names for data consumption. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.password array - Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth password for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.basicAuth.username array - Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in enterprise version of VictoriaMetrics + Optional basic auth username for -kafka.consumer.topic. Must be used in conjunction with any supported auth methods for kafka client, specified by flag -kafka.consumer.topic.options='security.protocol=SASL_SSL;sasl.mechanisms=PLAIN' . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.brokers array - List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in enterprise version of VictoriaMetrics + List of brokers to connect for given topic, e.g. -kafka.consumer.topic.broker=host-1:9092;host-2:9092 . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.defaultFormat string - Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in enterprise version of VictoriaMetrics (default "promremotewrite") + Expected data format in the topic if -kafka.consumer.topic.format is skipped. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html (default "promremotewrite") -kafka.consumer.topic.format array - data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in enterprise version of VictoriaMetrics + data format for corresponding kafka topic. Valid formats: influx, prometheus, promremotewrite, graphite, jsonline . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.groupID array - Defines group.id for topic. This flag is available only in enterprise version of VictoriaMetrics + Defines group.id for topic. This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.isGzipped array - Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in enterprise version of VictoriaMetrics + Enables gzip setting for topic messages payload. Only prometheus, jsonline and influx formats accept gzipped messages.This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports array of values separated by comma or specified via multiple flags. -kafka.consumer.topic.options array - Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in enterprise version of VictoriaMetrics + Optional key=value;key1=value2 settings for topic consumer. See full configuration options at https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html Supports an array of values separated by comma or specified via multiple flags. -loggerDisableTimestamps Whether to disable writing timestamps in logs @@ -1246,6 +1248,8 @@ See the docs at https://docs.victoriametrics.com/vmagent.html . Trim timestamps for OpenTSDB HTTP data to this duration. Minimum practical duration is 1ms. Higher duration (i.e. 1s) may be used for reducing disk space usage for timestamp data (default 1ms) -pprofAuthKey string Auth key for /debug/pprof/* endpoints. It must be passed via authKey query arg. It overrides httpAuth.* settings + -prevCacheRemovalPercent float + Items in the previous caches are removed when the percent of requests it serves becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration (default 0.1) -promscrape.azureSDCheckInterval duration Interval for checking for changes in Azure. This works only if azure_sd_configs is configured in '-promscrape.config' file. See https://docs.victoriametrics.com/sd_configs.html#azure_sd_configs for details (default 1m0s) -promscrape.cluster.memberNum string diff --git a/docs/vmalert.md b/docs/vmalert.md index 319f6f479..60402d01d 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -677,10 +677,12 @@ See full description for these flags in `./vmalert -help`. ## Monitoring `vmalert` exports various metrics in Prometheus exposition format at `http://vmalert-host:8880/metrics` page. +The default list of alerting rules for these metric can be found [here](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker). We recommend setting up regular scraping of this page either through `vmagent` or by Prometheus so that the exported metrics may be analyzed later. -Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. Graphs on this dashboard contain useful hints - hover the `i` icon at the top left corner of each graph in order to read it. +Use the official [Grafana dashboard](https://grafana.com/grafana/dashboards/14950) for `vmalert` overview. +Graphs on this dashboard contain useful hints - hover the `i` icon in the top left corner of each graph in order to read it. If you have suggestions for improvements or have found a bug - please open an issue on github or add a review to the dashboard. @@ -785,7 +787,7 @@ The shortlist of configuration flags is the following: {% raw %} ``` -clusterMode - If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -configCheckInterval duration Interval for checking for changes in '-rule' or '-notifier.config' files. By default the checking is disabled. Send SIGHUP signal in order to force config check for changes. -datasource.appendTypePrefix @@ -809,11 +811,11 @@ The shortlist of configuration flags is the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string @@ -839,9 +841,9 @@ The shortlist of configuration flags is the following: -datasource.url string Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect URL. Required parameter. E.g. http://127.0.0.1:8428 . See also '-datasource.disablePathAppend', '-datasource.showURL'. -defaultTenant.graphite string - Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy .This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -defaultTenant.prometheus string - Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in enterprise version of VictoriaMetrics + Default tenant for Prometheus alerting groups. See https://docs.victoriametrics.com/vmalert.html#multitenancy . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -disableAlertgroupLabel Whether to disable adding group's Name as label to generated alerts and time series. -dryRun @@ -853,12 +855,11 @@ The shortlist of configuration flags is the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -evaluationInterval duration How often to evaluate the rules (default 1m0s) -external.alert.source string - External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used - If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. + External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert.html#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left=["now-1h","now","VictoriaMetrics",{"expr":{{$expr|jsonEscape|queryEscape}} },{"mode":"Metrics"},{"ui":[true,true,true,"none"]}]' . If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. Supports an array of values separated by comma or specified via multiple flags. @@ -1006,7 +1007,7 @@ The shortlist of configuration flags is the following: -remoteRead.oauth2.scopes string Optional OAuth2 scopes to use for -remoteRead.url. Scopes must be delimited by ';'. -remoteRead.oauth2.tokenUrl string - Optional OAuth2 tokenURL to use for -remoteRead.url. + Optional OAuth2 tokenURL to use for -remoteRead.url. -remoteRead.showURL Whether to show -remoteRead.url in the exported metrics. It is hidden by default, since it can contain sensitive info such as auth key -remoteRead.tlsCAFile string diff --git a/docs/vmauth.md b/docs/vmauth.md index 252d501fd..4912ca638 100644 --- a/docs/vmauth.md +++ b/docs/vmauth.md @@ -243,7 +243,7 @@ See the docs at https://docs.victoriametrics.com/vmauth.html . -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmbackup.md b/docs/vmbackup.md index 5c4a901c7..2caffde57 100644 --- a/docs/vmbackup.md +++ b/docs/vmbackup.md @@ -200,7 +200,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time- -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index 9b7a67294..4b8980a90 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -303,6 +303,13 @@ The shortlist of configuration flags is the following: ``` vmbackupmanager performs regular backups according to the provided configs. +subcommands: + backup: provides auxiliary backup-related commands + restore: restores backup specified by restore mark if it exists + +command-line flags: + -apiURL string + vmbackupmanager address to perform API requests (default "http://127.0.0.1:8300") -concurrency int The number of concurrent workers. Higher concurrency may reduce backup duration (default 10) -configFilePath string @@ -332,7 +339,7 @@ vmbackupmanager performs regular backups according to the provided configs. -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap @@ -396,8 +403,6 @@ vmbackupmanager performs regular backups according to the provided configs. -pushmetrics.url array Optional URL to push metrics exposed at /metrics page. See https://docs.victoriametrics.com/#push-metrics . By default metrics exposed at /metrics page aren't pushed to any remote storage Supports an array of values separated by comma or specified via multiple flags. - -restoreOnStart - Check if backup restore was requested and restore requested backup. -runOnStart Upload backups immediately after start of the service. Otherwise the backup starts on new hour -s3ForcePathStyle diff --git a/docs/vmgateway.md b/docs/vmgateway.md index 93f6dc45f..19c9a4ed4 100644 --- a/docs/vmgateway.md +++ b/docs/vmgateway.md @@ -180,8 +180,8 @@ curl 'http://localhost:8431/api/v1/labels' -H 'Authorization: Bearer eyJhbGciOiJ The shortlist of configuration flags include the following: ```console - -auth.httpHeader - HTTP header name to look for JWT authorization token + -auth.httpHeader string + HTTP header name to look for JWT authorization token (default "Authorization") -clusterMode enable this for the cluster version -datasource.appendTypePrefix @@ -205,17 +205,17 @@ The shortlist of configuration flags include the following: -datasource.maxIdleConnections int Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state. (default 100) -datasource.oauth2.clientID string - Optional OAuth2 clientID to use for -datasource.url. + Optional OAuth2 clientID to use for -datasource.url. -datasource.oauth2.clientSecret string Optional OAuth2 clientSecret to use for -datasource.url. -datasource.oauth2.clientSecretFile string - Optional OAuth2 clientSecretFile to use for -datasource.url. + Optional OAuth2 clientSecretFile to use for -datasource.url. -datasource.oauth2.scopes string Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';' -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int @@ -245,7 +245,7 @@ The shortlist of configuration flags include the following: -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/docs/vmrestore.md b/docs/vmrestore.md index 3a8f25352..23d3e98f3 100644 --- a/docs/vmrestore.md +++ b/docs/vmrestore.md @@ -104,7 +104,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q -envflag.prefix string Prefix for environment variables if -envflag.enable is set -eula - By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in enterprise version of VictoriaMetrics + By specifying this flag, you confirm that you have an enterprise license and accept the EULA https://victoriametrics.com/assets/VM_EULA.pdf . This flag is available only in VictoriaMetrics enterprise. See https://docs.victoriametrics.com/enterprise.html -flagsAuthKey string Auth key for /flags endpoint. It must be passed via authKey query arg. It overrides httpAuth.* settings -fs.disableMmap diff --git a/go.mod b/go.mod index 18d1ba87d..32cfa98f9 100644 --- a/go.mod +++ b/go.mod @@ -12,11 +12,11 @@ require ( // like https://github.com/valyala/fasthttp/commit/996610f021ff45fdc98c2ce7884d5fa4e7f9199b github.com/VictoriaMetrics/fasthttp v1.1.0 github.com/VictoriaMetrics/metrics v1.23.0 - github.com/VictoriaMetrics/metricsql v0.47.0 + github.com/VictoriaMetrics/metricsql v0.49.0 github.com/aws/aws-sdk-go-v2 v1.17.1 - github.com/aws/aws-sdk-go-v2/config v1.17.10 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 - github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 + github.com/aws/aws-sdk-go-v2/config v1.18.3 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.42 + github.com/aws/aws-sdk-go-v2/service/s3 v1.29.4 github.com/cespare/xxhash/v2 v2.1.2 github.com/cheggaaa/pb/v3 v3.1.0 github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect @@ -45,14 +45,14 @@ require ( ) require ( - cloud.google.com/go v0.106.0 // indirect + cloud.google.com/go v0.107.0 // indirect cloud.google.com/go/compute v1.12.1 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect cloud.google.com/go/iam v0.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.1 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.12.23 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.3 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 // indirect @@ -64,7 +64,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.17.5 // indirect github.com/aws/smithy-go v1.13.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -81,7 +81,7 @@ require ( github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect - github.com/rivo/uniseg v0.4.2 // indirect + github.com/rivo/uniseg v0.4.3 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/histogram v1.2.0 // indirect @@ -93,7 +93,7 @@ require ( golang.org/x/text v0.4.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect + google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect ) diff --git a/go.sum b/go.sum index 8ce522ff3..7fc40cfcf 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.106.0 h1:AWaMWuZb2oFeiV91OfNHZbmwUhMVuXEaLPm9sqDAOl8= -cloud.google.com/go v0.106.0/go.mod h1:5NEGxGuIeMQiPaWLwLYZ7kfNWiP6w1+QJK+xqyIT+dw= +cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -100,8 +100,8 @@ github.com/VictoriaMetrics/fasthttp v1.1.0/go.mod h1:/7DMcogqd+aaD3G3Hg5kFgoFwlR github.com/VictoriaMetrics/metrics v1.18.1/go.mod h1:ArjwVz7WpgpegX/JpB0zpNF2h2232kErkEnzH1sxMmA= github.com/VictoriaMetrics/metrics v1.23.0 h1:WzfqyzCaxUZip+OBbg1+lV33WChDSu4ssYII3nxtpeA= github.com/VictoriaMetrics/metrics v1.23.0/go.mod h1:rAr/llLpEnAdTehiNlUxKgnjcOuROSzpw0GvjpEbvFc= -github.com/VictoriaMetrics/metricsql v0.47.0 h1:PQwadjoQnKKkaUiupkDq0ZbCAHX2qP8OOexJ9oJwupo= -github.com/VictoriaMetrics/metricsql v0.47.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= +github.com/VictoriaMetrics/metricsql v0.49.0 h1:7R04eab3gU0PKu8Ksak7SJnORXm0K+hSGt2+t3XGyKg= +github.com/VictoriaMetrics/metricsql v0.49.0/go.mod h1:6pP1ZeLVJHqJrHlF6Ij3gmpQIznSsgktEcZgsAWYel0= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= @@ -143,14 +143,14 @@ github.com/aws/aws-sdk-go-v2 v1.17.1 h1:02c72fDJr87N8RAC2s3Qu0YuvMRZKNZJ9F+lAehC github.com/aws/aws-sdk-go-v2 v1.17.1/go.mod h1:JLnGeGONAyi2lWXI1p0PCIOIy333JMVK1U7Hf0aRFLw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9 h1:RKci2D7tMwpvGpDNZnGQw9wk6v7o/xSwFcUAuNPoB8k= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9/go.mod h1:vCmV1q1VK8eoQJ5+aYE7PkK1K6v41qJ5pJdK3ggCDvg= -github.com/aws/aws-sdk-go-v2/config v1.17.10 h1:zBy5QQ/mkvHElM1rygHPAzuH+sl8nsdSaxSWj0+rpdE= -github.com/aws/aws-sdk-go-v2/config v1.17.10/go.mod h1:/4np+UiJJKpWHN7Q+LZvqXYgyjgeXm5+lLfDI6TPZao= -github.com/aws/aws-sdk-go-v2/credentials v1.12.23 h1:LctvcJMIb8pxvk5hQhChpCu0WlU6oKQmcYb1HA4IZSA= -github.com/aws/aws-sdk-go-v2/credentials v1.12.23/go.mod h1:0awX9iRr/+UO7OwRQFpV1hNtXxOVuehpjVEzrIAYNcA= +github.com/aws/aws-sdk-go-v2/config v1.18.3 h1:3kfBKcX3votFX84dm00U8RGA1sCCh3eRMOGzg5dCWfU= +github.com/aws/aws-sdk-go-v2/config v1.18.3/go.mod h1:BYdrbeCse3ZnOD5+2/VE/nATOK8fEUpBtmPMdKSyhMU= +github.com/aws/aws-sdk-go-v2/credentials v1.13.3 h1:ur+FHdp4NbVIv/49bUjBW+FE7e57HOo03ELodttmagk= +github.com/aws/aws-sdk-go-v2/credentials v1.13.3/go.mod h1:/rOMmqYBcFfNbRPU0iN9IgGqD5+V2yp3iWNmIlz0wI4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19 h1:E3PXZSI3F2bzyj6XxUXdTIfvp425HHhwKsFvmzBwHgs= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19/go.mod h1:VihW95zQpeKQWVPGkwT+2+WJNQV8UXFfMTWdU6VErL8= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 h1:e1VtTBo+cLNjres0wTlMkmwCGGRjDEkkrz3frxxcaCs= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37/go.mod h1:kdAV1UMnCkyG6tZJUC4mHbPoRjPA3dIK0L8mnsHERiM= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.42 h1:bxgBYvvBh+W1RnNYP4ROXEB8N+HSSucDszfE7Rb+kfU= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.42/go.mod h1:LHOsygMiW/14CkFxdXxvzKyMh3jbk/QfZVaDtCbLkl8= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 h1:nBO/RFxeq/IS5G9Of+ZrgucRciie2qpLy++3UGZ+q2E= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25/go.mod h1:Zb29PYkf42vVYQY6pvSyJCJcFHlPIiY+YKdPtwnvMkY= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19 h1:oRHDrwCTVT8ZXi4sr9Ld+EXk7N/KGssOr2ygNeojEhw= @@ -167,14 +167,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19 h1:GE25AWCdN github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19/go.mod h1:02CP6iuYP+IVnBX5HULVdSAku/85eHB2Y9EsFhrkEwU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19 h1:piDBAaWkaxkkVV3xJJbTehXCZRXYs49kvpi/LG6LR2o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19/go.mod h1:BmQWRVkLTmyNzYPFAZgon53qKLWBNSvonugD1MrSWUs= -github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 h1:/EMdFPW/Ppieh0WUtQf1+qCGNLdsq5UWUyevBQ6vMVc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1/go.mod h1:/NHbqPRiwxSPVOB2Xr+StDEH+GWV/64WwnUjv4KYzV0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.29.4 h1:QgmmWifaYZZcpaw3y1+ccRlgH6jAvLm4K/MBGUc7cNM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.29.4/go.mod h1:/NHbqPRiwxSPVOB2Xr+StDEH+GWV/64WwnUjv4KYzV0= github.com/aws/aws-sdk-go-v2/service/sso v1.11.25 h1:GFZitO48N/7EsFDt8fMa5iYdmWqkUDDB3Eje6z3kbG0= github.com/aws/aws-sdk-go-v2/service/sso v1.11.25/go.mod h1:IARHuzTXmj1C0KS35vboR0FeJ89OkEy1M9mWbK2ifCI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8 h1:jcw6kKZrtNfBPJkaHrscDOZoe5gvi9wjudnxvozYFJo= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8/go.mod h1:er2JHN+kBY6FcMfcBBKNGCT3CarImmdFzishsqBmSRI= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 h1:KRAix/KHvjGODaHAMXnxRk9t0D+4IJVUuS/uwXxngXk= -github.com/aws/aws-sdk-go-v2/service/sts v1.17.1/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.5 h1:60SJ4lhvn///8ygCzYy2l53bFW/Q15bVfyjyAWo6zuw= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.5/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= github.com/aws/smithy-go v1.13.4 h1:/RN2z1txIJWeXeOkzX+Hk/4Uuvv7dWtCjbmVJcrskyk= github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -766,8 +766,8 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8= -github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= +github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1256,8 +1256,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 h1:wx7sJ5GRBQLRcslTNcrTklsHhHevQvxgztW18txbbZM= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1278,8 +1278,8 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/lib/promscrape/discovery/gce/api.go b/lib/promscrape/discovery/gce/api.go index fdf373901..fc6c51438 100644 --- a/lib/promscrape/discovery/gce/api.go +++ b/lib/promscrape/discovery/gce/api.go @@ -58,7 +58,9 @@ func newAPIConfig(sdc *SDConfig) (*apiConfig, error) { logger.Infof("autodetected the current GCE zone: %q", zone) } else if len(zones) == 1 && zones[0] == "*" { // Autodetect zones for project. - zs, err := getZonesForProject(client, project, sdc.Filter) + // Do not pass sdc.Filter when discovering zones, since GCE doesn't support it. + // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3202 + zs, err := getZonesForProject(client, project) if err != nil { return nil, fmt.Errorf("cannot obtain zones for project %q: %w", project, err) } diff --git a/lib/promscrape/discovery/gce/zone.go b/lib/promscrape/discovery/gce/zone.go index b949bab9e..b3144656c 100644 --- a/lib/promscrape/discovery/gce/zone.go +++ b/lib/promscrape/discovery/gce/zone.go @@ -6,13 +6,13 @@ import ( "net/http" ) -func getZonesForProject(client *http.Client, project, filter string) ([]string, error) { +func getZonesForProject(client *http.Client, project string) ([]string, error) { // See https://cloud.google.com/compute/docs/reference/rest/v1/zones zonesURL := fmt.Sprintf("https://compute.googleapis.com/compute/v1/projects/%s/zones", project) var zones []string pageToken := "" for { - data, err := getAPIResponse(client, zonesURL, filter, pageToken) + data, err := getAPIResponse(client, zonesURL, "", pageToken) if err != nil { return nil, fmt.Errorf("cannot obtain zones: %w", err) } diff --git a/lib/promscrape/scraper.go b/lib/promscrape/scraper.go index 9ae5eed6d..470a387bd 100644 --- a/lib/promscrape/scraper.go +++ b/lib/promscrape/scraper.go @@ -4,12 +4,13 @@ import ( "bytes" "flag" "fmt" - "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" "io" "sync" "sync/atomic" "time" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/auth" + "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logger" "github.com/VictoriaMetrics/VictoriaMetrics/lib/procutil" "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal" @@ -112,6 +113,9 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh configData.Store(&marshaledData) cfg.mustStart() + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) + scs := newScrapeConfigs(pushData, globalStopCh) scs.add("azure_sd_configs", *azure.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getAzureSDScrapeWork(swsPrev) }) scs.add("consul_sd_configs", *consul.SDCheckInterval, func(cfg *Config, swsPrev []*ScrapeWork) []*ScrapeWork { return cfg.getConsulSDScrapeWork(swsPrev) }) @@ -143,6 +147,8 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh logger.Infof("SIGHUP received; reloading Prometheus configs from %q", configFile) cfgNew, dataNew, err := loadConfig(configFile) if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot read %q on SIGHUP: %s; continuing with the previous config", configFile, err) goto waitForChans } @@ -158,6 +164,8 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh case <-tickerCh: cfgNew, dataNew, err := loadConfig(configFile) if err != nil { + configReloadErrors.Inc() + configSuccess.Set(0) logger.Errorf("cannot read %q: %s; continuing with the previous config", configFile, err) goto waitForChans } @@ -180,10 +188,17 @@ func runScraper(configFile string, pushData func(at *auth.Token, wr *prompbmarsh } logger.Infof("found changes in %q; applying these changes", configFile) configReloads.Inc() + configSuccess.Set(1) + configTimestamp.Set(fasttime.UnixTimestamp()) } } -var configReloads = metrics.NewCounter(`vm_promscrape_config_reloads_total`) +var ( + configReloads = metrics.NewCounter(`vm_promscrape_config_reloads_total`) + configReloadErrors = metrics.NewCounter(`vm_promscrape_config_reloads_errors_total`) + configSuccess = metrics.NewCounter(`vm_promscrape_config_last_reload_successful`) + configTimestamp = metrics.NewCounter(`vm_promscrape_config_last_reload_success_timestamp_seconds`) +) type scrapeConfigs struct { pushData func(at *auth.Token, wr *prompbmarshal.WriteRequest) diff --git a/lib/protoparser/common/extra_labels.go b/lib/protoparser/common/extra_labels.go index 18e40f065..6f9e9255c 100644 --- a/lib/protoparser/common/extra_labels.go +++ b/lib/protoparser/common/extra_labels.go @@ -1,6 +1,7 @@ package common import ( + "encoding/base64" "fmt" "net/http" "strings" @@ -9,18 +10,74 @@ import ( ) // GetExtraLabels extracts name:value labels from `extra_label=name=value` query args from req. +// +// It also extracts Pushgateways-compatible extra labels from req.URL.Path +// according to https://github.com/prometheus/pushgateway#url . func GetExtraLabels(req *http.Request) ([]prompbmarshal.Label, error) { + labels, err := getPushgatewayLabels(req.URL.Path) + if err != nil { + return nil, fmt.Errorf("cannot parse pushgateway-style labels from %q: %w", req.URL.Path, err) + } q := req.URL.Query() - var result []prompbmarshal.Label for _, label := range q["extra_label"] { tmp := strings.SplitN(label, "=", 2) if len(tmp) != 2 { return nil, fmt.Errorf("`extra_label` query arg must have the format `name=value`; got %q", label) } - result = append(result, prompbmarshal.Label{ + labels = append(labels, prompbmarshal.Label{ Name: tmp[0], Value: tmp[1], }) } - return result, nil + return labels, nil +} + +func getPushgatewayLabels(path string) ([]prompbmarshal.Label, error) { + n := strings.Index(path, "/metrics/job") + if n < 0 { + return nil, nil + } + s := path[n+len("/metrics/"):] + if !strings.HasPrefix(s, "job/") && !strings.HasPrefix(s, "job@base64/") { + return nil, nil + } + labelsCount := (strings.Count(s, "/") + 1) / 2 + labels := make([]prompbmarshal.Label, 0, labelsCount) + for len(s) > 0 { + n := strings.IndexByte(s, '/') + if n < 0 { + return nil, fmt.Errorf("missing value for label %q", s) + } + name := s[:n] + s = s[n+1:] + isBase64 := strings.HasSuffix(name, "@base64") + if isBase64 { + name = name[:len(name)-len("@base64")] + } + var value string + n = strings.IndexByte(s, '/') + if n < 0 { + value = s + s = "" + } else { + value = s[:n] + s = s[n+1:] + } + if isBase64 { + data, err := base64.URLEncoding.DecodeString(value) + if err != nil { + return nil, fmt.Errorf("cannot base64-decode value=%q for label=%q: %w", value, name, err) + } + value = string(data) + } + if len(value) == 0 { + // Skip labels with empty values + continue + } + labels = append(labels, prompbmarshal.Label{ + Name: name, + Value: value, + }) + } + return labels, nil } diff --git a/lib/protoparser/common/extra_labels_test.go b/lib/protoparser/common/extra_labels_test.go new file mode 100644 index 000000000..960470b24 --- /dev/null +++ b/lib/protoparser/common/extra_labels_test.go @@ -0,0 +1,91 @@ +package common + +import ( + "fmt" + "net/http" + "sort" + "strings" + "testing" + + "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal" +) + +func TestGetExtraLabelsSuccess(t *testing.T) { + f := func(requestURI, expectedLabels string) { + t.Helper() + fullURL := "http://fobar" + requestURI + req, err := http.NewRequest("GET", fullURL, nil) + if err != nil { + t.Fatalf("cannot parse %q: %s", fullURL, err) + } + extraLabels, err := GetExtraLabels(req) + if err != nil { + t.Fatalf("unexpected error: %s", err) + } + labelsStr := getLabelsString(extraLabels) + if labelsStr != expectedLabels { + t.Fatalf("unexpected labels;\ngot\n%s\nwant\n%s", labelsStr, expectedLabels) + } + } + f("", `{}`) + f("/foo/bar", `{}`) + f("/foo?extra_label=foo=bar", `{foo="bar"}`) + f("/foo?extra_label=a=x&extra_label=b=y", `{a="x",b="y"}`) + f("/metrics/job/foo", `{job="foo"}`) + f("/metrics/job/foo?extra_label=a=b", `{a="b",job="foo"}`) + f("/metrics/job/foo/b/bcd?extra_label=a=b&extra_label=qwe=rty", `{a="b",b="bcd",job="foo",qwe="rty"}`) + f("/metrics/job/titan/name/%CE%A0%CF%81%CE%BF%CE%BC%CE%B7%CE%B8%CE%B5%CF%8D%CF%82", `{job="titan",name="Προμηθεύς"}`) + f("/metrics/job/titan/name@base64/zqDPgc6_zrzOt864zrXPjc-C", `{job="titan",name="Προμηθεύς"}`) +} + +func TestGetPushgatewayLabelsSuccess(t *testing.T) { + f := func(path, expectedLabels string) { + t.Helper() + labels, err := getPushgatewayLabels(path) + if err != nil { + t.Fatalf("unexpected error in getPushgatewayLabels(%q): %s", path, err) + } + labelsStr := getLabelsString(labels) + if labelsStr != expectedLabels { + t.Fatalf("unexpected labels returned from getPushgatewayLabels(%q);\ngot\n%s\nwant\n%s", path, labelsStr, expectedLabels) + } + } + f("", "{}") + f("/foo/bar", "{}") + f("/metrics/foo/bar", "{}") + f("/metrics/job", "{}") + f("/metrics/job@base64", "{}") + f("/metrics/job/", "{}") + f("/metrics/job/foo", `{job="foo"}`) + f("/foo/metrics/job/foo", `{job="foo"}`) + f("/api/v1/import/prometheus/metrics/job/foo", `{job="foo"}`) + f("/foo/metrics/job@base64/Zm9v", `{job="foo"}`) + f("/foo/metrics/job/x/a/foo/aaa/bar", `{a="foo",aaa="bar",job="x"}`) + f("/foo/metrics/job/x/a@base64/Zm9v", `{a="foo",job="x"}`) +} + +func TestGetPushgatewayLabelsFailure(t *testing.T) { + f := func(path string) { + t.Helper() + labels, err := getPushgatewayLabels(path) + if err == nil { + labelsStr := getLabelsString(labels) + t.Fatalf("expecting non-nil error for getPushgatewayLabels(%q); got labels %s", path, labelsStr) + } + } + // missing bar value + f("/metrics/job/foo/bar") + // invalid base64 encoding for job + f("/metrics/job@base64/#$%") + // invalid base64 encoding for non-job label + f("/metrics/job/foo/bar@base64/#$%") +} + +func getLabelsString(labels []prompbmarshal.Label) string { + a := make([]string, len(labels)) + for i, label := range labels { + a[i] = fmt.Sprintf("%s=%q", label.Name, label.Value) + } + sort.Strings(a) + return "{" + strings.Join(a, ",") + "}" +} diff --git a/lib/workingsetcache/cache.go b/lib/workingsetcache/cache.go index 3e271029b..be7027976 100644 --- a/lib/workingsetcache/cache.go +++ b/lib/workingsetcache/cache.go @@ -11,8 +11,12 @@ import ( "github.com/VictoriaMetrics/fastcache" ) -var prevCacheRemovalPercent = flag.Float64("prevCacheRemovalPercent", 0.2, "The previous cache is removed when the percent of requests it serves becomes lower than this value. "+ - "Higher values reduce average memory usage at the cost of higher CPU usage") +var ( + prevCacheRemovalPercent = flag.Float64("prevCacheRemovalPercent", 0.1, "Items in the previous caches are removed when the percent of requests it serves "+ + "becomes lower than this value. Higher values reduce memory usage at the cost of higher CPU usage. See also -cacheExpireDuration") + cacheExpireDuration = flag.Duration("cacheExpireDuration", 30*time.Minute, "Items are removed from in-memory caches after they aren't accessed for this duration. "+ + "Lower values may reduce memory usage at the cost of higher CPU usage. See also -prevCacheRemovalPercent") +) // Cache modes. const ( @@ -21,8 +25,6 @@ const ( whole = 2 ) -const defaultExpireDuration = 20 * time.Minute - // Cache is a cache for working set entries. // // The cache evicts inactive entries after the given expireDuration. @@ -58,14 +60,10 @@ type Cache struct { // // Stop must be called on the returned cache when it is no longer needed. func Load(filePath string, maxBytes int) *Cache { - return LoadWithExpire(filePath, maxBytes, defaultExpireDuration) + return loadWithExpire(filePath, maxBytes, *cacheExpireDuration) } -// LoadWithExpire loads the cache from filePath and limits its size to maxBytes -// and evicts inactive entires after expireDuration. -// -// Stop must be called on the returned cache when it is no longer needed. -func LoadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) *Cache { +func loadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) *Cache { curr := fastcache.LoadFromFileOrNew(filePath, maxBytes) var cs fastcache.Stats curr.UpdateStats(&cs) @@ -94,14 +92,10 @@ func LoadWithExpire(filePath string, maxBytes int, expireDuration time.Duration) // // Stop must be called on the returned cache when it is no longer needed. func New(maxBytes int) *Cache { - return NewWithExpire(maxBytes, defaultExpireDuration) + return newWithExpire(maxBytes, *cacheExpireDuration) } -// NewWithExpire creates new cache with the given maxBytes capacity and the given expireDuration -// for inactive entries. -// -// Stop must be called on the returned cache when it is no longer needed. -func NewWithExpire(maxBytes int, expireDuration time.Duration) *Cache { +func newWithExpire(maxBytes int, expireDuration time.Duration) *Cache { curr := fastcache.New(maxBytes / 2) prev := fastcache.New(1024) c := newCacheInternal(curr, prev, split, maxBytes) @@ -175,8 +169,8 @@ func (c *Cache) prevCacheWatcher() { minCurrRequests := uint64(1 / p) // Watch for the usage of the prev cache and drop it whenever it receives - // less than prevCacheRemovalPercent requests comparing to the curr cache during the last 30 seconds. - checkInterval := 30 * time.Second + // less than prevCacheRemovalPercent requests comparing to the curr cache during the last 60 seconds. + checkInterval := 60 * time.Second checkInterval += timeJitter(checkInterval / 10) t := time.NewTicker(checkInterval) defer t.Stop() diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index 0da15ce1d..ac3f773f8 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -1052,6 +1052,24 @@ "release_level": "ga", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/maps/addressvalidation/apiv1": { + "distribution_name": "cloud.google.com/go/maps/addressvalidation/apiv1", + "description": "Address Validation API", + "language": "Go", + "client_library_type": "generated", + "docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/addressvalidation/apiv1", + "release_level": "beta", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/maps/routing/apiv2": { + "distribution_name": "cloud.google.com/go/maps/routing/apiv2", + "description": "Routes API", + "language": "Go", + "client_library_type": "generated", + "docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/routing/apiv2", + "release_level": "beta", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/mediatranslation/apiv1beta1": { "distribution_name": "cloud.google.com/go/mediatranslation/apiv1beta1", "description": "Media Translation API", diff --git a/vendor/github.com/VictoriaMetrics/metricsql/lexer.go b/vendor/github.com/VictoriaMetrics/metricsql/lexer.go index 947da2c53..c1a0ec69b 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/lexer.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/lexer.go @@ -149,6 +149,73 @@ func scanString(s string) (string, error) { } } +func parsePositiveNumber(s string) (float64, error) { + if isSpecialIntegerPrefix(s) { + n, err := strconv.ParseInt(s, 0, 64) + if err != nil { + return 0, err + } + return float64(n), nil + } + s = strings.ToLower(s) + m := float64(1) + switch true { + case strings.HasSuffix(s, "kib"): + s = s[:len(s)-3] + m = 1024 + case strings.HasSuffix(s, "ki"): + s = s[:len(s)-2] + m = 1024 + case strings.HasSuffix(s, "kb"): + s = s[:len(s)-2] + m = 1000 + case strings.HasSuffix(s, "k"): + s = s[:len(s)-1] + m = 1000 + case strings.HasSuffix(s, "mib"): + s = s[:len(s)-3] + m = 1024 * 1024 + case strings.HasSuffix(s, "mi"): + s = s[:len(s)-2] + m = 1024 * 1024 + case strings.HasSuffix(s, "mb"): + s = s[:len(s)-2] + m = 1000 * 1000 + case strings.HasSuffix(s, "m"): + s = s[:len(s)-1] + m = 1000 * 1000 + case strings.HasSuffix(s, "gib"): + s = s[:len(s)-3] + m = 1024 * 1024 * 1024 + case strings.HasSuffix(s, "gi"): + s = s[:len(s)-2] + m = 1024 * 1024 * 1024 + case strings.HasSuffix(s, "gb"): + s = s[:len(s)-2] + m = 1000 * 1000 * 1000 + case strings.HasSuffix(s, "g"): + s = s[:len(s)-1] + m = 1000 * 1000 * 1000 + case strings.HasSuffix(s, "tib"): + s = s[:len(s)-3] + m = 1024 * 1024 * 1024 * 1024 + case strings.HasSuffix(s, "ti"): + s = s[:len(s)-2] + m = 1024 * 1024 * 1024 * 1024 + case strings.HasSuffix(s, "tb"): + s = s[:len(s)-2] + m = 1000 * 1000 * 1000 * 1000 + case strings.HasSuffix(s, "t"): + s = s[:len(s)-1] + m = 1000 * 1000 * 1000 * 1000 + } + v, err := strconv.ParseFloat(s, 64) + if err != nil { + return 0, err + } + return v * m, nil +} + func scanPositiveNumber(s string) (string, error) { // Scan integer part. It may be empty if fractional part exists. i := 0 @@ -171,7 +238,14 @@ func scanPositiveNumber(s string) (string, error) { } return s, nil } + if sLen := scanNumMultiplier(s[i:]); sLen > 0 { + i += sLen + return s[:i], nil + } if s[i] != '.' && s[i] != 'e' && s[i] != 'E' { + if i == 0 { + return "", fmt.Errorf("missing positive number") + } return s[:i], nil } @@ -182,14 +256,15 @@ func scanPositiveNumber(s string) (string, error) { for j < len(s) && isDecimalChar(s[j]) { j++ } - if j == i { - return "", fmt.Errorf("missing fractional part in %q", s) - } i = j if i == len(s) { return s, nil } } + if sLen := scanNumMultiplier(s[i:]); sLen > 0 { + i += sLen + return s[:i], nil + } if s[i] != 'e' && s[i] != 'E' { return s[:i], nil @@ -213,6 +288,46 @@ func scanPositiveNumber(s string) (string, error) { return s[:j], nil } +func scanNumMultiplier(s string) int { + s = strings.ToLower(s) + switch true { + case strings.HasPrefix(s, "kib"): + return 3 + case strings.HasPrefix(s, "ki"): + return 2 + case strings.HasPrefix(s, "kb"): + return 2 + case strings.HasPrefix(s, "k"): + return 1 + case strings.HasPrefix(s, "mib"): + return 3 + case strings.HasPrefix(s, "mi"): + return 2 + case strings.HasPrefix(s, "mb"): + return 2 + case strings.HasPrefix(s, "m"): + return 1 + case strings.HasPrefix(s, "gib"): + return 3 + case strings.HasPrefix(s, "gi"): + return 2 + case strings.HasPrefix(s, "gb"): + return 2 + case strings.HasPrefix(s, "g"): + return 1 + case strings.HasPrefix(s, "tib"): + return 3 + case strings.HasPrefix(s, "ti"): + return 2 + case strings.HasPrefix(s, "tb"): + return 2 + case strings.HasPrefix(s, "t"): + return 1 + default: + return 0 + } +} + func scanIdent(s string) string { i := 0 for i < len(s) { diff --git a/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go b/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go index e56659b86..3a432e63e 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/optimizer.go @@ -386,7 +386,7 @@ func getTransformArgIdxForOptimization(funcName string, args []Expr) int { return -1 } switch funcName { - case "", "absent", "scalar", "union", "vector": + case "", "absent", "scalar", "union", "vector", "range_normalize": return -1 case "end", "now", "pi", "ru", "start", "step", "time": return -1 diff --git a/vendor/github.com/VictoriaMetrics/metricsql/parser.go b/vendor/github.com/VictoriaMetrics/metricsql/parser.go index ac64fc438..9b92dbabb 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/parser.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/parser.go @@ -479,24 +479,19 @@ func (p *parser) parsePositiveNumberExpr() (*NumberExpr, error) { if !isPositiveNumberPrefix(p.lex.Token) && !isInfOrNaN(p.lex.Token) { return nil, fmt.Errorf(`positiveNumberExpr: unexpected token %q; want "number"`, p.lex.Token) } - var ne NumberExpr - if isSpecialIntegerPrefix(p.lex.Token) { - in, err := strconv.ParseInt(p.lex.Token, 0, 64) - if err != nil { - return nil, fmt.Errorf(`positiveNumberExpr: cannot parse integer %q: %s`, p.lex.Token, err) - } - ne.N = float64(in) - } else { - n, err := strconv.ParseFloat(p.lex.Token, 64) - if err != nil { - return nil, fmt.Errorf(`positiveNumberExpr: cannot parse %q: %s`, p.lex.Token, err) - } - ne.N = n + s := p.lex.Token + n, err := parsePositiveNumber(s) + if err != nil { + return nil, fmt.Errorf(`positivenumberExpr: cannot parse %q: %s`, s, err) } if err := p.lex.Next(); err != nil { return nil, err } - return &ne, nil + ne := &NumberExpr{ + N: n, + s: s, + } + return ne, nil } func (p *parser) parseStringExpr() (*StringExpr, error) { @@ -1499,10 +1494,16 @@ func (se *StringExpr) AppendString(dst []byte) []byte { type NumberExpr struct { // N is the parsed number, i.e. `1.23`, `-234`, etc. N float64 + + // s contains the original string representation for N. + s string } // AppendString appends string representation of ne to dst and returns the result. func (ne *NumberExpr) AppendString(dst []byte) []byte { + if ne.s != "" { + return append(dst, ne.s...) + } return strconv.AppendFloat(dst, ne.N, 'g', -1, 64) } diff --git a/vendor/github.com/VictoriaMetrics/metricsql/transform.go b/vendor/github.com/VictoriaMetrics/metricsql/transform.go index 40d315832..5876c8290 100644 --- a/vendor/github.com/VictoriaMetrics/metricsql/transform.go +++ b/vendor/github.com/VictoriaMetrics/metricsql/transform.go @@ -76,6 +76,7 @@ var transformFuncs = map[string]bool{ "range_linear_regression": true, "range_max": true, "range_min": true, + "range_normalize": true, "range_quantile": true, "range_stddev": true, "range_stdvar": true, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 74deb0d93..0386bcf7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,25 @@ +# v1.18.3 (2022-11-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.2 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.1 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-11-11) + +* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 +* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.11 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.10 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index ec9c03d27..1a1aaed58 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.10" +const goModuleVersion = "1.18.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go index ae5fb27bd..a8ebb3c0a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go @@ -54,20 +54,9 @@ func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, c var provider smithybearer.TokenProvider - if sharedConfig.SSOSession != nil || (sharedConfig.SSORegion != "" && sharedConfig.SSOStartURL != "") { - ssoSession := sharedConfig.SSOSession - if ssoSession == nil { - // Fallback to legacy SSO session config parameters, if the - // sso-session section wasn't used. - ssoSession = &SSOSession{ - Name: sharedConfig.SSOStartURL, - SSORegion: sharedConfig.SSORegion, - SSOStartURL: sharedConfig.SSOStartURL, - } - } - + if sharedConfig.SSOSession != nil { provider, err = resolveBearerAuthSSOTokenProvider( - ctx, cfg, ssoSession, configs) + ctx, cfg, sharedConfig.SSOSession, configs) } if err == nil && provider != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go index 28705f47f..1bb6addf3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials/stscreds" "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" "github.com/aws/aws-sdk-go-v2/service/sso" + "github.com/aws/aws-sdk-go-v2/service/ssooidc" "github.com/aws/aws-sdk-go-v2/service/sts" ) @@ -171,7 +172,30 @@ func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *S } cfgCopy := cfg.Copy() - cfgCopy.Region = sharedConfig.SSORegion + + if sharedConfig.SSOSession != nil { + ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs) + if err != nil { + return fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err) + } + var optFns []func(*ssocreds.SSOTokenProviderOptions) + if found { + optFns = append(optFns, ssoTokenProviderOptionsFn) + } + cfgCopy.Region = sharedConfig.SSOSession.SSORegion + cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedConfig.SSOSession.Name) + if err != nil { + return err + } + oidcClient := ssooidc.NewFromConfig(cfgCopy) + tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath, optFns...) + options = append(options, func(o *ssocreds.Options) { + o.SSOTokenProvider = tokenProvider + o.CachedTokenFilepath = cachedPath + }) + } else { + cfgCopy.Region = sharedConfig.SSORegion + } cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go index 48aa7a8cf..c23ca9a26 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go @@ -142,18 +142,10 @@ type SSOSession struct { SSOStartURL string } -func (s *SSOSession) setFromIniSection(section ini.Section) error { +func (s *SSOSession) setFromIniSection(section ini.Section) { + updateString(&s.Name, section, ssoSessionNameKey) updateString(&s.SSORegion, section, ssoRegionKey) updateString(&s.SSOStartURL, section, ssoStartURLKey) - - if s.SSORegion == "" || s.SSOStartURL == "" { - return fmt.Errorf( - "%v and %v are required parameters in sso-session section", - ssoRegionKey, ssoStartURLKey, - ) - } - - return nil } // SharedConfig represents the configuration fields of the SDK config files. @@ -846,9 +838,8 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile // profile only have credential provider options. c.clearAssumeRoleOptions() } else { - // First time a profile has been seen, It must either be a assume role - // credentials, or SSO. Assert if the credential type requires a role ARN, - // the ARN is also set, or validate that the SSO configuration is complete. + // First time a profile has been seen. Assert if the credential type + // requires a role ARN, the ARN is also set if err := c.validateCredentialsConfig(profile); err != nil { return err } @@ -900,31 +891,20 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile // as a section in the config file. Load the SSO session using the name // provided. If the session section is not found or incomplete an error // will be returned. - if c.SSOSessionName != "" { - c.SSOSession, err = getSSOSession(c.SSOSessionName, sections, logger) - if err != nil { - return err + if c.hasSSOTokenProviderConfiguration() { + section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(c.SSOSessionName)) + if !ok { + return fmt.Errorf("failed to find SSO session section, %v", c.SSOSessionName) } + var ssoSession SSOSession + ssoSession.setFromIniSection(section) + ssoSession.Name = c.SSOSessionName + c.SSOSession = &ssoSession } return nil } -func getSSOSession(name string, sections ini.Sections, logger logging.Logger) (*SSOSession, error) { - section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(name)) - if !ok { - return nil, fmt.Errorf("failed to find SSO session section, %v", name) - } - - var ssoSession SSOSession - if err := ssoSession.setFromIniSection(section); err != nil { - return nil, fmt.Errorf("failed to load SSO session %v, %w", name, err) - } - ssoSession.Name = name - - return &ssoSession, nil -} - // setFromIniSection loads the configuration from the profile section defined in // the provided INI file. A SharedConfig pointer type value is used so that // multiple config file loadings can be chained. @@ -1088,17 +1068,66 @@ func (c *SharedConfig) validateCredentialType() error { len(c.CredentialProcess) != 0, len(c.WebIdentityTokenFile) != 0, ) { - return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso") + return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token") } return nil } func (c *SharedConfig) validateSSOConfiguration() error { - if !c.hasSSOConfiguration() { + if c.hasSSOTokenProviderConfiguration() { + err := c.validateSSOTokenProviderConfiguration() + if err != nil { + return err + } return nil } + if c.hasLegacySSOConfiguration() { + err := c.validateLegacySSOConfiguration() + if err != nil { + return err + } + } + return nil +} + +func (c *SharedConfig) validateSSOTokenProviderConfiguration() error { + var missing []string + + if len(c.SSOSessionName) == 0 { + missing = append(missing, ssoSessionNameKey) + } + + if c.SSOSession == nil { + missing = append(missing, ssoSectionPrefix) + } else { + if len(c.SSOSession.SSORegion) == 0 { + missing = append(missing, ssoRegionKey) + } + + if len(c.SSOSession.SSOStartURL) == 0 { + missing = append(missing, ssoStartURLKey) + } + } + + if len(missing) > 0 { + return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", + c.Profile, strings.Join(missing, ", ")) + } + + if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix) + } + + if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL { + return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURLKey, c.Profile, ssoStartURLKey, ssoSectionPrefix) + } + + return nil +} + +func (c *SharedConfig) validateLegacySSOConfiguration() error { var missing []string if len(c.SSORegion) == 0 { @@ -1109,11 +1138,18 @@ func (c *SharedConfig) validateSSOConfiguration() error { missing = append(missing, ssoStartURLKey) } + if len(c.SSOAccountID) == 0 { + missing = append(missing, ssoAccountIDKey) + } + + if len(c.SSORoleName) == 0 { + missing = append(missing, ssoRoleNameKey) + } + if len(missing) > 0 { return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", c.Profile, strings.Join(missing, ", ")) } - return nil } @@ -1133,15 +1169,15 @@ func (c *SharedConfig) hasCredentials() bool { } func (c *SharedConfig) hasSSOConfiguration() bool { - switch { - case len(c.SSOAccountID) != 0: - case len(c.SSORegion) != 0: - case len(c.SSORoleName) != 0: - case len(c.SSOStartURL) != 0: - default: - return false - } - return true + return c.hasSSOTokenProviderConfiguration() || c.hasLegacySSOConfiguration() +} + +func (c *SharedConfig) hasSSOTokenProviderConfiguration() bool { + return len(c.SSOSessionName) > 0 +} + +func (c *SharedConfig) hasLegacySSOConfiguration() bool { + return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0 } func (c *SharedConfig) clearAssumeRoleOptions() { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 917f5ef47..953ce67f3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.13.3 (2022-11-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.2 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.1 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2022-11-11) + +* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 +* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider + +# v1.12.24 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.12.23 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index e756a2db6..0bcacb396 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.12.23" +const goModuleVersion = "1.13.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go index bd7603bbc..b3cf7853e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go @@ -45,6 +45,10 @@ type Options struct { // If custom cached token filepath is used, the Provider's startUrl // parameter will be ignored. CachedTokenFilepath string + + // Used by the SSOCredentialProvider if a token configuration + // profile is used in the shared config + SSOTokenProvider *SSOTokenProvider } // Provider is an AWS credential provider that retrieves temporary AWS @@ -78,27 +82,39 @@ func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL strin // Retrieve retrieves temporary AWS credentials from the configured Amazon // Single Sign-On (AWS SSO) user portal by exchanging the accessToken present -// in ~/.aws/sso/cache. +// in ~/.aws/sso/cache. However, if a token provider configuration exists +// in the shared config, then we ought to use the token provider rather then +// direct access on the cached token. func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - if p.cachedTokenFilepath == "" { - cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL) + var accessToken *string + if p.options.SSOTokenProvider != nil { + token, err := p.options.SSOTokenProvider.RetrieveBearerToken(ctx) + if err != nil { + return aws.Credentials{}, err + } + accessToken = &token.Value + } else { + if p.cachedTokenFilepath == "" { + cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL) + if err != nil { + return aws.Credentials{}, &InvalidTokenError{Err: err} + } + p.cachedTokenFilepath = cachedTokenFilepath + } + + tokenFile, err := loadCachedToken(p.cachedTokenFilepath) if err != nil { return aws.Credentials{}, &InvalidTokenError{Err: err} } - p.cachedTokenFilepath = cachedTokenFilepath - } - tokenFile, err := loadCachedToken(p.cachedTokenFilepath) - if err != nil { - return aws.Credentials{}, &InvalidTokenError{Err: err} - } - - if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) { - return aws.Credentials{}, &InvalidTokenError{} + if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) { + return aws.Credentials{}, &InvalidTokenError{} + } + accessToken = &tokenFile.AccessToken } output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{ - AccessToken: &tokenFile.AccessToken, + AccessToken: accessToken, AccountId: &p.options.AccountID, RoleName: &p.options.RoleName, }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md index 32f92ffdd..1602d2292 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/CHANGELOG.md @@ -1,3 +1,23 @@ +# v1.11.42 (2022-11-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.41 (2022-11-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.40 (2022-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.39 (2022-11-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.38 (2022-11-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.37 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go index 830a7ce83..e481cd689 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/s3/manager/go_module_metadata.go @@ -3,4 +3,4 @@ package manager // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.37" +const goModuleVersion = "1.11.42" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index f7703de70..3fd73499d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.29.4 (2022-11-22) + +* No change notes available for this release. + +# v1.29.3 (2022-11-16) + +* No change notes available for this release. + +# v1.29.2 (2022-11-10) + +* No change notes available for this release. + # v1.29.1 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index 36709385a..d2204ecd0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.1" +const goModuleVersion = "1.29.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go index 4b8457ebf..5fca8c1d4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints/endpoints.go @@ -195,6 +195,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.ap-south-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.ap-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{ @@ -269,6 +278,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-central-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-central-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, @@ -287,6 +305,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.eu-south-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.eu-south-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 86596c9f1..6255c0bc5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,19 @@ +# v1.17.5 (2022-11-22) + +* No change notes available for this release. + +# v1.17.4 (2022-11-17) + +* **Documentation**: Documentation updates for AWS Security Token Service. + +# v1.17.3 (2022-11-16) + +* No change notes available for this release. + +# v1.17.2 (2022-11-10) + +* No change notes available for this release. + # v1.17.1 (2022-10-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index 9ae61e72c..f4f4f46f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -28,16 +28,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. When you create a role, you create two policies: A role // trust policy that specifies who can assume the role and a permissions policy @@ -189,11 +189,11 @@ type AssumeRoleInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -204,18 +204,18 @@ type AssumeRoleInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType @@ -257,22 +257,23 @@ type AssumeRoleInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the role. When you do, session tags override a role tag with - // the same key. Tag key–value pairs are not case sensitive, but case is preserved. - // This means that you cannot have separate Department and department tag keys. - // Assume that the role has the Department=Marketing tag and you pass the - // department=engineering session tag. Department and department are not saved as - // separate tags, and the session tag passed in the request takes precedence over - // the role tag. Additionally, if you used temporary credentials to perform this - // operation, the new session inherits any transitive session tags from the calling - // session. If you pass a session tag with the same key as an inherited tag, the - // operation fails. To view the inherited tags for a session, see the CloudTrail - // logs. For more information, see Viewing Session Tags in CloudTrail + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the role. When you do, session + // tags override a role tag with the same key. Tag key–value pairs are not case + // sensitive, but case is preserved. This means that you cannot have separate + // Department and department tag keys. Assume that the role has the + // Department=Marketing tag and you pass the department=engineering session tag. + // Department and department are not saved as separate tags, and the session tag + // passed in the request takes precedence over the role tag. Additionally, if you + // used temporary credentials to perform this operation, the new session inherits + // any transitive session tags from the calling session. If you pass a session tag + // with the same key as an inherited tag, the operation fails. To view the + // inherited tags for a session, see the CloudTrail logs. For more information, see + // Viewing Session Tags in CloudTrail // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs) // in the IAM User Guide. Tags []types.Tag diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index e12315e4c..4ed0f5d07 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -53,16 +53,16 @@ import ( // pass inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of // Amazon Web Services security credentials. The identity of the caller is @@ -82,16 +82,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, session tags override the role's tags with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, session tags +// override the role's tags with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -194,11 +194,11 @@ type AssumeRoleWithSAMLInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -209,18 +209,18 @@ type AssumeRoleWithSAMLInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 2e8b51c98..e2ff4ac62 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -63,16 +63,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Tags (Optional) You can configure your IdP to pass // attributes into your web identity token as session tags. Each session tag @@ -84,16 +84,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, the session tag overrides the role tag with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, the session tag +// overrides the role tag with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -215,11 +215,11 @@ type AssumeRoleWithWebIdentityInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -230,18 +230,18 @@ type AssumeRoleWithWebIdentityInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 01a3d411b..60026a139 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -55,16 +55,16 @@ import ( // session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Though the session policy -// parameters are optional, if you do not pass a policy, then the resulting -// federated user session has no permissions. When you pass session policies, the -// session permissions are the intersection of the IAM user policies and the -// session policies that you pass. This gives you a way to further restrict the -// permissions for a federated user. You cannot use session policies to grant more -// permissions than those that are defined in the permissions policy of the IAM -// user. For more information, see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Though the session policy parameters are optional, if you do not pass a policy, +// then the resulting federated user session has no permissions. When you pass +// session policies, the session permissions are the intersection of the IAM user +// policies and the session policies that you pass. This gives you a way to further +// restrict the permissions for a federated user. You cannot use session policies +// to grant more permissions than those that are defined in the permissions policy +// of the IAM user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. For information about using GetFederationToken to create // temporary security credentials, see GetFederationToken—Federation Through a @@ -135,15 +135,15 @@ type GetFederationTokenInput struct { // You must pass an inline or managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. This parameter is optional. However, if you do not - // pass any session policies, then the resulting federated user session has no - // permissions. When you pass session policies, the session permissions are the - // intersection of the IAM user policies and the session policies that you pass. - // This gives you a way to further restrict the permissions for a federated user. - // You cannot use session policies to grant more permissions than those that are - // defined in the permissions policy of the IAM user. For more information, see - // Session Policies + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. This parameter is + // optional. However, if you do not pass any session policies, then the resulting + // federated user session has no permissions. When you pass session policies, the + // session permissions are the intersection of the IAM user policies and the + // session policies that you pass. This gives you a way to further restrict the + // permissions for a federated user. You cannot use session policies to grant more + // permissions than those that are defined in the permissions policy of the IAM + // user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. The resulting credentials can be used to access a // resource that has a resource-based policy. If that policy specifically @@ -155,11 +155,11 @@ type GetFederationTokenInput struct { // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. An Amazon Web Services conversion compresses the - // passed session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. + // passed inline session policy, managed policy ARNs, and session tags into a + // packed binary format that has a separate limit. Your request can fail for this + // limit even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -168,11 +168,11 @@ type GetFederationTokenInput struct { // managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. You can provide up to 10 managed - // policy ARNs. For more information about ARNs, see Amazon Resource Names (ARNs) - // and Amazon Web Services Service Namespaces + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. The plaintext that you + // use for both inline and managed session policies can't exceed 2,048 characters. + // You can provide up to 10 managed policy ARNs. For more information about ARNs, + // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. This parameter is optional. However, // if you do not pass any session policies, then the resulting federated user @@ -188,11 +188,12 @@ type GetFederationTokenInput struct { // references the federated user session in the Principal element of the policy, // the session has the permissions allowed by the policy. These permissions are // granted in addition to the permissions that are granted by the session policies. - // An Amazon Web Services conversion compresses the passed session policies and - // session tags into a packed binary format that has a separate limit. Your request - // can fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates by + // percentage how close the policies and tags for your request are to the upper + // size limit. PolicyArns []types.PolicyDescriptorType // A list of session tags. Each session tag consists of a key name and an @@ -205,15 +206,15 @@ type GetFederationTokenInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the user you are federating. When you do, session tags - // override a user tag with the same key. Tag key–value pairs are not case - // sensitive, but case is preserved. This means that you cannot have separate - // Department and department tag keys. Assume that the role has the + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the user you are federating. When + // you do, session tags override a user tag with the same key. Tag key–value pairs + // are not case sensitive, but case is preserved. This means that you cannot have + // separate Department and department tag keys. Assume that the role has the // Department=Marketing tag and you pass the department=engineering session tag. // Department and department are not saved as separate tags, and the session tag // passed in the request takes precedence over the role tag. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 3bf8cc340..9e6b85cc4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.1" +const goModuleVersion = "1.17.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go index d061a4e99..ce9acedcd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go @@ -153,6 +153,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -176,12 +179,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/rivo/uniseg/README.md b/vendor/github.com/rivo/uniseg/README.md index 7e3d12e79..25e934687 100644 --- a/vendor/github.com/rivo/uniseg/README.md +++ b/vendor/github.com/rivo/uniseg/README.md @@ -133,6 +133,13 @@ Similarly, use - [`FirstSentence`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentence) or [`FirstSentenceInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentenceInString) for sentence segmentation only, and - [`FirstLineSegment`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegment) or [`FirstLineSegmentInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegmentInString) for line breaking / word wrapping (although using [`Step`](https://pkg.go.dev/github.com/rivo/uniseg#Step) or [`StepString`](https://pkg.go.dev/github.com/rivo/uniseg#StepString) is preferred as it will observe grapheme cluster boundaries). +Finally, if you need to reverse a string while preserving grapheme clusters, use [`ReverseString`](https://pkg.go.dev/github.com/rivo/uniseg#ReverseString): + +```go +fmt.Println(uniseg.ReverseString("🇩🇪🏳️‍🌈")) +// 🏳️‍🌈🇩🇪 +``` + ## Documentation Refer to https://pkg.go.dev/github.com/rivo/uniseg for the package's documentation. diff --git a/vendor/github.com/rivo/uniseg/doc.go b/vendor/github.com/rivo/uniseg/doc.go index 0fc2d8b43..11224ae22 100644 --- a/vendor/github.com/rivo/uniseg/doc.go +++ b/vendor/github.com/rivo/uniseg/doc.go @@ -70,10 +70,10 @@ broken. Monospace width, as referred to in this package, is the width of a string in a monospace font. This is commonly used in terminal user interfaces or text displays or editors that don't support proportional fonts. A width of 1 -corresponds to a single character cell. The C function [wcwidth()] and its +corresponds to a single character cell. The C function [wcswidth()] and its implementation in other programming languages is in widespread use for the same purpose. However, there is no standard for the calculation of such widths, and -this package differs from wcwidth() in a number of ways, presumably to generate +this package differs from wcswidth() in a number of ways, presumably to generate more visually pleasing results. To start, we assume that every code point has a width of 1, with the following @@ -103,6 +103,6 @@ Note that whether these widths appear correct depends on your application's render engine, to which extent it conforms to the Unicode Standard, and its choice of font. -[wcwidth()]: https://man7.org/linux/man-pages/man3/wcwidth.3.html +[wcswidth()]: https://man7.org/linux/man-pages/man3/wcswidth.3.html */ package uniseg diff --git a/vendor/github.com/rivo/uniseg/grapheme.go b/vendor/github.com/rivo/uniseg/grapheme.go index 997abbefd..d5d4c09e5 100644 --- a/vendor/github.com/rivo/uniseg/grapheme.go +++ b/vendor/github.com/rivo/uniseg/grapheme.go @@ -163,6 +163,25 @@ func GraphemeClusterCount(s string) (n int) { return } +// ReverseString reverses the given string while observing grapheme cluster +// boundaries. +func ReverseString(s string) string { + str := []byte(s) + reversed := make([]byte, len(str)) + state := -1 + index := len(str) + for len(str) > 0 { + var cluster []byte + cluster, str, _, state = FirstGraphemeCluster(str, state) + index -= len(cluster) + copy(reversed[index:], cluster) + if index <= len(str)/2 { + break + } + } + return string(reversed) +} + // The number of bits the grapheme property must be shifted to make place for // grapheme states. const shiftGraphemePropState = 4 diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go index 66fdb650f..ec7c602ec 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -15,17 +15,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.12.2 +// protoc v3.18.1 // source: google/api/client.proto package annotations import ( reflect "reflect" + sync "sync" + api "google.golang.org/genproto/googleapis/api" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" ) const ( @@ -35,6 +38,1047 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// The organization for which the client libraries are being published. +// Affects the url where generated docs are published, etc. +type ClientLibraryOrganization int32 + +const ( + // Not useful. + ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED ClientLibraryOrganization = 0 + // Google Cloud Platform Org. + ClientLibraryOrganization_CLOUD ClientLibraryOrganization = 1 + // Ads (Advertising) Org. + ClientLibraryOrganization_ADS ClientLibraryOrganization = 2 + // Photos Org. + ClientLibraryOrganization_PHOTOS ClientLibraryOrganization = 3 + // Street View Org. + ClientLibraryOrganization_STREET_VIEW ClientLibraryOrganization = 4 +) + +// Enum value maps for ClientLibraryOrganization. +var ( + ClientLibraryOrganization_name = map[int32]string{ + 0: "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", + 1: "CLOUD", + 2: "ADS", + 3: "PHOTOS", + 4: "STREET_VIEW", + } + ClientLibraryOrganization_value = map[string]int32{ + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + } +) + +func (x ClientLibraryOrganization) Enum() *ClientLibraryOrganization { + p := new(ClientLibraryOrganization) + *p = x + return p +} + +func (x ClientLibraryOrganization) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientLibraryOrganization) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_client_proto_enumTypes[0].Descriptor() +} + +func (ClientLibraryOrganization) Type() protoreflect.EnumType { + return &file_google_api_client_proto_enumTypes[0] +} + +func (x ClientLibraryOrganization) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientLibraryOrganization.Descriptor instead. +func (ClientLibraryOrganization) EnumDescriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{0} +} + +// To where should client libraries be published? +type ClientLibraryDestination int32 + +const ( + // Client libraries will neither be generated nor published to package + // managers. + ClientLibraryDestination_CLIENT_LIBRARY_DESTINATION_UNSPECIFIED ClientLibraryDestination = 0 + // Generate the client library in a repo under github.com/googleapis, + // but don't publish it to package managers. + ClientLibraryDestination_GITHUB ClientLibraryDestination = 10 + // Publish the library to package managers like nuget.org and npmjs.com. + ClientLibraryDestination_PACKAGE_MANAGER ClientLibraryDestination = 20 +) + +// Enum value maps for ClientLibraryDestination. +var ( + ClientLibraryDestination_name = map[int32]string{ + 0: "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", + 10: "GITHUB", + 20: "PACKAGE_MANAGER", + } + ClientLibraryDestination_value = map[string]int32{ + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20, + } +) + +func (x ClientLibraryDestination) Enum() *ClientLibraryDestination { + p := new(ClientLibraryDestination) + *p = x + return p +} + +func (x ClientLibraryDestination) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientLibraryDestination) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_client_proto_enumTypes[1].Descriptor() +} + +func (ClientLibraryDestination) Type() protoreflect.EnumType { + return &file_google_api_client_proto_enumTypes[1] +} + +func (x ClientLibraryDestination) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientLibraryDestination.Descriptor instead. +func (ClientLibraryDestination) EnumDescriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{1} +} + +// Required information for every language. +type CommonLanguageSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Link to automatically generated reference documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + ReferenceDocsUri string `protobuf:"bytes,1,opt,name=reference_docs_uri,json=referenceDocsUri,proto3" json:"reference_docs_uri,omitempty"` + // The destination where API teams want this client library to be published. + Destinations []ClientLibraryDestination `protobuf:"varint,2,rep,packed,name=destinations,proto3,enum=google.api.ClientLibraryDestination" json:"destinations,omitempty"` +} + +func (x *CommonLanguageSettings) Reset() { + *x = CommonLanguageSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonLanguageSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonLanguageSettings) ProtoMessage() {} + +func (x *CommonLanguageSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonLanguageSettings.ProtoReflect.Descriptor instead. +func (*CommonLanguageSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{0} +} + +func (x *CommonLanguageSettings) GetReferenceDocsUri() string { + if x != nil { + return x.ReferenceDocsUri + } + return "" +} + +func (x *CommonLanguageSettings) GetDestinations() []ClientLibraryDestination { + if x != nil { + return x.Destinations + } + return nil +} + +// Details about how and where to publish client libraries. +type ClientLibrarySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of the API to apply these settings to. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Launch stage of this version of the API. + LaunchStage api.LaunchStage `protobuf:"varint,2,opt,name=launch_stage,json=launchStage,proto3,enum=google.api.LaunchStage" json:"launch_stage,omitempty"` + // When using transport=rest, the client request will encode enums as + // numbers rather than strings. + RestNumericEnums bool `protobuf:"varint,3,opt,name=rest_numeric_enums,json=restNumericEnums,proto3" json:"rest_numeric_enums,omitempty"` + // Settings for legacy Java features, supported in the Service YAML. + JavaSettings *JavaSettings `protobuf:"bytes,21,opt,name=java_settings,json=javaSettings,proto3" json:"java_settings,omitempty"` + // Settings for C++ client libraries. + CppSettings *CppSettings `protobuf:"bytes,22,opt,name=cpp_settings,json=cppSettings,proto3" json:"cpp_settings,omitempty"` + // Settings for PHP client libraries. + PhpSettings *PhpSettings `protobuf:"bytes,23,opt,name=php_settings,json=phpSettings,proto3" json:"php_settings,omitempty"` + // Settings for Python client libraries. + PythonSettings *PythonSettings `protobuf:"bytes,24,opt,name=python_settings,json=pythonSettings,proto3" json:"python_settings,omitempty"` + // Settings for Node client libraries. + NodeSettings *NodeSettings `protobuf:"bytes,25,opt,name=node_settings,json=nodeSettings,proto3" json:"node_settings,omitempty"` + // Settings for .NET client libraries. + DotnetSettings *DotnetSettings `protobuf:"bytes,26,opt,name=dotnet_settings,json=dotnetSettings,proto3" json:"dotnet_settings,omitempty"` + // Settings for Ruby client libraries. + RubySettings *RubySettings `protobuf:"bytes,27,opt,name=ruby_settings,json=rubySettings,proto3" json:"ruby_settings,omitempty"` + // Settings for Go client libraries. + GoSettings *GoSettings `protobuf:"bytes,28,opt,name=go_settings,json=goSettings,proto3" json:"go_settings,omitempty"` +} + +func (x *ClientLibrarySettings) Reset() { + *x = ClientLibrarySettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientLibrarySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientLibrarySettings) ProtoMessage() {} + +func (x *ClientLibrarySettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientLibrarySettings.ProtoReflect.Descriptor instead. +func (*ClientLibrarySettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{1} +} + +func (x *ClientLibrarySettings) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ClientLibrarySettings) GetLaunchStage() api.LaunchStage { + if x != nil { + return x.LaunchStage + } + return api.LaunchStage_LAUNCH_STAGE_UNSPECIFIED +} + +func (x *ClientLibrarySettings) GetRestNumericEnums() bool { + if x != nil { + return x.RestNumericEnums + } + return false +} + +func (x *ClientLibrarySettings) GetJavaSettings() *JavaSettings { + if x != nil { + return x.JavaSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetCppSettings() *CppSettings { + if x != nil { + return x.CppSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetPhpSettings() *PhpSettings { + if x != nil { + return x.PhpSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetPythonSettings() *PythonSettings { + if x != nil { + return x.PythonSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetNodeSettings() *NodeSettings { + if x != nil { + return x.NodeSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetDotnetSettings() *DotnetSettings { + if x != nil { + return x.DotnetSettings + } + return nil +} + +func (x *ClientLibrarySettings) GetRubySettings() *RubySettings { + if x != nil { + return x.RubySettings + } + return nil +} + +func (x *ClientLibrarySettings) GetGoSettings() *GoSettings { + if x != nil { + return x.GoSettings + } + return nil +} + +// This message configures the settings for publishing [Google Cloud Client +// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +// generated from the service config. +type Publishing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of API method settings, e.g. the behavior for methods that use the + // long-running operation pattern. + MethodSettings []*MethodSettings `protobuf:"bytes,2,rep,name=method_settings,json=methodSettings,proto3" json:"method_settings,omitempty"` + // Link to a place that API users can report issues. Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + NewIssueUri string `protobuf:"bytes,101,opt,name=new_issue_uri,json=newIssueUri,proto3" json:"new_issue_uri,omitempty"` + // Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + DocumentationUri string `protobuf:"bytes,102,opt,name=documentation_uri,json=documentationUri,proto3" json:"documentation_uri,omitempty"` + // Used as a tracking tag when collecting data about the APIs developer + // relations artifacts like docs, packages delivered to package managers, + // etc. Example: "speech". + ApiShortName string `protobuf:"bytes,103,opt,name=api_short_name,json=apiShortName,proto3" json:"api_short_name,omitempty"` + // GitHub label to apply to issues and pull requests opened for this API. + GithubLabel string `protobuf:"bytes,104,opt,name=github_label,json=githubLabel,proto3" json:"github_label,omitempty"` + // GitHub teams to be added to CODEOWNERS in the directory in GitHub + // containing source code for the client libraries for this API. + CodeownerGithubTeams []string `protobuf:"bytes,105,rep,name=codeowner_github_teams,json=codeownerGithubTeams,proto3" json:"codeowner_github_teams,omitempty"` + // A prefix used in sample code when demarking regions to be included in + // documentation. + DocTagPrefix string `protobuf:"bytes,106,opt,name=doc_tag_prefix,json=docTagPrefix,proto3" json:"doc_tag_prefix,omitempty"` + // For whom the client library is being published. + Organization ClientLibraryOrganization `protobuf:"varint,107,opt,name=organization,proto3,enum=google.api.ClientLibraryOrganization" json:"organization,omitempty"` + // Client library settings. If the same version string appears multiple + // times in this list, then the last one wins. Settings from earlier + // settings with the same version string are discarded. + LibrarySettings []*ClientLibrarySettings `protobuf:"bytes,109,rep,name=library_settings,json=librarySettings,proto3" json:"library_settings,omitempty"` +} + +func (x *Publishing) Reset() { + *x = Publishing{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Publishing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Publishing) ProtoMessage() {} + +func (x *Publishing) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Publishing.ProtoReflect.Descriptor instead. +func (*Publishing) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{2} +} + +func (x *Publishing) GetMethodSettings() []*MethodSettings { + if x != nil { + return x.MethodSettings + } + return nil +} + +func (x *Publishing) GetNewIssueUri() string { + if x != nil { + return x.NewIssueUri + } + return "" +} + +func (x *Publishing) GetDocumentationUri() string { + if x != nil { + return x.DocumentationUri + } + return "" +} + +func (x *Publishing) GetApiShortName() string { + if x != nil { + return x.ApiShortName + } + return "" +} + +func (x *Publishing) GetGithubLabel() string { + if x != nil { + return x.GithubLabel + } + return "" +} + +func (x *Publishing) GetCodeownerGithubTeams() []string { + if x != nil { + return x.CodeownerGithubTeams + } + return nil +} + +func (x *Publishing) GetDocTagPrefix() string { + if x != nil { + return x.DocTagPrefix + } + return "" +} + +func (x *Publishing) GetOrganization() ClientLibraryOrganization { + if x != nil { + return x.Organization + } + return ClientLibraryOrganization_CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED +} + +func (x *Publishing) GetLibrarySettings() []*ClientLibrarySettings { + if x != nil { + return x.LibrarySettings + } + return nil +} + +// Settings for Java client libraries. +type JavaSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The package name to use in Java. Clobbers the java_package option + // set in the protobuf. This should be used **only** by APIs + // who have already set the language_settings.java.package_name" field + // in gapic.yaml. API teams should use the protobuf java_package option + // where possible. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // library_package: com.google.cloud.pubsub.v1 + LibraryPackage string `protobuf:"bytes,1,opt,name=library_package,json=libraryPackage,proto3" json:"library_package,omitempty"` + // Configure the Java class name to use instead of the service's for its + // corresponding generated GAPIC client. Keys are fully-qualified + // service names as they appear in the protobuf (including the full + // the language_settings.java.interface_names" field in gapic.yaml. API + // teams should otherwise use the service name as it appears in the + // protobuf. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // service_class_names: + // - google.pubsub.v1.Publisher: TopicAdmin + // - google.pubsub.v1.Subscriber: SubscriptionAdmin + ServiceClassNames map[string]string `protobuf:"bytes,2,rep,name=service_class_names,json=serviceClassNames,proto3" json:"service_class_names,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,3,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *JavaSettings) Reset() { + *x = JavaSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JavaSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JavaSettings) ProtoMessage() {} + +func (x *JavaSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JavaSettings.ProtoReflect.Descriptor instead. +func (*JavaSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{3} +} + +func (x *JavaSettings) GetLibraryPackage() string { + if x != nil { + return x.LibraryPackage + } + return "" +} + +func (x *JavaSettings) GetServiceClassNames() map[string]string { + if x != nil { + return x.ServiceClassNames + } + return nil +} + +func (x *JavaSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for C++ client libraries. +type CppSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *CppSettings) Reset() { + *x = CppSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CppSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CppSettings) ProtoMessage() {} + +func (x *CppSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CppSettings.ProtoReflect.Descriptor instead. +func (*CppSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{4} +} + +func (x *CppSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Php client libraries. +type PhpSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *PhpSettings) Reset() { + *x = PhpSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PhpSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PhpSettings) ProtoMessage() {} + +func (x *PhpSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PhpSettings.ProtoReflect.Descriptor instead. +func (*PhpSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{5} +} + +func (x *PhpSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Python client libraries. +type PythonSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *PythonSettings) Reset() { + *x = PythonSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PythonSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PythonSettings) ProtoMessage() {} + +func (x *PythonSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PythonSettings.ProtoReflect.Descriptor instead. +func (*PythonSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{6} +} + +func (x *PythonSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Node client libraries. +type NodeSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *NodeSettings) Reset() { + *x = NodeSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeSettings) ProtoMessage() {} + +func (x *NodeSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeSettings.ProtoReflect.Descriptor instead. +func (*NodeSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{7} +} + +func (x *NodeSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Dotnet client libraries. +type DotnetSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *DotnetSettings) Reset() { + *x = DotnetSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DotnetSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DotnetSettings) ProtoMessage() {} + +func (x *DotnetSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DotnetSettings.ProtoReflect.Descriptor instead. +func (*DotnetSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{8} +} + +func (x *DotnetSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Ruby client libraries. +type RubySettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *RubySettings) Reset() { + *x = RubySettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RubySettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RubySettings) ProtoMessage() {} + +func (x *RubySettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RubySettings.ProtoReflect.Descriptor instead. +func (*RubySettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{9} +} + +func (x *RubySettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Settings for Go client libraries. +type GoSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Some settings. + Common *CommonLanguageSettings `protobuf:"bytes,1,opt,name=common,proto3" json:"common,omitempty"` +} + +func (x *GoSettings) Reset() { + *x = GoSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoSettings) ProtoMessage() {} + +func (x *GoSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoSettings.ProtoReflect.Descriptor instead. +func (*GoSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{10} +} + +func (x *GoSettings) GetCommon() *CommonLanguageSettings { + if x != nil { + return x.Common + } + return nil +} + +// Describes the generator configuration for a method. +type MethodSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The fully qualified name of the method, for which the options below apply. + // This is used to find the method to apply the options. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Describes settings to use for long-running operations when generating + // API methods for RPCs. Complements RPCs that use the annotations in + // google/longrunning/operations.proto. + // + // Example of a YAML configuration:: + // + // publishing: + // method_behavior: + // - selector: CreateAdDomain + // long_running: + // initial_poll_delay: + // seconds: 60 # 1 minute + // poll_delay_multiplier: 1.5 + // max_poll_delay: + // seconds: 360 # 6 minutes + // total_poll_timeout: + // seconds: 54000 # 90 minutes + LongRunning *MethodSettings_LongRunning `protobuf:"bytes,2,opt,name=long_running,json=longRunning,proto3" json:"long_running,omitempty"` +} + +func (x *MethodSettings) Reset() { + *x = MethodSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodSettings) ProtoMessage() {} + +func (x *MethodSettings) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodSettings.ProtoReflect.Descriptor instead. +func (*MethodSettings) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{11} +} + +func (x *MethodSettings) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning { + if x != nil { + return x.LongRunning + } + return nil +} + +// Describes settings to use when generating API methods that use the +// long-running operation pattern. +// All default values below are from those used in the client library +// generators (e.g. +// [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). +type MethodSettings_LongRunning struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Initial delay after which the first poll request will be made. + // Default value: 5 seconds. + InitialPollDelay *durationpb.Duration `protobuf:"bytes,1,opt,name=initial_poll_delay,json=initialPollDelay,proto3" json:"initial_poll_delay,omitempty"` + // Multiplier to gradually increase delay between subsequent polls until it + // reaches max_poll_delay. + // Default value: 1.5. + PollDelayMultiplier float32 `protobuf:"fixed32,2,opt,name=poll_delay_multiplier,json=pollDelayMultiplier,proto3" json:"poll_delay_multiplier,omitempty"` + // Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + MaxPollDelay *durationpb.Duration `protobuf:"bytes,3,opt,name=max_poll_delay,json=maxPollDelay,proto3" json:"max_poll_delay,omitempty"` + // Total polling timeout. + // Default value: 5 minutes. + TotalPollTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=total_poll_timeout,json=totalPollTimeout,proto3" json:"total_poll_timeout,omitempty"` +} + +func (x *MethodSettings_LongRunning) Reset() { + *x = MethodSettings_LongRunning{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_client_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodSettings_LongRunning) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodSettings_LongRunning) ProtoMessage() {} + +func (x *MethodSettings_LongRunning) ProtoReflect() protoreflect.Message { + mi := &file_google_api_client_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodSettings_LongRunning.ProtoReflect.Descriptor instead. +func (*MethodSettings_LongRunning) Descriptor() ([]byte, []int) { + return file_google_api_client_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *MethodSettings_LongRunning) GetInitialPollDelay() *durationpb.Duration { + if x != nil { + return x.InitialPollDelay + } + return nil +} + +func (x *MethodSettings_LongRunning) GetPollDelayMultiplier() float32 { + if x != nil { + return x.PollDelayMultiplier + } + return 0 +} + +func (x *MethodSettings_LongRunning) GetMaxPollDelay() *durationpb.Duration { + if x != nil { + return x.MaxPollDelay + } + return nil +} + +func (x *MethodSettings_LongRunning) GetTotalPollTimeout() *durationpb.Duration { + if x != nil { + return x.TotalPollTimeout + } + return nil +} + var file_google_api_client_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.MethodOptions)(nil), @@ -78,26 +1122,26 @@ var ( // // For example, the proto RPC and annotation: // - // rpc CreateSubscription(CreateSubscriptionRequest) - // returns (Subscription) { - // option (google.api.method_signature) = "name,topic"; - // } + // rpc CreateSubscription(CreateSubscriptionRequest) + // returns (Subscription) { + // option (google.api.method_signature) = "name,topic"; + // } // // Would add the following Java overload (in addition to the method accepting // the request object): // - // public final Subscription createSubscription(String name, String topic) + // public final Subscription createSubscription(String name, String topic) // // The following backwards-compatibility guidelines apply: // - // * Adding this annotation to an unannotated method is backwards + // - Adding this annotation to an unannotated method is backwards // compatible. - // * Adding this annotation to a method which already has existing + // - Adding this annotation to a method which already has existing // method signature annotations is backwards compatible if and only if // the new method signature annotation is last in the sequence. - // * Modifying or removing an existing method signature annotation is + // - Modifying or removing an existing method signature annotation is // a breaking change. - // * Re-ordering existing method signature annotations is a breaking + // - Re-ordering existing method signature annotations is a breaking // change. // // repeated string method_signature = 1051; @@ -111,10 +1155,10 @@ var ( // // Example: // - // service Foo { - // option (google.api.default_host) = "foo.googleapi.com"; - // ... - // } + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } // // optional string default_host = 1049; E_DefaultHost = &file_google_api_client_proto_extTypes[1] @@ -122,22 +1166,22 @@ var ( // // Example: // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform"; - // ... - // } + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } // // If there is more than one scope, use a comma-separated string: // // Example: // - // service Foo { - // option (google.api.oauth_scopes) = \ - // "https://www.googleapis.com/auth/cloud-platform," - // "https://www.googleapis.com/auth/monitoring"; - // ... - // } + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } // // optional string oauth_scopes = 1050; E_OauthScopes = &file_google_api_client_proto_extTypes[2] @@ -148,44 +1192,278 @@ var File_google_api_client_proto protoreflect.FileDescriptor var file_google_api_client_proto_rawDesc = []byte{ 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, - 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, - 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x64, + 0x6f, 0x63, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x44, 0x6f, 0x63, 0x73, 0x55, 0x72, 0x69, 0x12, + 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x93, 0x05, 0x0a, 0x15, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, + 0x0c, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x6c, 0x61, + 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x73, + 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x73, 0x74, 0x4e, 0x75, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x70, 0x70, 0x5f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0b, 0x63, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x68, 0x70, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x0b, 0x70, 0x68, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x43, + 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x64, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x75, 0x62, 0x79, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x62, 0x79, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x67, 0x6f, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0a, 0x67, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, + 0xe0, 0x03, 0x0a, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x43, + 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x5f, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x5f, 0x75, 0x72, 0x69, 0x18, 0x65, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x55, 0x72, 0x69, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x66, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x55, 0x72, 0x69, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x68, 0x6f, 0x72, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x67, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x70, + 0x69, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x68, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x34, 0x0a, + 0x16, 0x63, 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x69, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, + 0x6f, 0x64, 0x65, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x54, 0x65, + 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x6f, 0x63, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x63, + 0x54, 0x61, 0x67, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x49, 0x0a, 0x0c, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x10, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x6d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x9a, 0x02, 0x0a, 0x0c, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x5f, 0x0a, 0x13, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x3a, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x44, 0x0a, 0x16, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x49, 0x0a, 0x0b, 0x43, 0x70, 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, + 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0b, 0x50, 0x68, + 0x70, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0e, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, + 0x4c, 0x0a, 0x0e, 0x44, 0x6f, 0x74, 0x6e, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, + 0x0c, 0x52, 0x75, 0x62, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, + 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x0a, 0x47, 0x6f, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, 0x94, 0x02, + 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, + 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, + 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, + 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, + 0x78, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, + 0x61, 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x2a, 0x79, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, + 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x53, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x0f, + 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x2a, + 0x67, 0x0a, 0x18, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, + 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, + 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, + 0x42, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, + 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } +var ( + file_google_api_client_proto_rawDescOnce sync.Once + file_google_api_client_proto_rawDescData = file_google_api_client_proto_rawDesc +) + +func file_google_api_client_proto_rawDescGZIP() []byte { + file_google_api_client_proto_rawDescOnce.Do(func() { + file_google_api_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_client_proto_rawDescData) + }) + return file_google_api_client_proto_rawDescData +} + +var file_google_api_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_google_api_client_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_google_api_client_proto_goTypes = []interface{}{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions - (*descriptorpb.ServiceOptions)(nil), // 1: google.protobuf.ServiceOptions + (ClientLibraryOrganization)(0), // 0: google.api.ClientLibraryOrganization + (ClientLibraryDestination)(0), // 1: google.api.ClientLibraryDestination + (*CommonLanguageSettings)(nil), // 2: google.api.CommonLanguageSettings + (*ClientLibrarySettings)(nil), // 3: google.api.ClientLibrarySettings + (*Publishing)(nil), // 4: google.api.Publishing + (*JavaSettings)(nil), // 5: google.api.JavaSettings + (*CppSettings)(nil), // 6: google.api.CppSettings + (*PhpSettings)(nil), // 7: google.api.PhpSettings + (*PythonSettings)(nil), // 8: google.api.PythonSettings + (*NodeSettings)(nil), // 9: google.api.NodeSettings + (*DotnetSettings)(nil), // 10: google.api.DotnetSettings + (*RubySettings)(nil), // 11: google.api.RubySettings + (*GoSettings)(nil), // 12: google.api.GoSettings + (*MethodSettings)(nil), // 13: google.api.MethodSettings + nil, // 14: google.api.JavaSettings.ServiceClassNamesEntry + (*MethodSettings_LongRunning)(nil), // 15: google.api.MethodSettings.LongRunning + (api.LaunchStage)(0), // 16: google.api.LaunchStage + (*durationpb.Duration)(nil), // 17: google.protobuf.Duration + (*descriptorpb.MethodOptions)(nil), // 18: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 19: google.protobuf.ServiceOptions } var file_google_api_client_proto_depIdxs = []int32{ - 0, // 0: google.api.method_signature:extendee -> google.protobuf.MethodOptions - 1, // 1: google.api.default_host:extendee -> google.protobuf.ServiceOptions - 1, // 2: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 0, // [0:3] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 1, // 0: google.api.CommonLanguageSettings.destinations:type_name -> google.api.ClientLibraryDestination + 16, // 1: google.api.ClientLibrarySettings.launch_stage:type_name -> google.api.LaunchStage + 5, // 2: google.api.ClientLibrarySettings.java_settings:type_name -> google.api.JavaSettings + 6, // 3: google.api.ClientLibrarySettings.cpp_settings:type_name -> google.api.CppSettings + 7, // 4: google.api.ClientLibrarySettings.php_settings:type_name -> google.api.PhpSettings + 8, // 5: google.api.ClientLibrarySettings.python_settings:type_name -> google.api.PythonSettings + 9, // 6: google.api.ClientLibrarySettings.node_settings:type_name -> google.api.NodeSettings + 10, // 7: google.api.ClientLibrarySettings.dotnet_settings:type_name -> google.api.DotnetSettings + 11, // 8: google.api.ClientLibrarySettings.ruby_settings:type_name -> google.api.RubySettings + 12, // 9: google.api.ClientLibrarySettings.go_settings:type_name -> google.api.GoSettings + 13, // 10: google.api.Publishing.method_settings:type_name -> google.api.MethodSettings + 0, // 11: google.api.Publishing.organization:type_name -> google.api.ClientLibraryOrganization + 3, // 12: google.api.Publishing.library_settings:type_name -> google.api.ClientLibrarySettings + 14, // 13: google.api.JavaSettings.service_class_names:type_name -> google.api.JavaSettings.ServiceClassNamesEntry + 2, // 14: google.api.JavaSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 15: google.api.CppSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 16: google.api.PhpSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 17: google.api.PythonSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 18: google.api.NodeSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 19: google.api.DotnetSettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 20: google.api.RubySettings.common:type_name -> google.api.CommonLanguageSettings + 2, // 21: google.api.GoSettings.common:type_name -> google.api.CommonLanguageSettings + 15, // 22: google.api.MethodSettings.long_running:type_name -> google.api.MethodSettings.LongRunning + 17, // 23: google.api.MethodSettings.LongRunning.initial_poll_delay:type_name -> google.protobuf.Duration + 17, // 24: google.api.MethodSettings.LongRunning.max_poll_delay:type_name -> google.protobuf.Duration + 17, // 25: google.api.MethodSettings.LongRunning.total_poll_timeout:type_name -> google.protobuf.Duration + 18, // 26: google.api.method_signature:extendee -> google.protobuf.MethodOptions + 19, // 27: google.api.default_host:extendee -> google.protobuf.ServiceOptions + 19, // 28: google.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 26, // [26:29] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_google_api_client_proto_init() } @@ -193,18 +1471,178 @@ func file_google_api_client_proto_init() { if File_google_api_client_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_google_api_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonLanguageSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientLibrarySettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Publishing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JavaSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CppSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PhpSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PythonSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DotnetSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RubySettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodSettings_LongRunning); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_api_client_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, + NumEnums: 2, + NumMessages: 14, NumExtensions: 3, NumServices: 0, }, GoTypes: file_google_api_client_proto_goTypes, DependencyIndexes: file_google_api_client_proto_depIdxs, + EnumInfos: file_google_api_client_proto_enumTypes, + MessageInfos: file_google_api_client_proto_msgTypes, ExtensionInfos: file_google_api_client_proto_extTypes, }.Build() File_google_api_client_proto = out.File diff --git a/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go new file mode 100644 index 000000000..710753137 --- /dev/null +++ b/vendor/google.golang.org/genproto/googleapis/api/launch_stage.pb.go @@ -0,0 +1,203 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.18.1 +// source: google/api/launch_stage.proto + +package api + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The launch stage as defined by [Google Cloud Platform +// Launch Stages](https://cloud.google.com/terms/launch-stages). +type LaunchStage int32 + +const ( + // Do not use this default value. + LaunchStage_LAUNCH_STAGE_UNSPECIFIED LaunchStage = 0 + // The feature is not yet implemented. Users can not use it. + LaunchStage_UNIMPLEMENTED LaunchStage = 6 + // Prelaunch features are hidden from users and are only visible internally. + LaunchStage_PRELAUNCH LaunchStage = 7 + // Early Access features are limited to a closed group of testers. To use + // these features, you must sign up in advance and sign a Trusted Tester + // agreement (which includes confidentiality provisions). These features may + // be unstable, changed in backward-incompatible ways, and are not + // guaranteed to be released. + LaunchStage_EARLY_ACCESS LaunchStage = 1 + // Alpha is a limited availability test for releases before they are cleared + // for widespread use. By Alpha, all significant design issues are resolved + // and we are in the process of verifying functionality. Alpha customers + // need to apply for access, agree to applicable terms, and have their + // projects allowlisted. Alpha releases don't have to be feature complete, + // no SLAs are provided, and there are no technical support obligations, but + // they will be far enough along that customers can actually use them in + // test environments or for limited-use tests -- just like they would in + // normal production cases. + LaunchStage_ALPHA LaunchStage = 2 + // Beta is the point at which we are ready to open a release for any + // customer to use. There are no SLA or technical support obligations in a + // Beta release. Products will be complete from a feature perspective, but + // may have some open outstanding issues. Beta releases are suitable for + // limited production use cases. + LaunchStage_BETA LaunchStage = 3 + // GA features are open to all developers and are considered stable and + // fully qualified for production use. + LaunchStage_GA LaunchStage = 4 + // Deprecated features are scheduled to be shut down and removed. For more + // information, see the "Deprecation Policy" section of our [Terms of + // Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + LaunchStage_DEPRECATED LaunchStage = 5 +) + +// Enum value maps for LaunchStage. +var ( + LaunchStage_name = map[int32]string{ + 0: "LAUNCH_STAGE_UNSPECIFIED", + 6: "UNIMPLEMENTED", + 7: "PRELAUNCH", + 1: "EARLY_ACCESS", + 2: "ALPHA", + 3: "BETA", + 4: "GA", + 5: "DEPRECATED", + } + LaunchStage_value = map[string]int32{ + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5, + } +) + +func (x LaunchStage) Enum() *LaunchStage { + p := new(LaunchStage) + *p = x + return p +} + +func (x LaunchStage) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LaunchStage) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_launch_stage_proto_enumTypes[0].Descriptor() +} + +func (LaunchStage) Type() protoreflect.EnumType { + return &file_google_api_launch_stage_proto_enumTypes[0] +} + +func (x LaunchStage) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LaunchStage.Descriptor instead. +func (LaunchStage) EnumDescriptor() ([]byte, []int) { + return file_google_api_launch_stage_proto_rawDescGZIP(), []int{0} +} + +var File_google_api_launch_stage_proto protoreflect.FileDescriptor + +var file_google_api_launch_stage_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x75, + 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2a, 0x8c, 0x01, 0x0a, 0x0b, + 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4c, + 0x41, 0x55, 0x4e, 0x43, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x49, + 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, + 0x50, 0x52, 0x45, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x45, + 0x41, 0x52, 0x4c, 0x59, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, + 0x05, 0x41, 0x4c, 0x50, 0x48, 0x41, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x54, 0x41, + 0x10, 0x03, 0x12, 0x06, 0x0a, 0x02, 0x47, 0x41, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, + 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x5a, 0x0a, 0x0e, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10, 0x4c, 0x61, + 0x75, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, + 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_launch_stage_proto_rawDescOnce sync.Once + file_google_api_launch_stage_proto_rawDescData = file_google_api_launch_stage_proto_rawDesc +) + +func file_google_api_launch_stage_proto_rawDescGZIP() []byte { + file_google_api_launch_stage_proto_rawDescOnce.Do(func() { + file_google_api_launch_stage_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_launch_stage_proto_rawDescData) + }) + return file_google_api_launch_stage_proto_rawDescData +} + +var file_google_api_launch_stage_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_api_launch_stage_proto_goTypes = []interface{}{ + (LaunchStage)(0), // 0: google.api.LaunchStage +} +var file_google_api_launch_stage_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_launch_stage_proto_init() } +func file_google_api_launch_stage_proto_init() { + if File_google_api_launch_stage_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_launch_stage_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_api_launch_stage_proto_goTypes, + DependencyIndexes: file_google_api_launch_stage_proto_depIdxs, + EnumInfos: file_google_api_launch_stage_proto_enumTypes, + }.Build() + File_google_api_launch_stage_proto = out.File + file_google_api_launch_stage_proto_rawDesc = nil + file_google_api_launch_stage_proto_goTypes = nil + file_google_api_launch_stage_proto_depIdxs = nil +} diff --git a/vendor/google.golang.org/grpc/attributes/attributes.go b/vendor/google.golang.org/grpc/attributes/attributes.go index ae13ddac1..02f5dc531 100644 --- a/vendor/google.golang.org/grpc/attributes/attributes.go +++ b/vendor/google.golang.org/grpc/attributes/attributes.go @@ -19,7 +19,7 @@ // Package attributes defines a generic key/value store used in various gRPC // components. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/backoff.go b/vendor/google.golang.org/grpc/backoff.go index 542594f5c..29475e31c 100644 --- a/vendor/google.golang.org/grpc/backoff.go +++ b/vendor/google.golang.org/grpc/backoff.go @@ -48,7 +48,7 @@ type BackoffConfig struct { // here for more details: // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index f4f9408f3..392b21fb2 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -110,6 +110,11 @@ type SubConn interface { UpdateAddresses([]resolver.Address) // Connect starts the connecting for this SubConn. Connect() + // GetOrBuildProducer returns a reference to the existing Producer for this + // ProducerBuilder in this SubConn, or, if one does not currently exist, + // creates a new one and returns it. Returns a close function which must + // be called when the Producer is no longer needed. + GetOrBuildProducer(ProducerBuilder) (p Producer, close func()) } // NewSubConnOptions contains options to create new SubConn. @@ -371,3 +376,21 @@ type ClientConnState struct { // ErrBadResolverState may be returned by UpdateClientConnState to indicate a // problem with the provided name resolver data. var ErrBadResolverState = errors.New("bad resolver state") + +// A ProducerBuilder is a simple constructor for a Producer. It is used by the +// SubConn to create producers when needed. +type ProducerBuilder interface { + // Build creates a Producer. The first parameter is always a + // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the + // associated SubConn), but is declared as interface{} to avoid a + // dependency cycle. Should also return a close function that will be + // called when all references to the Producer have been given up. + Build(grpcClientConnInterface interface{}) (p Producer, close func()) +} + +// A Producer is a type shared among potentially many consumers. It is +// associated with a SubConn, and an implementation will typically contain +// other methods to provide additional functionality, e.g. configuration or +// subscription registration. +type Producer interface { +} diff --git a/vendor/google.golang.org/grpc/balancer/base/balancer.go b/vendor/google.golang.org/grpc/balancer/base/balancer.go index e8dfc828a..3929c26d3 100644 --- a/vendor/google.golang.org/grpc/balancer/base/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/base/balancer.go @@ -157,8 +157,8 @@ func (b *baseBalancer) mergeErrors() error { // regeneratePicker takes a snapshot of the balancer, and generates a picker // from it. The picker is -// - errPicker if the balancer is in TransientFailure, -// - built by the pickerBuilder with all READY SubConns otherwise. +// - errPicker if the balancer is in TransientFailure, +// - built by the pickerBuilder with all READY SubConns otherwise. func (b *baseBalancer) regeneratePicker() { if b.state == connectivity.TransientFailure { b.picker = NewErrPicker(b.mergeErrors()) diff --git a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go index a87b6809a..c33413581 100644 --- a/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go +++ b/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go @@ -34,10 +34,10 @@ type ConnectivityStateEvaluator struct { // RecordTransition records state change happening in subConn and based on that // it evaluates what aggregated state should be. // -// - If at least one SubConn in Ready, the aggregated state is Ready; -// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; -// - Else if at least one SubConn is Idle, the aggregated state is Idle; -// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. +// - If at least one SubConn in Ready, the aggregated state is Ready; +// - Else if at least one SubConn in Connecting, the aggregated state is Connecting; +// - Else if at least one SubConn is Idle, the aggregated state is Idle; +// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure. // // Shutdown is not considered. func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State { @@ -55,7 +55,11 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne cse.numIdle += updateVal } } + return cse.CurrentState() +} +// CurrentState returns the current aggregate conn state by evaluating the counters +func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State { // Evaluate. if cse.numReady > 0 { return connectivity.Ready diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go index c393d7ffd..bf4c3cb44 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpc_lb_v1/load_balancer.pb.go @@ -52,6 +52,7 @@ type LoadBalanceRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to LoadBalanceRequestType: + // // *LoadBalanceRequest_InitialRequest // *LoadBalanceRequest_ClientStats LoadBalanceRequestType isLoadBalanceRequest_LoadBalanceRequestType `protobuf_oneof:"load_balance_request_type"` @@ -340,6 +341,7 @@ type LoadBalanceResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to LoadBalanceResponseType: + // // *LoadBalanceResponse_InitialResponse // *LoadBalanceResponse_ServerList // *LoadBalanceResponse_FallbackResponse diff --git a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go index 6c3402e36..dd15810d0 100644 --- a/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go +++ b/vendor/google.golang.org/grpc/balancer/grpclb/grpclb.go @@ -19,7 +19,8 @@ // Package grpclb defines a grpclb balancer. // // To install grpclb balancer, import this package as: -// import _ "google.golang.org/grpc/balancer/grpclb" +// +// import _ "google.golang.org/grpc/balancer/grpclb" package grpclb import ( @@ -229,8 +230,9 @@ type lbBalancer struct { // regeneratePicker takes a snapshot of the balancer, and generates a picker from // it. The picker -// - always returns ErrTransientFailure if the balancer is in TransientFailure, -// - does two layer roundrobin pick otherwise. +// - always returns ErrTransientFailure if the balancer is in TransientFailure, +// - does two layer roundrobin pick otherwise. +// // Caller must hold lb.mu. func (lb *lbBalancer) regeneratePicker(resetDrop bool) { if lb.state == connectivity.TransientFailure { @@ -290,14 +292,14 @@ func (lb *lbBalancer) regeneratePicker(resetDrop bool) { // fallback and grpclb). lb.scState contains states for all SubConns, including // those in cache (SubConns are cached for 10 seconds after remove). // -// The aggregated state is: -// - If at least one SubConn in Ready, the aggregated state is Ready; -// - Else if at least one SubConn in Connecting or IDLE, the aggregated state is Connecting; -// - It's OK to consider IDLE as Connecting. SubConns never stay in IDLE, -// they start to connect immediately. But there's a race between the overall -// state is reported, and when the new SubConn state arrives. And SubConns -// never go back to IDLE. -// - Else the aggregated state is TransientFailure. +// The aggregated state is: +// - If at least one SubConn in Ready, the aggregated state is Ready; +// - Else if at least one SubConn in Connecting or IDLE, the aggregated state is Connecting; +// - It's OK to consider IDLE as Connecting. SubConns never stay in IDLE, +// they start to connect immediately. But there's a race between the overall +// state is reported, and when the new SubConn state arrives. And SubConns +// never go back to IDLE. +// - Else the aggregated state is TransientFailure. func (lb *lbBalancer) aggregateSubConnStates() connectivity.State { var numConnecting uint64 diff --git a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go index b1c23eaae..0359956d3 100644 --- a/vendor/google.golang.org/grpc/balancer_conn_wrappers.go +++ b/vendor/google.golang.org/grpc/balancer_conn_wrappers.go @@ -19,17 +19,20 @@ package grpc import ( + "context" "fmt" "strings" "sync" "google.golang.org/grpc/balancer" + "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/internal/balancer/gracefulswitch" "google.golang.org/grpc/internal/buffer" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/resolver" + "google.golang.org/grpc/status" ) // ccBalancerWrapper sits between the ClientConn and the Balancer. @@ -305,7 +308,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) return nil, err } - acbw := &acBalancerWrapper{ac: ac} + acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)} acbw.ac.mu.Lock() ac.acbw = acbw acbw.ac.mu.Unlock() @@ -359,8 +362,9 @@ func (ccb *ccBalancerWrapper) Target() string { // acBalancerWrapper is a wrapper on top of ac for balancers. // It implements balancer.SubConn interface. type acBalancerWrapper struct { - mu sync.Mutex - ac *addrConn + mu sync.Mutex + ac *addrConn + producers map[balancer.ProducerBuilder]*refCountedProducer } func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { @@ -414,3 +418,64 @@ func (acbw *acBalancerWrapper) getAddrConn() *addrConn { defer acbw.mu.Unlock() return acbw.ac } + +var errSubConnNotReady = status.Error(codes.Unavailable, "SubConn not currently connected") + +// NewStream begins a streaming RPC on the addrConn. If the addrConn is not +// ready, returns errSubConnNotReady. +func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + transport := acbw.ac.getReadyTransport() + if transport == nil { + return nil, errSubConnNotReady + } + return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) +} + +// Invoke performs a unary RPC. If the addrConn is not ready, returns +// errSubConnNotReady. +func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error { + cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) + if err != nil { + return err + } + if err := cs.SendMsg(args); err != nil { + return err + } + return cs.RecvMsg(reply) +} + +type refCountedProducer struct { + producer balancer.Producer + refs int // number of current refs to the producer + close func() // underlying producer's close function +} + +func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { + acbw.mu.Lock() + defer acbw.mu.Unlock() + + // Look up existing producer from this builder. + pData := acbw.producers[pb] + if pData == nil { + // Not found; create a new one and add it to the producers map. + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} + acbw.producers[pb] = pData + } + // Account for this new reference. + pData.refs++ + + // Return a cleanup function wrapped in a OnceFunc to remove this reference + // and delete the refCountedProducer from the map if the total reference + // count goes to zero. + unref := func() { + acbw.mu.Lock() + pData.refs-- + if pData.refs == 0 { + defer pData.close() // Run outside the acbw mutex + delete(acbw.producers, pb) + } + acbw.mu.Unlock() + } + return pData.producer, grpcsync.OnceFunc(unref) +} diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index ed75290cd..64a232f28 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -261,6 +261,7 @@ type GrpcLogEntry struct { // according to the type of the log entry. // // Types that are assignable to Payload: + // // *GrpcLogEntry_ClientHeader // *GrpcLogEntry_ServerHeader // *GrpcLogEntry_Message @@ -694,12 +695,12 @@ func (x *Message) GetData() []byte { // Header keys added by gRPC are omitted. To be more specific, // implementations will not log the following entries, and this is // not to be treated as a truncation: -// - entries handled by grpc that are not user visible, such as those -// that begin with 'grpc-' (with exception of grpc-trace-bin) -// or keys like 'lb-token' -// - transport specific entries, including but not limited to: -// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc -// - entries added for call credentials +// - entries handled by grpc that are not user visible, such as those +// that begin with 'grpc-' (with exception of grpc-trace-bin) +// or keys like 'lb-token' +// - transport specific entries, including but not limited to: +// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc +// - entries added for call credentials // // Implementations must always log grpc-trace-bin if it is present. // Practically speaking it will only be visible on server side because diff --git a/vendor/google.golang.org/grpc/channelz/channelz.go b/vendor/google.golang.org/grpc/channelz/channelz.go index a220c47c5..32b7fa579 100644 --- a/vendor/google.golang.org/grpc/channelz/channelz.go +++ b/vendor/google.golang.org/grpc/channelz/channelz.go @@ -23,7 +23,7 @@ // https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by // the `internal/channelz` package. // -// Experimental +// # Experimental // // Notice: All APIs in this package are experimental and may be removed in a // later release. diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 779b03bca..422639c79 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -503,7 +503,7 @@ type ClientConn struct { // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -522,7 +522,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec // GetState returns the connectivity.State of ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -534,7 +534,7 @@ func (cc *ClientConn) GetState() connectivity.State { // the channel is idle. Does not wait for the connection attempts to begin // before returning. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -761,7 +761,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric { // Target returns the target string of the ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -831,9 +831,9 @@ func equalAddresses(a, b []resolver.Address) bool { // // If ac is Ready, it checks whether current connected address of ac is in the // new addrs list. -// - If true, it updates ac.addrs and returns true. The ac will keep using -// the existing connection. -// - If false, it does nothing and returns false. +// - If true, it updates ac.addrs and returns true. The ac will keep using +// the existing connection. +// - If false, it does nothing and returns false. func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool { ac.mu.Lock() defer ac.mu.Unlock() @@ -998,7 +998,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { // However, if a previously unavailable network becomes available, this may be // used to trigger an immediate reconnect. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1228,38 +1228,33 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T // address was not successfully connected, or updates ac appropriately with the // new transport. func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error { - // TODO: Delete prefaceReceived and move the logic to wait for it into the - // transport. - prefaceReceived := grpcsync.NewEvent() - connClosed := grpcsync.NewEvent() - addr.ServerName = ac.cc.getServerName(addr) hctx, hcancel := context.WithCancel(ac.ctx) - hcStarted := false // protected by ac.mu - onClose := func() { + onClose := grpcsync.OnceFunc(func() { ac.mu.Lock() defer ac.mu.Unlock() - defer connClosed.Fire() - defer hcancel() - if !hcStarted || hctx.Err() != nil { - // We didn't start the health check or set the state to READY, so - // no need to do anything else here. - // - // OR, we have already cancelled the health check context, meaning - // we have already called onClose once for this transport. In this - // case it would be dangerous to clear the transport and update the - // state, since there may be a new transport in this addrConn. + if ac.state == connectivity.Shutdown { + // Already shut down. tearDown() already cleared the transport and + // canceled hctx via ac.ctx, and we expected this connection to be + // closed, so do nothing here. + return + } + hcancel() + if ac.transport == nil { + // We're still connecting to this address, which could error. Do + // not update the connectivity state or resolve; these will happen + // at the end of the tryAllAddrs connection loop in the event of an + // error. return } ac.transport = nil - // Refresh the name resolver + // Refresh the name resolver on any connection loss. ac.cc.resolveNow(resolver.ResolveNowOptions{}) - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - } - + // Always go idle and wait for the LB policy to initiate a new + // connection attempt. + ac.updateConnectivityState(connectivity.Idle, nil) + }) onGoAway := func(r transport.GoAwayReason) { ac.mu.Lock() ac.adjustParams(r) @@ -1271,7 +1266,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose) if err != nil { // newTr is either nil, or closed. hcancel() @@ -1279,60 +1274,34 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne return err } - select { - case <-connectCtx.Done(): - // We didn't get the preface in time. + ac.mu.Lock() + defer ac.mu.Unlock() + if ac.state == connectivity.Shutdown { + // This can happen if the subConn was removed while in `Connecting` + // state. tearDown() would have set the state to `Shutdown`, but + // would not have closed the transport since ac.transport would not + // have been set at that point. + // + // We run this in a goroutine because newTr.Close() calls onClose() + // inline, which requires locking ac.mu. + // // The error we pass to Close() is immaterial since there are no open // streams at this point, so no trailers with error details will be sent // out. We just need to pass a non-nil error. - newTr.Close(transport.ErrConnClosing) - if connectCtx.Err() == context.DeadlineExceeded { - err := errors.New("failed to receive server preface within timeout") - channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err) - return err - } + go newTr.Close(transport.ErrConnClosing) return nil - case <-prefaceReceived.Done(): - // We got the preface - huzzah! things are good. - ac.mu.Lock() - defer ac.mu.Unlock() - if connClosed.HasFired() { - // onClose called first; go idle but do nothing else. - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - return nil - } - if ac.state == connectivity.Shutdown { - // This can happen if the subConn was removed while in `Connecting` - // state. tearDown() would have set the state to `Shutdown`, but - // would not have closed the transport since ac.transport would not - // been set at that point. - // - // We run this in a goroutine because newTr.Close() calls onClose() - // inline, which requires locking ac.mu. - // - // The error we pass to Close() is immaterial since there are no open - // streams at this point, so no trailers with error details will be sent - // out. We just need to pass a non-nil error. - go newTr.Close(transport.ErrConnClosing) - return nil - } - ac.curAddr = addr - ac.transport = newTr - hcStarted = true - ac.startHealthCheck(hctx) // Will set state to READY if appropriate. - return nil - case <-connClosed.Done(): - // The transport has already closed. If we received the preface, too, - // this is not an error. - select { - case <-prefaceReceived.Done(): - return nil - default: - return errors.New("connection closed before server preface received") - } } + if hctx.Err() != nil { + // onClose was already called for this connection, but the connection + // was successfully established first. Consider it a success and set + // the new state to Idle. + ac.updateConnectivityState(connectivity.Idle, nil) + return nil + } + ac.curAddr = addr + ac.transport = newTr + ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + return nil } // startHealthCheck starts the health checking stream (RPC) to watch the health @@ -1583,7 +1552,7 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err) } else { channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb != nil { cc.parsedTarget = parsedTarget return rb, nil @@ -1604,9 +1573,9 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { return nil, err } channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb == nil { - return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme) + return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme) } cc.parsedTarget = parsedTarget return rb, nil diff --git a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go index 40570e9bf..383c5fb97 100644 --- a/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go +++ b/vendor/google.golang.org/grpc/credentials/alts/internal/proto/grpc_gcp/handshaker.pb.go @@ -216,6 +216,7 @@ type Identity struct { unknownFields protoimpl.UnknownFields // Types that are assignable to IdentityOneof: + // // *Identity_ServiceAccount // *Identity_Hostname IdentityOneof isIdentity_IdentityOneof `protobuf_oneof:"identity_oneof"` @@ -664,6 +665,7 @@ type HandshakerReq struct { unknownFields protoimpl.UnknownFields // Types that are assignable to ReqOneof: + // // *HandshakerReq_ClientStart // *HandshakerReq_ServerStart // *HandshakerReq_Next diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 96ff1877e..5feac3aa0 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -36,16 +36,16 @@ import ( // PerRPCCredentials defines the common interface for the credentials which need to // attach security information to every RPC (e.g., oauth2). type PerRPCCredentials interface { - // GetRequestMetadata gets the current request metadata, refreshing - // tokens if required. This should be called by the transport layer on - // each request, and the data should be populated in headers or other - // context. If a status code is returned, it will be used as the status - // for the RPC. uri is the URI of the entry point for the request. - // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. Additionally, RequestInfo data will be - // available via ctx to this call. - // TODO(zhaoq): Define the set of the qualified keys instead of leaving - // it as an arbitrary string. + // GetRequestMetadata gets the current request metadata, refreshing tokens + // if required. This should be called by the transport layer on each + // request, and the data should be populated in headers or other + // context. If a status code is returned, it will be used as the status for + // the RPC (restricted to an allowable set of codes as defined by gRFC + // A54). uri is the URI of the entry point for the request. When supported + // by the underlying implementation, ctx can be used for timeout and + // cancellation. Additionally, RequestInfo data will be available via ctx + // to this call. TODO(zhaoq): Define the set of the qualified keys instead + // of leaving it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) // RequireTransportSecurity indicates whether the credentials requires // transport security. diff --git a/vendor/google.golang.org/grpc/credentials/google/xds.go b/vendor/google.golang.org/grpc/credentials/google/xds.go index e32edc042..2c5c8b9ee 100644 --- a/vendor/google.golang.org/grpc/credentials/google/xds.go +++ b/vendor/google.golang.org/grpc/credentials/google/xds.go @@ -40,6 +40,7 @@ const cfeClusterAuthorityName = "traffic-director-c2p.xds.googleapis.com" // "xdstp://traffic-director-c2p.xds.googleapis.com/envoy.config.cluster.v3.Cluster/google_cfe_", // use TLS // - otherwise, use ALTS +// // - else, do TLS // // On the server, ServerHandshake always does TLS. diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 784822d05..ce2bbc10a 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error // TLSChannelzSecurityValue defines the struct that TLS protocol should return // from GetSecurityValue(), containing security info like cipher and certificate used. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 18e530fc9..711763d54 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -19,7 +19,7 @@ // Package encoding defines the interface for the compressor and codec, and // functions to register and retrieve compressors and codecs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. @@ -28,6 +28,8 @@ package encoding import ( "io" "strings" + + "google.golang.org/grpc/internal/grpcutil" ) // Identity specifies the optional encoding for uncompressed streams. @@ -73,6 +75,7 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index 7c1f66409..b5560b47e 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -242,7 +242,7 @@ func (g *loggerT) V(l int) bool { // DepthLoggerV2, the below functions will be called with the appropriate stack // depth set for trivial functions the logger may ignore. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index c5579e650..f9e80e27a 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -30,15 +30,15 @@ import ( // to build a new logger and assign it to binarylog.Logger. // // Example filter config strings: -// - "" Nothing will be logged -// - "*" All headers and messages will be fully logged. -// - "*{h}" Only headers will be logged. -// - "*{m:256}" Only the first 256 bytes of each message will be logged. -// - "Foo/*" Logs every method in service Foo -// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar -// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method -// /Foo/Bar, logs all headers and messages in every other method in service -// Foo. +// - "" Nothing will be logged +// - "*" All headers and messages will be fully logged. +// - "*{h}" Only headers will be logged. +// - "*{m:256}" Only the first 256 bytes of each message will be logged. +// - "Foo/*" Logs every method in service Foo +// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar +// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method +// /Foo/Bar, logs all headers and messages in every other method in service +// Foo. // // If two configs exist for one certain method or service, the one specified // later overrides the previous config. diff --git a/vendor/google.golang.org/grpc/internal/channelz/types.go b/vendor/google.golang.org/grpc/internal/channelz/types.go index ad0ce4dab..7b2f350e2 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types.go +++ b/vendor/google.golang.org/grpc/internal/channelz/types.go @@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the channel itself from the channelz database. // The delete process includes two steps: -// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its -// parent's child list. -// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id -// will return entry not found error. +// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its +// parent's child list. +// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id +// will return entry not found error. func (c *channel) deleteSelfIfReady() { if !c.deleteSelfFromTree() { return @@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the subchannel itself from the channelz database. // The delete process includes two steps: -// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from -// its parent's child list. -// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup -// by id will return entry not found error. +// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from +// its parent's child list. +// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup +// by id will return entry not found error. func (sc *subChannel) deleteSelfIfReady() { if !sc.deleteSelfFromTree() { return diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 6f0272543..7edd196bd 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -25,11 +25,15 @@ import ( ) const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + prefix = "GRPC_GO_" + txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" + advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS" ) var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + // AdvertiseCompressors is set if registered compressor should be advertised + // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). + AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false") ) diff --git a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go index 30a3b4258..b68e26a36 100644 --- a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go @@ -110,7 +110,7 @@ type LoggerV2 interface { // This is a copy of the DepthLoggerV2 defined in the external grpclog package. // It is defined here to avoid a circular dependency. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go new file mode 100644 index 000000000..6635f7bca --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go @@ -0,0 +1,32 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcsync + +import ( + "sync" +) + +// OnceFunc returns a function wrapping f which ensures f is only executed +// once even if the returned function is executed multiple times. +func OnceFunc(f func()) func() { + var once sync.Once + return func() { + once.Do(f) + } +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go new file mode 100644 index 000000000..9f4090967 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go @@ -0,0 +1,47 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcutil + +import ( + "strings" + + "google.golang.org/grpc/internal/envconfig" +) + +// RegisteredCompressorNames holds names of the registered compressors. +var RegisteredCompressorNames []string + +// IsCompressorNameRegistered returns true when name is available in registry. +func IsCompressorNameRegistered(name string) bool { + for _, compressor := range RegisteredCompressorNames { + if compressor == name { + return true + } + } + return false +} + +// RegisteredCompressors returns a string of registered compressor names +// separated by comma. +func RegisteredCompressors() string { + if !envconfig.AdvertiseCompressors { + return "" + } + return strings.Join(RegisteredCompressorNames, ",") +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/vendor/google.golang.org/grpc/internal/grpcutil/method.go index e9c4af648..ec62b4775 100644 --- a/vendor/google.golang.org/grpc/internal/grpcutil/method.go +++ b/vendor/google.golang.org/grpc/internal/grpcutil/method.go @@ -25,7 +25,6 @@ import ( // ParseMethod splits service and method from the input. It expects format // "/service/method". -// func ParseMethod(methodName string) (service, method string, _ error) { if !strings.HasPrefix(methodName, "/") { return "", "", errors.New("invalid method name: should start with /") diff --git a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go index badbdbf59..51e733e49 100644 --- a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go @@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) { // ServiceConfig contains a list of loadBalancingConfigs, each with a name and // config. This method iterates through that list in order, and stops at the // first policy that is supported. -// - If the config for the first supported policy is invalid, the whole service -// config is invalid. -// - If the list doesn't contain any supported policy, the whole service config -// is invalid. +// - If the config for the first supported policy is invalid, the whole service +// config is invalid. +// - If the list doesn't contain any supported policy, the whole service config +// is invalid. func (bc *BalancerConfig) UnmarshalJSON(b []byte) error { var ir intermediateBalancerConfig err := json.Unmarshal(b, &ir) diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index e5c6513ed..b0ead4f54 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool { } return proto.Equal(e.s.s, tse.s.s) } + +// IsRestrictedControlPlaneCode returns whether the status includes a code +// restricted for control plane usage as defined by gRFC A54. +func IsRestrictedControlPlaneCode(s *Status) bool { + switch s.Code() { + case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss: + return true + } + return false +} diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 090120925..fb272235d 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -442,10 +442,10 @@ func (ht *serverHandlerTransport) Drain() { // mapRecvMsgError returns the non-nil err into the appropriate // error value as expected by callers of *grpc.parser.recvMsg. // In particular, in can only be: -// * io.EOF -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package func mapRecvMsgError(err error) error { if err == io.EOF || err == io.ErrUnexpectedEOF { return err diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 5c2f35b24..d518b07e1 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -38,8 +38,10 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" @@ -99,16 +101,13 @@ type http2Client struct { maxSendHeaderListSize *uint32 bdpEst *bdpEstimator - // onPrefaceReceipt is a callback that client transport calls upon - // receiving server preface to signal that a succefull HTTP2 - // connection was established. - onPrefaceReceipt func() maxConcurrentStreams uint32 streamQuota int64 streamsQuotaAvailable chan struct{} waitingStreams uint32 nextID uint32 + registeredCompressors string // Do not access controlBuf with mu held. mu sync.Mutex // guard the following variables @@ -194,7 +193,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -216,12 +215,35 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) } + // Any further errors will close the underlying connection defer func(conn net.Conn) { if err != nil { conn.Close() } }(conn) + + // The following defer and goroutine monitor the connectCtx for cancelation + // and deadline. On context expiration, the connection is hard closed and + // this function will naturally fail as a result. Otherwise, the defer + // waits for the goroutine to exit to prevent the context from being + // monitored (and to prevent the connection from ever being closed) after + // returning from this function. + ctxMonitorDone := grpcsync.NewEvent() + newClientCtx, newClientDone := context.WithCancel(connectCtx) + defer func() { + newClientDone() // Awaken the goroutine below if connectCtx hasn't expired. + <-ctxMonitorDone.Done() // Wait for the goroutine below to exit. + }() + go func(conn net.Conn) { + defer ctxMonitorDone.Fire() // Signal this goroutine has exited. + <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes. + if connectCtx.Err() != nil { + // connectCtx expired before exiting the function. Hard close the connection. + conn.Close() + } + }(conn) + kp := opts.KeepaliveParams // Validate keepalive parameters. if kp.Time == 0 { @@ -253,15 +275,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } } if transportCreds != nil { - rawConn := conn - // Pull the deadline from the connectCtx, which will be used for - // timeouts in the authentication protocol handshake. Can ignore the - // boolean as the deadline will return the zero value, which will make - // the conn not timeout on I/O operations. - deadline, _ := connectCtx.Deadline() - rawConn.SetDeadline(deadline) - conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn) - rawConn.SetDeadline(time.Time{}) + conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn) if err != nil { return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err) } @@ -299,6 +313,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ctxDone: ctx.Done(), // Cache Done chan. cancel: cancel, userAgent: opts.UserAgent, + registeredCompressors: grpcutil.RegisteredCompressors(), conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -315,16 +330,15 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts kp: kp, statsHandlers: opts.StatsHandlers, initialWindowSize: initialWindowSize, - onPrefaceReceipt: onPrefaceReceipt, nextID: 1, maxConcurrentStreams: defaultMaxStreamsClient, streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), onGoAway: onGoAway, - onClose: onClose, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), + onClose: onClose, } // Add peer information to the http2client context. t.ctx = peer.NewContext(t.ctx, t.getPeer()) @@ -363,21 +377,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } - // Start the reader goroutine for incoming message. Each transport has - // a dedicated goroutine which reads HTTP2 frame from network. Then it - // dispatches the frame to the corresponding stream entity. - go t.reader() + + // Start the reader goroutine for incoming messages. Each transport has a + // dedicated goroutine which reads HTTP2 frames from the network. Then it + // dispatches the frame to the corresponding stream entity. When the + // server preface is received, readerErrCh is closed. If an error occurs + // first, an error is pushed to the channel. This must be checked before + // returning from this function. + readerErrCh := make(chan error, 1) + go t.reader(readerErrCh) + defer func() { + if err == nil { + err = <-readerErrCh + } + if err != nil { + t.Close(err) + } + }() // Send connection preface to server. n, err := t.conn.Write(clientPreface) if err != nil { err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err) - t.Close(err) return nil, err } if n != len(clientPreface) { err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface)) - t.Close(err) return nil, err } var ss []http2.Setting @@ -397,14 +422,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts err = t.framer.fr.WriteSettings(ss...) if err != nil { err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err) - t.Close(err) return nil, err } // Adjust the connection flow control window if needed. if delta := uint32(icwz - defaultWindowSize); delta > 0 { if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil { err = connectionErrorf(true, err, "transport: failed to write window update: %v", err) - t.Close(err) return nil, err } } @@ -507,9 +530,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)}) } + registeredCompressors := t.registeredCompressors if callHdr.SendCompress != "" { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) - headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress}) + // Include the outgoing compressor name when compressor is not registered + // via encoding.RegisterCompressor. This is possible when client uses + // WithCompressor dial option. + if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) { + if registeredCompressors != "" { + registeredCompressors += "," + } + registeredCompressors += callHdr.SendCompress + } + } + + if registeredCompressors != "" { + headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors}) } if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. @@ -589,7 +625,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s for _, c := range t.perRPCCreds { data, err := c.GetRequestMetadata(ctx, audience) if err != nil { - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } return nil, err } @@ -618,7 +658,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call } data, err := callCreds.GetRequestMetadata(ctx, audience) if err != nil { - return nil, status.Errorf(codes.Internal, "transport: %v", err) + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } + return nil, err + } + return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err) } callAuthData = make(map[string]string, len(data)) for k, v := range data { @@ -634,13 +681,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call // NewStream errors result in transparent retry, as they mean nothing went onto // the wire. However, there are two notable exceptions: // -// 1. If the stream headers violate the max header list size allowed by the -// server. It's possible this could succeed on another transport, even if -// it's unlikely, but do not transparently retry. -// 2. If the credentials errored when requesting their headers. In this case, -// it's possible a retry can fix the problem, but indefinitely transparently -// retrying is not appropriate as it is likely the credentials, if they can -// eventually succeed, would need I/O to do so. +// 1. If the stream headers violate the max header list size allowed by the +// server. It's possible this could succeed on another transport, even if +// it's unlikely, but do not transparently retry. +// 2. If the credentials errored when requesting their headers. In this case, +// it's possible a retry can fix the problem, but indefinitely transparently +// retrying is not appropriate as it is likely the credentials, if they can +// eventually succeed, would need I/O to do so. type NewStreamError struct { Err error @@ -880,19 +927,15 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // Close kicks off the shutdown process of the transport. This should be called // only once on a transport. Once it is called, the transport should not be // accessed any more. -// -// This method blocks until the addrConn that initiated this transport is -// re-connected. This happens because t.onClose() begins reconnect logic at the -// addrConn level and blocks until the addrConn is successfully connected. func (t *http2Client) Close(err error) { t.mu.Lock() - // Make sure we only Close once. + // Make sure we only close once. if t.state == closing { t.mu.Unlock() return } - // Call t.onClose before setting the state to closing to prevent the client - // from attempting to create new streams ASAP. + // Call t.onClose ASAP to prevent the client from attempting to create new + // streams. t.onClose() t.state = closing streams := t.activeStreams @@ -1482,33 +1525,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true) } -// reader runs as a separate goroutine in charge of reading data from network -// connection. -// -// TODO(zhaoq): currently one reader per transport. Investigate whether this is -// optimal. -// TODO(zhaoq): Check the validity of the incoming frame sequence. -func (t *http2Client) reader() { - defer close(t.readerDone) - // Check the validity of server preface. +// readServerPreface reads and handles the initial settings frame from the +// server. +func (t *http2Client) readServerPreface() error { frame, err := t.framer.fr.ReadFrame() if err != nil { - err = connectionErrorf(true, err, "error reading server preface: %v", err) - t.Close(err) // this kicks off resetTransport, so must be last before return - return - } - t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) - if t.keepaliveEnabled { - atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + return connectionErrorf(true, err, "error reading server preface: %v", err) } sf, ok := frame.(*http2.SettingsFrame) if !ok { - // this kicks off resetTransport, so must be last before return - t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)) + return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame) + } + t.handleSettings(sf, true) + return nil +} + +// reader verifies the server preface and reads all subsequent data from +// network connection. If the server preface is not read successfully, an +// error is pushed to errCh; otherwise errCh is closed with no error. +func (t *http2Client) reader(errCh chan<- error) { + defer close(t.readerDone) + + if err := t.readServerPreface(); err != nil { + errCh <- err return } - t.onPrefaceReceipt() - t.handleSettings(sf, true) + close(errCh) + if t.keepaliveEnabled { + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + } // loop to keep reading incoming messages on this transport. for { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 6c3ba8515..2e615ee20 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -43,6 +43,10 @@ import ( "google.golang.org/grpc/tap" ) +// ErrNoHeaders is used as a signal that a trailers only response was received, +// and is not a real error. +var ErrNoHeaders = errors.New("stream has no headers") + const logLevel = 2 type bufferPool struct { @@ -366,9 +370,15 @@ func (s *Stream) Header() (metadata.MD, error) { return s.header.Copy(), nil } s.waitOnHeader() + if !s.headerValid { return nil, s.status.Err() } + + if s.noHeaders { + return nil, ErrNoHeaders + } + return s.header.Copy(), nil } @@ -573,8 +583,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose) } // Options provides additional hints and information for message diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go index 98d62e067..fb4a88f59 100644 --- a/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -41,10 +41,11 @@ type MD map[string][]string // New creates an MD from a given key-value map. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -62,10 +63,11 @@ func New(m map[string]string) MD { // Pairs panics if len(kv) is odd. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -196,7 +198,7 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { // ValueFromIncomingContext returns the metadata value corresponding to the metadata // key from the incoming metadata if it exists. Key must be lower-case. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 843633c91..a5d5516ee 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" "google.golang.org/grpc/internal/channelz" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/status" ) @@ -129,8 +130,12 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. if err == balancer.ErrNoSubConnAvailable { continue } - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { // Status error: end the RPC unconditionally with this status. + // First restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) + } return nil, nil, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other diff --git a/vendor/google.golang.org/grpc/preloader.go b/vendor/google.golang.org/grpc/preloader.go index 0a1e975ad..cd4554785 100644 --- a/vendor/google.golang.org/grpc/preloader.go +++ b/vendor/google.golang.org/grpc/preloader.go @@ -25,7 +25,7 @@ import ( // PreparedMsg is responsible for creating a Marshalled and Compressed object. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index ca2e35a35..967cbc737 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -96,7 +96,7 @@ const ( // Address represents a server the client connects to. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -236,12 +236,12 @@ type ClientConn interface { // // Examples: // -// - "dns://some_authority/foo.bar" -// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} -// - "foo.bar" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} -// - "unknown_scheme://authority/endpoint" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} +// - "dns://some_authority/foo.bar" +// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} +// - "foo.bar" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} +// - "unknown_scheme://authority/endpoint" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} type Target struct { // Deprecated: use URL.Scheme instead. Scheme string diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 5d407b004..934fc1aa0 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption { // HeaderCallOption is a CallOption for collecting response header metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption { // TrailerCallOption is a CallOption for collecting response trailer metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption { // PeerCallOption is a CallOption for collecting the identity of the remote // peer. The peer field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption { // FailFastCallOption is a CallOption for indicating whether an RPC should fail // fast or not. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -305,7 +305,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption { // MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can receive. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -328,7 +328,7 @@ func MaxCallSendMsgSize(bytes int) CallOption { // MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can send. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -351,7 +351,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption { // PerRPCCredsCallOption is a CallOption that indicates the per-RPC // credentials to use for the call. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -369,7 +369,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} // sending the request. If WithCompressor is also set, UseCompressor has // higher priority. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -379,7 +379,7 @@ func UseCompressor(name string) CallOption { // CompressorCallOption is a CallOption that indicates the compressor to use. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -416,7 +416,7 @@ func CallContentSubtype(contentSubtype string) CallOption { // ContentSubtypeCallOption is a CallOption that indicates the content-subtype // used for marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -444,7 +444,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} // This function is provided for advanced users; prefer to use only // CallContentSubtype to select a registered codec instead. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -455,7 +455,7 @@ func ForceCodec(codec encoding.Codec) CallOption { // ForceCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -480,7 +480,7 @@ func CallCustomCodec(codec Codec) CallOption { // CustomCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -497,7 +497,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -508,7 +508,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption { // MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of // memory to be used for caching this RPC for retry purposes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -548,10 +548,11 @@ type parser struct { // format. The caller owns the returned msg memory. // // If there is an error, possible values are: -// * io.EOF, when no messages remain -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF, when no messages remain +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package +// // No other error values or types must be returned, which also means // that the underlying io.Reader must not return an incompatible // error. diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 73a2f9266..35e7a20a0 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -19,7 +19,7 @@ // Package serviceconfig defines types and methods for operating on gRPC // service configs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go index 6d163b6e3..623be39f2 100644 --- a/vendor/google.golang.org/grpc/status/status.go +++ b/vendor/google.golang.org/grpc/status/status.go @@ -76,14 +76,14 @@ func FromProto(s *spb.Status) *Status { // FromError returns a Status representation of err. // -// - If err was produced by this package or implements the method `GRPCStatus() -// *Status`, the appropriate Status is returned. +// - If err was produced by this package or implements the method `GRPCStatus() +// *Status`, the appropriate Status is returned. // -// - If err is nil, a Status is returned with codes.OK and no message. +// - If err is nil, a Status is returned with codes.OK and no message. // -// - Otherwise, err is an error not compatible with this package. In this -// case, a Status is returned with codes.Unknown and err's Error() message, -// and ok is false. +// - Otherwise, err is an error not compatible with this package. In this +// case, a Status is returned with codes.Unknown and err's Error() message, +// and ok is false. func FromError(err error) (s *Status, ok bool) { if err == nil { return nil, true diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 0c16cfb2e..960c3e33d 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -39,6 +39,7 @@ import ( imetadata "google.golang.org/grpc/internal/metadata" iresolver "google.golang.org/grpc/internal/resolver" "google.golang.org/grpc/internal/serviceconfig" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -195,6 +196,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method} rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo) if err != nil { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err) + } + return nil, err + } return nil, toRPCErr(err) } @@ -744,17 +752,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) func (cs *clientStream) Header() (metadata.MD, error) { var m metadata.MD + noHeader := false err := cs.withRetry(func(a *csAttempt) error { var err error m, err = a.s.Header() + if err == transport.ErrNoHeaders { + noHeader = true + return nil + } return toRPCErr(err) }, cs.commitAttemptLocked) + if err != nil { cs.finish(err) return nil, err } - if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged { - // Only log if binary log is on and header has not been logged. + + if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader { + // Only log if binary log is on and header has not been logged, and + // there is actually headers to log. logEntry := &binarylog.ServerHeader{ OnClientSide: true, Header: m, diff --git a/vendor/google.golang.org/grpc/tap/tap.go b/vendor/google.golang.org/grpc/tap/tap.go index dbf34e6bb..bfa5dfa40 100644 --- a/vendor/google.golang.org/grpc/tap/tap.go +++ b/vendor/google.golang.org/grpc/tap/tap.go @@ -19,7 +19,7 @@ // Package tap defines the function handles which are executed on the transport // layer of gRPC-Go and related information. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index d472ca643..2198e7098 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.50.1" +const Version = "1.51.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index c3fc8253b..bd8e0cdb3 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -67,7 +67,9 @@ elif [[ "$#" -ne 0 ]]; then fi # - Ensure all source files contain a copyright message. -not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go' +# (Done in two parts because Darwin "git grep" has broken support for compound +# exclusion matches.) +(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. not grep 'func Test[^(]' *_test.go @@ -81,7 +83,7 @@ not git grep -l 'x/net/context' -- "*.go" git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' # - Do not call grpclog directly. Use grpclog.Component instead. -git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' +git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' # - Ensure all ptypes proto packages are renamed when importing. not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" diff --git a/vendor/modules.txt b/vendor/modules.txt index 636d82684..06960f2aa 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# cloud.google.com/go v0.106.0 +# cloud.google.com/go v0.107.0 ## explicit; go 1.19 cloud.google.com/go/internal cloud.google.com/go/internal/optional @@ -69,7 +69,7 @@ github.com/VictoriaMetrics/fasthttp/stackless # github.com/VictoriaMetrics/metrics v1.23.0 ## explicit; go 1.15 github.com/VictoriaMetrics/metrics -# github.com/VictoriaMetrics/metricsql v0.47.0 +# github.com/VictoriaMetrics/metricsql v0.49.0 ## explicit; go 1.13 github.com/VictoriaMetrics/metricsql github.com/VictoriaMetrics/metricsql/binaryop @@ -102,10 +102,10 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/config v1.17.10 +# github.com/aws/aws-sdk-go-v2/config v1.18.3 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.12.23 +# github.com/aws/aws-sdk-go-v2/credentials v1.13.3 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -118,7 +118,7 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.37 +# github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.42 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/feature/s3/manager # github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25 @@ -149,7 +149,7 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/s3 v1.29.1 +# github.com/aws/aws-sdk-go-v2/service/s3 v1.29.4 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/s3 github.com/aws/aws-sdk-go-v2/service/s3/internal/arn @@ -166,7 +166,7 @@ github.com/aws/aws-sdk-go-v2/service/sso/types github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.17.1 +# github.com/aws/aws-sdk-go-v2/service/sts v1.17.5 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints @@ -327,7 +327,7 @@ github.com/prometheus/prometheus/tsdb/record github.com/prometheus/prometheus/tsdb/tombstones github.com/prometheus/prometheus/tsdb/tsdbutil github.com/prometheus/prometheus/tsdb/wal -# github.com/rivo/uniseg v0.4.2 +# github.com/rivo/uniseg v0.4.3 ## explicit; go 1.18 github.com/rivo/uniseg # github.com/russross/blackfriday/v2 v2.1.0 @@ -458,8 +458,9 @@ google.golang.org/appengine/internal/socket google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/socket google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 +# google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 ## explicit; go 1.19 +google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/iam/v1 google.golang.org/genproto/googleapis/rpc/code @@ -468,7 +469,7 @@ google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/protobuf/field_mask -# google.golang.org/grpc v1.50.1 +# google.golang.org/grpc v1.51.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes