From 0e1d9e0eec03f7ea44294875c3a32be6a5cb7010 Mon Sep 17 00:00:00 2001 From: zivglik Date: Wed, 15 Nov 2023 13:53:13 +0200 Subject: [PATCH 1/5] fix bugs search algo --- .../Tables/Algorithms/AlgorithmsQueryTable.js | 7 ++++++- src/Routes/Tables/Algorithms/columns.js | 21 ++++++++++++------- .../Tables/Jobs/QueryTable/QueryForm.js | 1 + .../Tables/Pipelines/PipelinesQueryTable.js | 6 +++++- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/Routes/Tables/Algorithms/AlgorithmsQueryTable.js b/src/Routes/Tables/Algorithms/AlgorithmsQueryTable.js index e3762d73d..75e097f9b 100644 --- a/src/Routes/Tables/Algorithms/AlgorithmsQueryTable.js +++ b/src/Routes/Tables/Algorithms/AlgorithmsQueryTable.js @@ -27,7 +27,11 @@ const AlgorithmsQueryTable = ({ onSubmit, algorithmsList }) => { useEffect(() => { if (instanceFilters.algorithms.qAlgorithmName === null) { - form.resetFields(); + const qAlgorithmNameValue = form.getFieldValue('qAlgorithmName'); + if (qAlgorithmNameValue !== '') { + form.resetFields(); + } + setTimeout(() => { SubmitForm(null); }, 100); @@ -74,6 +78,7 @@ const AlgorithmsQueryTable = ({ onSubmit, algorithmsList }) => { filterOption={(inputValue, option) => option.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1 } + autoFocus allowClear onSearch={submitDebounced} onSelect={SubmitForm} diff --git a/src/Routes/Tables/Algorithms/columns.js b/src/Routes/Tables/Algorithms/columns.js index ac8ea5d25..161b47a86 100644 --- a/src/Routes/Tables/Algorithms/columns.js +++ b/src/Routes/Tables/Algorithms/columns.js @@ -1,9 +1,10 @@ import React from 'react'; import { WarningOutlined } from '@ant-design/icons'; -import { Tag } from 'antd'; +import { Tag, Tooltip, Typography } from 'antd'; import Moment from 'react-moment'; import { Ellipsis } from 'components/common'; import { sorter } from 'utils/stringHelper'; +import { copyToClipboard } from 'utils'; import { errorsCode } from '@hkube/consts'; import AlgorithmActions from './AlgorithmActions.react'; import AlgorithmBuildStats from './AlgorithmBuildStats.react'; @@ -18,7 +19,11 @@ const Memory = mem => {mem || 'No Memory Specified'}; const Cpu = cpu => {cpu || 'No CPU Assigned'}; const Image = algorithmImage => algorithmImage ? ( - + + copyToClipboard(algorithmImage)}> + {algorithmImage} + + ) : ( No Image ); @@ -41,7 +46,6 @@ const filterByImage = (value, record) => record.algorithmImage.includes(value); const sortByImage = (a, b) => sorter(a.algorithmImage, b.algorithmImage); const sortByMinHotWorkers = (a, b) => sorter(a.workerImage, b.workerImage); const sortByLastModified = (a, b) => sorter(a.modified, b.modified); - export default [ { width: '12%', @@ -52,6 +56,7 @@ export default [ render: Name, }, { + width: '40%', title: 'Algorithm Image', dataIndex: ['algorithmImage'], key: 'algorithmImage', @@ -60,28 +65,28 @@ export default [ render: Image, }, { - width: '10%', + width: '7%', title: 'Builds Stats', dataIndex: ['buildStats'], key: 'builds', render: BuildStats, }, { - width: '10%', + width: '5%', title: 'CPU', dataIndex: ['cpu'], key: 'cpu', render: Cpu, }, { - width: '10%', + width: '5%', title: 'Mem', dataIndex: ['mem'], key: 'mem', render: Memory, }, { - width: '10%', + width: '7%', title: 'Min Hot Workers', dataIndex: ['minHotWorkers'], key: 'minHotWorkers', @@ -97,7 +102,7 @@ export default [ render: LastModified, }, { - width: '20%', + width: '14%', title: 'Action', dataIndex: ['action'], key: 'action', diff --git a/src/Routes/Tables/Jobs/QueryTable/QueryForm.js b/src/Routes/Tables/Jobs/QueryTable/QueryForm.js index 9e57d2ed4..3edbcad36 100644 --- a/src/Routes/Tables/Jobs/QueryTable/QueryForm.js +++ b/src/Routes/Tables/Jobs/QueryTable/QueryForm.js @@ -120,6 +120,7 @@ const QueryForm = ({ onSubmit, params, zoomDate }) => { option.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1 } allowClear + autoFocus onSearch={SubmitForm} onSelect={SubmitForm} onClear={SubmitForm} diff --git a/src/Routes/Tables/Pipelines/PipelinesQueryTable.js b/src/Routes/Tables/Pipelines/PipelinesQueryTable.js index 624d2049c..721a11391 100644 --- a/src/Routes/Tables/Pipelines/PipelinesQueryTable.js +++ b/src/Routes/Tables/Pipelines/PipelinesQueryTable.js @@ -25,7 +25,10 @@ const PipelinesQueryTable = ({ onSubmit, pipelinesList }) => { useEffect(() => { if (instanceFilters.pipelines.qPipelineName === null) { - form.resetFields(); + const qqPipelineNameValue = form.getFieldValue('qPipelineName'); + if (qqPipelineNameValue !== '') { + form.resetFields(); + } setTimeout(() => { SubmitForm(null); }, 100); @@ -72,6 +75,7 @@ const PipelinesQueryTable = ({ onSubmit, pipelinesList }) => { filterOption={(inputValue, option) => option.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1 } + autoFocus allowClear onSearch={submitDebounced} onSelect={SubmitForm} From 24970a1e96ae9d501bb648a12f541de8e79023fb Mon Sep 17 00:00:00 2001 From: zivglik Date: Thu, 16 Nov 2023 11:32:17 +0200 Subject: [PATCH 2/5] fix pipeline max statless ui --- .../SidebarRight/AddPipeline/Steps/Nodes/inputNumberSwitch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Routes/SidebarRight/AddPipeline/Steps/Nodes/inputNumberSwitch.js b/src/Routes/SidebarRight/AddPipeline/Steps/Nodes/inputNumberSwitch.js index 2bc03f80d..f4b1f6c5f 100644 --- a/src/Routes/SidebarRight/AddPipeline/Steps/Nodes/inputNumberSwitch.js +++ b/src/Routes/SidebarRight/AddPipeline/Steps/Nodes/inputNumberSwitch.js @@ -15,7 +15,7 @@ const InputNumberSwitch = forwardRef( }, ref ) => { - const [disabled, setDisabled] = useState(value > 0); + const [disabled, setDisabled] = useState(!(value > 0)); const [numberValue, setNumberValue] = useState(value); // Handle the switch change event From 04957b853630db1b13109371c7f5f7b430cc07c0 Mon Sep 17 00:00:00 2001 From: zivglik Date: Wed, 22 Nov 2023 14:39:55 +0200 Subject: [PATCH 3/5] fix sort minHotWorkers --- src/Routes/Tables/Algorithms/columns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Routes/Tables/Algorithms/columns.js b/src/Routes/Tables/Algorithms/columns.js index 161b47a86..75e83f6ae 100644 --- a/src/Routes/Tables/Algorithms/columns.js +++ b/src/Routes/Tables/Algorithms/columns.js @@ -44,7 +44,7 @@ const renderAction = (_, record) => ; const sortByName = (a, b) => sorter(a.name, b.name); const filterByImage = (value, record) => record.algorithmImage.includes(value); const sortByImage = (a, b) => sorter(a.algorithmImage, b.algorithmImage); -const sortByMinHotWorkers = (a, b) => sorter(a.workerImage, b.workerImage); +const sortByMinHotWorkers = (a, b) => sorter(a.minHotWorkers, b.minHotWorkers); const sortByLastModified = (a, b) => sorter(a.modified, b.modified); export default [ { From 2c26da5104cd9dc01eb0bfe1e734b769af67108f Mon Sep 17 00:00:00 2001 From: zivglik Date: Wed, 29 Nov 2023 08:50:12 +0200 Subject: [PATCH 4/5] fix error algo not found in add pipeline --- src/hooks/useWizard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/useWizard.js b/src/hooks/useWizard.js index ff9b5fb2a..6d1eb748d 100644 --- a/src/hooks/useWizard.js +++ b/src/hooks/useWizard.js @@ -96,7 +96,9 @@ const useWizard = ( ); const setForm = useCallback(() => { - setValuesState(getFormattedFormValues()); + setTimeout(() => { + setValuesState(getFormattedFormValues()); + }, 100); }, [getFormattedFormValues, setValuesState]); return { From 2be81b187503e95769564382603266ca61e7b72e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 29 Nov 2023 09:31:59 +0000 Subject: [PATCH 5/5] fix error algo not found in add pipeline .... bump version [skip ci] --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2db7d5d31..3fa027ff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "simulator", - "version": "2.6.28", + "version": "2.6.29", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 674951922..e0a21163a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simulator", - "version": "2.6.28", + "version": "2.6.29", "description": "The Hkube Dashboard", "private": true, "homepage": ".",