Skip to content

Commit

Permalink
Merge pull request #1593 from memphisdev/bugfix-RND-401-function-the-…
Browse files Browse the repository at this point in the history
…loading-indication-when-pressing-install-function-looks-empty

Function - The loading indication when pressing install function icon empty
  • Loading branch information
otabek-memphis authored Jan 2, 2024
2 parents ce226ed + 41a1c1e commit 4882706
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ui_src/src/components/connectorError/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const ConnectorError = ({ open, clickOutside, connectorId }) => {

return (
<Modal
header={'Connector Logs'}
header={'Connector Errors'}
className={'modal-wrapper produce-modal'}
width="550px"
height="50vh"
Expand Down
38 changes: 37 additions & 1 deletion ui_src/src/components/customSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import './style.scss';
import { ArrowDropDownRounded } from '@material-ui/icons';
import { useHistory } from 'react-router-dom';
import { BsPlus } from 'react-icons/bs';
import { Select } from 'antd';
import { Divider, Select, Space } from 'antd';
import React from 'react';

import SchemaIconSelect from 'assets/images/schemaIconSelect.svg';
Expand Down Expand Up @@ -86,6 +86,42 @@ const CustomSelect = ({ options, onChange, value, placeholder, type = 'schema',
)}
</div>
}
dropdownRender={(menu) => (
<>
{menu}
{type === 'user' && options.length > 0 && (
<>
<Divider
style={{
margin: '8px 0',
}}
/>
<Space
style={{
padding: '0 20px 4px',
}}
>
<Button
placeholder={
<div className="create-btn">
<BsPlus style={{color: '#6557FF', fontSize: '18px'}}/>
<p>Create a user</p>
</div>
}
width="83px"
height="32px"
colorType="purple"
radiusType="circle"
backgroundColorType={'none'}
fontSize="12px"
fontWeight="600"
onClick={() => handleCreateNew()}
/>
</Space>
</>
)}
</>
)}
>
{type === 'dls' && options.length > 0 && (
<Option value={null}>
Expand Down
4 changes: 2 additions & 2 deletions ui_src/src/components/customSelect/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
.schema-name {
font-family: 'InterMedium';
font-size: 16px;
font-size: 14px;
margin: 0;
margin-left: 10px;
}
Expand Down Expand Up @@ -113,7 +113,7 @@
.title {
color: #1d1d1d;
font-family: 'InterMedium';
font-size: 16px;
font-size: 14px;
line-height: 16px;
}
.sub-title {
Expand Down
9 changes: 4 additions & 5 deletions ui_src/src/components/sdkExample/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti
};

useEffect(() => {
if (!consumer) {
getAllUsers();
}
getAllUsers();
}, []);

useEffect(() => {
Expand Down Expand Up @@ -151,9 +149,10 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti
setFormFields({ ...formFields, headersList });
};

const handleAddUser = (userData) => {
const handleAddUser = async (userData) => {
setCreateUserLoader(false);
addUserModalFlip(false);
await getAllUsers();
updateFormFields('userName', userData.username);
};

Expand Down Expand Up @@ -562,7 +561,7 @@ const SdkExample = ({ consumer, showTabs = true, stationName, username, connecti
placeholder={'Select user'}
value={formFields.userName}
options={users}
onChange={(e) => updateFormFields('userName', e)}
onChange={(e) => {updateFormFields('userName', e)}}
type="user"
handleCreateNew={() => addUserModalFlip(true)}
showCreatedBy={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
padding: 1vw;
min-width: 700px;
height: 100%;

.button-container.uninstall-btn button {
opacity: 1!important;
}

.ant-btn > .ant-btn-loading-icon .anticon {
padding-right: 0px !important;
color: var(--purple);
Expand Down

0 comments on commit 4882706

Please sign in to comment.