Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Asset, Run, and Channel queries are cached to speed up regular expression querie

Both caches may be cleared for a panel by clicking the "Clear cache" button next to the Query Mode selector.

#### Annotations

Annotations are supported and enable querying Sift Annotations or using regular Sift data queries to visualize data, such as enum state changes, as annotations.

## Learn More

- [Sift](https://www.siftstack.com/)
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
// generally used by snapshots, but can affect specific tests
process.env.TZ = 'UTC';

const { grafanaESModules, nodeModulesToTransform } = require('./.config/jest/utils');

module.exports = {
// Jest configuration provided by Grafana scaffolding
...require('./.config/jest.config'),
// Increase default timeout for all tests to 15 seconds
testTimeout: 15000,
// Add nanoid and leven to the list of ES modules to transform
transformIgnorePatterns: [nodeModulesToTransform([...grafanaESModules, 'nanoid', 'leven'])],
};
10 changes: 10 additions & 0 deletions pkg/plugin/celUtils/cel_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ func GreaterThan(field string, value float64) string {
return fmt.Sprintf("%s > %v", field, value)
}

// GreaterThanOrEqual generates a CEL expression that checks whether a field is greater than or equal to a given string value.
func GreaterThanOrEqual(field string, value string) string {
return fmt.Sprintf(`%s >= %s`, field, value)
}

// LessThanOrEqual generates a CEL expression that checks whether a field is less than or equal to a given string value.
func LessThanOrEqual(field string, value string) string {
return fmt.Sprintf(`%s <= %s`, field, value)
}

// Contains generates a CEL expression that checks whether a string field contains a given value.
func Contains(field, value string) string {
return fmt.Sprintf(`%s.contains('%s')`, field, value)
Expand Down
Loading
Loading