Skip to content

Commit

Permalink
Merge branch 'develop' into feat/hibernation-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Feb 15, 2025
2 parents 5503c26 + ab7510c commit dfb79d4
Show file tree
Hide file tree
Showing 76 changed files with 1,468 additions and 987 deletions.
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dashboard",
"version": "1.6.0",
"version": "1.7.0",
"private": true,
"homepage": "/dashboard",
"dependencies": {
"@devtron-labs/devtron-fe-common-lib": "1.6.12-beta-1",
"@devtron-labs/devtron-fe-common-lib": "1.7.1",
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@rjsf/core": "^5.13.3",
"@rjsf/utils": "^5.13.3",
Expand All @@ -23,6 +23,8 @@
"flexsearch": "^0.6.32",
"jsonpath-plus": "^10.0.0",
"moment": "^2.29.4",
"monaco-editor": "0.44.0",
"monaco-yaml": "5.1.1",
"query-string": "^7.1.1",
"react": "^17.0.2",
"react-csv": "^2.2.2",
Expand All @@ -31,6 +33,7 @@
"react-ga4": "^1.4.1",
"react-gtm-module": "^2.0.11",
"react-mde": "^11.5.0",
"react-monaco-editor": "^0.55.0",
"react-router-dom": "^5.3.4",
"react-select": "5.8.0",
"react-virtualized": "^9.22.5",
Expand Down Expand Up @@ -142,7 +145,11 @@
],
"setupFilesAfterEnv": [
"jest-extended"
]
],
"moduleNameMapper": {
"monaco-editor": "<rootDir>/node_modules/react-monaco-editor",
"monaco-yaml": "<rootDir>/node_modules/react-monaco-editor"
}
},
"resolutions": {
"nanoid": "^3.3.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const CompareConfigView = ({
selectedChartVersion,
draftChartVersion,
isDeleteOverrideView,
editorKey = `${compareFromSelectedOptionValue || 'compare'}-draft-editor-key`,
className = '',
errorInfo,
handleErrorReload,
Expand Down Expand Up @@ -71,6 +72,7 @@ const CompareConfigView = ({
) : (
<div className="p-16">
<DeploymentHistoryDiffView
key={editorKey}
currentConfiguration={getCompareViewHistoryDiffConfigProps(
publishedEditorTemplate,
publishedEditorConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const ConfigDryRun = ({
return (
<CodeEditor
value={editorTemplate}
height="fitToParent"
height="100%"
readOnly
mode={MODES.YAML}
noParsing
Expand Down Expand Up @@ -155,7 +155,7 @@ const ConfigDryRun = ({
>
<CodeEditor
value={manifestResponse?.result?.data || ''}
height="fitToParent"
height="100%"
mode={MODES.YAML}
readOnly
noParsing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,7 @@ const DeploymentTemplate = ({
}
draftChartVersion={draftTemplateData?.selectedChart?.version}
isDeleteOverrideView={isDeleteOverrideDraft}
editorKey={`${compareFromSelectedOptionValue || 'compare'}-draft-editor-key-${Number(!!hideLockedKeys)}-${shouldMergeTemplateWithPatches ? 'with-merged-values' : 'without-merged-values'}-${resolveScopedVariables ? 'in-resolved-view' : 'in-unresolved-view'}`}
{...getCompareFromEditorConfig({
envId,
isDeleteOverrideDraft,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ export type CompareConfigViewProps = {
publishedEditorConfig: CompareConfigViewEditorConfigType
draftChartVersion?: string
selectedChartVersion?: string
/**
* @default ${compareFromSelectedOptionValue}-"draft-editor-key"
*/
editorKey?: string
className?: string
/**
* @default 'Data'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import {
Button,
ButtonVariantType,
ComponentSizeType,
MODES,
ConfirmationModal,
ConfirmationModalVariantType,
} from '@devtron-labs/devtron-fe-common-lib'
Expand Down Expand Up @@ -681,20 +680,23 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {

const shebangHtml = this.state.configMap === SwitchItemValues.Configuration ? presetConfig : null

const decorationWidth = this.state.sso !== OIDCType ? 50 : 25
return (
<CodeEditor.Container>
<div className="br-4 dc__border w-100 dc__overflow-hidden">
<CodeEditor
value={codeEditorBody}
mode={MODES.YAML}
mode="yaml"
noParsing={this.state.sso === OIDCType}
lineDecorationsWidth={this.state.configMap === SwitchItemValues.Configuration ? decorationWidth : 0}
shebang={shebangHtml}
readOnly={this.state.configMap !== SwitchItemValues.Configuration}
onChange={this.handleConfigChange}
onBlur={this.handleOnBlur}
height="auto"
adjustEditorHeightToContent
>
<CodeEditor.Header>
<div className="flex dc__content-space dc__gap-6">
<CodeEditor.ValidationError />
<div className="dc__no-shrink">
<Switch
value={this.state.configMap}
Expand All @@ -710,7 +712,7 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
</div>
</CodeEditor.Header>
</CodeEditor>
</CodeEditor.Container>
</div>
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

.sso-login__wrapper {
.code-editor__text {
resize: none;
line-height: 1.4;
border: none;
padding: 0 35px;
overflow: hidden;
color: var(--R500);
font-size: 14px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2024. Devtron Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
USER_PERMISSION_DELETE_CONFIRMATION_MESSAGE,
DeleteComponentsName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2024. Devtron Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { DeleteComponentsName } from '@Config/constantMessaging'
import { DeleteConfirmationModal, ERROR_STATUS_CODE, DC_DELETE_SUBTITLES } from '@devtron-labs/devtron-fe-common-lib'
import { EnvironmentDeleteComponentProps } from './ClusterEnvironmentDrawer/types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2024. Devtron Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { ApplicationDeletionInfoProps } from './types'

export const ApplicationDeletionInfo = ({ isPresetValue }: ApplicationDeletionInfoProps) =>
Expand Down
16 changes: 16 additions & 0 deletions src/Pages/Shared/ApplicationDeletionInfo/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) 2024. Devtron Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export interface ApplicationDeletionInfoProps {
isPresetValue?: boolean
}
10 changes: 5 additions & 5 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
ComponentSizeType,
KeyValueConfig,
KeyValueTable,
MODES,
noop,
StyledRadioGroup,
ToastManager,
Expand Down Expand Up @@ -294,15 +293,16 @@ export const ConfigMapSecretData = ({
})

return (
<CodeEditor.Container>
<div className="dc__border br-4 dc__overflow-hidden">
<CodeEditor
key={codeEditorRadio}
value={getCodeEditorValue()}
// Skip calling onChange if resolvedData exists
onChange={!isLocked && !data.isResolvedData ? onChange : noop}
onFocus={onFocus}
mode={MODES.YAML}
height="100%"
mode="yaml"
inline
height={350}
shebang={sheBangText}
readOnly={
readOnly || isHashiOrAWS || isLocked || codeEditorRadio === CODE_EDITOR_RADIO_STATE.SAMPLE
Expand Down Expand Up @@ -338,7 +338,7 @@ export const ConfigMapSecretData = ({
)}
</CodeEditor>
{!data.external && data.yamlMode && renderYamlInfoText()}
</CodeEditor.Container>
</div>
)
}

Expand Down
19 changes: 11 additions & 8 deletions src/Pages/Shared/ConfigMapSecret/ConfigMapSecretDryRun.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ export const ConfigMapSecretDryRun = ({
areScopeVariablesResolving={areScopeVariablesResolving}
fallbackMergeStrategy={DEFAULT_MERGE_STRATEGY}
/>
{renderExternalInfo(
dryRunConfigMapSecretData.externalType,
dryRunConfigMapSecretData.external,
componentType,
'mr-16 ml-16',
)}
<div className="px-16 pb-16">
{renderExternalInfo(
dryRunConfigMapSecretData.externalType,
dryRunConfigMapSecretData.external,
componentType,
)}
</div>
</>
)
}
Expand Down Expand Up @@ -231,7 +232,7 @@ export const ConfigMapSecretDryRun = ({
/>
</div>
</div>
{renderLHSContent()}
<div className="flex-grow-1 dc__overflow-auto">{renderLHSContent()}</div>
</div>
)

Expand All @@ -251,7 +252,9 @@ export const ConfigMapSecretDryRun = ({
reload: reloadConfigMapSecretManifest,
}}
>
<CodeEditor value={configMapSecretManifest?.manifest} height="fitToParent" mode={MODES.YAML} readOnly />
<div className="flex-grow-1 dc__overflow-auto">
<CodeEditor value={configMapSecretManifest?.manifest} height="100%" mode={MODES.YAML} readOnly />
</div>
</APIResponseHandler>
</div>
)
Expand Down
16 changes: 16 additions & 0 deletions src/assets/icons/ic-rollback-medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 16 additions & 8 deletions src/components/ApplicationGroup/AppGroup.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
CIMaterialType,
SourceTypeMap,
DEPLOYMENT_STATUS,
WorkflowStatusEnum,
} from '@devtron-labs/devtron-fe-common-lib'
import { getParsedBranchValuesForPlugin } from '@Components/common'
import { DEFAULT_GIT_BRANCH_VALUE, DOCKER_FILE_ERROR_TITLE, SOURCE_NOT_CONFIGURED, URLS } from '../../config'
Expand Down Expand Up @@ -55,7 +56,12 @@ export const processWorkflowStatuses = (
status: pipeline.ciStatus,
storageConfigured: pipeline.storageConfigured || false,
}
if (!cicdInProgress && (pipeline.ciStatus === 'Starting' || pipeline.ciStatus === 'Running')) {
if (
!cicdInProgress &&
(pipeline.ciStatus === WorkflowStatusEnum.STARTING ||
pipeline.ciStatus === WorkflowStatusEnum.RUNNING ||
pipeline.ciStatus === WorkflowStatusEnum.WAITING_TO_START)
) {
cicdInProgress = true
}
})
Expand All @@ -73,11 +79,13 @@ export const processWorkflowStatuses = (
}
if (
!cicdInProgress &&
(pipeline.pre_status === 'Starting' ||
pipeline.pre_status === 'Running' ||
pipeline.deploy_status === 'Progressing' ||
pipeline.post_status === 'Starting' ||
pipeline.post_status === 'Running')
(pipeline.pre_status === WorkflowStatusEnum.STARTING ||
pipeline.pre_status === WorkflowStatusEnum.RUNNING ||
pipeline.pre_status === WorkflowStatusEnum.WAITING_TO_START ||
pipeline.deploy_status === WorkflowStatusEnum.PROGRESSING ||
pipeline.post_status === WorkflowStatusEnum.STARTING ||
pipeline.post_status === WorkflowStatusEnum.RUNNING ||
pipeline.post_status === WorkflowStatusEnum.WAITING_TO_START)
) {
cicdInProgress = true
}
Expand Down Expand Up @@ -322,8 +330,8 @@ export const getAppGroupDeploymentHistoryLink = (
}
if (redirectToAppGroup) {
// It will redirect to application group deployment history in case of same environment
return `${URLS.APPLICATION_GROUP}/${envId}/${URLS.APP_CD_DETAILS}/${appId}/${pipelineId}${type ?`?type=${type}` : ''}`
return `${URLS.APPLICATION_GROUP}/${envId}/${URLS.APP_CD_DETAILS}/${appId}/${pipelineId}${type ? `?type=${type}` : ''}`
// It will redirect to application deployment history in case of other environments
}
return `${URLS.APP}/${appId}/${URLS.APP_CD_DETAILS}/${envId}/${pipelineId}${type ?`?type=${type}` : ''}`
return `${URLS.APP}/${appId}/${URLS.APP_CD_DETAILS}/${envId}/${pipelineId}${type ? `?type=${type}` : ''}`
}
Loading

0 comments on commit dfb79d4

Please sign in to comment.