diff --git a/VERSION b/VERSION index 4e8f395fa..1b58cc101 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.26.0 +0.27.0 diff --git a/agent/backend/diode/scrape.go b/agent/backend/diode/scrape.go index c4a2d86e2..854707f91 100644 --- a/agent/backend/diode/scrape.go +++ b/agent/backend/diode/scrape.go @@ -6,6 +6,7 @@ package diode import ( "context" + "go.opentelemetry.io/otel/sdk/metric" "strconv" "time" @@ -15,7 +16,6 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/otlpreceiver" - "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" ) @@ -73,7 +73,7 @@ func (d *diodeBackend) receiveOtlp() { TelemetrySettings: component.TelemetrySettings{ Logger: d.logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), }, BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/agent/backend/pktvisor/scrape.go b/agent/backend/pktvisor/scrape.go index 60089085d..d1d8b9fb0 100644 --- a/agent/backend/pktvisor/scrape.go +++ b/agent/backend/pktvisor/scrape.go @@ -21,7 +21,7 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/otlpreceiver" - "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" ) @@ -160,7 +160,7 @@ func (p *pktvisorBackend) receiveOtlp() { TelemetrySettings: component.TelemetrySettings{ Logger: p.logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), }, BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/agent/otel/otlpmqttexporter/factory.go b/agent/otel/otlpmqttexporter/factory.go index 1b371bdaf..44a8a2603 100644 --- a/agent/otel/otlpmqttexporter/factory.go +++ b/agent/otel/otlpmqttexporter/factory.go @@ -3,6 +3,7 @@ package otlpmqttexporter import ( "context" "fmt" + "go.opentelemetry.io/otel/sdk/metric" "github.com/orb-community/orb/agent/otel" "go.uber.org/zap" @@ -12,7 +13,6 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/trace" ) @@ -56,7 +56,7 @@ func CreateDefaultSettings(logger *zap.Logger) exporter.CreateSettings { TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), }, BuildInfo: component.NewDefaultBuildInfo(), } diff --git a/go.mod b/go.mod index 44791ff7a..38bb62ea0 100644 --- a/go.mod +++ b/go.mod @@ -22,27 +22,34 @@ require ( github.com/lib/pq v1.10.7 github.com/mainflux/mainflux v0.0.0-20220415135135-92d8fb99bf82 github.com/mattn/go-sqlite3 v1.14.16 - github.com/mitchellh/mapstructure v1.5.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.75.0 + github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.81.0 github.com/opentracing/opentracing-go v1.2.0 github.com/ory/dockertest/v3 v3.10.0 + github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/profile v1.7.0 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/prometheus v0.43.0 github.com/rubenv/sql-migrate v1.1.1 github.com/spf13/cobra v1.7.0 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 github.com/uber/jaeger-client-go v2.30.0+incompatible - go.opentelemetry.io/collector/component v0.75.0 - go.opentelemetry.io/collector/confmap v0.75.0 - go.opentelemetry.io/collector/consumer v0.75.0 - go.opentelemetry.io/collector/exporter v0.75.0 - go.opentelemetry.io/collector/receiver v0.75.0 + go.opentelemetry.io/collector/component v0.81.0 + go.opentelemetry.io/collector/config/confighttp v0.81.0 + go.opentelemetry.io/collector/config/configtelemetry v0.81.0 + go.opentelemetry.io/collector/config/configtls v0.81.0 + go.opentelemetry.io/collector/confmap v0.81.0 + go.opentelemetry.io/collector/consumer v0.81.0 + go.opentelemetry.io/collector/exporter v0.81.0 + go.opentelemetry.io/collector/processor v0.81.0 + go.opentelemetry.io/collector/receiver v0.81.0 + go.opentelemetry.io/otel/sdk/metric v0.39.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 - google.golang.org/grpc v1.54.0 + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc + google.golang.org/grpc v1.56.1 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -55,11 +62,11 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 github.com/prometheus/common v0.44.0 // indirect - go.opentelemetry.io/collector v0.75.0 - go.opentelemetry.io/collector/pdata v1.0.0-rc9 - go.opentelemetry.io/otel/metric v0.37.0 - go.opentelemetry.io/otel/trace v1.14.0 - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 + go.opentelemetry.io/collector v0.81.0 + go.opentelemetry.io/collector/pdata v1.0.0-rcv0013 + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 + google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect k8s.io/client-go v0.26.3 ) @@ -84,7 +91,7 @@ require ( github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -94,12 +101,13 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/iancoleman/strcase v0.2.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.15 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/knadh/koanf v1.5.0 // indirect + github.com/knadh/koanf/v2 v2.0.1 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mainflux/senml v1.5.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect @@ -108,25 +116,24 @@ require ( github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.1.17 // indirect - github.com/nats-io/jwt/v2 v2.3.0 // indirect - github.com/nats-io/nats-server/v2 v2.7.4 // indirect - github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d // indirect - github.com/nats-io/nkeys v0.3.0 // indirect + github.com/mostynb/go-grpc-compression v1.2.0 // indirect + github.com/nats-io/nats-server/v2 v2.9.20 // indirect + github.com/nats-io/nats.go v1.27.0 // indirect + github.com/nats-io/nkeys v0.4.4 // indirect github.com/nats-io/nuid v1.0.1 // indirect + github.com/observiq/ctimefmt v1.0.0 // indirect github.com/oklog/ulid/v2 v2.0.2 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.75.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.81.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.5 // indirect github.com/ory/keto/proto/ory/keto/acl/v1alpha1 v0.0.0-20210616104402-80e043246cf9 // indirect - github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -138,18 +145,27 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector/featuregate v0.75.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.81.0 // indirect + go.opentelemetry.io/collector/config/configcompression v0.81.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.81.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.81.0 // indirect + go.opentelemetry.io/collector/config/configopaque v0.81.0 // indirect + go.opentelemetry.io/collector/config/internal v0.81.0 // indirect + go.opentelemetry.io/collector/extension v0.81.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.81.0 // indirect + go.opentelemetry.io/collector/featuregate v1.0.0-rcv0013 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.1-0.20230612162650-64be7e574a17 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/sdk v1.16.0 // indirect go.uber.org/atomic v1.10.0 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.10.0 // indirect golang.org/x/mod v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/term v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.7.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -164,7 +180,7 @@ require ( //These libs are used to allow orb extend opentelemetry features require ( github.com/Shopify/sarama v1.37.2 - github.com/apache/thrift v0.17.0 // indirect + github.com/apache/thrift v0.18.1 // indirect github.com/eapache/go-resiliency v1.3.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect @@ -177,7 +193,7 @@ require ( github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/jaegertracing/jaeger v1.38.1 + github.com/jaegertracing/jaeger v1.41.0 github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.7.6 // indirect @@ -186,19 +202,19 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.75.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.62.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.81.0 github.com/orb-community/diode v0.0.0-20230419222319-4ec19ba89e9f github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rs/cors v1.8.3 // indirect + github.com/rs/cors v1.9.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.1.1 - github.com/xdg-go/stringprep v1.0.3 // indirect - go.opentelemetry.io/collector/receiver/otlpreceiver v0.75.0 - go.opentelemetry.io/collector/semconv v0.75.0 - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect + github.com/xdg-go/scram v1.1.2 + github.com/xdg-go/stringprep v1.0.4 // indirect + go.opentelemetry.io/collector/receiver/otlpreceiver v0.81.0 + go.opentelemetry.io/collector/semconv v0.81.0 + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // indirect k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect ) diff --git a/go.sum b/go.sum index 09c6ef051..61394f643 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute v1.20.0 h1:cUOcywWuowO9It2i1KX1lIb0HH7gLv6nENKuZGnlcSo= +cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -54,6 +54,7 @@ github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Mottl/ctimefmt v0.0.0-20190803144728-fd2ac23a585a/go.mod h1:eyj2WSIdoPMPs2eNTLpSmM6Nzqo4V80/d6jHpnJ1SAI= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -73,8 +74,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.17.0 h1:cMd2aj52n+8VoAtvSvLn4kDC3aZ6IAkBuqWQ2IDu7wo= -github.com/apache/thrift v0.17.0/go.mod h1:OLxhMRJxomX+1I/KUw03qoV3mMz16BwaKI+d4fPBx7Q= +github.com/apache/thrift v0.18.1 h1:lNhK/1nqjbwbiOPDBPFJVKxgDEGSepKuTh6OLiXW8kg= +github.com/apache/thrift v0.18.1/go.mod h1:rdQn/dCcDKEWjjylUeueum4vQEjG2v8v2PqriUnbr+I= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -118,11 +119,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= @@ -168,8 +166,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -181,7 +179,6 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -217,8 +214,8 @@ github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -399,7 +396,6 @@ github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvh github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= @@ -409,13 +405,13 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jaegertracing/jaeger v1.38.1 h1:IunKLJl9Imgpxh3ZL+SD+E7KHYAkaeiOnjay9YeUl3o= -github.com/jaegertracing/jaeger v1.38.1/go.mod h1:T5RFOZgRQBXR9rpQq8HsiIg39gu0DAYGQbDzpKw9gU8= +github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= +github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -434,7 +430,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -453,11 +448,12 @@ github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= +github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= +github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kortschak/utter v1.0.1/go.mod h1:vSmSjbyrlKjjsL71193LmzBOKgwePk9DH6uFaWHIInc= @@ -466,7 +462,6 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -528,8 +523,9 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= +github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -543,27 +539,28 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.1.17 h1:N9t6taOJN3mNTTi0wDf4e3lp/G/ON1TP67Pn0vTUA9I= -github.com/mostynb/go-grpc-compression v1.1.17/go.mod h1:FUSBr0QjKqQgoDG/e0yiqlR6aqyXC39+g/hFLDfSsEY= +github.com/mostynb/go-grpc-compression v1.2.0 h1:KJzRFSYPXlcoYjG5/xLZB8tpuOyWF2UnlW4tAuaWnfI= +github.com/mostynb/go-grpc-compression v1.2.0/go.mod h1:oidYvYyefMmhcuvU8fLJ8FfZyTyVzJ6SkmD5fIKgRe8= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt/v2 v2.3.0 h1:z2mA1a7tIf5ShggOFlR1oBPgd6hGqcDYsISxZByUzdI= -github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/nats-server/v2 v2.7.4 h1:c+BZJ3rGzUKCBIM4IXO8uNT2u1vajGbD1kPA6wqCEaM= -github.com/nats-io/nats-server/v2 v2.7.4/go.mod h1:1vZ2Nijh8tcyNe8BDVyTviCd9NYzRbubQYiEHsvOQWc= -github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d h1:zJf4l8Kp67RIZhoVeniSLZs69SHNgjLHz0aNsqPPlx8= -github.com/nats-io/nats.go v1.13.1-0.20220308171302-2f2f6968e98d/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/jwt/v2 v2.4.1 h1:Y35W1dgbbz2SQUYDPCaclXcuqleVmpbRa7646Jf2EX4= +github.com/nats-io/nats-server/v2 v2.9.20 h1:bt1dW6xsL1hWWwv7Hovm+EJt5L6iplyqlgEFkoEUk0k= +github.com/nats-io/nats-server/v2 v2.9.20/go.mod h1:aTb/xtLCGKhfTFLxP591CMWfkdgBmcUUSkiSOe5A3gw= +github.com/nats-io/nats.go v1.27.0 h1:3o9fsPhmoKm+yK7rekH2GtWoE+D9jFbw8N3/ayI1C00= +github.com/nats-io/nats.go v1.27.0/go.mod h1:XpbWUlOElGwTYbMR7imivs7jJj9GtK7ypv321Wp6pjc= +github.com/nats-io/nkeys v0.4.4 h1:xvBJ8d69TznjcQl9t6//Q5xXuVhyYiSos6RPtvQNTwA= +github.com/nats-io/nkeys v0.4.4/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/observiq/ctimefmt v1.0.0 h1:r7vTJ+Slkrt9fZ67mkf+mA6zAdR5nGIJRMTzkUyvilk= +github.com/observiq/ctimefmt v1.0.0/go.mod h1:mxi62//WbSpG/roCO1c6MqZ7zQTvjVtYheqHN3eOjvc= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= @@ -577,18 +574,18 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.75.0 h1:XW4DBJP3+dgdclPVA7d9aetG/FBUmwSNQGWaWoZnyo0= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.75.0/go.mod h1:IyFOweK1oDRlcm4k+hdobQjvP5z3L5+5G7NBrQj1Kx0= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.75.0 h1:BqTK0DHxiJ2Jih/MCvt3qJJwi6SxyP8hLSpAElLVUHk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.75.0/go.mod h1:XCBv1BOhtwwGmOBaPLtYelyVCLYAw5PwzyQKxZpsEkM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.62.0 h1:Oy2PdppooZrcUiBqHAOHrKK+rk+/+wScXEPMVKdDkcc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.62.0/go.mod h1:WgMWz7+zb5KKN6BDx8rL+88M73BxvjQiRsgK9yEavis= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.75.0 h1:8hSpocXftWJjo84a8E6Wa+ixOdgug3acVKblZbTM6sM= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.75.0/go.mod h1:BLIRUMliVdYdh6pFSNYRbbmShyqPr1sHwK/qYJSayx0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0 h1:sPjCHuqjn5UYDJOai4FulMCfLP+7AbspjHfv0jAtmD0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.81.0/go.mod h1:moQ6krtZ8dyziij2P+9eao5+gBfCJjiNDwN7n2MZZs4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.81.0 h1:Rb8e1O31dgjTEn6823RsPs2RaOwl7fVuFWz2qK9DRpY= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.81.0/go.mod h1:tnyFHqiWxeNUqAAaGuKDD7XDL0KwBMSqvRB9PsKCzng= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.81.0 h1:UCF4zWe24m1+yQeYGEQjzq5c9yNAf4d1lknbR7PAoH4= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.81.0/go.mod h1:/HK52N8ufi1rKuShEanBZVLVpOygLoIT9zqs0azKQ/s= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.81.0 h1:sVmU1X/9txOvdQX0VbnqwetrKThnsPXlJO52dmaFng8= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.81.0/go.mod h1:x71DNfrdvoQSN3AiovAsoSi4aG74Rary8oJATXzzkMw= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -608,11 +605,9 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -663,11 +658,10 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= +github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rubenv/sql-migrate v1.1.1 h1:haR5Hn8hbW9/SpAICrXoZqXnywS7Q5WijwkQENPeNWY= github.com/rubenv/sql-migrate v1.1.1/go.mod h1:/7TZymwxN8VWumcIxw1jjHEcR1djpdkMHQPT4FWdnbQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -681,8 +675,9 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -717,8 +712,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= @@ -734,10 +729,10 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -768,39 +763,65 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.75.0 h1:j6gAYcrKydPyBUnHeUDbzCfMzytwkIN1WwPOXBmFSkI= -go.opentelemetry.io/collector v0.75.0/go.mod h1:5I49yghQpThAFWHtD78AURnWB/3MXVepVhAYfBMdDrc= -go.opentelemetry.io/collector/component v0.75.0 h1:+Sp5HPYhDMjmiBjFiOAuthbvqlKf8cE+ho8/WYEMAWQ= -go.opentelemetry.io/collector/component v0.75.0/go.mod h1:7PvmC6Vc1NDq63gYJvx6QeLW1ydRnjj7f1jLDITSbeI= -go.opentelemetry.io/collector/confmap v0.75.0 h1:yvtrXWKbYVXm8LRHi2aQyrSkN+ildMQq2IADpYg9F68= -go.opentelemetry.io/collector/confmap v0.75.0/go.mod h1:T1I41gDZxvpIqUmyNziFMGBwixEsX6qNiwMY5apG5Gk= -go.opentelemetry.io/collector/consumer v0.75.0 h1:f+j560Enwrh1JHY+/dfVwidn9G/f+w0ZOx70tc0UTtg= -go.opentelemetry.io/collector/consumer v0.75.0/go.mod h1:ilbTs6xKJO+eknSor/9Q0CMed7mDSByOIbSh5khVFWY= -go.opentelemetry.io/collector/exporter v0.75.0 h1:ZOeUHUoRAstIS7xPh+vZ1a/6YO3cITJI0Ed1+XG8foA= -go.opentelemetry.io/collector/exporter v0.75.0/go.mod h1:wYSNU8OwTmnrgTK5bk84H++Ieqv4d+GVMR92wBsolJQ= -go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= -go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= -go.opentelemetry.io/collector/pdata v1.0.0-rc9 h1:K1GND9w4hOMVE4lLpGt+0KvjIBcbsR54ZsijEyUQFFI= -go.opentelemetry.io/collector/pdata v1.0.0-rc9/go.mod h1:olBmmDzT077Jyag/kVDAaG9OFkzLF6zSm8mfufL4HW4= -go.opentelemetry.io/collector/receiver v0.75.0 h1:ZgoShBSTprt7vExTLtXTmEH05qIHU3tORhBWyk0PuB4= -go.opentelemetry.io/collector/receiver v0.75.0/go.mod h1:MADsPYeztg9cGUZIjmv5ayzntt69blxfmmZHlgdM1Aw= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.75.0 h1:VXOt3k/zB/R2SxFNJQTDWm/KifCMW60m8Q3O5E2TV2c= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.75.0/go.mod h1:DjuZIm8UHX5i3YEQFPi0XWbdNOSwFO9Xnm+WaB5wXzc= -go.opentelemetry.io/collector/semconv v0.75.0 h1:zIlZk+zh1bgc3VKE1PZEmhOaVa4tQHZMcFFUXmGekVs= -go.opentelemetry.io/collector/semconv v0.75.0/go.mod h1:xt8oDOiwa1jy24tGUo8+SzpphI7ZredS2WM/0m8rtTA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 h1:5jD3teb4Qh7mx/nfzq4jO2WFFpvXD0vYWFDrdvNWmXk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0/go.mod h1:UMklln0+MRhZC4e3PwmN3pCtq4DyIadWw4yikh6bNrw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 h1:lE9EJyw3/JhrjWH/hEy9FptnalDQgj7vpbgC2KCCCxE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0/go.mod h1:pcQ3MM3SWvrA71U4GDqv9UFDJ3HQsW7y5ZO3tDTlUdI= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/prometheus v0.37.0 h1:NQc0epfL0xItsmGgSXgfbH2C1fq2VLXkZoDFsfRNHpc= -go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= -go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/collector v0.81.0 h1:pF+sB8xNXlg/W0a0QTLz4mUWyool1a9toVj8LmLoFqg= +go.opentelemetry.io/collector v0.81.0/go.mod h1:thuOTBMusXwcTPTwLbs3zwwCOLaaQX2g+Hjf8OObc/w= +go.opentelemetry.io/collector/component v0.81.0 h1:AKsl6bss/SRrW248GFpmGiiI/4kdemW92Ai/X82CCqY= +go.opentelemetry.io/collector/component v0.81.0/go.mod h1:+m6/yPiJ7O7Oc/OLfmgUB2mrY1xoUqRj4BsoOtIVpGs= +go.opentelemetry.io/collector/config/configauth v0.81.0 h1:NIiJuIGOdblN0EIJv64R2mvGhthcYfWuvyCnjk8HRN4= +go.opentelemetry.io/collector/config/configauth v0.81.0/go.mod h1:2KscbmU+8fIzwiSU9Kku0Tf4b4A1plqFIJXR1DWSaTw= +go.opentelemetry.io/collector/config/configcompression v0.81.0 h1:Q725pvVH7tR6BP3WK7Ro3pbqMeQdZEV3KeFVHchBxCc= +go.opentelemetry.io/collector/config/configcompression v0.81.0/go.mod h1:xhHm1sEH7BTECAJo1xn64NMxeIvZGKdVGdSKUUc+YuM= +go.opentelemetry.io/collector/config/configgrpc v0.81.0 h1:Q2xEE2SGbg79j3TdHT+781eUu/2uUIyrHVJAG9bLpVk= +go.opentelemetry.io/collector/config/configgrpc v0.81.0/go.mod h1:Frq/l2Ttbvm7cFH3hkxLdhl5TCNHcH6rnkpmi8U2kLY= +go.opentelemetry.io/collector/config/confighttp v0.81.0 h1:vIdiepUT7P/WtJRdfh8mjzvSqJRVF8/vl9GWtUNQlHQ= +go.opentelemetry.io/collector/config/confighttp v0.81.0/go.mod h1:I54THsffkpv//O7bUHw+0bXxjYdvyL6IHg5ksgYez8I= +go.opentelemetry.io/collector/config/confignet v0.81.0 h1:Eu8m3eX8GaGhOUc//YXvV4i3cEivxUSxkLnV1U9ydhg= +go.opentelemetry.io/collector/config/confignet v0.81.0/go.mod h1:unOg7BZvpt6T5xsf+LyeOQvUhD8ld/2AbfOsmUZ/bPM= +go.opentelemetry.io/collector/config/configopaque v0.81.0 h1:MkCAGh0WydRWydETB9FLnuCj9hDPDiz2g4Wxnl53I0w= +go.opentelemetry.io/collector/config/configopaque v0.81.0/go.mod h1:pM1oy6gasukw3H6jAvc9Q9OtFaaY2IbfeuwCPAjOgXc= +go.opentelemetry.io/collector/config/configtelemetry v0.81.0 h1:j3dhWbAcrfL1n0RmShRJf99X/xIMoPfEShN/5Z8bY0k= +go.opentelemetry.io/collector/config/configtelemetry v0.81.0/go.mod h1:KEYQRiYJdx38iZkvcLKBZWH9fK4NeafxBwGRrRKMgyA= +go.opentelemetry.io/collector/config/configtls v0.81.0 h1:2vt+yOZUvGq5ADqFAxL5ONm1ACuGXDSs87AWT54Ez4M= +go.opentelemetry.io/collector/config/configtls v0.81.0/go.mod h1:HMHTYBMMgqBpTvnNAhQYmjO7XuoBMe2T4qRHcKluB4Q= +go.opentelemetry.io/collector/config/internal v0.81.0 h1:wRV2PBnJygdmKpIdt/xfG7zdQvXvHz9L+z8MhGsOji4= +go.opentelemetry.io/collector/config/internal v0.81.0/go.mod h1:RKcLV1gQxhgwx+6rlPYsvGMq1RZNne3UeOUZkHxJnIg= +go.opentelemetry.io/collector/confmap v0.81.0 h1:AqweoBGdF3jGM2/KgP5GS6bmN+1aVrEiCy4nPf7IBE4= +go.opentelemetry.io/collector/confmap v0.81.0/go.mod h1:iCTnTqGgZZJumhJxpY7rrJz9UQ/0zjPmsJz2Z7Tp4RY= +go.opentelemetry.io/collector/consumer v0.81.0 h1:8R2iCrSzD7T0RtC2Wh4GXxDiqla2vNhDokGW6Bcrfas= +go.opentelemetry.io/collector/consumer v0.81.0/go.mod h1:jS7+gAKdOx3lD3SnaBztBjUVpUYL3ee7fpoqI4p/gT8= +go.opentelemetry.io/collector/exporter v0.81.0 h1:GLhB8WGrBx+zZSB1HIOx2ivFUMahGtAVO2CC5xbCUHQ= +go.opentelemetry.io/collector/exporter v0.81.0/go.mod h1:Di4RTzI8uRooVNATIeApNUgmGdNt8XiikUTQLabmZaA= +go.opentelemetry.io/collector/extension v0.81.0 h1:Ak7AzZzxTFJxGyVbEklsGzqHyOHW5USiifJilCcRyTU= +go.opentelemetry.io/collector/extension v0.81.0/go.mod h1:DU2bX8qulS5+OCJZGfvqIwIT/q3sFnEjI2HjJ2LDI/s= +go.opentelemetry.io/collector/extension/auth v0.81.0 h1:UzVQSG9naJh1hX7hh+HVcvB3n+rpCJXX2BBdUoL/Ybo= +go.opentelemetry.io/collector/extension/auth v0.81.0/go.mod h1:PaBFcFrzXV+UgM4VZKp6Kn1IiRC/MbEYWxTfIalcIwk= +go.opentelemetry.io/collector/featuregate v1.0.0-rcv0013 h1:tiTUG9X/gEDN1oDYQOBVUFYQfhUG2CvgW9VhBc2uk1U= +go.opentelemetry.io/collector/featuregate v1.0.0-rcv0013/go.mod h1:0mE3mDLmUrOXVoNsuvj+7dV14h/9HFl/Fy9YTLoLObo= +go.opentelemetry.io/collector/pdata v1.0.0-rcv0013 h1:4sONXE9hAX+4Di8m0bQ/KaoH3Mi+OPt04cXkZ7A8W3k= +go.opentelemetry.io/collector/pdata v1.0.0-rcv0013/go.mod h1:x09G/4KjEcDKNuWCjC5ZtnuDE0XEqiRwI+yrHSVjIy8= +go.opentelemetry.io/collector/processor v0.81.0 h1:ypyNV5R0bnN3XGMAsH/q5eNARF5vXtFgSOK9rBWzsLc= +go.opentelemetry.io/collector/processor v0.81.0/go.mod h1:ZDwO3DVg1VUSA92g0r/o0jYk+T7r9uxgZZ3LABJbC34= +go.opentelemetry.io/collector/receiver v0.81.0 h1:0c+YtIV7fmd9ev+zmwS9qjx5ASi8cw+gSypu4I7Gugc= +go.opentelemetry.io/collector/receiver v0.81.0/go.mod h1:q80JkMxVLnk0vWxoTRY2J7F4Qx9069Yy5yxDbZ4JVwk= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.81.0 h1:ewVbfATnAeQkwFK3r0dpFKCXcTb8HJKX4AixUioRt+c= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.81.0/go.mod h1:LGuSMVdOq5Zq+CEHF9YBHMaOIUZrzqW7DQGqo9g0dJA= +go.opentelemetry.io/collector/semconv v0.81.0 h1:lCYNNo3powDvFIaTPP2jDKIrBiV1T92NK4QgL/aHYXw= +go.opentelemetry.io/collector/semconv v0.81.0/go.mod h1:TlYPtzvsXyHOgr5eATi43qEMqwSmIziivJB2uctKswo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.1-0.20230612162650-64be7e574a17 h1:mdcNStUIXngF/mH3xxAo4nbR4g65IXqLL1SvYMjz7JQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.1-0.20230612162650-64be7e574a17/go.mod h1:N2Nw/UmmvQn0yCnaUzvsWzTWIeffYIdFteg6mxqCWII= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0/go.mod h1:XiYsayHc36K3EByOO6nbAXnAWbrUxdjUROCEeeROOH8= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/prometheus v0.39.0 h1:whAaiHxOatgtKd+w0dOi//1KUxj3KoPINZdtDaDj3IA= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= +go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= @@ -823,13 +844,12 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -840,8 +860,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -920,8 +940,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -948,8 +968,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1026,16 +1046,17 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1046,9 +1067,10 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1192,8 +1214,10 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210503173045-b96a97608f20/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= +google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1218,9 +1242,8 @@ google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= +google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= 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= @@ -1265,7 +1288,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= diff --git a/maestro/config/config_builder.go b/maestro/config/config_builder.go index 7ec609f19..ea5cb79d9 100644 --- a/maestro/config/config_builder.go +++ b/maestro/config/config_builder.go @@ -296,7 +296,7 @@ var JsonDeployment = ` "containers": [ { "name": "otel-collector", - "image": "otel/opentelemetry-collector-contrib:0.75.0", + "image": "otel/opentelemetry-collector-contrib:0.82.0", "ports": [ { "containerPort": 13133, diff --git a/maestro/monitor/monitor.go b/maestro/monitor/monitor.go index c9fa10ccc..5ac8a7ccd 100644 --- a/maestro/monitor/monitor.go +++ b/maestro/monitor/monitor.go @@ -71,7 +71,7 @@ func (svc *monitorService) Start(ctx context.Context, cancelFunc context.CancelF } func (svc *monitorService) getPodLogs(ctx context.Context, pod k8scorev1.Pod) ([]string, error) { - maxTailLines := int64(1) + maxTailLines := int64(10) sinceSeconds := int64(300) podLogOpts := k8scorev1.PodLogOptions{TailLines: &maxTailLines, SinceSeconds: &sinceSeconds} config, err := rest.InClusterConfig() diff --git a/maestro/redis/consumer/hashset.go b/maestro/redis/consumer/hashset.go index 3893c7fc4..75b895e84 100644 --- a/maestro/redis/consumer/hashset.go +++ b/maestro/redis/consumer/hashset.go @@ -62,10 +62,10 @@ func (es eventStore) handleSinksCreateCollector(ctx context.Context, event redis SinkID: event.SinkID, OwnerID: event.Owner, }) - if err != nil { + if err != nil || (sinkData != nil && sinkData.Config == nil) { es.logger.Error("could not fetch info for sink", zap.String("sink-id", event.SinkID), zap.Error(err)) + return err } - var metadata types.Metadata if err := json.Unmarshal(sinkData.Config, &metadata); err != nil { return err diff --git a/otelcollector/README.md b/otelcollector/README.md deleted file mode 100644 index 233cacddd..000000000 --- a/otelcollector/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# OTel in Orb MVP - -## Getting Started - -### Before you get started -Make sure your .env files, with variables of Mainflux and Orb values are in the project root directory - -### Building OpenTelemetry Collector Contrib -To use the otel-collector standard, you must download the image or build your own with the main repository for opentelemetry-collector-contrib -Use [this link](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/examples/demo#using-a-locally-built-image) to check how to do it following the main branch - -### Building orb - -```shell -make dockers run-otel -``` - -### Stopping orb - -```shell -make stop-otel -``` - -## Diagrams - - -### Metrics Flow - -```mermaid -sequenceDiagram - autonumber 1 - NATS->>Sinker: Sinker receives OTLP as usual, checks healthcheck on otelcol - Sinker->>GRPCOTelCol: Select OTel and send metric - GRPCOTelCol->>Sink: Ships information with configuration -``` - -### Sink and OTelCol Creation - -```mermaid -sequenceDiagram - autonumber 1 - Sinks->>SinkRedis: Receives sink config for id $2 - activate SinkRedis - SinkRedis->>Sinker: Sinker listens for change and create OtelCollector thread - activate OtelCol - Sinker->>OtelCol: Start streaming -``` - -### Sink and Otel Removal - -```mermaid -sequenceDiagram - autonumber 1 - activate OtelCol - activate SinkRedis - Sinker->>OtelCol: Collector is up - Sinks->>SinkRedis: Receives removal sink config for id $2 - deactivate SinkRedis - SinkRedis->>Sinker: Sinker listens for change and drop OtelCollector thread - deactivate OtelCol -``` - -### Sink and Otel Update - - -```mermaid -sequenceDiagram - autonumber 1 - activate SinkRedis - activate OtelCol - Sinker->>OtelCol: Collector is up - Sinks->>SinkRedis: Receives sink config update for id $2 - SinkRedis->>Sinker: Sinker listens for change and deletes previous OtelCollector thread - deactivate OtelCol - activate OtelCol - Sinker->>Sinker: Create new OTelCol thread with new configuration - Sinker->>OtelCol: Start streaming -``` diff --git a/otelcollector/otel-col-multi.md b/otelcollector/otel-col-multi.md deleted file mode 100644 index b056a3c3f..000000000 --- a/otelcollector/otel-col-multi.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sketches for opentelemetry-collector - -Uses cobra.Command to execute each Pipeline. - -The plan is to create a Collector, -which creates a separate pipeline for each YAML configuration - -Multiple Config files? - -One cobra.Command diff --git a/python-test/requirements.txt b/python-test/requirements.txt index cd8a90e24..91cad9c05 100644 --- a/python-test/requirements.txt +++ b/python-test/requirements.txt @@ -2,14 +2,14 @@ behave==1.2.6 ciso8601==2.3.0 docker==6.1.3 PyHamcrest==2.0.4 -PyYAML==6.0 +PyYAML==6.0.1 retry==0.9.2 -selenium==4.10.0 +selenium==4.11.0 behavex==2.0.1 -deepdiff==6.3.0 +deepdiff==6.3.1 jsonschema==4.18.4 -mkdocs==1.4.3 -mkdocs-material==9.1.18 -prometheus-client==0.17.0 +mkdocs==1.5.1 +mkdocs-material==9.1.21 +prometheus-client==0.17.1 psutil==5.9.5 -webdriver-manager==3.8.6 +webdriver-manager==3.9.1 diff --git a/sinker/otel/bridgeservice/bridge.go b/sinker/otel/bridgeservice/bridge.go index 45753d7a3..db8053531 100644 --- a/sinker/otel/bridgeservice/bridge.go +++ b/sinker/otel/bridgeservice/bridge.go @@ -2,7 +2,10 @@ package bridgeservice import ( "context" + "encoding/json" "fmt" + "github.com/orb-community/orb/pkg/types" + sinkspb "github.com/orb-community/orb/sinks/pb" "sort" "time" @@ -27,6 +30,7 @@ func NewBridgeService(logger *zap.Logger, defaultCacheExpiration time.Duration, sinkerCache config.ConfigRepo, policiesClient policiespb.PolicyServiceClient, + sinksClient sinkspb.SinkServiceClient, fleetClient fleetpb.FleetServiceClient, messageInputCounter metrics.Counter) SinkerOtelBridgeService { return SinkerOtelBridgeService{ defaultCacheExpiration: defaultCacheExpiration, @@ -35,6 +39,7 @@ func NewBridgeService(logger *zap.Logger, sinkerCache: sinkerCache, policiesClient: policiesClient, fleetClient: fleetClient, + sinksClient: sinksClient, messageInputCounter: messageInputCounter, } } @@ -46,6 +51,7 @@ type SinkerOtelBridgeService struct { sinkerCache config.ConfigRepo policiesClient policiespb.PolicyServiceClient fleetClient fleetpb.FleetServiceClient + sinksClient sinkspb.SinkServiceClient messageInputCounter metrics.Counter } @@ -65,7 +71,24 @@ func (bs *SinkerOtelBridgeService) NotifyActiveSink(ctx context.Context, mfOwner cfgRepo, err := bs.sinkerCache.Get(mfOwnerId, sinkId) if err != nil { bs.logger.Error("unable to retrieve the sink config", zap.Error(err)) - return err + sinkData, _ := bs.sinksClient.RetrieveSink(ctx, &sinkspb.SinkByIDReq{ + SinkID: sinkId, + OwnerID: mfOwnerId, + }) + var metadata types.Metadata + _ = json.Unmarshal(sinkData.Config, &metadata) + cfgRepo = config.SinkConfig{ + SinkID: sinkId, + OwnerID: mfOwnerId, + Config: metadata, + State: config.Active, + Msg: "", + } + err = bs.sinkerCache.DeployCollector(ctx, cfgRepo) + if err != nil { + bs.logger.Error("error during update sink cache", zap.String("sinkId", sinkId), zap.Error(err)) + return err + } } // only updates sink state if status Idle or Unknown diff --git a/sinker/otel/components.go b/sinker/otel/components.go index 48a912ad7..6333f9054 100644 --- a/sinker/otel/components.go +++ b/sinker/otel/components.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/receiver" - "go.opentelemetry.io/otel/metric/global" + "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/zap" ) @@ -30,7 +30,7 @@ func StartOtelMetricsComponents(ctx context.Context, bridgeService *bridgeservic TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, BuildInfo: component.NewDefaultBuildInfo(), @@ -60,7 +60,7 @@ func StartOtelMetricsComponents(ctx context.Context, bridgeService *bridgeservic TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } @@ -83,7 +83,7 @@ func StartOtelMetricsComponents(ctx context.Context, bridgeService *bridgeservic TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } @@ -118,7 +118,7 @@ func StartOtelLogsComponents(ctx context.Context, bridgeService *bridgeservice.S TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, BuildInfo: component.NewDefaultBuildInfo(), @@ -148,7 +148,7 @@ func StartOtelLogsComponents(ctx context.Context, bridgeService *bridgeservice.S TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } @@ -171,7 +171,7 @@ func StartOtelLogsComponents(ctx context.Context, bridgeService *bridgeservice.S TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } @@ -206,7 +206,7 @@ func StartOtelTracesComponents(ctx context.Context, bridgeService *bridgeservice TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, BuildInfo: component.NewDefaultBuildInfo(), @@ -236,7 +236,7 @@ func StartOtelTracesComponents(ctx context.Context, bridgeService *bridgeservice TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } @@ -259,7 +259,7 @@ func StartOtelTracesComponents(ctx context.Context, bridgeService *bridgeservice TelemetrySettings: component.TelemetrySettings{ Logger: logger, TracerProvider: trace.NewNoopTracerProvider(), - MeterProvider: global.MeterProvider(), + MeterProvider: metric.NewMeterProvider(), MetricsLevel: configtelemetry.LevelDetailed, }, } diff --git a/sinker/otel/orbreceiver/metrics.go b/sinker/otel/orbreceiver/metrics.go index 90a851153..823c61741 100644 --- a/sinker/otel/orbreceiver/metrics.go +++ b/sinker/otel/orbreceiver/metrics.go @@ -114,7 +114,6 @@ func (r *OrbReceiver) ProccessMetricsContext(scope pmetric.ScopeMetrics, channel err := r.cfg.SinkerService.NotifyActiveSink(r.ctx, agentPb.OwnerID, sinkId, "active", "") if err != nil { r.cfg.Logger.Error("error notifying metrics sink active, changing state, skipping sink", zap.String("sink-id", sinkId), zap.Error(err)) - continue } attributeCtx = context.WithValue(attributeCtx, "sink_id", sinkId) mr := pmetric.NewMetrics() diff --git a/sinker/service.go b/sinker/service.go index 89260be98..db30bd2b8 100644 --- a/sinker/service.go +++ b/sinker/service.go @@ -100,7 +100,8 @@ func (svc SinkerService) startOtel(ctx context.Context) error { if svc.otel { var err error - bridgeService := bridgeservice.NewBridgeService(svc.logger, svc.inMemoryCacheExpiration, svc.sinkerCache, svc.policiesClient, svc.fleetClient, svc.messageInputCounter) + bridgeService := bridgeservice.NewBridgeService(svc.logger, svc.inMemoryCacheExpiration, svc.sinkerCache, + svc.policiesClient, svc.sinksClient, svc.fleetClient, svc.messageInputCounter) svc.otelMetricsCancelFunct, err = otel.StartOtelMetricsComponents(ctx, &bridgeService, svc.logger, svc.otelKafkaUrl, svc.pubSub) // starting Otel Logs components diff --git a/sinks/backend/otlphttpexporter/configuration.go b/sinks/backend/otlphttpexporter/configuration.go index 48eec15f3..bb97923fc 100644 --- a/sinks/backend/otlphttpexporter/configuration.go +++ b/sinks/backend/otlphttpexporter/configuration.go @@ -31,6 +31,7 @@ import ( // insecure_skip_verify: true const EndpointFieldName = "endpoint" +const ExporterFieldName = "exporter" const CustomHeadersConfigFeature = "headers" var invalidCustomHeaders = []string{ @@ -109,14 +110,11 @@ func (b *OTLPHTTPBackend) ValidateConfiguration(config types.Metadata) error { func (b *OTLPHTTPBackend) ParseConfig(format string, config string) (retConfig types.Metadata, err error) { if format == "yaml" { - var parsedConfig OTLPHTTPBackend - err = yaml.Unmarshal([]byte(config), &parsedConfig) + retConfig = make(types.Metadata) + err = yaml.Unmarshal([]byte(config), &retConfig) if err != nil { return nil, errors.Wrap(errors.New("failed to unmarshal config"), err) } - retConfig = make(types.Metadata) - retConfig[EndpointFieldName] = parsedConfig.Endpoint - } else { return nil, errors.New("format not supported") } diff --git a/sinks/sinks_internal_test.go b/sinks/sinks_internal_test.go new file mode 100644 index 000000000..98adf9659 --- /dev/null +++ b/sinks/sinks_internal_test.go @@ -0,0 +1,80 @@ +package sinks + +import ( + "fmt" + "github.com/orb-community/orb/sinks/authentication_type" + "github.com/orb-community/orb/sinks/authentication_type/basicauth" + "github.com/orb-community/orb/sinks/backend/otlphttpexporter" + "github.com/orb-community/orb/sinks/backend/prometheus" + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + "reflect" + "testing" +) + +func Test_sinkService_validateBackend(t *testing.T) { + logger := zap.NewNop() + otlphttpexporter.Register() + prometheus.Register() + passwordService := authentication_type.NewPasswordService(logger, "unit-test") + basicauth.Register(passwordService) + type fields struct { + svc sinkService + } + type args struct { + sink *Sink + } + tests := []struct { + name string + fields fields + args args + wantBe reflect.Type + wantErr assert.ErrorAssertionFunc + }{ + { + name: "prometheus over yaml", + fields: fields{ + svc: sinkService{ + logger: logger, + }, + }, + args: args{ + sink: &Sink{ + Backend: "prometheus", + Config: nil, + Format: "yaml", + ConfigData: "authentication:\n type: basicauth\n password: \"password\"\n username: \"user\"\nexporter:\n remote_host: \"https://acme.com/api/prom/push\"\nopentelemetry: enabled\n", + }, + }, + wantBe: reflect.TypeOf(&prometheus.Backend{}), + wantErr: nil, + }, + { + name: "otlphttp over yaml", + fields: fields{ + svc: sinkService{ + logger: logger, + }, + }, + args: args{ + sink: &Sink{ + Backend: "otlphttp", + Config: nil, + Format: "yaml", + ConfigData: "authentication:\n type: basicauth\n password: \"password\"\n username: \"user\"\nexporter:\n endpoint: \"https://acme.com/api/prom/push\"\nopentelemetry: enabled\n", + }, + }, + wantBe: reflect.TypeOf(&otlphttpexporter.OTLPHTTPBackend{}), + wantErr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotBe, err := tt.fields.svc.validateBackend(tt.args.sink) + if tt.wantErr != nil && !tt.wantErr(t, err, fmt.Sprintf("validateBackend(%v)", tt.args.sink)) { + return + } + assert.Equalf(t, tt.wantBe, reflect.TypeOf(gotBe), "validateBackend(%v)", tt.args.sink.Backend) + }) + } +} diff --git a/sinks/sinks_service.go b/sinks/sinks_service.go index e87941b66..faf942bc1 100644 --- a/sinks/sinks_service.go +++ b/sinks/sinks_service.go @@ -35,7 +35,7 @@ func (svc sinkService) CreateSink(ctx context.Context, token string, sink Sink) sink.MFOwnerID = mfOwnerID - be, err := validateBackend(&sink) + be, err := svc.validateBackend(&sink) if err != nil { return Sink{}, errors.Wrap(ErrCreateSink, err) } @@ -202,7 +202,7 @@ func (svc sinkService) UpdateSinkInternal(ctx context.Context, sink Sink) (Sink, } else { sink.Backend = currentSink.Backend // we still need to validate here - be, err := validateBackend(&sink) + be, err := svc.validateBackend(&sink) if err != nil { return Sink{}, errors.Wrap(ErrMalformedEntity, err) } @@ -294,7 +294,7 @@ func (svc sinkService) UpdateSink(ctx context.Context, token string, sink Sink) } } else { sink.Backend = currentSink.Backend - be, err := validateBackend(&sink) + be, err := svc.validateBackend(&sink) if err != nil { return Sink{}, errors.Wrap(errors.New("incorrect backend and exporter configuration"), err) } @@ -457,7 +457,7 @@ func (svc sinkService) ValidateSink(ctx context.Context, token string, sink Sink sink.MFOwnerID = mfOwnerID - _, err = validateBackend(&sink) + _, err = svc.validateBackend(&sink) if err != nil { return Sink{}, errors.Wrap(ErrValidateSink, err) } @@ -474,7 +474,7 @@ func (svc sinkService) ChangeSinkStateInternal(ctx context.Context, sinkID strin return svc.sinkRepo.UpdateSinkState(ctx, sinkID, msg, ownerID, state) } -func validateBackend(sink *Sink) (be backend.Backend, err error) { +func (svc sinkService) validateBackend(sink *Sink) (be backend.Backend, err error) { if backend.HaveBackend(sink.Backend) { sink.State = Unknown } else { diff --git a/ui/package.json b/ui/package.json index 392a46884..d2661df79 100644 --- a/ui/package.json +++ b/ui/package.json @@ -71,6 +71,7 @@ "tslib": "^1.10.0", "web-animations-js": "^2.3.2", "xng-breadcrumb": "^6.7.0", + "yaml": "^1", "zone.js": "~0.10.2" }, "devDependencies": { diff --git a/ui/src/app/@core/core.module.ts b/ui/src/app/@core/core.module.ts index 3d6eefb9b..7ea5a6ce7 100644 --- a/ui/src/app/@core/core.module.ts +++ b/ui/src/app/@core/core.module.ts @@ -47,6 +47,10 @@ export const NB_CORE_PROVIDERS = [ resetPass: { endpoint: environment.resetPassUrl, method: 'put', + redirect: { + success: '/auth/login', + failure: null + } }, logout: { method: null, redirect: { success: '/', failure: '/' } }, diff --git a/ui/src/app/@theme/components/header/header.component.ts b/ui/src/app/@theme/components/header/header.component.ts index b44d4a0c6..03cb07ef3 100644 --- a/ui/src/app/@theme/components/header/header.component.ts +++ b/ui/src/app/@theme/components/header/header.component.ts @@ -39,8 +39,8 @@ export class HeaderComponent implements OnInit, OnDestroy { // Mainflux - Menu and version userMenu = [ - {title: 'Profile', link: '/pages/profile'}, - {title: 'Log out', link: '/auth/logout'}, + {title: 'Profile', link: '/pages/profile', icon: 'person-outline'}, + {title: 'Log Out', link: '/auth/logout', icon: 'log-out-outline'}, ]; version = '0.0.0'; diff --git a/ui/src/app/@theme/styles/_overrides.scss b/ui/src/app/@theme/styles/_overrides.scss index e9768151c..2b3e408b5 100644 --- a/ui/src/app/@theme/styles/_overrides.scss +++ b/ui/src/app/@theme/styles/_overrides.scss @@ -94,7 +94,25 @@ } nb-card { - border: none; + /* width */ + ::-webkit-scrollbar { + width: 4px; + height: 4px; + background: rgba(150, 159, 185, 0.5); + } + + /* Track */ + ::-webkit-scrollbar-track { + border-radius: 16px; + } + + /* Handle */ + ::-webkit-scrollbar-thumb { + background: #969fb9; + border-radius: 16px; + } + scrollbar-color: #969fb9 #969fb980; + margin: 20px 0 !important; } nb-card nb-list { @@ -123,17 +141,38 @@ } .card-button { + border-radius: 15px !important; + float: right !important; + color: #3089fc !important; + font-family: 'Montserrat', sans-serif; + font-weight: 600; + text-transform: none !important; + background-color: transparent !important; + + &.btn-disabled { + background: #2b3148; + } +} +.card-button:hover { + background-color: #171c30 !important; +} + +.add-button { border-radius: 15px !important; float: right !important; color: #fff !important; font-family: 'Montserrat', sans-serif; font-weight: 600; text-transform: none !important; + background-color: #3089fc !important; &.btn-disabled { background: #2b3148; } } +.delete-button:hover { + background-color: #2b3148 !important; +} .tableWrapper { display: flex; @@ -166,13 +205,143 @@ &online, &healthy { color: #6fcf97; } - &stale, &none { + &stale { color: #f2994a; } &error, &failure { color: #df316f; } - &offline { + &offline, &none { color: #969fb9; } -} \ No newline at end of file +} +.required { + color: #df316f; + padding-left: 2px; +} +.refresh-button { + border: none !important; + box-sizing: border-box; + box-shadow: none !important; + margin-right: 0.3rem; + + &:active, &:focus { + background-color: unset !important; + } + + &:hover { + background-color: rgba(143, 155, 179, 0.16); + } +} + +.paused { + animation: rotation 750ms linear infinite; + animation-play-state: paused; +} + +.rotate { + animation: rotation 750ms linear infinite; + animation-play-state: running; + + &:hover { + background: unset !important; + } +} + +@keyframes rotation { + from { + transform: rotate(0deg); + } + to { + transform: rotate(359deg); + } +} +.delete-selected { + color: #ffffff !important; + font-family: 'Montserrat', sans-serif; + font-weight: 600; + text-transform: none !important; + width: 110px; + background-color: #df316f !important; + opacity: 0; + animation: appear 0.3s forwards; +} + +@keyframes appear { + 0% { + opacity: 0; + transform: translateY(-10px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +p { + font-family: 'Montserrat' !important; +} + +label { + font-family: 'Montserrat' !important; +} +.input-label { + color: #fff !important; + font-size: 14px !important; + font-weight: 500 !important; +} +input { + background-color: transparent !important; +} +.next-button { + border-radius: 16px !important; + background: #3089FC !important; + padding: 8px 24px !important; + color: #fff !important; + border: none !important; + outline: none !important; + font-size: 14px !important; + font-weight: 600 !important; + transition: background-color 0.3s ease !important; +} +.next-button:hover { + background-color: #509afc!important; +} +.next-button:disabled { + background: #2b3148 !important; +} +.cancel-back-button { + border-radius: 16px !important;; + padding: 8px 24px !important; + background-color: transparent !important; + color: #3089FC !important; + border: none !important; + outline: none !important; + font-size: 14px !important; + font-weight: 600 !important; + transition: background-color 0.3s ease !important; + margin-right: 0 !important; +} +.cancel-back-button:hover { + background-color: rgba(255, 255, 255, 0.05) !important; +} +.loading-spinner { + position: absolute; + top: 45%; + left: 50%; + transform: translate(-50%, -50%); + width: 40px; + height: 40px; + border-radius: 50%; + border: 5px solid #404a70; + border-top: 5px solid #21316e; + animation: spin 1s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 1e798653b..265a5db7c 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -6,6 +6,7 @@ import { Component, OnInit } from '@angular/core'; import { GoogleAnalyticsService } from './common/services/analytics/google-service-analytics.service'; import { environment } from 'environments/environment'; +import { BreadcrumbService } from 'xng-breadcrumb'; @Component({ selector: 'ngx-app', @@ -13,7 +14,9 @@ import { environment } from 'environments/environment'; }) export class AppComponent implements OnInit { - constructor(private gtagService: GoogleAnalyticsService) { + constructor( + private gtagService: GoogleAnalyticsService, + private breadcrumbService: BreadcrumbService) { } ngOnInit() { diff --git a/ui/src/app/app.module.ts b/ui/src/app/app.module.ts index 0c9475a41..abf751850 100644 --- a/ui/src/app/app.module.ts +++ b/ui/src/app/app.module.ts @@ -24,8 +24,10 @@ import { NbInputModule, NbLayoutModule, NbMenuModule, + NbSelectModule, NbSidebarModule, NbToastrModule, + NbTooltipModule, NbWindowModule, } from '@nebular/theme'; @@ -39,6 +41,8 @@ import { ProfileComponent } from 'app/pages/profile/profile.component'; import { GoogleAnalyticsService } from './common/services/analytics/google-service-analytics.service'; import { MonacoEditorModule } from 'ngx-monaco-editor'; import { OrbService } from './common/services/orb.service'; +import { CodeEditorService } from 'app/common/services/code.editor.service'; + @NgModule({ declarations: [AppComponent, ProfileComponent], @@ -48,7 +52,8 @@ import { OrbService } from './common/services/orb.service'; HttpClientModule, AppRoutingModule, - + NbTooltipModule, + NbSelectModule, ThemeModule.forRoot(), NbSidebarModule.forRoot(), NbMenuModule.forRoot(), diff --git a/ui/src/app/auth/auth.token.interceptor.service.ts b/ui/src/app/auth/auth.token.interceptor.service.ts index b580b8c0f..b61c8e59e 100644 --- a/ui/src/app/auth/auth.token.interceptor.service.ts +++ b/ui/src/app/auth/auth.token.interceptor.service.ts @@ -65,7 +65,8 @@ export class TokenInterceptor implements HttpInterceptor { err instanceof HttpErrorResponse && err.status === 401 && !request.url.startsWith(environment.httpAdapterUrl) && - !request.url.startsWith(environment.readerUrl) + !request.url.startsWith(environment.readerUrl) && + (!request.url.endsWith('/password') && request.method !== 'PATCH') ) { localStorage.removeItem('auth_app_token'); this.router.navigateByUrl('/auth/login'); diff --git a/ui/src/app/auth/pages/reset-password/reset-password.component.ts b/ui/src/app/auth/pages/reset-password/reset-password.component.ts index a863e4f48..eceecfc57 100644 --- a/ui/src/app/auth/pages/reset-password/reset-password.component.ts +++ b/ui/src/app/auth/pages/reset-password/reset-password.component.ts @@ -22,7 +22,7 @@ export class ResetPasswordComponent extends NbResetPasswordComponent { showMessages: any = {}; - strategy: string = ''; + strategy: string = 'email'; submitted = false; diff --git a/ui/src/app/common/interfaces/orb/sink.interface.ts b/ui/src/app/common/interfaces/orb/sink.interface.ts index 21b7adf93..658618577 100644 --- a/ui/src/app/common/interfaces/orb/sink.interface.ts +++ b/ui/src/app/common/interfaces/orb/sink.interface.ts @@ -68,6 +68,15 @@ export interface Sink extends OrbEntity { * config: object containing sink specific info */ config?: SinkTypes; + + /** + * Default = json, can be Yaml + */ + format?: string; + /** + * Only used for Yaml payload + */ + config_data?: string; } export type SinkTypes = OtlpConfig; diff --git a/ui/src/app/common/services/code.editor.service.ts b/ui/src/app/common/services/code.editor.service.ts new file mode 100644 index 000000000..07a00df63 --- /dev/null +++ b/ui/src/app/common/services/code.editor.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from "@angular/core"; +import * as YAML from 'yaml'; + +@Injectable({ + providedIn: 'root', +}) + +export class CodeEditorService { + + constructor() { + + } + + isYaml(str: string) { + try { + YAML.parse(str); + return true; + } catch { + return false; + } + } + isJson(str: string) { + try { + JSON.parse(str); + return true; + } catch { + return false; + } + } + + checkEmpty (object) { + for (let key in object) { + if (object[key] === "" || typeof object[key] === "undefined" || object[key] === null) { + return true; + } + } + return false; + } +} diff --git a/ui/src/app/common/services/filter.service.ts b/ui/src/app/common/services/filter.service.ts index 329f8ee18..8d1d46701 100644 --- a/ui/src/app/common/services/filter.service.ts +++ b/ui/src/app/common/services/filter.service.ts @@ -74,6 +74,10 @@ export class FilterService { } } + removeFilterByParam(param: string) { + this.removeFilter(this._filters.findIndex((filter) => filter.param === param && filter.name === 'Name' && filter)); + } + // make a decorator out of this? createFilteredList() { return ( diff --git a/ui/src/app/common/services/orb.service.ts b/ui/src/app/common/services/orb.service.ts index bb3754668..acf5f0aa8 100644 --- a/ui/src/app/common/services/orb.service.ts +++ b/ui/src/app/common/services/orb.service.ts @@ -34,12 +34,14 @@ export const PollControls = { RESUME: true, }; +export const pollIntervalKey = 'pollinterval'; + @Injectable({ providedIn: 'root', }) export class OrbService implements OnDestroy { // interval for timer - pollInterval = 1000; + pollInterval; pollController$: BehaviorSubject; @@ -51,11 +53,15 @@ export class OrbService implements OnDestroy { // next to force refresh private forceRefresh: Subject; + isPollingPaused = false; + pausePolling() { + this.isPollingPaused = true; this.pollController$.next(PollControls.PAUSE); } startPolling() { + this.isPollingPaused = false; this.pollController$.next(PollControls.RESUME); } @@ -68,7 +74,7 @@ export class OrbService implements OnDestroy { this.pollController$.pipe( switchMap((control) => { if (control === PollControls.RESUME) - return defer(() => timer(1, this.pollInterval)); + return defer(() => timer(1, this.pollInterval)); return EMPTY; }), ), @@ -100,8 +106,23 @@ export class OrbService implements OnDestroy { this.lastPollUpdate$ = new Subject(); this.forceRefresh = new Subject(); this.killPolling = new Subject(); + this.pollInterval = this.getPollInterval(); + + this.pollController$ = new BehaviorSubject(PollControls.RESUME); + } + getPollInterval() { + + let pollInterval: number; - this.pollController$ = new BehaviorSubject(PollControls.PAUSE); + if (localStorage.getItem(pollIntervalKey)) { + pollInterval = Number(localStorage.getItem(pollIntervalKey)); + } + else { + pollInterval = 60000; + localStorage.setItem(pollIntervalKey, pollInterval.toString()); + } + + return pollInterval; } private mapTags = (list: AgentGroup[] & Sink[]) => { @@ -155,95 +176,103 @@ export class OrbService implements OnDestroy { } getAgentFullView(id: string) { - return this.agent.getAgentById(id).pipe( - mergeMap((agent) => { - const policy_state = agent?.last_hb_data?.policy_state; - const datasetIds = - !!policy_state && - Object.values(policy_state) - .map((state) => state['datasets']) - .reduce((acc, val) => acc.concat(val), []) - .filter(this.onlyUnique); - return datasetIds.length > 0 - ? forkJoin( - datasetIds.map((_id) => this.dataset.getDatasetById(_id)), - ).pipe( - map((datasets) => - datasets.reduce((acc, val: Dataset) => { - acc[val.id] = val; - return acc; - }, {}), - ), - map((datasets) => ({ agent, datasets })), - ) - : of({ agent, datasets: {} }); - }), - mergeMap(({ agent, datasets }) => { - const group_state = agent?.last_hb_data?.group_state; - const groupIds = !!group_state && Object.keys(group_state); - const groups$ = - groupIds.length > 0 - ? forkJoin(groupIds.map((_id) => this.group.getAgentGroupById(_id))) - : of([]); - return groups$.pipe(map((groups) => ({ agent, groups, datasets }))); - }), + return this.observe( + this.agent.getAgentById(id).pipe( + mergeMap((agent) => { + const policy_state = agent?.last_hb_data?.policy_state; + const datasetIds = + !!policy_state && + Object.values(policy_state) + .map((state) => state['datasets']) + .reduce((acc, val) => acc.concat(val), []) + .filter(this.onlyUnique); + return datasetIds.length > 0 + ? forkJoin( + datasetIds.map((_id) => this.dataset.getDatasetById(_id)), + ).pipe( + map((datasets) => + datasets.reduce((acc, val: Dataset) => { + acc[val.id] = val; + return acc; + }, {}), + ), + map((datasets) => ({ agent, datasets })), + ) + : of({ agent, datasets: {} }); + }), + mergeMap(({ agent, datasets }) => { + const group_state = agent?.last_hb_data?.group_state; + const groupIds = !!group_state && Object.keys(group_state); + const groups$ = + groupIds.length > 0 + ? forkJoin(groupIds.map((_id) => this.group.getAgentGroupById(_id))) + : of([]); + return groups$.pipe(map((groups) => ({ agent, groups, datasets }))); + }), + ) ); } getPolicyFullView(id: string) { // retrieve policy - return this.policy.getAgentPolicyById(id).pipe( - mergeMap((policy) => - // need a way to get a dataset linked to a policy without having to filter it out - this.dataset.getAllDatasets().pipe( - map((_dataset) => - _dataset.filter((dataset) => policy.id === dataset.agent_policy_id), + return this.observe( + this.policy.getAgentPolicyById(id).pipe( + mergeMap((policy) => + // need a way to get a dataset linked to a policy without having to filter it out + this.dataset.getAllDatasets().pipe( + map((_dataset) => + _dataset.filter((dataset) => policy.id === dataset.agent_policy_id), + ), + // from the filtered dataset list, query all agent groups associated with the list + mergeMap((datasets: Dataset[]) => { + const combinedDatasets = datasets + .map((dataset) => dataset.agent_group_id) + .filter(this.onlyUnique) + .filter((val) => !!val && val !== '') + .map((groupId) => this.group.getAgentGroupById(groupId)); + return combinedDatasets.length > 0 + ? forkJoin(combinedDatasets).pipe( + map((groups) => ({ datasets, groups, policy })), + ) + : of({ datasets, groups: [], policy }); + }), + // same for sinks + mergeMap(({ datasets, groups }) => { + const combinedSinks = datasets + .map((dataset) => dataset?.sink_ids) + .reduce((acc, val) => acc.concat(val), []) + .filter(this.onlyUnique) + .filter((val) => !!val && val !== '') + .map((sinkId) => this.sink.getSinkById(sinkId)); + return combinedSinks.length > 0 + ? forkJoin(combinedSinks).pipe( + map((sinks) => ({ datasets, sinks, policy, groups })), + ) + : of({ datasets, sinks: [], policy, groups }); + }), ), - // from the filtered dataset list, query all agent groups associated with the list - mergeMap((datasets: Dataset[]) => { - const combinedDatasets = datasets - .map((dataset) => dataset.agent_group_id) - .filter(this.onlyUnique) - .filter((val) => !!val && val !== '') - .map((groupId) => this.group.getAgentGroupById(groupId)); - return combinedDatasets.length > 0 - ? forkJoin(combinedDatasets).pipe( - map((groups) => ({ datasets, groups, policy })), - ) - : of({ datasets, groups: [], policy }); - }), - // same for sinks - mergeMap(({ datasets, groups }) => { - const combinedSinks = datasets - .map((dataset) => dataset?.sink_ids) - .reduce((acc, val) => acc.concat(val), []) - .filter(this.onlyUnique) - .filter((val) => !!val && val !== '') - .map((sinkId) => this.sink.getSinkById(sinkId)); - return combinedSinks.length > 0 - ? forkJoin(combinedSinks).pipe( - map((sinks) => ({ datasets, sinks, policy, groups })), - ) - : of({ datasets, sinks: [], policy, groups }); - }), ), - ), - // from here on I can map to any shape I like - // dataset list uses the info below - map(({ datasets, sinks, policy, groups }) => ({ - datasets: datasets.map((dataset) => ({ - ...dataset, - agent_group: groups.find( - (group) => group.id === dataset.agent_group_id, - ), - agent_policy: policy, - sinks: sinks.filter((sink) => dataset.sink_ids.includes(sink.id)), + // from here on I can map to any shape I like + // dataset list uses the info below + map(({ datasets, sinks, policy, groups }) => ({ + datasets: datasets.map((dataset) => ({ + ...dataset, + agent_group: groups.find( + (group) => group.id === dataset.agent_group_id, + ), + agent_policy: policy, + sinks: sinks.filter((sink) => dataset.sink_ids.includes(sink.id)), + })), + sinks, + policy: { ...policy, groups, datasets }, + groups, })), - sinks, - policy: { ...policy, groups, datasets }, - groups, - })), - ); + ) + ); + } + + getSinkView(id: string) { + return this.observe(this.sink.getSinkById(id)); } getDatasetListView() { diff --git a/ui/src/app/pages/dashboard/dashboard.component.scss b/ui/src/app/pages/dashboard/dashboard.component.scss index a66672376..af7247aa2 100644 --- a/ui/src/app/pages/dashboard/dashboard.component.scss +++ b/ui/src/app/pages/dashboard/dashboard.component.scss @@ -1,4 +1,5 @@ nb-card { + margin: 10px 10px !important; nb-card-header { text-align: center; background: #232940; @@ -95,16 +96,16 @@ h6 { line-height: 24px !important; & > a { - white-space: nowrap; - padding: 0 0.3rem; - background-color: #3089fc; + white-space: nowrap !important; + padding: 0 0.3rem !important; + background-color: #3089fc !important; font-weight: 700 !important; text-decoration: none !important; - text-underline: none; + text-underline: none !important; color: #ffffff !important; border-radius: 10px; - link: #ffffff; - fill: #3089fc; + link: #ffffff !important; + fill: #3089fc !important; } } } diff --git a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html index 44c00703e..952635bfd 100644 --- a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html +++ b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html @@ -18,14 +18,14 @@
- + *
- + *
@@ -69,7 +69,7 @@
- + *
- + *
@@ -129,7 +129,7 @@ +
@@ -135,376 +137,155 @@

{{ isEdit ? 'Edit Agent Policy' : 'Create Agent Policy'}}

data-orb-qa-id="step_2">
- Policy YAML Descriptor -

Provide a valid YAML configuration

-
-
- Tap Setup -

Create and configure tap

+ Policy Configuration Descriptor +

Provide a valid YAML or JSON configuration

-
- - Create Policy through {{isWizard ? "wizard editor" : "manual editor"}} - +
+ +
-
-
-
- -
- - * -
- - {{ option.key }} {{' | input type: ' + option.value?.input_type }} - -
-
-
- -
- -
-
- -
-
-
-
- -
-
- - - {{ control.value.name + "-" + control.value.props.options }} - {{ option.value }} - -
-
-
- - - - - - -
-
-
- -
-
- - - {{ control.value.name + "-" + control.value.props.options }} - {{ option.value }} - -
-
-
-
-
-
-
-
-
- -
- -
-
-
-
- -
-
- - - {{ control.value.name + "-" + control.value.props.options }} - {{ option.value }} - -
-
-
-
-
-
+
+

Paste or Upload your {{isJsonMode ? 'Json' : 'Yaml'}} configuration

+ +
-
-
-

Paste or Upload your YAML configuration

- - -
-
+
+
+ + + + + -
+ +
-
-
- - -
- Add Data Handlers -

Setup any number of handlers

+ + +
+ Review & Confirm
- -
- - - {{ handler.key }} - - - - No Handler Added. - - - +
+
+
+ +

{{detailsFG.controls.name.value}}

+
+
+
+
+
+
+ +

{{detailsFG.controls.description.value}}

+

No description provided

+
+
-
+
+
+
+ +

{{detailsFG.controls.backend.value}}

+
+
+
+
+
+ + +
+
+
+ + +
diff --git a/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.scss b/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.scss index 0af6c504f..959ba6122 100644 --- a/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.scss +++ b/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.scss @@ -22,11 +22,49 @@ nb-card-footer { mat-chip nb-icon { font-size: 1rem; } +label { + color: #969FB9; +} ngx-tag-control, ngx-tag-display { margin-top: 20px; } +.review-label { + font-family: 'Montserrat'; + font-size: 13px; + font-weight: 400 !important; + margin: 0; + color: #969fb9 !important; +} +.language-button { + border-radius: 16px; + + padding: 8px 24px; + color: #fff; + border: none; + outline: none; + font-size: 14px; + font-weight: 600; + transition: background-color 0.2s ease; + margin: 8px 4px 8px 4px; + width: 90px; + +} +.div-language-button { + background-color: #24293E; + width: fit-content; + padding: 0 4px 0 4px; + border-radius: 25px; + margin-bottom: 20px; +} +.true { + background: #3089FC; +} +.false { + background-color: #181C2F; +} + ::ng-deep { .header { align-items: flex-end !important; @@ -55,22 +93,39 @@ ngx-tag-control, ngx-tag-display { .step { flex-direction: row-reverse !important; align-items: start !important; + + &-label { + p { + font-family: 'Montserrat', sans-serif; + font-weight: 400; + color: #969fb9; + } + strong { + font-family: 'Montserrat', sans-serif; + font-weight: 700; + color: #969fb9; + } + } } .step.selected { - -webkit-text-stroke-color: rgba(255, 255, 255, 0.15); - -webkit-text-stroke-width: 1px; - text-shadow: 0 0 20px #ffffff8f; + p { + color: #fff; + } + strong { + color: #fff; + } & > .label-index { - box-shadow: 0 0 12px 1px #df316f; - background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDExIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0wLjUgMy45OTY1MUw0LjE4NjgyIDcuNjgzMzNMMTAuODIzMSAxLjA0NzA2TDkuNzgzNDEgMEw0LjE4NjgyIDUuNTk2NTlMMS41Mzk2OCAyLjk1NjgzTDAuNSAzLjk5NjUxWiIgZmlsbD0iI2ZmZiIvPgo8L3N2Zz4K'); - background-color: #df316f; + box-shadow: 0 0 12px 1px #df316f; + background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTEiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDExIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0wLjUgMy45OTY1MUw0LjE4NjgyIDcuNjgzMzNMMTAuODIzMSAxLjA0NzA2TDkuNzgzNDEgMEw0LjE4NjgyIDUuNTk2NTlMMS41Mzk2OCAyLjk1NjgzTDAuNSAzLjk5NjUxWiIgZmlsbD0iI2ZmZiIvPgo8L3N2Zz4K'); + background-color: #df316f; } } + .step-content { - width: 500px !important; + width: 500px; } .connector { @@ -79,8 +134,8 @@ ngx-tag-control, ngx-tag-display { &::after { content: ''; - height: 40px; - transform: translateY(-40px); + height: 70px; + transform: translateY(-70px); width: 1px; border-left: solid 1px #969fb9b3; position: absolute; @@ -90,7 +145,6 @@ ngx-tag-control, ngx-tag-display { .connector.connector-past { transition: background 0.5s 0s ease-in-out; - &::after { transition: border 0.5s 0s ease-in-out; border-left: solid 1px #df316f; @@ -106,6 +160,9 @@ ngx-tag-control, ngx-tag-display { .step-label { width: 214px; text-align: end; + p { + font-size: 0.9375rem; + } } ::ng-deep .orb-breadcrumb { @@ -168,18 +225,20 @@ ngx-tag-control, ngx-tag-display { } .code-editor { - height: calc(100%); + height: calc(90%); width: calc(100%); } .code-editor-wrapper { - min-height: 350px; + min-height: 300px; min-width: 200px; - height: calc(58vh); + height: calc(50vh); width: calc(100%); - display: block; } - +.stepper { + margin: 0 !important; + padding-top: 0 !important; +} .handlers-list { display: flex; flex-direction: column; diff --git a/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.ts b/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.ts index 6b96e9ff3..bf3cb9219 100644 --- a/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.ts +++ b/ui/src/app/pages/datasets/policies.agent/add/agent.policy.add.component.ts @@ -4,14 +4,10 @@ import { NotificationsService } from 'app/common/services/notifications/notifica import { ActivatedRoute, Router } from '@angular/router'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AgentPolicy } from 'app/common/interfaces/orb/agent.policy.interface'; -import { DynamicFormConfig } from 'app/common/interfaces/orb/dynamic.form.interface'; import { AgentPoliciesService } from 'app/common/services/agents/agent.policies.service'; -import { PolicyTap } from 'app/common/interfaces/orb/policy/policy.tap.interface'; -import { NbDialogService } from '@nebular/theme'; -import { HandlerPolicyAddComponent } from 'app/pages/datasets/policies.agent/add/handler.policy.add.component'; import { STRINGS } from '../../../../../assets/text/strings'; import { Tags } from 'app/common/interfaces/orb/tag'; - +import { CodeEditorService } from 'app/common/services/code.editor.service'; const CONFIG = { TAPS: 'TAPS', BACKEND: 'BACKEND', @@ -32,39 +28,10 @@ export class AgentPolicyAddComponent { // agent policy general information - name, desc, backend detailsFG: FormGroup; - // selected tap, input_type - tapFG: FormGroup; - - // dynamic input config - inputConfigFG: FormGroup; - - // dynamic input filter config - inputFilterFG: FormGroup; - // #key inputs holders // selected backend object backend: { [propName: string]: any }; - // selected tap object - tap: PolicyTap; - - // selected input object - input: { - version?: string, - config?: DynamicFormConfig, - filter?: DynamicFormConfig, - }; - - // holds all handlers added by user - modules: { - [propName: string]: { - name?: string, - type?: string, - config?: { [propName: string]: {} | any }, - filter?: { [propName: string]: {} | any }, - }, - } = {}; - // #services responses // hold info retrieved availableBackends: { @@ -74,22 +41,19 @@ export class AgentPolicyAddComponent { }, }; - availableTaps: { [propName: string]: PolicyTap }; - - availableInputs: { - [propName: string]: { - version?: string, - config?: DynamicFormConfig, - filter?: DynamicFormConfig, - }, - }; - agentPolicy: AgentPolicy; agentPolicyID: string; - @ViewChild('editorComponent') - editor; + reviewPolicyConfig: boolean; + + editorVisible = true; + + @ViewChild('editorComponentYaml') + editorYaml; + + @ViewChild('editorComponentJson') + editorJson; isEdit: boolean; @@ -103,8 +67,29 @@ export class AgentPolicyAddComponent { lineDecorationsWidth: 0, lineNumbersMinChars: 0, }; + editorOptionsJson = { + theme: 'vs-dark', + dragAndDrop: true, + wordWrap: 'on', + detectIndentation: true, + tabSize: 2, + autoIndent: 'full', + formatOnPaste: true, + trimAutoWhitespace: true, + formatOnType: true, + matchBrackets: 'always', + language: 'json', + automaticLayout: true, + glyphMargin: false, + folding: true, + readOnly: false, + scrollBeyondLastLine: false, + // Undocumented see https://github.com/Microsoft/vscode/issues/30795#issuecomment-410998882 + lineDecorationsWidth: 0, + lineNumbersMinChars: 0, + }; - code = `handlers: + codeyaml = `handlers: modules: default_dns: type: dns @@ -115,8 +100,28 @@ input: tap: default_pcap kind: collection`; + codejson = + `{ + "handlers": { + "modules": { + "default_dns": { + "type": "dns" + }, + "default_net": { + "type": "net" + } + } + }, + "input": { + "input_type": "pcap", + "tap": "default_pcap" + }, + "kind": "collection" +} + `; + // is config specified wizard mode or in YAML or JSON - isWizard = true; + isJsonMode = true; // format definition format = 'yaml'; @@ -132,21 +137,24 @@ kind: collection`; uploadIconKey = 'upload-outline' + isRequesting: boolean; + constructor( private agentPoliciesService: AgentPoliciesService, private notificationsService: NotificationsService, private router: Router, private route: ActivatedRoute, private _formBuilder: FormBuilder, - private dialogService: NbDialogService, + private editor: CodeEditorService, ) { + this.reviewPolicyConfig = false; + this.isRequesting = false; this.agentPolicyID = this.route.snapshot.paramMap.get('id'); this.agentPolicy = this.newAgent(); this.isEdit = !!this.agentPolicyID; this.readyForms(); - Promise.all([ this.isEdit ? this.retrieveAgentPolicy() : Promise.resolve(), this.getBackendsList(), @@ -154,13 +162,16 @@ kind: collection`; .then(() => this.updateForms()) .catch((reason) => console.warn(`Couldn't fetch ${this.agentPolicy?.backend} data. Reason: ${reason}`)); } - + ngOnInit(): void { + this.selectedTags = this.agentPolicy?.tags || {}; + } resizeComponents() { const timeoutId = setTimeout(() => { window.dispatchEvent(new Event('resize')); clearTimeout(timeoutId); }, 50); - !!this.editor?.layout && this.editor.layout(); + !!this.editorJson?.layout && this.editorJson.layout(); + !!this.editorYaml?.layout && this.editorYaml.layout(); } newAgent() { @@ -199,43 +210,16 @@ kind: collection`; } readyForms() { - const { - name, - description, - backend, - policy_data, - tags, - policy: { - input: { - tap, - input_type, - }, - handlers: { - modules, - }, - }, - } = this.agentPolicy; - - if (policy_data) { - this.code = policy_data; - } - this.selectedTags = { ...tags }; - this.modules = modules; - this.detailsFG = this._formBuilder.group({ name: [name, [ Validators.required, Validators.pattern('^[a-zA-Z_][a-zA-Z0-9_-]*$'), Validators.maxLength(64), ]], - description: [description, [ + description: [[ Validators.maxLength(64), ]], - backend: [{ backend }, [Validators.required]], - }); - this.tapFG = this._formBuilder.group({ - selected_tap: [tap, Validators.required], - input_type: [input_type, Validators.required], + backend: [[Validators.required]], }); } @@ -254,14 +238,12 @@ kind: collection`; const wizard = format !== this.format; if (policy_data) { - this.isWizard = false; - this.code = policy_data; + this.isJsonMode = false; + this.codeyaml = policy_data; } this.detailsFG.patchValue({ name, description, backend }); - this.modules = handlers?.modules || {}; - if (wizard) { this.onBackendSelected(backend).catch(reason => console.warn(`${reason}`)); } @@ -284,170 +266,12 @@ kind: collection`; } onBackendSelected(selectedBackend) { - return new Promise((resolve) => { + return new Promise(() => { this.backend = this.availableBackends[selectedBackend]; this.backend['config'] = {}; - - // todo hardcoded for pktvisor - this.getBackendData().then(() => { - resolve(null); - }); }); } - getBackendData() { - return Promise.all([this.getTaps(), this.getInputs()]) - .then(value => { - if (this.isEdit && this.agentPolicy && this.isWizard) { - const selected_tap = this.agentPolicy.policy.input.tap; - this.tapFG.patchValue({ selected_tap }, { emitEvent: true }); - this.onTapSelected(selected_tap); - this.tapFG.controls.selected_tap.disable(); - } - - }, reason => console.warn(`Cannot retrieve backend data - reason: ${JSON.parse(reason)}`)) - .catch(reason => { - console.warn(`Cannot retrieve backend data - reason: ${JSON.parse(reason)}`); - }); - } - - getTaps() { - return new Promise((resolve) => { - this.isLoading[CONFIG.TAPS] = true; - this.agentPoliciesService.getBackendConfig([this.backend.backend, 'taps']) - .subscribe(taps => { - this.availableTaps = taps.reduce((acc, curr) => { - acc[curr.name] = curr; - return acc; - }, {}); - - this.isLoading[CONFIG.TAPS] = false; - - resolve(taps); - }); - }); - } - - onTapSelected(selectedTap) { - this.tap = this.availableTaps[selectedTap]; - this.tapFG.controls.selected_tap.patchValue(selectedTap); - - const { input } = this.agentPolicy.policy; - const { input_type, config_predefined, filter_predefined } = this.tap; - - this.tap.config = { - ...config_predefined, - ...input.config, - }; - - this.tap.filter = { - ...filter_predefined, - ...input.filter, - }; - - if (input_type) { - this.onInputSelected(input_type); - } else { - this.input = null; - this.tapFG.controls.input_type.reset(''); - } - } - - getInputs() { - return new Promise((resolve) => { - this.isLoading[CONFIG.INPUTS] = true; - this.agentPoliciesService.getBackendConfig([this.backend.backend, 'inputs']) - .subscribe(inputs => { - this.availableInputs = !!inputs && inputs; - - this.isLoading[CONFIG.INPUTS] = false; - - resolve(inputs); - }); - }); - - } - - onInputSelected(input_type) { - // TODO version here - this.input = this.availableInputs[input_type]['1.0']; - - this.tapFG.patchValue({ input_type }); - - // input type config model - const { config: inputConfig, filter: filterConfig } = this.input; - // if editing, some values might not be overrideable any longer, all should be prefilled in form - const { config: agentConfig, filter: agentFilter } = this.agentPolicy.policy.input; - // tap config values, cannot be overridden if set - const { config_predefined: preConfig, filter_predefined: preFilter } = this.tap; - - // populate form controls for config - const inputConfDynamicCtrl = Object.entries(inputConfig) - .reduce((acc, [key, input]) => { - const value = agentConfig?.[key] || ''; - if (!preConfig?.includes(key)) { - acc[key] = [ - value, - [!!input?.props?.required && input.props.required === true ? Validators.required : Validators.nullValidator], - ]; - } - return acc; - }, {}); - - this.inputConfigFG = Object.keys(inputConfDynamicCtrl).length > 0 ? this._formBuilder.group(inputConfDynamicCtrl) : null; - - const inputFilterDynamicCtrl = Object.entries(filterConfig) - .reduce((acc, [key, input]) => { - const value = !!agentFilter?.[key] ? agentFilter[key] : ''; - // const disabled = !!preConfig?.[key]; - if (!preFilter?.includes(key)) { - acc[key] = [ - value, - [!!input?.props?.required && input.props.required === true ? Validators.required : Validators.nullValidator], - ]; - } - return acc; - }, {}); - - this.inputFilterFG = Object.keys(inputFilterDynamicCtrl).length > 0 ? this._formBuilder.group(inputFilterDynamicCtrl) : null; - - } - - addHandler() { - this.dialogService.open(HandlerPolicyAddComponent, { - context: { - backend: this.backend, - modules: this.modules, - }, - autoFocus: true, - closeOnEsc: true, - }).onClose.subscribe((handler) => { - // save handler to the policy being created/edited - if (handler) { - this.onHandlerAdded(handler); - } - }); - } - - onHandlerAdded(handler) { - const { config, filter, type, name } = handler; - - this.modules[name] = ({ - type, - config, - filter, - }); - - } - - onHandlerRemoved(name) { - delete this.modules[name]; - } - - hasModules() { - return Object.keys(this.modules).length > 0; - } - goBack() { this.router.navigateByUrl('/pages/datasets/policies'); } @@ -460,104 +284,68 @@ kind: collection`; const reader: FileReader = new FileReader(); reader.onload = (e: any) => { - this.code = e.target.result; + const fileContent = e.target.result; + if (this.isJsonMode) { + this.codejson = fileContent; + } else { + this.codeyaml = fileContent; + } }; reader.readAsText(file); } - onYAMLSubmit() { - const payload = { - name: this.detailsFG.controls.name.value, - description: this.detailsFG.controls.description.value, - backend: this.detailsFG.controls.backend.value, - format: this.format, - policy_data: this.code, - version: !!this.isEdit && !!this.agentPolicy.version && this.agentPolicy.version || 1, - }; - + onSubmit() { + this.isRequesting = true; + let payload = {}; + if (this.isJsonMode) { + const policy = JSON.parse(this.codejson); + payload = { + name: this.detailsFG.controls.name.value, + description: this.detailsFG.controls.description.value, + backend: this.detailsFG.controls.backend.value, + policy: policy, + version: !!this.isEdit && !!this.agentPolicy.version && this.agentPolicy.version || 1, + tags: this.selectedTags, + } + } + else { + payload = { + name: this.detailsFG.controls.name.value, + description: this.detailsFG.controls.description.value, + backend: this.detailsFG.controls.backend.value, + format: this.format, + policy_data: this.codeyaml, + version: !!this.isEdit && !!this.agentPolicy.version && this.agentPolicy.version || 1, + tags: this.selectedTags, + }; + } this.submit(payload); } - onFormSubmit() { - const payload = { - name: this.detailsFG.controls.name.value, - description: this.detailsFG.controls.description.value, - backend: this.detailsFG.controls.backend.value, - tags: { ...this.selectedTags }, - version: !!this.isEdit && !!this.agentPolicy.version && this.agentPolicy.version || 1, - policy: { - kind: 'collection', - input: { - tap: this.tap.name, - input_type: this.tapFG.controls.input_type.value, - ...Object.entries(this.inputConfigFG?.controls || {}) - .map(([key, control]) => ({ [key]: control.value })) - .reduce((acc, curr) => { - for (const [key, value] of Object.entries(curr)) { - if (!!value && value !== '') acc.config[key] = value; - } - return acc; - }, { config: {} }), - ...Object.entries(this.inputFilterFG?.controls || {}) - .map(([key, control]) => ({ [key]: control.value })) - .reduce((acc, curr) => { - for (const [key, value] of Object.entries(curr)) { - if (!!value && value !== '') acc.filter[key] = value; - } - return acc; - }, { filter: {} }), - }, - handlers: { - modules: Object.entries(this.modules).reduce((acc, [key, value]) => { - const { type, config, filter } = value; - acc[key] = { - type, - config, - filter, - }; - if (Object.keys(config || {}).length > 0) acc[key][config] = config; - return acc; - }, {}), - }, + submit(payload) { + this.agentPoliciesService.addAgentPolicy(payload).subscribe( + (next) => { + this.notificationsService.success('Agent Policy successfully created', ''); + this.viewPolicy(next.id); }, - } as AgentPolicy; - - if (Object.keys(payload.policy?.input?.config).length <= 0) - delete payload.policy.input.config; - if (Object.keys(payload.policy?.input?.filter).length <= 0) - delete payload.policy.input.filter; - - this.submit(payload); + (error) => { + this.notificationsService.error( + 'Failed to create Agent Policy', + `Error: ${error.status} - ${error.statusText} - ${error.error.error}`, + ); + this.isRequesting = false; + }, + ); } - - submit(payload) { - if (this.isEdit) { - // updating existing sink - this.agentPoliciesService.editAgentPolicy({ ...payload, id: this.agentPolicyID }).subscribe( - (next) => { - this.notificationsService.success('Agent Policy successfully updated', ''); - this.viewPolicy(this.agentPolicyID); - }, - (error) => { - this.notificationsService.error( - 'Failed to edit Agent Policy', - `Error: ${error.status} - ${error.statusText}`, - ); - }, - ); + canCreate() { + if (this.isJsonMode) { + return this.editor.isJson(this.codejson); } else { - this.agentPoliciesService.addAgentPolicy(payload).subscribe( - (next) => { - this.notificationsService.success('Agent Policy successfully created', ''); - this.viewPolicy(next.id); - }, - (error) => { - this.notificationsService.error( - 'Failed to create Agent Policy', - `Error: ${error.status} - ${error.statusText} - ${error.error.error}`, - ); - }, - ); + return this.editor.isYaml(this.codeyaml); } } + refreshEditor() { + this.editorVisible = false; setTimeout(() => { this.editorVisible = true; }, 0); + } + } diff --git a/ui/src/app/pages/datasets/policies.agent/delete/agent.policy.delete.component.scss b/ui/src/app/pages/datasets/policies.agent/delete/agent.policy.delete.component.scss index c45601370..33f8c6453 100644 --- a/ui/src/app/pages/datasets/policies.agent/delete/agent.policy.delete.component.scss +++ b/ui/src/app/pages/datasets/policies.agent/delete/agent.policy.delete.component.scss @@ -1,43 +1,48 @@ nb-card { - max-width: 38rem; - + max-width: 38rem !important; + padding: 0 !important; + nb-card-header { - background: #232940; - color: #969fb9; + background: #232940 !important; + color: #969fb9 !important; } - + nb-card-body { - margin: 2rem 3rem; - padding: 0; - + margin: 2rem 3rem !important; + padding: 0 !important; + p { - color: #969fb9; + color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } - + .ns1-red { - color: #df316f; + color: #df316f !important; } } - + nb-card-footer { - text-align: center; - padding: 1.5rem; + text-align: center !important; + padding: 1.5rem !important; } } // ORB ::ng-deep { .orb-close-dialog { - background-color: #23294000; - border-radius: 4px; - display: contents; - float: right; + background-color: #23294000 !important; + border-radius: 4px !important; + display: contents !important; + float: right !important; > span { - float: right; - font-size: 1.5rem; - color: #3089fc; - font-weight: 900; + float: right !important; + font-size: 1.5rem !important; + color: #3089fc !important; + font-weight: 900 !important; } } diff --git a/ui/src/app/pages/datasets/policies.agent/duplicate/agent.policy.duplicate.confirmation.scss b/ui/src/app/pages/datasets/policies.agent/duplicate/agent.policy.duplicate.confirmation.scss index 9b2c47f2a..87db6a24b 100644 --- a/ui/src/app/pages/datasets/policies.agent/duplicate/agent.policy.duplicate.confirmation.scss +++ b/ui/src/app/pages/datasets/policies.agent/duplicate/agent.policy.duplicate.confirmation.scss @@ -1,5 +1,6 @@ nb-card { max-width: 38rem !important; + padding: 0 !important; nb-card-header { background: #232940 !important; @@ -12,6 +13,10 @@ nb-card { p { color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } .ns1-red { diff --git a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.html b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.html index 4d5060dbf..aa459edda 100644 --- a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.html +++ b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.html @@ -23,13 +23,14 @@

All Policies

class="delete-selected" nbButton shape="round"> + Delete
+ All Policies let-row="row" let-value="value" > - - - {{ tag | tagchip }} - - - No tags were created - - + + + {{ tag.key }}:  + {{ tag.value }} + + + No tag were created + + + diff --git a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.scss b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.scss index 383329cf7..289605f05 100644 --- a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.scss +++ b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.scss @@ -187,6 +187,21 @@ mat-chip-list { animation-direction: alternate; } } + +::ng-deep .mat-chip-list { + display: block; +} + +@keyframes slidetween { + from { + transform: translateX(0); + } + + to { + transform: translateX(-70%); + } +} + .orb-service-{ &in { color: #6fcf97; @@ -204,14 +219,6 @@ mat-chip-list { align-items: center; gap: 10px; } -.delete-selected { - color: #ffffff !important; - font-family: 'Montserrat', sans-serif; - font-weight: 600; - text-transform: none !important; - width: 90px; - background-color: #df316f !important; -} input[type=checkbox] { margin-left: 10px; } \ No newline at end of file diff --git a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.ts b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.ts index 9725f1f5a..e54b32e47 100644 --- a/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.ts +++ b/ui/src/app/pages/datasets/policies.agent/list/agent.policy.list.component.ts @@ -204,7 +204,6 @@ export class AgentPolicyListComponent ngAfterViewInit() { - this.orb.refreshNow(); this.columns = [ { name: '', diff --git a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.html b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.html index 7fbad4da7..aae188a96 100644 --- a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.html +++ b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.html @@ -1,5 +1,5 @@
-
+
Policy View
-
-
- - - - Last Update: {{ lastUpdate | date: 'HH:mm:ss a' }} - - - - - -
+
+ + +
+ + + +
+
+
+
+
-
+
-
+
+ -
diff --git a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.scss b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.scss index a7c18bc61..19ed35e11 100644 --- a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.scss +++ b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.scss @@ -145,7 +145,7 @@ nb-card { button { margin: 0 3px; - + max-height: 36px; &.policy-duplicate { float: right; color: #fff !important; @@ -166,7 +166,7 @@ button { float: right; color: #fff !important; font-family: 'Montserrat', sans-serif; - font-weight: 500; + font-weight: 700; text-transform: none !important; &.btn-disabled { @@ -182,7 +182,7 @@ button { float: right; color: #fff !important; font-family: 'Montserrat', sans-serif; - font-weight: 500; + font-weight: 700; text-transform: none !important; &.btn-disabled { @@ -235,7 +235,19 @@ button { color: #969fb9; font-size: 14px; } +header { + display: flex; + justify-content: space-between; + align-items: center; +} + +.left-content { + flex: 1; + margin-left: 0.9rem; +} + .right-content { display: flex; - justify-content: flex-end; + align-items: center; } + diff --git a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.ts b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.ts index c060f8eb0..04fffa9ef 100644 --- a/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.ts +++ b/ui/src/app/pages/datasets/policies.agent/view/agent.policy.view.component.ts @@ -18,22 +18,25 @@ import { PolicyConfig } from 'app/common/interfaces/orb/policy/config/policy.con import { AgentPoliciesService } from 'app/common/services/agents/agent.policies.service'; import { NotificationsService } from 'app/common/services/notifications/notifications.service'; import { OrbService } from 'app/common/services/orb.service'; +import { CodeEditorService } from 'app/common/services/code.editor.service'; import { PolicyDetailsComponent } from 'app/shared/components/orb/policy/policy-details/policy-details.component'; import { PolicyInterfaceComponent } from 'app/shared/components/orb/policy/policy-interface/policy-interface.component'; import { STRINGS } from 'assets/text/strings'; import { Subscription } from 'rxjs'; import yaml from 'js-yaml'; import { AgentGroup } from 'app/common/interfaces/orb/agent.group.interface'; -import { filter } from 'rxjs/operators'; import { PolicyDuplicateComponent } from '../duplicate/agent.policy.duplicate.confirmation'; import { NbDialogService } from '@nebular/theme'; +import { updateMenuItems } from 'app/pages/pages-menu'; +import { AgentPolicyDeleteComponent } from '../delete/agent.policy.delete.component'; +import { error } from 'console'; @Component({ selector: 'ngx-agent-view', templateUrl: './agent.policy.view.component.html', styleUrls: ['./agent.policy.view.component.scss'], }) -export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { +export class AgentPolicyViewComponent implements OnInit, OnDestroy { strings = STRINGS.agents; isLoading: boolean; @@ -52,6 +55,8 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { interface: false, }; + isRequesting: boolean; + lastUpdate: Date | null = null; @ViewChild(PolicyDetailsComponent) detailsComponent: PolicyDetailsComponent; @@ -67,10 +72,14 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { private notifications: NotificationsService, private router: Router, private dialogService: NbDialogService, - ) {} + private editor: CodeEditorService, + ) { + this.isRequesting = false; + } ngOnInit() { this.fetchData(); + updateMenuItems('Policy Management'); } fetchData(newPolicyId?: any) { @@ -85,9 +94,6 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { this.lastUpdate = new Date(); } - ngOnChanges(): void { - this.fetchData(); - } isEditMode() { return Object.values(this.editMode).reduce( @@ -101,10 +107,14 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { ? this.detailsComponent?.formGroup?.status === 'VALID' : true; - const interfaceValid = this.editMode.interface - ? this.interfaceComponent?.formControl?.status === 'VALID' - : true; + let config = this.interfaceComponent?.code + let interfaceValid = false; + if (this.editor.isJson(config)) { + interfaceValid = true; + } else if (this.editor.isYaml(config)) { + interfaceValid = true; + } return detailsValid && interfaceValid; } @@ -114,6 +124,8 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { } save() { + this.isRequesting = true; + const { format, version, name, description, id, backend } = this.policy; // get values from all modified sections' forms and submit through service. @@ -151,12 +163,18 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { backend, } as AgentPolicy; - this.policiesService.editAgentPolicy(payload).subscribe((resp) => { + this.policiesService.editAgentPolicy(payload).subscribe( + (resp) => { this.notifications.success('Agent Policy updated successfully', ''); this.discard(); this.policy = resp; - this.fetchData(); - }); + this.orb.refreshNow(); + this.isRequesting = false; + }, + (error) => { + this.isRequesting = false; + } + ); } catch (err) { this.notifications.error( @@ -208,5 +226,46 @@ export class AgentPolicyViewComponent implements OnInit, OnDestroy, OnChanges { ngOnDestroy() { this.policySubscription?.unsubscribe(); + this.orb.isPollingPaused ? this.orb.startPolling() : null; + this.orb.killPolling.next(); + } + openDeleteModal() { + const { name: name, id } = this.policy as AgentPolicy; + this.dialogService + .open(AgentPolicyDeleteComponent, { + context: { name }, + autoFocus: true, + closeOnEsc: true, + }) + .onClose.subscribe((confirm) => { + if (confirm) { + this.policiesService.deleteAgentPolicy(id).subscribe(() => { + this.notifications.success( + 'Agent Policy successfully deleted', + '', + ); + this.goBack(); + }); + } + }); + } + goBack() { + this.router.navigateByUrl('/pages/datasets/policies'); + } + + hasChanges() { + let policyDetails = this.detailsComponent.formGroup?.value; + const tags = this.detailsComponent.selectedTags; + + const description = this.policy.description ? this.policy.description : ""; + const formsDescription = policyDetails.description === null ? "" : policyDetails.description + + let selectedTags = JSON.stringify(tags); + let orb_tags = JSON.stringify(this.policy.tags); + + if (policyDetails.name !== this.policy.name || formsDescription !== description || selectedTags !== orb_tags) { + return true; + } + return false; } } diff --git a/ui/src/app/pages/fleet/agents/add/agent.add.component.html b/ui/src/app/pages/fleet/agents/add/agent.add.component.html index 1450ac748..e6d920d42 100644 --- a/ui/src/app/pages/fleet/agents/add/agent.add.component.html +++ b/ui/src/app/pages/fleet/agents/add/agent.add.component.html @@ -25,50 +25,49 @@

{{isEdit ? 'Edit Agent' : 'New Agent'}}

- - * +
- -

+ [status]="firstFormGroup.controls?.name.dirty ? (!firstFormGroup.controls.name.valid ? 'danger' : 'success') : 'basic'" + nbInput + placeholder="Agent Name"/> + +

Name is required! -

-

+

+
Name must start with a letter or "_" and contain only letters, numbers, "-" or "_" -

-

+

+
Name must be less than {{firstFormGroup.controls.name.errors?.maxlength.requiredLength}} characters -

+

- +
@@ -88,32 +87,32 @@

{{isEdit ? 'Edit Agent' : 'New Agent'}}


- - + +
{{isEdit ? 'Edit Agent' : 'New Agent'}}
- +

{{firstFormGroup.controls.name.value}}

@@ -134,39 +133,40 @@

{{isEdit ? 'Edit Agent' : 'New Agent'}}


- +

- - +
diff --git a/ui/src/app/pages/fleet/agents/add/agent.add.component.scss b/ui/src/app/pages/fleet/agents/add/agent.add.component.scss index d708b3e00..e6bdcc01c 100644 --- a/ui/src/app/pages/fleet/agents/add/agent.add.component.scss +++ b/ui/src/app/pages/fleet/agents/add/agent.add.component.scss @@ -107,6 +107,14 @@ nb-card-footer { } } +.review-label { + font-family: 'Montserrat'; + font-size: 13px; + font-weight: 400 !important; + margin: 0; + color: #969fb9 !important; +} + .required { color: #df316f; padding-left: 2px; diff --git a/ui/src/app/pages/fleet/agents/add/agent.add.component.ts b/ui/src/app/pages/fleet/agents/add/agent.add.component.ts index 3f6fc9ac4..7d4d86512 100644 --- a/ui/src/app/pages/fleet/agents/add/agent.add.component.ts +++ b/ui/src/app/pages/fleet/agents/add/agent.add.component.ts @@ -9,6 +9,7 @@ import { NotificationsService } from 'app/common/services/notifications/notifica import { AgentKeyComponent } from '../key/agent.key.component'; import { Tags } from 'app/common/interfaces/orb/tag'; + @Component({ selector: 'ngx-agent-add-component', templateUrl: './agent.add.component.html', @@ -35,6 +36,8 @@ export class AgentAddComponent { agentID; + isRequesting: boolean; + constructor( private agentsService: AgentsService, private dialogService: NbDialogService, @@ -43,6 +46,7 @@ export class AgentAddComponent { private route: ActivatedRoute, private _formBuilder: FormBuilder, ) { + this.isRequesting = false; this.isLoading = true; this.agentID = this.route.snapshot.paramMap.get('id'); @@ -113,6 +117,7 @@ export class AgentAddComponent { // saves current agent group onFormSubmit() { + this.isRequesting = true; const payload = this.wrapPayload(false); if (this.isEdit) { @@ -123,6 +128,9 @@ export class AgentAddComponent { } else { this.agentsService.addAgent(payload).subscribe((resp) => { this.openKeyModal(resp); + }, + (error) => { + this.isRequesting = false; }); } } diff --git a/ui/src/app/pages/fleet/agents/delete/agent.delete.component.scss b/ui/src/app/pages/fleet/agents/delete/agent.delete.component.scss index 3f3548d1f..003444e84 100644 --- a/ui/src/app/pages/fleet/agents/delete/agent.delete.component.scss +++ b/ui/src/app/pages/fleet/agents/delete/agent.delete.component.scss @@ -1,43 +1,48 @@ nb-card { - max-width: 38rem; - + max-width: 38rem !important; + padding: 0 !important; + nb-card-header { - background: #232940; - color: #969fb9; + background: #232940 !important; + color: #969fb9 !important; } - + nb-card-body { - margin: 2rem 3rem; - padding: 0; - + margin: 2rem 3rem !important; + padding: 0 !important; + p { - color: #969fb9; + color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } - + .ns1-red { - color: #df316f; + color: #df316f !important; } } - + nb-card-footer { - text-align: center; - padding: 1.5rem; + text-align: center !important; + padding: 1.5rem !important; } } // ORB ::ng-deep { .orb-close-dialog { - background-color: #23294000; - border-radius: 4px; - display: contents; - float: right; + background-color: #23294000 !important; + border-radius: 4px !important; + display: contents !important; + float: right !important; > span { - float: right; - font-size: 1.5rem; - color: #3089fc; - font-weight: 900; + float: right !important; + font-size: 1.5rem !important; + color: #3089fc !important; + font-weight: 900 !important; } } diff --git a/ui/src/app/pages/fleet/agents/key/agent.key.component.html b/ui/src/app/pages/fleet/agents/key/agent.key.component.html index 17cb55a95..966c4249f 100644 --- a/ui/src/app/pages/fleet/agents/key/agent.key.component.html +++ b/ui/src/app/pages/fleet/agents/key/agent.key.component.html @@ -12,42 +12,104 @@ -

Make sure to copy the Agent Key now. You won’t be able to see it again!

- - -
-      
-      {{ agent?.key }}
-    
- - -

+

+ *Make sure to copy the Agent Key now. You won’t be able to see it again! +

+ + Agent Key + +
+          
+          {{ agent?.key }}
+        
+
+
+

See here + target="_blank">Click here - for more advanced options. -

-
-      
-      
+          
+          
+            {{ defaultCommandShow }}
+          
+        
+
+ + + + Provisioning Command with Configuration File + - - {{ command2show }} - - + + + + +
+          
+          
+          
+            {{ fileConfigCommandShow }}
+          
+        
+
+
+

+ Click here + +   to learn more about how create and apply configuration files. +

diff --git a/ui/src/app/pages/fleet/agents/key/agent.key.component.scss b/ui/src/app/pages/fleet/agents/key/agent.key.component.scss index fea7f7f75..c87226b2e 100644 --- a/ui/src/app/pages/fleet/agents/key/agent.key.component.scss +++ b/ui/src/app/pages/fleet/agents/key/agent.key.component.scss @@ -1,17 +1,30 @@ nb-card { - max-width: 50rem; - + max-width: 60rem; + max-height: 700px; + min-width: 700px; + nb-card-header { - background: #232940; + background-color: #232940; + border-bottom: transparent; + border-radius: 0.5rem; color: #969fb9; + padding: 0.5rem 1rem; + button { + float: right; + } + nb-icon { + float: right ; + } } nb-card-body { - margin: 2rem 3rem; + border-bottom-left-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + margin: 0 2rem 2rem 2rem; padding: 0; p { - color: #969fb9; + color: #fff; } .ns1-red { @@ -25,8 +38,9 @@ nb-card { align-content: space-between; align-items: flex-start; justify-content: space-between; + margin: 0; - background: #1c2339; + background: transparent; padding: 0.75rem; border-radius: 0.5rem; white-space: pre-line; @@ -45,6 +59,7 @@ nb-card { code { color: #ffffff; line-height: 2.5 !important; + font-size: 16px !important; } } } @@ -76,3 +91,13 @@ nb-card { color: #df316f !important; } } +a { + white-space: nowrap !important; + padding: 0 0.3rem !important; + background-color: #3089fc !important; + font-weight: 700 !important; + text-decoration: none !important; + color: #ffffff !important; + border-radius: 10px; + fill: #3089fc !important; +} diff --git a/ui/src/app/pages/fleet/agents/key/agent.key.component.ts b/ui/src/app/pages/fleet/agents/key/agent.key.component.ts index c6b5e6b76..5310006dd 100644 --- a/ui/src/app/pages/fleet/agents/key/agent.key.component.ts +++ b/ui/src/app/pages/fleet/agents/key/agent.key.component.ts @@ -12,14 +12,18 @@ import { Agent } from 'app/common/interfaces/orb/agent.interface'; export class AgentKeyComponent implements OnInit { strings = STRINGS.agents; - command2copy: string; + defaultCommandCopy: string; + defaultCommandShow: string; + fileConfigCommandCopy: string; + fileConfigCommandShow: string; - command2show: string; copyCommandIcon: string; key2copy: string; copyKeyIcon: string; saveKeyIcon: string; + hideCommand: boolean; + hideCommand2: boolean; @Input() agent: Agent = {}; @@ -28,6 +32,8 @@ export class AgentKeyComponent implements OnInit { protected route: ActivatedRoute, protected router: Router, ) { + this.hideCommand = false; + this.hideCommand2 = false; } ngOnInit(): void { @@ -39,7 +45,7 @@ export class AgentKeyComponent implements OnInit { } makeCommand2Copy() { - this.command2copy = `docker run -d --restart=always --net=host \\ + this.defaultCommandCopy = `docker run -d --restart=always --net=host \\ -e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ -e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ -e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ @@ -47,33 +53,75 @@ export class AgentKeyComponent implements OnInit { -e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ orbcommunity/orb-agent`; - this.command2show = `docker run -d --restart=always --net=host \\ + this.defaultCommandShow = `docker run -d --restart=always --net=host \\ -e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ -e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ -e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ -e ORB_CLOUD_MQTT_KEY=${ this.agent.key } \\ -e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ orbcommunity/orb-agent`; + + this.fileConfigCommandCopy = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ +-e ORB_CLOUD_MQTT_KEY=${ this.agent.key } \\ +-e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ +-v \${PWD}/:/usr/local/orb/ \\ +orbcommunity/orb-agent run -c /usr/local/orb/agent.yaml`; + + this.fileConfigCommandShow = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ +-e ORB_CLOUD_MQTT_KEY=${ this.agent.key } \\ +-e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ +-v \${PWD}/:/usr/local/orb/ \\ +orbcommunity/orb-agent run -c /usr/local/orb/agent.yaml`; } toggleIcon (target) { if (target === 'key') { this.copyKeyIcon = 'checkmark-outline'; + setTimeout(() => { + this.copyKeyIcon = 'copy-outline'; + }, 2000); } else if (target === 'command') { this.copyCommandIcon = 'checkmark-outline'; + setTimeout(() => { + this.copyCommandIcon = "copy-outline"; + }, 2000); } } onClose() { this.dialogRef.close(false); } - downloadCommand() { - const blob = new Blob([this.command2copy], { type: 'text/plain' }); - const url = window.URL.createObjectURL(blob); - const a = document.createElement('a'); - a.href = url; - a.download = `${this.agent.id}.txt`; - a.click(); - window.URL.revokeObjectURL(url); + downloadCommand(commandType: string) { + if (commandType === 'default') { + const blob = new Blob([this.defaultCommandCopy], { type: 'text/plain' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${this.agent.id}.txt`; + a.click(); + window.URL.revokeObjectURL(url); + } + else if (commandType === 'fileConfig') { + const blob = new Blob([this.fileConfigCommandCopy], { type: 'text/plain' }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = `${this.agent.id}_configfile.txt`; + a.click(); + window.URL.revokeObjectURL(url); + } + + } + toggleProvisioningCommand() { + this.hideCommand = !this.hideCommand; + } + toggleProvisioningCommand2() { + this.hideCommand2 = !this.hideCommand2; } } diff --git a/ui/src/app/pages/fleet/agents/list/agent.list.component.html b/ui/src/app/pages/fleet/agents/list/agent.list.component.html index 8e20c44cd..adf5a4a5d 100644 --- a/ui/src/app/pages/fleet/agents/list/agent.list.component.html +++ b/ui/src/app/pages/fleet/agents/list/agent.list.component.html @@ -22,6 +22,7 @@

All Agents

class="delete-selected" nbButton shape="round"> + Delete
-

Are you sure you want to reset a total of {{ size }} Agents?

-

*To confirm, type the amount of agents to be reset.

+

Are you sure you want to reset a total of {{ selected.length }} Agent(s)?

+
+
+
+ {{ item.name }} +
+
+ {{ item.state | titlecase }} +
+
+
+

*To confirm, type the amount of agents to be reset.

+ placeholder="{{selected.length}}" [(ngModel)]="validationInput" + data-orb-qa-id="input#selected.length"> - {{size}} + {{selected.length}}
diff --git a/ui/src/app/pages/fleet/agents/reset/agent.reset.component.scss b/ui/src/app/pages/fleet/agents/reset/agent.reset.component.scss index 4f28bb2d8..8c53dbf85 100644 --- a/ui/src/app/pages/fleet/agents/reset/agent.reset.component.scss +++ b/ui/src/app/pages/fleet/agents/reset/agent.reset.component.scss @@ -1,5 +1,6 @@ nb-card { max-width: 38rem !important; + padding: 0 !important; nb-card-header { background: #232940 !important; @@ -12,6 +13,10 @@ nb-card { p { color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } .ns1-red { @@ -48,4 +53,40 @@ nb-card { } .ns1red { color: #df316f !important; - } \ No newline at end of file + } + .element-list { + max-height: 225px; + overflow-y: auto; + margin-left: 20px; + } + .span-accent { + font-size: 13px; + font-weight: 600; + float: right; + } + .item-row { + display: flex; + align-items: center; + border-radius: 6px; + width: 300px; + padding-left: 3px; + font-size: 13px; + font-weight: 600; + } + .item-row:hover { + background-color: #1e263d; + } + .col-8 { + flex: 1; + padding-left: 0; + } + .col-3 { + flex: 1; + padding-right: 0; + } + .overflow-ellipsis { + white-space: nowrap !important; + overflow: hidden !important; + text-overflow: ellipsis !important; + max-width: 350px !important; + } diff --git a/ui/src/app/pages/fleet/agents/reset/agent.reset.component.ts b/ui/src/app/pages/fleet/agents/reset/agent.reset.component.ts index 59ec7a923..5f8180a4f 100644 --- a/ui/src/app/pages/fleet/agents/reset/agent.reset.component.ts +++ b/ui/src/app/pages/fleet/agents/reset/agent.reset.component.ts @@ -10,7 +10,7 @@ import { STRINGS } from 'assets/text/strings'; export class AgentResetComponent { strings = STRINGS.agents; - @Input() size: Number; + @Input() selected: any[] = []; validationInput: Number; @@ -28,6 +28,6 @@ export class AgentResetComponent { } isEnabled(): boolean { - return this.validationInput === this.size; + return this.validationInput === this.selected.length; } } \ No newline at end of file diff --git a/ui/src/app/pages/fleet/agents/view/agent.view.component.html b/ui/src/app/pages/fleet/agents/view/agent.view.component.html index 3cd7c0e11..fc0f162e8 100644 --- a/ui/src/app/pages/fleet/agents/view/agent.view.component.html +++ b/ui/src/app/pages/fleet/agents/view/agent.view.component.html @@ -4,18 +4,24 @@

Agent View

-
- - - - Last Update: {{ lastUpdate | date: 'HH:mm:ss a' }} -
-
- - {{ agent?.state | ngxCapitalize }}.   +
+
+ + + + {{ agent?.state | ngxCapitalize }} + +
+
Last activity @@ -28,18 +34,21 @@ This Agent has been provisioned but never connected. - +
- +
+
+
+
-
+
-
+
false; } ngOnInit() { this.agentID = this.route.snapshot.paramMap.get('id'); this.retrieveAgent(); + updateMenuItems('Agents'); } retrieveAgent() { @@ -83,9 +89,28 @@ export class AgentViewComponent implements OnInit, OnDestroy { ngOnDestroy() { this.agentSubscription?.unsubscribe(); + this.orb.isPollingPaused ? this.orb.startPolling() : null; + this.orb.killPolling.next(); } - refreshAgent() { - this.isLoading = true; - this.retrieveAgent(); + + openDeleteModal() { + const { name, id } = this.agent; + this.dialogService + .open(AgentDeleteComponent, { + context: { name }, + autoFocus: true, + closeOnEsc: true, + }) + .onClose.subscribe((confirm) => { + if (confirm) { + this.agentsService.deleteAgent(id).subscribe(() => { + this.notificationService.success('Agent successfully deleted', ''); + this.goBack(); + }); + } + }); + } + goBack() { + this.router.navigateByUrl('/pages/fleet/agents'); } } diff --git a/ui/src/app/pages/fleet/groups/add/agent.group.add.component.html b/ui/src/app/pages/fleet/groups/add/agent.group.add.component.html index f221d925e..b1fca8438 100644 --- a/ui/src/app/pages/fleet/groups/add/agent.group.add.component.html +++ b/ui/src/app/pages/fleet/groups/add/agent.group.add.component.html @@ -26,40 +26,41 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

- - * +
+ nbInput + placeholder="Agent Group Name"/>
- -

+ +

Name is required! -

-

+

+
Name must start with a letter or "_" and contain only letters, numbers, "-" or "_" -

-

+

+
Name must be less than {{firstFormGroup.controls.name.errors?.maxlength.requiredLength}} characters -

+

- +
+ nbInput + placeholder="Agent Group Description"/>

Description must be less than {{firstFormGroup.controls.description.errors?.maxlength.requiredLength}} characters @@ -68,27 +69,27 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}


+ -
@@ -104,21 +105,20 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

(tagsChange)="updateMatches()" [(tags)]="selectedTags">
-
-
-

- {{strings.match.matchAny}} {{tagMatch.total}} {{strings.match.agents}} - .  -

-

- {{strings.match.matchNone}} -

-
+
+

+ {{strings.match.matchAny}} {{tagMatch.total}} +  {{strings.match.agents}}  + +

+

+ {{strings.match.matchNone}} +

{{strings[isEdit ? 'edit' : 'add']['header']}}
@@ -166,25 +166,26 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

- +

{{firstFormGroup.controls.name.value}}


- -

{{firstFormGroup.controls.description.value}}

+ +

{{firstFormGroup.controls.description.value}}

+

No description added


+
@@ -192,14 +193,15 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

-

- {{strings.match.matchAny}} {{tagMatch.total}} {{strings.match.agents}} - .  +

+ {{strings.match.matchAny}} {{tagMatch.total}} +  {{strings.match.agents}}  +

{{strings.match.matchNone}} @@ -216,31 +218,31 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}


@@ -269,12 +271,23 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

let-i="index" let-row="row" let-value="value"> - + - {{tag | tagchip}} + style="background-color: #2B3148;" + class="orb-tag-chip" + > + {{ tag.key }}:  + {{ tag.value }} + + + No tag were created @@ -295,7 +308,7 @@

{{strings[isEdit ? 'edit' : 'add']['header']}}

Object.entries(a) @@ -174,8 +171,8 @@ export class AgentGroupAddComponent { prop: 'state', name: 'Status', - flexGrow: 1, - resizeable: false, + resizeable: true, + canAutoResize: false, width: 120, cellTemplate: this.agentStateTemplateRef, }, @@ -275,6 +272,7 @@ export class AgentGroupAddComponent // saves current agent group onFormSubmit() { + this.isRequesting = true; // validate:false const payload = this.wrapPayload(false); @@ -282,12 +280,16 @@ export class AgentGroupAddComponent if (this.isEdit) { this.agentGroupsService .editAgentGroup({ ...payload, id: this.agentGroupID }) - .subscribe(() => { + .subscribe( + (resp) => { this.notificationsService.success( 'Agent Group successfully updated', '', ); this.goBack(); + }, + (error) => { + this.isRequesting = false; }); } else { this.agentGroupsService.addAgentGroup(payload).subscribe(() => { @@ -296,6 +298,9 @@ export class AgentGroupAddComponent '', ); this.goBack(); + }, + (error) => { + this.isRequesting = false; }); } } diff --git a/ui/src/app/pages/fleet/groups/delete/agent.group.delete.component.scss b/ui/src/app/pages/fleet/groups/delete/agent.group.delete.component.scss index 3f3548d1f..ab675c0a8 100644 --- a/ui/src/app/pages/fleet/groups/delete/agent.group.delete.component.scss +++ b/ui/src/app/pages/fleet/groups/delete/agent.group.delete.component.scss @@ -1,43 +1,47 @@ nb-card { - max-width: 38rem; - + max-width: 38rem !important; + padding: 0 !important; nb-card-header { - background: #232940; - color: #969fb9; + background: #232940 !important; + color: #969fb9 !important; } - + nb-card-body { - margin: 2rem 3rem; - padding: 0; - + margin: 2rem 3rem !important; + padding: 0 !important; + p { - color: #969fb9; + color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } - + .ns1-red { - color: #df316f; + color: #df316f !important; } } - + nb-card-footer { - text-align: center; - padding: 1.5rem; + text-align: center !important; + padding: 1.5rem !important; } } // ORB ::ng-deep { .orb-close-dialog { - background-color: #23294000; - border-radius: 4px; - display: contents; - float: right; + background-color: #23294000 !important; + border-radius: 4px !important; + display: contents !important; + float: right !important; > span { - float: right; - font-size: 1.5rem; - color: #3089fc; - font-weight: 900; + float: right !important; + font-size: 1.5rem !important; + color: #3089fc !important; + font-weight: 900 !important; } } diff --git a/ui/src/app/pages/fleet/groups/details/agent.group.details.component.html b/ui/src/app/pages/fleet/groups/details/agent.group.details.component.html index da2e7d5d8..7c1c89d1c 100644 --- a/ui/src/app/pages/fleet/groups/details/agent.group.details.component.html +++ b/ui/src/app/pages/fleet/groups/details/agent.group.details.component.html @@ -13,7 +13,7 @@

{{strings.propNames.name}}

{{ agentGroup.name }}

-
+

{{strings.propNames.description}}

{{ agentGroup.description }}

@@ -27,13 +27,24 @@

{{strings.propNames.tags}}

-
+
- {{tag | tagchip}} + *ngFor="let tag of agentGroup.tags | keyvalue" + style="background-color: #2B3148;" + class="orb-tag-chip" + > + {{ tag.key }}:  + {{ tag.value }} + + + No tag were created
diff --git a/ui/src/app/pages/fleet/groups/details/agent.group.details.component.scss b/ui/src/app/pages/fleet/groups/details/agent.group.details.component.scss index 15e268be0..f28cb3381 100644 --- a/ui/src/app/pages/fleet/groups/details/agent.group.details.component.scss +++ b/ui/src/app/pages/fleet/groups/details/agent.group.details.component.scss @@ -67,4 +67,9 @@ nb-tabset { margin-bottom: 0.4rem; } } - +.background { + background-color: #232940; + padding: 10px; + border-radius: 8px; + margin-bottom: 20px; +} diff --git a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.html b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.html index 70681af7e..56c817877 100644 --- a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.html +++ b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.html @@ -23,13 +23,14 @@

{{ strings.list.header }}

class="delete-selected" nbButton shape="round"> + Delete
+ No description was provided @@ -87,17 +94,20 @@

{{ strings.list.header }}

- {{ tag | tagchip }} + {{ tag.key }}:  + {{ tag.value }} - No tags were created + No tag were created
diff --git a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.scss b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.scss index c65dc661e..538c825d8 100644 --- a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.scss +++ b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.scss @@ -187,14 +187,16 @@ mat-chip-list { align-items: center; gap: 10px; } -.delete-selected { - color: #ffffff !important; - font-family: 'Montserrat', sans-serif; - font-weight: 600; - text-transform: none !important; - width: 90px; - background-color: #df316f !important; -} input[type=checkbox] { margin-left: 10px; -} \ No newline at end of file +} +.view-group-button { + background-color: transparent !important; + background-repeat: no-repeat !important; + border: none !important; + cursor: pointer !important; + outline: none !important; + overflow: hidden !important; + color: #ffffff; + text-align: left; +} diff --git a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.ts b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.ts index 46c40e338..4e20d6b83 100644 --- a/ui/src/app/pages/fleet/groups/list/agent.group.list.component.ts +++ b/ui/src/app/pages/fleet/groups/list/agent.group.list.component.ts @@ -163,7 +163,6 @@ export class AgentGroupListComponent } ngAfterViewInit() { - this.orb.refreshNow(); this.columns = [ { name: '', @@ -184,15 +183,6 @@ export class AgentGroupListComponent minWidth: 150, cellTemplate: this.agentGroupNameTemplateCell, }, - { - prop: 'description', - name: 'Description', - width: 350, - canAutoResize: true, - resizeable: true, - minWidth: 180, - cellTemplate: this.agentGroupNameTemplateCell, - }, { prop: 'matching_agents', name: 'Agents', @@ -203,6 +193,15 @@ export class AgentGroupListComponent comparator: (a, b) => a.total - b.total, cellTemplate: this.agentGroupsTemplateCell, }, + { + prop: 'description', + name: 'Description', + width: 350, + canAutoResize: true, + resizeable: true, + minWidth: 180, + cellTemplate: this.agentGroupNameTemplateCell, + }, { prop: 'tags', width: 450, @@ -310,12 +309,8 @@ export class AgentGroupListComponent }); } public onCheckboxChange(event: any, row: any): void { - let selectedGroup = { - id: row.id, - name: row.name, - } if (this.getChecked(row) === false) { - this.selected.push(selectedGroup); + this.selected.push(row); } else { for (let i = 0; i < this.selected.length; i++) { @@ -337,11 +332,7 @@ export class AgentGroupListComponent this.groupsSubscription = this.filteredGroups$.subscribe(rows => { this.selected = []; rows.forEach(row => { - const policySelected = { - id: row.id, - name: row.name, - } - this.selected.push(policySelected); + this.selected.push(row); }); }); } else { diff --git a/ui/src/app/pages/pages-menu.ts b/ui/src/app/pages/pages-menu.ts index d54493670..be3ab77b0 100644 --- a/ui/src/app/pages/pages-menu.ts +++ b/ui/src/app/pages/pages-menu.ts @@ -48,3 +48,9 @@ export const MENU_ITEMS = [ ...MENU, ...environment.production ? [] : DEV_ITEMS, ]; + +export function updateMenuItems(pageName: string) { + MENU_ITEMS.forEach(item => { + item.selected = item.title === pageName; + }) +} diff --git a/ui/src/app/pages/profile/profile.component.html b/ui/src/app/pages/profile/profile.component.html index 917c60901..61cfc10e5 100644 --- a/ui/src/app/pages/profile/profile.component.html +++ b/ui/src/app/pages/profile/profile.component.html @@ -1,62 +1,174 @@ -
-
- - User Information +
+
+

Account Information

+

User Profile / Settings

+
+
+ +
+
+
+ +
+
+
+ +
+

User Name

+
+

{{ user?.fullName }}

+
+
+ +
+
+ + + + +
+
+
+

+ Polling Control Configuration + + + +

+ + {{timer}} seconds + + +
+
+ +
+
diff --git a/ui/src/app/pages/sinks/add/sink-add.component.scss b/ui/src/app/pages/sinks/add/sink-add.component.scss index ca46de6ca..d988b3e98 100644 --- a/ui/src/app/pages/sinks/add/sink-add.component.scss +++ b/ui/src/app/pages/sinks/add/sink-add.component.scss @@ -20,22 +20,10 @@ button { .sink-cancel { background-color: #3089fc !important; } - ngx-sink-details { - flex: 0 1 22rem; - } - - ngx-sink-config { - flex: 2 1 auto; - min-height: 30rem !important; + + + - nb-card { - height: 30rem !important; - } - } - - .row { - gap: 1rem; - } header { justify-content: space-between; @@ -48,4 +36,32 @@ button { font-weight: normal; line-height: 2rem; margin-bottom: 1.5rem; - } \ No newline at end of file + } + ::ng-deep { + .orb-breadcrumb { + display: flex; + font-family: 'Montserrat', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 500; + line-height: 12px; + + ::ng-deep { + .xng-breadcrumb-trail { + color: #fff !important; + margin-bottom: 0 !important; + } + + .xng-breadcrumb-link { + color: #969fb9 !important; + text-decoration: none !important; + } + + .xng-breadcrumb-separator { + color: #969fb9 !important; + text-decoration: none !important; + } + } + } + } + \ No newline at end of file diff --git a/ui/src/app/pages/sinks/add/sink-add.component.ts b/ui/src/app/pages/sinks/add/sink-add.component.ts index 3e487c0a9..82c088f50 100644 --- a/ui/src/app/pages/sinks/add/sink-add.component.ts +++ b/ui/src/app/pages/sinks/add/sink-add.component.ts @@ -6,7 +6,8 @@ import { SinksService } from 'app/common/services/sinks/sinks.service'; import { SinkConfigComponent } from 'app/shared/components/orb/sink/sink-config/sink-config.component'; import { SinkDetailsComponent } from 'app/shared/components/orb/sink/sink-details/sink-details.component'; import { STRINGS } from 'assets/text/strings'; - +import * as YAML from 'yaml'; +import { CodeEditorService } from 'app/common/services/code.editor.service'; @Component({ selector: 'ngx-sink-add-component', @@ -26,45 +27,84 @@ export class SinkAddComponent { sinkBackend: any; + isRequesting: boolean; + constructor( private sinksService: SinksService, private notificationsService: NotificationsService, private router: Router, + private editor: CodeEditorService, ) { this.createMode = true; + this.isRequesting = false; } - canCreate() { + canCreate() { const detailsValid = this.createMode ? this.detailsComponent?.formGroup?.status === 'VALID' : true; - return detailsValid; + + const configSink = this.configComponent?.code; + let config; + + if (this.editor.isJson(configSink)) { + config = JSON.parse(configSink); + } else if (this.editor.isYaml(configSink)) { + config = YAML.parse(configSink); + } else { + return false; + } + + return !this.editor.checkEmpty(config.authentication) && !this.editor.checkEmpty(config.exporter) && detailsValid && !this.checkString(config); + } + checkString(config: any): boolean { + if (typeof config.authentication.password !== 'string' || typeof config.authentication.username !== 'string') { + return true; + } + return false; } createSink() { - + this.isRequesting = true; const sinkDetails = this.detailsComponent.formGroup?.value; const tags = this.detailsComponent.selectedTags; const configSink = this.configComponent.code; - const details = { ...sinkDetails}; - - let configs = JSON.parse(configSink); + const details = { ...sinkDetails }; + + let payload = {}; - const config = { - ...configs - } + const config = YAML.parse(configSink); - const payload = { + payload = { ...details, tags, config, - } as Sink; - + + // if (this.editor.isJson(configSink)) { + // const config = JSON.parse(configSink); + // payload = { + // ...details, + // tags, + // config, + // } as Sink; + // } + // else { + // payload = { + // ...details, + // tags, + // format: 'yaml', + // config_data: configSink, + // } as Sink; + // } + this.sinksService.addSink(payload).subscribe(() => { this.notificationsService.success('Sink successfully created', ''); this.goBack(); + }, + (error) => { + this.isRequesting = false; }); } @@ -75,4 +115,5 @@ export class SinkAddComponent { getBackendEmit(backend: any) { this.sinkBackend = backend; } + } diff --git a/ui/src/app/pages/sinks/delete/sink.delete.component.scss b/ui/src/app/pages/sinks/delete/sink.delete.component.scss index 3f3548d1f..003444e84 100644 --- a/ui/src/app/pages/sinks/delete/sink.delete.component.scss +++ b/ui/src/app/pages/sinks/delete/sink.delete.component.scss @@ -1,43 +1,48 @@ nb-card { - max-width: 38rem; - + max-width: 38rem !important; + padding: 0 !important; + nb-card-header { - background: #232940; - color: #969fb9; + background: #232940 !important; + color: #969fb9 !important; } - + nb-card-body { - margin: 2rem 3rem; - padding: 0; - + margin: 2rem 3rem !important; + padding: 0 !important; + p { - color: #969fb9; + color: #969fb9 !important; + margin-bottom: 1rem !important; + font-weight: 500 !important; + font-size: 14px !important; + line-height: 24px !important; } - + .ns1-red { - color: #df316f; + color: #df316f !important; } } - + nb-card-footer { - text-align: center; - padding: 1.5rem; + text-align: center !important; + padding: 1.5rem !important; } } // ORB ::ng-deep { .orb-close-dialog { - background-color: #23294000; - border-radius: 4px; - display: contents; - float: right; + background-color: #23294000 !important; + border-radius: 4px !important; + display: contents !important; + float: right !important; > span { - float: right; - font-size: 1.5rem; - color: #3089fc; - font-weight: 900; + float: right !important; + font-size: 1.5rem !important; + color: #3089fc !important; + font-weight: 900 !important; } } diff --git a/ui/src/app/pages/sinks/details/sink.details.component.html b/ui/src/app/pages/sinks/details/sink.details.component.html index 7a261a158..b545e8b33 100644 --- a/ui/src/app/pages/sinks/details/sink.details.component.html +++ b/ui/src/app/pages/sinks/details/sink.details.component.html @@ -15,7 +15,7 @@

{{strings.propNames.name}}

{{ sink.name }}

-
+

{{strings.propNames.description}}

{{ sink.description }}

No Description Added

diff --git a/ui/src/app/pages/sinks/list/sink.list.component.html b/ui/src/app/pages/sinks/list/sink.list.component.html index dbd7be2bc..8c7284176 100644 --- a/ui/src/app/pages/sinks/list/sink.list.component.html +++ b/ui/src/app/pages/sinks/list/sink.list.component.html @@ -23,13 +23,14 @@

{{ strings.list.header }}

class="delete-selected" nbButton shape="round"> + Delete
+ @@ -79,16 +88,21 @@

{{ strings.list.header }}

- {{tag | tagchip}} + *ngFor="let tag of value | keyvalue" + style="background-color: #2B3148;" + class="orb-tag-chip" + > + {{ tag.key }}:  + {{ tag.value }} - No tags were created + *ngIf=" + !row?.tags + " + style="background-color: #2B3148;" + class="orb-tag-chip" + > + No tag were created
diff --git a/ui/src/app/pages/sinks/list/sink.list.component.scss b/ui/src/app/pages/sinks/list/sink.list.component.scss index 6687613c0..25a0c8de2 100644 --- a/ui/src/app/pages/sinks/list/sink.list.component.scss +++ b/ui/src/app/pages/sinks/list/sink.list.component.scss @@ -149,7 +149,7 @@ tr div p { color: #df316f; } &idle { - color: #f2dc4a; + color: #f2994a; } } @@ -208,14 +208,6 @@ mat-chip-list { align-items: center; gap: 10px; } -.delete-selected { - color: #ffffff !important; - font-family: 'Montserrat', sans-serif; - font-weight: 600; - text-transform: none !important; - width: 90px; - background-color: #df316f !important; -} input[type=checkbox] { margin-left: 10px; } diff --git a/ui/src/app/pages/sinks/list/sink.list.component.ts b/ui/src/app/pages/sinks/list/sink.list.component.ts index 3078de602..2d122f679 100644 --- a/ui/src/app/pages/sinks/list/sink.list.component.ts +++ b/ui/src/app/pages/sinks/list/sink.list.component.ts @@ -163,7 +163,6 @@ export class SinkListComponent implements AfterViewInit, AfterViewChecked, OnDes } ngAfterViewInit() { - this.orb.refreshNow(); this.columns = [ { name: '', diff --git a/ui/src/app/pages/sinks/view/sink.view.component.html b/ui/src/app/pages/sinks/view/sink.view.component.html index 9d7dbcc69..51b3822f5 100644 --- a/ui/src/app/pages/sinks/view/sink.view.component.html +++ b/ui/src/app/pages/sinks/view/sink.view.component.html @@ -1,5 +1,5 @@ -
-
+
+

{{ strings.sink.view.header }}

-
+
+ +
+
+
+
+
+ + + {{ sink?.state | ngxCapitalize }} + +
+
+ + Created on {{ sink?.ts_created | date: 'M/d/yy, HH:mm z' }} + +
+
+
-
- - - - +
+
+
+ +
+
+ + +
+
+ + +
diff --git a/ui/src/app/pages/sinks/view/sink.view.component.scss b/ui/src/app/pages/sinks/view/sink.view.component.scss index e8f1b6e00..c4a64214a 100644 --- a/ui/src/app/pages/sinks/view/sink.view.component.scss +++ b/ui/src/app/pages/sinks/view/sink.view.component.scss @@ -2,7 +2,6 @@ button { margin: 0 3px; &.policy-duplicate { - float: right; color: #fff !important; font-family: "Montserrat", sans-serif; font-weight: 700; @@ -18,10 +17,9 @@ button { } &.policy-save { - float: right; color: #fff !important; font-family: "Montserrat", sans-serif; - font-weight: 500; + font-weight: 700; text-transform: none !important; &.btn-disabled { @@ -34,10 +32,9 @@ button { } &.policy-discard { - float: right; color: #fff !important; font-family: "Montserrat", sans-serif; - font-weight: 500; + font-weight: 700; text-transform: none !important; &.btn-disabled { @@ -50,27 +47,20 @@ button { } } -ngx-sink-details { - flex: 0 1 22rem; -} - -ngx-sink-config { - flex: 2 1 auto; - min-height: 30rem !important; - - nb-card { - height: 30rem !important; - } +header { + display: flex; + justify-content: space-between; + align-items: center; } -.row { - gap: 10px; +.left-content { + flex: 1; } -header { - justify-content: space-between; +.right-content { + display: flex; + align-items: center; } - h4 { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; @@ -78,4 +68,58 @@ h4 { font-weight: normal; line-height: 2rem; margin-bottom: 1.5rem; -} \ No newline at end of file +} +::ng-deep { + .orb-breadcrumb { + display: flex; + font-family: 'Montserrat', sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 500; + line-height: 12px; + + ::ng-deep { + .xng-breadcrumb-trail { + color: #fff !important; + margin-bottom: 0 !important; + } + + .xng-breadcrumb-link { + color: #969fb9 !important; + text-decoration: none !important; + } + + .xng-breadcrumb-separator { + color: #969fb9 !important; + text-decoration: none !important; + } + } + } +} +.fa.fa-circle { + font-size: 11px; +} +.state { + font-size: 16px; + font-weight: 700; +} +.orb-service- { + &active { + color: #6fcf97; + } + &unknown { + color: #9b51e0; + } + &error { + color: #df316f; + } + &idle { + color: #f2994a; + } +} + +.last-update { + color: #969fb9; + font-size: 14px; +} + diff --git a/ui/src/app/pages/sinks/view/sink.view.component.ts b/ui/src/app/pages/sinks/view/sink.view.component.ts index fc5cb1410..490876744 100644 --- a/ui/src/app/pages/sinks/view/sink.view.component.ts +++ b/ui/src/app/pages/sinks/view/sink.view.component.ts @@ -1,12 +1,18 @@ import { ChangeDetectorRef, Component, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Sink } from 'app/common/interfaces/orb/sink.interface'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Sink, SinkStates } from 'app/common/interfaces/orb/sink.interface'; import { NotificationsService } from 'app/common/services/notifications/notifications.service'; import { SinksService } from 'app/common/services/sinks/sinks.service'; import { SinkConfigComponent } from 'app/shared/components/orb/sink/sink-config/sink-config.component'; import { SinkDetailsComponent } from 'app/shared/components/orb/sink/sink-details/sink-details.component'; import { STRINGS } from 'assets/text/strings'; import { Subscription } from 'rxjs'; +import { updateMenuItems } from 'app/pages/pages-menu'; +import * as YAML from 'yaml'; +import { CodeEditorService } from 'app/common/services/code.editor.service'; +import { SinkDeleteComponent } from '../delete/sink.delete.component'; +import { NbDialogService } from '@nebular/theme'; +import { OrbService } from 'app/common/services/orb.service'; @Component({ selector: 'ngx-sink-view', @@ -24,11 +30,17 @@ export class SinkViewComponent implements OnInit, OnChanges, OnDestroy { sinkSubscription: Subscription; + lastUpdate: Date | null = null; + + sinkStates = SinkStates; + editMode = { details: false, config: false, } + isRequesting: boolean; + @ViewChild(SinkDetailsComponent) detailsComponent: SinkDetailsComponent; @ViewChild(SinkConfigComponent) @@ -38,10 +50,17 @@ export class SinkViewComponent implements OnInit, OnChanges, OnDestroy { private notifications: NotificationsService, private sinks: SinksService, private route: ActivatedRoute, - ) { } + private editor: CodeEditorService, + private dialogService: NbDialogService, + private router: Router, + private orb: OrbService, + ) { + this.isRequesting = false; + } ngOnInit(): void { this.fetchData(); + updateMenuItems('Sink Management'); } ngOnChanges(): void { @@ -62,82 +81,118 @@ export class SinkViewComponent implements OnInit, OnChanges, OnDestroy { } canSave() { + let configValid = true; const detailsValid = this.editMode.details ? this.detailsComponent?.formGroup?.status === 'VALID' : true; - const configValid = this.editMode.config - ? this.configComponent?.formControl?.status === 'VALID' - : true; + const configSink = this.configComponent?.code; + let config; + + if (this.editor.isJson(configSink)) { + config = JSON.parse(configSink); + } else if (this.editor.isYaml(configSink)) { + config = YAML.parse(configSink); + } else { + return false; + } + if (this.editMode.config) { + configValid = !this.editor.checkEmpty(config.authentication) && !this.editor.checkEmpty(config.exporter) && !this.checkString(config); + } return detailsValid && configValid; } + checkString(config: any): boolean { + if (typeof config.authentication.password !== 'string' || typeof config.authentication.username !== 'string') { + return true; + } + return false; + } + discard() { this.editMode.details = false; this.editMode.config = false; } save() { + this.isRequesting = true; const { id, backend } = this.sink; - const sinkDetails = this.detailsComponent.formGroup?.value; const tags = this.detailsComponent.selectedTags; const configSink = this.configComponent.code; - - let payload = {}; - const details = { ...sinkDetails, tags}; - const config = JSON.parse(configSink); - - if (this.editMode.details && !this.editMode.config) { - payload = { - id, - backend, - ...details, - } as Sink; - } - else if (!this.editMode.details && this.editMode.config) { - payload = { - id, - backend, - config, - } as Sink; - } - else { - payload = { - id, - backend, - details, - config, - } as Sink; - } - + + const details = { ...sinkDetails, tags }; + + let payload = { id, backend, config: {}}; + try { - this.sinks.editSink(payload).subscribe((resp) => { - this.discard(); - this.sink = resp; - this.fetchData(); - this.notifications.success('Sink updated successfully', ''); - }); + const config = YAML.parse(configSink); + payload.config = config; + + if (this.editMode.details) { + payload = { ...payload, ...details }; + } + + this.sinks.editSink(payload as Sink).subscribe( + (resp) => { + this.discard(); + this.sink = resp; + this.orb.refreshNow(); + this.notifications.success('Sink updated successfully', ''); + this.isRequesting = false; + }, + (err) => { + this.isRequesting = false; + }); } catch (err) { - this.notifications.error( - 'Failed to edit Sink', - 'Error: Invalid configuration', - ) + this.notifications.error('Failed to edit Sink', 'Error: Invalid configuration'); } } retrieveSink() { - this.sinkSubscription = this.sinks - .getSinkById(this.sinkId) - .subscribe(sink => { + this.sinkSubscription = this.orb.getSinkView(this.sinkId).subscribe(sink => { this.sink = sink; this.isLoading = false; this.cdr.markForCheck(); - }); + this.lastUpdate = new Date(); + }) } ngOnDestroy(): void { this.sinkSubscription.unsubscribe(); + this.orb.isPollingPaused ? this.orb.startPolling() : null; + this.orb.killPolling.next(); + } + openDeleteModal() { + const { id } = this.sink; + this.dialogService + .open(SinkDeleteComponent, { + context: { sink: this.sink }, + autoFocus: true, + closeOnEsc: true, + }) + .onClose.subscribe((confirm) => { + if (confirm) { + this.sinks.deleteSink(id).subscribe(() => { + this.notifications.success('Sink successfully deleted', ''); + this.goBack(); + }); + } + }); + } + goBack() { + this.router.navigateByUrl('/pages/sinks'); + } + hasChanges() { + const sinkDetails = this.detailsComponent.formGroup?.value; + const tags = this.detailsComponent.selectedTags; + let selectedTags = JSON.stringify(tags); + let orb_tags = this.sink.tags ? JSON.stringify(this.sink.tags) : "{}"; + + if (sinkDetails.name !== this.sink.name || sinkDetails?.description !== this.sink?.description || selectedTags !== orb_tags) { + return true; + } + return false; } } diff --git a/ui/src/app/shared/components/delete/delete.selected.component.html b/ui/src/app/shared/components/delete/delete.selected.component.html index 61300a02a..01db8514b 100644 --- a/ui/src/app/shared/components/delete/delete.selected.component.html +++ b/ui/src/app/shared/components/delete/delete.selected.component.html @@ -11,19 +11,34 @@

Are you sure you want to delete a total of {{ selected?.length }} {{ elementName }}? This action cannot be undone.

-
- {{ item.name }} {{ item.state | titlecase }} {{ item.usage | titlecase }} +
+
+
+ {{ item.name }} +
+
+ {{ item.state | titlecase }} + {{ item.usage | titlecase }} + +
+
+
+
+

*To confirm, type the amount of {{ elementName }} to be delete.

+ + + {{selected?.length}} +
-

*To confirm, type the amount of {{ elementName }} to be delete.

- - - {{selected?.length}} - - + + +
+ + +
+ - - {{ filter?.exact ? filter.name + ": '" + filter?.param + "'" : filter.name + ': ' +filter?.param}} - - + + + {{ filter?.exact ? filter.name + ": '" + filter?.param + "'" : filter.name + ': ' + filter?.param }} + + + + + + -
-
-
- -

{{ getAgentVersion() }}

-

Agent never connected

-
-
-
- -

{{ agent?.id }}

+ + +
+
+ - -

{{ agent?.channel_id }}

+ +
+
+ +

{{ agent?.name }}

- -

{{ agent?.ts_created | date:'full'}}

+
+
+
+ +

{{ getAgentVersion() }}

+

Agent never connected

- - -
- +
+ +

{{ agent?.id }}

+ + +

{{ agent?.channel_id }}

+ + +

{{ agent?.ts_created | date:'full'}}

- - +
+ + +
+ +
+ + + +
+
+ +
+
+ + * +
+ +
+
+ Name is required. +
+
+ Name must start with a letter or "_" and contain only letters, numbers, "-" or "_" +
+
+ Name must not exceed 64 characters. +
+
+ Name too short. +
+
+
+
+
+ + +
+ +
diff --git a/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.scss b/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.scss index 8da3a3f6c..c0192bb19 100644 --- a/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.scss +++ b/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.scss @@ -10,6 +10,7 @@ h4 { nb-card { border: transparent; border-radius: 0.5rem; + padding: 0 !important; nb-card-header { background-color: #232940; @@ -60,6 +61,11 @@ nb-card { } } } +nb-form-field { + label { + color: #fff !important; + } +} ::ng-deep { @@ -116,7 +122,20 @@ nb-card { color: #df316f !important; } } - +.agent-save { + float: right; + color: #3089fc !important; + font-family: 'Montserrat', sans-serif; + font-weight: 700; + text-transform: none !important; + background-color: transparent !important; + &.btn-disabled { + color: #8c93b1 !important; + } +} +.agent-save:hover { + background-color: #171c30 !important; +} .agent-reset { float: right; color: #fff !important; @@ -135,4 +154,7 @@ nb-card { .summary-accent { color: #969fb9 !important; -} \ No newline at end of file +} +input { + height: 42px !important; +} diff --git a/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.ts b/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.ts index e03f51769..5189d0412 100644 --- a/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.ts +++ b/ui/src/app/shared/components/orb/agent/agent-information/agent-information.component.ts @@ -1,7 +1,10 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Agent, AgentStates } from 'app/common/interfaces/orb/agent.interface'; +import { Tags } from 'app/common/interfaces/orb/tag'; import { AgentsService } from 'app/common/services/agents/agents.service'; import { NotificationsService } from 'app/common/services/notifications/notifications.service'; +import { OrbService } from 'app/common/services/orb.service'; @Component({ selector: 'ngx-agent-information', @@ -15,15 +18,63 @@ export class AgentInformationComponent implements OnInit { agentStates = AgentStates; + editMode: boolean; + + formGroup: FormGroup; + + selectedTags: Tags; + + isRequesting: boolean; + + @Output() + refreshRequests = new EventEmitter(); + constructor( protected agentsService: AgentsService, protected notificationService: NotificationsService, + private fb: FormBuilder, + private orb: OrbService ) { this.isResetting = false; + this.isRequesting = false; + this.editMode = false; + this.updateForm(); } - ngOnInit(): void {} + ngOnInit(): void { + this.selectedTags = this.agent?.orb_tags || {}; + } + updateForm() { + if (this.editMode) { + const { name, orb_tags } = this.agent; + this.formGroup = this.fb.group({ + name: [ + name, + [ + Validators.required, + Validators.pattern('^[a-zA-Z_][a-zA-Z0-9_-]*$'), + Validators.maxLength(64), + Validators.minLength(2), + ], + ], + }); + this.selectedTags = {...orb_tags} || {}; + } else { + this.formGroup = this.fb.group({ + name: null, + }); + } + } + ngOnChanges(changes: SimpleChanges) { + if (changes?.editMode) { + this.toggleEdit(changes.editMode.currentValue); + } + if (changes?.policy) { + this.selectedTags = this.agent?.orb_tags || {}; + } + } + resetAgent() { if (!this.isResetting) { this.isResetting = true; @@ -43,4 +94,50 @@ export class AgentInformationComponent implements OnInit { notifyResetSuccess() { this.notificationService.success('Agent Reset Requested', ''); } + toggleEdit(value) { + + this.editMode = value; + if (this.editMode) { + this.orb.pausePolling(); + } + else { + this.orb.startPolling(); + } + this.updateForm(); + } + canSave() { + if (this.formGroup.status === 'VALID') { + return true; + } + return false; + } + save () { + this.isRequesting = true; + const name = this.formGroup.controls.name.value; + const payload = { + name: name, + orb_tags: { ...this.selectedTags }, + } + this.agentsService.editAgent({ ...payload, id: this.agent.id }).subscribe(() => { + this.notificationService.success('Agent successfully updated', ''); + this.orb.refreshNow(); + this.toggleEdit(false); + this.isRequesting = false; + }, + (error) => { + this.isRequesting = false; + }); + } + + hasChanges() { + const name = this.formGroup.controls.name.value; + + let selectedTags = JSON.stringify(this.selectedTags); + let orb_tags = JSON.stringify(this.agent.orb_tags); + + if (this.agent.name !== name || selectedTags !== orb_tags) { + return true; + } + return false; + } } diff --git a/ui/src/app/shared/components/orb/agent/agent-policies-datasets/agent-policies-datasets.component.scss b/ui/src/app/shared/components/orb/agent/agent-policies-datasets/agent-policies-datasets.component.scss index e1c6e53eb..f7e5733f8 100644 --- a/ui/src/app/shared/components/orb/agent/agent-policies-datasets/agent-policies-datasets.component.scss +++ b/ui/src/app/shared/components/orb/agent/agent-policies-datasets/agent-policies-datasets.component.scss @@ -10,6 +10,7 @@ h4 { nb-card { border: transparent; border-radius: 0.5rem; + padding: 0 !important; nb-card-header { background-color: #232940; diff --git a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.html b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.html index 71829bd94..54f375229 100644 --- a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.html +++ b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.html @@ -1,6 +1,6 @@ - + - Provisioning Command + Provisioning Commands -

- To use the provisioning command, you must replace AGENT_KEY with the Agent Key given to you during agent - creation. If you have lost the Agent Key, you must remove and create a new agent. -

-
-      
-      {{ command2show }}
-    
+ + +
+          
+          
+            {{ defaultCommandShow }}
+          
+        
+
+
+ + + Provisioning Command with Configuration File + + + + + +
+          
+          
+            {{ fileConfigCommandShow }}
+          
+        
+
+
+

+ Click here + +   to learn more about how create and apply configuration files. +

diff --git a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.scss b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.scss index 5ab7f622e..15a2ff7c6 100644 --- a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.scss +++ b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.scss @@ -10,6 +10,7 @@ h4 { nb-card { border: transparent; border-radius: 0.5rem; + padding: 0 !important; nb-card-header { background-color: #232940; @@ -17,9 +18,21 @@ nb-card { border-radius: 0.5rem; color: #969fb9; padding: 0.5rem 1rem; + button { + float: right; + margin: 0; + } + nb-icon { + float: right ; + } } nb-card-body { + border-bottom-left-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; + margin: 0 2rem 0 2rem; + padding: 0; + label { color: #969fb9; } @@ -35,22 +48,27 @@ nb-card { } pre { - background: #1c2339; - border-radius: 0.5rem; - color: #fff; - font-weight: 400; - padding: 0.75rem; + display: flex; + flex-direction: row-reverse; + flex-wrap: wrap; + align-content: space-between; + align-items: flex-start; + justify-content: space-between; + margin: 0; + background: transparent; + padding: 0.75rem; + border-radius: 0.5rem; white-space: pre-line; button { background: transparent; border: 0 transparent; color: #969fb9; + top: -0.25rem; float: right; - position: relative; right: -0.5rem; - top: -0.25rem; + outline: none; } code { @@ -100,3 +118,18 @@ nb-card { color: #df316f !important; } } +button { + box-shadow: none !important; + outline: none !important; + margin-right: 15px; +} +a { + white-space: nowrap !important; + padding: 0 0.3rem !important; + background-color: #ff9f05 !important; + font-weight: 700 !important; + text-decoration: none !important; + color: #ffffff !important; + border-radius: 10px; + fill: #3089fc !important; +} diff --git a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.ts b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.ts index ead8c5035..d3eead01b 100644 --- a/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.ts +++ b/ui/src/app/shared/components/orb/agent/agent-provisioning/agent-provisioning.component.ts @@ -12,25 +12,28 @@ export class AgentProvisioningComponent implements OnInit { agentStates = AgentStates; - command2copy: string; - copyCommandIcon: string; availableOS = [AvailableOS.DOCKER]; selectedOS = AvailableOS.DOCKER; - command2show: string; + defaultCommandCopy: string; + defaultCommandShow: string; + fileConfigCommandCopy: string; + fileConfigCommandShow: string; hideCommand: boolean; + hideCommand2: boolean; + hideCommand3: boolean; constructor() { - this.command2copy = ""; - this.command2show = ""; this.copyCommandIcon = "copy-outline"; } ngOnInit(): void { + this.hideCommand2 = false; + this.hideCommand3 = true; this.hideCommand = this.agent?.state !== this.agentStates.new; this.makeCommand2Copy(); } @@ -38,31 +41,59 @@ export class AgentProvisioningComponent implements OnInit { toggleIcon(target) { if (target === "command") { this.copyCommandIcon = "checkmark-outline"; + setTimeout(() => { + this.copyCommandIcon = "copy-outline"; + }, 2000); } } makeCommand2Copy() { - // TODO: future - store this elsewhere - if (this.selectedOS === AvailableOS.DOCKER) { - this.command2copy = `docker run -d --restart=always --net=host \\ --e ORB_CLOUD_ADDRESS=${document.location.hostname} \\ --e ORB_CLOUD_MQTT_ID=${this.agent?.id} \\ --e ORB_CLOUD_MQTT_CHANNEL_ID=${this.agent?.channel_id} \\ + this.defaultCommandCopy = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ -e ORB_CLOUD_MQTT_KEY="AGENT_KEY" \\ -e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ orbcommunity/orb-agent`; - this.command2show = `docker run -d --restart=always --net=host \\ --e ORB_CLOUD_ADDRESS=${document.location.hostname} \\ --e ORB_CLOUD_MQTT_ID=${this.agent?.id} \\ --e ORB_CLOUD_MQTT_CHANNEL_ID=${this.agent?.channel_id} \\ + this.defaultCommandShow = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ -e ORB_CLOUD_MQTT_KEY=AGENT_KEY \\ -e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ orbcommunity/orb-agent`; - } + + this.fileConfigCommandCopy = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ +-e ORB_CLOUD_MQTT_KEY="AGENT_KEY" \\ +-e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ +-v \${PWD}/:/usr/local/orb/ \\ +orbcommunity/orb-agent run -c /usr/local/orb/agent.yaml`; + + this.fileConfigCommandShow = `docker run -d --restart=always --net=host \\ +-e ORB_CLOUD_ADDRESS=${ document.location.hostname } \\ +-e ORB_CLOUD_MQTT_ID=${ this.agent.id } \\ +-e ORB_CLOUD_MQTT_CHANNEL_ID=${ this.agent.channel_id } \\ +-e ORB_CLOUD_MQTT_KEY=AGENT_KEY \\ +-e PKTVISOR_PCAP_IFACE_DEFAULT=auto \\ +-v \${PWD}/:/usr/local/orb/ \\ +orbcommunity/orb-agent run -c /usr/local/orb/agent.yaml`; } - toggleProvisioningCommand() { - this.hideCommand = !this.hideCommand; +toggleProvisioningCommand(command: string) { + switch (command) { + case 'hideCommand': + this.hideCommand = !this.hideCommand; + break; + case 'hideCommand2': + this.hideCommand2 = !this.hideCommand2; + break; + case 'hideCommand3': + this.hideCommand3 = !this.hideCommand3; + break; } } +} diff --git a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.html b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.html index 5cf951b72..d475094ee 100644 --- a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.html +++ b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.html @@ -39,10 +39,11 @@ - + No group connected   @@ -59,6 +60,7 @@ + No sink connected diff --git a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.scss b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.scss index 8da3a1ec3..156370516 100644 --- a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.scss +++ b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.scss @@ -1,6 +1,7 @@ nb-card { border: transparent; border-radius: 0.5rem; + padding: 0 !important; nb-card-header { background-color: #232940; diff --git a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.ts b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.ts index 4423530d9..581214a66 100644 --- a/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.ts +++ b/ui/src/app/shared/components/orb/policy/policy-datasets/policy-datasets.component.ts @@ -30,6 +30,7 @@ import { AgentGroupDetailsComponent } from 'app/pages/fleet/groups/details/agent import { SinkDetailsComponent } from 'app/pages/sinks/details/sink.details.component'; import { Subscription } from 'rxjs'; import { AgentMatchComponent } from 'app/pages/fleet/agents/match/agent.match.component'; +import { OrbService } from 'app/common/services/orb.service'; @Component({ selector: 'ngx-policy-datasets', @@ -44,9 +45,6 @@ export class PolicyDatasetsComponent @Input() policy: AgentPolicy; - @Output() - refreshPolicy: EventEmitter; - isLoading: boolean; subscription: Subscription; @@ -86,8 +84,8 @@ export class PolicyDatasetsComponent protected route: ActivatedRoute, protected datasetService: DatasetPoliciesService, private notificationsService: NotificationsService, + private orb: OrbService, ) { - this.refreshPolicy = new EventEmitter(); this.datasets = []; this.errors = {}; } @@ -163,7 +161,7 @@ export class PolicyDatasetsComponent }) .onClose.subscribe((resp) => { if (resp === DATASET_RESPONSE.CREATED) { - this.refreshPolicy.emit('refresh-from-dataset'); + this.orb.refreshNow(); } }); } @@ -182,7 +180,7 @@ export class PolicyDatasetsComponent }) .onClose.subscribe((resp) => { if (resp !== DATASET_RESPONSE.CANCELED) { - this.refreshPolicy.emit('refresh-from-dataset'); + this.orb.refreshNow(); } }); } @@ -232,7 +230,7 @@ export class PolicyDatasetsComponent '', ); }); - this.refreshPolicy.emit('refresh-from-dataset'); + this.orb.refreshNow(); } }); } @@ -243,7 +241,7 @@ export class PolicyDatasetsComponent showAgentGroupMatches(agentGroup) { this.dialogService.open(AgentMatchComponent, { - context: { agentGroup }, + context: { agentGroup: agentGroup, policy: this.policy }, autoFocus: true, closeOnEsc: true, }); diff --git a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.html b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.html index 2b1966485..228c1b505 100644 --- a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.html +++ b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.html @@ -7,6 +7,7 @@ nbButton shape="round" status="primary"> + Edit @@ -30,9 +31,10 @@

{{ policy?.name }}

-
+
-

{{ policy?.description }}

+

{{ policy?.description }}

+

No description provided

@@ -54,8 +56,7 @@
- - * +
- Name does not match the pattern. + Name must start with a letter or "_" and contain only letters, numbers, "-" or "_"
Name must not exceed 64 characters. @@ -87,17 +88,18 @@
- +
+ nbInput + placeholder="Policy Description"/>
- + +
diff --git a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.scss b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.scss index 1501b6877..970f42bad 100644 --- a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.scss +++ b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.scss @@ -1,6 +1,7 @@ nb-card { border: transparent; border-radius: 0.5rem; + padding: 0 !important; nb-card-header { background-color: #232940; @@ -11,6 +12,7 @@ nb-card { } nb-card-body { + padding-bottom: 0 !important; label { color: #969fb9; } @@ -22,9 +24,16 @@ nb-card { div .row { display: block; } + input { + height: 42px; + } } } - +.italic { + font-style: italic; + font-size: 0.9rem; + color: #d9deee; +} .summary-accent { color: #969fb9 !important; } diff --git a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.ts b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.ts index 6bbbf71a3..bd96f3558 100644 --- a/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.ts +++ b/ui/src/app/shared/components/orb/policy/policy-details/policy-details.component.ts @@ -10,6 +10,7 @@ import { import { AgentPolicy } from 'app/common/interfaces/orb/agent.policy.interface'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Tags } from 'app/common/interfaces/orb/tag'; +import { OrbService } from 'app/common/services/orb.service'; @Component({ selector: 'ngx-policy-details', @@ -26,15 +27,22 @@ export class PolicyDetailsComponent implements OnInit, OnChanges { @Output() editModeChange: EventEmitter; + @Input() + interfaceEditMode: boolean; + formGroup: FormGroup; selectedTags: Tags; - constructor(private fb: FormBuilder) { + constructor( + private fb: FormBuilder, + private orb: OrbService, + ) { this.policy = {}; this.editMode = false; this.editModeChange = new EventEmitter(); this.updateForm(); + this.interfaceEditMode = false; } ngOnInit(): void { @@ -76,6 +84,12 @@ export class PolicyDetailsComponent implements OnInit, OnChanges { toggleEdit(value, notify = true) { this.editMode = value; + if (this.editMode || this.interfaceEditMode) { + this.orb.pausePolling(); + } + else { + this.orb.startPolling(); + } this.updateForm(); !!notify && this.editModeChange.emit(this.editMode); } diff --git a/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.html b/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.html index ac87f20f3..cfdbd4b9a 100644 --- a/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.html +++ b/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.html @@ -2,16 +2,36 @@ Assigned Groups
- + + + + Group: {{ group?.name }} + + + + + + Group don't have any agents. + + + + + + + Policy not assigned to any group +

{{ errors.nogroup }} diff --git a/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.scss b/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.scss index 87a560751..752cd7091 100644 --- a/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.scss +++ b/ui/src/app/shared/components/orb/policy/policy-groups/policy-groups.component.scss @@ -14,7 +14,7 @@ button { nb-card { border: transparent; border-radius: 0.5rem; - + padding: 0 !important; nb-card-header { background-color: #232940; border-bottom: transparent; @@ -120,16 +120,25 @@ nb-card { color: #df316f !important; } } - -::ng-deep .agent-group-button { +.no-agents { + color: #fff; + font-family: 'Roboto'; + font-size: 13px; + font-weight: 600; + line-height: 1.5rem; +} +.agent-group-button { background-color: transparent !important; background-repeat: no-repeat !important; - border: solid #ffffff !important; - border-radius: 15px !important; - border-width: thin !important; + border: none !important; cursor: pointer !important; outline: none !important; overflow: hidden !important; + color: #fff; + font-family: 'Montserrat', sans-serif; + font-size: 13px; + font-weight: 600; + line-height: 1.5rem; } .agent-group-accent { @@ -141,3 +150,39 @@ nb-card { color: #df316f !important; font-weight: 600; } + +::ng-deep nb-accordion { + border: none !important; + border-radius: 8px !important; + display: grid; + padding: -0.1rem !important; + margin: -0.1rem !important; + text-subtitle-line-height: 1rem; + box-shadow: none !important; + + > nb-accordion-item { + border: none !important; + border-radius: 8px !important; + padding: -0.1rem !important; + margin: -0.1rem !important; + + > nb-accordion-item-header { + border: none !important; + border-radius: 8px !important; + padding: 0.1rem 0 !important; + background-color: transparent !important; + } + + > nb-accordion-item-body { + border: none !important; + border-radius: 8px !important; + display: grid; + padding: 0 10px 0 10px; + background-color: #1c2339; + + .item-body { + padding: 0.1em !important; + } + } + } +} diff --git a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.html b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.html index 326951e02..f66dd5180 100644 --- a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.html +++ b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.html @@ -6,6 +6,7 @@ class="card-button" nbButton status="primary"> + Edit diff --git a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.scss b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.scss index 9090a1259..e21374c8b 100644 --- a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.scss +++ b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.scss @@ -1,7 +1,7 @@ nb-card { border: transparent; border-radius: 0.5rem; - + padding: 0 !important; nb-card-header { background-color: #232940; border-bottom: transparent; @@ -70,7 +70,7 @@ nb-card { .code-editor-wrapper { min-height: 350px; min-width: 200px; - height: calc(50vh); + height: 367px; width: calc(100%); display: block; } diff --git a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.ts b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.ts index cc247ff92..2599fbded 100644 --- a/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.ts +++ b/ui/src/app/shared/components/orb/policy/policy-interface/policy-interface.component.ts @@ -12,6 +12,7 @@ import { import { AgentPolicy } from 'app/common/interfaces/orb/agent.policy.interface'; import { FormBuilder, FormControl, Validators } from '@angular/forms'; import IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions; +import { OrbService } from 'app/common/services/orb.service'; @Component({ selector: 'ngx-policy-interface', @@ -28,6 +29,9 @@ export class PolicyInterfaceComponent implements OnInit, AfterViewInit, OnChange @Output() editModeChange: EventEmitter; + @Input() + detailsEditMode: boolean; + @ViewChild('editorComponent') editor; @@ -58,12 +62,14 @@ export class PolicyInterfaceComponent implements OnInit, AfterViewInit, OnChange constructor( private fb: FormBuilder, + private orb: OrbService, ) { this.policy = {}; this.code = ''; this.editMode = false; this.editModeChange = new EventEmitter(); this.updateForm(); + this.detailsEditMode = false; } ngOnInit(): void { @@ -92,6 +98,12 @@ export class PolicyInterfaceComponent implements OnInit, AfterViewInit, OnChange toggleEdit(edit, notify = true) { this.editMode = edit; + if (this.editMode || this.detailsEditMode) { + this.orb.pausePolling(); + } + else { + this.orb.startPolling(); + } this.editorOptions = { ...this.editorOptions, readOnly: !edit }; this.updateForm(); !!notify && this.editModeChange.emit(this.editMode); diff --git a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.html b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.html index d99040b3a..05d4d1e02 100644 --- a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.html +++ b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.html @@ -1,21 +1,30 @@ - Sink Backend Configuration - - + + + +

@@ -25,7 +34,14 @@ [(ngModel)]="code" [options]="editorOptions" class="code-editor" - ngDefaultControl> + ngDefaultControl + *ngIf="!isYaml"> + +
diff --git a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.scss b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.scss index 0abd319d2..cdd48cfd7 100644 --- a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.scss +++ b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.scss @@ -4,12 +4,49 @@ ngx-monaco-editor { .summary-accent { color: #969fb9 !important; } -nb-card { - width: 50vw; - min-width: 340px; + +.switch-button { + color: #3089fc; + background-color: transparent; + border: none; + font-weight: 600; + outline: none; + margin-right: 20px; + margin-top: 7px; + display: inline-block; } -@media (max-width: 1500px) { - nb-card { - width: 35vw; - } +.switch-button:hover { + color: #75a5e2; +} +.flex { + display: flex; + justify-content: space-between; + align-items: center; +} +.align-items { + margin-left: auto; } +nb-card { + margin: 15px 0 !important; + padding: 0 !important; + border: transparent; + border-radius: 0.5rem; + + nb-card-header { + background-color: #232940; + border-bottom: transparent; + border-radius: 0.5rem; + color: #969fb9; + padding: 0.5rem 1rem; + } + + nb-card-body { + label { + color: #969fb9; + } + + span { + text-align: end; + } + } + } diff --git a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.ts b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.ts index a03960e1b..ce30aa4b3 100644 --- a/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.ts +++ b/ui/src/app/shared/components/orb/sink/sink-config/sink-config.component.ts @@ -1,7 +1,10 @@ import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; import { FormBuilder, FormControl, Validators } from '@angular/forms'; import { Sink, SinkBackends } from 'app/common/interfaces/orb/sink.interface'; +import * as YAML from 'yaml'; import IStandaloneEditorConstructionOptions = monaco.editor.IStandaloneEditorConstructionOptions; +import { OrbService } from 'app/common/services/orb.service'; + @Component({ selector: 'ngx-sink-config', templateUrl: './sink-config.component.html', @@ -24,6 +27,9 @@ export class SinkConfigComponent implements OnInit, OnChanges { @Output() editModeChange: EventEmitter; + @Input() + detailsEditMode: boolean; + @ViewChild('editorComponent') editor; @@ -48,7 +54,16 @@ export class SinkConfigComponent implements OnInit, OnChanges { lineDecorationsWidth: 0, lineNumbersMinChars: 0, }; - + editorOptionsYaml = { + theme: 'vs-dark', + language: 'yaml', + automaticLayout: true, + glyphMargin: false, + folding: true, + lineDecorationsWidth: 0, + lineNumbersMinChars: 0, + readOnly: true, + }; code = ''; sinkConfigSchemaPrometheus: any; @@ -57,10 +72,17 @@ export class SinkConfigComponent implements OnInit, OnChanges { formControl: FormControl; - constructor(private fb: FormBuilder) { + isYaml: boolean; + + constructor( + private fb: FormBuilder, + private orb: OrbService, + ) { + this.isYaml = true; this.sink = {}; this.editMode = false; this.editModeChange = new EventEmitter(); + this.detailsEditMode = false; this.updateForm(); this.sinkConfigSchemaPrometheus = { "authentication" : { @@ -89,43 +111,87 @@ export class SinkConfigComponent implements OnInit, OnChanges { ngOnInit(): void { if (this.createMode) { this.toggleEdit(true); - this.code = JSON.stringify(this.sinkConfigSchemaOtlp, null, 2); + this.code = YAML.stringify(this.sinkConfigSchemaOtlp); } else { - this.code = JSON.stringify(this.sink.config, null, 2); - } - } + // if (this.sink.config_data && this.sink.format === 'yaml') { + // this.isYaml = true; + const parsedCode = YAML.parse(JSON.stringify(this.sink.config)); + this.code = YAML.stringify(parsedCode); + // } + // else if (this.isJson(JSON.stringify(this.sink.config))) { + // this.isYaml = false; + // this.code = JSON.stringify(this.sink.config, null, 2); + // } - ngOnChanges(changes: SimpleChanges) { - if (changes?.editMode && !changes?.editMode.firstChange) { - this.toggleEdit(changes.editMode.currentValue, false); } - if (changes?.sinkBackend) { - if (this.sinkBackend === SinkBackends.prometheus) { - this.code = JSON.stringify(this.sinkConfigSchemaPrometheus, null, 2); - } - else { - this.code = JSON.stringify(this.sinkConfigSchemaOtlp, null, 2); - } + } + isJson(str: string) { + try { + JSON.parse(str); + return true; + } catch { + return false; } } +ngOnChanges(changes: SimpleChanges) { + const { editMode, sinkBackend } = changes; + if (editMode && !editMode.firstChange) { + this.toggleEdit(editMode.currentValue, false); + } + if (sinkBackend) { + const sinkConfigSchema = this.sinkBackend === SinkBackends.prometheus + ? this.sinkConfigSchemaPrometheus + : this.sinkConfigSchemaOtlp; + + this.code = this.isYaml + ? YAML.stringify(sinkConfigSchema, null) + : JSON.stringify(sinkConfigSchema, null, 2); + this.code = YAML.stringify(sinkConfigSchema, null); + } +} - updateForm() { - const { config } = this.sink; - if (this.editMode) { - this.code = JSON.stringify(config, null, 2); - this.formControl = this.fb.control(this.code, [Validators.required]); - } else { - this.formControl = this.fb.control(null, [Validators.required]); - this.code = JSON.stringify(config, null, 2); - } +updateForm() { + const configData = this.sink.config; + // const isYamlFormat = this.sink.format === 'yaml'; + + if (this.editMode) { + // this.isYaml = isYamlFormat; + // this.code = isYamlFormat ? YAML.stringify(configData) : JSON.stringify(this.sink.config, null, 2); + this.code = YAML.stringify(configData); + } else { + this.formControl = this.fb.control(null, [Validators.required]); + // this.isYaml = isYamlFormat; + // this.code = isYamlFormat ? YAML.stringify(configData) : JSON.stringify(this.sink.config, null, 2); + this.code = YAML.stringify(configData); } + this.formControl = this.fb.control(this.code, [Validators.required]); +} + toggleEdit(edit, notify = true) { this.editMode = edit; + if ((this.editMode || this.detailsEditMode) && !this.createMode) { + this.orb.pausePolling(); + } + else { + this.orb.startPolling(); + } this.editorOptions = { ...this.editorOptions, readOnly: !edit }; + this.editorOptionsYaml = { ...this.editorOptionsYaml, readOnly: !edit }; this.updateForm(); !!notify && this.editModeChange.emit(this.editMode); } - + toggleLanguage() { + this.isYaml = !this.isYaml; + if (this.isYaml) { + const parsedCode = YAML.parse(this.code); + this.code = YAML.stringify(parsedCode); + } + else { + const parsedConfig = YAML.parse(this.code); + this.code = JSON.stringify(parsedConfig, null, 2); + } + } + } diff --git a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.html b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.html index 6bebef6e6..4057269f2 100644 --- a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.html +++ b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.html @@ -7,6 +7,7 @@ nbButton shape="round" status="primary"> + Edit @@ -29,7 +30,7 @@

{{ sink?.name }}

-
+

{{ sink?.description }}

@@ -49,12 +50,12 @@
-
+
- + *
+ nbInput + [status]="formGroup?.controls.name.dirty ? (!formGroup.controls.name.valid ? 'danger' : 'success') : 'basic'"/>
- Name does not match the pattern. + Name must start with a letter or "_" and contain only letters, numbers, "-" or "_"
- +
+ nbInput + placeholder="Sink Description"/>
- +
-
+
- - * +
+ nbInput + [status]="formGroup?.controls.name.dirty ? (!formGroup.controls.name.valid ? 'danger' : 'success') : 'basic'" + placeholder="Sink Name"/>
Name is required. @@ -130,18 +133,19 @@
- +
+ nbInput + placeholder="Sink Description"/>
- + *
- +
diff --git a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.scss b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.scss index c525932ca..4cc2a27c4 100644 --- a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.scss +++ b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.scss @@ -24,13 +24,32 @@ input { color: #df316f; } &idle { - color: #f2dc4a; + color: #f2994a; } } .ns1red { color: #df316f; } - nb-card { - width: 25em; + margin: 15px 0 !important; + padding: 0 !important; + border: transparent; + border-radius: 0.5rem; + + nb-card-header { + background-color: #232940; + border-bottom: transparent; + border-radius: 0.5rem; + color: #969fb9; + padding: 0.5rem 1rem; + } + nb-card-body { + label { + color: #969fb9; + } + + span { + text-align: end; + } + } } \ No newline at end of file diff --git a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.ts b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.ts index 3c39fd0f6..f778e651c 100644 --- a/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.ts +++ b/ui/src/app/shared/components/orb/sink/sink-details/sink-details.component.ts @@ -3,8 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Sink, SinkBackends, SinkStates } from 'app/common/interfaces/orb/sink.interface'; import { SinkFeature } from 'app/common/interfaces/orb/sink/sink.feature.interface'; import { Tags } from 'app/common/interfaces/orb/tag'; +import { OrbService } from 'app/common/services/orb.service'; import { SinksService } from 'app/common/services/sinks/sinks.service'; -import { SinkConfigComponent } from '../sink-config/sink-config.component'; @Component({ @@ -30,6 +30,9 @@ export class SinkDetailsComponent implements OnInit, OnChanges { @Output() editModeChange: EventEmitter; + @Input() + configEditMode: boolean; + formGroup: FormGroup; selectedTags: Tags; @@ -43,6 +46,7 @@ export class SinkDetailsComponent implements OnInit, OnChanges { constructor( private fb: FormBuilder, private sinksService: SinksService, + private orb: OrbService, ) { this.sink = {}; this.createMode = false; @@ -50,6 +54,7 @@ export class SinkDetailsComponent implements OnInit, OnChanges { this.mode = 'read'; this.sinkBackend = new EventEmitter(); this.editModeChange = new EventEmitter(); + this.configEditMode = false; this.updateForm(); Promise.all([this.getSinkBackends()]).then((responses) => { const backends = responses[0]; @@ -111,6 +116,12 @@ export class SinkDetailsComponent implements OnInit, OnChanges { toggleEdit(value, notify = true) { this.editMode = value; + if (this.editMode || this.configEditMode) { + this.orb.pausePolling(); + } + else { + this.orb.startPolling(); + } this.updateForm(); !!notify && this.editModeChange.emit(this.editMode); } diff --git a/ui/src/app/shared/components/orb/tag-control/tag-control.component.html b/ui/src/app/shared/components/orb/tag-control/tag-control.component.html index 3153d5de3..a399cfd4b 100644 --- a/ui/src/app/shared/components/orb/tag-control/tag-control.component.html +++ b/ui/src/app/shared/components/orb/tag-control/tag-control.component.html @@ -4,30 +4,32 @@ - {{tag | tagchip}} + {{ tag.key }}:  + {{ tag.value }} + size="12" + style="color: #df316f;"> + - No tag added + No tag added
-
+
- - * +
+ nbInput + (keyup.enter)="onEnter()" + placeholder="Tag Key"/>
- + :
- - * + +
+ nbInput + (keyup.enter)="onEnter()" + placeholder="Tag Value"/>
+ style="transform: translateY(14px); white-space: nowrap;">