Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana / Maintenance Zabbix #1129

Closed
wants to merge 511 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
511 commits
Select commit Hold shift + click to select a range
67289c9
Add first/last agg to top and bottom
alexanderzobnin May 27, 2021
24e9129
Implement sortSeries
alexanderzobnin May 27, 2021
9a63a1f
Return multiple frames (frame per series)
alexanderzobnin May 27, 2021
43e9527
Implement timeShift
alexanderzobnin May 27, 2021
39e1123
Remove legacy functions
alexanderzobnin May 27, 2021
2a5b12e
Fix series name issues
alexanderzobnin May 27, 2021
ef7681f
Implement transformNull
alexanderzobnin May 27, 2021
6e7d8bc
Implement removeAboveValue/removeBelowValue
alexanderzobnin May 27, 2021
2e3e235
Implement delta and rate
alexanderzobnin May 27, 2021
ec38c39
Implement movingAverage
alexanderzobnin May 27, 2021
31e989d
Implement EMA
alexanderzobnin May 28, 2021
6f9260f
Improve SMA performance
alexanderzobnin May 28, 2021
4e6a77c
Fix trendValue/consolidateBy
alexanderzobnin May 28, 2021
98b6a34
Fix trend values count and sum
alexanderzobnin May 28, 2021
3939320
Return results in a stable order
alexanderzobnin May 28, 2021
4bb7fdd
Make alias functions work with different frames
alexanderzobnin May 28, 2021
3dd00c4
Convert frames to wide format if possible
alexanderzobnin May 28, 2021
4f76994
Enable backend requests
alexanderzobnin May 28, 2021
7d5b7ca
Align time series data if possible
alexanderzobnin May 31, 2021
7b29089
Fix data source settings (DisableDataAlignment)
alexanderzobnin May 31, 2021
f908ab7
Downsample data
alexanderzobnin May 31, 2021
7276e4b
Fix handling null interval
alexanderzobnin May 31, 2021
6e67976
Sort response by item id
alexanderzobnin May 31, 2021
c81a6ae
Use backend queries for item id mode
alexanderzobnin Jun 1, 2021
8e9a260
Fix null handling in removeAbove/BelowValue
alexanderzobnin Jun 1, 2021
16fe479
Disable alignment for trend data
alexanderzobnin Jun 1, 2021
c546f21
Mix backend and frontend queries from one panel
alexanderzobnin Jun 1, 2021
eb389af
Fix alerting queries with numeric query type
alexanderzobnin Jun 2, 2021
e1557e3
Fix saving alert rules
alexanderzobnin Jun 2, 2021
4ec5616
Fix scoped vars for alias functions
alexanderzobnin Jun 2, 2021
d1ccc34
Build for macOS arm
alexanderzobnin Aug 2, 2021
3ecf912
Set pre- version
alexanderzobnin Aug 2, 2021
3688174
Update Grafana dependencies to 8.0
alexanderzobnin Aug 2, 2021
12c4089
Fix building after update to Grafana 8 components
alexanderzobnin Aug 2, 2021
201d6cb
Fix problem details layout, fixes #1252
alexanderzobnin Aug 3, 2021
c44a7ac
Increase problem details view height, fixes #1233
alexanderzobnin Aug 3, 2021
848ea8a
Enable direct db connection
alexanderzobnin Aug 3, 2021
e12b8cb
Handle db connection response on the backend
alexanderzobnin Aug 4, 2021
3831c6e
Refactor DB connector
alexanderzobnin Aug 5, 2021
6c1722d
Refactor queries
alexanderzobnin Aug 5, 2021
62f38df
Apply data processing for the IT Service query on the backend
alexanderzobnin Aug 5, 2021
c3ce882
Fix default query type for new queries if data source is not default
alexanderzobnin Aug 5, 2021
d1f639f
Fix data alignment on the backend
alexanderzobnin Aug 6, 2021
736f05d
Fix data alignment for db connection queries
alexanderzobnin Aug 6, 2021
2949675
Remove unused frontend functions
alexanderzobnin Aug 6, 2021
2a836b9
Don't align IT services data
alexanderzobnin Aug 6, 2021
7af0d6a
Fix tests
alexanderzobnin Aug 6, 2021
4855cd0
Fix codespell
alexanderzobnin Aug 6, 2021
c6441cc
Merge pull request #1256 from alexanderzobnin/backend-functions
alexanderzobnin Aug 6, 2021
a656d18
Bump axios from 0.19.2 to 0.21.1
dependabot[bot] Aug 6, 2021
bc1eedb
Bump lodash from 4.17.20 to 4.17.21
dependabot[bot] Aug 6, 2021
9159738
Support item tags, fixes #1258
alexanderzobnin Aug 9, 2021
0772170
Don't query version if error happened
alexanderzobnin Aug 9, 2021
8499d72
Fix Explore button, fixes #1240
alexanderzobnin Aug 9, 2021
5de5c2b
Fix tests
alexanderzobnin Aug 9, 2021
d4649e9
Merge pull request #1132 from alexanderzobnin/dependabot/npm_and_yarn…
alexanderzobnin Aug 10, 2021
53c44e1
Merge pull request #1208 from alexanderzobnin/dependabot/npm_and_yarn…
alexanderzobnin Aug 10, 2021
bea87fd
Remove time series benchmark since functions moved to the backend
alexanderzobnin Aug 10, 2021
5340b9c
Fix switching editor to item tags on init
alexanderzobnin Aug 10, 2021
b793567
Check item tag field for variables
alexanderzobnin Aug 10, 2021
21f1d87
Support item tags as variables
alexanderzobnin Aug 10, 2021
8efc020
Fix filtering by application
alexanderzobnin Aug 10, 2021
00e33fc
Fix using value mapping from zabbix, closes #1222
alexanderzobnin Aug 10, 2021
19f939e
Fix options editor styles
alexanderzobnin Aug 10, 2021
2a66428
Tweak problem details styles
alexanderzobnin Aug 10, 2021
abe4579
Remove unused debug logging
alexanderzobnin Aug 10, 2021
63d2954
Cache valuemap.get request
alexanderzobnin Aug 10, 2021
d2ebc39
Update change log
alexanderzobnin Aug 10, 2021
b4e0a49
Fix production build
alexanderzobnin Aug 10, 2021
5321c07
Bump version to 4.2.0
alexanderzobnin Aug 10, 2021
4199e6e
Exclude apple m1 build from default package
alexanderzobnin Aug 10, 2021
e103e8c
Fix github release script
alexanderzobnin Aug 10, 2021
33899b1
Add darwin-arm64 to the package
alexanderzobnin Aug 10, 2021
549b8ac
Fix error on queries with aggregation function
alexanderzobnin Aug 10, 2021
015733b
Fix percentile aggregation
alexanderzobnin Aug 10, 2021
2689f47
Update change log
alexanderzobnin Aug 10, 2021
95afc74
Bump version to 4.2.1
alexanderzobnin Aug 10, 2021
df11ef7
Bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 11, 2021
5ed80a6
Fix parsing timeout (use number instead of string), fixes #1254
alexanderzobnin Aug 11, 2021
425a691
Merge pull request #1259 from alexanderzobnin/dependabot/npm_and_yarn…
alexanderzobnin Aug 11, 2021
ee5223f
Align multiple series to the same interval with interpolation, fix #1211
alexanderzobnin Aug 24, 2021
78fe0dd
Fix expanding item name with unicode params, fixes #1269
alexanderzobnin Aug 25, 2021
5c3fc03
Fix missing host name when direct db connection enabled, fixes #1265
alexanderzobnin Aug 25, 2021
4b3d8e5
Fix top() function, fixes #1267
alexanderzobnin Aug 25, 2021
483e2aa
Fix sortSeries() function, fixes #1274
alexanderzobnin Aug 25, 2021
b142bdc
Update change log
alexanderzobnin Aug 25, 2021
e9db978
Bump plugin version to 4.2.2
alexanderzobnin Aug 25, 2021
67bc005
Fix multiple series alignment if interval is not defined, fixes #1262
alexanderzobnin Aug 31, 2021
d389e00
Fix error when creating new variable, fixes #1282
alexanderzobnin Aug 31, 2021
f4f346a
Fix filtering items by tag set with variable, closes #1283
alexanderzobnin Sep 10, 2021
a69c866
Do not reuse connection to prevent EOF error, #1295
alexanderzobnin Sep 10, 2021
fcef21b
Interpolate series to make stacking work properly in case of differen…
alexanderzobnin Sep 15, 2021
8fa10bb
Align time stamps with Round instead of Truncate
alexanderzobnin Sep 15, 2021
2f08ed1
Refactor: remove unused code
alexanderzobnin Sep 15, 2021
3f77f14
Sort trend data, fixes #1300
alexanderzobnin Sep 15, 2021
fbe60df
Update change log
alexanderzobnin Sep 20, 2021
c00a0e1
Fix db connection query post processing
alexanderzobnin Sep 20, 2021
fa2619a
Fix DB connection queries on small time ranges
alexanderzobnin Sep 21, 2021
b65a638
Bump plugin version to 4.2.3
alexanderzobnin Sep 21, 2021
d3bf7eb
Fix conversion to wide data frame, fixes #1309
alexanderzobnin Sep 22, 2021
cb85b14
Use time.Truncate instead of time.Round in GetTimeFrame
proton-ab Sep 22, 2021
71f9ac3
Merge pull request #1311 from proton-ab/patch-1
alexanderzobnin Sep 23, 2021
303da96
Handle nulls correctly in average and sum aggregations
alexanderzobnin Sep 23, 2021
9133b0a
Skip data alignment if item interval less than query interval
alexanderzobnin Sep 23, 2021
d46b9c9
Data alignment: skip 1 point gaps (insert interpolated value)
alexanderzobnin Sep 23, 2021
1f98dc7
Skip alignment only if item interval twice less than query interval
alexanderzobnin Sep 23, 2021
59ce70d
Alignment: fix interpolation
alexanderzobnin Sep 23, 2021
7502922
Align: do not append points with the same timestamp
alexanderzobnin Sep 23, 2021
09c91cc
Fix top() and bottom() functions by fixing sorting, closes #1313
alexanderzobnin Sep 23, 2021
3f4a723
Update change log
alexanderzobnin Sep 27, 2021
e47b6ff
Bump plugin version to 4.2.4
alexanderzobnin Sep 27, 2021
f8a8432
Remove unused debug logging
alexanderzobnin Sep 27, 2021
10c6e4a
Remove unused models
alexanderzobnin Dec 2, 2021
f6e2540
Make sure calculated interval is an integer, fixes #1320
alexanderzobnin Dec 2, 2021
0411c0a
Update grafana packages
alexanderzobnin Jan 27, 2022
edde2bd
Fix error when opening problem details, #1357
alexanderzobnin Jan 27, 2022
4b6dec4
Update copyright date
alexanderzobnin Jan 27, 2022
995249a
Update grafana packages
alexanderzobnin Feb 15, 2022
709e3ff
Fix type errors (tests are failed)
alexanderzobnin Feb 15, 2022
657bf77
Use tooltip from grafana/ui
alexanderzobnin Feb 15, 2022
f4fad8d
Fix alerting query error when query type has numeric type, fixes #1342
alexanderzobnin Feb 16, 2022
0a4714f
Fix parsing regex, #1318
alexanderzobnin Feb 16, 2022
afb90c9
Fix using units from Zabbix, #1321
alexanderzobnin Feb 17, 2022
1ea3e97
Update change log
alexanderzobnin Feb 17, 2022
69e92a1
Bump version to 4.2.5
alexanderzobnin Feb 17, 2022
928417e
Fixes #1403
yesoreyeram Mar 3, 2022
701a7e3
Merge pull request #1404 from yesoreyeram/patch-1
yesoreyeram Apr 4, 2022
1afabdd
Bump version to 4.2.6
yesoreyeram Apr 4, 2022
c7c9412
Fix problems list panel error in new Grafana version
alexanderzobnin Apr 18, 2022
639d1f8
Add script for packaging plugin
alexanderzobnin Apr 19, 2022
91ad43b
Add script for publishing github release
alexanderzobnin Apr 19, 2022
f0842bf
Fix missing labels in response data frame
alexanderzobnin Apr 19, 2022
f18d0d8
Remove circleci badge and paypal button
alexanderzobnin Apr 19, 2022
a09d8a9
Update saas packages for node 16
alexanderzobnin Apr 27, 2022
3728007
Fix returning apps when no host found, fixes #1427
alexanderzobnin Apr 27, 2022
c70c9e9
Refactor: define slices with make()
alexanderzobnin Apr 27, 2022
13d89a0
Fix parsing tags without value, fixes #1420
alexanderzobnin Apr 27, 2022
8d35c6b
Fix percentile aggregation with $__range_series interval
alexanderzobnin Apr 27, 2022
6f41260
Move dashboards into data source dir in build, fixes #1407
alexanderzobnin Apr 27, 2022
8b0174f
Implement internal plugin metric collection
alexanderzobnin Apr 28, 2022
42038a0
Add docker test environment for Zabbix 6.0
alexanderzobnin Apr 28, 2022
59eef45
Fix prometheus client dependency
alexanderzobnin Apr 28, 2022
7442807
Fallback for SLA in Zabbix 6.0, fixes #1408
alexanderzobnin Apr 29, 2022
bd3e15d
Update change log
alexanderzobnin Apr 29, 2022
4b6dad9
Update Grafana plugins SDK, fixes #1327
alexanderzobnin Apr 29, 2022
aa08533
Update change log
alexanderzobnin Apr 29, 2022
9d6abf3
Fix EMA function crash when first point is null
alexanderzobnin Apr 29, 2022
c0a33f2
Fix show disabled items toggle, closes #1249
alexanderzobnin May 4, 2022
c7beeec
Update change log
alexanderzobnin May 4, 2022
f7e2118
Bump version to 4.2.7
alexanderzobnin May 4, 2022
8e86cc9
Include preconfigured Grafana with dashboards into devenv
alexanderzobnin May 4, 2022
1a9e241
Add instruction how to run devenv
alexanderzobnin May 4, 2022
c5ff2a8
Fix typo
alexanderzobnin May 4, 2022
e13b51a
Add details about Grafana instance address
alexanderzobnin May 4, 2022
6d8689c
Devenv: fix redis dependency
alexanderzobnin May 5, 2022
84419de
Fix displaying metric names and alias functions, closes #1444
alexanderzobnin May 6, 2022
daaf2b6
Refactor: remove unused code
alexanderzobnin May 6, 2022
7153a83
Fix data processing when trend data fetched from DB, closes #1445
alexanderzobnin May 6, 2022
a976123
Update change log
alexanderzobnin May 6, 2022
07bc5ba
Bump version to 4.2.8
alexanderzobnin May 6, 2022
70055b0
switch to regexp2 for parsed filter
thetuxkeeper Jul 7, 2022
4fa13c9
extended parseFilter tests
thetuxkeeper Jul 7, 2022
a406c9c
Add dev env for zabbix 6.2
alexanderzobnin Jul 8, 2022
d2645a4
Fix fetching host groups, #1470
alexanderzobnin Jul 8, 2022
6fed222
Select groupid explicitly to fix queries
alexanderzobnin Jul 8, 2022
5777c2d
Query object ids explicitly
alexanderzobnin Jul 12, 2022
b10f93d
fix AggregateByRange() on empty data
alexanderzobnin Jul 12, 2022
d0f56b8
Fix fetching hosts in Zabbix 6.2
alexanderzobnin Jul 12, 2022
e444bda
Fix aggregation on empty data
alexanderzobnin Jul 12, 2022
ec40eb0
Update change log
alexanderzobnin Jul 12, 2022
84ed2f1
Bump version to 4.2.9
alexanderzobnin Jul 12, 2022
987e21a
Scripts: Increase github client timeout
alexanderzobnin Jul 12, 2022
bd12fb0
Fix InfluxDB query, #1255
alexanderzobnin Aug 31, 2022
b344087
InfluxDB: fix data format (use data frames), #1255
alexanderzobnin Aug 31, 2022
459722d
Merge branch 'regexp2' of github.com:thetuxkeeper/grafana-zabbix into…
alexanderzobnin Sep 1, 2022
7998758
Fix matching
alexanderzobnin Sep 1, 2022
7d6795b
Merge pull request #1472 from thetuxkeeper/regexp2
alexanderzobnin Sep 1, 2022
8df1052
Update change log
alexanderzobnin Sep 1, 2022
24c47a3
Bump version to 4.2.10
alexanderzobnin Sep 1, 2022
d4b08eb
Add github workflow
alexanderzobnin Sep 1, 2022
fa510c6
Fix workflow file syntax
alexanderzobnin Sep 1, 2022
5de9e2c
CI: Split jobs
alexanderzobnin Sep 1, 2022
7a27945
CI: fix build
alexanderzobnin Sep 1, 2022
5bfd306
CI: fix lint job
alexanderzobnin Sep 1, 2022
f765d47
Build for FreeBSD amd64 & arm64 (#1501)
overhacked Sep 9, 2022
504c9af
Migrate query editor to react (#1520)
alexanderzobnin Nov 9, 2022
9b2079c
Migrate problems panel to React (#1532)
alexanderzobnin Nov 30, 2022
8aebc64
Problems: deactivate tooltip with hint for tags
alexanderzobnin Nov 30, 2022
14987ef
Fix metric picker query update
alexanderzobnin Nov 30, 2022
26ed740
Refactor: format some files
alexanderzobnin Nov 30, 2022
e3e8967
Build plugin with grafana toolkit (#1539)
alexanderzobnin Dec 9, 2022
b32fd7e
Fix item tags support
alexanderzobnin Dec 15, 2022
cded14d
Use maintenance logic from problems, not from hosts, #830
alexanderzobnin Dec 27, 2022
cba2e89
Update deprecated user param to username, fixes #1544
alexanderzobnin Dec 27, 2022
42281a6
Support authentication for zabbix < 5.4, #1544
alexanderzobnin Dec 27, 2022
1cee6f0
SLA support in Zabbix 6.0 (#1547)
alexanderzobnin Dec 29, 2022
cf6b19e
Query option to override use trends option, fixes #1442
alexanderzobnin Dec 29, 2022
5606dac
Fix maintenance filtering, #830
alexanderzobnin Dec 29, 2022
89d33a8
Fix text metric editor layout
alexanderzobnin Dec 29, 2022
445b46a
Fix host maintenance label
alexanderzobnin Dec 29, 2022
a5c239f
Problems count mode (#1493)
alexanderzobnin Jan 20, 2023
bc62e35
Problems: Allow HTML in description (#1559)
alexanderzobnin Jan 20, 2023
41d292c
Problems: Add operational data field, closes #1260
alexanderzobnin Jan 20, 2023
8c1bf05
Use loadPluginCss from grafana/runtime
alexanderzobnin Feb 27, 2023
9deb7dd
Disable unused features
alexanderzobnin Mar 9, 2023
07c02ca
Problems: filter by particular severity, fixes #572
alexanderzobnin Mar 20, 2023
dd67988
Improve tags performance (#1526)
alexanderzobnin Mar 21, 2023
418fe7a
Add name to triggers data frame, fixes #1441
alexanderzobnin Mar 21, 2023
f1c3c57
Fix uppercase label
alexanderzobnin Mar 21, 2023
f7150f9
Show acknowledge author, fixes #1281
alexanderzobnin Mar 21, 2023
3bbad47
Update year
alexanderzobnin Mar 21, 2023
98f9d75
Update change log
alexanderzobnin Mar 21, 2023
da4bc13
Bump version to 4.3.0
alexanderzobnin Mar 21, 2023
3f7f0f4
Fix severity filter
alexanderzobnin Mar 21, 2023
2470803
Fix variable query editor, #1590
alexanderzobnin Mar 22, 2023
1605b76
Fix db connection test result, #1590
alexanderzobnin Mar 22, 2023
457894f
Fix tags filter for problem history, closes #1592
alexanderzobnin Mar 22, 2023
23e9576
Use OR evaltype for problem tags filter
alexanderzobnin Mar 22, 2023
713678a
Fix lastchange time in Problems list, closes #1596
alexanderzobnin Mar 23, 2023
fc1d809
Fix timestamps for SLA graph, closes #1595
alexanderzobnin Mar 23, 2023
24285a9
Fix item tag filter, #1594
alexanderzobnin Mar 23, 2023
e315e27
Update change log
alexanderzobnin Mar 23, 2023
193be3c
Bump version to 4.3.1
alexanderzobnin Mar 23, 2023
09ef111
Update version in package.json
alexanderzobnin Mar 23, 2023
ac0910a
Update links to the docs
alexanderzobnin Jul 20, 2023
445f3fa
Fix count by options in triggers query
alexanderzobnin Jul 21, 2023
8205f7a
Support for secure socks proxy (#1650)
leandro-deveikis Jul 25, 2023
ac97694
Auth: Able to use API tokens for authentication (#1662)
alexanderzobnin Jul 26, 2023
d484934
Format source code
alexanderzobnin Aug 1, 2023
1039385
Devenv: Add zabbix 5.2
alexanderzobnin Aug 1, 2023
906cc4a
Devenv: use zabbix LTS version 5.0
alexanderzobnin Aug 1, 2023
cef0a2e
Fix app filter returning all items in case of wrong app, #1597
alexanderzobnin Aug 1, 2023
873947c
SLA: support multiple SLA in one query, fixes #1603
alexanderzobnin Aug 1, 2023
e338124
Add host name only if result contains multiple hosts, fixes #1335
alexanderzobnin Aug 1, 2023
7af3dca
Problems: Able to select tags evaluation type, fixes #1600
alexanderzobnin Aug 1, 2023
308a6a1
Problems: fix pagination, fixes #1649
alexanderzobnin Aug 1, 2023
4534679
Hide application filter for queries that do not support it, fixes #1643
alexanderzobnin Aug 1, 2023
4373ef8
Add tags filter to triggers query
alexanderzobnin Aug 1, 2023
e45277c
Fix evaltype for problems history
alexanderzobnin Aug 1, 2023
af302d7
Updates plugin sdk version to 0.171.0 (#1667)
leandro-deveikis Aug 3, 2023
d5ec390
Update change log
alexanderzobnin Aug 17, 2023
2212ad9
Bump version to 4.4.0
alexanderzobnin Aug 17, 2023
b4c7932
Update repo owner in release script
alexanderzobnin Aug 17, 2023
6ae8801
Update release date in change log
alexanderzobnin Aug 17, 2023
f9a3d58
Remove env variable usage
alexanderzobnin Aug 17, 2023
0ceed56
Update links in plugin.json
alexanderzobnin Aug 17, 2023
518d8a1
Clean up README
alexanderzobnin Aug 23, 2023
e3ab4d5
Build: disable CGO
alexanderzobnin Aug 30, 2023
b602e15
Add spellcheck
alexanderzobnin Aug 30, 2023
a536e6d
Docs: Fix spellcheck
alexanderzobnin Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .bra.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# default configuration created by the `mage watch` command.
# this file can be edited and should be checked into source control.
# see https://github.com/unknwon/bra/blob/master/templates/default.bra.toml for more configuration options.
[run]
init_cmds = [
["mage", "-v", "build:backend"],
["mage", "-v" , "reloadPlugin"]
]
watch_all = true
follow_symlinks = false
ignore = [".git", "node_modules", "dist"]
ignore_files = ["mage_output_file.go"]
watch_dirs = [
"pkg",
"src",
]
watch_exts = [".go", ".json"]
build_delay = 2000
cmds = [
["mage", "-v", "build:backend"],
["mage", "-v" , "reloadPlugin"]
]
183 changes: 149 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2.1

aliases:
# Workflow filters
- &filter-not-release-or-master
Expand All @@ -21,53 +23,75 @@ aliases:
branches:
only: docs

version: 2
executors:
e2e_exec:
docker:
- image: srclosson/grafana-plugin-ci-e2e:latest

jobs:
build:
working_directory: ~/alexanderzobnin/grafana-zabbix
docker:
- image: circleci/node:12
- image: circleci/golang:1.14-node
environment:
YARN_NO_PROGRESS: "true"
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-{{ checksum "yarn.lock" }}
- dependency-cache-npm-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- dependency-cache-go-{{ checksum "go.sum" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
name: Install Dependencies
command: 'make install'
no_output_timeout: 15m
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
key: dependency-cache-npm-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run: npm run build
- save_cache:
key: dependency-cache-go-{{ checksum "go.sum" }}
paths:
- ./vendor
- /go/pkg/mod
- run: make build

lint:
working_directory: ~/alexanderzobnin/grafana-zabbix
docker:
- image: circleci/node:12
- image: circleci/golang:1.14-node
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-{{ checksum "yarn.lock" }}
- dependency-cache-npm-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- dependency-cache-go-{{ checksum "go.sum" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
name: Install Dependencies
command: 'make install'
no_output_timeout: 15m
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
key: dependency-cache-npm-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run: npm run lint
- save_cache:
key: dependency-cache-go-{{ checksum "go.sum" }}
paths:
- ./vendor
- /go/pkg/mod
- run: make lint

test:
working_directory: ~/alexanderzobnin/grafana-zabbix
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
docker:
- image: circleci/node:12
- image: circleci/golang:1.14-node
steps:
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
Expand All @@ -76,27 +100,108 @@ jobs:
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
- dependency-cache-{{ checksum "yarn.lock" }}
- dependency-cache-npm-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- dependency-cache-go-{{ checksum "go.sum" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
name: Install Dependencies
command: 'make install'
no_output_timeout: 15m
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
key: dependency-cache-npm-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run: npm run ci-test
- save_cache:
key: dependency-cache-go-{{ checksum "go.sum" }}
paths:
- ./vendor
- /go/pkg/mod
- run: make test-ci
- run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- store_test_results:
path: /tmp/circleci-test-results
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results

make-release:
get-plugin:
working_directory: ~/alexanderzobnin/grafana-zabbix
docker:
- image: circleci/golang:1.14-node
environment:
YARN_NO_PROGRESS: "true"
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-npm-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- dependency-cache-go-{{ checksum "go.sum" }}
- persist_to_workspace:
root: ~/alexanderzobnin/
paths:
- grafana-zabbix

package-plugin:
executor: e2e_exec
working_directory: ~/alexanderzobnin/grafana-zabbix
steps:
- attach_workspace:
at: ~/alexanderzobnin
- run:
name: Install Dependencies
command: 'make install'
no_output_timeout: 15m
- save_cache:
key: dependency-cache-npm-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- save_cache:
key: dependency-cache-go-{{ checksum "go.sum" }}
paths:
- ./vendor
- /go/pkg/mod
- run:
name: Build plugin for all platforms
command: 'make dist'
no_output_timeout: 15m
- run:
name: Prepare plugin for packaging
command: |
mkdir -p ci/jobs/build_plugin
mv dist/ ci/jobs/build_plugin
cp CHANGELOG.md ci/jobs/build_plugin/dist
- run:
name: Package and sign plugin
command: yarn grafana-toolkit plugin:ci-package
no_output_timeout: 15m
- persist_to_workspace:
root: ~/alexanderzobnin/
paths:
- grafana-zabbix
- store_artifacts:
path: ci/packages

make-github-release:
working_directory: ~/alexanderzobnin/grafana-zabbix
docker:
- image: circleci/golang:1.14-node
environment:
steps:
- attach_workspace:
at: ~/alexanderzobnin
- run:
name: Publish release
command: 'node ./scripts/github/publishRelease.js'
no_output_timeout: 15m

make-release-commit:
working_directory: ~/alexanderzobnin/grafana-zabbix
docker:
- image: circleci/node:12
- image: circleci/golang:1.13-node
environment:
CI_GIT_USER: CircleCI
CI_GIT_EMAIL: [email protected]
Expand All @@ -107,31 +212,33 @@ jobs:
- checkout
- restore_cache:
keys:
- dependency-cache-{{ checksum "yarn.lock" }}
- dependency-cache-npm-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- dependency-cache-go-{{ checksum "go.sum" }}
- run:
name: yarn install
command: 'yarn install --pure-lockfile --no-progress'
name: Install Dependencies
command: 'make install'
no_output_timeout: 15m
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
key: dependency-cache-npm-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- save_cache:
key: dependency-cache-go-{{ checksum "go.sum" }}
paths:
- ./vendor
- /go/pkg/mod
- run: ./.circleci/make-release.sh

build-docs:
working_directory: ~/grafana-zabbix
docker:
- image: circleci/python:2.7
steps:
- run:
name: install git lfs
command: 'curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash'
- run: sudo apt-get install git-lfs
- run: git lfs install
- run: sudo pip install --upgrade pip
- run: sudo pip install mkdocs
- checkout
- run: git lfs fetch --all
- run: cd docs && mkdocs build --clean
- persist_to_workspace:
root: .
Expand All @@ -141,7 +248,7 @@ jobs:
deploy-docs:
working_directory: ~/grafana-zabbix
docker:
- image: circleci/node:12
- image: circleci/golang:1.14-node
environment:
GH_PAGES_BRANCH: gh-pages
CI_GIT_USER: CircleCI
Expand All @@ -162,7 +269,7 @@ jobs:
steps:
- checkout
- run: sudo pip install codespell
- run: codespell -S './.git*,./src/img*,./yarn.lock' -L que --ignore-words=./.codespell_ignore
- run: codespell -S './.git*,./src/img*,./go.sum,./yarn.lock' -L que --ignore-words=./.codespell_ignore

workflows:
version: 2
Expand Down Expand Up @@ -198,13 +305,21 @@ workflows:
filters: *filter-only-release
- test:
filters: *filter-only-release
- make-release:
- get-plugin:
requires:
- build
- codespell
- lint
- test
filters: *filter-only-release
- package-plugin:
requires:
- get-plugin
filters: *filter-only-release
- make-github-release:
requires:
- package-plugin
filters: *filter-only-release

build-docs:
jobs:
Expand Down
27 changes: 27 additions & 0 deletions .circleci/make-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Exit script if you try to use an uninitialized variable.
set -o nounset
# Exit script if a statement returns a non-true return value.
set -o errexit
# Use the error status of the first failure, rather than that of the last item in a pipeline.
set -o pipefail

RELEASE_VER=$(echo "$CIRCLE_TAG" | grep -Po "(?<=v)[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)")

if [ -z "$RELEASE_VER" ]; then
echo "No release version provided"
exit 1
fi
if [[ $RELEASE_VER =~ ^[0-9]+(\.[0-9]+){2}(-.+|[^-.]*) ]]; then
echo "Preparing release $RELEASE_VER"
else
echo "Release should has format 1.2.3[-meta], got $RELEASE_VER"
exit 1
fi

# Create zip package
PACKAGE_NAME="grafana-zabbix-${RELEASE_VER}.zip"
echo "packaging into $PACKAGE_NAME"
mv ./dist alexanderzobnin-zabbix-app
zip -r $PACKAGE_NAME ./alexanderzobnin-zabbix-app
2 changes: 1 addition & 1 deletion .circleci/make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RELEASE_BRANCH=release-$RELEASE_VER

# Build plugin
git checkout -b "$RELEASE_BRANCH"
yarn install --pure-lockfile && yarn build
make clean install dist

# Commit release
git add --force dist/
Expand Down
13 changes: 13 additions & 0 deletions .config/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
*
* In order to extend the configuration follow the steps in .config/README.md
*/
{
"extends": ["@grafana/eslint-config"],
"root": true,
"ignorePatterns": ["**/*.js", "./src/test-setup/**/*.*"],
"rules": {
"react/prop-types": "off"
}
}
16 changes: 16 additions & 0 deletions .config/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
*
* In order to extend the configuration follow the steps in .config/README.md
*/

module.exports = {
"endOfLine": "auto",
"printWidth": 120,
"trailingComma": "es5",
"semi": true,
"jsxSingleQuote": false,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2
};
Loading
Loading