Skip to content

Commit 20e9345

Browse files
authored
Merge pull request #197 from devtron-labs/feat/release-track-apps
feat: add support for apps in release track
2 parents 1cc252c + f2e9dcd commit 20e9345

20 files changed

+185
-6690
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
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.11",
3+
"version": "0.1.12",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -109,4 +109,4 @@
109109
"monaco-editor": "0.44.0"
110110
}
111111
}
112-
}
112+
}

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/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'

src/Shared/Components/EnvironmentSelector/EnvironmentSelector.component.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
import { useMemo } from 'react'

src/Shared/Components/EnvironmentSelector/constants.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
export const ENVIRONMENT_SELECTOR_TEXT = {
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
export { default as EnvironmentSelector } from './EnvironmentSelector.component'

src/Shared/Components/EnvironmentSelector/service.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
import { get, ResponseType, ROUTES, showError } from '../../../Common'

src/Shared/Components/EnvironmentSelector/types.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
import { OptionType } from '../../../Common'

src/Shared/Components/EnvironmentSelector/utils.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
/*
2-
* Copyright (c) 2024 Devtron Inc.
3-
* All rights reserved.
4-
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
1615
*/
1716

1817
import { OptionType } from '../../../Common'

src/Shared/Components/IframeContainer/IframeContainer.component.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import IframeElement from './IframeElement'
218
import { IframeContainerProps } from './types'
319

src/Shared/Components/IframeContainer/IframeElement.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
.custom-panel {
218
&--iframe-element {
319
margin: 0 auto;

src/Shared/Components/IframeContainer/IframeElement.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import { useState } from 'react'
218
import Tippy from '@tippyjs/react'
319
import { IframeElementProps } from './types'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
export { default as IframeContainer } from './IframeContainer.component'

src/Shared/Components/IframeContainer/types.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2024. Devtron Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
interface IframeData {
218
URL: string
319
width: number

0 commit comments

Comments
 (0)