Skip to content

Commit 4c26f7b

Browse files
Merge pull request #243 from devtron-labs/feat/history-ui
feat: history ui revamp
2 parents 82d0b43 + 31a38fa commit 4c26f7b

26 files changed

+756
-660
lines changed

package-lock.json

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.2.11",
3+
"version": "0.2.12",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/Icon/ic-aborted.svg

Lines changed: 5 additions & 0 deletions
Loading

src/Assets/Icon/ic-lines.svg

Lines changed: 3 additions & 0 deletions
Loading

src/Assets/Icon/ic-pulsate-status.svg

Lines changed: 21 additions & 0 deletions
Loading

src/Common/AppStatus/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { TIMELINE_STATUS } from "../../Shared/constants"
17+
import { TIMELINE_STATUS } from '../../Shared/constants'
1818

1919
export const triggerStatus = (triggerDetailStatus: string): string => {
2020
const triggerStatus = triggerDetailStatus?.toUpperCase()

src/Shared/Components/CICDHistory/Artifacts.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useEffect, useState } from 'react'
1817
import { useParams } from 'react-router'
1918
import { useDownload } from '@Shared/Hooks'
2019
import {
@@ -133,7 +132,7 @@ const Artifacts = ({
133132
appReleaseTagNames,
134133
tagsEditable,
135134
hideImageTaggingHardDelete,
136-
jobCIClass,
135+
rootClassName,
137136
renderCIListHeader,
138137
}: ArtifactType) => {
139138
const { isSuperAdmin } = useSuperAdmin()
@@ -143,14 +142,6 @@ const Artifacts = ({
143142
triggerId: string
144143
buildId: string
145144
}>()
146-
const [copied, setCopied] = useState(false)
147-
148-
useEffect(() => {
149-
if (!copied) {
150-
return
151-
}
152-
setTimeout(() => setCopied(false), 2000)
153-
}, [copied])
154145

155146
async function handleArtifact() {
156147
await handleDownload({
@@ -215,7 +206,7 @@ const Artifacts = ({
215206
)
216207
}
217208
return (
218-
<div className={`flex left column dc__gap-12 ${jobCIClass ?? ''}`}>
209+
<div className={`flex left column dc__gap-12 dc__content-start ${rootClassName ?? ''}`}>
219210
{!isJobView && type !== HistoryComponentType.CD && (
220211
<CIListItem
221212
type="artifact"

src/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryConfigList.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const DeploymentHistoryConfigList = ({
6262
setFullScreenView(false)
6363
}}
6464
data-testid={`configuration-link-option-${index}`}
65-
className="bcb-1 dc__no-decor bcn-0 cn-9 pl-16 pr-16 pt-12 pb-12 br-4 en-2 bw-1 mb-12 flex dc__content-space cursor lh-20"
65+
className="bcb-1 dc__no-decor bcn-0 cn-9 pl-16 pr-16 pt-12 pb-12 br-4 en-2 bw-1 flex dc__content-space cursor lh-20"
6666
>
6767
{childComponentName || currentComponent.DISPLAY_NAME}
6868
<ICChevron className="icon-dim-20 fcn-6 dc__flip-270" />
@@ -84,10 +84,10 @@ const DeploymentHistoryConfigList = ({
8484
deploymentHistoryList &&
8585
deploymentHistoryList.map((historicalComponent, index) => (
8686
// eslint-disable-next-line react/no-array-index-key
87-
<div className="m-20 fs-13 cn-9" key={`history-list__${index}`}>
87+
<div className="px-20 pt-20 fs-13 cn-9" key={`history-list__${index}`}>
8888
{historicalComponent.childList?.length > 0 ? (
8989
<>
90-
<div className="fs-14 fw-6 mb-12 ">
90+
<div className="fs-14 fw-6 mb-12">
9191
{DEPLOYMENT_HISTORY_CONFIGURATION_LIST_MAP[historicalComponent.name].DISPLAY_NAME}
9292
</div>
9393
{historicalComponent.childList.map((historicalComponentName, childIndex) =>

src/Shared/Components/CICDHistory/DeploymentStatusDetailRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
import { useEffect, useState } from 'react'
1919
import moment from 'moment'
2020
import { useParams } from 'react-router-dom'
21+
import { ShowMoreText } from '@Shared/Components/ShowMoreText'
2122
import { DATE_TIME_FORMATS, showError } from '../../../Common'
2223
import { DEPLOYMENT_STATUS, statusIcon, TIMELINE_STATUS } from '../../constants'
2324
import { ErrorInfoStatusBar } from './ErrorInfoStatusBar'
2425
import { DeploymentStatusDetailRowType } from './types'
2526
import { getManualSync } from './service'
2627
import { MANIFEST_STATUS_HEADERS, TERMINAL_STATUS_MAP } from './constants'
2728
import { ReactComponent as DropDownIcon } from '../../../Assets/Icon/ic-chevron-down.svg'
28-
import { ShowMoreText } from '../ShowMoreText/ShowMoreText'
2929
import AppStatusDetailsChart from './AppStatusDetailsChart'
3030
import { renderIcon } from './utils'
3131

src/Shared/Components/CICDHistory/LogStageAccordion.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const LogStageAccordion = ({
1919
handleStageOpen,
2020
stageIndex,
2121
isLoading,
22+
fullScreenView,
2223
}: LogStageAccordionProps) => {
2324
const handleAccordionToggle = () => {
2425
if (isOpen) {
@@ -41,7 +42,7 @@ const LogStageAccordion = ({
4142
<button
4243
className={`flexbox dc__transparent dc__content-space py-6 px-8 br-4 dc__align-items-center dc__select-text logs-renderer__stage-accordion ${
4344
isOpen ? 'logs-renderer__stage-accordion--open-stage' : ''
44-
} dc__position-sticky dc__zi-1 dc__top-44`}
45+
} dc__position-sticky dc__zi-1 ${fullScreenView ? 'dc__top-44' : 'dc__top-82'}`}
4546
type="button"
4647
role="tab"
4748
onClick={handleAccordionToggle}

0 commit comments

Comments
 (0)