Skip to content

Commit 1bb90c6

Browse files
committed
Merge branch 'main' into demo/resource-browser
2 parents 11ced72 + 29925fb commit 1bb90c6

27 files changed

+4161
-4261
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ src/Common/DraggableWrapper/DraggableWrapper.tsx
3838
src/Common/Drawer/Drawer.tsx
3939
src/Common/EmptyState/GenericEmptyState.tsx
4040
src/Common/Error.tsx
41-
src/Common/ErrorScreenNotFound.tsx
4241
src/Common/Grid/Grid.tsx
4342
src/Common/Helper.tsx
4443
src/Common/Hooks/UseClickOutside/UseClickOutside.tsx

package-lock.json

Lines changed: 3590 additions & 4096 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 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.0.76-beta-2",
3+
"version": "0.0.78-beta-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -65,7 +65,7 @@
6565
"@typeform/embed-react": "2.20.0",
6666
"react-toastify": "^8.2.0",
6767
"typescript": "^4.9.4",
68-
"vite": "^4.4.5",
68+
"vite": "^4.5.3",
6969
"vite-plugin-dts": "^3.5.1",
7070
"vite-plugin-lib-inject-css": "^1.2.0",
7171
"vite-plugin-svgr": "^2.4.0"

src/Assets/Icon/ic-help-outline.svg

Lines changed: 2 additions & 2 deletions
Loading

src/Assets/Img/ic-not-found.svg

Lines changed: 160 additions & 0 deletions
Loading

src/Assets/Img/ic-page-not-found.svg

Lines changed: 65 additions & 0 deletions
Loading

src/Common/Constants.ts

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const FALLBACK_REQUEST_TIMEOUT = 60000
44
export const Host = window?.__ORCHESTRATOR_ROOT__ ?? '/orchestrator'
55

66
export const DOCUMENTATION_HOME_PAGE = 'https://docs.devtron.ai'
7+
export const DISCORD_LINK = 'https://discord.devtron.ai/'
78
export const DOCUMENTATION = {
89
APP_TAGS: `${DOCUMENTATION_HOME_PAGE}/v/v0.6/usage/applications/create-application#tags`,
910
APP_OVERVIEW_TAGS: `${DOCUMENTATION_HOME_PAGE}/v/v0.6/usage/applications/overview#manage-tags`,
@@ -39,6 +40,7 @@ export const ROUTES = {
3940
INFRA_CONFIG_PROFILE: 'infra-config/profile',
4041
SECURITY_SCAN_EXECUTION_DETAILS: 'security/scan/executionDetail',
4142
NOTIFIER: 'notification',
43+
APP_LIST: 'app/list',
4244
TELEMETRY_EVENT: 'telemetry/event',
4345
SERVER_INFO_API: 'server',
4446
ATTRIBUTES_USER: 'attributes/user',
@@ -59,22 +61,51 @@ export const DEFAULT_TAG_DATA = {
5961
isSuggested: true,
6062
}
6163

64+
export enum ERROR_STATUS_CODE {
65+
BAD_REQUEST = 400,
66+
UNAUTHORIZED = 401,
67+
PERMISSION_DENIED = 403,
68+
NOT_FOUND = 404,
69+
EXPECTATION_FAILED = 417,
70+
INTERNAL_SERVER_ERROR = 500,
71+
BAD_GATEWAY = 502,
72+
SERVICE_TEMPORARY_UNAVAILABLE = 503,
73+
}
74+
6275
export const TOAST_ACCESS_DENIED = {
6376
TITLE: 'Access denied',
6477
SUBTITLE: 'You do not have required access to perform this action',
6578
}
6679

6780
// Empty state messgaes
6881
export const ERROR_EMPTY_SCREEN = {
69-
PAGE_NOT_FOUND: 'We could not find this page',
70-
PAGE_NOT_EXIST: 'This page doesn’t exist or was removed. We suggest you go back to home',
71-
TAKE_BACK_HOME: 'Take me home',
82+
PAGE_NOT_FOUND: 'Not found',
83+
PAGE_NOT_EXIST: 'Error 404: The requested resource could not be found. Please check the URL and try again.',
84+
TAKE_BACK_HOME: 'Go back home',
85+
REPORT_ISSUE: 'Report issue',
7286
ONLY_FOR_SUPERADMIN: 'Information on this page is available only to superadmin users.',
7387
NOT_AUTHORIZED: 'Not authorized',
74-
UNAUTHORIZED: 'unauthorized',
75-
FORBIDDEN: 'forbidden',
7688
REQUIRED_MANAGER_ACCESS:
7789
'Looks like you don’t have access to information on this page. Please contact your manager to request access.',
90+
BAD_REQUEST: 'Bad request',
91+
BAD_REQUEST_MESSAGE:
92+
'Error 400: The request could not be understood by the server due to malformed syntax. Please check your request and try again.',
93+
TRY_AGAIN: 'Try again',
94+
UNAUTHORIZED: 'Unauthorized',
95+
UNAUTHORIZED_MESSAGE:
96+
'Error 401: You are not authorized to access this resource. Please contact your administrator for assistance.',
97+
FORBIDDEN: 'Forbidden',
98+
FORBIDDEN_MESSAGE:
99+
'Error 403: You are not authorized to access this resource. Please contact your administrator for assistance.',
100+
INTERNAL_SERVER_ERROR: 'Internal server error',
101+
INTERNAL_SERVER_ERROR_MESSAGE:
102+
'Error 500: The server encountered an unexpected condition that prevented it from fulfilling the request. Please try again later.',
103+
BAD_GATEWAY: 'Bad gateway',
104+
BAD_GATEWAY_MESSAGE:
105+
'Error 500: The server received an invalid response from an upstream server. Please try again later.',
106+
SERVICE_TEMPORARY_UNAVAILABLE: 'Service temporary unavailable',
107+
SERVICE_TEMPORARY_UNAVAILABLE_MESSAGE:
108+
'Error 503: The server is currently unable to handle the request due to a temporary overload or maintenance. Please try again later.',
78109
}
79110
export const TOKEN_COOKIE_NAME = 'argocd.token'
80111
export const TriggerTypeMap = {
@@ -410,8 +441,6 @@ export enum SERVER_MODE {
410441
FULL = 'FULL',
411442
}
412443

413-
export const DISCORD_LINK = 'https://discord.devtron.ai/'
414-
415444
export const POSTHOG_EVENT_ONBOARDING = {
416445
PREVIEW: 'Preview',
417446
DEPLOY_CUSTOM_APP_CI_CD: 'Deploy custom app using CI/CD pipelines',

src/Common/CustomTagSelector/PropagateTagInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import { ReactComponent as InjectTag } from '../../Assets/Icon/inject-tag.svg'
3-
import { ReactComponent as Help } from '../../Assets/Icon/ic-help-outline.svg'
3+
import { ReactComponent as ICHelpOutline } from '../../Assets/Icon/ic-help-outline.svg'
44
import { TippyCustomized } from '../TippyCustomized'
55
import { TippyTheme } from '../Types'
66
import { DOCUMENTATION } from '../Constants'
@@ -37,7 +37,7 @@ export default function PropagateTagInfo({ isCreateApp }: { isCreateApp: boolean
3737
<div className="flexbox cursor">
3838
<InjectTag className="icon-dim-16 mt-2 mr-4" />
3939
<span>Propagate tags</span>
40-
<Help className="icon-dim-16 mt-2 ml-4" />
40+
<ICHelpOutline className="icon-dim-16 mt-2 ml-4" />
4141
</div>
4242
</TippyCustomized>
4343
)

src/Common/CustomTagSelector/TagLabelSelect.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import PropagateTagInfo from './PropagateTagInfo'
32
import { ReactComponent as Add } from '../../Assets/Icon/ic-add.svg'
43
import { DEFAULT_TAG_DATA } from '../Constants'

src/Common/EmptyState/GenericEmptyState.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react'
21
import AppNotDeployed from '../../Assets/Img/app-not-deployed.png'
32
import { GenericEmptyStateType, ImageType } from '../Types'
43

@@ -63,12 +62,18 @@ const GenericEmptyState = ({
6362
/>
6463
)}
6564
<div
66-
className={`flex column dc__gap-10 dc__mxw-300 ${
65+
className={`flex column dc__gap-20 dc__mxw-300 ${
6766
isRowLayout ? 'dc__align-start' : ''
6867
} ${contentClassName}`}
6968
>
70-
<h4 className="title fw-6 cn-9 mt-0 mb-0 lh-1-5">{title}</h4>
71-
{subTitle && <p className={`subtitle ${isRowLayout ? 'subtitle--text-start' : ''}`}>{subTitle}</p>}
69+
<div className="flex column dc__gap-8">
70+
<h4 className="title fw-6 cn-9 mt-0 mb-0 lh-24">{title}</h4>
71+
{subTitle && (
72+
<p className={`subtitle ${isRowLayout ? 'subtitle--text-start' : ''}`}>
73+
{subTitle}
74+
</p>
75+
)}
76+
</div>
7277
{isButtonAvailable && renderButton()}
7378
{children}
7479
</div>

0 commit comments

Comments
 (0)