Skip to content

Commit 9bb1572

Browse files
committed
Merge branch 'main' into vite_exploration
2 parents fc560bb + 2c0c6b2 commit 9bb1572

File tree

162 files changed

+6351
-4395
lines changed

Some content is hidden

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

162 files changed

+6351
-4395
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ HIDE_GITOPS_OR_HELM_OPTION=true
2424
CONFIGURABLE_TIMEOUT=
2525
HIDE_APPLICATION_GROUPS=true
2626
K8S_CLIENT=false
27-
USE_V2=false
2827
CLUSTER_TERMINAL_CONNECTION_POLLING_INTERVAL=7000
2928
CLUSTER_TERMINAL_CONNECTION_RETRY_COUNT=7
3029
ENABLE_CHART_SEARCH_IN_HELM_DEPLOY=false

.eslintignore

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,6 @@ src/components/ResourceBrowser/Types.ts
127127
src/components/ResourceBrowser/Utils.ts
128128
src/components/__mocks__/monaco-editor.js
129129
src/components/__mocks__/xterm-webfont.js
130-
src/components/apiTokens/APITokenList.tsx
131-
src/components/apiTokens/ApiTokens.component.tsx
132-
src/components/apiTokens/CreateAPIToken.tsx
133-
src/components/apiTokens/EditAPIToken.tsx
134-
src/components/apiTokens/ExpirationDate.tsx
135-
src/components/apiTokens/GenerateModal.tsx
136-
src/components/apiTokens/GroupPermission.tsx
137-
src/components/apiTokens/RegenerateModal.tsx
138-
src/components/apiTokens/__mocks__/ApiTokens.mock.ts
139-
src/components/apiTokens/authorization.type.ts
140-
src/components/apiTokens/authorization.utils.ts
141-
src/components/apiTokens/validationRules.ts
142130
src/components/app/EventsLogs.tsx
143131
src/components/app/LogFilter.ts
144132
src/components/app/Overview/EnvironmentList.tsx
@@ -473,10 +461,8 @@ src/components/hostURL/hosturl.service.ts
473461
src/components/hostURL/hosturl.type.ts
474462
src/components/hyperion/EnvironmentSelect.tsx
475463
src/components/login/Login.tsx
476-
src/components/login/SSOLogin.tsx
477464
src/components/login/login.service.ts
478465
src/components/login/login.types.ts
479-
src/components/login/ssoConfig.types.tsx
480466
src/components/material/CreateMaterial.tsx
481467
src/components/material/MaterialList.tsx
482468
src/components/material/MaterialView.tsx
@@ -528,17 +514,15 @@ src/components/security/security.service.ts
528514
src/components/security/security.types.ts
529515
src/components/security/security.util.tsx
530516
src/components/terminal/TerminalWrapper.tsx
531-
src/components/userGroups/AppPermissions.tsx
532-
src/components/userGroups/Group.tsx
533-
src/components/userGroups/K8sObjectPermissions/K8sListItemCard.tsx
534-
src/components/userGroups/K8sObjectPermissions/K8sPermission.component.tsx
535-
src/components/userGroups/K8sObjectPermissions/K8sPermissionModal.tsx
536-
src/components/userGroups/K8sObjectPermissions/K8sPermissions.utils.ts
537-
src/components/userGroups/K8sObjectPermissions/K8sPermissons.tsx
538-
src/components/userGroups/User.tsx
539-
src/components/userGroups/UserGroup.tsx
540-
src/components/userGroups/userGroup.service.ts
541-
src/components/userGroups/userGroups.types.ts
517+
src/Pages/GlobalConfigurations/Authorization/shared/components/AppPermissions.tsx
518+
src/Pages/GlobalConfigurations/Authorization/shared/components/K8sObjectPermissions/K8sListItemCard.tsx
519+
src/Pages/GlobalConfigurations/Authorization/shared/components/K8sObjectPermissions/K8sPermission.component.tsx
520+
src/Pages/GlobalConfigurations/Authorization/shared/components/K8sObjectPermissions/K8sPermissionModal.tsx
521+
src/Pages/GlobalConfigurations/Authorization/shared/components/K8sObjectPermissions/K8sPermissions.utils.ts
522+
src/Pages/GlobalConfigurations/Authorization/shared/components/K8sObjectPermissions/K8sPermissons.tsx
523+
src/Pages/GlobalConfigurations/Authorization/shared/components/userGroups/UserGroup.tsx
524+
src/Pages/GlobalConfigurations/Authorization/shared/components/userGroups/userGroups.types.ts
525+
src/Pages/GlobalConfigurations/Authorization/SSOLoginServices/SSOLogin.component.tsx
542526
src/components/util/KeyValueFileInput.tsx
543527
src/components/v2/HelmAppOverview/HelpAppOverview.tsx
544528
src/components/v2/appDetails/AppDetails.component.tsx
@@ -655,3 +639,22 @@ src/util/DeleteComponent.tsx
655639
src/util/MurmurHash3.ts
656640
src/util/Subject.ts
657641
src/util/Util.ts
642+
643+
644+
src/Pages/GlobalConfigurations/Authorization/APITokens/GroupPermission.tsx
645+
src/Pages/GlobalConfigurations/Authorization/APITokens/index.ts
646+
src/Pages/GlobalConfigurations/Authorization/APITokens/validationRules.ts
647+
src/Pages/GlobalConfigurations/Authorization/PermissionGroups/AddEdit/index.ts
648+
src/Pages/GlobalConfigurations/Authorization/PermissionGroups/List/index.ts
649+
src/Pages/GlobalConfigurations/Authorization/PermissionGroups/index.ts
650+
src/Pages/GlobalConfigurations/Authorization/SSOLoginServices/index.ts
651+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/AddEdit/UserForm.tsx
652+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/AddEdit/index.ts
653+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/List/UserPermissionRow.tsx
654+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/List/index.ts
655+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/SSONotConfiguredState.tsx
656+
src/Pages/GlobalConfigurations/Authorization/UserPermissions/index.ts
657+
src/Pages/GlobalConfigurations/Authorization/index.ts
658+
src/Pages/GlobalConfigurations/Authorization/shared/components/FilterEmptyState/index.ts
659+
src/Pages/GlobalConfigurations/Authorization/shared/components/SuperAdminInfoBar/index.ts
660+
src/components/v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/CustomLogsModal/CustomLogsModal.tsx

config.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| APPLICATION_METRICS_ENABLED | "true" | Show application metrics button |
66
| HIDE_APPLICATION_GROUPS | "false" | Hide application group from Devtron UI |
77
| HIDE_DISCORD | "true" | Hide Discord button from UI |
8-
| HIDE_DEPLOYMENT_GROUPS | "false" | Enable GitOps and Helm option |
8+
| HIDE_GITOPS_OR_HELM_OPTION | "false" | Enable GitOps and Helm option |
99
| HOTJAR_ENABLED | "false" | Hotjar integration status |
1010
| POSTHOG_ENABLED | "true" | PostHog integration status |
1111
| POSTHOG_TOKEN | XXXXXXXX | PostHog API token |
@@ -15,7 +15,6 @@
1515
| SENTRY_PERFORMANCE_ENABLED | false | To send persormance sentry |
1616
| SENTRY_DSN | '' | SENTRY Data Source Name |
1717
| SENTRY_TRACES_SAMPLE_RATE | 0.2 | Rate at which data send to sentry.(min=0 max=1)|
18-
| USE_V2 | "true" | Use the v2 APIs |
1918
| ENABLE_RESTART_WORKLOAD | "false" | Show restart pods option in app details page |
2019
| ENABLE_BUILD_CONTEXT | "true" | Enable build context in Devtron UI |
2120
| FORCE_SECURITY_SCANNING | "false" | Force security scanning |
@@ -32,4 +31,4 @@
3231
| TRIGGER_API_TIMEOUT | 60000 | Default timeout for all API requests for Trigger calls (Deploy artifacts, charts) in DASHBOARD |
3332
| LOGIN_DT_LOGO | "" | Devtron logo for login page |
3433
| SIDEBAR_DT_LOGO | "" | Devtron logo for sidebar |
35-
# DASHBOARD CONFIG SECRET
34+
# DASHBOARD CONFIG SECRET

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.0.60-beta-1",
7+
"@devtron-labs/devtron-fe-common-lib": "0.0.62-beta-6",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/GlobalConfigurations/.gitkeep

Whitespace-only changes.

src/components/apiTokens/APITokenList.tsx renamed to src/Pages/GlobalConfigurations/Authorization/APITokens/APITokenList.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import moment from 'moment'
22
import React, { useState } from 'react'
33
import { useHistory } from 'react-router-dom'
44
import { TippyCustomized, TippyTheme, GenericEmptyState } from '@devtron-labs/devtron-fe-common-lib'
5-
import { DOCUMENTATION, MomentDateFormat } from '../../config'
6-
import { ReactComponent as Key } from '../../assets/icons/ic-key-bulb.svg'
7-
import { ReactComponent as Edit } from '../../assets/icons/ic-pencil.svg'
8-
import { ReactComponent as Trash } from '../../assets/icons/ic-delete-interactive.svg'
5+
import { DOCUMENTATION, MomentDateFormat } from '../../../../config'
6+
import { ReactComponent as Key } from '../../../../assets/icons/ic-key-bulb.svg'
7+
import { ReactComponent as Edit } from '../../../../assets/icons/ic-pencil.svg'
8+
import { ReactComponent as Trash } from '../../../../assets/icons/ic-delete-interactive.svg'
99
import { APITokenListType, TokenListType } from './authorization.type'
1010
import { isTokenExpired } from './authorization.utils'
1111
import DeleteAPITokenModal from './DeleteAPITokenModal'
12-
import NoResults from '../../assets/img/[email protected]'
12+
import NoResults from '../../../../assets/img/[email protected]'
1313
import './apiToken.scss'
14-
import { ReactComponent as Question } from '../../assets/icons/ic-help-outline.svg'
15-
import { ReactComponent as QuestionFilled } from '../../assets/icons/ic-help.svg'
16-
import { EMPTY_STATE_STATUS } from '../../config/constantMessaging'
14+
import { ReactComponent as Question } from '../../../../assets/icons/ic-help-outline.svg'
15+
import { ReactComponent as QuestionFilled } from '../../../../assets/icons/ic-help.svg'
16+
import { EMPTY_STATE_STATUS } from '../../../../config/constantMessaging'
1717

1818
const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType) => {
1919
const history = useHistory()
@@ -24,6 +24,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
2424
history.push(id ? `${key}/${id}` : key)
2525
}
2626

27+
// eslint-disable-next-line @typescript-eslint/no-shadow
2728
const handleDeleteButton = (tokenList) => {
2829
setSelectedToken(tokenList)
2930
setDeleteConfirmation(true)
@@ -77,14 +78,15 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
7778

7879
return (
7980
<div className="bcn-0">
80-
<div data-testid="api-token-page-header" className="flex dc__content-space pl-20 pr-20 pt-16 pb-16">
81+
<div data-testid="api-token-page-header" className="flex dc__content-space pl-20 pr-20 pb-16">
8182
<div className="flex row ml-0">
8283
<div className="cn-9 fw-6 fs-16">API tokens</div>
8384
{handleQuestion()}
8485
</div>
8586
<div className="flex dc__align-end dc__content-end">
8687
{renderSearchToken()}
8788
<button
89+
type="button"
8890
data-testid="api-token-generate-button"
8991
className="flex cta h-32 ml-10"
9092
onClick={handleGenerateRowAction}
@@ -107,6 +109,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
107109
? noMatchingResults()
108110
: tokenList.map((list, index) => (
109111
<div
112+
// eslint-disable-next-line react/no-array-index-key
110113
key={`api_${index}`}
111114
data-testid="api-list-row"
112115
className="api-list__row api-list-row flex-align-center fw-4 cn-9 fs-13 pr-20 pl-20"
@@ -117,6 +120,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
117120
className="dc__transparent cursor flex"
118121
data-index={index}
119122
onClick={handleEditRowAction}
123+
aria-label="Edit api token"
120124
>
121125
<Key
122126
className={`api-key-icon icon-dim-20 ${
@@ -150,6 +154,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
150154
data-index={index}
151155
data-testid="api-token-edit-button"
152156
onClick={handleEditRowAction}
157+
aria-label="Edit api token"
153158
>
154159
<Edit className="icon-dim-20" />
155160
</button>
@@ -159,6 +164,7 @@ const APITokenList = ({ tokenList, renderSearchToken, reload }: APITokenListType
159164
data-index={index}
160165
data-testid="api-token-delete-button"
161166
onClick={handleDelete}
167+
aria-label="Delete api token"
162168
>
163169
<Trash className="scn-6 icon-dim-20" />
164170
</button>

src/components/apiTokens/ApiTokens.component.tsx renamed to src/Pages/GlobalConfigurations/Authorization/APITokens/ApiTokens.component.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import React, { Fragment, useEffect, useState } from 'react'
1+
import React, { useEffect, useState } from 'react'
22
import './apiToken.scss'
33
import { showError, Progressing, ErrorScreenManager, GenericEmptyState } from '@devtron-labs/devtron-fe-common-lib'
44
import { Redirect, Route, Switch, useHistory, useLocation, useRouteMatch } from 'react-router-dom'
5-
import { ReactComponent as Search } from '../../assets/icons/ic-search.svg'
6-
import { ReactComponent as Clear } from '../../assets/icons/ic-error.svg'
5+
import { ReactComponent as Search } from '../../../../assets/icons/ic-search.svg'
6+
import { ReactComponent as Clear } from '../../../../assets/icons/ic-error.svg'
77
import { getGeneratedAPITokenList } from './service'
8-
import emptyGeneratToken from '../../assets/img/ic-empty-generate-token.png'
8+
import emptyGeneratToken from '../../../../assets/img/ic-empty-generate-token.png'
99
import APITokenList from './APITokenList'
1010
import CreateAPIToken from './CreateAPIToken'
1111
import EditAPIToken from './EditAPIToken'
1212
import { TokenListType, TokenResponseType } from './authorization.type'
13-
import { EMPTY_STATE_STATUS } from '../../config/constantMessaging'
13+
import { EMPTY_STATE_STATUS } from '../../../../config/constantMessaging'
1414

1515
const ApiTokens = () => {
1616
const { path } = useRouteMatch()
@@ -21,7 +21,7 @@ const ApiTokens = () => {
2121
const [loader, setLoader] = useState(false)
2222
const [tokenList, setTokenlist] = useState<TokenListType[]>(undefined)
2323
const [filteredTokenList, setFilteredTokenList] = useState<TokenListType[]>(undefined)
24-
const [noResults, setNoResults] = useState(false)
24+
const [, setNoResults] = useState(false)
2525
const [errorStatusCode, setErrorStatusCode] = useState(0)
2626
const [showGenerateModal, setShowGenerateModal] = useState(false)
2727
const [showRegenerateTokenModal, setShowRegenerateTokenModal] = useState(false)
@@ -117,7 +117,12 @@ const ApiTokens = () => {
117117
onKeyDown={handleFilterKeyPress}
118118
/>
119119
{searchApplied && (
120-
<button className="flex search__clear-button" type="button" onClick={clearSearch}>
120+
<button
121+
className="flex search__clear-button"
122+
type="button"
123+
onClick={clearSearch}
124+
aria-label="Clear Search"
125+
>
121126
<Clear className="icon-dim-18 icon-n4 dc__vertical-align-middle" />
122127
</button>
123128
)}
@@ -133,7 +138,7 @@ const ApiTokens = () => {
133138

134139
const renderAPITokenRoutes = (): JSX.Element => {
135140
return (
136-
<div data-testid="api-token-page" className="api-token-container bcn-0">
141+
<div data-testid="api-token-page" className="api-token-container flexbox-col flex-grow-1">
137142
<Switch>
138143
<Route path={`${path}/list`}>
139144
<APITokenList
@@ -179,7 +184,7 @@ const ApiTokens = () => {
179184

180185
const renderGenerateButton = () => {
181186
return (
182-
<button className="flex cta h-32" onClick={redirectToCreate}>
187+
<button className="flex cta h-32" onClick={redirectToCreate} type="button">
183188
Generate new token
184189
</button>
185190
)
@@ -193,6 +198,7 @@ const ApiTokens = () => {
193198
subTitle={EMPTY_STATE_STATUS.GENERATE_API_TOKEN.SUBTITLE}
194199
isButtonAvailable
195200
renderButton={renderGenerateButton}
201+
classname="flex-grow-1"
196202
/>
197203
)
198204
}

0 commit comments

Comments
 (0)