Skip to content

Commit fc1e814

Browse files
committed
Merge branch 'develop' into feat/chart-group-card
2 parents 3f340e6 + 268904d commit fc1e814

File tree

112 files changed

+3798
-3072
lines changed

Some content is hidden

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

112 files changed

+3798
-3072
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,5 @@ FEATURE_ASK_DEVTRON_EXPERT=false
7373
FEATURE_MANAGE_TRAFFIC_ENABLE=false
7474
FEATURE_REDFISH_NODE_ENABLE=false
7575
FEATURE_INFRA_PROVISION_INFO_BLOCK_HIDE=false
76+
FEATURE_FLUX_DEPLOYMENTS_ENABLE=false
77+
FEATURE_LINK_EXTERNAL_FLUX_ENABLE=false

Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
FROM node:22-alpine AS builder
1+
FROM node:20-alpine AS builder
22

3-
WORKDIR /app
4-
5-
RUN corepack enable yarn && \
6-
yarn set version 4.9.2
3+
RUN apk add --no-cache git
74

5+
WORKDIR /app
86
COPY package.json .
97
COPY yarn.lock .
10-
COPY .yarn/ .yarn/
11-
COPY .yarnrc.yml ./
128

13-
RUN apk add --no-cache git
14-
RUN yarn install --immutable --network-timeout 600000
9+
RUN yarn install --frozen-lockfile --network-timeout 600000
1510

11+
COPY src/ src
12+
COPY nginx.conf .
13+
COPY tsconfig.json .
14+
COPY vite.config.mts .
1615
COPY . .
1716

18-
RUN echo `git rev-parse --short HEAD` > health.html && \
17+
RUN echo `git rev-parse --short=9 HEAD` > health.html && \
1918
echo "" >> .env && \
20-
echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short HEAD)" >> .env && \
21-
yarn build
19+
echo "SENTRY_RELEASE_VERSION=dashboard@$(git rev-parse --short=9 HEAD)" >> .env
20+
21+
RUN yarn build
2222

2323
FROM fholzer/nginx-brotli:v1.26.2
2424

@@ -33,7 +33,6 @@ COPY ./nginx-default.conf /etc/nginx/conf.d/default.conf
3333

3434
WORKDIR /usr/share/nginx/html
3535

36-
3736
COPY --from=builder /app/env.sh .
3837
COPY --from=builder /app/.env .
3938
COPY --from=builder /app/health.html .

config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,7 @@
5050
| FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE | false | If enabled user can pass the manual gitops repo |
5151
| SENTRY_RELEASE_VERSION | | Sentry release Version |
5252
| LOGIN_PAGE_IMAGE | | Login page image url |
53+
| FEATURE_FLUX_DEPLOYMENTS_ENABLE | false | Enables flux cd deployment type for devtron apps and devtron charts |
54+
| FEATURE_LINK_EXTERNAL_FLUX_ENABLE | false | Enables external flux cd migration |
5355

5456
# DASHBOARD CONFIG SECRET

nginx.conf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ http {
2020
#tcp_nopush on;
2121
keepalive_timeout 65;
2222

23-
# gzip compression
2423
gzip on;
2524
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
2625
gzip_vary on;
@@ -29,10 +28,9 @@ http {
2928
gzip_comp_level 6;
3029
gzip_static on;
3130

32-
# btrotli compression
33-
brotli on;
31+
brotli off;
3432
brotli_comp_level 6;
35-
brotli_static on;
33+
brotli_static on; # enabling this will ensure to serve pre-compressed file only
3634
brotli_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
3735

3836
include /etc/nginx/conf.d/*.conf;

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": "1.16.0-pre-3",
7+
"@devtron-labs/devtron-fe-common-lib": "1.16.0-pre-7",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/Pages/App/Configurations/WorkflowEditor/CDPipelineDeploymentAppType/CDPipelineDeploymentAppType.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export const CDPipelineDeploymentAppType = ({
3434
isGitOpsRepoNotConfigured={isGitOpsRepoNotConfigured}
3535
gitOpsRepoConfigInfoBar={gitOpsRepoConfigInfoBar}
3636
areGitopsCredentialsConfigured={!isGitOpsInstalledButNotConfigured}
37+
// Want to show this when gitops module is installed, does not matter if it is configured or not
38+
showGitOpsOption={!noGitOpsModuleInstalledAndConfigured || isGitOpsInstalledButNotConfigured}
3739
/>
3840
</div>
3941
)

src/Pages/App/Configurations/WorkflowEditor/CreateCICDPipeline/CreateCICDPipeline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export const CreateCICDPipeline = ({
113113
}
114114
}
115115

116-
if (deploymentAppType === DeploymentAppTypes.GITOPS && isGitOpsInstalledButNotConfigured) {
116+
if (deploymentAppType === DeploymentAppTypes.ARGO && isGitOpsInstalledButNotConfigured) {
117117
ToastManager.showToast({
118118
variant: ToastVariantType.error,
119119
title: 'GitOps credentials not configured',

src/Pages/App/Configurations/WorkflowEditor/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const checkForGitOpsRepoNotConfigured = ({
4949
}
5050

5151
const isGitOpsRepoNotConfiguredAndOptionsVisible =
52-
deploymentAppType === DeploymentAppTypes.GITOPS &&
52+
deploymentAppType === DeploymentAppTypes.ARGO &&
5353
isGitOpsRepoNotConfigured &&
5454
!window._env_.HIDE_GITOPS_OR_HELM_OPTION
5555

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterComponent.tsx

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ import {
2121
Button,
2222
ButtonComponentType,
2323
ComponentSizeType,
24+
Drawer,
2425
ErrorScreenNotAuthorized,
2526
FeatureTitleWithInfo,
27+
GenericEmptyState,
2628
Icon,
2729
Progressing,
2830
Reload,
2931
showError,
3032
sortCallback,
31-
URLS as CommonURLS,
33+
stopPropagation,
34+
URLS as COMMON_URLS,
3235
} from '@devtron-labs/devtron-fe-common-lib'
3336

3437
import { importComponentFromFELibrary } from '@Components/common'
@@ -42,9 +45,13 @@ import { getClusterList, getEnvironmentList } from './cluster.service'
4245
import { ClusterMetadataTypes, ClusterProps } from './cluster.type'
4346
import { getSelectParsedCategory } from './cluster.util'
4447
import { ClusterList } from './ClusterList'
48+
import EditClusterDrawerContent from './EditClusterDrawerContent'
4549

4650
const ManageCategories = importComponentFromFELibrary('ManageCategories', null, 'function')
4751
const ManageCategoryButton = importComponentFromFELibrary('ManageCategoryButton', null, 'function')
52+
const PodSpreadModal = importComponentFromFELibrary('PodSpreadModal', null, 'function')
53+
const HibernationRulesModal = importComponentFromFELibrary('HibernationRulesModal', null, 'function')
54+
const VirtualClusterForm = importComponentFromFELibrary('VirtualClusterForm', null, 'function')
4855

4956
const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
5057
const [view, setView] = useState(ViewType.LOADING)
@@ -138,22 +145,15 @@ const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
138145
clusterName={cluster.cluster_name}
139146
isVirtualCluster={cluster.isVirtualCluster}
140147
environments={cluster.environments}
141-
sshTunnelConfig={cluster.sshTunnelConfig}
142148
isProd={cluster.isProd}
143149
serverURL={cluster.server_url}
144-
prometheusURL={cluster.prometheus_url}
145-
prometheusAuth={cluster.prometheusAuth}
146-
proxyUrl={cluster.proxyUrl}
147-
insecureSkipTlsVerify={cluster.insecureSkipTlsVerify}
148-
installationId={cluster.installationId}
149150
category={cluster.category}
150-
toConnectWithSSHTunnel={cluster.toConnectWithSSHTunnel}
151151
clusterId={cluster.id}
152152
/>
153153
))}
154154

155155
{ManageCategories && (
156-
<Route path={CommonURLS.GLOBAL_CONFIG_MANAGE_CATEGORIES}>
156+
<Route path={COMMON_URLS.GLOBAL_CONFIG_MANAGE_CATEGORIES}>
157157
<ManageCategories />
158158
</Route>
159159
)}
@@ -162,6 +162,83 @@ const ClusterComponents = ({ isSuperAdmin }: ClusterProps) => {
162162
<CreateCluster handleReloadClusterList={initialize} />
163163
</Route>
164164

165+
<Route
166+
path={COMMON_URLS.GLOBAL_CONFIG_EDIT_CLUSTER}
167+
render={(props) => {
168+
const { clusterId } = props.match.params
169+
const cluster: ClusterMetadataTypes = clusters.find((c) => c.id === +clusterId)
170+
171+
if (!cluster || !cluster.isVirtualCluster) {
172+
return (
173+
<Drawer position="right" width="1000px" onClose={handleRedirectToClusterList}>
174+
<div className="h-100 bg__primary" onClick={stopPropagation}>
175+
{!cluster ? (
176+
<GenericEmptyState
177+
title="Cluster not found"
178+
subTitle="The cluster that you are looking is not available."
179+
/>
180+
) : (
181+
<EditClusterDrawerContent
182+
handleModalClose={handleRedirectToClusterList}
183+
sshTunnelConfig={cluster.sshTunnelConfig}
184+
clusterId={cluster.id}
185+
clusterName={cluster.cluster_name}
186+
serverURL={cluster.server_url}
187+
reload={initialize}
188+
prometheusURL={cluster.prometheus_url}
189+
proxyUrl={cluster.proxyUrl}
190+
toConnectWithSSHTunnel={cluster.toConnectWithSSHTunnel}
191+
isProd={cluster.isProd}
192+
installationId={cluster.installationId}
193+
category={cluster.category}
194+
insecureSkipTlsVerify={cluster.insecureSkipTlsVerify}
195+
/>
196+
)}
197+
</div>
198+
</Drawer>
199+
)
200+
}
201+
202+
return (
203+
<VirtualClusterForm
204+
id={+cluster.id}
205+
clusterName={cluster.cluster_name}
206+
handleModalClose={handleRedirectToClusterList}
207+
reload={initialize}
208+
category={cluster.category}
209+
/>
210+
)
211+
}}
212+
/>
213+
214+
{PodSpreadModal && (
215+
<Route
216+
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName/${URLS.POD_SPREAD}`}
217+
render={(props) => {
218+
const { clusterName } = props.match.params
219+
const foundCluster: ClusterMetadataTypes | { id?: number } =
220+
clusters.find((c) => c.cluster_name === clusterName) || {}
221+
const { id: clusterId } = foundCluster
222+
223+
return <PodSpreadModal clusterId={clusterId} handleClose={handleRedirectToClusterList} />
224+
}}
225+
/>
226+
)}
227+
228+
{HibernationRulesModal && (
229+
<Route
230+
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName/${URLS.HIBERNATION_RULES}`}
231+
render={(props) => {
232+
const { clusterName } = props.match.params
233+
const foundCluster: ClusterMetadataTypes | { id?: number } =
234+
clusters.find((c) => c.cluster_name === clusterName) || {}
235+
const { id: clusterId } = foundCluster
236+
237+
return <HibernationRulesModal clusterId={clusterId} handleClose={handleRedirectToClusterList} />
238+
}}
239+
/>
240+
)}
241+
165242
<Route
166243
path={`${URLS.GLOBAL_CONFIG_CLUSTER}/:clusterName${URLS.CREATE_ENVIRONMENT}`}
167244
render={(props) => {

0 commit comments

Comments
 (0)