From 8a8cf4d9381f07218dfe145d632845964fa240e2 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 29 Nov 2022 11:34:39 +0100 Subject: [PATCH 01/18] feat(backend/sink): manually sync all files on partitions rebalanced event (#847) --- backend/cmd/sink/main.go | 9 +++ backend/go.mod | 4 +- backend/go.sum | 15 ++--- backend/internal/sink/sessionwriter/writer.go | 16 +++-- backend/pkg/queue/types/types.go | 1 + backend/pkg/redisstream/consumer.go | 6 ++ ee/backend/pkg/kafka/consumer.go | 62 ++++++++++++------- ee/backend/pkg/kafka/log.go | 7 +-- ee/backend/pkg/kafka/producer.go | 2 +- 9 files changed, 76 insertions(+), 46 deletions(-) diff --git a/backend/cmd/sink/main.go b/backend/cmd/sink/main.go index a7e2804c4..fcd78c3aa 100644 --- a/backend/cmd/sink/main.go +++ b/backend/cmd/sink/main.go @@ -147,6 +147,15 @@ func main() { case <-tickInfo: counter.Print() log.Printf("writer: %s", writer.Info()) + case <-consumer.Rebalanced(): + s := time.Now() + // Commit now to avoid duplicate reads + if err := consumer.Commit(); err != nil { + log.Printf("can't commit messages: %s", err) + } + // Sync all files + writer.Sync() + log.Printf("manual sync finished, dur: %d", time.Now().Sub(s).Milliseconds()) default: err := consumer.ConsumeNext() if err != nil { diff --git a/backend/go.mod b/backend/go.mod index b1046b08e..bc0f1896f 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -8,6 +8,7 @@ require ( github.com/Masterminds/semver v1.5.0 github.com/aws/aws-sdk-go v1.44.98 github.com/btcsuite/btcutil v1.0.2 + github.com/confluentinc/confluent-kafka-go v1.8.2 github.com/elastic/go-elasticsearch/v7 v7.13.1 github.com/go-redis/redis v6.15.9+incompatible github.com/google/uuid v1.3.0 @@ -28,7 +29,6 @@ require ( go.opentelemetry.io/otel/sdk/metric v0.30.0 golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 google.golang.org/api v0.81.0 - gopkg.in/confluentinc/confluent-kafka-go.v1 v1.8.2 ) require ( @@ -38,7 +38,6 @@ require ( cloud.google.com/go/storage v1.14.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/confluentinc/confluent-kafka-go v1.9.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -53,7 +52,6 @@ require ( github.com/jackc/puddle v1.2.2-0.20220404125616-4e959849469a // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.15.7 // indirect - github.com/kr/pretty v0.3.0 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/paulmach/orb v0.7.1 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect diff --git a/backend/go.sum b/backend/go.sum index fea2aa1a3..cef80ac2c 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -115,12 +115,11 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/confluentinc/confluent-kafka-go v1.9.0 h1:d1k62oAuQVxgdMdiDQnpkABbtIWTBwXHpDcyGQUw5QQ= -github.com/confluentinc/confluent-kafka-go v1.9.0/go.mod h1:WDFs+KlhHITEoCzEfHSNgj5aP7vjajyYbZpvTEGs1sE= +github.com/confluentinc/confluent-kafka-go v1.8.2 h1:PBdbvYpyOdFLehj8j+9ba7FL4c4Moxn79gy9cYKxG5E= +github.com/confluentinc/confluent-kafka-go v1.8.2/go.mod h1:u2zNLny2xq+5rWeTQjFHbDzzNuba4P1vo31r9r4uAdg= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -328,14 +327,12 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.2/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/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= @@ -400,8 +397,6 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -941,8 +936,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/confluentinc/confluent-kafka-go.v1 v1.8.2 h1:QAgN6OC0o7dwvyz+HML6GYm+0Pk54O91+oxGqJ/5z8I= -gopkg.in/confluentinc/confluent-kafka-go.v1 v1.8.2/go.mod h1:ZdI3yfYmdNSLQPNCpO1y00EHyWaHG5EnQEyL/ntAegY= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= diff --git a/backend/internal/sink/sessionwriter/writer.go b/backend/internal/sink/sessionwriter/writer.go index f2eb052c7..7da1ae878 100644 --- a/backend/internal/sink/sessionwriter/writer.go +++ b/backend/internal/sink/sessionwriter/writer.go @@ -97,17 +97,21 @@ func (w *SessionWriter) Info() string { return fmt.Sprintf("%d sessions", w.meta.Count()) } +func (w *SessionWriter) Sync() { + w.sessions.Range(func(sid, lockObj any) bool { + if err := w.sync(sid.(uint64)); err != nil { + log.Printf("can't sync file descriptor: %s", err) + } + return true + }) +} + func (w *SessionWriter) synchronizer() { tick := time.Tick(w.syncTimeout) for { select { case <-tick: - w.sessions.Range(func(sid, lockObj any) bool { - if err := w.sync(sid.(uint64)); err != nil { - log.Printf("can't sync file descriptor: %s", err) - } - return true - }) + w.Sync() case <-w.done: w.sessions.Range(func(sid, lockObj any) bool { if err := w.Close(sid.(uint64)); err != nil { diff --git a/backend/pkg/queue/types/types.go b/backend/pkg/queue/types/types.go index 48408ce10..21ee49d60 100644 --- a/backend/pkg/queue/types/types.go +++ b/backend/pkg/queue/types/types.go @@ -6,6 +6,7 @@ type Consumer interface { CommitBack(gap int64) error Commit() error Close() + Rebalanced() <-chan interface{} } // Producer sends batches of session data to queue (redis or kafka) diff --git a/backend/pkg/redisstream/consumer.go b/backend/pkg/redisstream/consumer.go index 228b2c7a0..3c5b6d0a4 100644 --- a/backend/pkg/redisstream/consumer.go +++ b/backend/pkg/redisstream/consumer.go @@ -27,6 +27,7 @@ type Consumer struct { idsPending streamPendingIDsMap lastTs int64 autoCommit bool + event chan interface{} } func NewConsumer(group string, streams []string, messageIterator messages.MessageIterator) *Consumer { @@ -57,11 +58,16 @@ func NewConsumer(group string, streams []string, messageIterator messages.Messag group: group, autoCommit: true, idsPending: idsPending, + event: make(chan interface{}, 4), } } const READ_COUNT = 10 +func (c *Consumer) Rebalanced() <-chan interface{} { + return c.event +} + func (c *Consumer) ConsumeNext() error { // MBTODO: read in go routine, send messages to channel res, err := c.redis.XReadGroup(&_redis.XReadGroupArgs{ diff --git a/ee/backend/pkg/kafka/consumer.go b/ee/backend/pkg/kafka/consumer.go index 14f8d5a68..bea1f0604 100644 --- a/ee/backend/pkg/kafka/consumer.go +++ b/ee/backend/pkg/kafka/consumer.go @@ -2,24 +2,24 @@ package kafka import ( "log" - "openreplay/backend/pkg/messages" "os" "time" - "github.com/pkg/errors" - - "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka" "openreplay/backend/pkg/env" + "openreplay/backend/pkg/messages" + + "github.com/confluentinc/confluent-kafka-go/kafka" + "github.com/pkg/errors" ) type Message = kafka.Message type Consumer struct { - c *kafka.Consumer - messageIterator messages.MessageIterator - commitTicker *time.Ticker - pollTimeout uint - + c *kafka.Consumer + messageIterator messages.MessageIterator + commitTicker *time.Ticker + pollTimeout uint + events chan interface{} lastReceivedPrtTs map[int32]int64 } @@ -48,7 +48,7 @@ func NewConsumer( kafkaConfig.SetKey("ssl.certificate.location", os.Getenv("KAFKA_SSL_CERT")) } - // Apply Kerberos configuration + // Apply Kerberos configuration if env.Bool("KAFKA_USE_KERBEROS") { kafkaConfig.SetKey("security.protocol", "sasl_plaintext") kafkaConfig.SetKey("sasl.mechanisms", "GSSAPI") @@ -61,6 +61,21 @@ func NewConsumer( if err != nil { log.Fatalln(err) } + + var commitTicker *time.Ticker + if autoCommit { + commitTicker = time.NewTicker(2 * time.Minute) + } + + consumer := &Consumer{ + c: c, + messageIterator: messageIterator, + commitTicker: commitTicker, + pollTimeout: 200, + events: make(chan interface{}, 4), + lastReceivedPrtTs: make(map[int32]int64, 16), + } + subREx := "^(" for i, t := range topics { if i != 0 { @@ -69,22 +84,27 @@ func NewConsumer( subREx += t } subREx += ")$" - if err := c.Subscribe(subREx, nil); err != nil { + if err := c.Subscribe(subREx, consumer.reBalanceCallback); err != nil { log.Fatalln(err) } - var commitTicker *time.Ticker - if autoCommit { - commitTicker = time.NewTicker(2 * time.Minute) - } + return consumer +} - return &Consumer{ - c: c, - messageIterator: messageIterator, - commitTicker: commitTicker, - pollTimeout: 200, - lastReceivedPrtTs: make(map[int32]int64), +func (consumer *Consumer) reBalanceCallback(_ *kafka.Consumer, e kafka.Event) error { + switch evt := e.(type) { + case kafka.RevokedPartitions: + // receive before re-balancing partitions; stop consuming messages and commit current state + consumer.events <- evt.String() + case kafka.AssignedPartitions: + // receive after re-balancing partitions; continue consuming messages + //consumer.events <- evt.String() } + return nil +} + +func (consumer *Consumer) Rebalanced() <-chan interface{} { + return consumer.events } func (consumer *Consumer) Commit() error { diff --git a/ee/backend/pkg/kafka/log.go b/ee/backend/pkg/kafka/log.go index 0cd80cb6d..c71c6d2bd 100644 --- a/ee/backend/pkg/kafka/log.go +++ b/ee/backend/pkg/kafka/log.go @@ -1,16 +1,15 @@ package kafka import ( - "log" "fmt" + "log" - "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka" + "github.com/confluentinc/confluent-kafka-go/kafka" ) - func logPartitions(s string, prts []kafka.TopicPartition) { for _, p := range prts { s = fmt.Sprintf("%v | %v", s, p.Partition) } log.Println(s) -} \ No newline at end of file +} diff --git a/ee/backend/pkg/kafka/producer.go b/ee/backend/pkg/kafka/producer.go index f895241a7..1ec241b8a 100644 --- a/ee/backend/pkg/kafka/producer.go +++ b/ee/backend/pkg/kafka/producer.go @@ -5,7 +5,7 @@ import ( "log" "os" - "gopkg.in/confluentinc/confluent-kafka-go.v1/kafka" + "github.com/confluentinc/confluent-kafka-go/kafka" "openreplay/backend/pkg/env" ) From 90f88abdb487c5c0fdda8c7387951d60e114bf2b Mon Sep 17 00:00:00 2001 From: Alexander Zavorotynskiy Date: Tue, 29 Nov 2022 11:44:58 +0100 Subject: [PATCH 02/18] feat(backend): fix vulnerability in /x/net --- backend/cmd/sink/main.go | 3 --- backend/go.mod | 4 ++-- backend/go.sum | 7 ++++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/backend/cmd/sink/main.go b/backend/cmd/sink/main.go index fcd78c3aa..03f11b200 100644 --- a/backend/cmd/sink/main.go +++ b/backend/cmd/sink/main.go @@ -14,14 +14,11 @@ import ( "openreplay/backend/internal/storage" "openreplay/backend/pkg/messages" "openreplay/backend/pkg/monitoring" - "openreplay/backend/pkg/pprof" "openreplay/backend/pkg/queue" "openreplay/backend/pkg/url/assets" ) func main() { - pprof.StartProfilingServer() - metrics := monitoring.New("sink") log.SetFlags(log.LstdFlags | log.LUTC | log.Llongfile) diff --git a/backend/go.mod b/backend/go.mod index bc0f1896f..61d644a17 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -27,7 +27,7 @@ require ( go.opentelemetry.io/otel/exporters/prometheus v0.30.0 go.opentelemetry.io/otel/metric v0.30.0 go.opentelemetry.io/otel/sdk/metric v0.30.0 - golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 + golang.org/x/net v0.0.0-20220906165146-f3363e06e74c google.golang.org/api v0.81.0 ) @@ -67,7 +67,7 @@ require ( golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect + golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect golang.org/x/text v0.4.0 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/backend/go.sum b/backend/go.sum index cef80ac2c..c7abea25e 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -561,8 +561,9 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220906165146-f3363e06e74c h1:yKufUcDwucU5urd+50/Opbt4AYpqthk7wHpHok8f1lo= +golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= 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= @@ -674,8 +675,8 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/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-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/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/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From aa3e7cde061d3ac6de3bbf3676beea468dfb4970 Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Tue, 29 Nov 2022 12:39:21 +0100 Subject: [PATCH 03/18] Update .env.sample --- frontend/.env.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/.env.sample b/frontend/.env.sample index 33c67be52..d5337deee 100644 --- a/frontend/.env.sample +++ b/frontend/.env.sample @@ -23,4 +23,4 @@ MINIO_SECRET_KEY = '' # APP and TRACKER VERSIONS VERSION = '1.9.0' -TRACKER_VERSION = '4.1.7' +TRACKER_VERSION = '4.1.9' From e9e5a9399952a6919eef721e0c084f7cacce2ccb Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 13:08:52 +0100 Subject: [PATCH 04/18] change(ui) - popover behaviour --- frontend/app/components/ui/Popover/Popover.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/ui/Popover/Popover.tsx b/frontend/app/components/ui/Popover/Popover.tsx index 1c1e2a67e..d8a0e260f 100644 --- a/frontend/app/components/ui/Popover/Popover.tsx +++ b/frontend/app/components/ui/Popover/Popover.tsx @@ -59,7 +59,7 @@ const Popover = ({ children, render, placement, onOpen = () => {} }: Props) => { {open && ( From e2b8601390dec25437e9e8b20f801698fe381c62 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 13:42:20 +0100 Subject: [PATCH 05/18] change(ui) - popover dropdown, and replayer subheader buttons --- .../components/Session_/Autoplay/Autoplay.tsx | 25 +----- .../app/components/Session_/Issues/Issues.js | 45 +++++----- .../Session_/Player/Overlay/AutoplayTimer.tsx | 50 ++++++----- frontend/app/components/Session_/Subheader.js | 88 +++++++++---------- .../shared/AutoplayToggle/AutoplayToggle.tsx | 29 ++++++ .../components/shared/AutoplayToggle/index.ts | 1 + .../shared/SharePopup/SharePopup.js | 2 +- 7 files changed, 124 insertions(+), 116 deletions(-) create mode 100644 frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx create mode 100644 frontend/app/components/shared/AutoplayToggle/index.ts diff --git a/frontend/app/components/Session_/Autoplay/Autoplay.tsx b/frontend/app/components/Session_/Autoplay/Autoplay.tsx index a83aa3997..5f54b4a8a 100644 --- a/frontend/app/components/Session_/Autoplay/Autoplay.tsx +++ b/frontend/app/components/Session_/Autoplay/Autoplay.tsx @@ -2,8 +2,7 @@ import React, { useEffect } from 'react'; import { connect } from 'react-redux'; import { setAutoplayValues } from 'Duck/sessions'; import { session as sessionRoute } from 'App/routes'; -import { Link, Icon, Toggler, Tooltip } from 'UI'; -import { Controls as PlayerControls, connectPlayer } from 'Player'; +import { Link, Icon, Tooltip } from 'UI'; import { withRouter, RouteComponentProps } from 'react-router-dom'; import cn from 'classnames'; import { fetchAutoplaySessions } from 'Duck/search'; @@ -13,12 +12,10 @@ const PER_PAGE = 10; interface Props extends RouteComponentProps { previousId: string; nextId: string; - autoplay: boolean; defaultList: any; currentPage: number; total: number; setAutoplayValues?: () => void; - toggleAutoplay?: () => void; latestRequestTime: any; sessionIds: any; fetchAutoplaySessions?: (page: number) => Promise; @@ -29,7 +26,6 @@ function Autoplay(props: Props) { nextId, currentPage, total, - autoplay, sessionIds, latestRequestTime, match: { @@ -54,14 +50,6 @@ function Autoplay(props: Props) { return (
-
- - Auto-Play -
- Play Previous Session
} @@ -111,13 +99,4 @@ export default connect( latestRequestTime: state.getIn(['search', 'latestRequestTime']), }), { setAutoplayValues, fetchAutoplaySessions } -)( - connectPlayer( - (state: any) => ({ - autoplay: state.autoplay, - }), - { - toggleAutoplay: PlayerControls.toggleAutoplay, - } - )(withRouter(Autoplay)) -); +)(withRouter(Autoplay)); diff --git a/frontend/app/components/Session_/Issues/Issues.js b/frontend/app/components/Session_/Issues/Issues.js index 3c037a019..2cc309624 100644 --- a/frontend/app/components/Session_/Issues/Issues.js +++ b/frontend/app/components/Session_/Issues/Issues.js @@ -1,6 +1,6 @@ import React from 'react'; import { connect } from 'react-redux'; -import { Icon, Popover } from 'UI'; +import { Icon, Popover, Button } from 'UI'; import IssuesModal from './IssuesModal'; import { fetchProjects, fetchMeta } from 'Duck/assignments'; import stl from './issues.module.css'; @@ -67,30 +67,27 @@ class Issues extends React.Component { const provider = issuesIntegration.provider; return ( -
-
- ( -
- -
- )} - > -
- - Create Issue -
-
+ ( +
+ +
+ )} + > +
+
-
+ {/*
+ + Create Issue +
*/} + ); } } diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index a99633bb4..83d993e6b 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -1,9 +1,9 @@ -import React, { useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react'; import cn from 'classnames'; -import { connect } from 'react-redux' +import { connect } from 'react-redux'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { Button, Link } from 'UI' -import { session as sessionRoute, withSiteId } from 'App/routes' +import { Button, Link } from 'UI'; +import { session as sessionRoute, withSiteId } from 'App/routes'; import stl from './AutoplayTimer.module.css'; import clsOv from './overlay.module.css'; @@ -13,49 +13,53 @@ interface IProps extends RouteComponentProps { } function AutoplayTimer({ nextId, siteId, history }: IProps) { - let timer: NodeJS.Timer + let timer: NodeJS.Timer; const [cancelled, setCancelled] = useState(false); const [counter, setCounter] = useState(5); useEffect(() => { - if(counter > 0) { + if (counter > 0) { timer = setTimeout(() => { - setCounter(counter - 1) - }, 1000) + setCounter(counter - 1); + }, 1000); } if (counter === 0) { - history.push(withSiteId(sessionRoute(nextId), siteId)) + history.push(withSiteId(sessionRoute(nextId), siteId)); } return () => clearTimeout(timer); - }, [counter]) + }, [counter]); const cancel = () => { - clearTimeout(timer) - setCancelled(true) - } + clearTimeout(timer); + setCancelled(true); + }; - if (cancelled) - return null + if (cancelled) return null; return ( -
+
Next recording will be played in {counter}s
- +
- +
+
Turn on/off auto-replay in: More options
- ) + ); } -export default withRouter(connect(state => ({ - siteId: state.getIn([ 'site', 'siteId' ]), - nextId: parseInt(state.getIn([ 'sessions', 'nextId' ])), -}))(AutoplayTimer)) +export default withRouter( + connect((state: any) => ({ + siteId: state.getIn(['site', 'siteId']), + nextId: parseInt(state.getIn(['sessions', 'nextId'])), + }))(AutoplayTimer) +); diff --git a/frontend/app/components/Session_/Subheader.js b/frontend/app/components/Session_/Subheader.js index a1ee8e48d..b45c49e00 100644 --- a/frontend/app/components/Session_/Subheader.js +++ b/frontend/app/components/Session_/Subheader.js @@ -10,6 +10,7 @@ import { connectPlayer, pause } from 'Player'; import ItemMenu from './components/HeaderMenu'; import { useModal } from 'App/components/Modal'; import BugReportModal from './BugReport/BugReportModal'; +import AutoplayToggle from 'Shared/AutoplayToggle'; function SubHeader(props) { const [isCopied, setCopied] = React.useState(false); @@ -29,8 +30,16 @@ function SubHeader(props) { exceptionsList: props.exceptionsList, eventsList: props.eventsList, endTime: props.endTime, - } - showModal(, { right: true }); + }; + showModal( + , + { right: true } + ); }; return ( @@ -55,39 +64,31 @@ function SubHeader(props) { className="ml-auto text-sm flex items-center color-gray-medium gap-2" style={{ width: 'max-content' }} > - + + + + +
+ } + /> , + }, { key: 2, - component: props.jiraConfig && props.jiraConfig.token && ( - - ), - }, - { - key: 3, - component: ( - - - Share -
- } - /> - ), - }, - { - key: 4, component: , }, ]} @@ -102,20 +103,17 @@ function SubHeader(props) { ); } -const SubH = connectPlayer( - (state) => ({ - width: state.width, - height: state.height, - currentLocation: state.location, - resourceList: state.resourceList - .filter((r) => r.isRed() || r.isYellow()) - .concat(state.fetchList.filter((i) => parseInt(i.status) >= 400)) - .concat(state.graphqlList.filter((i) => parseInt(i.status) >= 400)), - exceptionsList: state.exceptionsList, - eventsList: state.eventList, - endTime: state.endTime, - }) - - )(SubHeader); +const SubH = connectPlayer((state) => ({ + width: state.width, + height: state.height, + currentLocation: state.location, + resourceList: state.resourceList + .filter((r) => r.isRed() || r.isYellow()) + .concat(state.fetchList.filter((i) => parseInt(i.status) >= 400)) + .concat(state.graphqlList.filter((i) => parseInt(i.status) >= 400)), + exceptionsList: state.exceptionsList, + eventsList: state.eventList, + endTime: state.endTime, +}))(SubHeader); export default React.memo(SubH); diff --git a/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx b/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx new file mode 100644 index 000000000..3f25fd525 --- /dev/null +++ b/frontend/app/components/shared/AutoplayToggle/AutoplayToggle.tsx @@ -0,0 +1,29 @@ +import React from 'react'; +import { Controls as PlayerControls, connectPlayer } from 'Player'; +import { Toggler } from 'UI'; + +interface Props { + toggleAutoplay: () => void; + autoplay: boolean; +} +function AutoplayToggle(props: Props) { + const { autoplay } = props; + return ( +
+ + Auto-Play +
+ ); +} + +export default connectPlayer( + (state: any) => ({ + autoplay: state.autoplay, + }), + { + toggleAutoplay: PlayerControls.toggleAutoplay, + } +)(AutoplayToggle); diff --git a/frontend/app/components/shared/AutoplayToggle/index.ts b/frontend/app/components/shared/AutoplayToggle/index.ts new file mode 100644 index 000000000..a170180b0 --- /dev/null +++ b/frontend/app/components/shared/AutoplayToggle/index.ts @@ -0,0 +1 @@ +export { default } from './AutoplayToggle'; diff --git a/frontend/app/components/shared/SharePopup/SharePopup.js b/frontend/app/components/shared/SharePopup/SharePopup.js index 9fef76843..4c75df64b 100644 --- a/frontend/app/components/shared/SharePopup/SharePopup.js +++ b/frontend/app/components/shared/SharePopup/SharePopup.js @@ -128,7 +128,7 @@ export default class SharePopup extends React.PureComponent {
)} > -
{trigger}
+ {trigger} ); } From f31ee245e2da9dd1f64584bf4fefe51b57c67345 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 16:22:50 +0100 Subject: [PATCH 06/18] change(ui) - text color and icon --- .../Session_/Player/Overlay/AutoplayTimer.tsx | 7 ++- .../Session_/components/HeaderMenu.tsx | 50 +++++++------------ frontend/app/svg/icons/quotes.svg | 2 +- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index 83d993e6b..045b7492b 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import cn from 'classnames'; import { connect } from 'react-redux'; import { withRouter, RouteComponentProps } from 'react-router-dom'; -import { Button, Link } from 'UI'; +import { Button, Link, Icon } from 'UI'; import { session as sessionRoute, withSiteId } from 'App/routes'; import stl from './AutoplayTimer.module.css'; import clsOv from './overlay.module.css'; @@ -51,7 +51,10 @@ function AutoplayTimer({ nextId, siteId, history }: IProps) { -
Turn on/off auto-replay in: More options
+
+ + Turn on/off auto-replay in: More options +
); diff --git a/frontend/app/components/Session_/components/HeaderMenu.tsx b/frontend/app/components/Session_/components/HeaderMenu.tsx index 08c875f96..003ca5ab3 100644 --- a/frontend/app/components/Session_/components/HeaderMenu.tsx +++ b/frontend/app/components/Session_/components/HeaderMenu.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Icon } from 'UI'; +import { Icon, Button } from 'UI'; import styles from './menu.module.css'; import cn from 'classnames'; import OutsideClickDetectingDiv from 'Shared/OutsideClickDetectingDiv'; @@ -32,8 +32,8 @@ export default class ItemMenu extends React.PureComponent { }; closeMenu = () => { - this.setState({ displayed: false }) - } + this.setState({ displayed: false }); + }; render() { const { items } = this.props; @@ -42,36 +42,22 @@ export default class ItemMenu extends React.PureComponent { return (
-
-
- + +
+ {items.map((item) => + item.component ? ( +
+ {item.component} +
+ ) : null + )}
- More -
-
- {items.map((item) => - item.component ? ( -
- {item.component} -
- ) : null - )} -
); diff --git a/frontend/app/svg/icons/quotes.svg b/frontend/app/svg/icons/quotes.svg index 252b3b50f..5989049be 100644 --- a/frontend/app/svg/icons/quotes.svg +++ b/frontend/app/svg/icons/quotes.svg @@ -1,3 +1,3 @@ - + From aa52f3c6fbc5d50622f6d015f4a6a8e7ac9ddabd Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 16:23:07 +0100 Subject: [PATCH 07/18] fix(ui) - dev tools sync check --- .../Session_/Player/Overlay/AutoplayTimer.tsx | 3 +-- .../shared/DevTools/ConsolePanel/ConsolePanel.tsx | 8 +++----- .../shared/DevTools/NetworkPanel/NetworkPanel.tsx | 13 ++++++------- .../DevTools/StackEventPanel/StackEventPanel.tsx | 10 ++++------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index 045b7492b..fc292e737 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -52,8 +52,7 @@ function AutoplayTimer({ nextId, siteId, history }: IProps) {
- - Turn on/off auto-replay in: More options + Turn on/off auto-replay in More options
diff --git a/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx b/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx index 38714b92d..c9f040c50 100644 --- a/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx +++ b/frontend/app/components/shared/DevTools/ConsolePanel/ConsolePanel.tsx @@ -72,14 +72,13 @@ function ConsolePanel(props: Props) { const { sessionStore: { devTools }, } = useStore(); - const [isDetailsModalActive, setIsDetailsModalActive] = useState(false); const [filteredList, setFilteredList] = useState([]); const filter = useObserver(() => devTools[INDEX_KEY].filter); const activeTab = useObserver(() => devTools[INDEX_KEY].activeTab); const activeIndex = useObserver(() => devTools[INDEX_KEY].index); const [pauseSync, setPauseSync] = useState(activeIndex > 0); const synRef: any = useRef({}); - const { showModal } = useModal(); + const { showModal, component: modalActive } = useModal(); const onTabClick = (activeTab: any) => devTools.update(INDEX_KEY, { activeTab }); const onFilterChange = ({ target: { value } }: any) => { @@ -92,7 +91,7 @@ function ConsolePanel(props: Props) { }; const removePause = () => { - setIsDetailsModalActive(false); + if (!!modalActive) return; clearTimeout(timeOut); timeOut = setTimeout(() => { devTools.update(INDEX_KEY, { index: getCurrentIndex() }); @@ -101,7 +100,6 @@ function ConsolePanel(props: Props) { }; const onMouseLeave = () => { - if (isDetailsModalActive) return; removePause(); }; @@ -136,7 +134,7 @@ function ConsolePanel(props: Props) { const _list = React.useRef(); const showDetails = (log: any) => { - setIsDetailsModalActive(true); + clearTimeout(timeOut); showModal(, { right: true, onClose: removePause }); devTools.update(INDEX_KEY, { index: filteredList.indexOf(log) }); setPauseSync(true); diff --git a/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx b/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx index 634aa9bae..416dd24eb 100644 --- a/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx +++ b/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx @@ -140,11 +140,9 @@ interface Props { } function NetworkPanel(props: Props) { const { resources, time, domContentLoadedTime, loadTime, domBuildingTime, fetchList } = props; - const { showModal } = useModal(); - + const { showModal, component: modalActive } = useModal(); const [filteredList, setFilteredList] = useState([]); const [showOnlyErrors, setShowOnlyErrors] = useState(false); - const [isDetailsModalActive, setIsDetailsModalActive] = useState(false); const additionalHeight = 0; const fetchPresented = fetchList.length > 0; const { @@ -169,7 +167,7 @@ function NetworkPanel(props: Props) { }; const removePause = () => { - setIsDetailsModalActive(false); + if (!!modalActive) return; clearTimeout(timeOut); timeOut = setTimeout(() => { devTools.update(INDEX_KEY, { index: getCurrentIndex() }); @@ -178,7 +176,7 @@ function NetworkPanel(props: Props) { }; const onMouseLeave = () => { - if (isDetailsModalActive) return; + if (!!modalActive) return; removePause(); }; @@ -261,7 +259,8 @@ function NetworkPanel(props: Props) { }, []); const showDetailsModal = (row: any) => { - setIsDetailsModalActive(true); + clearTimeout(timeOut); + setPauseSync(true); showModal( , { @@ -270,7 +269,6 @@ function NetworkPanel(props: Props) { } ); devTools.update(INDEX_KEY, { index: filteredList.indexOf(row) }); - setPauseSync(true); }; useEffect(() => { @@ -296,6 +294,7 @@ function NetworkPanel(props: Props) { border={false} /> + {pauseSync &&
pause
} devTools[INDEX_KEY].filter); const activeTab = useObserver(() => devTools[INDEX_KEY].activeTab); @@ -55,8 +54,8 @@ function StackEventPanel(props: Props) { }; const removePause = () => { + if (!!modalActive) return; clearTimeout(timeOut); - setIsDetailsModalActive(false); timeOut = setTimeout(() => { devTools.update(INDEX_KEY, { index: getCurrentIndex() }); setPauseSync(false); @@ -71,7 +70,6 @@ function StackEventPanel(props: Props) { }, [time]); const onMouseLeave = () => { - if (isDetailsModalActive) return; removePause(); }; @@ -97,7 +95,7 @@ function StackEventPanel(props: Props) { }); const showDetails = (item: any) => { - setIsDetailsModalActive(true); + clearTimeout(timeOut); showModal(, { right: true, onClose: removePause }); devTools.update(INDEX_KEY, { index: filteredList.indexOf(item) }); setPauseSync(true); From 7844d4388af51c8b3cf7e3a83b050a143899f9c7 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 16:34:05 +0100 Subject: [PATCH 08/18] fix(ui) - dev tools sync check --- .../app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx b/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx index 416dd24eb..4a7e71ea2 100644 --- a/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx +++ b/frontend/app/components/shared/DevTools/NetworkPanel/NetworkPanel.tsx @@ -294,7 +294,6 @@ function NetworkPanel(props: Props) { border={false} /> - {pauseSync &&
pause
} Date: Mon, 28 Nov 2022 16:36:00 +0100 Subject: [PATCH 09/18] fix(ui) - audit sort value --- frontend/app/components/Client/Audit/AuditView/AuditView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Client/Audit/AuditView/AuditView.tsx b/frontend/app/components/Client/Audit/AuditView/AuditView.tsx index b93c26d08..df30e64ff 100644 --- a/frontend/app/components/Client/Audit/AuditView/AuditView.tsx +++ b/frontend/app/components/Client/Audit/AuditView/AuditView.tsx @@ -46,7 +46,7 @@ function AuditView(props) { ]} defaultValue={order} plain - onChange={({ value }) => auditStore.updateKey('order', value)} + onChange={({ value }) => auditStore.updateKey('order', value.value)} /> auditStore.updateKey('searchQuery', value) }/> From 0b9d5fd303492a694a2c443d04352824b0a34ee4 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 16:43:58 +0100 Subject: [PATCH 10/18] fix(ui) - note overflow auto --- .../components/Session_/Player/Controls/components/ReadNote.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx b/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx index edc58aa9f..7a9f54bcf 100644 --- a/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx @@ -67,7 +67,7 @@ function ReadNote(props: Props) { -
+
{props.note.message}
From 74ee93f357064ac45ccaeb3db01c99750aaf3478 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 17:21:11 +0100 Subject: [PATCH 11/18] fix(ui) - autoplay modal --- .../app/components/Session_/Player/Overlay/AutoplayTimer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index fc292e737..955e01441 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -52,7 +52,7 @@ function AutoplayTimer({ nextId, siteId, history }: IProps) {
- Turn on/off auto-replay in More options + Turn on/off auto-replay in More options
From e61a9f87d7933ae727e204e2a3947b746a89fa34 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 28 Nov 2022 17:22:13 +0100 Subject: [PATCH 12/18] fix(ui) - autoplay modal --- .../app/components/Session_/Player/Overlay/AutoplayTimer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx index 955e01441..d79a64b5c 100644 --- a/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx +++ b/frontend/app/components/Session_/Player/Overlay/AutoplayTimer.tsx @@ -51,7 +51,7 @@ function AutoplayTimer({ nextId, siteId, history }: IProps) { -
+
Turn on/off auto-replay in More options
From bdd54a185c24e97429bbe687b8f1b5500b293467 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 29 Nov 2022 09:55:01 +0100 Subject: [PATCH 13/18] feat(chalice): fixed jira-integration issue-types list --- api/chalicelib/utils/jira_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/chalicelib/utils/jira_client.py b/api/chalicelib/utils/jira_client.py index a820d4aa9..ee8196a46 100644 --- a/api/chalicelib/utils/jira_client.py +++ b/api/chalicelib/utils/jira_client.py @@ -242,7 +242,7 @@ class JiraManager: def get_issue_types(self): try: - types = self._jira.issue_types() + types = self._jira.project(self._config['JIRA_PROJECT_ID']).issueTypes except JIRAError as e: self.retries -= 1 if (e.status_code // 100) == 4 and self.retries > 0: From f95fff2112068e1af67f1c072fdb06f5b54a5523 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 29 Nov 2022 10:42:10 +0100 Subject: [PATCH 14/18] fix(ui) - github/jira issue form data fetch --- frontend/app/components/Session_/Issues/IssueForm.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/Session_/Issues/IssueForm.js b/frontend/app/components/Session_/Issues/IssueForm.js index 4b6585985..43a7f382a 100644 --- a/frontend/app/components/Session_/Issues/IssueForm.js +++ b/frontend/app/components/Session_/Issues/IssueForm.js @@ -18,7 +18,6 @@ const SelectedValue = ({ icon, text }) => { class IssueForm extends React.PureComponent { componentDidMount() { const { projects, issueTypes } = this.props; - this.props.init({ projectId: projects[0] ? projects[0].id : '', issueType: issueTypes[0] ? issueTypes[0].id : '', @@ -27,8 +26,8 @@ class IssueForm extends React.PureComponent { componentWillReceiveProps(newProps) { const { instance } = this.props; - if (instance.projectId && newProps.instance.projectId != instance.projectId) { - this.props.fetchMeta(instance.projectId).then(() => { + if (newProps.instance.projectId && newProps.instance.projectId != instance.projectId) { + this.props.fetchMeta(newProps.instance.projectId).then(() => { this.props.edit({ issueType: '', assignee: '', projectId: newProps.instance.projectId }); }); } @@ -87,7 +86,7 @@ class IssueForm extends React.PureComponent {