diff --git a/ui_src/src/assets/images/cliIcon.svg b/ui_src/src/assets/images/cliIcon.svg new file mode 100644 index 000000000..ac22e43d5 --- /dev/null +++ b/ui_src/src/assets/images/cliIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ui_src/src/assets/images/collapseArrowWhite.svg b/ui_src/src/assets/images/collapseArrowWhite.svg new file mode 100644 index 000000000..d0fd36596 --- /dev/null +++ b/ui_src/src/assets/images/collapseArrowWhite.svg @@ -0,0 +1,3 @@ + + + diff --git a/ui_src/src/components/Tabs/index.js b/ui_src/src/components/Tabs/index.js index 60d654868..b202c925d 100644 --- a/ui_src/src/components/Tabs/index.js +++ b/ui_src/src/components/Tabs/index.js @@ -24,7 +24,7 @@ import CheckboxComponent from '../checkBox'; import { PriorityHighRounded } from '@material-ui/icons'; import CloudOnly from '../cloudOnly'; -const CustomTabs = ({ tabs, onChange, value, disabled, length, tooltip, icon = false, checkbox = false, defaultActiveKey, tabsCounter }) => { +const CustomTabs = ({ tabs, onChange, value, disabled, length, tooltip, icon = false, checkbox = false, defaultActiveKey, tabsCounter, icons }) => { return (
Clone
Kindly clone our explanatory repository to quickly start.
Functions Template Generator
{githubUrls[type].MEMPHIS_GIT_HTTPS}
{githubUrls[type].MEMPHIS_GIT_SSH}
{githubUrls[type][tabValue]}
Create a basic Memphis function template
{githubUrls[type]?.code}
Use Git or checkout with SVN using the web URL.
{schema?.name}
{schema?.name || schema}
{type === 'schema' ? <>{schema?.type} • > : null} diff --git a/ui_src/src/components/refreshButton/index.js b/ui_src/src/components/refreshButton/index.js new file mode 100644 index 000000000..44f1d9712 --- /dev/null +++ b/ui_src/src/components/refreshButton/index.js @@ -0,0 +1,34 @@ +// Copyright 2022-2023 The Memphis.dev Authors +// Licensed under the Memphis Business Source License 1.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// Changed License: [Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0), as published by the Apache Foundation. +// +// https://github.com/memphisdev/memphis/blob/master/LICENSE +// +// Additional Use Grant: You may make use of the Licensed Work (i) only as part of your own product or service, provided it is not a message broker or a message queue product or service; and (ii) provided that you do not use, provide, distribute, or make available the Licensed Work as a Service. +// A "Service" is a commercial offering, product, hosted, or managed service, that allows third parties (other than your own employees and contractors acting on your behalf) to access and/or use the Licensed Work or a substantial set of the features or functionality of the Licensed Work to third parties as a software-as-a-service, platform-as-a-service, infrastructure-as-a-service or other similar services that compete with Licensor products or services. + +import './style.scss'; +import React from 'react'; +import { Spin, Badge } from 'antd'; +import { SyncOutlined } from '@ant-design/icons'; +import { ReactComponent as RefreshIcon } from '../../assets/images/refresh.svg'; + +const RefreshButton = ({ refreshIndeicator, onClick, isLoading }) => { + return ( + + {refreshIndeicator && } + + {isLoading ? ( + } /> + ) : ( + + )} + + + ); +}; + +export default RefreshButton; diff --git a/ui_src/src/components/refreshButton/style.scss b/ui_src/src/components/refreshButton/style.scss new file mode 100644 index 000000000..fee283670 --- /dev/null +++ b/ui_src/src/components/refreshButton/style.scss @@ -0,0 +1,21 @@ +.update-refresh { + display: flex; + position: relative; + .ant-badge { + position: absolute; + right: 5px; + top: 5px; + z-index: 5; + } + .refresh-btn { + background-color: #ffffff; + border-radius: 50%; + box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.12); + width: 34px; + height: 34px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + } +} diff --git a/ui_src/src/connectors/index.js b/ui_src/src/connectors/index.js index 0e11803fc..dd7b5afa2 100644 --- a/ui_src/src/connectors/index.js +++ b/ui_src/src/connectors/index.js @@ -6,7 +6,7 @@ import { kafka } from './kafka'; import { kinesis } from './kinesis'; export const connectorTypes = [ - { name: 'Kafka', icon: KafkaIcon, comment: 'Supported version: v1.0.3', inputs: kafka }, + { name: 'Kafka', icon: KafkaIcon, comment: 'Supported version: 0.9 and above', inputs: kafka }, // { name: 'kinesis', icon: KinesisIcon, inputs: kinesis }, { name: 'S3', icon: S3LogoIcon, disabled: true, soon: true } ]; diff --git a/ui_src/src/connectors/kafka.js b/ui_src/src/connectors/kafka.js index dfc031c8b..82c213bc8 100644 --- a/ui_src/src/connectors/kafka.js +++ b/ui_src/src/connectors/kafka.js @@ -2,7 +2,7 @@ export const kafka = { Source: [ { name: 'name', - display: 'Name', + display: 'Connector name', type: 'string', required: true }, @@ -12,8 +12,7 @@ export const kafka = { type: 'multi', options: [], required: true, - placeholder: 'localhost:9092', - description: 'list of brokers' + placeholder: 'kafka-1:9092,kafka-2:9092' }, { name: 'security.protocol', @@ -27,14 +26,16 @@ export const kafka = { { name: 'ssl.mechanism', display: 'SSL mechanism', - type: 'string', + type: 'select', + options: ['GSSAPI', 'PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512'], required: true }, { name: 'ssl.certificate.pem', display: 'SSL certificate pem', type: 'string', - required: true + required: true, + placeholder: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----' }, { name: 'ssl.key.password', @@ -48,7 +49,7 @@ export const kafka = { name: 'sasl.mechanism', display: 'SASL mechanism', type: 'select', - options: ['PLAIN', 'SCRAM-SHA-256'], + options: ['GSSAPI', 'PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512'], required: true }, { @@ -61,7 +62,8 @@ export const kafka = { name: 'sasl.password', display: 'SASL password', type: 'string', - required: true + required: true, + placeholder: 'password' } ], 'No authentication': [] @@ -71,33 +73,14 @@ export const kafka = { display: 'Group id', type: 'string', required: true, - description: 'consumer group id' - }, - { - name: 'offset_strategy', - display: 'Offset strategy', - type: 'select', - options: ['Earliest', 'End', 'Specific offset (int)'], - required: false, - description: 'choose offset strategy', - children: true, - Earliest: [], - End: [], - 'Specific offset (int)': [ - { - name: 'offset_value', - display: 'Value', - type: 'string', - required: true - } - ] + description: 'Consumer group id' }, { name: 'topic', display: 'Topic', type: 'string', required: true, - description: 'topic name' + description: 'Topic name' }, { name: 'partition_strategy', @@ -105,32 +88,63 @@ export const kafka = { type: 'select', options: ['Partition Number', 'Any Partition'], required: true, - description: 'Partition Number / Any Partition', + description: 'Partition Number / Any Partition (round robin)', children: true, 'Partition Number': [ { name: 'partition_value', - display: 'Value', + display: 'Partition Value', type: 'string', required: true + }, + { + name: 'offset_strategy', + display: 'Offset strategy', + type: 'select', + options: ['Earliest', 'End', 'Specific offset'], + required: false, + description: 'choose offset strategy', + children: true, + Earliest: [], + End: [], + 'Specific offset': [ + { + name: 'offset_value', + description: 'choose offset value (int)', + display: 'Value', + type: 'string', + required: true, + placeholder: 0 + } + ] } ], - 'Any Partition': [] + 'Any Partition': [ + { + name: 'offset_strategy', + display: 'Offset strategy', + type: 'select', + options: ['Earliest', 'End'], + required: true, + description: 'choose offset strategy' + } + ] }, { name: 'timeout_duration_seconds', - display: 'kafka consumer timeout duration', + display: 'Consumer timeout duration (seconds)', type: 'string', required: false, - description: 'kafka consumer timeout duration' + placeholder: 10 } ], Sink: [ { name: 'name', - display: 'Name', + display: 'Connector name', type: 'string', - required: true + required: true, + description: 'Note that the sink connector name is also consumer group name' }, { name: 'bootstrap.servers', @@ -138,8 +152,7 @@ export const kafka = { type: 'multi', options: [], required: true, - placeholder: 'localhost:9092', - description: 'list of brokers' + placeholder: 'kafka-1:9092,kafka-2:9092' }, { name: 'security.protocol', @@ -153,14 +166,16 @@ export const kafka = { { name: 'ssl.mechanism', display: 'SSL mechanism', - type: 'string', + type: 'select', + options: ['GSSAPI', 'PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512'], required: true }, { name: 'ssl.certificate.pem', display: 'SSL certificate pem', type: 'string', - required: true + required: true, + placeholder: '-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----' }, { name: 'ssl.key.password', @@ -174,7 +189,7 @@ export const kafka = { name: 'sasl.mechanism', display: 'SASL mechanism', type: 'select', - options: ['PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512'], + options: ['GSSAPI', 'PLAIN', 'SCRAM-SHA-256', 'SCRAM-SHA-512'], required: true }, { @@ -197,7 +212,7 @@ export const kafka = { display: 'Topic', type: 'string', required: true, - description: 'topic name' + description: 'Topic name' }, { name: 'partition_strategy', @@ -227,17 +242,19 @@ export const kafka = { }, { name: 'memphis_batch_size', - display: 'Memphis batch size', + display: 'Memphis batch size (messages)', type: 'string', required: false, - description: 'memphis consuemr batch size' + placeholder: 100, + description: 'The buffer size used by Memphis to accumulate and handle incoming messages before processing' }, { name: 'memphis_max_time_wait', - display: 'Max time to wait for a batch of messages', + display: 'Max time to wait for a batch of messages (seconds)', + placeholder: 5, type: 'string', required: false, - description: 'the time to wait for a batch of messages' + description: 'The duration which a batch of messages is awaited till processing' } ] }; diff --git a/ui_src/src/const/globalConst.js b/ui_src/src/const/globalConst.js index 4e7a41357..3f2da5003 100644 --- a/ui_src/src/const/globalConst.js +++ b/ui_src/src/const/globalConst.js @@ -85,6 +85,17 @@ export const githubUrls = { DOWNLOAD_URL: 'https://github.com/memphisdev/functions-templates/archive/refs/heads/master.zip', MEMPHIS_GIT_HTTPS: 'https://github.com/memphisdev/functions-templates.git', MEMPHIS_GIT_SSH: 'git@github.com:memphisdev/functions-templates.git' + }, + cli: { + Windows: `powershell -c "Invoke-WebRequest -Uri 'https://github.com/memphisdev/memphis-cli/releases/latest/download/memphis-cli_Windows_x86_64.zip' -OutFile './memphis-cli_Windows_x86_64.zip'" + powershell -c "Expand-Archive memphis-cli_Windows_x86_64.zip -DestinationPath memphis-cli -Force"`, + Mac: `brew tap memphisdev/memphis-cli + brew install memphis-cli`, + 'Linux RPM': `wget https://github.com/memphisdev/memphis-cli/releases/download/v0.0.1/memphis-cli_0.0.1_linux_amd64.rpm + sudo rpm -i memphis-cli_0.0.1_linux_amd64.rpm`, + 'Linux APK': `wget https://github.com/memphisdev/memphis-cli/releases/download/v0.0.1/memphis-cli_0.0.1_linux_arm64.apk + apk add memphis-cli_0.0.1_linux_arm64.apk --allow-untrusted`, + code: 'mem func init myExampleFunc --lang [nodejs/go/python]' } }; diff --git a/ui_src/src/domain/administration/softwareUpdates/index.js b/ui_src/src/domain/administration/softwareUpdates/index.js index 1b452ae46..bdf7d7886 100644 --- a/ui_src/src/domain/administration/softwareUpdates/index.js +++ b/ui_src/src/domain/administration/softwareUpdates/index.js @@ -49,7 +49,7 @@ function SoftwareUpates({}) { const [checkboxdeleteAccount, setCheckboxdeleteAccount] = useState(false); const [delateLoader, setDelateLoader] = useState(false); const systemDataComponents = [ - { title: 'Amount of brokers', value: systemData?.total_amount_brokers }, + { title: 'Amount of brokers', value: systemData?.total_amount_brokers, ossOnly: true }, { title: 'total stations', value: systemData?.total_stations }, { title: 'total users', value: systemData?.total_users }, { title: 'total schemas', value: systemData?.total_schemas } @@ -145,7 +145,7 @@ function SoftwareUpates({}) {
Client-type user
Functions
Station