From 3013056ab493916feb0de57f2ee159eefba73d5e Mon Sep 17 00:00:00 2001 From: otabekgh Date: Mon, 1 Jan 2024 13:35:02 +0300 Subject: [PATCH] UI code arrangement --- ui_src/src/App.js | 62 +-- ui_src/src/PrivateRoute.js | 9 +- .../images/{TimeFill.svg => timeFill.svg} | 0 ui_src/src/components/cloneModal/index.js | 7 +- ui_src/src/components/cloneModal/style.scss | 5 - ui_src/src/components/customSelect/index.js | 12 +- .../src/components/functionsOverview/index.js | 3 +- .../src/components/produceMessages/index.js | 22 +- ui_src/src/components/sdkExample/index.js | 411 +++++++++--------- ui_src/src/components/sdkExample/style.scss | 37 +- ui_src/src/components/sideBar/index.js | 4 +- .../src/components/titleComponent/style.scss | 2 +- ui_src/src/const/integrationList.js | 62 +-- .../components/gitHubIntegration/index.js | 2 +- .../gitHubIntegration/integratedItem.js | 2 - .../integrationItem/integrationLogs.js | 1 + .../components/integrationItem/style.scss | 2 +- .../components/attachFunctionModal/index.js | 2 +- .../components/poisonMessage/index.js | 2 +- .../src/domain/overview/integrations/index.js | 6 +- .../schema/components/schemaBox/index.js | 2 +- .../schema/components/schemaDetails/index.js | 2 +- .../components/generateTokenModal/index.js | 12 +- .../ProduceConsumList/index.js | 35 +- .../components/functionCard/index.js | 22 +- .../components/functionCard/style.scss | 20 +- .../components/functionData/index.js | 2 +- .../components/functionsModal/index.js | 6 +- .../components/functionsOverview/index.js | 4 +- .../stationObservabilty/index.js | 2 +- .../stationOverviewHeader/index.js | 2 +- .../stationsList/stationBoxOverview/index.js | 2 +- .../domain/users/createUserDetails/index.js | 4 +- ui_src/src/domain/users/index.js | 21 +- ui_src/src/domain/users/style.scss | 3 - ui_src/src/index.js | 12 +- ui_src/src/services/auth.js | 6 +- ui_src/src/services/decoder.js | 3 +- .../decoderFiles/protobufPartDecoder.js | 1 - ui_src/src/services/genericServices.js | 4 +- ui_src/src/services/http.js | 10 +- ui_src/src/services/valueConvertor.js | 4 +- ui_src/src/utils/user.js | 5 +- 43 files changed, 395 insertions(+), 442 deletions(-) rename ui_src/src/assets/images/{TimeFill.svg => timeFill.svg} (100%) diff --git a/ui_src/src/App.js b/ui_src/src/App.js index 59c3ec507..6a564f62a 100644 --- a/ui_src/src/App.js +++ b/ui_src/src/App.js @@ -10,7 +10,7 @@ // 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 './App.scss'; +import 'App.scss'; import { Switch, Route, withRouter } from 'react-router-dom'; import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; @@ -30,42 +30,42 @@ import { LOCAL_STORAGE_USER_PASS_BASED_AUTH, USER_IMAGE, LOCAL_STORAGE_PLAN -} from './const/localStorageConsts'; -import { CLOUD_URL, HANDLE_REFRESH_INTERVAL, WS_PREFIX } from './config'; -import { isCheckoutCompletedTrue, isCloud } from './services/valueConvertor'; -import { ReactComponent as InfoNotificationIcon } from './assets/images/infoNotificationIcon.svg'; -import { handleRefreshTokenRequest, httpRequest } from './services/http'; -import { ReactComponent as RedirectIcon } from './assets/images/redirectIcon.svg'; -import { ReactComponent as SuccessIcon } from './assets/images/successIcon.svg'; -import { ReactComponent as CloseIcon } from './assets/images/closeNotification.svg'; -import { showMessages, useGetAllowedActions } from './services/genericServices'; -import StationOverview from './domain/stationOverview'; -import { ReactComponent as ErrorIcon } from './assets/images/errorIcon.svg'; -import MessageJourney from './domain/messageJourney'; -import Administration from './domain/administration'; -import { ApiEndpoints } from './const/apiEndpoints'; -import { ReactComponent as WarnIcon } from './assets/images/warnIcon.svg'; -import AppWrapper from './components/appWrapper'; -import StationsList from './domain/stationsList'; -import SchemaManagment from './domain/schema'; -import PrivateRoute from './PrivateRoute'; -import AuthService from './services/auth'; -import Overview from './domain/overview'; -import Loader from './components/loader'; -import Functions from './domain/functions'; -import { Context } from './hooks/store'; -import pathDomains from './router'; -import Users from './domain/users'; -import { planType } from "./const/globalConst"; +} from 'const/localStorageConsts'; +import { CLOUD_URL, HANDLE_REFRESH_INTERVAL, WS_PREFIX } from 'config'; +import { isCheckoutCompletedTrue, isCloud } from 'services/valueConvertor'; +import { ReactComponent as InfoNotificationIcon } from 'assets/images/infoNotificationIcon.svg'; +import { handleRefreshTokenRequest, httpRequest } from 'services/http'; +import { ReactComponent as RedirectIcon } from 'assets/images/redirectIcon.svg'; +import { ReactComponent as SuccessIcon } from 'assets/images/successIcon.svg'; +import { ReactComponent as CloseIcon } from 'assets/images/closeNotification.svg'; +import { showMessages, useGetAllowedActions } from 'services/genericServices'; +import StationOverview from 'domain/stationOverview'; +import { ReactComponent as ErrorIcon } from 'assets/images/errorIcon.svg'; +import MessageJourney from 'domain/messageJourney'; +import Administration from 'domain/administration'; +import { ApiEndpoints } from 'const/apiEndpoints'; +import { ReactComponent as WarnIcon } from 'assets/images/warnIcon.svg'; +import AppWrapper from 'components/appWrapper'; +import StationsList from 'domain/stationsList'; +import SchemaManagment from 'domain/schema'; +import PrivateRoute from 'PrivateRoute'; +import AuthService from 'services/auth'; +import Overview from 'domain/overview'; +import Loader from 'components/loader'; +import Functions from 'domain/functions'; +import { Context } from 'hooks/store'; +import pathDomains from 'router'; +import Users from 'domain/users'; +import { planType } from "const/globalConst"; let SysLogs = undefined; let Login = undefined; let Signup = undefined; if (!isCloud()) { - SysLogs = require('./domain/sysLogs').default; - Login = require('./domain/login').default; - Signup = require('./domain/signup').default; + SysLogs = require('domain/sysLogs').default; + Login = require('domain/login').default; + Signup = require('domain/signup').default; } const App = withRouter(() => { diff --git a/ui_src/src/PrivateRoute.js b/ui_src/src/PrivateRoute.js index 58185691a..25a6bd9b7 100644 --- a/ui_src/src/PrivateRoute.js +++ b/ui_src/src/PrivateRoute.js @@ -11,13 +11,12 @@ // 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 React from 'react'; -import {} from 'react-router-dom'; import { Route, Redirect } from 'react-router-dom'; -import AuthService from './services/auth'; -import { isCloud } from './services/valueConvertor'; -import { CLOUD_URL } from './config'; -import pathDomains from './router'; +import AuthService from 'services/auth'; +import { isCloud } from 'services/valueConvertor'; +import { CLOUD_URL } from 'config'; +import pathDomains from 'router'; function PrivateRoute(props) { const { component: Component, ...rest } = props; diff --git a/ui_src/src/assets/images/TimeFill.svg b/ui_src/src/assets/images/timeFill.svg similarity index 100% rename from ui_src/src/assets/images/TimeFill.svg rename to ui_src/src/assets/images/timeFill.svg diff --git a/ui_src/src/components/cloneModal/index.js b/ui_src/src/components/cloneModal/index.js index 219c9bcdd..fb340192d 100644 --- a/ui_src/src/components/cloneModal/index.js +++ b/ui_src/src/components/cloneModal/index.js @@ -66,18 +66,13 @@ const CloneModal = ({ type }) => { )} {type === 'cli' && ( <> -

- Install Memphis CLI -

{githubUrls[type][tabValue]}

-

- Create a basic Memphis function template -

+

Create a basic Memphis function template

{githubUrls[type]?.code}

diff --git a/ui_src/src/components/cloneModal/style.scss b/ui_src/src/components/cloneModal/style.scss index 873f8699a..f11b7f3c8 100644 --- a/ui_src/src/components/cloneModal/style.scss +++ b/ui_src/src/components/cloneModal/style.scss @@ -61,11 +61,6 @@ font-size: 14px; font-family: 'InterMedium'; margin: 15px 0px 5px 0px; - label { - color: var(--purple); - font-weight: 600; - margin-right: 5px; - } } .footer { border-top: 1px solid #e4e4e4; diff --git a/ui_src/src/components/customSelect/index.js b/ui_src/src/components/customSelect/index.js index 35ca9e962..4844f77ed 100644 --- a/ui_src/src/components/customSelect/index.js +++ b/ui_src/src/components/customSelect/index.js @@ -28,7 +28,7 @@ import pathDomains from 'router'; const { Option } = Select; -const CustomSelect = ({ options, onChange, value, placeholder, type = 'schema', handleCreateNew }) => { +const CustomSelect = ({ options, onChange, value, placeholder, type = 'schema', handleCreateNew, showCreatedBy = true }) => { const history = useHistory(); const handleChange = (e) => { @@ -107,10 +107,12 @@ const CustomSelect = ({ options, onChange, value, placeholder, type = 'schema', />

{schema?.name || schema}

-

- {type === 'schema' ? <>{schema?.type} • : null} - {parsingDate(schema?.created_at)} -

+ {showCreatedBy && +

+ {type === 'schema' ? <>{schema?.type} • : null} + {parsingDate(schema?.created_at)} +

+ } ); diff --git a/ui_src/src/components/functionsOverview/index.js b/ui_src/src/components/functionsOverview/index.js index 0b2cba325..8f3a6cb5c 100644 --- a/ui_src/src/components/functionsOverview/index.js +++ b/ui_src/src/components/functionsOverview/index.js @@ -13,7 +13,6 @@ import './style.scss'; import React from 'react'; - import { ReactComponent as RemoveFunctionIcon } from 'assets/images/removeFunctionIcon.svg'; import { ReactComponent as ArrowFunctionIcon } from 'assets/images/arrowFunction.svg'; import OverflowTip from 'components/tooltip/overflowtip'; @@ -26,7 +25,7 @@ const FunctionsOverview = (props) => { return (
- {functions.map((func, index) => { + {functions?.map((func, index) => { return (
diff --git a/ui_src/src/components/produceMessages/index.js b/ui_src/src/components/produceMessages/index.js index 3be37fcee..05268de88 100644 --- a/ui_src/src/components/produceMessages/index.js +++ b/ui_src/src/components/produceMessages/index.js @@ -136,7 +136,7 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading }

JSON-based value

generateMessage()}> - Re-generate + Generate example
@@ -179,8 +179,8 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading } backgroundColorType="none" borderColorType="gray" height="40px" - onBlur={(e) => creationForm.setFieldsValue({ [name]: e.target.value })} - onChange={(e) => creationForm.setFieldsValue({ [name]: e.target.value })} + onBlur={(e) => creationForm.setFieldsValue({[name]: e.target.value})} + onChange={(e) => creationForm.setFieldsValue({[name]: e.target.value})} value={formFields.key} /> @@ -202,8 +202,8 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading } backgroundColorType="none" borderColorType="gray" height="40px" - onBlur={(e) => creationForm.setFieldsValue({ [name]: e.target.value })} - onChange={(e) => creationForm.setFieldsValue({ [name]: e.target.value })} + onBlur={(e) => creationForm.setFieldsValue({[name]: e.target.value})} + onChange={(e) => creationForm.setFieldsValue({[name]: e.target.value})} value={formFields.header} /> @@ -223,17 +223,13 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading }
- creationForm.setFieldsValue({ bypass_schema: e })} - checked={isCloud() ? formFields.bypass_schema : true} - /> + creationForm.setFieldsValue({'bypass_schema': e})} checked={isCloud() ? formFields.bypass_schema : true} />
@@ -252,7 +248,7 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading } height="45px" width="100%" options={partitons} - onChange={(e) => creationForm.setFieldsValue({ partition_number: e.target.value })} + onChange={(e) => creationForm.setFieldsValue({'partition_number': e.target.value})} popupClassName="select-options" disabled={!isCloud()} /> @@ -266,7 +262,7 @@ const ProduceMessages = ({ stationName, cancel, produceMessagesRef, setLoading } creationForm.setFieldsValue({ amount: e })} + onChange={(e) => creationForm.setFieldsValue({'amount': e})} value={formFields.amount} placeholder={formFields.amount || 1} disabled={!isCloud()} diff --git a/ui_src/src/components/sdkExample/index.js b/ui_src/src/components/sdkExample/index.js index de7ee361b..cfc05dae6 100644 --- a/ui_src/src/components/sdkExample/index.js +++ b/ui_src/src/components/sdkExample/index.js @@ -55,7 +55,6 @@ loader.config({ monaco }); const tabs = ['Producer', 'Consumer']; const tabsProtocol = ['Generate token', 'Produce data', 'Consume data']; const selectProtocolOption = ['SDK', 'REST']; -const ExpandIcon = ({ isActive }) => collapse-arrow; const SdkExample = ({ consumer, showTabs = true, stationName, username, connectionCreds, withHeader = false }) => { const [langSelected, setLangSelected] = useState('Go'); @@ -497,7 +496,7 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti

Client generator

- +
)}
@@ -541,13 +540,11 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti

Package installation

{SDK_CODE_EXAMPLE[langSelected].installation}

- +
-
- {showTabs && setTabValue(tabValue)} size="medium" />} - {!showTabs &&

{`Code snippet for ${tabValue === 'Producer' ? 'producing' : 'consuming'} data`}

} -
+ +
)} {protocolSelected === 'REST' && ( @@ -555,61 +552,51 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti )} {
- }> - - -

Parameters

- -
- - -
- } - > -
- {(tabValue === 'SDK' || tabValueRest === 'Generate token') && withHeader && ( -
- - - - updateFormFields('userName', e)} - type="user" - handleCreateNew={() => addUserModalFlip(true)} - /> - - - - - - updateFormFields('password', e.target.value)} - onChange={(e) => updateFormFields('password', e.target.value)} - value={formFields.password} - /> - - -
- )} +
+ {(tabValue === 'SDK' || tabValueRest === 'Generate token') && withHeader && ( +
+ + + + updateFormFields('userName', e)} + type="user" + handleCreateNew={() => addUserModalFlip(true)} + showCreatedBy={false} + /> + + + + + + updateFormFields('password', e.target.value)} + onChange={(e) => updateFormFields('password', e.target.value)} + value={formFields.password} + /> + + +
+ )} - {protocolSelected === 'REST' && tabValueRest === 'Generate token' && ( - <> -
+ {protocolSelected === 'REST' && tabValueRest === 'Generate token' && ( + <> +
- + - - + + -
- - )} - {protocolSelected === 'REST' && tabValueRest !== 'Generate token' && ( - <> - - - updateFormFields('jwt', e.target.value)} - onChange={(e) => updateFormFields('jwt', e.target.value)} - value={formFields.jwt} - /> - - - )} - {(protocolSelected === 'SDK' || tabValueRest === 'Consume data') && ( - <> -
+
+ + )} + {protocolSelected === 'REST' && tabValueRest !== 'Generate token' && ( + <> + + + updateFormFields('jwt', e.target.value)} + onChange={(e) => updateFormFields('jwt', e.target.value)} + value={formFields.jwt} + /> + + + )} + {(protocolSelected === 'SDK' || tabValueRest === 'Consume data') && ( + <> +
- {(tabValue === 'Consumer' || tabValueRest === 'Consume data') && ( - - + {(tabValue === 'Consumer' || tabValueRest === 'Consume data') && ( + + - )} -
- - )} - {protocolSelected === 'REST' && tabValueRest === 'Consume data' && ( - <> -
+ )} +
+ + )} + {protocolSelected === 'REST' && tabValueRest === 'Consume data' && ( + <> +
- + - - + + +
+ + )} + {protocolSelected === 'SDK' && langSelected === 'Python' && tabValue === 'Producer' && ( +
+ + + + updateFormFields('blocking', !formFields.blocking)} + checked={formFields.blocking}/> + +
+ )} + {protocolSelected === 'SDK' && langSelected !== 'Python' && tabValue === 'Producer' && ( +
+ + + + updateFormFields('async', !formFields.async)} + checked={formFields.async}/> + +
+ )} + {((protocolSelected === 'SDK' && tabValue === 'Producer') || + (protocolSelected === 'REST' && tabValueRest === 'Produce data')) && ( +
+ + + updateFormFields('useHeaders', !formFields.useHeaders)} + checked={formFields.useHeaders} + /> + +
+ )} + {formFields.useHeaders && + ((protocolSelected === 'SDK' && tabValue === 'Producer') || + (protocolSelected === 'REST' && tabValueRest === 'Produce data')) && ( +
+ {formFields.headersList.map((header, index) => ( +
+ + + updateHeaders('key', e.target.value, index)} + onChange={(e) => updateHeaders('key', e.target.value, index)} + value={header.key} + /> + + + + + updateHeaders('value', e.target.value, index)} + onChange={(e) => updateHeaders('value', e.target.value, index)} + value={header.value} + /> + + + removeHeader(index)}/>
- - )} - {protocolSelected === 'SDK' && langSelected === 'Python' && tabValue === 'Producer' && ( -
- - - - updateFormFields('blocking', !formFields.blocking)} checked={formFields.blocking} /> - + ))} +
addHeader()}> + + Add more
- )} - {protocolSelected === 'SDK' && langSelected !== 'Python' && tabValue === 'Producer' && ( -
- - - - updateFormFields('async', !formFields.async)} checked={formFields.async} /> - -
- )} - {((protocolSelected === 'SDK' && tabValue === 'Producer') || - (protocolSelected === 'REST' && tabValueRest === 'Produce data')) && ( -
- - - updateFormFields('useHeaders', !formFields.useHeaders)} - checked={formFields.useHeaders} - /> - -
- )} - {formFields.useHeaders && - ((protocolSelected === 'SDK' && tabValue === 'Producer') || - (protocolSelected === 'REST' && tabValueRest === 'Produce data')) && ( -
- {formFields.headersList.map((header, index) => ( -
- - - - updateHeaders('key', e.target.value, index)} - onChange={(e) => updateHeaders('key', e.target.value, index)} - value={header.key} - /> - - - - - - updateHeaders('value', e.target.value, index)} - onChange={(e) => updateHeaders('value', e.target.value, index)} - value={header.value} - /> - - - removeHeader(index)} /> -
- ))} -
addHeader()}> - - Add more -
-
- )} -
- - +
+ )} +
} @@ -906,15 +899,14 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti />
- +
-

Code Output

- +

Generated code

{protocolSelected === 'SDK' && SDK_CODE_EXAMPLE[langSelected]?.link && (
- +

{SDK_CODE_EXAMPLE[langSelected].title}

{SDK_CODE_EXAMPLE[langSelected].desc} @@ -942,12 +934,13 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti

Generate a token

setGenerateModal(true)}> - + Generate JWT token
-
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.tokenGenerate)}
+
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.tokenGenerate)}
)} @@ -955,7 +948,8 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti

Produce data

-
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.producer)}
+
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.producer)}
)} @@ -963,7 +957,8 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti

Consumem data

-
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.consumer)}
+
{generateEditor(REST_CODE_EXAMPLE[langSelected].langCode, codeExample.consumer)}
)} diff --git a/ui_src/src/components/sdkExample/style.scss b/ui_src/src/components/sdkExample/style.scss index b312b1970..7a27ebeb1 100644 --- a/ui_src/src/components/sdkExample/style.scss +++ b/ui_src/src/components/sdkExample/style.scss @@ -5,6 +5,20 @@ height: calc(100% - 15px); margin-top: 15px; position: relative; + .header-section { + display: flex; + align-items: center; + gap: 10px; + .input-item { + width: 100%; + } + .remove-icon { + font-size: 30px; + cursor: pointer; + position: relative; + top: -5px; + } + } .username-section { display: flex; justify-content: space-between; @@ -50,8 +64,6 @@ overflow-y: auto; padding-right: 20px; .code-builder { - border: #e7e7e7 1px solid; - border-radius: 12px; margin-bottom: 20px; .ant-collapse { background: rgba(101, 87, 255, 0.1); @@ -83,10 +95,6 @@ color: #84818a; } .parameters-section { - background-color: #ffffff; - border-radius: 0px 0px 12px 12px; - position: relative; - padding: 10px 15px; .new-user { position: absolute; right: 15px; @@ -121,6 +129,7 @@ margin: 10px 0px; } .modal-header { + margin-bottom: 1rem; .header-img-container { background: rgba(101, 87, 255, 0.1); height: 45px; @@ -139,6 +148,7 @@ .modal-title-sdk { font-family: 'InterMedium'; font-size: 20px; + margin-bottom: 0!important; } p { margin-bottom: 0; @@ -199,7 +209,7 @@ border: 1px solid var(--gray); box-sizing: border-box; border-radius: 4px; - height: 540px; + height: 640px; overflow: auto; align-items: flex-start; display: flex; @@ -263,19 +273,14 @@ } } .code-output-title-code-example { - margin-top: 50px; + margin-top: 60px; } .code-output-title { - border-radius: 8px; - background: rgba(101, 87, 255, 0.1); - padding: 15px 20px; - margin-bottom: 20px; p { - margin-bottom: 5px; - color: #6557ff; - font-family: 'InterSemiBold'; - font-size: 16px; + font-family: 'InterMedium', sans-serif; + margin-bottom: 1rem; + font-size: 20px; } } } diff --git a/ui_src/src/components/sideBar/index.js b/ui_src/src/components/sideBar/index.js index 27ab0a35e..ee604b2b6 100644 --- a/ui_src/src/components/sideBar/index.js +++ b/ui_src/src/components/sideBar/index.js @@ -20,7 +20,7 @@ import { BsFillChatSquareTextFill } from 'react-icons/bs'; import { useHistory } from 'react-router-dom'; import { Divider, Popover } from 'antd'; import Drawer from "components/drawer"; -import CloudMoadl from 'components/cloudModal'; +import CloudModal from 'components/cloudModal'; import { LOCAL_STORAGE_ACCOUNT_NAME, LOCAL_STORAGE_AVATAR_ID, @@ -565,7 +565,7 @@ function SideBar() { route="administration" />
- setCloudModalOpen(false)} /> + setCloudModalOpen(false)} />
{!isCloud() && ( {
{isIntegrated && (
-

Repositories

+

Repos

diff --git a/ui_src/src/domain/administration/integrations/components/gitHubIntegration/integratedItem.js b/ui_src/src/domain/administration/integrations/components/gitHubIntegration/integratedItem.js index 4f3b63b17..3c75ad766 100644 --- a/ui_src/src/domain/administration/integrations/components/gitHubIntegration/integratedItem.js +++ b/ui_src/src/domain/administration/integrations/components/gitHubIntegration/integratedItem.js @@ -84,7 +84,6 @@ const IntegrationItem = ({ isNew, index, disabled, repo, reposList, updateIntegr updateRepo(e); }} options={Object?.keys(reposList)} - placeholder={'Choose a repository'} /> @@ -103,7 +102,6 @@ const IntegrationItem = ({ isNew, index, disabled, repo, reposList, updateIntegr onChange={(e) => { updateBranch(e); }} - placeholder={'Branch to sync with'} /> diff --git a/ui_src/src/domain/administration/integrations/components/integrationItem/integrationLogs.js b/ui_src/src/domain/administration/integrations/components/integrationItem/integrationLogs.js index 4d4e4f552..b07b6d065 100644 --- a/ui_src/src/domain/administration/integrations/components/integrationItem/integrationLogs.js +++ b/ui_src/src/domain/administration/integrations/components/integrationItem/integrationLogs.js @@ -40,6 +40,7 @@ const IntegrationLogs = ({ integrationName }) => { return (
+

Logs Details

diff --git a/ui_src/src/domain/administration/integrations/components/integrationItem/style.scss b/ui_src/src/domain/administration/integrations/components/integrationItem/style.scss index c4e7a0ae1..adc1a3756 100644 --- a/ui_src/src/domain/administration/integrations/components/integrationItem/style.scss +++ b/ui_src/src/domain/administration/integrations/components/integrationItem/style.scss @@ -237,7 +237,7 @@ integ-item { } .logs-header { display: flex; - justify-content: flex-end; + justify-content: space-between; align-items: center; height: 30px; } diff --git a/ui_src/src/domain/functions/components/attachFunctionModal/index.js b/ui_src/src/domain/functions/components/attachFunctionModal/index.js index 7649762d3..c9e846fbc 100644 --- a/ui_src/src/domain/functions/components/attachFunctionModal/index.js +++ b/ui_src/src/domain/functions/components/attachFunctionModal/index.js @@ -24,7 +24,7 @@ import Button from 'components/button'; import Modal from 'components/modal'; import Loader from 'components/loader'; import LearnMore from 'components/learnMore'; -import SchemaItem from '../../../stationOverview/components/useSchemaModal/schemaItem'; +import SchemaItem from 'domain/stationOverview/components/useSchemaModal/schemaItem'; import { ReactComponent as StationIcon } from 'assets/images/stationsIconActive.svg'; import CreateStationForm from 'components/createStationForm'; import { isCloud } from 'services/valueConvertor'; diff --git a/ui_src/src/domain/messageJourney/components/poisonMessage/index.js b/ui_src/src/domain/messageJourney/components/poisonMessage/index.js index c4ba4a51d..f8e136629 100644 --- a/ui_src/src/domain/messageJourney/components/poisonMessage/index.js +++ b/ui_src/src/domain/messageJourney/components/poisonMessage/index.js @@ -14,7 +14,7 @@ import './style.scss'; import React, { useState } from 'react'; import Button from 'components/button'; -import CustomCollapse from '../../../stationOverview/stationObservabilty/components/customCollapse'; +import CustomCollapse from 'domain/stationOverview/stationObservabilty/components/customCollapse'; import { Space } from 'antd'; import { httpRequest } from 'services/http'; import { ApiEndpoints } from 'const/apiEndpoints'; diff --git a/ui_src/src/domain/overview/integrations/index.js b/ui_src/src/domain/overview/integrations/index.js index 0adf048e3..04e9d988f 100644 --- a/ui_src/src/domain/overview/integrations/index.js +++ b/ui_src/src/domain/overview/integrations/index.js @@ -20,9 +20,9 @@ import slackLogo from 'assets/images/slackLogo.svg'; import s3Logo from 'assets/images/s3Logo.svg'; import pathDomains from 'router'; import Modal from 'components/modal'; -import SlackIntegration from 'domain/administration/integrations/components/slackIntegration'; -import S3Integration from 'domain/administration/integrations/components/s3Integration'; -import DebeziumIntegration from 'domain/administration/integrations/components/debeziumIntegration'; +import SlackIntegration from '../../administration/integrations/components/slackIntegration'; +import S3Integration from '../../administration/integrations/components/s3Integration'; +import DebeziumIntegration from '../../administration/integrations/components/debeziumIntegration'; import { httpRequest } from 'services/http'; import { ApiEndpoints } from 'const/apiEndpoints'; import CheckCircleIcon from '@material-ui/icons/CheckCircle'; diff --git a/ui_src/src/domain/schema/components/schemaBox/index.js b/ui_src/src/domain/schema/components/schemaBox/index.js index ebcd0cf25..106d2d6de 100644 --- a/ui_src/src/domain/schema/components/schemaBox/index.js +++ b/ui_src/src/domain/schema/components/schemaBox/index.js @@ -13,7 +13,6 @@ import './style.scss'; import { CloseRounded } from '@material-ui/icons'; -import Drawer from "components/drawer"; import React, { useState, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; @@ -28,6 +27,7 @@ import OverflowTip from 'components/tooltip/overflowtip'; import pathDomains from 'router'; import { ApiEndpoints } from 'const/apiEndpoints'; import { httpRequest } from 'services/http'; +import Drawer from "components/drawer"; function SchemaBox({ schemaBox, handleCheckedClick, isCheck }) { const history = useHistory(); diff --git a/ui_src/src/domain/schema/components/schemaDetails/index.js b/ui_src/src/domain/schema/components/schemaDetails/index.js index 89322e433..84faa3e3a 100644 --- a/ui_src/src/domain/schema/components/schemaDetails/index.js +++ b/ui_src/src/domain/schema/components/schemaDetails/index.js @@ -451,7 +451,7 @@ function SchemaDetails({ schemaName, closeDrawer }) { fontFamily: 'Inter' }} language={schemaDetails?.type === 'protobuf' ? 'proto' : schemaDetails?.type === 'avro' ? 'json' : schemaDetails?.type} - height="calc(100% - 55px)" + height="calc(100% - 104px)" defaultValue={versionSelected?.schema_content} value={newVersion} onChange={(value) => { diff --git a/ui_src/src/domain/stationOverview/components/generateTokenModal/index.js b/ui_src/src/domain/stationOverview/components/generateTokenModal/index.js index 82e2b7823..a68f27ef9 100644 --- a/ui_src/src/domain/stationOverview/components/generateTokenModal/index.js +++ b/ui_src/src/domain/stationOverview/components/generateTokenModal/index.js @@ -21,7 +21,7 @@ import { httpRequest } from 'services/http'; import Button from 'components/button'; import Input from 'components/Input'; import Copy from 'components/copy'; -import CreateUserDetails from '../../../users/createUserDetails'; +import CreateUserDetails from 'domain/users/createUserDetails'; import Drawer from "components/drawer"; import { LOCAL_STORAGE_ACCOUNT_ID, LOCAL_STORAGE_USER_PASS_BASED_AUTH } from 'const/localStorageConsts'; import { isCloud } from 'services/valueConvertor'; @@ -118,7 +118,7 @@ const GenerateTokenModal = ({ host, close, returnToken, restProducer, stationNam <> {restProducer ? (

- Produce and consume data using the REST protocol. Great for webhooks ingestion and connecting your Memphis with other platforms + Produce and consume data using the REST protocol. Great for webhooks ingestion and connecting your Memphis with 3rd parties

) : (

@@ -224,15 +224,15 @@ const GenerateTokenModal = ({ host, close, returnToken, restProducer, stationNam

Produce

produceConsumeRest('produce')}> - {`${host}.restgw.cloud.memphis.dev/stations/${stationName}/produce/single?authorization=${userToken?.jwt_refresh_token}`} - + {`${host}/stations/${stationName}/produce/single?authorization=${userToken?.jwt_refresh_token}`} +

Consume

produceConsumeRest('consume')}> - {`${host}.restgw.cloud.memphis.dev/stations/${stationName}/consume/batch?authorization=${userToken?.jwt_refresh_token}`} - + {`${host}/stations/${stationName}/consume/batch?authorization=${userToken?.jwt_refresh_token}`} +
diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/ProduceConsumList/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/ProduceConsumList/index.js index 67ba2d1fb..e5445c5a5 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/ProduceConsumList/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/ProduceConsumList/index.js @@ -34,7 +34,7 @@ import SdkExample from 'components/sdkExample'; import CustomCollapse from '../components/customCollapse'; import Button from 'components/button'; import Modal from 'components/modal'; -import GenerateTokenModal from '../../../stationOverview/components/generateTokenModal'; +import GenerateTokenModal from 'domain/stationOverview/components/generateTokenModal'; import { StationStoreContext } from 'domain/stationOverview'; import ProduceMessages from 'components/produceMessages'; import ConnectorModal from 'components/connectorModal'; @@ -51,7 +51,6 @@ import { SiDotnet } from 'react-icons/si'; import { DiJavascript1 } from 'react-icons/di'; import ConnectorInfo from 'components/connectorInfo'; import RunBenchmarkModal from 'components/runBenchmarkModal'; -import { connectorTypesSource, connectorTypesSink } from '../../../../connectors'; const overlayStylesConnectors = { borderRadius: '8px', @@ -103,21 +102,21 @@ const ProduceConsumList = ({ producer }) => { const [loading, setLoader] = useState(false); const producerItemsList = [ { - action: 'Produce synthetic data', + action: 'Produce Synthetic Data', onClick: () => { setOpenProduceMessages(true); setOpenProducerPopover(false); } }, { - action: 'Develop a producer', + action: 'Develop a Producer', onClick: () => { setOpenCreateProducer(true); setOpenProducerPopover(false); } }, { - action: 'Produce using REST', + action: 'Produce using REST protocol', onClick: () => { setGenerateModal(true); setOpenProducerPopover(false); @@ -131,7 +130,7 @@ const ProduceConsumList = ({ producer }) => { } }, { - action: 'Add a source', + action: 'Add a Source', onClick: () => { setOpenConnectorModal(true); setOpenProducerPopover(false); @@ -141,14 +140,14 @@ const ProduceConsumList = ({ producer }) => { const consumeItemsList = [ { - action: 'Develop a consumer', + action: 'Develop a Consumer', onClick: () => { setOpenCreateConsumer(true); setOpenProducerPopover(false); } }, { - action: 'Consume using REST', + action: 'Consume using REST protocol', onClick: () => { setGenerateModal(true); setOpenProducerPopover(false); @@ -162,7 +161,7 @@ const ProduceConsumList = ({ producer }) => { } }, { - action: 'Add a sink', + action: 'Add a Sink', onClick: () => { setOpenConnectorModal(true); setOpenProducerPopover(false); @@ -401,13 +400,6 @@ const ProduceConsumList = ({ producer }) => { return
{iconComponent}
; } - const getIconByConnector = (item, connectorType) => { - let connector; - if (connectorType === 'source') connector = connectorTypesSource.find((connector) => connector?.name?.toLowerCase() === item?.type); - else connector = connectorTypesSink.find((connector) => connector?.name?.toLowerCase() === item?.type); - return {item?.type} || ; - }; - return (
@@ -494,7 +486,9 @@ const ProduceConsumList = ({ producer }) => {
onSelectedRow(index, 'producer')}> {row?.connector_connection_id ? ( - {getIconByConnector(row, 'source')} + + + ) : ( {getIconByLang(row)} )} @@ -592,7 +586,9 @@ const ProduceConsumList = ({ producer }) => {
onSelectedRow(index, 'consumer')}> {row?.connector_connection_id ? ( - {getIconByConnector(row, 'sink')} + + + ) : ( {getIconByLang(row)} )} @@ -764,7 +760,8 @@ const ProduceConsumList = ({ producer }) => {
-

Produce synthetic data

+

Produce a message

+
} className={'modal-wrapper produce-modal'} diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/index.js index d86c2a0e1..49cc0522e 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/index.js @@ -21,8 +21,8 @@ import { IoClose } from 'react-icons/io5'; import { ApiEndpoints } from 'const/apiEndpoints'; import { httpRequest } from 'services/http'; import { convertLongNumbers } from 'services/valueConvertor'; -import { StationStoreContext } from '../../../'; -import FunctionDetails from '../../../../functions/components/functionDetails'; +import { StationStoreContext } from 'domain/stationOverview'; +import FunctionDetails from 'domain/functions/components/functionDetails'; import Drawer from "components/drawer"; import Tooltip from 'components/tooltip/tooltip'; @@ -42,7 +42,7 @@ export default function FunctionCard({ const [popoverFunctionContextMenu, setPopoverFunctionContextMenu] = useState(false); const [openFunctionDetails, setOpenFunctionDetails] = useState(false); const [selectedFunction, setSelectedFunction] = useState(); - const [averageProcessingTime, setAverageProcessingTime] = useState(null); + useEffect(() => { setIsActive(!isDeactive); }, [isDeactive]); @@ -53,7 +53,6 @@ export default function FunctionCard({ func.rates = Math.floor(Math.random() * (80 - 50 + 1)) + 50; func.forks = Math.floor(Math.random() * (100 - 80 + 1)) + 80; setSelectedFunction(func); - getFunctionDetails(); }, [functionItem]); const functionContextMenuStyles = { @@ -64,15 +63,6 @@ export default function FunctionCard({ width: '150px' }; - const getFunctionDetails = async () => { - try { - const response = await httpRequest('GET', `${ApiEndpoints.GET_FUNCTION_DETAILS}?function_id=${functionItem?.id}`); - setAverageProcessingTime(response?.metrics?.average_processing_time); - } catch (e) { - return; - } - }; - const getFunctionsOverview = async () => { try { const data = await httpRequest( @@ -212,10 +202,8 @@ export default function FunctionCard({
-
- {selectedFunction?.name} -
- avg processing: {averageProcessingTime}/ms + + {selectedFunction?.name}
diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/style.scss b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/style.scss index 46477fa1a..b8e0b96bf 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/style.scss +++ b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionCard/style.scss @@ -83,27 +83,15 @@ font-weight: 600; line-height: normal; display: flex; - flex-direction: column; - - .function-name { - display: flex; - align-items: center; - gap: 6px; - width: 95px; - } + gap: 6px; + align-items: center; + padding-left: 7px; span { + width: 95px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; } - .processing { - display: flex; - justify-content: center; - text-align: center; - color: #737373 !important; - font-size: 10px; - margin-top: 5px; - } .deactivated { color: #737373 !important; } diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionData/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionData/index.js index b5e7089c1..a365d76dc 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionData/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionData/index.js @@ -17,7 +17,7 @@ import { ApiEndpoints } from 'const/apiEndpoints'; import { httpRequest } from 'services/http'; import Editor, { loader } from '@monaco-editor/react'; import * as monaco from 'monaco-editor'; -import { StationStoreContext } from '../../../'; +import { StationStoreContext } from 'domain/stationOverview'; import CustomTabs from 'components/Tabs'; import FunctionLogs from '../functionLogs'; import FunctionInformation from '../functionInformation'; diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsModal/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsModal/index.js index 7180e630d..2eacd8af3 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsModal/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsModal/index.js @@ -16,8 +16,8 @@ import { useState, useEffect, useContext } from 'react'; import { LoadingOutlined } from '@ant-design/icons'; import { Spin } from 'antd'; import CustomTabs from 'components/Tabs'; -import FunctionBox from '../../../../functions/components/functionBox'; -import FunctionDetails from '../../../../functions/components/functionDetails'; +import FunctionBox from 'domain/functions/components/functionBox'; +import FunctionDetails from 'domain/functions/components/functionDetails'; import { getFunctionsTabs } from 'services/valueConvertor'; import SearchInput from 'components/searchInput'; import { ApiEndpoints } from 'const/apiEndpoints'; @@ -28,7 +28,7 @@ import Modal from 'components/modal'; import { ReactComponent as SearchIcon } from 'assets/images/searchIcon.svg'; import { ReactComponent as CheckShieldIcon } from 'assets/images/checkShieldIcon.svg'; import { ReactComponent as FunctionsModalIcon } from 'assets/images/vueSaxIcon.svg'; -import { StationStoreContext } from '../../../'; +import { StationStoreContext } from 'domain/stationOverview'; import { showMessages } from 'services/genericServices'; import { OWNER } from 'const/globalConst'; import RefreshButton from 'components/refreshButton'; diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsOverview/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsOverview/index.js index 482abee8f..02f11416b 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsOverview/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/components/functionsOverview/index.js @@ -16,7 +16,7 @@ import React, { useContext, useEffect, useState } from 'react'; import { ApiEndpoints } from 'const/apiEndpoints'; import { httpRequest } from 'services/http'; import { Context } from 'hooks/store'; -import { StationStoreContext } from '../../../'; +import { StationStoreContext } from 'domain/stationOverview'; import { ReactComponent as AddFunctionIcon } from 'assets/images/addFunction.svg'; import { ReactComponent as PlusIcon } from 'assets/images/plusIcon.svg'; import { ReactComponent as ProcessedIcon } from 'assets/images/processIcon.svg'; @@ -28,7 +28,7 @@ import Lottie from 'lottie-react'; import FunctionCard from '../functionCard'; import FunctionsModal from '../functionsModal'; import FunctionData from '../functionData'; -import FunctionDetails from '../../../../functions/components/functionDetails'; +import FunctionDetails from 'domain/functions/components/functionDetails'; import { StringCodec, JSONCodec } from 'nats.ws'; import Spinner from 'components/spinner'; diff --git a/ui_src/src/domain/stationOverview/stationObservabilty/index.js b/ui_src/src/domain/stationOverview/stationObservabilty/index.js index 248c63239..5c81e8670 100644 --- a/ui_src/src/domain/stationOverview/stationObservabilty/index.js +++ b/ui_src/src/domain/stationOverview/stationObservabilty/index.js @@ -21,7 +21,7 @@ import produceEmpty from 'assets/lotties/produce_empty.json'; import produce from 'assets/lotties/produce-many.json'; import consumer from 'assets/lotties/consume.json'; import ProduceConsumList from './ProduceConsumList'; -import { StationStoreContext } from 'domain/stationOverview'; +import { StationStoreContext } from '..'; import Messages from './messages'; const StationObservabilty = ({ referredFunction }) => { diff --git a/ui_src/src/domain/stationOverview/stationOverviewHeader/index.js b/ui_src/src/domain/stationOverview/stationOverviewHeader/index.js index 17667cdc1..f5ba40c4d 100644 --- a/ui_src/src/domain/stationOverview/stationOverviewHeader/index.js +++ b/ui_src/src/domain/stationOverview/stationOverviewHeader/index.js @@ -47,7 +47,7 @@ import Auditing from '../components/auditing'; import RefreshButton from 'components/refreshButton'; import AsyncTasks from 'components/asyncTasks'; import pathDomains from 'router'; -import { StationStoreContext } from 'domain/stationOverview'; +import { StationStoreContext } from '..'; import { TIERED_STORAGE_UPLOAD_INTERVAL, LOCAL_STORAGE_ACCOUNT_ID, LOCAL_STORAGE_ENV, LOCAL_STORAGE_BROKER_HOST } from 'const/localStorageConsts'; import { Context } from 'hooks/store'; diff --git a/ui_src/src/domain/stationsList/stationBoxOverview/index.js b/ui_src/src/domain/stationsList/stationBoxOverview/index.js index 8ea5475fc..986d60e0a 100644 --- a/ui_src/src/domain/stationsList/stationBoxOverview/index.js +++ b/ui_src/src/domain/stationsList/stationBoxOverview/index.js @@ -27,7 +27,7 @@ import { ReactComponent as ReplicasIcon } from 'assets/images/replicasIcon.svg'; import { ReactComponent as TotalMsgIcon } from 'assets/images/totalMsgIcon.svg'; import { ReactComponent as PoisonMsgIcon } from 'assets/images/poisonMsgIcon.svg'; import { ReactComponent as RemoteStorageIcon } from 'assets/images/remoteStorage.svg'; -import { ReactComponent as ClockIcon } from 'assets/images/TimeFill.svg'; +import { ReactComponent as ClockIcon } from 'assets/images/timeFill.svg'; import { ReactComponent as UserIcon } from 'assets/images/userPerson.svg'; import { ReactComponent as SchemaIcon } from 'assets/images/schemaIconActive.svg'; import { ReactComponent as StationIcon } from 'assets/images/stationsIconActive.svg'; diff --git a/ui_src/src/domain/users/createUserDetails/index.js b/ui_src/src/domain/users/createUserDetails/index.js index 52d8cb890..f03db5d8d 100644 --- a/ui_src/src/domain/users/createUserDetails/index.js +++ b/ui_src/src/domain/users/createUserDetails/index.js @@ -650,7 +650,7 @@ const CreateUserDetails = ({ createUserRef, closeModal, handleLoader, userList, rules={ rbacTypeRead === 'pattern' && [ { - pattern: /^[a-zA-Z0-9_\-., ]+(\..*)?$/, + pattern: /^[a-zA-Z0-9_\-., ]+(\..*)?|\*$/, message: `Only alphanumeric and the '_', '-', '.', '*' characters are allowed` } ] @@ -710,7 +710,7 @@ const CreateUserDetails = ({ createUserRef, closeModal, handleLoader, userList, rules={ rbacTypeWrite === 'pattern' && [ { - pattern: /^[a-zA-Z0-9_\-., ]+(\..*)?$/, + pattern: /^[a-zA-Z0-9_\-., ]+(\..*)?|\*$/, message: `Only alphanumeric and the '_', '-', '.', '*' characters are allowed` } ] diff --git a/ui_src/src/domain/users/index.js b/ui_src/src/domain/users/index.js index 35ce83f27..1dfa4f774 100644 --- a/ui_src/src/domain/users/index.js +++ b/ui_src/src/domain/users/index.js @@ -15,8 +15,9 @@ import './style.scss'; import React, { useEffect, useContext, useState, useRef } from 'react'; import { AccountCircleRounded } from '@material-ui/icons'; -import { LOCAL_STORAGE_USER_PASS_BASED_AUTH, LOCAL_STORAGE_FULL_NAME, USER_IMAGE } from 'const/localStorageConsts'; +import { LOCAL_STORAGE_USER_PASS_BASED_AUTH } from 'const/localStorageConsts'; import { isCloud, parsingDate } from 'services/valueConvertor'; +import { ReactComponent as AddUserIcon } from 'assets/images/addUserIcon.svg'; import { ReactComponent as DeleteWrapperIcon } from 'assets/images/deleteWrapperIcon.svg'; import { ReactComponent as MailIcon } from 'assets/images/mailIcon.svg'; import { ReactComponent as DeleteIcon } from 'assets/images/deleteIcon.svg'; @@ -151,10 +152,8 @@ function Users() { } }; - const getAvatarSrc = (avatarId, full_name) => { - return ( - (localStorage.getItem(LOCAL_STORAGE_FULL_NAME) === full_name && localStorage.getItem(USER_IMAGE)) || require(`assets/images/bots/avatar${avatarId}.svg`) - ); + const getAvatarSrc = (avatarId) => { + return require(`assets/images/bots/avatar${avatarId}.svg`); }; const handleRemoveUser = async (name, type) => { @@ -304,7 +303,7 @@ function Users() { render: (text, record) => (
- avatar + avatar

{text}

@@ -361,12 +360,12 @@ function Users() { ) }, { - title: 'Last login', - key: 'last_login', - dataIndex: 'last_login', - render: (last_login) => ( + title: 'Creation date', + key: 'created_at', + dataIndex: 'created_at', + render: (created_at) => (
-

{parsingDate(last_login)}

+

{parsingDate(created_at)}

) }, diff --git a/ui_src/src/domain/users/style.scss b/ui_src/src/domain/users/style.scss index cc4a3f6bb..31857516c 100644 --- a/ui_src/src/domain/users/style.scss +++ b/ui_src/src/domain/users/style.scss @@ -54,9 +54,6 @@ svg { color: var(--purple); } - img { - border-radius: 50%; - } } .badgeOrange { min-width: unset !important; diff --git a/ui_src/src/index.js b/ui_src/src/index.js index a47236335..0475a8c13 100644 --- a/ui_src/src/index.js +++ b/ui_src/src/index.js @@ -16,18 +16,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -import './style.scss'; +import 'style.scss'; import { BrowserRouter } from 'react-router-dom'; import { StiggProvider } from '@stigg/react-sdk'; import ReactDOM from 'react-dom'; import React from 'react'; -import { isCloud } from './services/valueConvertor'; -import reportWebVitals from './reportWebVitals'; -import { STIGG_CLIENT_ID } from './config'; -import Store from './hooks/store'; -import App from './App'; +import { isCloud } from 'services/valueConvertor'; +import reportWebVitals from 'reportWebVitals'; +import { STIGG_CLIENT_ID } from 'config'; +import Store from 'hooks/store'; +import App from 'App'; const theme = { palette: { diff --git a/ui_src/src/services/auth.js b/ui_src/src/services/auth.js index c924c2062..5ddf1f7b6 100644 --- a/ui_src/src/services/auth.js +++ b/ui_src/src/services/auth.js @@ -10,7 +10,7 @@ // 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 { CLOUD_URL } from '../config'; +import { CLOUD_URL } from 'config'; import { LOCAL_STORAGE_ALREADY_LOGGED_IN, LOCAL_STORAGE_AVATAR_ID, @@ -44,8 +44,8 @@ import { LOCAL_STORAGE_ENTITLEMENTS, LOCAL_STORAGE_PLAN, LOCAL_STORAGE_FUNCTION_PAGE_VIEW -} from '../const/localStorageConsts'; -import pathDomains from '../router'; +} from 'const/localStorageConsts'; +import pathDomains from 'router'; import { isCloud } from './valueConvertor'; const AuthService = (function () { diff --git a/ui_src/src/services/decoder.js b/ui_src/src/services/decoder.js index cf276abf7..2cc4cbaac 100644 --- a/ui_src/src/services/decoder.js +++ b/ui_src/src/services/decoder.js @@ -1,6 +1,5 @@ -import { bufferToPrettyHex, parseInput } from './decoderFiles/hexUtils'; +import { parseInput } from './decoderFiles/hexUtils'; import { TYPES, typeToString } from './decoderFiles/protobufDecoder'; -import { decodeVarintParts, decodeFixed64, decodeFixed32 } from './decoderFiles/protobufPartDecoder'; import { BufferReader } from './decoderFiles/protobufDecoder'; import { v4 } from 'uuid'; diff --git a/ui_src/src/services/decoderFiles/protobufPartDecoder.js b/ui_src/src/services/decoderFiles/protobufPartDecoder.js index 90e0f6c29..896f444ba 100644 --- a/ui_src/src/services/decoderFiles/protobufPartDecoder.js +++ b/ui_src/src/services/decoderFiles/protobufPartDecoder.js @@ -1,6 +1,5 @@ import JSBI from 'jsbi'; import { bufferLeToBeHex } from './hexUtils'; -import { interpretAsSignedType } from './varintUtils'; export function decodeFixed32(value) { const floatValue = value.readFloatLE(0); diff --git a/ui_src/src/services/genericServices.js b/ui_src/src/services/genericServices.js index 7e343ab03..70b22d9eb 100644 --- a/ui_src/src/services/genericServices.js +++ b/ui_src/src/services/genericServices.js @@ -11,9 +11,9 @@ // 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 { useContext } from 'react'; import { message } from 'antd'; -import { ApiEndpoints } from '../const/apiEndpoints'; +import { ApiEndpoints } from 'const/apiEndpoints'; import { httpRequest } from './http'; -import { Context } from '../hooks/store'; +import { Context } from 'hooks/store'; export const showMessages = (type, content) => { switch (type) { diff --git a/ui_src/src/services/http.js b/ui_src/src/services/http.js index 0b3510372..5d8de27d0 100644 --- a/ui_src/src/services/http.js +++ b/ui_src/src/services/http.js @@ -12,13 +12,13 @@ import axios from 'axios'; -import { SERVER_URL, SHOWABLE_ERROR_STATUS_CODE, AUTHENTICATION_ERROR_STATUS_CODE, CLOUD_URL } from '../config'; -import { LOCAL_STORAGE_TOKEN } from '../const/localStorageConsts.js'; -import { ApiEndpoints } from '../const/apiEndpoints'; -import pathDomains from '../router'; +import { SERVER_URL, SHOWABLE_ERROR_STATUS_CODE, AUTHENTICATION_ERROR_STATUS_CODE, CLOUD_URL } from 'config'; +import { LOCAL_STORAGE_TOKEN } from 'const/localStorageConsts.js'; +import { ApiEndpoints } from 'const/apiEndpoints'; +import pathDomains from 'router'; import AuthService from './auth'; import { isCloud } from './valueConvertor'; -import EmailLink from '../components/emailLink'; +import EmailLink from 'components/emailLink'; import { showMessages } from './genericServices'; export async function httpRequest(method, endPointUrl, data = {}, headers = {}, queryParams = {}, authNeeded = true, timeout = 0, serverUrl = null, displayMsg = true) { diff --git a/ui_src/src/services/valueConvertor.js b/ui_src/src/services/valueConvertor.js index 8869383a1..543262801 100644 --- a/ui_src/src/services/valueConvertor.js +++ b/ui_src/src/services/valueConvertor.js @@ -10,9 +10,9 @@ // 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 { planType } from '../const/globalConst'; +import { planType } from 'const/globalConst'; import { decodeMessage } from './decoder'; -import { LOCAL_STORAGE_PLAN } from '../const/localStorageConsts'; +import { LOCAL_STORAGE_PLAN } from 'const/localStorageConsts'; export const convertDateToSeconds = (days, hours, minutes, seconds) => { let totalSeconds = 0; diff --git a/ui_src/src/utils/user.js b/ui_src/src/utils/user.js index 34c20182d..cafd73456 100644 --- a/ui_src/src/utils/user.js +++ b/ui_src/src/utils/user.js @@ -1,5 +1,6 @@ -import {LOCAL_STORAGE_USER_ID} from "../const/localStorageConsts"; +import { LOCAL_STORAGE_USER_ID } from "../const/localStorageConsts"; + export function isCurrentUser(userId) { const currentUserId = localStorage.getItem(LOCAL_STORAGE_USER_ID); return parseInt(userId) === parseInt(currentUserId); -} +} \ No newline at end of file