Docker file for installing oracle-xe
Camel component for Activiti process engine. NOTE: no more maintained, see activiti-camel module in activiti instead
Sample project showing how to embed Activiti REST API in own webapp
mproch/activitiCamelKarafSample 3
Sample project deploying Activiti process with Camel integration in Karaf
Apache ODE
Materiały do warsztatów o Akka na Warsjawa
tweet data from http://devmeetings.pl put into neo4j - just to play with it a bit ;)
Apache Camel component for Apache HISE (http://incubator.apache.org/hise/)
Implementation of websocket in Apache Camel
push eventTouK/nussknacker
commit sha bd48ae98b9e7eb688ffdd96b9981a660e750627e
[Refactor] process test doesn't depend on kafka (#1752) * [Refactor] process test don't depend on kafka * Move signals test
commit sha ab23f641ac8319b0f242ebe163a656eff3146ccd
Update MigrationGuide.md (#1764)
commit sha 071327027dfed3b2d2a5ec5fc471a1c856a8cb8e
set max_old_space_size to 4k (#1763)
commit sha 9f25e3acc5b2fad6f3e6c0f8c612986c4c579289
Refactor to use Using.resource (#1762)
commit sha b372f74e8d38373e6e72b18abb240c53236e2274
jobmanager and taskmanager should share volume where statedata are stored. (#1740)
commit sha de10d92f1f511e0355dc04cb7bab057b73c2894e
Improvements: Typer better way to extract method reference (#1765)
commit sha a5664306ed3bcd48336790ad826ad29b27eeffd2
Revert "Improvements: Typer better way to extract method reference (#1765)" (#1771) This reverts commit de10d92f1f511e0355dc04cb7bab057b73c2894e.
commit sha 2bd3c6167b0259a732a6322827e3be15d3011739
Do not log model config in PeriodicProcessService (#1770)
commit sha 855e400849df12bdaaaac0366bea179ddf83b789
Fix weird scala 2.11 tests failures (#1773)
commit sha 0a3b8947fe05f4dd21c3f82fcf533962feffd42a
Fix: Load configs app (#1776) Co-authored-by: Łukasz Ciołecki <[email protected]>
commit sha 4db6f0236a1378181283510dc341b9b0f27bfc43
Fix variable suggestions for KafkaSourceFactory with explicit key-val… (#1769) * Fix variable suggestions for KafkaSourceFactory with explicit key-value types. * Move explicit type extraction to TypesInformation.extract * Move trait to api.
commit sha 2c3cf46c6e369552ea9123cf01fb45beb6004780
Move test helpers to mixin. (#1777)
commit sha 8ca43da00bc86e7d9988ed1ac017602df9edbe0e
Fix: Filtering components (#1779)
commit sha 5d6cfad9cde9765ce73fce35772e9994d99cbdc3
Fix for Spel validation: Use not existing method reference (#1772) * Improvements: Typer better way to extract method reference * Add test * Catching spel compilation error Co-authored-by: Łukasz Ciołecki <[email protected]>
commit sha 9894fd69d5e53d9eceabf92e3044026883fe68f2
[FIX] detecting erroneous projection/selection (#1785)
commit sha f700068d136ca536e4f755e386d5aae6db790c65
Correct order of fallbacks and overrides (#1786)
commit sha 19c9fadc5f5aef3ef26f4843052ba5eed58d9183
[Temporary] Turn e2e tests off (#1787)
commit sha 4a194eb7a544885f16dfd4bd8079e0133971fbdb
Revert "[Temporary] Turn e2e tests off (#1787)" (#1789) This reverts commit 19c9fadc5f5aef3ef26f4843052ba5eed58d9183.
commit sha 16ed9d9e1e6582c9c02fd742c525d37c8f712255
Introduce release branch (#1739)
commit sha 9ffe9e9780d3cad77dc21ca0212d70a2abf19462
Merge pull request #1791 from dswiecki/introduce-release-branch Introduce release branch (#1739)
push time in 11 hours
push eventTouK/nussknacker
commit sha a3c9855a0f2685f3fc080325b2d58dbfe544d611
fix: selection actions refactor: extract selection actions & keyboard shortcuts feat: select all feat: enable paste button only on valid clipboard contents fix: translations
commit sha 66acc876e4233310885d0723b9200e088b67023b
PeriodicProcessEvent: move deployment to sealed trait & make listeners closable (#1790) * PeriodicProcessEvent: move deployment to sealed trait * make PeriodicProcessListers closable
commit sha dee301a372de1c41166f91e78b6293ac18b497d9
Kafka topic parameter name configurable
commit sha cbb1e9d798d14463140a705f29a546da6013bf06
Kafka topic parameter name configurable - fixes after review
commit sha 0adc8c9ab5c1aee14d1fcfdecefc381f5779fcfa
Merge pull request #1794 from TouK/preview/kafka-topic-param-configurable Kafka topic parameter name configurable
commit sha 777e0dbe55cf8a8ff0dffef4be9efe7f8a667cb3
Test E2E only after building docker image (#1793) * Test E2E only after building docker image * skip feature flagged test... * Cleanup
commit sha 8681e2d5ee01a6f1b005cc16d2702c89f35f1e8f
Bump jest-mock from 27.0.1 to 27.0.3 in /ui/client (#1710)
commit sha 934a217d756167005e6330e1b457937d9a718738
Bump jest from 27.0.1 to 27.0.4 in /ui/client (#1734)
commit sha 5f99d178c0bdd20c58bede3c54f0a7b6ee140319
style: rearrange & lint
commit sha d885d63c73befd024b842c3541d77401eed02429
refactor: code cleanup
commit sha 6f48704856fd3425b72760d3929c40f409fcc8e8
Add kafka-registry-typed-json|-raw to generic model
commit sha 81970bcad8c2e74afe798e86f4e3251e4a29321d
GenericItSpec refactor sending to kafka
commit sha 831cdb1afab379819ff9aac4714342c6d29a62bd
review changes
commit sha b5004f1d04fba3e7b0eb80509cf2004943df6e84
[Feature] Errors can be logged to Kafka (#1741) * [Feature] KafkaExceptionConsumer can be used to log erros to Kafka * Test * Tests, docs * Docs * review
commit sha 81d04c6b796b533db152a9c8cf859e1622d46f52
Merge pull request #1803 from dswiecki/generic-model-with-json-schema Generic model with json schema
commit sha 7c2210d79c13dcd514cd5937ac9b266082a43b6e
Fix java 8 compatibility issue - using release flag instead of source/target
commit sha d9b25b194035b6e2e5cbadb852e9f258ed32ef55
Fix for: SpecificRecordKafkaAvroSourceFactory produced GenericRecord instead of Specific (getters and other additional methods were missing)
commit sha c31a1de5547b30a36425b76237ed53776fcbd3ee
Merge pull request #1804 from TouK/preview/avro-specific-type-fix Fix for: SpecificRecordKafkaAvroSourceFactory produced GenericRecord …
commit sha dfed2a224029773256648b177f5b38638439cc6d
Merge pull request #1797 from JulianWielga/selection-actions fix: copy plain text
commit sha ac403eee9b0092f2d81fbfe9a3f0ac1c2a0e05ad
Bump i18next from 20.3.0 to 20.3.2 in /ui/client Bumps [i18next](https://github.com/i18next/i18next) from 20.3.0 to 20.3.2. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v20.3.0...v20.3.2) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
push time in 11 hours
push eventTouK/nussknacker
commit sha bd48ae98b9e7eb688ffdd96b9981a660e750627e
[Refactor] process test doesn't depend on kafka (#1752) * [Refactor] process test don't depend on kafka * Move signals test
commit sha ab23f641ac8319b0f242ebe163a656eff3146ccd
Update MigrationGuide.md (#1764)
commit sha 071327027dfed3b2d2a5ec5fc471a1c856a8cb8e
set max_old_space_size to 4k (#1763)
commit sha 9f25e3acc5b2fad6f3e6c0f8c612986c4c579289
Refactor to use Using.resource (#1762)
commit sha b372f74e8d38373e6e72b18abb240c53236e2274
jobmanager and taskmanager should share volume where statedata are stored. (#1740)
commit sha de10d92f1f511e0355dc04cb7bab057b73c2894e
Improvements: Typer better way to extract method reference (#1765)
commit sha a5664306ed3bcd48336790ad826ad29b27eeffd2
Revert "Improvements: Typer better way to extract method reference (#1765)" (#1771) This reverts commit de10d92f1f511e0355dc04cb7bab057b73c2894e.
commit sha 2bd3c6167b0259a732a6322827e3be15d3011739
Do not log model config in PeriodicProcessService (#1770)
commit sha 855e400849df12bdaaaac0366bea179ddf83b789
Fix weird scala 2.11 tests failures (#1773)
commit sha 0a3b8947fe05f4dd21c3f82fcf533962feffd42a
Fix: Load configs app (#1776) Co-authored-by: Łukasz Ciołecki <[email protected]>
commit sha 4db6f0236a1378181283510dc341b9b0f27bfc43
Fix variable suggestions for KafkaSourceFactory with explicit key-val… (#1769) * Fix variable suggestions for KafkaSourceFactory with explicit key-value types. * Move explicit type extraction to TypesInformation.extract * Move trait to api.
commit sha 2c3cf46c6e369552ea9123cf01fb45beb6004780
Move test helpers to mixin. (#1777)
commit sha 8ca43da00bc86e7d9988ed1ac017602df9edbe0e
Fix: Filtering components (#1779)
commit sha 5d6cfad9cde9765ce73fce35772e9994d99cbdc3
Fix for Spel validation: Use not existing method reference (#1772) * Improvements: Typer better way to extract method reference * Add test * Catching spel compilation error Co-authored-by: Łukasz Ciołecki <[email protected]>
commit sha 9894fd69d5e53d9eceabf92e3044026883fe68f2
[FIX] detecting erroneous projection/selection (#1785)
commit sha f700068d136ca536e4f755e386d5aae6db790c65
Correct order of fallbacks and overrides (#1786)
commit sha 19c9fadc5f5aef3ef26f4843052ba5eed58d9183
[Temporary] Turn e2e tests off (#1787)
commit sha 4a194eb7a544885f16dfd4bd8079e0133971fbdb
Revert "[Temporary] Turn e2e tests off (#1787)" (#1789) This reverts commit 19c9fadc5f5aef3ef26f4843052ba5eed58d9183.
commit sha 16ed9d9e1e6582c9c02fd742c525d37c8f712255
Introduce release branch (#1739)
commit sha 9ffe9e9780d3cad77dc21ca0212d70a2abf19462
Merge pull request #1791 from dswiecki/introduce-release-branch Introduce release branch (#1739)
push time in 11 hours
PR opened TouK/nussknacker
Bumps @types/kefir from 3.8.5 to 3.8.6. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/kefir">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
pr created time in 11 hours
create barnchTouK/nussknacker
branch : dependabot/npm_and_yarn/ui/client/types/kefir-3.8.6
created branch time in 11 hours
delete branch TouK/nussknacker
delete branch : dependabot/npm_and_yarn/ui/client/react-i18next-11.11.0
delete time in 11 hours
PR closed TouK/nussknacker
Bumps react-i18next from 11.9.0 to 11.11.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md">react-i18next's changelog</a>.</em></p> <blockquote> <h3>11.11.0</h3> <ul> <li>introduce <code>CustomTypeOptions</code> type definition and deprecate the <code>Resources</code> type definition <a href="https://github-redirect.dependabot.com/i18next/react-i18next/pull/1328">1328</a></li> </ul> <h3>11.10.0</h3> <ul> <li>add transWrapTextNodes option <a href="https://github-redirect.dependabot.com/i18next/react-i18next/pull/1324">1324</a> to prevent a well-known Google Translate issue with React apps <a href="https://github-redirect.dependabot.com/i18next/react-i18next/issues/1323">1323</a>, thanks to <a href="https://github.com/feross">feross</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/react-i18next/commit/4ae8a846a23673ea8916ba7ccc92992b3e103603"><code>4ae8a84</code></a> 11.11.0</li> <li><a href="https://github.com/i18next/react-i18next/commit/7e94eca31291f8a1889c6bc68c9da2ebb79e06d6"><code>7e94eca</code></a> build</li> <li><a href="https://github.com/i18next/react-i18next/commit/28238a680f2d99b975ba42888077a9758387aa48"><code>28238a6</code></a> changelog</li> <li><a href="https://github.com/i18next/react-i18next/commit/968b20a4edc6f6ab89df38ea9eebca3a518b04c7"><code>968b20a</code></a> update some deps</li> <li><a href="https://github.com/i18next/react-i18next/commit/626cd8aa4b0e1a8c447683b53c77cda2aa6e87c5"><code>626cd8a</code></a> Allow for Custom DefaultNS typing (<a href="https://github-redirect.dependabot.com/i18next/react-i18next/issues/1328">#1328</a>)</li> <li><a href="https://github.com/i18next/react-i18next/commit/dcfd70b282c0b33cdcc5bfa5b7d47ea69cadfae7"><code>dcfd70b</code></a> update deps</li> <li><a href="https://github.com/i18next/react-i18next/commit/85889f21141950bf9c52e57326fac12231380f86"><code>85889f2</code></a> update storybook deps</li> <li><a href="https://github.com/i18next/react-i18next/commit/c2c2e1349a50b16f7b168ac41465148b59101c6d"><code>c2c2e13</code></a> 11.10.0</li> <li><a href="https://github.com/i18next/react-i18next/commit/2071aa49f3db8ea90df3d7afd6ed927045fefb66"><code>2071aa4</code></a> build</li> <li><a href="https://github.com/i18next/react-i18next/commit/e2d44ea0762614a5e6256272f7e40d7d4c8956d5"><code>e2d44ea</code></a> prepare release</li> <li>Additional commits viewable in <a href="https://github.com/i18next/react-i18next/compare/v11.9.0...v11.11.0">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
pr closed time in 11 hours
pull request commentTouK/nussknacker
Bump react-i18next from 11.9.0 to 11.11.0 in /ui/client
Looks like react-i18next is up-to-date now, so this is no longer needed.
comment created time in 11 hours
push eventTouK/nussknacker
commit sha a3c9855a0f2685f3fc080325b2d58dbfe544d611
fix: selection actions refactor: extract selection actions & keyboard shortcuts feat: select all feat: enable paste button only on valid clipboard contents fix: translations
commit sha 5f99d178c0bdd20c58bede3c54f0a7b6ee140319
style: rearrange & lint
commit sha d885d63c73befd024b842c3541d77401eed02429
refactor: code cleanup
commit sha 831cdb1afab379819ff9aac4714342c6d29a62bd
review changes
commit sha dfed2a224029773256648b177f5b38638439cc6d
Merge pull request #1797 from JulianWielga/selection-actions fix: copy plain text
push time in 12 hours
PR merged TouK/nussknacker
fix: selection actions refactor: extract selection actions & keyboard shortcuts feat: select all feat: enable paste button only on valid clipboard contents fix: translations
pr closed time in 12 hours
push eventTouK/nussknacker
commit sha d9b25b194035b6e2e5cbadb852e9f258ed32ef55
Fix for: SpecificRecordKafkaAvroSourceFactory produced GenericRecord instead of Specific (getters and other additional methods were missing)
commit sha c31a1de5547b30a36425b76237ed53776fcbd3ee
Merge pull request #1804 from TouK/preview/avro-specific-type-fix Fix for: SpecificRecordKafkaAvroSourceFactory produced GenericRecord …
push time in 12 hours
PR merged TouK/nussknacker
…instead of Specific (getters and other additional methods were missing)
pr closed time in 12 hours
PR opened TouK/nussknacker
…instead of Specific (getters and other additional methods were missing)
pr created time in 13 hours
create barnchTouK/nussknacker
branch : preview/avro-specific-type-fix
created branch time in 13 hours
startedververica/flink-cdc-connectors
started time in 13 hours
push eventTouK/nussknacker
commit sha 7c2210d79c13dcd514cd5937ac9b266082a43b6e
Fix java 8 compatibility issue - using release flag instead of source/target
push time in 13 hours
push eventTouK/nussknacker
commit sha 6f48704856fd3425b72760d3929c40f409fcc8e8
Add kafka-registry-typed-json|-raw to generic model
commit sha 81970bcad8c2e74afe798e86f4e3251e4a29321d
GenericItSpec refactor sending to kafka
commit sha 81d04c6b796b533db152a9c8cf859e1622d46f52
Merge pull request #1803 from dswiecki/generic-model-with-json-schema Generic model with json schema
push time in 14 hours
Pull request review commentTouK/nussknacker
WIP: Refactoring of AvroToJsonFormatter - part 2
+package pl.touk.nussknacker.engine.kafka.consumerrecord++import java.nio.charset.StandardCharsets+import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}+import io.circe.{Decoder, Encoder}+import org.apache.flink.streaming.connectors.kafka.KafkaDeserializationSchema+import org.apache.kafka.clients.consumer.ConsumerRecord+import pl.touk.nussknacker.engine.api.CirceUtil+import pl.touk.nussknacker.engine.api.test.{TestDataSplit, TestParsingUtils}+import pl.touk.nussknacker.engine.kafka.{KafkaConfig, RecordFormatter, RecordFormatterFactory}++import scala.reflect.ClassTag++/**+ * RecordFormatter used to encode and decode whole raw kafka event (ConsumerRecord) in json format.+ *+ * @param deserializationSchema - schema used to convert raw kafka event to serializable representation (see SerializableConsumerRecord)+ * @param serializeKeyValue - converts key and value from K-V domain to Array[Byte]+ * @tparam K - event key type+ * @tparam V - event value type+ */+class ConsumerRecordToJsonFormatterFactory[K:Encoder:Decoder, V:Encoder:Decoder] extends RecordFormatterFactory {++ override def create[KK: ClassTag, VV: ClassTag](kafkaConfig: KafkaConfig, kafkaSourceDeserializationSchema: KafkaDeserializationSchema[ConsumerRecord[KK, VV]]): RecordFormatter = {+ new RecordFormatter {
Can you extract it to separate class? Let it be in the same file. Currently it is hard to override this class. I know that "prefer composition over inheritance" rule but sometimes... ;)
comment created time in 14 hours
Pull request review commentTouK/nussknacker
WIP: Refactoring of AvroToJsonFormatter - part 2
+package pl.touk.nussknacker.engine.avro.schemaregistry.confluent.formatter++import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}+import io.circe.{Decoder, Encoder, Json}+import org.apache.flink.streaming.connectors.kafka.KafkaDeserializationSchema+import org.apache.kafka.clients.consumer.ConsumerRecord+import pl.touk.nussknacker.engine.api.CirceUtil+import pl.touk.nussknacker.engine.api.test.{TestDataSplit, TestParsingUtils}+import pl.touk.nussknacker.engine.avro.schemaregistry.confluent.ConfluentUtils+import pl.touk.nussknacker.engine.avro.schemaregistry.confluent.client.ConfluentSchemaRegistryClientFactory+import pl.touk.nussknacker.engine.kafka.consumerrecord.SerializableConsumerRecord+import pl.touk.nussknacker.engine.kafka.{KafkaConfig, RecordFormatter, RecordFormatterFactory}++import java.nio.charset.StandardCharsets+import scala.reflect.ClassTag++class ConfluentAvroToJsonFormatterFactory(schemaRegistryClientFactory: ConfluentSchemaRegistryClientFactory) extends RecordFormatterFactory {++ override def create[K: ClassTag, V: ClassTag](kafkaConfig: KafkaConfig, kafkaSourceDeserializationSchema: KafkaDeserializationSchema[ConsumerRecord[K, V]]): RecordFormatter = {++ val schemaRegistryClient = schemaRegistryClientFactory.create(kafkaConfig)+ val messageFormatter = new ConfluentAvroMessageFormatter(schemaRegistryClient.client)+ val createReader = (topic: String) => new ConfluentAvroMessageReader(schemaRegistryClient.client, topic)++ new RecordFormatter {++ override protected def formatRecord(record: ConsumerRecord[Array[Byte], Array[Byte]]): Array[Byte] =+ doFormatRecord[K, V](kafkaConfig, kafkaSourceDeserializationSchema, messageFormatter)(record)++ override protected def parseRecord(topic: String, bytes: Array[Byte]): ConsumerRecord[Array[Byte], Array[Byte]] =+ doParseRecord[K, V](kafkaConfig, createReader)(topic, bytes)++ override protected def testDataSplit: TestDataSplit = TestParsingUtils.newLineSplit+ }+ }++ /**+ * Step 1: Deserialize raw kafka event to GenericRecord/SpecificRecord domain.+ * Step 2: Create Encoders that use ConfluentAvroMessageFormatter to convert avro object to json+ * Step 3: Encode event's data with schema id's with derived encoder.+ * @tparam K - key type passed from KafkaAvroSourceFactory, used to determine which datumReaderWriter use (e.g. specific or generic)+ * @tparam V - value type passed from KafkaAvroSourceFactory, used to determine which datumReaderWriter use (e.g. specific or generic)+ */+ protected def doFormatRecord[K: ClassTag, V: ClassTag](kafkaConfig: KafkaConfig,+ kafkaSourceDeserializationSchema: KafkaDeserializationSchema[ConsumerRecord[K, V]],+ messageFormatter: ConfluentAvroMessageFormatter)+ (record: ConsumerRecord[Array[Byte], Array[Byte]]): Array[Byte] = {+ val deserializedRecord = kafkaSourceDeserializationSchema.deserialize(record)+ val serializableRecord = AvroSerializableConsumerRecord(+ messageFormatter.getSchemaIdOpt(record.key()),+ messageFormatter.getSchemaIdOpt(record.value()).get,+ SerializableConsumerRecord(deserializedRecord)+ )++ implicit val keyEncoder: Encoder[K] = createKeyEncoder(serializableRecord.consumerRecord.key.get, kafkaConfig.useStringForKey, messageFormatter) // TODO: key.get???+ implicit val valueEncoder: Encoder[V] = createValueEncoder(serializableRecord.consumerRecord.value, messageFormatter)+ implicit val serializableRecordEncoder: Encoder[SerializableConsumerRecord[K, V]] = deriveEncoder+ val consumerRecordEncoder: Encoder[AvroSerializableConsumerRecord[K, V]] = deriveEncoder++ consumerRecordEncoder(serializableRecord).noSpaces.getBytes(StandardCharsets.UTF_8)+ }++ /**+ * Step 1: Deserialize raw json bytes to AvroSerializableConsumerRecord[Json, Json] domain without interpreting key and value content.+ * Step 2: Create key and value json-to-avro interpreter based on schema id's provided in json.+ * Step 3: Use interpreter to create raw kafka ConsumerRecord+ * @tparam K - key type passed from KafkaAvroSourceFactory, used to determine which datumReaderWriter use (e.g. specific or generic)+ * @tparam V - value type passed from KafkaAvroSourceFactory, used to determine which datumReaderWriter use (e.g. specific or generic)+ */+ protected def doParseRecord[K: ClassTag, V: ClassTag](kafkaConfig: KafkaConfig,+ createReader: String => ConfluentAvroMessageReader)+ (topic: String, bytes: Array[Byte]): ConsumerRecord[Array[Byte], Array[Byte]] = {+ implicit val serializableRecordDecoder: Decoder[SerializableConsumerRecord[Json, Json]] = deriveDecoder+ val consumerRecordDecoder: Decoder[AvroSerializableConsumerRecord[Json, Json]] = deriveDecoder+ val record = CirceUtil.decodeJsonUnsafe(bytes)(consumerRecordDecoder)++ def serializeKeyValue(keyOpt: Option[Json], value: Json): (Array[Byte], Array[Byte]) = {+ val reader = createReader(topic)+ val keyBytes = if (kafkaConfig.useStringForKey) {
I don't exactly understand why this code has such many cases. when useStringForKey is true, shouldn't you expect that keyOpt is always Some(j) if j.isString?
comment created time in 14 hours
Pull request review commentTouK/nussknacker
export function StrategyInitializer(props: PropsWithChildren<Props>): JSX.Elemen }, buttonLabel: t("auth.StrategyInitializer.errors.504.buttonLabel", "Go to authentication page"), description: t(- "auth.StrategyInitializer.errors.504.description",+ "auth.StrategyInitializer.errors.1024.description",
ACCESS_TOKEN_CODE is 1024 not 504 which is HTTP_TIMEOUT_CODE
there was two translation keys with different default value. this mistake appeared when changed extract method.
comment created time in 15 hours
Pull request review commentTouK/nussknacker
+import React, {createContext, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef, useState} from "react"+import {useTranslation} from "react-i18next"+import {useDispatch, useSelector} from "react-redux"+import {copySelection, cutSelection, deleteNodes, deleteSelection, nodesWithEdgesAdded, pasteSelection, selectAll} from "../../actions/nk"+import {error, success} from "../../actions/notificationActions"+import {redo, undo} from "../../actions/undoRedoActions"+import {events} from "../../analytics/TrackingEvents"+import * as ClipboardUtils from "../../common/ClipboardUtils"+import * as JsonUtils from "../../common/JsonUtils"+import {isInputEvent} from "../../containers/BindKeyboardShortcuts"+import {useDocumentListeners} from "../../containers/useDocumentListeners"+import {canModifySelectedNodes, getProcessCategory, getSelection, getSelectionState} from "../../reducers/selectors/graph"+import {getCapabilities} from "../../reducers/selectors/other"+import {getProcessDefinitionData} from "../../reducers/selectors/settings"+import NodeUtils from "./NodeUtils"++const hasTextSelection = () => !!window.getSelection().toString()++type UserAction = ((e: Event) => unknown) | null++interface UserActions {+ copy: UserAction,+ paste: UserAction,+ cut: UserAction,+ delete: UserAction,+ undo: UserAction,+ redo: UserAction,+ selectAll: UserAction,+}++function useClipboardParse() {+ const processCategory = useSelector(getProcessCategory)+ const processDefinitionData = useSelector(getProcessDefinitionData)+ return useCallback(+ text => {+ const selection = JsonUtils.tryParseOrNull(text)+ const isValid = selection?.edges &&+ selection?.nodes?.every(node => NodeUtils.isNode(node) &&+ NodeUtils.isPlainNode(node) &&+ NodeUtils.isAvailable(node, processDefinitionData, processCategory))+ return isValid ? selection : null+ },+ [processCategory, processDefinitionData],+ )+}++function useClipboardPermission(): boolean | string {+ const clipboardPermission = useRef<PermissionStatus>()+ const [state, setState] = useState<"denied" | "granted" | "prompt">()+ const [text, setText] = useState("")+ const [content, setContent] = useState("")++ const parse = useClipboardParse()++ if (state === "granted") {+ navigator.clipboard.readText().then(text => {+ setText(text)+ }).catch(() => {return})+ }++ useEffect(() => {+ setContent(parse(text))+ }, [text])++ useEffect(() => {+ navigator.permissions.query({name: "clipboard-read"}).then(permission => {+ clipboardPermission.current = permission+ setState(permission.state)+ permission.onchange = () => {+ setState(permission.state)+ }+ })+ return () => {+ if (clipboardPermission.current) {+ clipboardPermission.current.onchange = undefined+ }+ }+ }, [])++ return state === "prompt" || content+}++const SelectionContext = createContext<UserActions>(null)++export const useSelectionActions = (): UserActions => {+ const selectionActions = useContext(SelectionContext)+ if (!selectionActions) {+ throw new Error("used useSelectionActions outside provider")+ }+ return selectionActions+}++export default function SelectionContextProvider(props: PropsWithChildren<{ pastePosition: () => { x: number, y: number } }>): JSX.Element {+ const dispatch = useDispatch()+ const {t} = useTranslation()++ const selectionState = useSelector(getSelectionState)+ const capabilities = useSelector(getCapabilities)+ const selection = useSelector(getSelection)+ const canModifySelected = useSelector(canModifySelectedNodes)++ const [hasSelection, setHasSelection] = useState(hasTextSelection)++ const copy = useCallback(+ async (silent = false) => {+ if (silent && hasTextSelection()) {+ return+ }++ if (canModifySelected) {+ await ClipboardUtils.writeText(JSON.stringify(selection))+ const {nodes} = selection+ if (!silent) {+ dispatch(success(t("userActions.copy", {+ defaultValue: "Copied node",+ defaultValue_plural: "Copied {{count}} nodes",
what? please read about i18next.
comment created time in 15 hours
Pull request review commentTouK/nussknacker
+import React, {createContext, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef, useState} from "react"+import {useTranslation} from "react-i18next"+import {useDispatch, useSelector} from "react-redux"+import {copySelection, cutSelection, deleteNodes, deleteSelection, nodesWithEdgesAdded, pasteSelection, selectAll} from "../../actions/nk"+import {error, success} from "../../actions/notificationActions"+import {redo, undo} from "../../actions/undoRedoActions"+import {events} from "../../analytics/TrackingEvents"+import * as ClipboardUtils from "../../common/ClipboardUtils"+import * as JsonUtils from "../../common/JsonUtils"+import {isInputEvent} from "../../containers/BindKeyboardShortcuts"+import {useDocumentListeners} from "../../containers/useDocumentListeners"+import {canModifySelectedNodes, getProcessCategory, getSelection, getSelectionState} from "../../reducers/selectors/graph"+import {getCapabilities} from "../../reducers/selectors/other"+import {getProcessDefinitionData} from "../../reducers/selectors/settings"+import NodeUtils from "./NodeUtils"++const hasTextSelection = () => !!window.getSelection().toString()++type UserAction = ((e: Event) => unknown) | null++interface UserActions {+ copy: UserAction,+ paste: UserAction,+ cut: UserAction,+ delete: UserAction,+ undo: UserAction,+ redo: UserAction,+ selectAll: UserAction,+}++function useClipboardParse() {+ const processCategory = useSelector(getProcessCategory)+ const processDefinitionData = useSelector(getProcessDefinitionData)+ return useCallback(+ text => {+ const selection = JsonUtils.tryParseOrNull(text)+ const isValid = selection?.edges &&+ selection?.nodes?.every(node => NodeUtils.isNode(node) &&+ NodeUtils.isPlainNode(node) &&+ NodeUtils.isAvailable(node, processDefinitionData, processCategory))+ return isValid ? selection : null+ },+ [processCategory, processDefinitionData],+ )+}++function useClipboardPermission(): boolean | string {+ const clipboardPermission = useRef<PermissionStatus>()+ const [state, setState] = useState<"denied" | "granted" | "prompt">()
brings nothing except boilerplate
comment created time in 15 hours
Pull request review commentTouK/nussknacker
+import React, {createContext, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef, useState} from "react"+import {useTranslation} from "react-i18next"+import {useDispatch, useSelector} from "react-redux"+import {copySelection, cutSelection, deleteNodes, deleteSelection, nodesWithEdgesAdded, pasteSelection, selectAll} from "../../actions/nk"+import {error, success} from "../../actions/notificationActions"+import {redo, undo} from "../../actions/undoRedoActions"+import {events} from "../../analytics/TrackingEvents"+import * as ClipboardUtils from "../../common/ClipboardUtils"+import * as JsonUtils from "../../common/JsonUtils"+import {isInputEvent} from "../../containers/BindKeyboardShortcuts"+import {useDocumentListeners} from "../../containers/useDocumentListeners"+import {canModifySelectedNodes, getProcessCategory, getSelection, getSelectionState} from "../../reducers/selectors/graph"+import {getCapabilities} from "../../reducers/selectors/other"+import {getProcessDefinitionData} from "../../reducers/selectors/settings"+import NodeUtils from "./NodeUtils"++const hasTextSelection = () => !!window.getSelection().toString()++type UserAction = ((e: Event) => unknown) | null++interface UserActions {+ copy: UserAction,+ paste: UserAction,+ cut: UserAction,+ delete: UserAction,+ undo: UserAction,+ redo: UserAction,+ selectAll: UserAction,+}++function useClipboardParse() {+ const processCategory = useSelector(getProcessCategory)+ const processDefinitionData = useSelector(getProcessDefinitionData)+ return useCallback(+ text => {+ const selection = JsonUtils.tryParseOrNull(text)+ const isValid = selection?.edges &&+ selection?.nodes?.every(node => NodeUtils.isNode(node) &&+ NodeUtils.isPlainNode(node) &&+ NodeUtils.isAvailable(node, processDefinitionData, processCategory))+ return isValid ? selection : null+ },+ [processCategory, processDefinitionData],+ )+}++function useClipboardPermission(): boolean | string {+ const clipboardPermission = useRef<PermissionStatus>()+ const [state, setState] = useState<"denied" | "granted" | "prompt">()+ const [text, setText] = useState("")+ const [content, setContent] = useState("")++ const parse = useClipboardParse()++ if (state === "granted") {+ navigator.clipboard.readText().then(text => {+ setText(text)+ }).catch(() => {return})
just ignore possible error - it's expected sometimes
comment created time in 15 hours
Pull request review commentTouK/nussknacker
+import React, {createContext, PropsWithChildren, useCallback, useContext, useEffect, useMemo, useRef, useState} from "react"+import {useTranslation} from "react-i18next"+import {useDispatch, useSelector} from "react-redux"+import {copySelection, cutSelection, deleteNodes, deleteSelection, nodesWithEdgesAdded, pasteSelection, selectAll} from "../../actions/nk"+import {error, success} from "../../actions/notificationActions"+import {redo, undo} from "../../actions/undoRedoActions"+import {events} from "../../analytics/TrackingEvents"+import * as ClipboardUtils from "../../common/ClipboardUtils"+import * as JsonUtils from "../../common/JsonUtils"+import {isInputEvent} from "../../containers/BindKeyboardShortcuts"+import {useDocumentListeners} from "../../containers/useDocumentListeners"+import {canModifySelectedNodes, getProcessCategory, getSelection, getSelectionState} from "../../reducers/selectors/graph"+import {getCapabilities} from "../../reducers/selectors/other"+import {getProcessDefinitionData} from "../../reducers/selectors/settings"+import NodeUtils from "./NodeUtils"++const hasTextSelection = () => !!window.getSelection().toString()++type UserAction = ((e: Event) => unknown) | null++interface UserActions {+ copy: UserAction,+ paste: UserAction,+ cut: UserAction,+ delete: UserAction,+ undo: UserAction,+ redo: UserAction,+ selectAll: UserAction,+}++function useClipboardParse() {+ const processCategory = useSelector(getProcessCategory)+ const processDefinitionData = useSelector(getProcessDefinitionData)+ return useCallback(+ text => {+ const selection = JsonUtils.tryParseOrNull(text)+ const isValid = selection?.edges &&+ selection?.nodes?.every(node => NodeUtils.isNode(node) &&+ NodeUtils.isPlainNode(node) &&+ NodeUtils.isAvailable(node, processDefinitionData, processCategory))+ return isValid ? selection : null+ },+ [processCategory, processDefinitionData],+ )+}++function useClipboardPermission(): boolean | string {+ const clipboardPermission = useRef<PermissionStatus>()+ const [state, setState] = useState<"denied" | "granted" | "prompt">()
State as enum? ;)
comment created time in 16 hours
Pull request review commentTouK/nussknacker
export function deleteSelection(selectionState: string[], event: Event): ThunkAc } } -export function toggleSelection(...nodeIds: string[]): SelectionActions {- return {type: "TOGGLE_SELECTION", nodeIds}+export function toggleSelection(...nodeIds: string[]): ThunkAction {+ return dispatch => {+ window.getSelection().removeAllRanges()
Please add some comments why we remove all ranges.
comment created time in 16 hours