grafana/pkg/plugins
Giuseppe Guerra cca9d89733
Plugins: Angular detector: Remote patterns fetching (#69843)
* Plugins: Angular detector: Remote patterns fetching

* Renamed PatternType to GCOMPatternType

* Renamed files

* Renamed more files

* Moved files again

* Add type checks, unexport GCOM structs

* Cache failures, update log messages, fix GCOM URL

* Fail silently for unknown pattern types, update docstrings

* Fix tests

* Rename gcomPattern.Value to gcomPattern.Pattern

* Refactoring

* Add FlagPluginsRemoteAngularDetectionPatterns feature flag

* Fix tests

* Re-generate feature flags

* Add TestProvideInspector, renamed TestDefaultStaticDetectorsInspector

* Add TestProvideInspector

* Add TestContainsBytesDetector and TestRegexDetector

* Renamed getter to provider

* More tests

* TestStaticDetectorsProvider, TestSequenceDetectorsProvider

* GCOM tests

* Lint

* Made detector.detect unexported, updated docstrings

* Allow changing grafana.com URL

* Fix API path, add more logs

* Update tryUpdateRemoteDetectors docstring

* Use angulardetector http client

* Return false, nil if module.js does not exist

* Chore: Split angualrdetector into angularinspector and angulardetector packages

Moved files around, changed references and fixed tests:
- Split the old angulardetector package into angular/angulardetector and angular/angularinspector
- angulardetector provides the detection structs/interfaces (Detector, DetectorsProvider...)
- angularinspector provides the actual angular detection service used directly in pluginsintegration
- Exported most of the stuff that was private and now put into angulardetector, as it is not required by angularinspector

* Renamed detector.go -> angulardetector.go and inspector.go -> angularinspector.go

Forgot to rename those two files to match the package's names

* Renamed angularinspector.ProvideInspector to angularinspector.ProvideService

* Renamed "harcoded" to "static" and "remote" to "dynamic"

from PR review, matches the same naming schema used for signing keys fetching

* Fix merge conflict on updated angular patterns

* Removed GCOM cache

* Renamed Detect to DetectAngular and Detector to AngularDetector

* Fix call to NewGCOMDetectorsProvider in newDynamicInspector

* Removed unused test function newError500GCOMScenario

* Added angularinspector service definition in pluginsintegration

* Moved dynamic inspector into pluginsintegration

* Move gcom angulardetectorsprovider into pluginsintegration

* Log errUnknownPatternType at debug level

* re-generate feature flags

* fix error log
2023-06-26 15:33:21 +02:00
..
backendplugin Pyroscope: Rename phlare to grafana-pyroscope-datasource (#68859) 2023-06-07 06:09:29 +03:00
codegen Chore: Hacky first pass on generating composable kinds within grafana/schema (#64723) 2023-05-30 05:56:18 -07:00
config Plugins: Angular detector: Remote patterns fetching (#69843) 2023-06-26 15:33:21 +02:00
envvars Plugins: Optimize creation of Golang errors and slices (#69448) 2023-06-07 17:22:43 +02:00
httpresponsesender Plugins: Refactor call resource API handling (#67234) 2023-04-28 14:02:27 +02:00
log Plugins: Refactor plugin repository API (#69063) 2023-05-30 11:48:52 +02:00
manager Plugins: Angular detector: Remote patterns fetching (#69843) 2023-06-26 15:33:21 +02:00
pfs Candlestick: Migrate to schema (#62113) 2023-06-20 07:18:40 +03:00
plugindef Codegen: Generate any instead of interface{} (#70201) 2023-06-16 10:54:56 +02:00
pluginscdn Plugins: Fix plugins CDN not working when plugins are not in domain's root path (#63202) 2023-02-24 14:28:13 +01:00
repo Plugins: Optimize creation of Golang errors and slices (#69448) 2023-06-07 17:22:43 +02:00
storage Plugins: Refactor plugin repository API (#69063) 2023-05-30 11:48:52 +02:00
errors.go Plugins: Use error plane for api/ds/query (#54750) 2022-09-14 18:19:57 +02:00
fakes.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
ifaces.go Plugins: Refactor plugin repository API (#69063) 2023-05-30 11:48:52 +02:00
localfiles_test.go Plugins: Fix files with two dots in the name not being returned by LocalFS.Files() (#67395) 2023-04-27 16:19:13 +02:00
localfiles.go Plugins: Fix files with two dots in the name not being returned by LocalFS.Files() (#67395) 2023-04-27 16:19:13 +02:00
models.go Plugins: Standardize Golang enum naming convention (#69449) 2023-06-08 12:21:19 +02:00
plugins_test.go Plugins: Standardize Golang enum naming convention (#69449) 2023-06-08 12:21:19 +02:00
plugins.go Plugins: Standardize Golang enum naming convention (#69449) 2023-06-08 12:21:19 +02:00
test_utils.go Plugins: Fs: Add option to access unallowed files in dev mode (#66492) 2023-04-27 10:26:15 +02:00