├── .gitbook.yaml ├── .github ├── img │ └── jumbo.png └── workflows │ ├── build-pr.yml │ ├── build.yml │ └── release.yml ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── .github │ └── img │ │ ├── kouncil_brokers.png │ │ ├── kouncil_cluster_form.png │ │ ├── kouncil_cluster_form_cluster_security.png │ │ ├── kouncil_cluster_form_schema_registry.png │ │ ├── kouncil_consumer_group.png │ │ ├── kouncil_event_tracking.png │ │ ├── kouncil_okta_assignments.png │ │ ├── kouncil_okta_callbacks.png │ │ ├── kouncil_okta_groups.png │ │ ├── kouncil_okta_new_app.png │ │ ├── kouncil_topic_details.png │ │ ├── kouncil_topic_details_border.png │ │ ├── kouncil_topic_event_details.png │ │ ├── kouncil_user_groups_permissions.png │ │ └── kouncil_user_groups_permissions_relogin.png ├── FAQ.md ├── FEATURES.md ├── README.md ├── ROADMAP.md ├── SUMMARY.md ├── configuration │ ├── CUSTOM_CONTEXT_PATH.md │ ├── DATABASE.md │ ├── JMX.md │ ├── KAFKA_CLUSTER.md │ ├── LOGGING.md │ ├── WEBSOCKET.md │ ├── kafka │ │ ├── AWS_MSK.md │ │ ├── SASL_PLAIN.md │ │ └── TLS.md │ ├── schema-registry │ │ ├── SCHEMA_REGISTRY_SSL.md │ │ └── SCHEMA_REGISTRY_SSL_BASIC_AUTH.md │ └── security │ │ ├── AUTHENTICATION.md │ │ ├── AUTHORIZATION.md │ │ ├── GITHUB.md │ │ ├── LDAP.md │ │ ├── LOCAL_AUTHENTICATION.md │ │ └── OKTA.md └── installation │ ├── DEPLOYMENT.md │ └── DEVELOPMENT.md ├── kouncil-backend ├── Dockerfile ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── consdata │ │ │ └── kouncil │ │ │ ├── CustomTomcatConfiguration.java │ │ │ ├── InfoController.java │ │ │ ├── KafkaConnectionService.java │ │ │ ├── KouncilApplication.java │ │ │ ├── KouncilControllerAdvisor.java │ │ │ ├── KouncilRuntimeException.java │ │ │ ├── MessagesHelper.java │ │ │ ├── broker │ │ │ ├── BrokerJXMClient.java │ │ │ ├── BrokersController.java │ │ │ ├── BrokersDto.java │ │ │ ├── KafkaBroker.java │ │ │ ├── KafkaBrokerConfig.java │ │ │ └── SystemConfiguration.java │ │ │ ├── clusters │ │ │ ├── ClusterController.java │ │ │ ├── ClusterRepository.java │ │ │ ├── ClusterService.java │ │ │ ├── ClustersController.java │ │ │ ├── ClustersService.java │ │ │ ├── converter │ │ │ │ ├── ClusterConfigConverter.java │ │ │ │ ├── ClusterConverter.java │ │ │ │ └── ClusterDtoConverter.java │ │ │ └── dto │ │ │ │ ├── BrokerDto.java │ │ │ │ ├── ClusterDto.java │ │ │ │ ├── ClusterSecurityConfigDto.java │ │ │ │ ├── ClustersDto.java │ │ │ │ ├── SchemaRegistryDto.java │ │ │ │ └── SchemaRegistrySecurityConfigDto.java │ │ │ ├── config │ │ │ ├── BrokerConfig.java │ │ │ ├── ClusterConfig.java │ │ │ ├── KouncilConfiguration.java │ │ │ ├── KouncilConfigurationController.java │ │ │ ├── SchemaRegistryConfig.java │ │ │ ├── WebSocketConfig.java │ │ │ ├── cluster │ │ │ │ └── ClusterConfigReader.java │ │ │ ├── database │ │ │ │ └── FlywayMigration.java │ │ │ └── security │ │ │ │ ├── DefaultUserPermissionsReloader.java │ │ │ │ ├── KouncilUserDetails.java │ │ │ │ ├── SpaCsrfTokenRequestHandler.java │ │ │ │ ├── UserGroupsConfigReader.java │ │ │ │ ├── UserManager.java │ │ │ │ ├── UserPermissionsReloader.java │ │ │ │ ├── ad │ │ │ │ ├── ActiveDirectoryUserDetailsMapper.java │ │ │ │ └── ActiveDirectoryWebSecurityConfig.java │ │ │ │ ├── inmemory │ │ │ │ ├── FirstTimeLoginController.java │ │ │ │ ├── InMemoryConst.java │ │ │ │ ├── InMemoryUserManager.java │ │ │ │ ├── InMemoryUserPermissionsReloader.java │ │ │ │ └── InMemoryWebSecurityConfig.java │ │ │ │ ├── ldap │ │ │ │ ├── CustomLdapAuthoritiesPopulator.java │ │ │ │ ├── KouncilLdapUserDetailsMapper.java │ │ │ │ └── LdapWebSecurityConfig.java │ │ │ │ └── sso │ │ │ │ ├── CustomOAuth2UserService.java │ │ │ │ ├── InMemoryAuthRepository.java │ │ │ │ ├── SSOProvidersController.java │ │ │ │ ├── SSOWebSecurityConfig.java │ │ │ │ └── github │ │ │ │ ├── GithubGraphQLService.java │ │ │ │ └── dto │ │ │ │ ├── GitHubGraphQLResponse.java │ │ │ │ ├── GraphQLWrapper.java │ │ │ │ ├── OrganizationNode.java │ │ │ │ ├── Organizations.java │ │ │ │ ├── TeamNode.java │ │ │ │ ├── Teams.java │ │ │ │ └── Viewer.java │ │ │ ├── consumergroup │ │ │ ├── ConsumerGroup.java │ │ │ ├── ConsumerGroupController.java │ │ │ ├── ConsumerGroupOffset.java │ │ │ ├── ConsumerGroupResponse.java │ │ │ └── ConsumerGroupsResponse.java │ │ │ ├── logging │ │ │ ├── CoreLogger.java │ │ │ └── EntryExitLogger.java │ │ │ ├── model │ │ │ ├── Broker.java │ │ │ ├── admin │ │ │ │ ├── FunctionGroup.java │ │ │ │ ├── SystemFunction.java │ │ │ │ ├── SystemFunctionName.java │ │ │ │ ├── SystemFunctionNameConstants.java │ │ │ │ └── UserGroup.java │ │ │ ├── cluster │ │ │ │ ├── Cluster.java │ │ │ │ ├── ClusterAuthenticationMethod.java │ │ │ │ ├── ClusterSASLMechanism.java │ │ │ │ ├── ClusterSecurityConfig.java │ │ │ │ └── ClusterSecurityProtocol.java │ │ │ └── schemaregistry │ │ │ │ ├── SchemaAuthenticationMethod.java │ │ │ │ ├── SchemaRegistry.java │ │ │ │ ├── SchemaRegistrySecurityConfig.java │ │ │ │ ├── SchemaSecurityProtocol.java │ │ │ │ └── StoreType.java │ │ │ ├── notifications │ │ │ ├── Notification.java │ │ │ ├── NotificationAction.java │ │ │ └── NotificationType.java │ │ │ ├── schema │ │ │ ├── SchemaDTO.java │ │ │ ├── SchemasConfigurationDTO.java │ │ │ ├── SchemasDTO.java │ │ │ ├── clusteraware │ │ │ │ ├── SchemaAwareCluster.java │ │ │ │ └── SchemaAwareClusterService.java │ │ │ └── registry │ │ │ │ ├── SchemaRegistryClientBuilder.java │ │ │ │ ├── SchemaRegistryController.java │ │ │ │ ├── SchemaRegistryFacade.java │ │ │ │ ├── SchemaRegistryNotConfiguredException.java │ │ │ │ ├── SchemaRegistryService.java │ │ │ │ └── TopicUtils.java │ │ │ ├── security │ │ │ ├── AuthController.java │ │ │ ├── KouncilRole.java │ │ │ ├── User.java │ │ │ ├── UserRolesMapping.java │ │ │ ├── function │ │ │ │ ├── SystemFunctionConverter.java │ │ │ │ ├── SystemFunctionService.java │ │ │ │ ├── SystemFunctionsController.java │ │ │ │ ├── SystemFunctionsRepository.java │ │ │ │ └── dto │ │ │ │ │ └── SystemFunctionDto.java │ │ │ └── group │ │ │ │ ├── UserGroupController.java │ │ │ │ ├── UserGroupConverter.java │ │ │ │ ├── UserGroupRepository.java │ │ │ │ ├── UserGroupService.java │ │ │ │ ├── UserGroupsController.java │ │ │ │ ├── UserGroupsService.java │ │ │ │ └── dto │ │ │ │ └── UserGroupDto.java │ │ │ ├── serde │ │ │ ├── Compatibility.java │ │ │ ├── KouncilSchemaMetadata.java │ │ │ ├── MessageFormat.java │ │ │ ├── SchemaMessageSerde.java │ │ │ ├── StringMessageSerde.java │ │ │ ├── SubjectType.java │ │ │ ├── deserialization │ │ │ │ ├── DeserializationData.java │ │ │ │ ├── DeserializationService.java │ │ │ │ ├── DeserializedData.java │ │ │ │ └── DeserializedMessage.java │ │ │ ├── formatter │ │ │ │ ├── StringMessageFormatter.java │ │ │ │ └── schema │ │ │ │ │ ├── AvroMessageFormatter.java │ │ │ │ │ ├── JsonSchemaMessageFormatter.java │ │ │ │ │ ├── MessageFormatter.java │ │ │ │ │ └── ProtobufMessageFormatter.java │ │ │ └── serialization │ │ │ │ ├── SerializationData.java │ │ │ │ └── SerializationService.java │ │ │ ├── survey │ │ │ └── SurveyController.java │ │ │ ├── topic │ │ │ ├── TopicController.java │ │ │ ├── TopicData.java │ │ │ ├── TopicMessage.java │ │ │ ├── TopicMessageHeader.java │ │ │ ├── TopicMessagesDto.java │ │ │ ├── TopicMetadata.java │ │ │ ├── TopicResendEventsModel.java │ │ │ ├── TopicService.java │ │ │ ├── TopicsController.java │ │ │ ├── TopicsDto.java │ │ │ ├── TopicsService.java │ │ │ └── util │ │ │ │ ├── FieldType.java │ │ │ │ └── PlaceholderFormatUtil.java │ │ │ └── track │ │ │ ├── AsyncTrackStrategy.java │ │ │ ├── DestinationStore.java │ │ │ ├── EventMatcher.java │ │ │ ├── SyncTrackStrategy.java │ │ │ ├── TopicMetadata.java │ │ │ ├── TrackController.java │ │ │ ├── TrackOperator.java │ │ │ ├── TrackService.java │ │ │ ├── TrackStrategy.java │ │ │ └── WebSocketStats.java │ └── resources │ │ ├── db │ │ └── migration │ │ │ ├── V1__create_cluster_tables.sql │ │ │ ├── V2__create_roles_functions_tables.sql │ │ │ ├── V3__add_cluster_list_role.sql │ │ │ ├── V4__add_cluster_roles.sql │ │ │ ├── V5__add_cluster_delete_role.sql │ │ │ ├── V6__user_groups.sql │ │ │ └── V7__topic_details.sql │ │ ├── kouncil.yaml │ │ └── rewrite.config │ └── test │ ├── java │ └── com │ │ └── consdata │ │ └── kouncil │ │ ├── KouncilApplicationTests.java │ │ ├── config │ │ └── cluster │ │ │ └── converter │ │ │ ├── ClusterConfigConverterTest.java │ │ │ └── ClusterDtoConverterTest.java │ │ ├── schema │ │ └── SchemaRegistryFacadeTest.java │ │ ├── security │ │ ├── AuthControllerTest.java │ │ └── FirstTimeLoginControllerInMemoryTest.java │ │ ├── serde │ │ ├── AvroDeserializationServiceTest.java │ │ ├── AvroSerializationServiceTest.java │ │ ├── JsonSchemaDeserializationServiceTest.java │ │ ├── JsonSchemaSerializationServiceTest.java │ │ ├── NoSchemaDeserializationServiceTest.java │ │ ├── NoSchemaSerializationServiceTest.java │ │ ├── ProtobufDeserializationServiceTest.java │ │ ├── ProtobufSerializationServiceTest.java │ │ └── StringMessageSerdeTest.java │ │ ├── topic │ │ ├── PlaceholderFormatUtilTest.java │ │ └── TopicServiceTest.java │ │ └── track │ │ └── EventMatcherTest.java │ └── resources │ ├── SimpleMessage.avro │ ├── SimpleMessage.json │ ├── SimpleMessage.proto │ ├── SimpleMessage.schema.json │ ├── SimpleMessageAvro.json │ └── application.yaml ├── kouncil-frontend ├── .browserslistrc ├── .editorconfig ├── .eslintrc.json ├── .firebaserc ├── .gitignore ├── .prettierignore ├── .prettierrc ├── apps │ ├── .gitkeep │ └── kouncil │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ ├── app │ │ │ ├── access-denied │ │ │ │ ├── access-denied.component.scss │ │ │ │ └── access-denied.component.ts │ │ │ ├── app-factories.ts │ │ │ ├── app.component.scss │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── breadcrumb │ │ │ │ ├── breadcrumb.component.scss │ │ │ │ └── breadcrumb.component.ts │ │ │ ├── broker │ │ │ │ ├── broker.component.scss │ │ │ │ └── broker.component.ts │ │ │ ├── brokers │ │ │ │ ├── broker.backend.service.ts │ │ │ │ ├── broker.demo.data.ts │ │ │ │ ├── broker.demo.service.ts │ │ │ │ ├── broker.service.ts │ │ │ │ ├── broker.ts │ │ │ │ ├── brokers.component.scss │ │ │ │ ├── brokers.component.ts │ │ │ │ ├── brokers.ts │ │ │ │ └── filze-size.pipe.ts │ │ │ ├── consumers │ │ │ │ ├── cached-cell │ │ │ │ │ ├── cached-cell-data.ts │ │ │ │ │ ├── cached-cell.component.scss │ │ │ │ │ ├── cached-cell.component.ts │ │ │ │ │ └── cached-cell.service.ts │ │ │ │ ├── consumer-group │ │ │ │ │ ├── consumer-group.backend.service.ts │ │ │ │ │ ├── consumer-group.component.scss │ │ │ │ │ ├── consumer-group.component.ts │ │ │ │ │ ├── consumer-group.demo.data.ts │ │ │ │ │ ├── consumer-group.demo.service.ts │ │ │ │ │ └── consumer-group.service.ts │ │ │ │ └── consumer-groups │ │ │ │ │ ├── consumer-groups.backend.service.ts │ │ │ │ │ ├── consumer-groups.component.scss │ │ │ │ │ ├── consumer-groups.component.ts │ │ │ │ │ ├── consumer-groups.demo.data.ts │ │ │ │ │ ├── consumer-groups.demo.service.ts │ │ │ │ │ └── consumer-groups.service.ts │ │ │ ├── demo │ │ │ │ ├── demo.component.scss │ │ │ │ └── demo.component.ts │ │ │ ├── login │ │ │ │ ├── change-password.component.scss │ │ │ │ ├── change-password.component.ts │ │ │ │ ├── login.component.scss │ │ │ │ ├── login.component.ts │ │ │ │ ├── main-login.component.scss │ │ │ │ └── main-login.component.ts │ │ │ ├── main │ │ │ │ ├── main.component.scss │ │ │ │ └── main.component.ts │ │ │ ├── oauth │ │ │ │ ├── o-auth-redirect.component.scss │ │ │ │ └── o-auth-redirect.component.ts │ │ │ ├── page-not-found │ │ │ │ ├── page-not-found.component.scss │ │ │ │ └── page-not-found.component.ts │ │ │ ├── routing │ │ │ │ ├── auth.guard.ts │ │ │ │ ├── config-resolver.ts │ │ │ │ └── routing.module.ts │ │ │ ├── rx-stomp-service-factory.ts │ │ │ ├── rx-stomp.config.ts │ │ │ ├── schemas │ │ │ │ ├── form │ │ │ │ │ ├── create │ │ │ │ │ │ ├── schema-create.component.scss │ │ │ │ │ │ └── schema-create.component.ts │ │ │ │ │ ├── details │ │ │ │ │ │ ├── schema-details.component.scss │ │ │ │ │ │ └── schema-details.component.ts │ │ │ │ │ ├── edit │ │ │ │ │ │ ├── schema-edit.component.scss │ │ │ │ │ │ └── schema-edit.component.ts │ │ │ │ │ └── form │ │ │ │ │ │ ├── schema-form.component.scss │ │ │ │ │ │ └── schema-form.component.ts │ │ │ │ └── list │ │ │ │ │ ├── schemas.component.scss │ │ │ │ │ └── schemas.component.ts │ │ │ ├── sidebar │ │ │ │ ├── sidebar-menu-item │ │ │ │ │ ├── sidebar-menu-item.component.scss │ │ │ │ │ └── sidebar-menu-item.component.ts │ │ │ │ ├── sidebar-state.ts │ │ │ │ ├── sidebar.component.scss │ │ │ │ ├── sidebar.component.ts │ │ │ │ └── sidebar.service.ts │ │ │ ├── survey │ │ │ │ ├── model │ │ │ │ │ ├── survey-answer.ts │ │ │ │ │ └── survey.model.ts │ │ │ │ ├── survey-scale-question │ │ │ │ │ ├── survey-scale-question.component.scss │ │ │ │ │ └── survey-scale-question.component.ts │ │ │ │ ├── survey.backend.service.ts │ │ │ │ ├── survey.component.scss │ │ │ │ ├── survey.component.ts │ │ │ │ ├── survey.demo.service.ts │ │ │ │ └── survey.service.ts │ │ │ ├── toolbar │ │ │ │ ├── toolbar.component.scss │ │ │ │ └── toolbar.component.ts │ │ │ ├── topic │ │ │ │ ├── json-grid-data.ts │ │ │ │ ├── json-grid.spec.ts │ │ │ │ ├── json-grid.ts │ │ │ │ ├── message │ │ │ │ │ ├── message-view.component.scss │ │ │ │ │ └── message-view.component.ts │ │ │ │ ├── page.ts │ │ │ │ ├── toolbar │ │ │ │ │ ├── topic-toolbar.component.scss │ │ │ │ │ └── topic-toolbar.component.ts │ │ │ │ ├── topic-messages.ts │ │ │ │ ├── topic-pagination.component.scss │ │ │ │ ├── topic-pagination.component.ts │ │ │ │ ├── topic-partitions.component.scss │ │ │ │ ├── topic-partitions.component.ts │ │ │ │ ├── topic.backend.service.ts │ │ │ │ ├── topic.component.scss │ │ │ │ ├── topic.component.ts │ │ │ │ ├── topic.demo.service.ts │ │ │ │ └── topic.service.ts │ │ │ └── track │ │ │ │ ├── track-date-format.ts │ │ │ │ ├── track-filter │ │ │ │ ├── track-filter.component.scss │ │ │ │ ├── track-filter.component.ts │ │ │ │ └── track-filter.ts │ │ │ │ ├── track-result │ │ │ │ ├── track-result.component.scss │ │ │ │ └── track-result.component.ts │ │ │ │ ├── track.backend.service.ts │ │ │ │ ├── track.component.ts │ │ │ │ ├── track.demo.service.ts │ │ │ │ └── track.service.ts │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ ├── consdata-logo-color.png │ │ │ ├── consdata-logo.png │ │ │ ├── github-mark.svg │ │ │ ├── kouncil-favicon.png │ │ │ ├── kouncil-logo.png │ │ │ └── okta.png │ │ ├── environments │ │ │ ├── environment.demo.ts │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.scss │ │ ├── styles │ │ │ ├── _buttons.scss │ │ │ ├── _inputs.scss │ │ │ ├── _material.scss │ │ │ ├── _ngx.scss │ │ │ ├── _palette.scss │ │ │ └── _spaces.scss │ │ └── test-setup.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.editor.json │ │ ├── tsconfig.json │ │ └── tsconfig.spec.json ├── decorate-angular-cli.js ├── firebase.json ├── jest.config.ts ├── jest.preset.js ├── libs │ ├── .gitkeep │ ├── common-auth │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── auth │ │ │ │ │ ├── auth.backend.service.ts │ │ │ │ │ ├── auth.demo.service.ts │ │ │ │ │ ├── auth.service.ts │ │ │ │ │ └── system-function-name.ts │ │ │ │ └── common-auth.module.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── common-components │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── abstract-table.component.ts │ │ │ │ ├── autocomplete │ │ │ │ │ ├── autocomplete.component.scss │ │ │ │ │ └── autocomplete.component.ts │ │ │ │ ├── common-components.module.ts │ │ │ │ ├── editor │ │ │ │ │ ├── editor.component.scss │ │ │ │ │ ├── editor.component.ts │ │ │ │ │ ├── monaco-editor.service.ts │ │ │ │ │ └── schema.ts │ │ │ │ ├── number-field │ │ │ │ │ ├── number-field.component.scss │ │ │ │ │ └── number-field.component.ts │ │ │ │ ├── password-field │ │ │ │ │ ├── password-field.component.scss │ │ │ │ │ └── password-field.component.ts │ │ │ │ ├── radio-field │ │ │ │ │ ├── radio-field.component.scss │ │ │ │ │ └── radio-field.component.ts │ │ │ │ ├── select-field │ │ │ │ │ ├── select-field.component.scss │ │ │ │ │ └── select-field.component.ts │ │ │ │ ├── selectable-item.ts │ │ │ │ ├── table-column │ │ │ │ │ ├── resize-column.directive.ts │ │ │ │ │ ├── table-column.component.scss │ │ │ │ │ ├── table-column.component.ts │ │ │ │ │ └── table-column.ts │ │ │ │ ├── table │ │ │ │ │ ├── table-group.ts │ │ │ │ │ ├── table.component.scss │ │ │ │ │ └── table.component.ts │ │ │ │ └── text-field │ │ │ │ │ ├── text-field.component.scss │ │ │ │ │ └── text-field.component.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── common-login │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── change-password │ │ │ │ │ ├── common-change-password.component.scss │ │ │ │ │ └── common-change-password.component.ts │ │ │ │ ├── common-login.module.ts │ │ │ │ ├── common-login.scss │ │ │ │ ├── login-field │ │ │ │ │ ├── common-login-field.component.scss │ │ │ │ │ └── common-login-field.component.ts │ │ │ │ ├── login-icon │ │ │ │ │ ├── common-login-icon.component.scss │ │ │ │ │ └── common-login-icon.component.ts │ │ │ │ ├── login-sso │ │ │ │ │ ├── common-login-sso.component.scss │ │ │ │ │ └── common-login-sso.component.ts │ │ │ │ └── login │ │ │ │ │ ├── common-login.component.scss │ │ │ │ │ ├── common-login.component.ts │ │ │ │ │ ├── sso-provider.ts │ │ │ │ │ └── user.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── common-model │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── common-model.module.ts │ │ │ │ └── model │ │ │ │ │ ├── app.backend.ts │ │ │ │ │ ├── consumer-group │ │ │ │ │ ├── consumer-group.ts │ │ │ │ │ └── consumer-groups.ts │ │ │ │ │ └── topics │ │ │ │ │ └── topics.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── common-servers │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── common-servers.module.ts │ │ │ │ └── servers │ │ │ │ │ ├── server.ts │ │ │ │ │ ├── servers.backend.service.ts │ │ │ │ │ ├── servers.demo.service.ts │ │ │ │ │ └── servers.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── common-utils │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── common-utils.module.ts │ │ │ │ ├── search │ │ │ │ │ └── search.service.ts │ │ │ │ └── util │ │ │ │ │ ├── array-sort.service.ts │ │ │ │ │ ├── crypto.ts │ │ │ │ │ ├── drawer.service.ts │ │ │ │ │ ├── http-client.interceptor.ts │ │ │ │ │ ├── object-utils.spec.ts │ │ │ │ │ ├── object-utils.ts │ │ │ │ │ ├── progress-bar.component.ts │ │ │ │ │ ├── progress-bar.service.ts │ │ │ │ │ ├── random-utils.ts │ │ │ │ │ ├── snack-bar-data.ts │ │ │ │ │ ├── snack-bar.component.ts │ │ │ │ │ └── view-mode.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-clusters │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── cluster-form │ │ │ │ │ ├── cluster-form-create │ │ │ │ │ │ ├── cluster-form-create.component.scss │ │ │ │ │ │ └── cluster-form-create.component.ts │ │ │ │ │ ├── cluster-form-edit │ │ │ │ │ │ ├── cluster-form-edit.component.scss │ │ │ │ │ │ └── cluster-form-edit.component.ts │ │ │ │ │ ├── cluster-form-util.ts │ │ │ │ │ ├── cluster-form-view │ │ │ │ │ │ ├── cluster-form-view.component.scss │ │ │ │ │ │ └── cluster-form-view.component.ts │ │ │ │ │ ├── cluster-form.component.scss │ │ │ │ │ ├── cluster-form.component.ts │ │ │ │ │ ├── cluster.backend.service.ts │ │ │ │ │ ├── cluster.demo.service.ts │ │ │ │ │ ├── cluster.service.ts │ │ │ │ │ └── sections │ │ │ │ │ │ ├── cluster-form-actions │ │ │ │ │ │ ├── cluster-form-actions.component.scss │ │ │ │ │ │ └── cluster-form-actions.component.ts │ │ │ │ │ │ ├── cluster-form-brokers │ │ │ │ │ │ ├── cluster-form-brokers.component.scss │ │ │ │ │ │ └── cluster-form-brokers.component.ts │ │ │ │ │ │ ├── cluster-form-schema-registry │ │ │ │ │ │ ├── cluster-form-schema-registry.component.scss │ │ │ │ │ │ └── cluster-form-schema-registry.component.ts │ │ │ │ │ │ └── cluster-form-security │ │ │ │ │ │ ├── cluster-form-security.component.scss │ │ │ │ │ │ └── cluster-form-security.component.ts │ │ │ │ ├── cluster.model.ts │ │ │ │ ├── clusters │ │ │ │ │ ├── cluster.model.ts │ │ │ │ │ ├── clusters.backend.service.ts │ │ │ │ │ ├── clusters.component.scss │ │ │ │ │ ├── clusters.component.ts │ │ │ │ │ ├── clusters.demo.service.ts │ │ │ │ │ └── clusters.service.ts │ │ │ │ └── feat-clusters.module.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-confirm │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── confirm.module.ts │ │ │ │ └── confirm │ │ │ │ │ ├── confirm.component.scss │ │ │ │ │ ├── confirm.component.ts │ │ │ │ │ ├── confirm.model.ts │ │ │ │ │ └── confirm.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-favourites │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── favouritable.ts │ │ │ │ ├── favourites-group.ts │ │ │ │ └── favourites.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-no-data │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-no-data.module.ts │ │ │ │ └── no-data-placeholder │ │ │ │ │ ├── no-data-placeholder.component.scss │ │ │ │ │ └── no-data-placeholder.component.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-notifications │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-notifications.module.ts │ │ │ │ ├── notification-button │ │ │ │ │ └── notification-button.component.ts │ │ │ │ ├── notification.model.ts │ │ │ │ ├── notification │ │ │ │ │ ├── notification.component.scss │ │ │ │ │ └── notification.component.ts │ │ │ │ └── rx-stomp.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-send │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-send.module.ts │ │ │ │ └── send │ │ │ │ │ ├── send.backend.service.ts │ │ │ │ │ ├── send.component.scss │ │ │ │ │ ├── send.component.ts │ │ │ │ │ ├── send.demo.service.ts │ │ │ │ │ └── send.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-topic-form │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-topic-form.module.ts │ │ │ │ └── topic │ │ │ │ │ ├── topic-data.ts │ │ │ │ │ ├── topic-form.component.scss │ │ │ │ │ ├── topic-form.component.ts │ │ │ │ │ ├── topic.backend.service.ts │ │ │ │ │ ├── topic.demo.service.ts │ │ │ │ │ └── topic.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-topics │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-topics.module.ts │ │ │ │ └── topics │ │ │ │ │ ├── list │ │ │ │ │ ├── topics.backend.service.ts │ │ │ │ │ ├── topics.component.scss │ │ │ │ │ ├── topics.component.ts │ │ │ │ │ ├── topics.demo.data.ts │ │ │ │ │ └── topics.demo.service.ts │ │ │ │ │ └── topics.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── feat-user-groups │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── feat-user-groups.module.ts │ │ │ │ ├── user-groups-functions-matrix │ │ │ │ │ ├── functions │ │ │ │ │ │ ├── functions.backend.service.ts │ │ │ │ │ │ ├── functions.demo.service.ts │ │ │ │ │ │ └── functions.service.ts │ │ │ │ │ ├── user-groups-functions-matrix.component.scss │ │ │ │ │ ├── user-groups-functions-matrix.component.ts │ │ │ │ │ └── user-groups.model.ts │ │ │ │ └── user-groups │ │ │ │ │ ├── form │ │ │ │ │ ├── user-group-form.component.scss │ │ │ │ │ ├── user-group-form.component.ts │ │ │ │ │ ├── user-group.backend.service.ts │ │ │ │ │ ├── user-group.demo.service.ts │ │ │ │ │ └── user-group.service.ts │ │ │ │ │ └── list │ │ │ │ │ ├── user-groups.backend.service.ts │ │ │ │ │ ├── user-groups.component.scss │ │ │ │ │ ├── user-groups.component.ts │ │ │ │ │ ├── user-groups.demo.service.ts │ │ │ │ │ └── user-groups.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── message-data │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── message-data.module.ts │ │ │ │ └── message-data │ │ │ │ │ ├── message-data-header.ts │ │ │ │ │ ├── message-data.service.ts │ │ │ │ │ └── message-data.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ ├── resend-events │ │ ├── .eslintrc.json │ │ ├── jest.config.js │ │ ├── project.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── resend.module.ts │ │ │ │ └── resend │ │ │ │ │ ├── resend-form.service.ts │ │ │ │ │ ├── resend.backend.service.ts │ │ │ │ │ ├── resend.component.scss │ │ │ │ │ ├── resend.component.ts │ │ │ │ │ ├── resend.data.model.ts │ │ │ │ │ ├── resend.demo.service.ts │ │ │ │ │ ├── resend.filter.service.ts │ │ │ │ │ └── resend.service.ts │ │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json │ └── schema-registry │ │ ├── .eslintrc.json │ │ ├── jest.config.ts │ │ ├── project.json │ │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ ├── avro │ │ │ │ ├── avro-random-value-generator.service.ts │ │ │ │ ├── avro-utils.service.spec.ts │ │ │ │ └── avro-utils.service.ts │ │ │ ├── generators │ │ │ │ ├── random-boolean-generator.service.ts │ │ │ │ ├── random-bytes-generator.service.ts │ │ │ │ ├── random-date-generator.service.ts │ │ │ │ ├── random-float-generator.service.ts │ │ │ │ ├── random-int-generator.service.ts │ │ │ │ ├── random-string-generator.service.ts │ │ │ │ └── random-uuid-generator.service.ts │ │ │ ├── protobuf │ │ │ │ ├── expectedProtobufWithData.json │ │ │ │ ├── protobuf-utils.service.spec.ts │ │ │ │ └── protobuf-utils.service.ts │ │ │ ├── schema-registry.module.ts │ │ │ └── schema │ │ │ │ ├── compatibility.ts │ │ │ │ ├── message-format.ts │ │ │ │ ├── schema-facade.service.ts │ │ │ │ ├── schema-registry.backend.service.ts │ │ │ │ ├── schema-registry.demo.service.ts │ │ │ │ ├── schema-registry.service.ts │ │ │ │ ├── schema-state.service.ts │ │ │ │ ├── schema.model.ts │ │ │ │ ├── schemas.model.ts │ │ │ │ └── subject-type.ts │ │ └── test-setup.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.lib.json │ │ └── tsconfig.spec.json ├── nx.json ├── package.json ├── pom.xml ├── proxy.conf.json ├── run.sh ├── tools │ ├── generators │ │ └── .gitkeep │ └── tsconfig.tools.json ├── tsconfig.base.json ├── yarn.lock └── yarnw ├── logback.xml ├── mvnw ├── mvnw.cmd └── pom.xml /.gitbook.yaml: -------------------------------------------------------------------------------- 1 | root: ./docs/ -------------------------------------------------------------------------------- /.github/img/jumbo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/.github/img/jumbo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | yarn-error.log 3 | kouncil*.iml 4 | idea 5 | .idea 6 | local 7 | *.exe 8 | /node_modules/ 9 | docker-compose.yml 10 | .firebase 11 | kouncil_installation_id.txt 12 | default_*_password.txt 13 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /docs/.github/img/kouncil_brokers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_brokers.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_cluster_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_cluster_form.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_cluster_form_cluster_security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_cluster_form_cluster_security.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_cluster_form_schema_registry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_cluster_form_schema_registry.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_consumer_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_consumer_group.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_event_tracking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_event_tracking.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_okta_assignments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_okta_assignments.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_okta_callbacks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_okta_callbacks.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_okta_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_okta_groups.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_okta_new_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_okta_new_app.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_topic_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_topic_details.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_topic_details_border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_topic_details_border.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_topic_event_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_topic_event_details.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_user_groups_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_user_groups_permissions.png -------------------------------------------------------------------------------- /docs/.github/img/kouncil_user_groups_permissions_relogin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/docs/.github/img/kouncil_user_groups_permissions_relogin.png -------------------------------------------------------------------------------- /docs/configuration/CUSTOM_CONTEXT_PATH.md: -------------------------------------------------------------------------------- 1 | ## Custom context path 2 | 3 | If you want to expose Kouncil in a custom context path, you need to set 4 | Spring's `kouncil.context-path` parameter. 5 | In Docker run command it will look like this 6 | 7 | ```bash 8 | docker run -d -p 80:8080 -e bootstrapServers="kafka1:9092" -e kouncil.context-path="/console" consdata/kouncil:latest 9 | ``` 10 | 11 | After that, visit [http://localhost/console](http://localhost/console) in your browser, and you 12 | should see a login screen. 13 | -------------------------------------------------------------------------------- /docs/configuration/DATABASE.md: -------------------------------------------------------------------------------- 1 | ## Database configuration 2 | 3 | Currently, Kouncil supports two databases: 4 | 5 | * PostgreSQL 6 | * H2 7 | 8 | If no database is specified with below properties, H2 in-memory database will be used. 9 | 10 | ### Configuration properties 11 | 12 | * `spring.datasource.url` JDBC URL of the database 13 | * `spring.datasource.username` login username of the database 14 | * `spring.datasource.password` login password of the database 15 | * `spring.jpa.hibernate.default_schema` sets default schema 16 | 17 | ### Example 18 | 19 | ```yaml 20 | spring: 21 | datasource: 22 | url: jdbc:postgresql://localhost:5432/ 23 | username: postgres 24 | password: password 25 | jpa: 26 | hibernate: 27 | default_schema: kouncil 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/configuration/WEBSOCKET.md: -------------------------------------------------------------------------------- 1 | ## WebSocket allowed origins configuration 2 | 3 | By default, WebSocket allowed origins are set to *, which can be insecure. You can easily narrow it 4 | down by setting the allowedOrigins environment variable as follows: 5 | 6 | ```bash 7 | docker run -d -p 80:8080 -e bootstrapServers="kafka1:9092" -e allowedOrigins="http://localhost:*, https://yourdomain.com" consdata/kouncil:latest 8 | ``` 9 | 10 | -------------------------------------------------------------------------------- /docs/configuration/security/AUTHENTICATION.md: -------------------------------------------------------------------------------- 1 | ## Authentication 2 | 3 | Kouncil supports multiple authentication methods along with LDAP, Active Directory, and SSO. There 4 | are a lot of different configuration scenarios. Here are examples of the most common ones: 5 | -------------------------------------------------------------------------------- /docs/configuration/security/LOCAL_AUTHENTICATION.md: -------------------------------------------------------------------------------- 1 | ### Local authentication 2 | 3 | The simplest in-memory provider. It does not require any configuration. Only for test purposes! The 4 | default uses are admin, editor, and viewer. The default password for each of these users is user 5 | name. 6 | 7 | ```yaml 8 | kouncil: 9 | auth: 10 | active-provider: inmemory 11 | ``` 12 | -------------------------------------------------------------------------------- /kouncil-backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 2 | VOLUME /tmp 3 | ARG JAR_FILE 4 | ADD ${JAR_FILE} app.jar 5 | RUN mkdir /config/ 6 | 7 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar", "--spring.config.name=kouncil", "--spring.config.additional-location=/config/"] 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/KouncilApplication.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class KouncilApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(KouncilApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/KouncilRuntimeException.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil; 2 | 3 | public class KouncilRuntimeException extends RuntimeException { 4 | public KouncilRuntimeException(String message) { 5 | super(message); 6 | } 7 | 8 | public KouncilRuntimeException(Exception e) { 9 | super(e); 10 | } 11 | 12 | public KouncilRuntimeException(String message, Exception e) { 13 | super(message, e); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/broker/BrokersDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.broker; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | @Builder 11 | @JsonIgnoreProperties(ignoreUnknown = true) 12 | public class BrokersDto { 13 | private List brokers; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/broker/SystemConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.broker; 2 | 3 | public interface SystemConfiguration { 4 | 5 | String getName(); 6 | 7 | String getArch(); 8 | 9 | String getVersion(); 10 | 11 | int getAvailableProcessors(); 12 | 13 | double getSystemLoadAverage(); 14 | 15 | long getCommittedVirtualMemorySize(); 16 | 17 | long getTotalSwapSpaceSize(); 18 | 19 | long getFreeSwapSpaceSize(); 20 | 21 | long getProcessCpuTime(); 22 | 23 | long getFreePhysicalMemorySize(); 24 | 25 | long getTotalPhysicalMemorySize(); 26 | 27 | double getSystemCpuLoad(); 28 | 29 | double getProcessCpuLoad(); 30 | } 31 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/clusters/ClusterRepository.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.clusters; 2 | 3 | import com.consdata.kouncil.model.cluster.Cluster; 4 | import org.springframework.data.repository.CrudRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface ClusterRepository extends CrudRepository { 9 | 10 | Cluster findByName(String name); 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/clusters/dto/BrokerDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.clusters.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class BrokerDto { 7 | 8 | private Long id; 9 | private String bootstrapServer; 10 | private Integer jmxPort; 11 | private String jmxUser; 12 | private String jmxPassword; 13 | } 14 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/clusters/dto/ClusterDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.clusters.dto; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ClusterDto { 9 | 10 | private Long id; 11 | private String name; 12 | private Set brokers = new HashSet<>(); 13 | private ClusterSecurityConfigDto clusterSecurityConfig; 14 | private SchemaRegistryDto schemaRegistry; 15 | 16 | private Integer globalJmxPort; 17 | private String globalJmxUser; 18 | private String globalJmxPassword; 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/clusters/dto/ClustersDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.clusters.dto; 2 | 3 | import java.util.List; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | @Data 8 | @Builder 9 | public class ClustersDto { 10 | 11 | private List clusters; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/clusters/dto/SchemaRegistryDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.clusters.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class SchemaRegistryDto { 7 | 8 | private Long id; 9 | private String url; 10 | private SchemaRegistrySecurityConfigDto schemaRegistrySecurityConfig; 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/ClusterConfig.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config; 2 | 3 | import lombok.*; 4 | import org.springframework.boot.autoconfigure.kafka.KafkaProperties; 5 | 6 | import java.util.List; 7 | 8 | @Builder 9 | @Data 10 | @NoArgsConstructor 11 | @AllArgsConstructor 12 | public class ClusterConfig { 13 | 14 | private String name; 15 | 16 | private SchemaRegistryConfig schemaRegistry; 17 | 18 | private Integer jmxPort; 19 | 20 | private String jmxUser; 21 | 22 | private String jmxPassword; 23 | 24 | private KafkaProperties kafka = new KafkaProperties(); 25 | 26 | @Singular 27 | private List brokers; 28 | 29 | public boolean hasJmxConfig() { 30 | return jmxPort != null; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/UserManager.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security; 2 | 3 | import java.io.IOException; 4 | 5 | public interface UserManager { 6 | 7 | boolean firstTimeLogin(String username); 8 | 9 | default void skipChangeDefaultPassword() throws IOException { 10 | } 11 | 12 | default void changeDefaultPassword(String password) throws IOException { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/UserPermissionsReloader.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security; 2 | 3 | public interface UserPermissionsReloader { 4 | 5 | void reloadPermissions(); 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/GitHubGraphQLResponse.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GitHubGraphQLResponse { 7 | 8 | private Viewer viewer; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/GraphQLWrapper.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GraphQLWrapper { 7 | 8 | private GitHubGraphQLResponse data; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/OrganizationNode.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class OrganizationNode { 7 | private String login; 8 | private String name; 9 | private Teams teams; 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/Organizations.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import java.util.List; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class Organizations { 8 | private List nodes; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/TeamNode.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class TeamNode { 7 | 8 | private String name; 9 | private String slug; 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/Teams.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import java.util.List; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class Teams { 8 | private List nodes; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/config/security/sso/github/dto/Viewer.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.config.security.sso.github.dto; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Viewer { 7 | private String login; 8 | private Organizations organizations; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/consumergroup/ConsumerGroup.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.consumergroup; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | @Data 7 | @Builder 8 | public class ConsumerGroup { 9 | private String groupId; 10 | private String status; 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/consumergroup/ConsumerGroupOffset.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.consumergroup; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | @Data 8 | @Builder 9 | public class ConsumerGroupOffset { 10 | 11 | @JsonIgnore 12 | private org.apache.kafka.common.TopicPartition key; 13 | private String consumerId; 14 | private String clientId; 15 | private String host; 16 | 17 | private int partition; 18 | private String topic; 19 | private Long offset; 20 | private Long endOffset; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/consumergroup/ConsumerGroupResponse.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.consumergroup; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | @Data 9 | @Builder 10 | public class ConsumerGroupResponse { 11 | private List consumerGroupOffset; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/consumergroup/ConsumerGroupsResponse.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.consumergroup; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | @Data 9 | @Builder 10 | public class ConsumerGroupsResponse { 11 | private List consumerGroups; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/logging/EntryExitLogger.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.logging; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.Target; 5 | 6 | import static java.lang.annotation.ElementType.METHOD; 7 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 8 | 9 | @Retention(RUNTIME) 10 | @Target({METHOD}) 11 | public @interface EntryExitLogger { 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/admin/FunctionGroup.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.admin; 2 | 3 | public enum FunctionGroup { 4 | 5 | TOPIC, 6 | CONSUMER_GROUP, 7 | SCHEMA_REGISTRY, 8 | CLUSTER, 9 | ADMIN 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/cluster/ClusterAuthenticationMethod.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.cluster; 2 | 3 | public enum ClusterAuthenticationMethod { 4 | 5 | NONE, 6 | SASL, 7 | SSL, 8 | AWS_MSK 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/cluster/ClusterSASLMechanism.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.cluster; 2 | 3 | public enum ClusterSASLMechanism { 4 | 5 | PLAIN, 6 | AWS_MSK_IAM; 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/cluster/ClusterSecurityProtocol.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.cluster; 2 | 3 | public enum ClusterSecurityProtocol { 4 | 5 | SASL_PLAINTEXT, 6 | SASL_SSL, 7 | SSL; 8 | } 9 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/schemaregistry/SchemaAuthenticationMethod.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.schemaregistry; 2 | 3 | public enum SchemaAuthenticationMethod { 4 | 5 | NONE, 6 | SSL, 7 | SSL_BASIC_AUTH 8 | } 9 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/schemaregistry/SchemaSecurityProtocol.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.schemaregistry; 2 | 3 | public enum SchemaSecurityProtocol { 4 | 5 | SSL 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/model/schemaregistry/StoreType.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.model.schemaregistry; 2 | 3 | public enum StoreType { 4 | 5 | JKS, 6 | PKCS12 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/notifications/Notification.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.notifications; 2 | 3 | import lombok.Getter; 4 | import lombok.NoArgsConstructor; 5 | import lombok.Setter; 6 | 7 | @Getter 8 | @Setter 9 | @NoArgsConstructor 10 | public class Notification { 11 | 12 | private String message; 13 | private NotificationType type; 14 | private NotificationAction action; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/notifications/NotificationAction.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.notifications; 2 | 3 | public enum NotificationAction { 4 | 5 | LOGOUT 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/notifications/NotificationType.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.notifications; 2 | 3 | public enum NotificationType { 4 | PUSH_WITH_ACTION_REQUIRED, 5 | PUSH 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/schema/SchemaDTO.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.schema; 2 | 3 | import com.consdata.kouncil.serde.Compatibility; 4 | import com.consdata.kouncil.serde.MessageFormat; 5 | import com.consdata.kouncil.serde.SubjectType; 6 | import java.util.List; 7 | import lombok.AllArgsConstructor; 8 | import lombok.Builder; 9 | import lombok.Data; 10 | import lombok.NoArgsConstructor; 11 | 12 | @Data 13 | @Builder 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | public class SchemaDTO { 17 | 18 | private MessageFormat messageFormat; 19 | private String plainTextSchema; 20 | private String topicName; 21 | private String subjectName; 22 | private int version; 23 | private SubjectType subjectType; 24 | private List versionsNo; 25 | private Compatibility compatibility; 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/schema/SchemasConfigurationDTO.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.schema; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | @Data 7 | @Builder 8 | public class SchemasConfigurationDTO { 9 | private String serverId; 10 | private boolean hasSchemaRegistry; 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/schema/SchemasDTO.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.schema; 2 | 3 | import com.consdata.kouncil.serde.MessageFormat; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | 7 | @Data 8 | @Builder 9 | public class SchemasDTO { 10 | private MessageFormat keyMessageFormat; 11 | private String keyPlainTextSchema; 12 | private MessageFormat valueMessageFormat; 13 | private String valuePlainTextSchema; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/schema/clusteraware/SchemaAwareCluster.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.schema.clusteraware; 2 | 3 | import com.consdata.kouncil.schema.registry.SchemaRegistryFacade; 4 | import com.consdata.kouncil.serde.MessageFormat; 5 | import com.consdata.kouncil.serde.formatter.schema.MessageFormatter; 6 | import lombok.Builder; 7 | import lombok.Getter; 8 | 9 | import java.util.EnumMap; 10 | 11 | @Builder 12 | public class SchemaAwareCluster { 13 | @Getter 14 | SchemaRegistryFacade schemaRegistryFacade; 15 | EnumMap formatters; 16 | 17 | public MessageFormatter getFormatter(MessageFormat messageFormat) { 18 | return formatters.get(messageFormat); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/schema/registry/SchemaRegistryNotConfiguredException.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.schema.registry; 2 | 3 | public class SchemaRegistryNotConfiguredException extends RuntimeException { 4 | public SchemaRegistryNotConfiguredException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/KouncilRole.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security; 2 | 3 | public enum KouncilRole { 4 | 5 | ROLE_KOUNCIL_ADMIN, 6 | ROLE_KOUNCIL_EDITOR, 7 | ROLE_KOUNCIL_VIEWER 8 | 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/User.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Getter 8 | @NoArgsConstructor 9 | @AllArgsConstructor 10 | public class User { 11 | 12 | private String username; 13 | private String password; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/function/SystemFunctionsRepository.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security.function; 2 | 3 | import com.consdata.kouncil.model.admin.SystemFunction; 4 | import org.springframework.data.repository.CrudRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface SystemFunctionsRepository extends CrudRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/function/dto/SystemFunctionDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security.function.dto; 2 | 3 | import com.consdata.kouncil.model.admin.FunctionGroup; 4 | import com.consdata.kouncil.model.admin.SystemFunctionName; 5 | import lombok.Getter; 6 | import lombok.NoArgsConstructor; 7 | import lombok.Setter; 8 | 9 | @Getter 10 | @Setter 11 | @NoArgsConstructor 12 | public class SystemFunctionDto { 13 | 14 | private Long id; 15 | private SystemFunctionName name; 16 | private String label; 17 | private FunctionGroup functionGroup; 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/group/UserGroupRepository.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security.group; 2 | 3 | import com.consdata.kouncil.model.admin.UserGroup; 4 | import java.util.List; 5 | import java.util.Set; 6 | import org.springframework.data.repository.CrudRepository; 7 | import org.springframework.stereotype.Repository; 8 | 9 | @Repository 10 | public interface UserGroupRepository extends CrudRepository { 11 | 12 | List findAllByCodeIn(Set userGroupCodes); 13 | 14 | UserGroup findByCode(String code); 15 | 16 | UserGroup findByCodeAndIdIsNot(String code, Long id); 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/security/group/dto/UserGroupDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.security.group.dto; 2 | 3 | import com.consdata.kouncil.security.function.dto.SystemFunctionDto; 4 | import java.util.Set; 5 | import lombok.Getter; 6 | import lombok.NoArgsConstructor; 7 | import lombok.Setter; 8 | 9 | @Getter 10 | @Setter 11 | @NoArgsConstructor 12 | public class UserGroupDto { 13 | 14 | private Long id; 15 | private String code; 16 | private String name; 17 | private Set functions; 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/Compatibility.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | public enum Compatibility { 4 | 5 | BACKWARD, 6 | BACKWARD_TRANSITIVE, 7 | FORWARD, 8 | FORWARD_TRANSITIVE, 9 | FULL, 10 | FULL_TRANSITIVE, 11 | NONE 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/KouncilSchemaMetadata.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | import lombok.Builder; 4 | import lombok.Value; 5 | 6 | @Value 7 | @Builder 8 | public class KouncilSchemaMetadata { 9 | String schemaTopic; 10 | Integer schemaId; 11 | boolean isKey; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/MessageFormat.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | public enum MessageFormat { 4 | JSON, 5 | PROTOBUF, 6 | AVRO, 7 | STRING 8 | } 9 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/StringMessageSerde.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | import com.consdata.kouncil.serde.formatter.StringMessageFormatter; 4 | import org.apache.kafka.common.utils.Bytes; 5 | import org.springframework.stereotype.Service; 6 | 7 | @Service 8 | public class StringMessageSerde { 9 | private final StringMessageFormatter stringMessageFormatter; 10 | public StringMessageSerde() { 11 | this.stringMessageFormatter = new StringMessageFormatter(); 12 | } 13 | 14 | public String deserialize(Bytes value) { 15 | return stringMessageFormatter.deserialize(value.get()); 16 | } 17 | 18 | public Bytes serialize(String value) { 19 | return stringMessageFormatter.serialize(value); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/SubjectType.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | public enum SubjectType { 4 | 5 | KEY, 6 | VALUE 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/deserialization/DeserializationData.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.deserialization; 2 | 3 | import lombok.Builder; 4 | import lombok.Value; 5 | 6 | @Value 7 | @Builder 8 | public class DeserializationData { 9 | String topicName; 10 | byte[] value; 11 | boolean useLogicalTypesConversions; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/deserialization/DeserializedData.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.deserialization; 2 | 3 | import com.consdata.kouncil.serde.MessageFormat; 4 | import lombok.Builder; 5 | import lombok.Value; 6 | 7 | @Value 8 | @Builder 9 | public class DeserializedData { 10 | String deserialized; 11 | String originalValue; 12 | MessageFormat messageFormat; 13 | Integer schemaId; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/deserialization/DeserializedMessage.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.deserialization; 2 | 3 | import lombok.Builder; 4 | import lombok.Value; 5 | 6 | @Value 7 | @Builder 8 | public class DeserializedMessage { 9 | DeserializedData keyData; 10 | DeserializedData valueData; 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/formatter/StringMessageFormatter.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.formatter; 2 | 3 | import org.apache.kafka.common.utils.Bytes; 4 | 5 | import java.nio.charset.StandardCharsets; 6 | 7 | public class StringMessageFormatter { 8 | public String deserialize(byte[] value) { 9 | return new String(value, StandardCharsets.UTF_8); 10 | } 11 | 12 | public Bytes serialize(String value) { 13 | return Bytes.wrap(value.getBytes()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/formatter/schema/MessageFormatter.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.formatter.schema; 2 | 3 | import com.consdata.kouncil.serde.MessageFormat; 4 | import com.consdata.kouncil.serde.deserialization.DeserializationData; 5 | import com.consdata.kouncil.serde.serialization.SerializationData; 6 | import org.apache.kafka.common.utils.Bytes; 7 | 8 | public interface MessageFormatter { 9 | String deserialize(DeserializationData deserializationData); 10 | Bytes serialize(SerializationData serializationData); 11 | MessageFormat getFormat(); 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/serde/serialization/SerializationData.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde.serialization; 2 | 3 | import io.confluent.kafka.schemaregistry.ParsedSchema; 4 | import lombok.Builder; 5 | import lombok.Value; 6 | 7 | @Value 8 | @Builder 9 | public class SerializationData { 10 | String topicName; 11 | String payload; 12 | ParsedSchema schema; 13 | boolean isKey; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/survey/SurveyController.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.survey; 2 | 3 | import com.consdata.kouncil.model.admin.SystemFunctionNameConstants; 4 | import jakarta.annotation.security.RolesAllowed; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | @Slf4j 11 | @RestController 12 | public class SurveyController { 13 | 14 | @Value("${kouncil.survey.base-path:}") 15 | private String surveyBasePath; 16 | 17 | @RolesAllowed(SystemFunctionNameConstants.LOGIN) 18 | @GetMapping("/api/survey/config") 19 | public String getSurveyBasePath() { 20 | return surveyBasePath; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicData.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | @Data 7 | @Builder 8 | public class TopicData { 9 | private String name; 10 | private int partitions; 11 | private short replicationFactor; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicMessage.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import com.consdata.kouncil.serde.MessageFormat; 4 | import java.util.List; 5 | import lombok.Builder; 6 | import lombok.Data; 7 | 8 | @Data 9 | @Builder 10 | public class TopicMessage { 11 | 12 | private List headers; 13 | private String key; 14 | private MessageFormat keyFormat; 15 | private String value; 16 | private String originalValue; 17 | private MessageFormat valueFormat; 18 | private long timestamp; 19 | private int partition; 20 | private long offset; 21 | private String topic; 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicMessageHeader.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | @Data 7 | @Builder 8 | public class TopicMessageHeader { 9 | private String key; 10 | private String value; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicMessagesDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | import lombok.Singular; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | @Data 11 | @Builder 12 | public class TopicMessagesDto { 13 | 14 | @Singular 15 | private List messages; 16 | 17 | private Map partitionOffsets; 18 | 19 | private Map partitionEndOffsets; 20 | 21 | private Long totalResults; 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicMetadata.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | @Data 7 | @Builder 8 | public class TopicMetadata implements Comparable { 9 | private String name; 10 | private int partitions; 11 | 12 | @Override 13 | public int compareTo(TopicMetadata o) { 14 | return name.compareTo(o.getName()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicResendEventsModel.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | import lombok.ToString; 6 | 7 | @Data 8 | @Builder 9 | @ToString 10 | public class TopicResendEventsModel { 11 | private String sourceTopicName; 12 | private Integer sourceTopicPartition; 13 | private Long offsetBeginning; 14 | private Long offsetEnd; 15 | private String destinationTopicName; 16 | private Integer destinationTopicPartition; 17 | private boolean shouldFilterOutHeaders; 18 | 19 | public Integer getDestinationTopicPartition() { 20 | return destinationTopicPartition < 0 ? null : destinationTopicPartition; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/TopicsDto.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | @Data 9 | @Builder 10 | public class TopicsDto { 11 | private List topics; 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/topic/util/FieldType.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.topic.util; 2 | 3 | public enum FieldType { 4 | 5 | STRING, 6 | DATE 7 | 8 | } 9 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/track/TrackStrategy.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.track; 2 | 3 | import com.consdata.kouncil.topic.TopicMessage; 4 | 5 | import java.util.List; 6 | 7 | public interface TrackStrategy { 8 | 9 | int EVENTS_SANITY_LIMIT = 1000; 10 | boolean shouldStopTracking(); 11 | 12 | void processCandidates(List candidates); 13 | 14 | List processFinalResult(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/java/com/consdata/kouncil/track/WebSocketStats.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.track; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | import java.util.Map; 7 | 8 | @Data 9 | @Builder 10 | public class WebSocketStats { 11 | private String wsSession; 12 | private String taskScheduler; 13 | private String clientInbound; 14 | private String clientOutbound; 15 | private Map destinations; 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/resources/db/migration/V3__add_cluster_list_role.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM system_functions_user_groups; 2 | DELETE FROM user_group; 3 | 4 | insert into system_function(id, name, label) 5 | VALUES (nextval('SEQ_SYSTEM_FUNCTION'), 'CLUSTER_LIST', 'Cluster list'); 6 | 7 | commit; 8 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/resources/db/migration/V4__add_cluster_roles.sql: -------------------------------------------------------------------------------- 1 | DELETE 2 | FROM system_functions_user_groups; 3 | DELETE 4 | FROM user_group; 5 | 6 | insert into system_function(id, name, label) 7 | VALUES (nextval('SEQ_SYSTEM_FUNCTION'), 'CLUSTER_CREATE', 'Create new cluster'); 8 | insert into system_function(id, name, label) 9 | VALUES (nextval('SEQ_SYSTEM_FUNCTION'), 'CLUSTER_UPDATE', 'Update cluster'); 10 | insert into system_function(id, name, label) 11 | VALUES (nextval('SEQ_SYSTEM_FUNCTION'), 'CLUSTER_DETAILS', 'View cluster details'); 12 | 13 | commit; 14 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/resources/db/migration/V5__add_cluster_delete_role.sql: -------------------------------------------------------------------------------- 1 | DELETE 2 | FROM system_functions_user_groups; 3 | DELETE 4 | FROM user_group; 5 | 6 | insert into system_function(id, name, label) 7 | VALUES (nextval('SEQ_SYSTEM_FUNCTION'), 'CLUSTER_DELETE', 'Delete cluster'); 8 | 9 | commit; 10 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/resources/db/migration/V7__topic_details.sql: -------------------------------------------------------------------------------- 1 | DELETE FROM system_functions_user_groups where function_id = (select id from system_function where name = 'TOPIC_DETAILS'); 2 | DELETE FROM system_function where name='TOPIC_DETAILS'; 3 | 4 | commit; 5 | -------------------------------------------------------------------------------- /kouncil-backend/src/main/resources/rewrite.config: -------------------------------------------------------------------------------- 1 | RewriteCond %{REQUEST_URI} !^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml|svg|eot|woff|woff2|ttf|map)$ 2 | RewriteCond %{REQUEST_URI} !(^.*\/(api|oauth2).*$) 3 | RewriteCond %{REQUEST_URI} !(^.*\/(ws).*$) 4 | RewriteRule ^(.*)$ /index.html [L] 5 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/java/com/consdata/kouncil/KouncilApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | import static org.assertj.core.api.AssertionsForClassTypes.assertThat; 8 | 9 | @SpringBootTest 10 | class KouncilApplicationTests { 11 | 12 | @Autowired 13 | private InfoController controller; 14 | 15 | @Test 16 | void contextLoads() { 17 | assertThat(controller).isNotNull(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/java/com/consdata/kouncil/serde/StringMessageSerdeTest.java: -------------------------------------------------------------------------------- 1 | package com.consdata.kouncil.serde; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import java.nio.charset.StandardCharsets; 6 | import org.apache.kafka.common.utils.Bytes; 7 | import org.junit.jupiter.api.Test; 8 | 9 | class StringMessageSerdeTest { 10 | 11 | private final StringMessageSerde stringMessageSerde = new StringMessageSerde(); 12 | 13 | @Test 14 | void should_deserialize_string() { 15 | // given 16 | Bytes payload = new Bytes("lorem".getBytes(StandardCharsets.UTF_8)); 17 | // when 18 | String deserializedPayload = stringMessageSerde.deserialize(payload); 19 | 20 | // then 21 | assertThat(deserializedPayload).isEqualTo("lorem"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/SimpleMessage.avro: -------------------------------------------------------------------------------- 1 | { 2 | "type": "record", 3 | "name": "SimpleMessageAvro", 4 | "fields": [ 5 | { 6 | "name": "content", 7 | "type": "string" 8 | }, 9 | { 10 | "name": "someNumber", 11 | "type": "int" 12 | }, 13 | { 14 | "name": "receivedDate", 15 | "type": "string" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/SimpleMessage.json: -------------------------------------------------------------------------------- 1 | {"content":"Lorem consectetur","someNumber":559933,"receivedDate":"2024-01-01"} 2 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/SimpleMessage.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package com.example.simplemessage; 4 | option java_outer_classname = "SimpleMessageProtos"; 5 | 6 | message SimpleMessage { 7 | string content = 1; 8 | int32 some_number = 2; 9 | string received_date = 3; 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/SimpleMessage.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "definitions": { 4 | "content": { 5 | "type": "string" 6 | }, 7 | "someNumber": { 8 | "type" : "integer" 9 | }, 10 | "receivedDate": { 11 | "type" : "string" 12 | } 13 | }, 14 | "required": [ 15 | "content", 16 | "someNumber", 17 | "receivedDate" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/SimpleMessageAvro.json: -------------------------------------------------------------------------------- 1 | {"content": "Lorem consectetur", "someNumber": 559933, "receivedDate": "2024-01-01"} 2 | -------------------------------------------------------------------------------- /kouncil-backend/src/test/resources/application.yaml: -------------------------------------------------------------------------------- 1 | bootstrapServers: "localhost:59092" 2 | spring: 3 | kafka: 4 | consumer: 5 | auto-offset-reset: earliest 6 | group-id: test-kouncil-group-id 7 | test: 8 | topic: embedded-test-topic 9 | kouncil: 10 | topics: 11 | resend-headers-to-keep: requestId, version 12 | auth: 13 | active-provider: inmemory 14 | -------------------------------------------------------------------------------- /kouncil-frontend/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /kouncil-frontend/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /kouncil-frontend/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "kouncil-demo" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | /node_modules 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.angular/cache 30 | /.sass-cache 31 | /connect.lock 32 | /coverage 33 | /libpeerconnection.log 34 | npm-debug.log 35 | yarn-error.log 36 | testem.log 37 | /typings 38 | 39 | # e2e 40 | /e2e/*.js 41 | /e2e/*.map 42 | 43 | # System Files 44 | .DS_Store 45 | Thumbs.db 46 | 47 | .angular 48 | .nx 49 | -------------------------------------------------------------------------------- /kouncil-frontend/.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | 3 | /dist 4 | /coverage 5 | 6 | /.nx/cache -------------------------------------------------------------------------------- /kouncil-frontend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/.gitkeep -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/access-denied/access-denied.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | .lock-icon { 4 | font-size: 40px; 5 | width: 45px; 6 | height: 45px; 7 | } 8 | 9 | .access-denied-main { 10 | display: flex; 11 | flex-direction: column; 12 | place-items: center; 13 | width: 400px; 14 | top: 100px; 15 | position: relative; 16 | margin: 0 auto; 17 | row-gap: 15px; 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/access-denied/access-denied.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectionStrategy, Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-access-denied', 5 | template: ` 6 |
7 | lock 8 | Access denied. 9 | You currently do not have access to this page. 10 |
11 | `, 12 | changeDetection: ChangeDetectionStrategy.OnPush, 13 | styleUrls: ['./access-denied.component.scss'] 14 | }) 15 | export class AccessDeniedComponent { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/app.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/app.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {MonacoEditorService} from '@app/common-components'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | template: ` 7 | 8 | `, 9 | styleUrls: ['./app.component.scss'], 10 | }) 11 | export class AppComponent { 12 | 13 | constructor(private monacoEditorService: MonacoEditorService) { 14 | monacoEditorService.load(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/breadcrumb/breadcrumb.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-breadcrumb', 5 | template: ` 6 |
7 |
{{parentName}}
8 |
9 | arrow_forward_ios 10 |
11 |
{{name}}
12 |
13 | `, 14 | changeDetection: ChangeDetectionStrategy.OnPush, 15 | styleUrls: ['./breadcrumb.component.scss'] 16 | }) 17 | export class BreadcrumbComponent { 18 | 19 | @Input() parentLink?: string; 20 | @Input() parentName?: string; 21 | @Input() name?: string; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/broker/broker.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | :host { 4 | .broker-details { 5 | display: flex; 6 | flex-direction: column; 7 | padding: 32px 0 0 0; 8 | 9 | .drawer-header { 10 | padding: 0 32px; 11 | } 12 | 13 | .broker-details-table { 14 | margin-top: 16px; 15 | 16 | .config-table-detail { 17 | margin-top: 24px; 18 | overflow-y: auto; 19 | } 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/brokers/broker.demo.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { BrokerService } from './broker.service'; 3 | import { from, Observable } from 'rxjs'; 4 | import { BrokerConfig } from './broker'; 5 | import { Brokers } from './brokers'; 6 | import { demoBrokerConfig, demoBrokers } from './broker.demo.data'; 7 | 8 | @Injectable() 9 | export class BrokerDemoService implements BrokerService { 10 | getBrokerConfig$(_id: string): Observable { 11 | const brokerConfig: BrokerConfig[][] = []; 12 | brokerConfig.push(demoBrokerConfig); 13 | return from(brokerConfig); 14 | } 15 | 16 | getBrokers$(): Observable { 17 | return from([{ brokers: demoBrokers }]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/brokers/broker.ts: -------------------------------------------------------------------------------- 1 | export interface Broker { 2 | id: string; 3 | host: string; 4 | port: number; 5 | rack: string; 6 | config?: BrokerConfig[] | null; 7 | jmxStats: boolean; 8 | system?: string; 9 | availableProcessors?: number; 10 | systemLoadAverage?: number; 11 | freeMem?: number; 12 | totalMem?: number; 13 | } 14 | 15 | export interface BrokerConfig { 16 | name: string; 17 | value?: string | undefined | null; 18 | source: string; 19 | isSensitive: boolean; 20 | isReadOnly: boolean; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/brokers/brokers.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | :host { 4 | .kafka-brokers { 5 | height: 100%; 6 | overflow-y: auto; 7 | 8 | .brokers-table { 9 | margin-top: 24px; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/brokers/brokers.ts: -------------------------------------------------------------------------------- 1 | import {Broker} from './broker'; 2 | 3 | export interface Brokers { 4 | brokers: Broker[]; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/cached-cell/cached-cell-data.ts: -------------------------------------------------------------------------------- 1 | export interface CachedCellData { 2 | value: string | null; 3 | lastSeenTimestamp: string | null; 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/cached-cell/cached-cell.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../styles/palette'; 2 | 3 | :host { 4 | position: relative; 5 | 6 | .cached-value { 7 | color: $main-40; 8 | } 9 | 10 | .last-seen { 11 | position: absolute; 12 | top: 100%; 13 | left: 0; 14 | line-height: 8px; 15 | font-size: 10px; 16 | color: $main-40; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/consumer-group/consumer-group.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {HttpClient, HttpParams} from '@angular/common/http'; 3 | import {ConsumerGroupService} from './consumer-group.service'; 4 | import {Observable} from 'rxjs'; 5 | import {ConsumerGroupResponse} from '@app/common-model'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class ConsumerGroupBackendService implements ConsumerGroupService { 11 | 12 | constructor(private http: HttpClient) { 13 | } 14 | 15 | getConsumerGroup$(serverId: string, groupId: string): Observable { 16 | const params = new HttpParams().set('serverId', serverId); 17 | return this.http.get(`/api/consumer-group/${groupId}`, {params}); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/consumer-group/consumer-group.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../styles/palette'; 2 | 3 | :host { 4 | .kafka-consumer-group { 5 | overflow-y: auto; 6 | height: calc(100% - 22px); 7 | padding-top: 22px; 8 | 9 | .brokers-table { 10 | width: 100%; 11 | margin-top: 24px; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/consumer-group/consumer-group.demo.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {ConsumerGroupService} from './consumer-group.service'; 3 | import {from, Observable} from 'rxjs'; 4 | import {demoConsumerGroup} from './consumer-group.demo.data'; 5 | import {ConsumerGroupResponse} from '@app/common-model'; 6 | 7 | @Injectable() 8 | export class ConsumerGroupDemoService implements ConsumerGroupService { 9 | getConsumerGroup$( 10 | serverId: string, 11 | groupId: string 12 | ): Observable { 13 | return from([{consumerGroupOffset: demoConsumerGroup[groupId]}]); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/consumer-groups/consumer-groups.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../../styles/buttons'; 2 | 3 | :host { 4 | .datatable-cell-anchor { 5 | display: flex; 6 | align-items: center; 7 | width: 100%; 8 | height: 100%; 9 | color: inherit; 10 | text-decoration: none; 11 | } 12 | 13 | .action-button-red { 14 | @include buttons.button-red; 15 | @include buttons.table-button; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/consumers/consumer-groups/consumer-groups.demo.data.ts: -------------------------------------------------------------------------------- 1 | import {FavouritesGroup} from '@app/feat-favourites'; 2 | import {ConsumerGroup} from '@app/common-model'; 3 | 4 | export const demoConsumerGroups: ConsumerGroup[] = [ 5 | new ConsumerGroup('transaction-processing', 'Stable', FavouritesGroup.GROUP_ALL), 6 | new ConsumerGroup('transaction-history', 'Empty', FavouritesGroup.GROUP_ALL), 7 | new ConsumerGroup('transaction-history-report', 'Empty', FavouritesGroup.GROUP_ALL), 8 | new ConsumerGroup('currency-exchange-rate-aggregation', 'Stable', FavouritesGroup.GROUP_ALL), 9 | new ConsumerGroup('currency-exchange-stream', 'Stable', FavouritesGroup.GROUP_ALL)]; 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/demo/demo.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | :host { 4 | width: 100%; 5 | 6 | div { 7 | width: calc(100% - 48px); 8 | height: 42px; 9 | background-color: $blue-70; 10 | color: white; 11 | display: flex; 12 | flex-direction: row; 13 | align-items: center; 14 | padding: 0 24px; 15 | 16 | a, a:visited, a:hover { 17 | color: white; 18 | text-decoration: underline; 19 | } 20 | 21 | .mat-icon { 22 | color: white; 23 | font-size: 16px; 24 | width: 16px; 25 | height: 16px; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/demo/demo.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectionStrategy, Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-demo', 5 | template: ` 6 |
7 | This is a demo version of Kouncil. Get the full version at kouncil.io 8 | open_in_new 9 |
10 | `, 11 | changeDetection: ChangeDetectionStrategy.OnPush, 12 | styleUrls: ['./demo.component.scss'] 13 | }) 14 | export class DemoComponent { 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/login/change-password.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/login/login.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | :host { 4 | width: 100%; 5 | 6 | .first-time-login { 7 | color: $main-60; 8 | font-size: 12px; 9 | float: left; 10 | margin-bottom: 20px; 11 | display: grid; 12 | width: 275px; 13 | animation: 1s slide-in; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/login/main-login.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/login/main-login.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/login/main-login.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {Backend} from '@app/common-model'; 3 | import {environment} from '../../environments/environment'; 4 | 5 | @Component({ 6 | selector: 'app-home-login', 7 | template: ` 8 | 9 | 10 | 11 |
12 | 13 | 14 |
15 | `, 16 | styleUrls: ['./main-login.component.scss'] 17 | }) 18 | export class MainLoginComponent { 19 | 20 | public backend: Backend = environment.backend; 21 | 22 | constructor() { 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/main/main.component.scss: -------------------------------------------------------------------------------- 1 | .sidebarOpened { 2 | width: calc(100% - 240px); 3 | overflow: auto; 4 | } 5 | 6 | .sidebarClosed { 7 | width: calc(100% - 50px); 8 | overflow: auto; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/oauth/o-auth-redirect.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/oauth/o-auth-redirect.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/page-not-found/page-not-found.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | .page-not-found-icon { 4 | font-size: 40px; 5 | width: 45px; 6 | height: 45px; 7 | } 8 | 9 | .page-not-found-main { 10 | display: flex; 11 | flex-direction: column; 12 | place-items: center; 13 | width: 400px; 14 | top: 100px; 15 | position: relative; 16 | margin: 0 auto; 17 | row-gap: 15px; 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/routing/config-resolver.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { ServersService } from '@app/common-servers'; 4 | import { configProviderFactory } from '../app.module'; 5 | 6 | @Injectable({providedIn: 'root'}) 7 | export class ConfigResolver { 8 | 9 | constructor(private service: ServersService) { 10 | } 11 | 12 | resolve(): Observable | Promise | boolean { 13 | return configProviderFactory(this.service); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/rx-stomp-service-factory.ts: -------------------------------------------------------------------------------- 1 | import {RxStompService} from '@app/feat-notifications'; 2 | import {RX_STOMP_CONFIG} from './rx-stomp.config'; 3 | 4 | export function rxStompServiceFactory(): RxStompService { 5 | const rxStomp = new RxStompService(); 6 | rxStomp.configure(RX_STOMP_CONFIG); 7 | rxStomp.activate(); 8 | return rxStomp; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/rx-stomp.config.ts: -------------------------------------------------------------------------------- 1 | import {environment} from '../environments/environment'; 2 | import {RxStompConfig} from '@stomp/rx-stomp'; 3 | 4 | export const RX_STOMP_CONFIG: RxStompConfig = { 5 | brokerURL: `${environment.websocketUrl}`, 6 | heartbeatIncoming: 0, 7 | heartbeatOutgoing: 20000, 8 | reconnectDelay: 2000, 9 | debug: (msg: string): void => { 10 | console.log('RxStompConfig.debug: msg={}', msg); 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/schemas/form/create/schema-create.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/schemas/form/create/schema-create.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/schemas/form/details/schema-details.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/schemas/form/details/schema-details.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/schemas/form/details/schema-details.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ViewMode} from '@app/common-utils'; 3 | 4 | @Component({ 5 | selector: 'app-schema-details', 6 | template: ` 7 | 8 | `, 9 | styleUrls: ['./schema-details.component.scss'] 10 | }) 11 | export class SchemaDetailsComponent { 12 | 13 | ViewMode: typeof ViewMode = ViewMode; 14 | 15 | constructor() { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/schemas/form/edit/schema-edit.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/app/schemas/form/edit/schema-edit.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/sidebar/sidebar-menu-item/sidebar-menu-item.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../../styles/inputs'; 2 | @import '../../../styles/palette'; 3 | 4 | .menu-button { 5 | padding: 24px 8px 24px 16px; 6 | text-decoration: none; 7 | color: $main-60; 8 | border-radius: 0; 9 | min-width: 32px; 10 | width: 100%; 11 | font-size: 12px; 12 | display: flex; 13 | place-items: center; 14 | justify-content: left; 15 | 16 | &:focus { 17 | background: transparent; 18 | } 19 | 20 | &.active { 21 | background: $blue-10; 22 | color: $blue-70; 23 | border-right: 2px solid $blue-70; 24 | 25 | .mat-icon { 26 | color: $blue-70; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/sidebar/sidebar-state.ts: -------------------------------------------------------------------------------- 1 | export enum SidebarState { 2 | 3 | OPENED = 'opened', 4 | CLOSED = 'closed' 5 | 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/survey/model/survey-answer.ts: -------------------------------------------------------------------------------- 1 | export interface SurveyAnswer { 2 | sentId: string; 3 | result: SurveyResultValue; 4 | status: SurveyResultStatus; 5 | position: string; 6 | } 7 | 8 | export interface SurveyResultValue { 9 | questions?: SurveyQuestionResult[]; 10 | } 11 | 12 | export interface SurveyQuestionResult { 13 | questionId: number; 14 | value: string; 15 | answer: string; 16 | } 17 | 18 | export enum SurveyResultStatus { 19 | FILLED = 'FILLED', 20 | DISCARDED = 'DISCARDED', 21 | PENDING = 'PENDING' 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/topic/json-grid-data.ts: -------------------------------------------------------------------------------- 1 | import {MessageDataHeader} from '@app/message-data'; 2 | import {MessageFormat} from '@app/schema-registry'; 3 | 4 | export interface JsonGridData { 5 | value: string; 6 | originalValue: string; 7 | valueFormat: MessageFormat; 8 | valueJson: Record; 9 | partition: number | null; 10 | offset: number | null; 11 | key: string; 12 | keyFormat: MessageFormat; 13 | keyJson: Record; 14 | timestamp: number | null; 15 | headers: MessageDataHeader[]; 16 | topic: string; 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/topic/page.ts: -------------------------------------------------------------------------------- 1 | export interface Page { 2 | size: number; 3 | pageNumber: number; 4 | totalElements?: number; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/topic/topic-messages.ts: -------------------------------------------------------------------------------- 1 | import {MessageData} from '@app/message-data'; 2 | 3 | export class TopicMessages { 4 | constructor(public messages: MessageData[], 5 | public partitionOffsets: { [key: number]: number }, 6 | public partitionEndOffsets: { [key: number]: number }, 7 | public totalResults: number) { 8 | 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/topic/topic-partitions.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | 4 | .partitions { 5 | @media screen and (max-width: 1680px) { 6 | max-width: 170px; 7 | } 8 | 9 | @media screen and (max-width: 1440px) { 10 | max-width: 150px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/topic/topic.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../styles/palette'; 2 | 3 | :host { 4 | .topic { 5 | height: 100%; 6 | } 7 | 8 | .topic-toolbar-area { 9 | display: flex; 10 | } 11 | 12 | .topic-table-area { 13 | height: 100%; 14 | } 15 | 16 | .topic-pagination { 17 | width: 100%; 18 | } 19 | 20 | .topic-table { 21 | max-width: 100%; 22 | overflow: auto; 23 | height: calc(100% - 138px) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/track/track-date-format.ts: -------------------------------------------------------------------------------- 1 | export const TRACK_DATE_FORMAT = 'yyyy-MM-dd\'T\'HH:mm'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/track/track-filter/track-filter.ts: -------------------------------------------------------------------------------- 1 | export class TrackFilter { 2 | constructor(public field: string, 3 | public operator: TrackOperator, 4 | public value: string, 5 | public startDateTime: string, 6 | public stopDateTime: string, 7 | public topics: string[]) { 8 | } 9 | } 10 | 11 | /* eslint-disable @typescript-eslint/naming-convention */ 12 | export enum TrackOperator { 13 | '~', 14 | '!~', 15 | 'is', 16 | 'is not', 17 | 'regex' 18 | } 19 | 20 | /* eslint-enable */ 21 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/track/track-result/track-result.component.scss: -------------------------------------------------------------------------------- 1 | .track-table { 2 | margin-top: 40px; 3 | max-width: 100%; 4 | overflow: auto; 5 | height: calc(100% - 116px) 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/app/track/track.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-track', 5 | template: ` 6 | 7 | 8 | ` 9 | }) 10 | export class TrackComponent { 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/.gitkeep -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/consdata-logo-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/consdata-logo-color.png -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/consdata-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/consdata-logo.png -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/kouncil-favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/kouncil-favicon.png -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/kouncil-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/kouncil-logo.png -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/assets/okta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/assets/okta.png -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/environments/environment.demo.ts: -------------------------------------------------------------------------------- 1 | import {Backend} from '@app/common-model'; 2 | 3 | const webSocketProtocol: string = 'https:' === window.location.protocol ? 'wss://' : 'ws://'; 4 | export const environment: { production: boolean; websocketUrl: string; backend: Backend, baseUrl: string } = { 5 | production: false, 6 | backend: Backend.DEMO, 7 | websocketUrl: `${webSocketProtocol}${window.location.host}/ws`, 8 | baseUrl: `${window.location.protocol}//${window.location.host}` 9 | }; 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | import {Backend} from '@app/common-model'; 2 | 3 | const webSocketProtocol: string = 'https:' === window.location.protocol ? 'wss://' : 'ws://'; 4 | export const environment: { production: boolean; websocketUrl: string; backend: Backend, baseUrl: string } = { 5 | production: true, 6 | backend: Backend.SERVER, 7 | websocketUrl: `${webSocketProtocol}${window.location.host}/ws`, 8 | baseUrl: `${window.location.protocol}//${window.location.host}` 9 | }; 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | import {Backend} from '@app/common-model'; 2 | 3 | const webSocketProtocol: string = 'https:' === window.location.protocol ? 'wss://' : 'ws://'; 4 | export const environment: { production: boolean; websocketUrl: string; backend: Backend, baseUrl: string } = { 5 | production: false, 6 | backend: Backend.SERVER, 7 | websocketUrl: `${webSocketProtocol}${window.location.hostname}:8080/ws`, 8 | baseUrl: `${window.location.protocol}//${window.location.hostname}:8080` 9 | }; 10 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/apps/kouncil/src/favicon.ico -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Kouncil 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/styles/_inputs.scss: -------------------------------------------------------------------------------- 1 | @import 'palette'; 2 | 3 | @mixin input { 4 | background: $main-0; 5 | border: 1px solid $main-20; 6 | border-radius: $default-border-radius; 7 | font-size: 14px; 8 | line-height: $default-line-height; 9 | padding: 8px 8px 8px 40px; 10 | } 11 | 12 | @mixin focus-visible { 13 | outline: none; 14 | box-shadow: 0 0 3px 1px $blue-60; 15 | transition: all $default-transition-time; 16 | } 17 | 18 | @mixin hover { 19 | border: 1px solid $main-40; 20 | transition: all $default-transition-time; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/styles/_spaces.scss: -------------------------------------------------------------------------------- 1 | $space-0: 0; 2 | $space-1: 2px; 3 | $space-2: 4px; 4 | $space-3: 8px; 5 | $space-4: 12px; 6 | $space-5: 16px; 7 | $space-6: 24px; 8 | $space-7: 32px; 9 | $space-8: 40px; 10 | $space-9: 48px; 11 | $space-10: 56px; 12 | $space-11: 64px; 13 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "types": [], 6 | "target": "ES2022", 7 | "useDefineForClassFields": false 8 | }, 9 | "files": ["src/main.ts", "src/polyfills.ts"], 10 | "include": ["src/**/*.d.ts"], 11 | "exclude": ["**/*.test.ts", "**/*.spec.ts", "jest.config.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ], 16 | "compilerOptions": { 17 | "forceConsistentCasingInFileNames": true, 18 | "strict": true, 19 | "noImplicitOverride": true, 20 | "noPropertyAccessFromIndexSignature": true, 21 | "noImplicitReturns": true, 22 | "noFallthroughCasesInSwitch": true 23 | }, 24 | "angularCompilerOptions": { 25 | "strictInjectionParameters": true, 26 | "strictInputAccessModifiers": true, 27 | "strictTemplates": true 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kouncil-frontend/apps/kouncil/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "dist", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/jest.config.ts: -------------------------------------------------------------------------------- 1 | const { getJestProjectsAsync } = require('@nx/jest'); 2 | 3 | export default async () => ({ 4 | projects: await getJestProjectsAsync(), 5 | }); 6 | -------------------------------------------------------------------------------- /kouncil-frontend/jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset'); 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/libs/.gitkeep -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common-auth', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/common-auth', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-auth", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-auth/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-auth"], 11 | "options": { 12 | "jestConfig": "libs/common-auth/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/src/index.ts: -------------------------------------------------------------------------------- 1 | export {SystemFunctionName} from './lib/auth/system-function-name'; 2 | export {AuthService} from './lib/auth/auth.service'; 3 | export {AuthBackendService} from './lib/auth/auth.backend.service'; 4 | export {AuthDemoService} from './lib/auth/auth.demo.service'; 5 | export {CommonAuthModule} from './lib/common-auth.module'; 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/src/lib/common-auth.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | @NgModule({ 5 | imports: [CommonModule], 6 | }) 7 | export class CommonAuthModule {} 8 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-auth/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-components", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-components/src", 6 | "prefix": "kouncil", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-components"], 11 | "options": { 12 | "jestConfig": "libs/common-components/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/abstract-table.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, ViewChild} from '@angular/core'; 2 | import {MatSort} from '@angular/material/sort'; 3 | import {CdkDragDrop} from '@angular/cdk/drag-drop'; 4 | import {TableComponent} from './table/table.component'; 5 | 6 | @Component({ 7 | template: '' 8 | }) 9 | export abstract class AbstractTableComponent { 10 | 11 | @ViewChild(MatSort) sort: MatSort; 12 | @ViewChild(TableComponent, {static: false}) table: TableComponent; 13 | 14 | @ViewChild(MatSort, {static: false}) set content(sort: MatSort) { 15 | if (this.table) { 16 | this.sort = sort; 17 | } 18 | } 19 | 20 | drop($event: CdkDragDrop): void { 21 | this.table.drop($event); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/autocomplete/autocomplete.component.scss: -------------------------------------------------------------------------------- 1 | .no-padding { 2 | padding: 0 !important; 3 | } 4 | 5 | .autocomplete-field { 6 | @media screen and (max-width: 1500px) { 7 | width: 180px; 8 | } 9 | } 10 | 11 | .autocomplete-input-container { 12 | display: flex; 13 | position: absolute; 14 | top: 1px; 15 | margin-left: -10px 16 | } 17 | 18 | .autocomplete-input { 19 | text-overflow: ellipsis; 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/editor/editor.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | 3 | .editor-container { 4 | border: 1px solid $main-20; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/editor/schema.ts: -------------------------------------------------------------------------------- 1 | export interface Schema { 2 | 3 | name: string; 4 | 5 | schema: object; 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/number-field/number-field.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | @import '../../../../../apps/kouncil/src/styles/spaces'; 3 | 4 | :host { 5 | display: block; 6 | padding-top: $space-3; 7 | 8 | .label { 9 | font-size: 14px; 10 | font-weight: 500; 11 | margin-bottom: $space-3; 12 | color: $main-60; 13 | } 14 | 15 | .requiredField { 16 | color: $red-50; 17 | } 18 | 19 | .full-width { 20 | width: 100%; 21 | } 22 | 23 | .error { 24 | font-size: 12px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/password-field/password-field.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | @import '../../../../../apps/kouncil/src/styles/spaces'; 3 | 4 | :host { 5 | display: block; 6 | padding-top: $space-3; 7 | 8 | .label { 9 | font-size: 14px; 10 | font-weight: 500; 11 | margin-bottom: $space-3; 12 | color: $main-60; 13 | } 14 | 15 | .requiredField { 16 | color: $red-50; 17 | } 18 | 19 | .full-width { 20 | width: 100%; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/radio-field/radio-field.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | @import '../../../../../apps/kouncil/src/styles/spaces'; 3 | 4 | :host { 5 | display: block; 6 | padding-top: $space-3; 7 | 8 | .label { 9 | font-size: 14px; 10 | font-weight: 500; 11 | margin-bottom: $space-3; 12 | color: $main-60; 13 | } 14 | 15 | .requiredField { 16 | color: $red-50; 17 | } 18 | 19 | .radio-group { 20 | display: inline-flex; 21 | flex-direction: row; 22 | width: 100%; 23 | gap: $space-5; 24 | } 25 | 26 | .full-width { 27 | width: 100%; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/select-field/select-field.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | @import '../../../../../apps/kouncil/src/styles/spaces'; 3 | 4 | :host { 5 | display: block; 6 | padding-top: $space-3; 7 | 8 | .label { 9 | font-size: 14px; 10 | font-weight: 500; 11 | margin-bottom: $space-3; 12 | color: $main-60; 13 | } 14 | 15 | .requiredField { 16 | color: $red-50; 17 | } 18 | 19 | .full-width { 20 | width: 100%; 21 | } 22 | 23 | .clear-btn { 24 | z-index: 100; 25 | height: 40px; 26 | width: 40px; 27 | padding: 8px 0; 28 | 29 | .clear-icon { 30 | color: rgba(0, 0, 0, 0.54); 31 | font-size: 25px !important; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/selectable-item.ts: -------------------------------------------------------------------------------- 1 | export class SelectableItem { 2 | 3 | label: string; 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | value: any; 6 | selected: boolean; 7 | 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types 9 | constructor(label: string, value: any, selected: boolean) { 10 | this.label = label; 11 | this.value = value; 12 | this.selected = selected; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/table-column/table-column.component.scss: -------------------------------------------------------------------------------- 1 | .cell{ 2 | text-overflow: ellipsis; 3 | max-width: 300px; 4 | white-space: nowrap; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/table-column/table-column.ts: -------------------------------------------------------------------------------- 1 | export interface TableColumn { 2 | 3 | name: string; 4 | prop: string; 5 | sticky: boolean; 6 | resizeable: boolean; 7 | sortable: boolean; 8 | draggable: boolean; 9 | width?: number; 10 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 11 | valueFormatter?: (value: any) => string; 12 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 13 | columnClass?: (value: any) => string; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/table/table-group.ts: -------------------------------------------------------------------------------- 1 | export class TableGroup { 2 | 3 | level: number = 0; 4 | expanded: boolean = true; 5 | group: string; 6 | parent: TableGroup; 7 | 8 | get visible(): boolean { 9 | return !this.parent || (this.parent.visible && this.parent.expanded); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/table/table.component.scss: -------------------------------------------------------------------------------- 1 | .cell{ 2 | text-overflow: ellipsis; 3 | max-width: 300px; 4 | white-space: nowrap; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/lib/text-field/text-field.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | @import '../../../../../apps/kouncil/src/styles/spaces'; 3 | 4 | :host { 5 | display: block; 6 | padding-top: $space-3; 7 | 8 | .label { 9 | font-size: 14px; 10 | font-weight: 500; 11 | margin-bottom: $space-3; 12 | color: $main-60; 13 | } 14 | 15 | .requiredField { 16 | color: $red-50; 17 | } 18 | 19 | .full-width { 20 | width: 100%; 21 | } 22 | 23 | .error { 24 | font-size: 12px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "angularCompilerOptions": { 22 | "strictInjectionParameters": true, 23 | "strictInputAccessModifiers": true, 24 | "strictTemplates": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "**/*.test.ts", 14 | "jest.config.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-components/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common-login', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/common-login', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-login", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-login/src", 6 | "prefix": "kouncil", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-login"], 11 | "options": { 12 | "jestConfig": "libs/common-login/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/index.ts: -------------------------------------------------------------------------------- 1 | export {CommonLoginModule} from './lib/common-login.module'; 2 | export {CommonLoginComponent} from './lib/login/common-login.component'; 3 | export {CommonChangePasswordComponent} from './lib/change-password/common-change-password.component'; 4 | export {CommonLoginIconComponent} from './lib/login-icon/common-login-icon.component'; 5 | export {CommonLoginSsoComponent} from './lib/login-sso/common-login-sso.component'; 6 | export {User} from './lib/login/user'; 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/change-password/common-change-password.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../../apps/kouncil/src/styles/buttons'; 2 | @import '../../../../../apps/kouncil/src/styles/palette'; 3 | @import '../common-login'; 4 | 5 | .main-login { 6 | margin: 0 auto; 7 | } 8 | 9 | .skip-change { 10 | width: 100%; 11 | text-align: right; 12 | margin-top: 20px; 13 | font-size: 12px; 14 | } 15 | 16 | .skip-change:hover { 17 | color: $blue-60; 18 | text-decoration: underline; 19 | cursor: pointer; 20 | } 21 | 22 | .error { 23 | float: left; 24 | width: 100%; 25 | font-size: 12px; 26 | margin-bottom: 20px; 27 | } 28 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/common-login.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../apps/kouncil/src/styles/buttons'; 2 | @import '../../../../apps/kouncil/src/styles/palette'; 3 | 4 | .main-login { 5 | display: flex; 6 | place-items: center; 7 | height: 400px; 8 | width: 400px; 9 | background: $main-0; 10 | top: 100px; 11 | position: relative; 12 | border-radius: 10px; 13 | border: 1px solid $main-20; 14 | } 15 | 16 | .login-form { 17 | place-items: center; 18 | display: grid; 19 | margin: 0 auto; 20 | width: 275px; 21 | } 22 | 23 | .action-button-white { 24 | @include buttons.button-white; 25 | } 26 | 27 | .login-info { 28 | color: $main-60; 29 | margin-bottom: 20px; 30 | } 31 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/login-icon/common-login-icon.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | 3 | .icon-login-container { 4 | display: flex; 5 | place-items: center; 6 | height: 100px; 7 | width: 100px; 8 | background: $blue-20; 9 | position: absolute; 10 | border-radius: 50%; 11 | left: calc(50% - 50px); 12 | z-index: 1; 13 | } 14 | 15 | .icon-login-container-desktop { 16 | top: 130px; 17 | } 18 | 19 | .icon-login-container-demo { 20 | top: 172px; 21 | } 22 | 23 | .icon-login { 24 | width: 75px; 25 | height: 75px; 26 | font-size: 75px; 27 | margin: 0 auto; 28 | color: $blue-50; 29 | } 30 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/login-icon/common-login-icon.component.ts: -------------------------------------------------------------------------------- 1 | import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-common-login-icon', 5 | template: ` 6 | 9 | `, 10 | changeDetection: ChangeDetectionStrategy.OnPush, 11 | styleUrls: ['./common-login-icon.component.scss'] 12 | }) 13 | export class CommonLoginIconComponent { 14 | 15 | @Input() iconContainerClass: string; 16 | 17 | constructor() { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/login/common-login.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../../apps/kouncil/src/styles/buttons'; 2 | @import '../../../../../apps/kouncil/src/styles/palette'; 3 | @import '../common-login'; 4 | 5 | .main-login { 6 | margin: 20px auto 0; 7 | } 8 | 9 | 10 | @keyframes slide-in { 11 | from { 12 | opacity: 0; 13 | max-height: 0; 14 | } 15 | to { 16 | opacity: 1; 17 | max-height: 120px; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/login/sso-provider.ts: -------------------------------------------------------------------------------- 1 | export interface SSOProvider { 2 | 3 | name: string; 4 | icon: string; 5 | title: string; 6 | iconWidth: number; 7 | iconHeight: number; 8 | } 9 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/lib/login/user.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | username: string; 3 | password: string; 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "angularCompilerOptions": { 22 | "strictInjectionParameters": true, 23 | "strictInputAccessModifiers": true, 24 | "strictTemplates": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "**/*.test.ts", 14 | "jest.config.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-login/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common-model', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/common-model', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-model", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-model/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-model"], 11 | "options": { 12 | "jestConfig": "libs/common-model/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/index.ts: -------------------------------------------------------------------------------- 1 | export {Topics} from './lib/model/topics/topics'; 2 | export {ConsumerGroupsResponse} from './lib/model/consumer-group/consumer-groups'; 3 | export {ConsumerGroup} from './lib/model/consumer-group/consumer-groups'; 4 | export {ConsumerGroupOffset, ConsumerGroupResponse} from './lib/model/consumer-group/consumer-group'; 5 | export {TopicMetadata} from './lib/model/topics/topics'; 6 | export {Backend} from './lib/model/app.backend'; 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/lib/common-model.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | @NgModule({ 5 | imports: [CommonModule], 6 | }) 7 | export class CommonModelModule {} 8 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/lib/model/app.backend.ts: -------------------------------------------------------------------------------- 1 | export enum Backend { 2 | SERVER = 'SERVER', 3 | DEMO = 'DEMO' 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/lib/model/consumer-group/consumer-group.ts: -------------------------------------------------------------------------------- 1 | export interface ConsumerGroupOffset { 2 | 3 | clientId: string; 4 | consumerId: string; 5 | host: string; 6 | partition: number; 7 | topic: string; 8 | offset: number; 9 | endOffset: number; 10 | lag: number; 11 | pace: number; 12 | } 13 | 14 | 15 | export interface ConsumerGroupResponse { 16 | consumerGroupOffset: ConsumerGroupOffset[]; 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/lib/model/consumer-group/consumer-groups.ts: -------------------------------------------------------------------------------- 1 | import {Favouritable, FavouritesGroup} from '@app/feat-favourites'; 2 | 3 | export class ConsumerGroup implements Favouritable { 4 | constructor(public groupId: string, public status: string, public group: (FavouritesGroup | null)) { 5 | } 6 | 7 | public caption(): string { 8 | return this.groupId; 9 | } 10 | 11 | } 12 | 13 | export class ConsumerGroupsResponse { 14 | consumerGroups: ConsumerGroup[]; 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/lib/model/topics/topics.ts: -------------------------------------------------------------------------------- 1 | import {Favouritable, FavouritesGroup} from '@app/feat-favourites'; 2 | 3 | export class TopicMetadata implements Favouritable { 4 | constructor(public partitions: number, public group: (FavouritesGroup | null), public name: string) { 5 | } 6 | 7 | public caption(): string { 8 | return this.name; 9 | } 10 | } 11 | 12 | export interface Topics { 13 | topics: TopicMetadata[]; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-model/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common-servers', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/common-servers', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-servers", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-servers/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-servers"], 11 | "options": { 12 | "jestConfig": "libs/common-servers/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/index.ts: -------------------------------------------------------------------------------- 1 | export {Server} from './lib/servers/server'; 2 | export {ServersBackendService} from './lib/servers/servers.backend.service'; 3 | export {ServersDemoService} from './lib/servers/servers.demo.service'; 4 | export {ServersService} from './lib/servers/servers.service'; 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/lib/common-servers.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | @NgModule({ 5 | imports: [CommonModule], 6 | }) 7 | export class CommonServersModule {} 8 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/lib/servers/server.ts: -------------------------------------------------------------------------------- 1 | export class Server { 2 | constructor(public serverId: string, public label: string) { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/lib/servers/servers.demo.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Server} from './server'; 3 | import {ServersService} from './servers.service'; 4 | 5 | @Injectable() 6 | export class ServersDemoService extends ServersService { 7 | 8 | constructor() { 9 | super(); 10 | } 11 | 12 | load(): Promise { 13 | this.servers = [ 14 | new Server('first_server_local_9092', 'first.server.local:9092'), 15 | new Server('second_server_local_9092', 'second.server.local:9092') 16 | ]; 17 | this.selectedServerId = 'first_server_local_9092'; 18 | this.updateServers(this.servers); 19 | return Promise.resolve(true); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/lib/servers/servers.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Server} from './server'; 3 | import {BehaviorSubject, Observable} from 'rxjs'; 4 | 5 | @Injectable() 6 | export abstract class ServersService { 7 | servers: Server[] = []; 8 | selectedServerId: string; 9 | private serversSubject$: BehaviorSubject = new BehaviorSubject([]); 10 | 11 | getSelectedServerId(): string { 12 | return this.selectedServerId; 13 | } 14 | 15 | abstract load(): Promise; 16 | 17 | get servers$(): Observable { 18 | return this.serversSubject$.asObservable(); 19 | } 20 | 21 | updateServers(servers: Server[]): void { 22 | this.serversSubject$.next(servers); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-servers/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common-utils', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/common-utils', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "common-utils", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/common-utils/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/common-utils"], 11 | "options": { 12 | "jestConfig": "libs/common-utils/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export {ArraySortService} from './lib/util/array-sort.service'; 2 | export {SearchService} from './lib/search/search.service'; 3 | export {CommonUtilsModule} from './lib/common-utils.module'; 4 | export {Crypto} from './lib/util/crypto'; 5 | export {DrawerService} from './lib/util/drawer.service'; 6 | export {HttpClientInterceptor} from './lib/util/http-client.interceptor'; 7 | export {RandomUtils} from './lib/util/random-utils'; 8 | export {ProgressBarService} from './lib/util/progress-bar.service'; 9 | export {SnackBarComponent} from './lib/util/snack-bar.component'; 10 | export {SnackBarData} from './lib/util/snack-bar-data'; 11 | export {ObjectUtils} from './lib/util/object-utils'; 12 | export {ViewMode} from './lib/util/view-mode'; 13 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/common-utils.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {ProgressBarComponent} from './util/progress-bar.component'; 4 | import {SnackBarComponent} from './util/snack-bar.component'; 5 | import {MatButtonModule} from '@angular/material/button'; 6 | 7 | @NgModule({ 8 | imports: [CommonModule, MatButtonModule], 9 | declarations: [ProgressBarComponent, SnackBarComponent], 10 | exports: [ProgressBarComponent] 11 | }) 12 | export class CommonUtilsModule { 13 | } 14 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/crypto.ts: -------------------------------------------------------------------------------- 1 | export class Crypto { 2 | public static uuidv4(): string { 3 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c: string) { 4 | // eslint-disable-next-line no-bitwise 5 | const r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); 6 | return v.toString(16); 7 | }); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/object-utils.ts: -------------------------------------------------------------------------------- 1 | export class ObjectUtils { 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types 4 | public static removeNull(value: any): string { 5 | if (value) { 6 | Object.keys(value).forEach(key => { 7 | if (value[key] && typeof value[key] === 'object') { 8 | this.removeNull(value[key]); 9 | } else if (value[key] === null) { 10 | delete value[key]; 11 | } 12 | }); 13 | } 14 | return value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/progress-bar.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ProgressBarService} from './progress-bar.service'; 3 | import {Observable} from 'rxjs'; 4 | 5 | @Component({ 6 | selector: 'app-progress-bar', 7 | template: ` 8 |
10 |
11 | ` 12 | }) 13 | export class ProgressBarComponent { 14 | 15 | loading$: Observable = this.progressBarService.loading$; 16 | 17 | constructor(private progressBarService: ProgressBarService) { 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/progress-bar.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {BehaviorSubject, Observable} from 'rxjs'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class ProgressBarService { 8 | private progressSub$: BehaviorSubject = new BehaviorSubject(false); 9 | 10 | get loading$(): Observable { 11 | return this.progressSub$.asObservable(); 12 | } 13 | 14 | setProgress(progress: boolean): void { 15 | this.progressSub$.next(progress); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/snack-bar-data.ts: -------------------------------------------------------------------------------- 1 | export class SnackBarData { 2 | 3 | message: string; 4 | iconClass: string; 5 | action: string; 6 | 7 | constructor(message: string, iconClass: string, action: string) { 8 | this.message = message; 9 | this.iconClass = iconClass; 10 | this.action = action; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/lib/util/view-mode.ts: -------------------------------------------------------------------------------- 1 | export enum ViewMode { 2 | CREATE = 'CREATE', 3 | EDIT = 'EDIT', 4 | VIEW = 'VIEW' 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/common-utils/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-clusters', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-clusters', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-clusters", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-clusters/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-clusters"], 11 | "options": { 12 | "jestConfig": "libs/feat-clusters/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-create/cluster-form-create.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-create/cluster-form-create.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-create/cluster-form-create.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ViewMode} from '@app/common-utils'; 3 | 4 | @Component({ 5 | selector: 'app-cluster-create', 6 | template: ` 7 | 8 | `, 9 | styleUrls: ['./cluster-form-create.component.scss'] 10 | }) 11 | export class ClusterFormCreateComponent { 12 | ViewMode: typeof ViewMode = ViewMode; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-edit/cluster-form-edit.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-edit/cluster-form-edit.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-edit/cluster-form-edit.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ViewMode} from '@app/common-utils'; 3 | 4 | @Component({ 5 | selector: 'app-cluster-edit', 6 | template: ` 7 | 8 | `, 9 | styleUrls: ['./cluster-form-edit.component.scss'] 10 | }) 11 | export class ClusterFormEditComponent { 12 | ViewMode: typeof ViewMode = ViewMode; 13 | } 14 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-view/cluster-form-view.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-view/cluster-form-view.component.scss -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster-form-view/cluster-form-view.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from '@angular/core'; 2 | import {ViewMode} from '@app/common-utils'; 3 | 4 | @Component({ 5 | selector: 'app-cluster-view', 6 | template: ` 7 | 8 | `, 9 | styleUrls: ['./cluster-form-view.component.scss'] 10 | }) 11 | export class ClusterFormViewComponent { 12 | ViewMode: typeof ViewMode = ViewMode; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/cluster.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {ClusterMetadata} from '../cluster.model'; 4 | 5 | @Injectable() 6 | export abstract class ClusterService { 7 | 8 | abstract getClusterByName$(clusterName: string): Observable; 9 | 10 | abstract addNewCluster$(cluster: ClusterMetadata): Observable; 11 | 12 | abstract updateCluster$(cluster: ClusterMetadata): Observable; 13 | 14 | abstract testConnection$(cluster: ClusterMetadata): Observable; 15 | 16 | abstract isClusterNameUnique$(clusterName: string): Observable; 17 | 18 | abstract deleteCluster$(id: number): Observable; 19 | } 20 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/sections/cluster-form-schema-registry/cluster-form-schema-registry.component.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../../../../apps/kouncil/src/styles/spaces"; 2 | @import "../../../../../../../apps/kouncil/src/styles/palette"; 3 | 4 | .schema-registry-section { 5 | .authentication-type { 6 | padding-bottom: $space-5; 7 | padding-right: $space-1; 8 | } 9 | 10 | 11 | 12 | .security-section { 13 | display: flex; 14 | gap: $space-5; 15 | width: 100%; 16 | 17 | .half-width { 18 | width: 50%; 19 | } 20 | } 21 | } 22 | 23 | .full-width { 24 | width: 100%; 25 | } 26 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/cluster-form/sections/cluster-form-security/cluster-form-security.component.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../../../../apps/kouncil/src/styles/spaces"; 2 | 3 | .schema-registry-header { 4 | font-size: 18px !important; 5 | padding-bottom: $space-5; 6 | font-weight: 500; 7 | } 8 | 9 | .authentication-type { 10 | padding-bottom: $space-5; 11 | padding-right: $space-1; 12 | } 13 | 14 | .security-section { 15 | display: flex; 16 | gap: $space-5; 17 | width: 100%; 18 | 19 | .half-width { 20 | width: 50%; 21 | } 22 | } 23 | 24 | .full-width { 25 | width: 100%; 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/clusters/cluster.model.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/libs/feat-clusters/src/lib/clusters/cluster.model.ts -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/clusters/clusters.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {Clusters} from '../cluster.model'; 4 | import {ClustersService} from './clusters.service'; 5 | import {HttpClient} from '@angular/common/http'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class ClustersBackendService implements ClustersService { 11 | constructor(private http: HttpClient) { 12 | } 13 | 14 | getClusters$(): Observable { 15 | return this.http.get(`/api/clusters`); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/lib/clusters/clusters.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {Clusters} from '../cluster.model'; 4 | 5 | @Injectable() 6 | export abstract class ClustersService { 7 | 8 | abstract getClusters$(): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-clusters/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-confirm', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-confirm', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-confirm", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-confirm/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-confirm"], 11 | "options": { 12 | "jestConfig": "libs/feat-confirm/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/src/index.ts: -------------------------------------------------------------------------------- 1 | export {ConfirmModel} from './lib/confirm/confirm.model'; 2 | export {ConfirmModule} from './lib/confirm.module'; 3 | export {ConfirmService} from './lib/confirm/confirm.service'; 4 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/src/lib/confirm/confirm.model.ts: -------------------------------------------------------------------------------- 1 | export interface ConfirmModel { 2 | title: string; 3 | subtitle: string; 4 | sectionLine1: string; 5 | sectionLine2?: string; 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/src/lib/confirm/confirm.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {MatDialog} from '@angular/material/dialog'; 3 | import {ConfirmComponent} from './confirm.component'; 4 | import {Observable} from 'rxjs'; 5 | import {ConfirmModel} from './confirm.model'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class ConfirmService { 11 | 12 | constructor(private dialog: MatDialog) { 13 | } 14 | 15 | public openConfirmDialog$(model: ConfirmModel): Observable { 16 | return this.dialog.open(ConfirmComponent, { 17 | width: '600px', 18 | panelClass: ['confirm', 'dialog-with-padding'], 19 | data: model 20 | }).afterClosed(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-confirm/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-favourites', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-favourites', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-favourites", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-favourites/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-favourites"], 11 | "options": { 12 | "jestConfig": "libs/feat-favourites/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/src/index.ts: -------------------------------------------------------------------------------- 1 | export {FavouritesGroup} from './lib/favourites-group'; 2 | export {Favouritable} from './lib/favouritable'; 3 | export {FavouritesService} from './lib/favourites.service'; 4 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/src/lib/favouritable.ts: -------------------------------------------------------------------------------- 1 | import {FavouritesGroup} from './favourites-group'; 2 | 3 | export interface Favouritable { 4 | group: FavouritesGroup | null; 5 | 6 | caption(): string; 7 | } 8 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/src/lib/favourites-group.ts: -------------------------------------------------------------------------------- 1 | export enum FavouritesGroup { 2 | GROUP_FAVOURITES = 'FAVOURITES', 3 | GROUP_ALL = 'ALL' 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-favourites/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-no-data', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-no-data', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-no-data", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-no-data/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-no-data"], 11 | "options": { 12 | "jestConfig": "libs/feat-no-data/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/src/index.ts: -------------------------------------------------------------------------------- 1 | export {NoDataPlaceholderComponent} from './lib/no-data-placeholder/no-data-placeholder.component'; 2 | export {FeatNoDataModule} from './lib/feat-no-data.module'; 3 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/src/lib/feat-no-data.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | import {NoDataPlaceholderComponent} from './no-data-placeholder/no-data-placeholder.component'; 4 | import {MatIconModule} from '@angular/material/icon'; 5 | 6 | @NgModule({ 7 | imports: [CommonModule, 8 | MatIconModule], 9 | declarations: [ 10 | NoDataPlaceholderComponent 11 | ], 12 | exports: [ 13 | NoDataPlaceholderComponent 14 | ] 15 | }) 16 | export class FeatNoDataModule { 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/src/lib/no-data-placeholder/no-data-placeholder.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | 3 | :host { 4 | .no-data-wrapper { 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | align-items: center; 9 | margin-top: 240px; 10 | 11 | mat-icon { 12 | padding: 20px; 13 | border: 1px solid $red-20; 14 | border-radius: $default-border-radius; 15 | background: $red-0; 16 | color: $red-60; 17 | font-size: 28px; 18 | } 19 | 20 | .no-data-label { 21 | font-weight: 500; 22 | font-size: 16px; 23 | margin-top: 32px; 24 | } 25 | 26 | .no-data-comment { 27 | font-size: 14px; 28 | color: $main-60; 29 | margin-top: 8px; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-no-data/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-notifications", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-notifications/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-notifications"], 11 | "options": { 12 | "jestConfig": "libs/feat-notifications/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/src/index.ts: -------------------------------------------------------------------------------- 1 | export {FeatNotificationsModule} from './lib/feat-notifications.module'; 2 | export {NotificationButtonComponent} from './lib/notification-button/notification-button.component'; 3 | export {NotificationComponent} from './lib/notification/notification.component'; 4 | export {RxStompService} from './lib/rx-stomp.service'; 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/src/lib/notification.model.ts: -------------------------------------------------------------------------------- 1 | export class NotificationModel { 2 | constructor(public type: NotificationType, public message: string, public action: NotificationAction) { 3 | } 4 | } 5 | 6 | export enum NotificationType { 7 | PUSH_WITH_ACTION_REQUIRED = 'PUSH_WITH_ACTION_REQUIRED', 8 | PUSH = 'PUSH' 9 | } 10 | 11 | export enum NotificationAction { 12 | LOGOUT = 'LOGOUT' 13 | } 14 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/src/lib/notification/notification.component.scss: -------------------------------------------------------------------------------- 1 | @use '../../../../../apps/kouncil/src/styles/buttons'; 2 | @import '../../../../../apps/kouncil/src/styles/palette'; 3 | @import '../../../../../apps/kouncil/src/styles/spaces'; 4 | 5 | .header { 6 | display: flex; 7 | flex-direction: row; 8 | align-items: center; 9 | margin-top: $space-3; 10 | 11 | .title { 12 | font-size: 18px; 13 | font-weight: 500; 14 | line-height: 28px; 15 | color: $main-100; 16 | } 17 | } 18 | 19 | .message{ 20 | font-size: 14px; 21 | } 22 | 23 | mat-dialog-actions { 24 | display: flex; 25 | flex-direction: row; 26 | justify-content: end; 27 | 28 | .action-button-blue { 29 | @include buttons.button-blue; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/src/lib/rx-stomp.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { RxStomp } from '@stomp/rx-stomp'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class RxStompService extends RxStomp { 8 | 9 | constructor() { 10 | super(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-notifications/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-send', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-send', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-send", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-send/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-send"], 11 | "options": { 12 | "jestConfig": "libs/feat-send/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/src/index.ts: -------------------------------------------------------------------------------- 1 | export {FeatSendModule} from './lib/feat-send.module'; 2 | export {SendBackendService} from './lib/send/send.backend.service'; 3 | export {SendService} from './lib/send/send.service'; 4 | export {SendDemoService} from './lib/send/send.demo.service'; 5 | export {SendComponent} from './lib/send/send.component'; 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/src/lib/send/send.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {SendService} from './send.service'; 3 | import {HttpClient, HttpParams} from '@angular/common/http'; 4 | import {Observable} from 'rxjs'; 5 | import {MessageData} from '@app/message-data'; 6 | 7 | @Injectable({ 8 | providedIn: 'root', 9 | }) 10 | export class SendBackendService implements SendService { 11 | constructor(private http: HttpClient) { 12 | } 13 | 14 | send$(serverId: string, count: number, messageData: MessageData): Observable> { 15 | const params = new HttpParams().set('serverId', serverId); 16 | return this.http.post>( 17 | `/api/topic/send/${messageData.topicName}/${count}`, 18 | messageData, 19 | {params} 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/src/lib/send/send.demo.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { SendService } from './send.service'; 3 | import { from, Observable } from 'rxjs'; 4 | import {MessageData} from '@app/message-data'; 5 | 6 | @Injectable() 7 | export class SendDemoService implements SendService { 8 | send$(_serverId: string, _count: number, _messageData: MessageData): Observable> { 9 | return from([{}]); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/src/lib/send/send.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {MessageData} from '@app/message-data'; 4 | 5 | @Injectable() 6 | export abstract class SendService { 7 | abstract send$(serverId: string, count: number, message: MessageData): Observable>; 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-send/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-topic-form', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-topic-form', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-topic-form", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-topic-form/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-topic-form"], 11 | "options": { 12 | "jestConfig": "libs/feat-topic-form/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/src/index.ts: -------------------------------------------------------------------------------- 1 | export {FeatTopicFormModule} from './lib/feat-topic-form.module'; 2 | export {TopicData} from './lib/topic/topic-data'; 3 | export {TopicService} from './lib/topic/topic.service'; 4 | export {TopicBackendService} from './lib/topic/topic.backend.service'; 5 | export {TopicDemoService} from './lib/topic/topic.demo.service'; 6 | export {TopicFormComponent} from './lib/topic/topic-form.component'; 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/src/lib/topic/topic-data.ts: -------------------------------------------------------------------------------- 1 | export class TopicData { 2 | name: string; 3 | partitions?: number; 4 | replicationFactor?: number; 5 | } 6 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/src/lib/topic/topic.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {TopicData} from './topic-data'; 4 | 5 | @Injectable() 6 | export abstract class TopicService { 7 | 8 | abstract createTopic$(topicData: TopicData, serverId: string): Observable; 9 | 10 | abstract updateTopic$(topic: TopicData, selectedServerId: string): Observable; 11 | 12 | abstract getTopic$(selectedServerId: string, topicName: string): Observable; 13 | 14 | abstract deleteTopic$(topicName: string, selectedServerId: string): Observable; 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topic-form/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'feat-topics', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/feat-topics', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-topics", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-topics/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-topics"], 11 | "options": { 12 | "jestConfig": "libs/feat-topics/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/index.ts: -------------------------------------------------------------------------------- 1 | export {TopicsComponent} from './lib/topics/list/topics.component'; 2 | export {demoTopics} from './lib/topics/list/topics.demo.data'; 3 | export {FeatTopicsModule} from './lib/feat-topics.module'; 4 | export {TopicsBackendService} from './lib/topics/list/topics.backend.service'; 5 | export {TopicsDemoService} from './lib/topics/list/topics.demo.service'; 6 | export {TopicsService} from './lib/topics/topics.service'; 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/lib/topics/list/topics.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {HttpClient, HttpParams} from '@angular/common/http'; 4 | import {Topics} from '@app/common-model'; 5 | import {TopicsService} from '../topics.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class TopicsBackendService implements TopicsService { 11 | 12 | constructor(private http: HttpClient) { 13 | } 14 | 15 | getTopics$(serverId: string): Observable { 16 | const params = new HttpParams().set('serverId', serverId); 17 | return this.http.get(`/api/topics`, {params}); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/lib/topics/list/topics.demo.data.ts: -------------------------------------------------------------------------------- 1 | import {FavouritesGroup} from '@app/feat-favourites'; 2 | import {TopicMetadata} from '@app/common-model'; 3 | 4 | export const demoTopics = [ 5 | new TopicMetadata(4, FavouritesGroup.GROUP_ALL, 'bank-transactions'), 6 | new TopicMetadata(2, FavouritesGroup.GROUP_ALL, 'currency-rates'), 7 | new TopicMetadata(256, FavouritesGroup.GROUP_ALL, 'system-events'), 8 | new TopicMetadata(256, FavouritesGroup.GROUP_ALL, 'user-audit-actions'), 9 | new TopicMetadata(128, FavouritesGroup.GROUP_ALL, 'frontend-activity-monitoring'), 10 | new TopicMetadata(16, FavouritesGroup.GROUP_ALL, 'user-reports') 11 | ]; 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/lib/topics/list/topics.demo.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {from, Observable} from 'rxjs'; 3 | import {demoTopics} from './topics.demo.data'; 4 | import {Topics} from '@app/common-model'; 5 | import {TopicsService} from '../topics.service'; 6 | 7 | @Injectable({ 8 | providedIn: 'root', 9 | }) 10 | export class TopicsDemoService implements TopicsService { 11 | getTopics$(): Observable { 12 | return from([{topics: demoTopics}]); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/lib/topics/topics.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {Topics} from '@app/common-model'; 4 | 5 | @Injectable() 6 | export abstract class TopicsService { 7 | 8 | abstract getTopics$(serverId: string): Observable; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-topics/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feat-user-groups", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/feat-user-groups/src", 6 | "prefix": "app", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/feat-user-groups"], 11 | "options": { 12 | "jestConfig": "libs/feat-user-groups/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/lib/user-groups-functions-matrix/functions/functions.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {HttpClient} from '@angular/common/http'; 3 | import {Observable} from 'rxjs'; 4 | import {FunctionsService} from './functions.service'; 5 | import {SystemFunction} from '../user-groups.model'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class FunctionsBackendService implements FunctionsService { 11 | 12 | constructor(private http: HttpClient) { 13 | } 14 | 15 | getFunctions$(): Observable> { 16 | return this.http.get>('/api/functions'); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/lib/user-groups-functions-matrix/functions/functions.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {SystemFunction} from '../user-groups.model'; 4 | 5 | @Injectable() 6 | export abstract class FunctionsService { 7 | 8 | abstract getFunctions$(): Observable>; 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/lib/user-groups-functions-matrix/user-groups.model.ts: -------------------------------------------------------------------------------- 1 | import {SystemFunctionName} from '@app/common-auth'; 2 | 3 | export class UserGroup { 4 | 5 | constructor(public id: number, public name: string, public code: string, public functions: Array) { 6 | } 7 | } 8 | 9 | export class SystemFunction { 10 | 11 | constructor(public id: number, public name: SystemFunctionName, public label: string, public functionGroup: FunctionGroup) { 12 | } 13 | } 14 | 15 | export enum FunctionGroup { 16 | 17 | TOPIC = 'TOPIC', 18 | CONSUMER_GROUP = 'CONSUMER_GROUP', 19 | SCHEMA_REGISTRY = 'SCHEMA_REGISTRY', 20 | CLUSTER = 'CLUSTER', 21 | ADMIN = 'ADMIN' 22 | } 23 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/lib/user-groups/form/user-group.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {UserGroup} from '../../user-groups-functions-matrix/user-groups.model'; 4 | 5 | @Injectable() 6 | export abstract class UserGroupService { 7 | 8 | abstract createUserGroup$(userGroup: UserGroup): Observable; 9 | 10 | abstract updateUserGroup$(userGroup: UserGroup): Observable; 11 | 12 | abstract getUserGroup$(id: number): Observable; 13 | 14 | abstract deleteUserGroup$(id: number): Observable; 15 | 16 | abstract isUserGroupCodeUnique$(id: number | null, userGroupName: string): Observable; 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/lib/user-groups/list/user-groups.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {UserGroup} from '../../user-groups-functions-matrix/user-groups.model'; 4 | 5 | @Injectable() 6 | export abstract class UserGroupsService { 7 | 8 | abstract getUserGroups$(): Observable>; 9 | 10 | abstract updatePermissions$(userGroups: Array): Observable; 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "target": "es2020", 15 | "forceConsistentCasingInFileNames": true, 16 | "strict": true, 17 | "noImplicitOverride": true, 18 | "noPropertyAccessFromIndexSignature": true, 19 | "noImplicitReturns": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "angularCompilerOptions": { 23 | "enableI18nLegacyMessageIdFormat": false, 24 | "strictInjectionParameters": true, 25 | "strictInputAccessModifiers": true, 26 | "strictTemplates": true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "jest.config.ts", 14 | "**/*.test.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/feat-user-groups/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'message-data', 4 | preset: '../../jest.preset.js', 5 | setupFilesAfterEnv: ['/src/test-setup.ts'], 6 | globals: {}, 7 | coverageDirectory: '../../coverage/libs/message-data', 8 | transform: { 9 | '^.+\\.(ts|mjs|js|html)$': [ 10 | 'jest-preset-angular', 11 | { 12 | tsconfig: '/tsconfig.spec.json', 13 | stringifyContentPathRegex: '\\.(html|svg)$', 14 | }, 15 | ], 16 | }, 17 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "message-data", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/message-data/src", 6 | "prefix": "kouncil", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/message-data"], 11 | "options": { 12 | "jestConfig": "libs/message-data/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/index.ts: -------------------------------------------------------------------------------- 1 | export {MessageDataService} from './lib/message-data/message-data.service'; 2 | export {MessageData} from './lib/message-data/message-data'; 3 | export {MessageDataHeader} from './lib/message-data/message-data-header'; 4 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/lib/message-data.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | @NgModule({ 5 | imports: [CommonModule], 6 | }) 7 | export class MessageDataModule {} 8 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/lib/message-data/message-data-header.ts: -------------------------------------------------------------------------------- 1 | export interface MessageDataHeader { 2 | key: string; 3 | value: string; 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/lib/message-data/message-data.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {BehaviorSubject, Observable, Subject} from 'rxjs'; 3 | import {MessageData} from './message-data'; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class MessageDataService { 9 | private messageDataSub$: Subject = new BehaviorSubject({} as MessageData); 10 | 11 | get messageData$(): Observable { 12 | return this.messageDataSub$.asObservable(); 13 | } 14 | 15 | setMessageData(messageData: MessageData): void { 16 | this.messageDataSub$.next(messageData); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/lib/message-data/message-data.ts: -------------------------------------------------------------------------------- 1 | import {MessageDataHeader} from './message-data-header'; 2 | import {MessageFormat} from '@app/schema-registry'; 3 | 4 | export interface MessageData { 5 | key: string; 6 | keyFormat: MessageFormat; 7 | value: string; 8 | originalValue: string; 9 | valueFormat: MessageFormat; 10 | offset: number | null; 11 | partition: number | null; 12 | timestamp?: number | null; 13 | headers?: MessageDataHeader[]; 14 | topicName: string; 15 | topic: string; 16 | } 17 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "angularCompilerOptions": { 22 | "strictInjectionParameters": true, 23 | "strictInputAccessModifiers": true, 24 | "strictTemplates": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "**/*.test.ts", 14 | "jest.config.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/message-data/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | displayName: 'resend-events', 3 | preset: '../../jest.preset.js', 4 | setupFilesAfterEnv: ['/src/test-setup.ts'], 5 | globals: {}, 6 | coverageDirectory: '../../coverage/libs/resend-events', 7 | transform: { 8 | '^.+\\.(ts|mjs|js|html)$': [ 9 | 'jest-preset-angular', 10 | { 11 | tsconfig: '/tsconfig.spec.json', 12 | stringifyContentPathRegex: '\\.(html|svg)$', 13 | }, 14 | ], 15 | }, 16 | transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], 17 | snapshotSerializers: [ 18 | 'jest-preset-angular/build/serializers/no-ng-attributes', 19 | 'jest-preset-angular/build/serializers/ng-snapshot', 20 | 'jest-preset-angular/build/serializers/html-comment', 21 | ], 22 | }; 23 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "resend-events", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/resend-events/src", 6 | "prefix": "kouncil", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/resend-events"], 11 | "options": { 12 | "jestConfig": "libs/resend-events/jest.config.js" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/index.ts: -------------------------------------------------------------------------------- 1 | export {ResendBackendService} from './lib/resend/resend.backend.service'; 2 | export {ResendDemoService} from './lib/resend/resend.demo.service'; 3 | export {ResendDataModel} from './lib/resend/resend.data.model'; 4 | export {ResendComponent} from './lib/resend/resend.component'; 5 | export {ResendService} from './lib/resend/resend.service'; 6 | export {ResendModule} from './lib/resend.module'; 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/lib/resend/resend.backend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {HttpClient, HttpParams} from '@angular/common/http'; 3 | import {Observable} from 'rxjs'; 4 | import {ResendDataModel} from './resend.data.model'; 5 | 6 | @Injectable({ 7 | providedIn: 'root', 8 | }) 9 | export class ResendBackendService { 10 | constructor(private http: HttpClient) {} 11 | 12 | resend$(serverId: string, resendDataModel: ResendDataModel): Observable> { 13 | const params = new HttpParams().set('serverId', serverId); 14 | return this.http.post>( 15 | `/api/topic/resend`, 16 | resendDataModel, 17 | { params } 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/lib/resend/resend.component.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../../apps/kouncil/src/styles/palette'; 2 | 3 | :host { 4 | .drawer-section-title { 5 | font-size: 17px; 6 | } 7 | 8 | .field-with-label { 9 | display: flex; 10 | flex-flow: column; 11 | } 12 | 13 | .field-label { 14 | color: $main-100; 15 | font-size: 14px; 16 | font-weight: 500; 17 | } 18 | 19 | .mat-form-field { 20 | width: 100%; 21 | } 22 | 23 | .checkbox { 24 | margin-top: 25px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/lib/resend/resend.data.model.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface ResendDataModel { 3 | sourceTopicName: string; 4 | sourceTopicPartition: number; 5 | offsetBeginning: number; 6 | offsetEnd: number; 7 | destinationTopicName: string; 8 | destinationTopicPartition: number; 9 | shouldFilterOutHeaders: boolean; 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/lib/resend/resend.demo.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {ResendService} from './resend.service'; 3 | import {from, Observable} from 'rxjs'; 4 | import {ResendDataModel} from './resend.data.model'; 5 | 6 | @Injectable() 7 | export class ResendDemoService implements ResendService { 8 | resend$(_serverId: string, _resendData: ResendDataModel): Observable> { 9 | return from([{}]); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/lib/resend/resend.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {Observable} from 'rxjs'; 3 | import {ResendDataModel} from './resend.data.model'; 4 | 5 | @Injectable() 6 | export abstract class ResendService { 7 | abstract resend$(serverId: string, message: ResendDataModel): Observable>; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "angularCompilerOptions": { 22 | "strictInjectionParameters": true, 23 | "strictInputAccessModifiers": true, 24 | "strictTemplates": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": ["src/test-setup.ts", "**/*.spec.ts", "**/*.test.ts"], 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/resend-events/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "schema-registry", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "libs/schema-registry/src", 6 | "prefix": "kouncil", 7 | "targets": { 8 | "test": { 9 | "executor": "@nx/jest:jest", 10 | "outputs": ["{workspaceRoot}/coverage/libs/schema-registry"], 11 | "options": { 12 | "jestConfig": "libs/schema-registry/jest.config.ts" 13 | } 14 | }, 15 | "lint": { 16 | "executor": "@nx/eslint:lint" 17 | } 18 | }, 19 | "tags": [] 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-boolean-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {RandomIntGeneratorService} from './random-int-generator.service'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class RandomBooleanGeneratorService { 8 | 9 | constructor(private intGeneratorService: RandomIntGeneratorService) { 10 | } 11 | 12 | public getRandomBoolean(): boolean { 13 | return this.intGeneratorService.getRandomInt() % 2 === 0; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-bytes-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {RandomStringGeneratorService} from './random-string-generator.service'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class RandomBytesGeneratorService { 8 | 9 | constructor(private stringGeneratorService: RandomStringGeneratorService) { 10 | } 11 | 12 | public getRandomBytes(): string { 13 | return this.stringGeneratorService.getRandomString(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-date-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class RandomDateGeneratorService { 7 | 8 | public getRandomDate(): number { 9 | return new Date(+new Date() - Math.random() * (1e+12)).getTime(); 10 | } 11 | 12 | public getTimeSinceMidnight(): number { 13 | const date = this.getRandomDate(); 14 | const midnight = new Date(date).setHours(0, 0, 0, 0); 15 | return date - midnight; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-float-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class RandomFloatGeneratorService { 7 | 8 | private readonly MIN_RANDOM_NUMBER: number = 1; 9 | private readonly MAX_RANDOM_NUMBER: number = 1000; 10 | 11 | public getRandomFloat(): number { 12 | return Math.random() * (this.MAX_RANDOM_NUMBER - this.MIN_RANDOM_NUMBER) + this.MIN_RANDOM_NUMBER; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-int-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class RandomIntGeneratorService { 7 | 8 | private readonly MIN_RANDOM_NUMBER: number = 1; 9 | private readonly MAX_RANDOM_NUMBER: number = 1000; 10 | 11 | public getRandomInt(): number { 12 | return Math.floor(Math.random() * (this.MAX_RANDOM_NUMBER - this.MIN_RANDOM_NUMBER + 1)) + this.MIN_RANDOM_NUMBER; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-string-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class RandomStringGeneratorService { 7 | 8 | public getRandomString(): string { 9 | return (Math.random() + 1).toString(36).substring(7); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/generators/random-uuid-generator.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class RandomUuidGeneratorService { 7 | 8 | public getRandomUUID(): string { 9 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c: string) { 10 | // eslint-disable-next-line no-bitwise 11 | const r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); 12 | return v.toString(16); 13 | }); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/protobuf/expectedProtobufWithData.json: -------------------------------------------------------------------------------- 1 | { 2 | "stringTest": "abc", 3 | "intTest": [ 4 | 123, 5 | 123 6 | ], 7 | "booleanTest": false, 8 | "bytesTest": "abc", 9 | "doubleTest": 123.123, 10 | "test1": { 11 | "stringTest1": "abc", 12 | "test2": [ 13 | { 14 | "doubleTest2": 123.123 15 | }, 16 | { 17 | "doubleTest2": 123.123 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema-registry.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule} from '@angular/core'; 2 | import {CommonModule} from '@angular/common'; 3 | 4 | @NgModule({ 5 | imports: [ 6 | CommonModule, 7 | ] 8 | }) 9 | export class SchemaRegistryModule { 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/compatibility.ts: -------------------------------------------------------------------------------- 1 | export enum Compatibility { 2 | BACKWARD = 'BACKWARD', 3 | BACKWARD_TRANSITIVE = 'BACKWARD_TRANSITIVE', 4 | FORWARD = 'FORWARD', 5 | FORWARD_TRANSITIVE = 'FORWARD_TRANSITIVE', 6 | FULL = 'FULL', 7 | FULL_TRANSITIVE = 'FULL_TRANSITIVE', 8 | NONE = 'NONE' 9 | } 10 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/message-format.ts: -------------------------------------------------------------------------------- 1 | export enum MessageFormat { 2 | JSON = 'JSON', 3 | PROTOBUF = 'PROTOBUF', 4 | AVRO = 'AVRO', 5 | STRING = 'STRING' 6 | } 7 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/schema-state.service.ts: -------------------------------------------------------------------------------- 1 | import {Injectable} from '@angular/core'; 2 | import {BehaviorSubject, Observable, Subject} from 'rxjs'; 3 | import {map} from 'rxjs/operators'; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class SchemaStateService { 9 | private schemaConfiguredSub$: Subject<{ [id: string]: boolean }> = new BehaviorSubject<{ [id: string]: boolean }>({}); 10 | 11 | isSchemaConfigured$(serverId: string): Observable { 12 | return this.schemaConfiguredSub$.pipe( 13 | map(schemaConfiguration => schemaConfiguration[serverId]) 14 | ); 15 | } 16 | 17 | setSchemaConfiguration(schemaConfiguration: {[id: string]: boolean}): void { 18 | this.schemaConfiguredSub$.next(schemaConfiguration); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/schema.model.ts: -------------------------------------------------------------------------------- 1 | import {MessageFormat} from './message-format'; 2 | import {SubjectType} from './subject-type'; 3 | import {Compatibility} from './compatibility'; 4 | 5 | export interface Schema { 6 | messageFormat: MessageFormat; 7 | plainTextSchema: string; 8 | topicName: string; 9 | subjectName: string; 10 | version: number; 11 | subjectType: SubjectType; 12 | versionsNo: Array; 13 | compatibility: Compatibility; 14 | } 15 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/schemas.model.ts: -------------------------------------------------------------------------------- 1 | import {MessageFormat} from './message-format'; 2 | 3 | export interface Schemas { 4 | keyMessageFormat: MessageFormat; 5 | keyPlainTextSchema: string; 6 | valueMessageFormat: MessageFormat; 7 | valuePlainTextSchema: string; 8 | } 9 | 10 | export interface ExampleSchemaData { 11 | exampleKey: string; 12 | exampleValue: string; 13 | } 14 | 15 | export interface SchemasConfiguration { 16 | serverId: string; 17 | hasSchemaRegistry: boolean; 18 | } 19 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/lib/schema/subject-type.ts: -------------------------------------------------------------------------------- 1 | export enum SubjectType { 2 | KEY = 'KEY', 3 | VALUE = 'VALUE' 4 | } 5 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/src/test-setup.ts: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular/setup-jest'; 2 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.lib.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ], 13 | "compilerOptions": { 14 | "forceConsistentCasingInFileNames": true, 15 | "strict": true, 16 | "noImplicitOverride": true, 17 | "noPropertyAccessFromIndexSignature": true, 18 | "noImplicitReturns": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "angularCompilerOptions": { 22 | "strictInjectionParameters": true, 23 | "strictInputAccessModifiers": true, 24 | "strictTemplates": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "inlineSources": true, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "src/test-setup.ts", 12 | "**/*.spec.ts", 13 | "**/*.test.ts", 14 | "jest.config.ts" 15 | ], 16 | "include": ["**/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /kouncil-frontend/libs/schema-registry/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts", "jest.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /kouncil-frontend/proxy.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api": { 3 | "target": "http://localhost:8080", 4 | "secure": false, 5 | "logLevel": "debug" 6 | }, 7 | "/login/oauth2": { 8 | "target": "http://localhost:8080", 9 | "secure": false, 10 | "logLevel": "debug" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | yarn start 4 | -------------------------------------------------------------------------------- /kouncil-frontend/tools/generators/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consdata/kouncil/2c91f9bf98510b57421d6b3034c4dd036c6de6e2/kouncil-frontend/tools/generators/.gitkeep -------------------------------------------------------------------------------- /kouncil-frontend/tools/tsconfig.tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc/tools", 5 | "rootDir": ".", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": ["node"], 9 | "importHelpers": false 10 | }, 11 | "include": ["**/*.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /kouncil-frontend/yarnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -f "./target/node/node" ] || [ ! -f "./target/node/yarn/dist/bin/yarn" ]; then 4 | mkdir -p ./target/logs > /dev/null 5 | { 6 | echo "[$(date --rfc-3339=ns)] Downloading node and/or yarn" 7 | mvn "com.github.eirslett:frontend-maven-plugin:install-node-and-yarn@install node and yarn" 8 | } >> ./target/logs/yarnw.log 2>&1 9 | fi 10 | export PATH="$(pwd)/target/node:$(pwd)/target/node/yarn/dist/bin:$PATH" 11 | 12 | exec yarn $@ 13 | #EOF 14 | --------------------------------------------------------------------------------