Skip to content

Commit 047ab30

Browse files
committed
chore: merge main
2 parents 4d9f92c + b06acb1 commit 047ab30

File tree

64 files changed

+1699
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1699
-373
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ HIDE_GITOPS_OR_HELM_OPTION=true
2424
CONFIGURABLE_TIMEOUT=
2525
HIDE_APPLICATION_GROUPS=true
2626
REACT_APP_K8S_CLIENT=false
27-
USE_V2=false
2827
CLUSTER_TERMINAL_CONNECTION_POLLING_INTERVAL=7000
2928
CLUSTER_TERMINAL_CONNECTION_RETRY_COUNT=7
3029
ENABLE_CHART_SEARCH_IN_HELM_DEPLOY=false

config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
| SENTRY_PERFORMANCE_ENABLED | false | To send persormance sentry |
1616
| SENTRY_DSN | '' | SENTRY Data Source Name |
1717
| SENTRY_TRACES_SAMPLE_RATE | 0.2 | Rate at which data send to sentry.(min=0 max=1)|
18-
| USE_V2 | "true" | Use the v2 APIs |
1918
| ENABLE_RESTART_WORKLOAD | "false" | Show restart pods option in app details page |
2019
| ENABLE_BUILD_CONTEXT | "true" | Enable build context in Devtron UI |
2120
| FORCE_SECURITY_SCANNING | "false" | Force security scanning |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.0.59-beta-14",
7+
"@devtron-labs/devtron-fe-common-lib": "0.0.61",
88
"@rjsf/core": "^5.13.3",
99
"@rjsf/utils": "^5.13.3",
1010
"@rjsf/validator-ajv8": "^5.13.3",
Lines changed: 7 additions & 0 deletions
Loading

src/assets/icons/ic-lines.svg

Lines changed: 3 additions & 0 deletions
Loading

src/components/ApplicationGroup/CreateAppGroup.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
Checkbox,
44
CHECKBOX_VALUE,
55
ConditionalWrap,
6+
CustomInput,
67
Drawer,
78
GenericEmptyState,
89
Progressing,
@@ -327,25 +328,17 @@ export default function CreateAppGroup({
327328
return (
328329
<div className="p-20 bcn-0 dc__overflow-auto" style={{ height: 'calc(100vh - 128px)' }}>
329330
<div className="form__row mb-16">
330-
<span className="form__label dc__required-field">Name</span>
331-
<input
331+
<CustomInput
332+
label="Name"
332333
tabIndex={1}
333-
className="form__input"
334-
autoComplete="off"
335334
placeholder="Enter filter name"
336-
type="text"
337335
value={appGroupName}
338336
name="name"
339337
onChange={onInputChange}
340338
disabled={selectedAppGroup && !!selectedAppGroup.value}
339+
isRequiredField={true}
340+
error={showErrorMsg && nameErrorMessage()}
341341
/>
342-
343-
{showErrorMsg && (
344-
<span className="form__error">
345-
<Error className="form__icon form__icon--error" />
346-
{nameErrorMessage()}
347-
</span>
348-
)}
349342
</div>
350343
<div className="form__row mb-16">
351344
<span className="form__label">Description (Max 50 characters)</span>

src/components/ClusterNodes/ClusterSelectionList.tsx

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import React, { useState, useEffect } from 'react'
22
import { useHistory, useLocation } from 'react-router-dom'
3-
import { ReactComponent as Search } from '../../assets/icons/ic-search.svg'
4-
import { ReactComponent as Clear } from '../../assets/icons/ic-error.svg'
53
import { handleUTCTime } from '../common'
6-
import { Progressing } from '@devtron-labs/devtron-fe-common-lib'
4+
import { Progressing, SearchBar } from '@devtron-labs/devtron-fe-common-lib'
75
import { ClusterDetail } from './types'
86
import { ReactComponent as Error } from '../../assets/icons/ic-error-exclamation.svg'
97
import { ReactComponent as Success } from '../../assets/icons/appstatus/healthy.svg'
@@ -73,37 +71,36 @@ export default function ClusterSelectionList({
7371
setSearchText('')
7472
}
7573

76-
const handleFilterKeyPress = (event): void => {
77-
const theKeyCode = event.key
78-
if (theKeyCode === 'Enter') {
79-
handleFilterChanges(event.target.value)
74+
const handleFilterKeyPress = (value): void => {
75+
handleFilterChanges(value)
8076
setSearchApplied(true)
81-
} else if (theKeyCode === 'Backspace' && searchText.length === 1) {
82-
clearSearch()
83-
}
77+
}
78+
79+
const handleSearchChange = (value): void => {
80+
setSearchText(value.trim())
81+
}
82+
83+
const handleOnBlur = (event): void => {
84+
event.stopPropagation()
85+
let _searchText = event.target.value
86+
_searchText = _searchText?.trim()
87+
handleFilterChanges(_searchText)
88+
setSearchText(_searchText)
8489
}
8590

8691
const renderSearch = (): JSX.Element => {
8792
return (
88-
<div className="search dc__position-rel margin-right-0 en-2 bw-1 br-4 h-32">
89-
<Search className="search__icon icon-dim-18" />
90-
<input
91-
type="text"
92-
placeholder="Search clusters"
93-
value={searchText}
94-
className="search__input"
95-
onChange={(event) => {
96-
setSearchText(event.target.value)
97-
}}
98-
onKeyDown={handleFilterKeyPress}
99-
disabled={clusterListLoader}
100-
/>
101-
{searchApplied && (
102-
<button className="search__clear-button" type="button" onClick={clearSearch}>
103-
<Clear className="icon-dim-18 icon-n4 dc__vertical-align-middle" />
104-
</button>
105-
)}
106-
</div>
93+
<SearchBar
94+
initialSearchText={searchText}
95+
handleSearchChange={handleSearchChange}
96+
handleEnter={handleFilterKeyPress}
97+
containerClassName="w-250-imp"
98+
inputProps={{
99+
placeholder: 'Search clusters',
100+
autoFocus: true,
101+
disabled: minLoader,
102+
}}
103+
/>
107104
)
108105
}
109106

src/components/CustomChart/UploadChartModal.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useRef, useState } from 'react'
22
import { ButtonWithLoader } from '../common'
3-
import { showError, VisibleModal } from '@devtron-labs/devtron-fe-common-lib'
3+
import { CustomInput, noop, showError, VisibleModal } from '@devtron-labs/devtron-fe-common-lib'
44
import { ReactComponent as CloseIcon } from '../../assets/icons/ic-close.svg'
55
import { uploadChart, validateChart } from './customChart.service'
66
import errorImage from '../../assets/img/ic_upload_chart_error.png'
@@ -121,14 +121,14 @@ export default function UploadChartModal({ closeUploadPopup }: UploadChartModalT
121121
)}
122122
<div>
123123
<div>
124-
<span className="fs-13 fw-4 cn-7 dc__required-field">
125-
Chart Name
126-
</span>
127-
<input
128-
type="text"
129-
className="w-100 br-4 en-2 bw-1 mt-6 form__input"
124+
<CustomInput
125+
label="Chart Name"
126+
name="chartName"
127+
onChange={noop}
128+
rootClassName="w-100 br-4 en-2 bw-1 mt-6 form__input"
130129
disabled
131130
value={chartDetail.chartName}
131+
isRequiredField={true}
132132
/>
133133
</div>
134134
<div className="mt-16">

0 commit comments

Comments
 (0)