Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
d246ad5
feat: add folder for app configurations
AbhishekA1509 Aug 29, 2024
ad10bfc
feat: Add constants for deployment template compare modes
AbhishekA1509 Aug 29, 2024
7bff4d0
fix: deployment template query params
AbhishekA1509 Aug 30, 2024
43bf72c
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Sep 2, 2024
1e92103
feat: add showReadMe flag to DeploymentTemplateQueryParamsType
AbhishekA1509 Sep 3, 2024
315234a
feat: add deployment template provider
AbhishekA1509 Sep 3, 2024
b2554c2
feat: Add 'useDeploymentTemplateComputedData' hook for resolving depl…
AbhishekA1509 Sep 5, 2024
8284d49
feat: Add 'utils' file for deployment template
AbhishekA1509 Sep 5, 2024
755551b
feat: add types for new deployment template
AbhishekA1509 Sep 10, 2024
86ab3a5
feat: add DTApplicationMetricsFormField
AbhishekA1509 Sep 11, 2024
d4105da
fix: DTApplicationMetricsFormField css
AbhishekA1509 Sep 12, 2024
37d33e1
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Sep 12, 2024
ddff3ac
refactor: Collapsible List, DeploymentConfigDiffNavigation: add suppo…
RohitRaj011 Aug 9, 2024
b58d82b
feat: SelectPicker - add support to show tippy on option
RohitRaj011 Aug 9, 2024
97aab9d
refactor: DeploymentConfigDiff - css refactor, add prop to hide divid…
RohitRaj011 Aug 9, 2024
bb91b6f
feat: add generic typing for getting resolved deployment template data
AbhishekA1509 Sep 17, 2024
36f9018
feat: add CompareFromApprovalOptionsValuesType
AbhishekA1509 Sep 17, 2024
7866b0d
feat: Update DeploymentTemplateConfigState interface
AbhishekA1509 Sep 18, 2024
cb4a62a
feat: DeploymentConfigDiff - Scope Variables Support & code refactor
RohitRaj011 Sep 19, 2024
90dd9f1
chore: version bump
RohitRaj011 Sep 19, 2024
58542c2
refactor: Update DeploymentTemplateConfigState interface
AbhishekA1509 Sep 23, 2024
7552567
refactor: Update DeploymentTemplateConfigState interface
AbhishekA1509 Sep 23, 2024
1807ac3
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Sep 23, 2024
e5e69fd
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Sep 23, 2024
110e620
feat: add deployment manifest
AbhishekA1509 Sep 23, 2024
ee0f3b1
feat: TriggerOutput - DeploymentHistoryConfigDiff - revamp UI - using…
RohitRaj011 Sep 23, 2024
4ee5946
Merge pull request #319 from devtron-labs/feat/deployment-history-dif…
RohitRaj011 Sep 23, 2024
0628827
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Sep 23, 2024
b7a2280
chore: version bump
RohitRaj011 Sep 23, 2024
3b03f41
feat: add CONFIG_HEADER_TAB
AbhishekA1509 Sep 24, 2024
d0949d1
feat: DeploymentConfigDiff - UAT changes, code refactor; DeploymentHi…
RohitRaj011 Sep 24, 2024
75d62ec
chore: version bump
RohitRaj011 Sep 24, 2024
c6c937b
fix: useForm: null check missing
RohitRaj011 Sep 25, 2024
e062ee6
refactor: Remove unused constant and update DTApplicationMetricsFormF…
AbhishekA1509 Sep 25, 2024
4cce553
feat: Update select picker minimum width to 56px
AbhishekA1509 Sep 26, 2024
4a9b53b
feat: Add ConfigToolbarPopupNodeType enum for toolbar popup nodes
AbhishekA1509 Sep 26, 2024
2bdb05b
refactor: Update AppConfigurations types to include SyntheticEvent in…
AbhishekA1509 Sep 26, 2024
384fd4b
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Sep 26, 2024
843c9dd
fix: DeploymentHistory - diff state not properly showing in some case…
RohitRaj011 Sep 27, 2024
480a9f5
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Sep 27, 2024
d7b7271
chore: version bump
RohitRaj011 Sep 27, 2024
5d08fdc
chore: add DryRunEditorMode enum
AbhishekA1509 Sep 29, 2024
188abc8
fix: handle array indices in json pointers
Elessar1802 Oct 3, 2024
716d158
feat: add DEFAULT_LOCKED_KEYS_CONFIG
AbhishekA1509 Oct 3, 2024
95dcbad
fix: DeploymentConfigDiff: review fixes
RohitRaj011 Oct 3, 2024
0600b59
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 3, 2024
901f32e
chore: version bump
RohitRaj011 Oct 3, 2024
0c15444
fix: SelecPicker: tooltipProps null check
RohitRaj011 Oct 3, 2024
cd46812
feat: enhance app metrics form field ui
AbhishekA1509 Oct 4, 2024
e4abd26
feat: add support for tooltip in tab group
AbhishekA1509 Oct 4, 2024
131f554
feat: add InvalidYAMLTooltip
AbhishekA1509 Oct 4, 2024
5f49f72
feat: add invalid yaml tippy for app metrics
AbhishekA1509 Oct 4, 2024
c75e239
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Oct 4, 2024
a6cca08
feat: add GET_RESOLVED_DEPLOYMENT_TEMPLATE_EMPTY_RESPONSE
AbhishekA1509 Oct 4, 2024
0093355
feat: Various Improvements
RohitRaj011 Oct 6, 2024
e723ecb
feat: add OverrideStrategyTippyContent
AbhishekA1509 Oct 6, 2024
260b5d8
fix: merge Apps into Applications
AbhishekA1509 Oct 6, 2024
f4eadc0
chore: update comments
AbhishekA1509 Oct 6, 2024
8dfd060
Merge branch 'refactor/compare-manifest' of github.com:devtron-labs/d…
RohitRaj011 Oct 7, 2024
c4cc2b5
feat: add abortSignal in getDeploymentManifest
AbhishekA1509 Oct 7, 2024
2fcad8f
fix: do not show error in case of aborted request in manifest
AbhishekA1509 Oct 7, 2024
b6d3d43
refactor: useForm - handleSubmit - type improvements, CodeEditor: Cli…
RohitRaj011 Oct 7, 2024
52dbadb
feat: implement shortcut handling in useRegisterShortcut hook & remov…
Elessar1802 Oct 8, 2024
67997b4
Merge branch 'develop' into feat/use-register-shortcut
Elessar1802 Oct 8, 2024
dbc67b2
chore: version bump
Elessar1802 Oct 8, 2024
cefa623
chore: remove react-keybind from peer dependencies
Elessar1802 Oct 8, 2024
7436933
Merge branch 'refactor/compare-manifest' of github.com:devtron-labs/d…
RohitRaj011 Oct 8, 2024
3942f40
feat: add LOCKED api status code
AbhishekA1509 Oct 9, 2024
5671de1
chore: remove unnecessary eslint-disable-next-line directive
AbhishekA1509 Oct 9, 2024
7a72233
Merge branch 'refactor/compare-manifest' of github.com:devtron-labs/d…
RohitRaj011 Oct 9, 2024
0979f59
refactor: TabGroup - disabled css class update, useForm - error type …
RohitRaj011 Oct 9, 2024
7e8a56b
fix: handle gap in application metrics
AbhishekA1509 Oct 9, 2024
2a23148
feat: enhance CodeEditor warning
AbhishekA1509 Oct 9, 2024
70e548c
feat: add variant in popup menu item
AbhishekA1509 Oct 9, 2024
04cd0e3
feat: add basic small variant for SelectPicker
AbhishekA1509 Oct 9, 2024
56e246a
fix: add no-shrink to InfoIconTippy
AbhishekA1509 Oct 9, 2024
4bd2de9
feat: Update SelectPicker constants for font size, icon size, and con…
AbhishekA1509 Oct 10, 2024
650a269
fix: update types for select picker size map
AbhishekA1509 Oct 10, 2024
561d78e
fix: large component control size
AbhishekA1509 Oct 10, 2024
bedefbb
chore(deps): bump path-to-regexp from 1.8.0 to 1.9.0
dependabot[bot] Oct 10, 2024
29dd930
fix: remove menuPosition fixed in date time picker and time select
eshankvaish Oct 10, 2024
faf6106
Merge pull request #347 from devtron-labs/chore/dev-sync-v20
eshankvaish Oct 10, 2024
ae9f8d3
Merge pull request #343 from devtron-labs/uat/deployment-template
AbhishekA1509 Oct 10, 2024
c78232b
Merge pull request #336 from devtron-labs/feat/cm-secret-merge-strategy
AbhishekA1509 Oct 10, 2024
42ee1c0
Merge branch 'develop' into refactor/compare-manifest
AbhishekA1509 Oct 10, 2024
554d915
chore: Update package version to 0.5.0-beta-1
AbhishekA1509 Oct 10, 2024
2ed09e4
feat: add enum access type from dashboard
arunjaindev Oct 10, 2024
8d40a58
chore: version bump
arunjaindev Oct 10, 2024
faa5c25
feat: Button - add support for fullWidth prop, Select Picker - option…
RohitRaj011 Oct 13, 2024
3307516
feat: add user permission types from dashboard
arunjaindev Oct 14, 2024
144419c
fix: improve performance, add timeout, preventDefault, clear onblur
Elessar1802 Oct 14, 2024
5dce4a3
chore(deps): bump jsonpath-plus from 9.0.0 to 10.0.0
dependabot[bot] Oct 15, 2024
df58d63
chore(deps-dev): bump @sentry/browser from 7.118.0 to 7.119.1
dependabot[bot] Oct 15, 2024
d20eb5b
chore(deps): bump rollup from 4.21.2 to 4.24.0
dependabot[bot] Oct 15, 2024
6ab63e6
chore: append suffix Ref to ref variables and clear timeout on unmount
Elessar1802 Oct 15, 2024
b875768
chore: change default key down timeout to 300ms
Elessar1802 Oct 15, 2024
56ef7a0
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 15, 2024
38c5093
feat: DeploymentConfigDiff - logic refactor for resolving deployment …
RohitRaj011 Oct 8, 2024
e3a9275
feat: DeploymentHistoryConfigDiff - uat changes, code refactor
RohitRaj011 Oct 13, 2024
b180a0c
feat: Collapse - add Collapse component, DeploymentConfigDiff - handl…
RohitRaj011 Oct 13, 2024
90c527f
chore: version bump
RohitRaj011 Oct 13, 2024
0765c0c
refactor: DeploymentHistoryConfigDiff - Handle case for no configurat…
RohitRaj011 Oct 14, 2024
fd6437b
chore: version bump
RohitRaj011 Oct 14, 2024
ac34854
feat: DeploymentHistoryConfigDiff - add NullState for previous/curren…
RohitRaj011 Oct 15, 2024
1ebf287
chore: version bump
RohitRaj011 Oct 15, 2024
41abc0a
fix: review fix
RohitRaj011 Oct 15, 2024
16211d5
refactor: DeploymentConfigDiff.utils - code refactor
RohitRaj011 Oct 15, 2024
5f78425
refactor: DeploymentConfigDiff.utils - code refactor
RohitRaj011 Oct 15, 2024
8d2118e
Merge pull request #354 from devtron-labs/feat/pipeline-deploy-config…
RohitRaj011 Oct 15, 2024
9b1210e
fix: create timeout only if keydown is registered
Elessar1802 Oct 16, 2024
30584c7
Merge pull request #357 from devtron-labs/fix/use-register-shortcut
Elessar1802 Oct 16, 2024
51d6074
fix: CodeEditor - shebang className & styles
RohitRaj011 Oct 16, 2024
8d29989
Merge pull request #353 from devtron-labs/uat/cm-secret
RohitRaj011 Oct 16, 2024
b04a06e
refactor: Multiple Improvements and UAT changes
RohitRaj011 Oct 16, 2024
135df49
chore: version bump
RohitRaj011 Oct 16, 2024
75dd61f
chore: version bump
arunjaindev Oct 16, 2024
37d39e0
Merge pull request #348 from devtron-labs/feat/terminal-permission
arunjaindev Oct 16, 2024
193d05c
refactor: CollapsibleList, DeploymentConfigDiffNavigation - icon size…
RohitRaj011 Oct 16, 2024
a14121b
Merge pull request #359 from devtron-labs/fix/cm-secret-bug-fixes
RohitRaj011 Oct 17, 2024
88eaa2e
chore: version bump
Elessar1802 Oct 17, 2024
a220e7f
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 17, 2024
d62f036
chore: version bump
RohitRaj011 Oct 17, 2024
825eb9d
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 17, 2024
02dd3b4
chore: version bump
RohitRaj011 Oct 17, 2024
aa3d21f
Merge pull request #304 from devtron-labs/feat/pipeline-deploy-config…
RohitRaj011 Oct 17, 2024
cd069aa
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 17, 2024
284c056
chore: version bump
RohitRaj011 Oct 17, 2024
63ab304
Merge branch 'refactor/compare-manifest' of github.com:devtron-labs/d…
RohitRaj011 Oct 17, 2024
c9ee943
chore: version bump
RohitRaj011 Oct 17, 2024
3b41a3d
fix: DeploymentHistoryDiffView, DeploymentConfigDiff - UI issues fix
RohitRaj011 Oct 18, 2024
6c7807a
fix: DeploymentHistory - incorrect runSource in deployments dropdown
RohitRaj011 Oct 18, 2024
bb309f2
chore: version bump
RohitRaj011 Oct 18, 2024
af340f7
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Elessar1802 Oct 21, 2024
c9ccf45
Merge pull request #341 from devtron-labs/feat/use-register-shortcut
Elessar1802 Oct 21, 2024
5cce9a2
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 21, 2024
d90f5d2
chore: version bump
RohitRaj011 Oct 21, 2024
ee1bbc1
Merge pull request #284 from devtron-labs/refactor/compare-manifest
RohitRaj011 Oct 21, 2024
5cfe2c6
Merge branch 'main' into dependabot/npm_and_yarn/path-to-regexp-1.9.0
Elessar1802 Oct 21, 2024
e7567d9
Merge branch 'chore/dependabot-updates' into dependabot/npm_and_yarn/…
Elessar1802 Oct 21, 2024
2b4a181
Merge pull request #301 from devtron-labs/dependabot/npm_and_yarn/pat…
Elessar1802 Oct 21, 2024
4a74bfe
Merge pull request #329 from devtron-labs/dependabot/npm_and_yarn/rol…
Elessar1802 Oct 21, 2024
1a6f4b0
Merge pull request #334 from devtron-labs/dependabot/npm_and_yarn/sen…
Elessar1802 Oct 21, 2024
14db365
Merge pull request #352 from devtron-labs/dependabot/npm_and_yarn/jso…
Elessar1802 Oct 21, 2024
d1ff720
feat: DeploymentConfigDiff - revamped logic to parse draft deployment…
RohitRaj011 Oct 21, 2024
4a8f0dc
chore: version bump
RohitRaj011 Oct 21, 2024
9fe6431
chore: dependabot version bumps
Elessar1802 Oct 21, 2024
32cec2d
chore: version bump
Elessar1802 Oct 21, 2024
c8bb261
Merge pull request #363 from devtron-labs/fix/release-app-configurations
RohitRaj011 Oct 21, 2024
544866f
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Oct 21, 2024
48676aa
chore: version bump
RohitRaj011 Oct 21, 2024
1642df5
Merge pull request #360 from devtron-labs/feat/release-app-configurat…
RohitRaj011 Oct 21, 2024
0819f44
chore: update package-lock.json to latest values
Elessar1802 Oct 21, 2024
7e7b913
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Elessar1802 Oct 21, 2024
33892da
chore: update package-lock.json to latest values
Elessar1802 Oct 21, 2024
d141814
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
eshankvaish Oct 21, 2024
71998da
Merge pull request #365 from devtron-labs/chore/main-sync-rc-21
eshankvaish Oct 21, 2024
5d4e420
chore: version bump
Elessar1802 Oct 21, 2024
df685e6
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Elessar1802 Oct 21, 2024
cc79c7b
Merge pull request #364 from devtron-labs/chore/dependabot-updates
Elessar1802 Oct 21, 2024
1c31c90
feat: try button added
shivani170 Oct 23, 2024
53ba9da
chore: version bump
shivani170 Oct 23, 2024
e3f767a
fix: create button css
shivani170 Oct 23, 2024
90287e7
chore: version bump
shivani170 Oct 23, 2024
eb7a466
chore: css fixes
shivani170 Oct 23, 2024
0230e3e
chore:version bump
shivani170 Oct 23, 2024
bf71d36
chore: variable name update
shivani170 Oct 23, 2024
859ae0e
chore: renaming of variable
shivani170 Oct 23, 2024
5eb8299
chore: renaming of cm values
shivani170 Oct 23, 2024
d7d21b6
chore: code refactoring
shivani170 Oct 23, 2024
2caa3a7
chore: version bump
shivani170 Oct 23, 2024
1282423
url check added
shivani170 Oct 23, 2024
6a1d40d
chore: code refactoring
shivani170 Oct 23, 2024
6f2b307
empty state for no iframe
shivani170 Oct 23, 2024
805160d
chore: version bump
shivani170 Oct 23, 2024
104843d
chore: version change
shivani170 Oct 23, 2024
6ca8ab0
Merge pull request #366 from devtron-labs/feat/try-devtron
shivani170 Oct 23, 2024
bf6aa40
chore: verion bump to 0.6.0
arunjaindev Oct 24, 2024
37093cf
Merge branch 'release-candidate-v0.21.0' of https://github.com/devtro…
arunjaindev Oct 24, 2024
e9c189e
Merge pull request #367 from devtron-labs/chore/versio-bump
arunjaindev Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,917 changes: 1,975 additions & 1,942 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "0.5.0-patch-1",
"version": "0.6.0",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@sentry/browser": "^7.31.1",
"@sentry/browser": "^7.119.1",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.4",
"@tippyjs/react": "^4.2.0",
Expand Down Expand Up @@ -83,7 +83,6 @@
"react-dom": "^17.0.2",
"react-draggable": "^4.4.5",
"react-ga4": "^1.4.1",
"react-keybind": "^0.9.4",
"react-mde": "^11.5.0",
"react-router": "^5.3.0",
"react-router-dom": "^5.3.0",
Expand All @@ -96,7 +95,7 @@
"ansi_up": "^5.2.1",
"dayjs": "^1.11.13",
"fast-json-patch": "^3.1.1",
"jsonpath-plus": "^9.0.0",
"jsonpath-plus": "^10.0.0",
"react-dates": "^21.8.0",
"react-monaco-editor": "^0.54.0",
"sass": "^1.69.7",
Expand Down
3 changes: 3 additions & 0 deletions src/Assets/Icon/ic-caret-down-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/Assets/Icon/ic-diff-file-added.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/Assets/Icon/ic-diff-file-removed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/Assets/Icon/ic-file-code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/Assets/Icon/ic-warning-y5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions src/Common/ChartVersionAndTypeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
*/

import { useEffect, useState } from 'react'
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'
import { fetchChartTemplateVersions } from './Common.service'
import { ChartVersionAndTypeSelectorProps, DeploymentChartVersionType } from './Types'
import { ChartVersionAndTypeSelectorProps } from './Types'
import { getFilteredChartVersions, showError } from './Helper'
import { SelectPicker, SelectPickerVariantType } from '@Shared/Components'

interface DeploymentChartVersionType {
chartRefId: number
chartVersion: string
chartType: string
type: number
}

// @TODO: Generalize this component to be used in CodeEditor as Chart selector toolbar
// when the Code Editor is moved to the fe-common-lib
Expand Down
8 changes: 4 additions & 4 deletions src/Common/CodeEditor/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import ReactGA from 'react-ga4'
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'
import { configureMonacoYaml } from 'monaco-yaml'

import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
import { ReactComponent as Info } from '../../Assets/Icon/ic-info-filled.svg'
import { ReactComponent as ErrorIcon } from '../../Assets/Icon/ic-error-exclamation.svg'
import { ReactComponent as WarningIcon } from '../../Assets/Icon/ic-warning.svg'
import './codeEditor.scss'
import 'monaco-editor'

Expand Down Expand Up @@ -348,7 +348,7 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
<CodeEditorPlaceholder customLoader={customLoader} />
) : (
<>
{shebang && <div className="shebang">{shebang}</div>}
{shebang && <div className="code-editor__shebang">{shebang}</div>}
{state.diffMode ? (
<MonacoDiffEditor
original={
Expand Down Expand Up @@ -452,7 +452,7 @@ const ValidationError = () => {

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

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

const SplitPane = ({}) => {
Expand Down
18 changes: 6 additions & 12 deletions src/Common/CodeEditor/codeEditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@
min-height: 300px;
}

.code-editor__warning {
font-size: 12px;
font-weight: 400;
line-height: 1.33;
letter-spacing: normal;
color: var(--Y700);
height: auto;
padding: 8px 16px;
border-bottom: 1px solid #d6dbdf;
background-color: var(--Y100);
}

.code-editor__information {
font-size: 12px;
font-weight: 400;
Expand Down Expand Up @@ -171,3 +159,9 @@
z-index: 9;
}
}

.code-editor__shebang {
padding: 0 52px;
color: #151515;
opacity: 0.6;
}
3 changes: 3 additions & 0 deletions src/Common/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const DOCUMENTATION_HOME_PAGE = 'https://docs.devtron.ai'
export const DOCUMENTATION_VERSION = '/v/v0.7'
export const DISCORD_LINK = 'https://discord.devtron.ai/'
export const DOCUMENTATION = {
APP_METRICS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/app-details/app-metrics`,
APP_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/create-application#tags`,
APP_OVERVIEW_TAGS: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/applications/overview#manage-tags`,
BLOB_STORAGE: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/getting-started/install/installation-configuration#configuration-of-blob-storage`,
Expand Down Expand Up @@ -70,6 +71,7 @@ export const URLS = {
export const ROUTES = {
APP: 'app',
APP_ARTIFACT_PROMOTE_MATERIAL: 'app/artifact/promotion-request/material',
APP_TEMPLATE_DATA: 'app/template/data',
PROJECT_LIST_MIN: 'team/autocomplete',
USER_CHECK_ROLE: 'user/check/roles',
IMAGE_TAGGING: 'app/image-tagging',
Expand Down Expand Up @@ -507,6 +509,7 @@ export const API_STATUS_CODES = {
PERMISSION_DENIED: 403,
NOT_FOUND: 404,
EXPECTATION_FAILED: 417,
LOCKED: 423,
}

export enum SERVER_MODE {
Expand Down
18 changes: 17 additions & 1 deletion src/Common/Helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export const powerSetOfSubstringsFromStart = (strings: string[], regex: RegExp)
return _keys
})

export const convertJSONPointerToJSONPath = (pointer: string) => pointer.replace(/\//g, '.').replace(/\./, '$.')
export const convertJSONPointerToJSONPath = (pointer: string) => pointer.replace(/\/([\*0-9]+)\//g, '[$1].').replace(/\//g, '.').replace(/\./, '$.')

export const flatMapOfJSONPaths = (
paths: string[],
Expand Down Expand Up @@ -937,3 +937,19 @@ export function asyncWrap(promise): any[] {
}

export const prefixZeroIfSingleDigit = (value: number = 0) => (value > 0 && value < 10 ? `0${value}` : value)

export const throttle = <T extends (...args: unknown[]) => unknown>(
func: T,
delay: number = 300,
): ((...args: Parameters<T>) => void) => {
let lastCall = 0

return (...args: Parameters<T>) => {
const now = Date.now()

if (now - lastCall >= delay) {
lastCall = now
func(...args)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import { useContext } from 'react'
import { context } from './UseRegisterShortcutContext'
import { UseRegisterShortcutContext } from './UseRegisterShortcutContext'

const useRegisterShortcut = () => useContext(context)
const useRegisterShortcut = () => useContext(UseRegisterShortcutContext)

export default useRegisterShortcut
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
import { createContext } from 'react'
import { UseRegisterShortcutContextType } from './types'

export const context = createContext<UseRegisterShortcutContextType>(null)
export const UseRegisterShortcutContext = createContext<UseRegisterShortcutContextType>(null)
Loading
Loading