Skip to content

Commit abb54e9

Browse files
authored
Merge branch 'develop' into chore/sync-packet-17
2 parents d61c36b + 730088a commit abb54e9

Some content is hidden

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

51 files changed

+135
-137
lines changed

src/Common/Api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,4 @@ export const abortPreviousRequests = <T>(
263263
*/
264264
export const getIsRequestAborted = (error) =>
265265
// The 0 code is common for aborted and blocked requests
266-
error && error.code === 0 && error.message.search('abort\|aborted')
266+
error && error.code === 0 && error.message.search('abort|aborted')

src/Common/AppStatus/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
*/
1616

1717
export { default as AppStatus } from './AppStatus'
18-
export * from './utils'
18+
export * from './utils'

src/Common/ClipboardButton/ClipboardButton.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ export default function ClipboardButton({
4242
const [copied, setCopied] = useState<boolean>(false)
4343
const [enableTippy, setEnableTippy] = useState<boolean>(false)
4444

45-
const handleTextCopied = () => {setCopied(true)}
45+
const handleTextCopied = () => {
46+
setCopied(true)
47+
}
4648
const handleEnableTippy = () => setEnableTippy(true)
4749
const handleDisableTippy = () => setEnableTippy(false)
4850
const handleCopyContent = useCallback(
4951
(e?) => {
50-
if(e) stopPropagation(e)
52+
if (e) stopPropagation(e)
5153
copyToClipboard(content, handleTextCopied)
5254
},
5355
[content],

src/Common/Common.service.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ export function setImageTags(request, pipelineId: number, artifactId: number) {
8080
return post(`${ROUTES.IMAGE_TAGGING}/${pipelineId}/${artifactId}`, request)
8181
}
8282

83-
const cdMaterialListModal = (artifacts: any[], offset: number, artifactId?: number, artifactStatus?: string, disableDefaultSelection?: boolean) => {
83+
const cdMaterialListModal = (
84+
artifacts: any[],
85+
offset: number,
86+
artifactId?: number,
87+
artifactStatus?: string,
88+
disableDefaultSelection?: boolean,
89+
) => {
8490
if (!artifacts || !artifacts.length) return []
8591

8692
const markFirstSelected = offset === 0
@@ -346,9 +352,7 @@ export function fetchChartTemplateVersions() {
346352
return get(`${ROUTES.DEPLOYMENT_TEMPLATE_LIST}?appId=-1&envId=-1`)
347353
}
348354

349-
export const getDefaultConfig = (): Promise<ResponseType> => {
350-
return get(`${ROUTES.NOTIFIER}/channel/config`)
351-
}
355+
export const getDefaultConfig = (): Promise<ResponseType> => get(`${ROUTES.NOTIFIER}/channel/config`)
352356

353357
export function getEnvironmentListMinPublic(includeAllowedDeploymentTypes?: boolean) {
354358
return get(
@@ -361,13 +365,12 @@ export function getClusterListMin() {
361365
return get(URL)
362366
}
363367

364-
export const getResourceGroupListRaw = (clusterId: string): Promise<ResponseType<ApiResourceType>> => {
365-
return get(`${ROUTES.API_RESOURCE}/${ROUTES.GVK}/${clusterId}`)
366-
}
368+
export const getResourceGroupListRaw = (clusterId: string): Promise<ResponseType<ApiResourceType>> =>
369+
get(`${ROUTES.API_RESOURCE}/${ROUTES.GVK}/${clusterId}`)
367370

368371
export function getNamespaceListMin(clusterIdsCsv: string): Promise<EnvironmentListHelmResponse> {
369-
const URL = `${ROUTES.NAMESPACE}/autocomplete?ids=${clusterIdsCsv}`
370-
return get(URL)
372+
const URL = `${ROUTES.NAMESPACE}/autocomplete?ids=${clusterIdsCsv}`
373+
return get(URL)
371374
}
372375
export function getWebhookEventsForEventId(eventId: string | number) {
373376
const URL = `${ROUTES.GIT_HOST_EVENT}/${eventId}`

src/Common/CustomInput/CustomInput.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ export const CustomInput = ({
135135

136136
{getInputError()}
137137
{helperText && (
138-
<div className="flex left top dc__gap-4 fs-11 lh-16 cn-7 mt-4">
139-
<Info className="icon-dim-16" />
140-
<div>{helperText}</div>
138+
<div className="flex left top dc__gap-4 fs-11 lh-16 cn-7 mt-4">
139+
<Info className="icon-dim-16" />
140+
<div>{helperText}</div>
141141
</div>
142142
)}
143143
</div>

src/Common/DraggableWrapper/DraggableWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default function DraggableWrapper({
3434
parentRef,
3535
boundaryGap = 16,
3636
childDivProps = {},
37-
layoutFixDelta = 0
37+
layoutFixDelta = 0,
3838
}: DraggableWrapperProps) {
3939
const windowSize = useWindowSize()
4040
const nodeRef = useRef<HTMLDivElement>(null)

src/Common/EmptyState/GenericEmptyState.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ const GenericEmptyState = ({
8484
>
8585
<div className="flex column dc__gap-8">
8686
<h4 className="title fw-6 cn-9 mt-0 mb-0 lh-24 dc__align-center">{title}</h4>
87-
{subTitle && (
88-
<p className={`subtitle ${isRowLayout ? 'subtitle--text-start' : ''}`}>
89-
{subTitle}
90-
</p>
91-
)}
87+
{subTitle && <p className={`subtitle ${isRowLayout ? 'subtitle--text-start' : ''}`}>{subTitle}</p>}
9288
</div>
9389
{isButtonAvailable && renderButton()}
9490
{children}

src/Common/ErrorPage.tsx

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 { useHistory } from 'react-router'
17+
import { useHistory } from 'react-router-dom'
1818
import { ERROR_STATUS_CODE, ERROR_EMPTY_SCREEN, ROUTES } from './Constants'
1919
import GenericEmptyState from './EmptyState/GenericEmptyState'
2020
import { ErrorPageType } from './Types'

src/Common/Helper.tsx

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import { ERROR_EMPTY_SCREEN, SortingOrder, EXCLUDED_FALSY_VALUES, DISCORD_LINK,
2727
import { ServerErrors } from './ServerError'
2828
import { toastAccessDenied } from './ToastBody'
2929
import { AsyncOptions, AsyncState, UseSearchString } from './Types'
30-
import { scrollableInterface } from '../Shared'
31-
import { DATE_TIME_FORMAT_STRING } from '../Shared'
30+
import { scrollableInterface, DATE_TIME_FORMAT_STRING } from '../Shared'
3231
import { ReactComponent as ArrowDown } from '../Assets/Icon/ic-chevron-down.svg'
3332

3433
toast.configure({
@@ -730,8 +729,7 @@ export const powerSetOfSubstringsFromStart = (strings: string[], regex: RegExp)
730729
return _keys
731730
})
732731

733-
export const convertJSONPointerToJSONPath = (pointer: string) =>
734-
pointer.replace(/\//g, '.').replace(/\./, '$.')
732+
export const convertJSONPointerToJSONPath = (pointer: string) => pointer.replace(/\//g, '.').replace(/\./, '$.')
735733

736734
export const flatMapOfJSONPaths = (
737735
paths: string[],
@@ -775,15 +773,16 @@ export const handleRelativeDateSorting = (dateStringA, dateStringB, sortOrder) =
775773

776774
if (isNaN(dateA) && isNaN(dateB)) {
777775
return 0 // Both dates are invalid, consider them equal
778-
} else if (isNaN(dateA)) {
776+
}
777+
if (isNaN(dateA)) {
779778
// dateA is invalid, move it to the end if sorting ASC, otherwise to the beginning
780779
return sortOrder === SortingOrder.ASC ? 1 : -1
781-
} else if (isNaN(dateB)) {
780+
}
781+
if (isNaN(dateB)) {
782782
// dateB is invalid, move it to the end if sorting ASC, otherwise to the beginning
783783
return sortOrder === SortingOrder.ASC ? -1 : 1
784-
} else {
785-
return sortOrder === SortingOrder.ASC ? dateB - dateA : dateA - dateB
786784
}
785+
return sortOrder === SortingOrder.ASC ? dateB - dateA : dateA - dateB
787786
}
788787

789788
/**
@@ -1027,13 +1026,11 @@ export function useKeyDown() {
10271026
return keys
10281027
}
10291028

1030-
export const DropdownIndicator = (props) => {
1031-
return (
1032-
<components.DropdownIndicator {...props}>
1033-
<ArrowDown className="icon-dim-20 icon-n6" />
1034-
</components.DropdownIndicator>
1035-
)
1036-
}
1029+
export const DropdownIndicator = (props) => (
1030+
<components.DropdownIndicator {...props}>
1031+
<ArrowDown className="icon-dim-20 icon-n6" />
1032+
</components.DropdownIndicator>
1033+
)
10371034

10381035
export function mapByKey<T = Map<any, any>>(arr: any[], id: string): T {
10391036
if (!Array.isArray(arr)) {

src/Common/ImageTags.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,12 @@ export const ImageTagsContainer = ({
280280
<div className="h-250 fs-13 dc__overflow-scroll p-12">
281281
<div>Image labels allow you to tag container images with readable and relatable labels eg. v1.0.</div>
282282
<ul className="pl-20 mt-8">
283-
<li>
284-
A label can only be added if a workflow has CD pipelines deploying to Production environments.
285-
</li>
283+
<li>A label can only be added if a workflow has CD pipelines deploying to Production environments.</li>
286284
<li>Multiple labels can be added to an image.</li>
287285
<li>Multiple images in an application cannot have the same label.</li>
288286
<li>
289-
Labels cannot be deleted once saved. Although, you can soft delete a label if an unwanted label has been
290-
added.
287+
Labels cannot be deleted once saved. Although, you can soft delete a label if an unwanted label has
288+
been added.
291289
</li>
292290
</ul>
293291
</div>

0 commit comments

Comments
 (0)