Skip to content

Commit 30740ac

Browse files
committed
Merge branch 'main' of github.com:devtron-labs/devtron-fe-common-lib into feat/config-diff-phase-1
2 parents ec7d7b6 + 20e9345 commit 30740ac

26 files changed

+237
-108
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.1.9-beta-9",
3+
"version": "0.1.12",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const DOCUMENTATION = {
2626
APP_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/create-application#tags`,
2727
APP_OVERVIEW_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/overview#manage-tags`,
2828
BLOB_STORAGE: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/getting-started/install/installation-configuration#configuration-of-blob-storage`,
29+
GLOBAL_CONFIG_BUILD_INFRA: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/global-configurations/build-infra`,
2930
}
3031

3132
export const PATTERNS = {

src/Common/ErrorScreenManager.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import notFound from '../Assets/Img/ic-not-found.svg'
1818
import badRequest from '../Assets/Img/ic-page-not-found.svg'
1919
import unauthorized from '../Assets/Img/ic-not-authorized.svg'
20-
import { ERROR_STATUS_CODE, ERROR_EMPTY_SCREEN, ROUTES } from './Constants'
20+
import { ERROR_STATUS_CODE, ERROR_EMPTY_SCREEN } from './Constants'
2121
import Reload from './Reload'
2222
import ErrorPage from './ErrorPage'
2323
import { ErrorScreenManagerProps, ImageType } from './Types'
@@ -28,7 +28,7 @@ const ErrorScreenManager = ({
2828
subtitle,
2929
reloadClass,
3030
heightToDeduct,
31-
redirectURL = ROUTES.APP_LIST,
31+
redirectURL,
3232
}: ErrorScreenManagerProps) => {
3333
const getMessage = () => {
3434
switch (code) {

src/Common/MultiSelectCustomization.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,23 @@ import { Checkbox } from './Checkbox'
2323
import { CHECKBOX_VALUE } from './Types'
2424

2525
export const Option = (props) => {
26-
const { selectOption, data } = props
26+
const { selectOption, data, isDisabled } = props
2727

2828
const handleChange = (e) => {
2929
selectOption(data)
3030
}
3131

3232
return (
3333
<div
34-
className="flex left pl-12 cursor dc__gap-8"
34+
className={`flex left pl-12 cursor dc__gap-8 ${isDisabled ? 'dc__disabled' : ''}`}
3535
style={{ background: props.isFocused ? 'var(--N100)' : 'transparent' }}
3636
>
3737
<Checkbox
3838
isChecked={props.isSelected || false}
3939
onChange={handleChange}
4040
value={CHECKBOX_VALUE.CHECKED}
4141
rootClassName="mb-0 w-20"
42+
disabled={isDisabled || false}
4243
/>
4344
<components.Option {...props} />
4445
</div>

src/Common/Types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export interface TippyCustomizedProps {
100100
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
101101
onImageLoadError?: (e) => void
102102
onClose?: () => void
103-
infoText?: string
103+
infoText?: React.ReactNode
104104
showCloseButton?: boolean
105105
arrow?: boolean
106106
interactive?: boolean

src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { DescriptorProps } from './types'
18-
import { BreadCrumb } from '../../../Common'
18+
import { BreadCrumb, DOCUMENTATION } from '../../../Common'
1919
import { BUILD_INFRA_TEXT } from './constants'
2020
import { InfoIconTippy } from '../../../Shared'
2121

@@ -34,7 +34,9 @@ const Descriptor = ({
3434
infoText={tippyInfoText ?? BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP}
3535
additionalContent={tippyAdditionalContent}
3636
heading={BUILD_INFRA_TEXT.HEADING}
37-
iconClassName="icon-dim-20"
37+
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_BUILD_INFRA}
38+
documentationLinkText="View Documentation"
39+
iconClassName="icon-dim-20 fcn-6"
3840
/>
3941
</div>
4042

src/Shared/Components/ButtonWithSelector/ButtonWithSelector.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { ReactComponent as ICDropdown } from '../../../Assets/Icon/ic-chevron-do
1919
import { PopupMenu } from '../../../Common'
2020
import { ButtonWithSelectorProps } from './types'
2121
import './buttonWithSelector.scss'
22+
import { ButtonWithLoader } from '../ButtonWithLoader'
2223

2324
/**
2425
* Button With Selector
@@ -42,19 +43,21 @@ const ButtonWithSelector = ({
4243
popUpBodyClassName = '',
4344
showPopUp = true,
4445
disabled = false,
46+
isLoading = false,
4547
}: ButtonWithSelectorProps) => {
4648
const [isMenuOpen, setIsMenuOpen] = useState<boolean>(false)
4749

4850
return (
4951
<div className="flexbox bcb-5 br-4">
50-
<button
51-
className={`cta flex h-28 ${showPopUp ? 'dc__no-right-radius' : ''} dc__no-border-imp fs-12 fw-6 lh-20-imp ${className}`}
52+
<ButtonWithLoader
53+
isLoading={isLoading}
54+
rootClassName={`cta flex h-28 ${showPopUp ? 'dc__no-right-radius' : ''} dc__no-border-imp fs-12 fw-6 lh-20-imp ${className}`}
5255
type="button"
5356
onClick={onClick}
54-
disabled={disabled}
57+
disabled={isLoading || disabled}
5558
>
5659
{content}
57-
</button>
60+
</ButtonWithLoader>
5861
{showPopUp && (
5962
<PopupMenu autoClose autoPosition onToggleCallback={setIsMenuOpen}>
6063
<PopupMenu.Button

src/Shared/Components/ButtonWithSelector/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ export interface ButtonWithSelectorProps {
2424
popUpBodyClassName?: string
2525
showPopUp?: boolean
2626
disabled?: boolean
27+
isLoading?: boolean
2728
}

src/Shared/Components/CICDHistory/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export { default as CDEmptyState } from './CDEmptyState'
2121
export { default as DeploymentStatusDetailBreakdown } from './DeploymentStatusBreakdown'
2222
export { default as AppStatusDetailsChart } from './AppStatusDetailsChart'
2323
export { default as DeploymentDetailSteps } from './DeploymentDetailSteps'
24+
export { default as DetectBottom } from './DetectBottom'
2425
export * from './types'
2526
export * from './service'
2627
export * from './History.components'

0 commit comments

Comments
 (0)