Skip to content

Commit d141814

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into chore/main-sync-rc-21
2 parents 31d8b86 + 1642df5 commit d141814

File tree

99 files changed

+2799
-1170
lines changed

Some content is hidden

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

99 files changed

+2799
-1170
lines changed

package-lock.json

Lines changed: 2 additions & 9 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 & 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.5.0-patch-1",
3+
"version": "0.5.6",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -83,7 +83,6 @@
8383
"react-dom": "^17.0.2",
8484
"react-draggable": "^4.4.5",
8585
"react-ga4": "^1.4.1",
86-
"react-keybind": "^0.9.4",
8786
"react-mde": "^11.5.0",
8887
"react-router": "^5.3.0",
8988
"react-router-dom": "^5.3.0",
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

src/Assets/Icon/ic-file-code.svg

Lines changed: 7 additions & 0 deletions
Loading

src/Assets/Icon/ic-warning-y5.svg

Lines changed: 20 additions & 0 deletions
Loading

src/Common/ChartVersionAndTypeSelector.tsx

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

1717
import { useEffect, useState } from 'react'
18+
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'
1819
import { fetchChartTemplateVersions } from './Common.service'
19-
import { ChartVersionAndTypeSelectorProps, DeploymentChartVersionType } from './Types'
20+
import { ChartVersionAndTypeSelectorProps } from './Types'
2021
import { getFilteredChartVersions, showError } from './Helper'
21-
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'
22+
23+
interface DeploymentChartVersionType {
24+
chartRefId: number
25+
chartVersion: string
26+
chartType: string
27+
type: number
28+
}
2229

2330
// @TODO: Generalize this component to be used in CodeEditor as Chart selector toolbar
2431
// when the Code Editor is moved to the fe-common-lib

src/Common/CodeEditor/CodeEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import ReactGA from 'react-ga4'
2121
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
2222
import { configureMonacoYaml } from 'monaco-yaml'
2323

24+
import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
2425
import { ReactComponent as Info } from '../../Assets/Icon/ic-info-filled.svg'
2526
import { ReactComponent as ErrorIcon } from '../../Assets/Icon/ic-error-exclamation.svg'
26-
import { ReactComponent as WarningIcon } from '../../Assets/Icon/ic-warning.svg'
2727
import './codeEditor.scss'
2828
import 'monaco-editor'
2929

@@ -348,7 +348,7 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
348348
<CodeEditorPlaceholder customLoader={customLoader} />
349349
) : (
350350
<>
351-
{shebang && <div className="shebang">{shebang}</div>}
351+
{shebang && <div className="code-editor__shebang">{shebang}</div>}
352352
{state.diffMode ? (
353353
<MonacoDiffEditor
354354
original={
@@ -452,7 +452,7 @@ const ValidationError = () => {
452452

453453
const Warning: React.FC<InformationBarProps> = (props) => (
454454
<div className={`code-editor__warning ${props.className || ''}`}>
455-
<WarningIcon className="code-editor__information-info-icon" />
455+
<ICWarningY5 className="code-editor__information-info-icon" />
456456
{props.text}
457457
{props.children}
458458
</div>
@@ -476,7 +476,7 @@ const Information: React.FC<InformationBarProps> = (props) => (
476476

477477
const Clipboard = () => {
478478
const { state } = useCodeEditorContext()
479-
return <ClipboardButton content={state.code} rootClassName="bcn-1" iconSize={20} />
479+
return <ClipboardButton content={state.code} iconSize={16} />
480480
}
481481

482482
const SplitPane = ({}) => {

src/Common/CodeEditor/codeEditor.scss

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,6 @@
105105
min-height: 300px;
106106
}
107107

108-
.code-editor__warning {
109-
font-size: 12px;
110-
font-weight: 400;
111-
line-height: 1.33;
112-
letter-spacing: normal;
113-
color: var(--Y700);
114-
height: auto;
115-
padding: 8px 16px;
116-
border-bottom: 1px solid #d6dbdf;
117-
background-color: var(--Y100);
118-
}
119-
120108
.code-editor__information {
121109
font-size: 12px;
122110
font-weight: 400;
@@ -171,3 +159,9 @@
171159
z-index: 9;
172160
}
173161
}
162+
163+
.code-editor__shebang {
164+
padding: 0 52px;
165+
color: #151515;
166+
opacity: 0.6;
167+
}

src/Common/Constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const DOCUMENTATION_HOME_PAGE = 'https://docs.devtron.ai'
2424
export const DOCUMENTATION_VERSION = '/v/v0.7'
2525
export const DISCORD_LINK = 'https://discord.devtron.ai/'
2626
export const DOCUMENTATION = {
27+
APP_METRICS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/app-details/app-metrics`,
2728
APP_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/create-application#tags`,
2829
APP_OVERVIEW_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/overview#manage-tags`,
2930
BLOB_STORAGE: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/getting-started/install/installation-configuration#configuration-of-blob-storage`,
@@ -70,6 +71,7 @@ export const URLS = {
7071
export const ROUTES = {
7172
APP: 'app',
7273
APP_ARTIFACT_PROMOTE_MATERIAL: 'app/artifact/promotion-request/material',
74+
APP_TEMPLATE_DATA: 'app/template/data',
7375
PROJECT_LIST_MIN: 'team/autocomplete',
7476
USER_CHECK_ROLE: 'user/check/roles',
7577
IMAGE_TAGGING: 'app/image-tagging',
@@ -507,6 +509,7 @@ export const API_STATUS_CODES = {
507509
PERMISSION_DENIED: 403,
508510
NOT_FOUND: 404,
509511
EXPECTATION_FAILED: 417,
512+
LOCKED: 423,
510513
}
511514

512515
export enum SERVER_MODE {

0 commit comments

Comments
 (0)