Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9f46a7e
chore: generic empty list updated
shivani170 May 9, 2025
7387fac
chore: import enabled
shivani170 May 13, 2025
2d10966
chore: export GenericInfoCardListingProps
shivani170 May 13, 2025
3537fa1
chore: version bump
shivani170 May 13, 2025
d93f01c
Merge branch 'develop' into feat/app-clone-flow
shivani170 May 13, 2025
d1e0f4e
chore: separate out loading state component
shivani170 May 13, 2025
135edce
chore: doc link component added
shivani170 May 14, 2025
82a037e
chore: added doc link in tippy customoze
shivani170 May 14, 2025
5c186f8
chore: Documentation constant added in doc link component
shivani170 May 15, 2025
ad5a2aa
chore: modification in the naming of the Doclink
shivani170 May 15, 2025
4c8f1eb
chore: modification in the naming of the Doclink
shivani170 May 15, 2025
f5855bc
chore: size props added in links
shivani170 May 15, 2025
2556b62
chore: Replaced all Doc link anchor with docLink Component
shivani170 May 15, 2025
726d320
chore: type added for documentation link
shivani170 May 15, 2025
7def66d
fix: Update DocLink component to handle isEnterprise prop
shivani170 May 15, 2025
b511695
Merge branch 'develop' into feat/app-clone-flow
shivani170 May 15, 2025
730ab48
chore: Added app icon with background
shivani170 May 16, 2025
0170291
chore: code feedback fixes
shivani170 May 16, 2025
50b9305
Merge branch 'develop' into feat/app-clone-flow
shivani170 May 16, 2025
765eb00
fix: icon background fill change from 500 to 400
shivani170 May 16, 2025
ee0a5c5
chore: generic info card fixes
shivani170 May 16, 2025
29e6812
Merge branch 'develop' into feat/doc-utm-source
shivani170 May 19, 2025
1eddf38
chore: code refactoring
shivani170 May 19, 2025
2f4ef2f
chore: isExternalLink support for ci external plugins
shivani170 May 19, 2025
ad5e1c3
chore: text fix for documentation in page header
shivani170 May 19, 2025
7fca4fc
chore: isEnterprise tpe moved to page header
shivani170 May 19, 2025
f6900c4
chore: css fixes
shivani170 May 20, 2025
96a5bb2
chore: suggestion fixes
shivani170 May 20, 2025
9541eb3
Merge branch 'develop' into feat/app-clone-flow
shivani170 May 21, 2025
530c0de
chore: version bump
shivani170 May 21, 2025
398bd39
Merge pull request #731 from devtron-labs/feat/app-clone-flow
shivani170 May 21, 2025
720ce39
chore: version bump 1.13.0-pre-9
shivani170 May 21, 2025
359d795
Merge pull request #742 from devtron-labs/chore/version-bump-1.13.0-p…
shivani170 May 21, 2025
d3af342
Merge branch 'develop' into feat/doc-utm-source
shivani170 May 21, 2025
efc2597
chore: moved doc link to shared
shivani170 May 21, 2025
b8f0677
chore: type strict
shivani170 May 21, 2025
bb3d3d3
Merge branch 'main' into feat/doc-utm-source
shivani170 May 21, 2025
67d8895
Merge pull request #733 from devtron-labs/feat/doc-utm-source
shivani170 May 22, 2025
016018e
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 May 22, 2025
92681a4
feat: refactor search panel commands and update props for CodeEditor
AbhishekA1509 May 22, 2025
ab7df22
feat: update deployment status mapping and add new WorkflowRunnerStat…
AbhishekA1509 May 23, 2025
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
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.14.0",
"version": "1.14.0-pre-0",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
23 changes: 23 additions & 0 deletions src/Assets/IconV2/ic-app-template.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/Assets/IconV2/ic-devtron-app.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/IconV2/ic-devtron-job.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/Img/empty-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions src/Common/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ export const DEVTRON_HOME_PAGE = 'https://devtron.ai/'
export const DOCUMENTATION_VERSION = '/v/v0.7'
export const DISCORD_LINK = 'https://discord.devtron.ai/'
export const DEFAULT_JSON_SCHEMA_URI = 'https://json-schema.org/draft/2020-12/schema'
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`,
GLOBAL_CONFIG_BUILD_INFRA: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/global-configurations/build-infra`,
ENTERPRISE_LICENSE: `${DOCUMENTATION_HOME_PAGE}/enterprise-license`,
KUBE_CONFIG: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/resource-browser#running-kubectl-commands-locally`,
TENANT_INSTALLATION: `${DOCUMENTATION_HOME_PAGE}${DOCUMENTATION_VERSION}/usage/software-distribution-hub/tenants`,
}

export const PATTERNS = {
STRING: /^[a-zA-Z0-9_]+$/,
Expand Down
4 changes: 1 addition & 3 deletions src/Common/CustomTagSelector/PropagateTagInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
* limitations under the License.
*/

import React from 'react'
import { ReactComponent as InjectTag } from '../../Assets/Icon/inject-tag.svg'
import { ReactComponent as ICHelpOutline } from '../../Assets/Icon/ic-help-outline.svg'
import { TippyCustomized } from '../TippyCustomized'
import { TippyTheme } from '../Types'
import { DOCUMENTATION } from '../Constants'

export default function PropagateTagInfo({ isCreateApp }: { isCreateApp: boolean }) {
const additionalInfo = () => (
Expand Down Expand Up @@ -47,7 +45,7 @@ export default function PropagateTagInfo({ isCreateApp }: { isCreateApp: boolean
showCloseButton
trigger="click"
interactive
documentationLink={isCreateApp ? DOCUMENTATION.APP_TAGS : DOCUMENTATION.APP_OVERVIEW_TAGS}
documentationLink={isCreateApp ? "APP_TAGS" : "APP_OVERVIEW_TAGS"}
documentationLinkText="View Documentation"
>
<div className="flexbox cursor">
Expand Down
25 changes: 13 additions & 12 deletions src/Common/TippyCustomized.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import Tippy from '@tippyjs/react'
import { ReactComponent as CloseIcon } from '../Assets/Icon/ic-cross.svg'
import { ReactComponent as Help } from '../Assets/Icon/ic-help.svg'
import { ReactComponent as ICHelpOutline } from '../Assets/Icon/ic-help-outline.svg'
import { ReactComponent as ICOpenInNew } from '../Assets/Icon/ic-open-in-new.svg'
import 'tippy.js/animations/shift-toward-subtle.css'
import 'tippy.js/animations/shift-toward.css'
import { TippyCustomizedProps, TippyTheme } from './Types'
import { not, stopPropagation } from './Helper'
import { DocLink } from '../Shared/DocLink'

// This component will handle some of the new tippy designs and interactions
// So this can be updated to support further for new features or interactions
export const TippyCustomized = (props: TippyCustomizedProps) => {
export const TippyCustomized = <T extends boolean = false>(props: TippyCustomizedProps<T>) => {
const tippyRef = useRef(null)
const [showHeadingInfo, setShowHeadingInfo] = useState(false)
const isWhiteTheme = props.theme === TippyTheme.white
Expand Down Expand Up @@ -79,6 +79,8 @@ export const TippyCustomized = (props: TippyCustomizedProps) => {
additionalContent,
documentationLink,
documentationLinkText,
isEnterprise,
isExternalLink,
} = props
return (
<>
Expand Down Expand Up @@ -156,17 +158,16 @@ export const TippyCustomized = (props: TippyCustomizedProps) => {
)}
{additionalContent}
{documentationLink && (
<div className="pl-12 pb-12">
<a
href={documentationLink}
target="_blank"
rel="noreferrer noopener"
className="fs-13 cb-5 flex left"
<div className="px-12 pb-12 flexbox">
<DocLink
text={documentationLinkText}
dataTestId="learn-more-about-tippy-link"
showExternalIcon
onClick={closeTippy}
>
{documentationLinkText || 'Learn more'}
<ICOpenInNew className="icon-dim-14 ml-4 scb-5" />
</a>
isEnterprise={isEnterprise}
isExternalLink={isExternalLink}
docLinkKey={documentationLink}
/>
</div>
)}
</>
Expand Down
79 changes: 44 additions & 35 deletions src/Common/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
ACTION_STATE,
DEPLOYMENT_WINDOW_TYPE,
DockerConfigOverrideType,
DOCUMENTATION,
RefVariableType,
SortingOrder,
TaskErrorObj,
Expand Down Expand Up @@ -119,52 +120,60 @@ export interface CheckboxProps {
children?: ReactNode
}

export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
theme: TippyTheme
visible?: boolean
heading?: ReactNode | string
headingInfo?: ReactNode | string
noHeadingBorder?: boolean
infoTextHeading?: string
hideHeading?: boolean
placement?: TippyProps['placement']
className?: string
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
iconPath?: string
iconClass?: string
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
onImageLoadError?: (e) => void
onClose?: () => void
infoText?: React.ReactNode
showCloseButton?: boolean
arrow?: boolean
interactive?: boolean
showOnCreate?: boolean
trigger?: string
animation?: string
duration?: number
additionalContent?: ReactNode
documentationLink?: string
documentationLinkText?: string
children: React.ReactElement<any>
disableClose?: boolean
}

export interface InfoIconTippyProps
export type TippyWithBaseDocLinkTypes<T extends boolean> = {
isExternalLink?: T
isEnterprise?: boolean
documentationLink?: T extends true ? string : keyof typeof DOCUMENTATION
}

export type TippyCustomizedProps<T extends boolean> = Pick<TippyProps, 'appendTo'> &
TippyWithBaseDocLinkTypes<T> & {
theme: TippyTheme
visible?: boolean
heading?: ReactNode | string
headingInfo?: ReactNode | string
noHeadingBorder?: boolean
infoTextHeading?: string
hideHeading?: boolean
placement?: TippyProps['placement']
className?: string
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>
iconPath?: string
iconClass?: string
iconSize?: number // E.g. 16, 20, etc.. Currently, there are around 12 sizes supported. Check `icons.css` or `base.scss` for supported sizes or add new size (class names starts with `icon-dim-`).
onImageLoadError?: (e) => void
onClose?: () => void
infoText?: React.ReactNode
showCloseButton?: boolean
arrow?: boolean
interactive?: boolean
showOnCreate?: boolean
trigger?: string
animation?: string
duration?: number
additionalContent?: ReactNode
documentationLinkText?: string
children: React.ReactElement<any>
disableClose?: boolean
}

export interface InfoIconTippyProps<T extends boolean = false>
extends Pick<
TippyCustomizedProps,
TippyCustomizedProps<T>,
| 'heading'
| 'infoText'
| 'iconClass'
| 'documentationLink'
| 'documentationLinkText'
| 'additionalContent'
| 'placement'
| 'Icon'
| 'headingInfo'
| 'documentationLink'
| 'isEnterprise'
| 'isExternalLink'
> {
dataTestid?: string
children?: TippyCustomizedProps['children']
children?: TippyCustomizedProps<T>['children']
iconClassName?: string
buttonPadding?: string
}
Expand Down
1 change: 1 addition & 0 deletions src/Common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

export * from '../Shared/DocLink'
export * from './AddCDButton'
export * from './API'
export { BreadCrumb, useBreadcrumb } from './BreadCrumb/BreadCrumb'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import { ReactComponent as ICInfoFilledOverride } from '@Icons/ic-info-filled-override.svg'
import { Checkbox } from '@Common/Checkbox'
import { DOCUMENTATION } from '@Common/Constants'
import { Progressing } from '@Common/Progressing'
import { Tooltip } from '@Common/Tooltip'
import { CHECKBOX_VALUE } from '@Common/Types'
Expand Down Expand Up @@ -96,7 +95,7 @@ const DTApplicationMetricsFormField = ({
<InfoIconTippy
heading="Application Metrics"
infoText="Capture and show key application metrics over time. (E.g. Status codes 2xx, 3xx, 5xx; throughput and latency)."
documentationLink={DOCUMENTATION.APP_METRICS}
documentationLink="APP_METRICS"
documentationLinkText="Learn more"
dataTestid="app-metrics-info"
iconClassName="dc__no-shrink icon-dim-16 fcn-6"
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/GlobalConfigurations/BuildInfra/Descriptor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { InfoIconTippy } from '@Shared/Components/InfoIconTippy'

import { BreadCrumb, DOCUMENTATION } from '../../../Common'
import { BreadCrumb } from '../../../Common'
import { BUILD_INFRA_TEXT } from './constants'
import { BuildInfraDescriptorProps } from './types'

Expand All @@ -38,7 +38,7 @@ const Descriptor = ({
infoText={tippyInfoText ?? BUILD_INFRA_TEXT.EDIT_DEFAULT_TOOLTIP}
additionalContent={tippyAdditionalContent}
heading={tooltipHeading || BUILD_INFRA_TEXT.HEADING}
documentationLink={DOCUMENTATION.GLOBAL_CONFIG_BUILD_INFRA}
documentationLink="GLOBAL_CONFIG_BUILD_INFRA"
documentationLinkText="View Documentation"
iconClassName="icon-dim-20 fcn-6"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Components/AppStatusModal/AppStatusBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getAppStatusMessageFromAppDetails } from './utils'

const InfoCardItem = ({ heading, value, isLast = false, alignCenter = false }: InfoCardItemProps) => (
<div
className={`py-12 px-16 dc__grid dc__column-gap-16 info-card-item ${alignCenter ? 'dc__align-items-center' : ''} ${!isLast ? 'border__secondary--bottom' : ''} ${alignCenter ? 'dc__align-center' : ''}`}
className={`py-12 px-16 dc__grid dc__column-gap-16 info-card-item ${alignCenter ? 'dc__align-items-center' : ''} ${!isLast ? 'border__secondary--bottom' : ''}`}
>
<Tooltip content={heading}>
<h3 className="cn-9 fs-13 fw-4 lh-1-5 dc__truncate m-0 dc__no-shrink">{heading}</h3>
Expand Down
23 changes: 7 additions & 16 deletions src/Shared/Components/CICDHistory/Artifacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,11 @@ import folder from '@Icons/ic-folder.svg'
import { ReactComponent as ICHelpOutline } from '@Icons/ic-help.svg'
import { ReactComponent as MechanicalOperation } from '@Icons/ic-mechanical-operation.svg'
import noartifact from '@Images/no-artifact.webp'
import { DocLink } from '@Shared/DocLink'
import { getIsApprovalPolicyConfigured } from '@Shared/Helpers'
import { useDownload } from '@Shared/Hooks'

import {
ClipboardButton,
DOCUMENTATION,
extractImage,
GenericEmptyState,
ImageTagsContainer,
useGetUserRoles,
} from '../../../Common'
import { ClipboardButton, extractImage, GenericEmptyState, ImageTagsContainer, useGetUserRoles } from '../../../Common'
import { EMPTY_STATE_STATUS } from '../../constants'
import { TargetPlatformBadgeList } from '../TargetPlatforms'
import { TERMINAL_STATUS_MAP } from './constants'
Expand Down Expand Up @@ -274,14 +268,11 @@ const Artifacts = ({
<span className="fs-13 fw-4 mr-8 ml-8">
{EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.StoreFiles}
</span>
<a
className="fs-13 fw-6 cb-5 dc__no-decor"
href={DOCUMENTATION.BLOB_STORAGE}
target="_blank"
rel="noreferrer"
>
{EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.ConfigureBlobStorage}
</a>
<DocLink
docLinkKey="BLOB_STORAGE"
text={EMPTY_STATE_STATUS.ARTIFACTS_EMPTY_STATE_TEXTS.ConfigureBlobStorage}
dataTestId="configure-blob-storage"
/>
<OpenInNew className="icon-dim-20 ml-8" />
</div>
</div>
Expand Down
Loading