Skip to content

Commit 1d5dfd0

Browse files
introduce victorialogs plugin
Signed-off-by: Andrii Chubatiuk <[email protected]>
1 parent ce85f47 commit 1d5dfd0

File tree

92 files changed

+3792
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3792
-3
lines changed

package-lock.json

Lines changed: 33 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"timeserieschart",
3333
"timeseriestable",
3434
"tracetable",
35-
"tracingganttchart"
35+
"tracingganttchart",
36+
"victorialogs"
3637
],
3738
"peerDependencies": {
3839
"@types/react-dom": "^18.3.0",
@@ -79,4 +80,4 @@
7980
"typescript": "^5.4.2"
8081
},
8182
"packageManager": "[email protected]"
82-
}
83+
}

victorialogs/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Plugin Module: victorialogs
2+
3+
### How to install
4+
5+
This plugin requires react and react-dom 18
6+
7+
Install peer dependencies:
8+
9+
```bash
10+
npm install react@18 react-dom@18
11+
```
12+
13+
Install the plugin:
14+
15+
```bash
16+
npm install @perses-dev/victorialogs
17+
```
18+
19+
## Development
20+
21+
### Setup
22+
23+
Install dependencies:
24+
25+
```bash
26+
npm install
27+
```
28+
29+
### Get Started
30+
31+
Start the dev server:
32+
33+
```bash
34+
npm run dev
35+
```
36+
37+
Build the plugin for distribution:
38+
39+
```bash
40+
npm run build
41+
```

victorialogs/cue.mod/module.cue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module: "github.com/perses/plugins/victorialogs@v0"
2+
language: {
3+
version: "v0.14.0"
4+
}
5+
source: {
6+
kind: "git"
7+
}
8+
deps: {
9+
"github.com/perses/perses/cue@v0": {
10+
v: "v0.52.0"
11+
default: true
12+
}
13+
}

victorialogs/go.mod

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module github.com/perses/plugins/victorialogs
2+
3+
go 1.25.0
4+
5+
require github.com/perses/perses v0.52.0
6+
7+
require (
8+
github.com/beorn7/perks v1.0.1 // indirect
9+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
10+
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
11+
github.com/jpillora/backoff v1.0.0 // indirect
12+
github.com/kr/text v0.2.0 // indirect
13+
github.com/muhlemmer/gu v0.3.1 // indirect
14+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
15+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
16+
github.com/prometheus/client_golang v1.23.2 // indirect
17+
github.com/prometheus/client_model v0.6.2 // indirect
18+
github.com/prometheus/common v0.66.1 // indirect
19+
github.com/prometheus/procfs v0.16.1 // indirect
20+
github.com/zitadel/oidc/v3 v3.44.0 // indirect
21+
github.com/zitadel/schema v1.3.1 // indirect
22+
go.yaml.in/yaml/v2 v2.4.2 // indirect
23+
golang.org/x/crypto v0.42.0 // indirect
24+
golang.org/x/net v0.43.0 // indirect
25+
golang.org/x/oauth2 v0.31.0 // indirect
26+
golang.org/x/sys v0.36.0 // indirect
27+
golang.org/x/text v0.29.0 // indirect
28+
google.golang.org/protobuf v1.36.8 // indirect
29+
gopkg.in/yaml.v3 v3.0.1 // indirect
30+
)

victorialogs/go.sum

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
2+
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
3+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
4+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
5+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
6+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
7+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8+
github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI=
9+
github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo=
10+
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
11+
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
12+
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
13+
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
14+
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
15+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
16+
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
17+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
18+
github.com/muhlemmer/gu v0.3.1 h1:7EAqmFrW7n3hETvuAdmFmn4hS8W+z3LgKtrnow+YzNM=
19+
github.com/muhlemmer/gu v0.3.1/go.mod h1:YHtHR+gxM+bKEIIs7Hmi9sPT3ZDUvTN/i88wQpZkrdM=
20+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
21+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
22+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
23+
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
24+
github.com/nexucis/lamenv v0.5.2 h1:tK/u3XGhCq9qIoVNcXsK9LZb8fKopm0A5weqSRvHd7M=
25+
github.com/nexucis/lamenv v0.5.2/go.mod h1:HusJm6ltmmT7FMG8A750mOLuME6SHCsr2iFYxp5fFi0=
26+
github.com/perses/perses v0.52.0 h1:pives1Ky15uGxBPqiggHabmnxH3S849Vse7qYGOgcig=
27+
github.com/perses/perses v0.52.0/go.mod h1:SFr0K7VyDh9U1nV0QxWMRt9z3h5S86Ypq/TFY18G4gw=
28+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
29+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
30+
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
31+
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
32+
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
33+
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
34+
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
35+
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
36+
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
37+
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
38+
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
39+
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
40+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
41+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
42+
github.com/zitadel/oidc/v3 v3.44.0 h1:wxpZm/VNQrWHGSB4Ld1rMcjpZvExHz+ikbNhzKyJOck=
43+
github.com/zitadel/oidc/v3 v3.44.0/go.mod h1:5ki8s9CWoB4iGmtULndiVxwM8xt7IylZIaudro7jEq4=
44+
github.com/zitadel/schema v1.3.1 h1:QT3kwiRIRXXLVAs6gCK/u044WmUVh6IlbLXUsn6yRQU=
45+
github.com/zitadel/schema v1.3.1/go.mod h1:071u7D2LQacy1HAN+YnMd/mx1qVE2isb0Mjeqg46xnU=
46+
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
47+
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
48+
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
49+
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
50+
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
51+
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
52+
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
53+
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
54+
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
55+
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
56+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
57+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
58+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
59+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
60+
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
61+
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
62+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
63+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
64+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
65+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
66+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

victorialogs/jest.config.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2025 The Perses Authors
2+
// Licensed under the Apache License, Version 2.0 (the "License");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
//
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
import type { Config } from '@jest/types';
15+
import shared from '../jest.shared';
16+
17+
const jestConfig: Config.InitialOptions = {
18+
...shared,
19+
20+
setupFilesAfterEnv: [...(shared.setupFilesAfterEnv ?? []), '<rootDir>/src/setup-tests.ts'],
21+
};
22+
23+
export default jestConfig;

victorialogs/package.json

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"name": "@perses-dev/victorialogs-plugin",
3+
"version": "0.1.0",
4+
"scripts": {
5+
"dev": "rsbuild dev",
6+
"build": "npm run build-mf && concurrently \"npm:build:*\"",
7+
"build-mf": "rsbuild build",
8+
"build:cjs": "swc ./src -d dist/lib/cjs --strip-leading-paths --config-file ../.cjs.swcrc",
9+
"build:esm": "swc ./src -d dist/lib --strip-leading-paths --config-file ../.swcrc",
10+
"build:types": "tsc --project tsconfig.build.json",
11+
"test": "cross-env LC_ALL=C TZ=UTC jest",
12+
"type-check": "tsc --noEmit"
13+
},
14+
"main": "lib/cjs/index.js",
15+
"module": "lib/index.js",
16+
"types": "lib/index.d.ts",
17+
"dependencies": {
18+
"@grafana/lezer-logql": "^0.2.8"
19+
},
20+
"peerDependencies": {
21+
"@emotion/react": "^11.7.1",
22+
"@emotion/styled": "^11.6.0",
23+
"@hookform/resolvers": "^3.2.0",
24+
"@perses-dev/components": "^0.52.0",
25+
"@perses-dev/core": "^0.52.0",
26+
"@perses-dev/dashboards": "^0.52.0",
27+
"@perses-dev/explore": "^0.52.0",
28+
"@perses-dev/plugin-system": "^0.52.0",
29+
"@tanstack/react-query": "^4.39.1",
30+
"date-fns": "^4.1.0",
31+
"date-fns-tz": "^3.2.0",
32+
"echarts": "5.5.0",
33+
"immer": "^10.1.1",
34+
"lodash": "^4.17.21",
35+
"react": "^17.0.2 || ^18.0.0",
36+
"react-dom": "^17.0.2 || ^18.0.0",
37+
"react-hook-form": "^7.52.2",
38+
"use-resize-observer": "^9.0.0"
39+
},
40+
"files": [
41+
"lib/**/*",
42+
"__mf/**/*",
43+
"mf-manifest.json",
44+
"mf-stats.json"
45+
],
46+
"perses": {
47+
"moduleName": "VictoriaLogs",
48+
"schemasPath": "schemas",
49+
"plugins": [
50+
{
51+
"kind": "Datasource",
52+
"spec": {
53+
"display": {
54+
"name": "VictoriaLogs Datasource"
55+
},
56+
"name": "VictoriaLogsDatasource"
57+
}
58+
},
59+
{
60+
"kind": "TimeSeriesQuery",
61+
"spec": {
62+
"display": {
63+
"name": "VictoriaLogs Time Series Query"
64+
},
65+
"name": "VictoriaLogsTimeSeriesQuery"
66+
}
67+
},
68+
{
69+
"kind": "LogQuery",
70+
"spec": {
71+
"display": {
72+
"name": "VictoriaLogs Log Query"
73+
},
74+
"name": "VictoriaLogsLogQuery"
75+
}
76+
},
77+
{
78+
"kind": "Panel",
79+
"spec": {
80+
"display": {
81+
"name": "LogsTable"
82+
},
83+
"name": "LogsTable"
84+
}
85+
},
86+
{
87+
"kind": "Variable",
88+
"spec": {
89+
"display": {
90+
"name": "VictoriaLogs Field Values Variable"
91+
},
92+
"name": "VictoriaLogsFieldValuesVariable"
93+
}
94+
},
95+
{
96+
"kind": "Variable",
97+
"spec": {
98+
"display": {
99+
"name": "VictoriaLogs Field Names Variable"
100+
},
101+
"name": "VictoriaLogsFieldNamesVariable"
102+
}
103+
}
104+
]
105+
}
106+
}

0 commit comments

Comments
 (0)