Skip to content

Commit f1138c7

Browse files
authored
Merge pull request #2608 from devtron-labs/chore/main-sync
chore: main sync
2 parents 2b337b7 + 6aa1c46 commit f1138c7

26 files changed

+553
-457
lines changed

.env

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ ENABLE_RESTART_WORKLOAD=false
3232
ENABLE_SCOPED_VARIABLES=true
3333
DEFAULT_CI_TRIGGER_TYPE_MANUAL=false
3434
ANNOUNCEMENT_BANNER_MSG=
35-
LOGIN_PAGE_IMAGE=
36-
LOGIN_PAGE_IMAGE_BG=
3735
HIDE_DEFAULT_CLUSTER=false
3836
GLOBAL_API_TIMEOUT=60000
3937
TRIGGER_API_TIMEOUT=60000
40-
LOGIN_DT_LOGO=
4138
SIDEBAR_DT_LOGO=
4239
ENABLE_EXTERNAL_ARGO_CD=false
4340
API_BATCH_SIZE=20
@@ -66,3 +63,4 @@ FEATURE_ACTION_AUDIOS_ENABLE=true
6663
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
6764
FEATURE_CODE_MIRROR_ENABLE=false
6865
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
66+
GATEKEEPER_URL=devtron.ai

.storybook/preview-head.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
<link
2-
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
3-
rel="stylesheet"
4-
/>
5-
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" rel="stylesheet" />
6-
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap" rel="stylesheet" />
1+
<link rel="stylesheet" href="../index.css" />

config.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
| HIDE_DEFAULT_CLUSTER | "true" | Hide default cluster |
3131
| HIDE_EXCLUDE_INCLUDE_GIT_COMMITS | "true" | Hide exclude include git commits |
3232
| HIDE_GITOPS_OR_HELM_OPTION | "false" | Enable GitOps and Helm option |
33-
| LOGIN_DT_LOGO | "" | Devtron logo for login page |
34-
| LOGIN_PAGE_IMAGE | "" | Login page image url |
35-
| LOGIN_PAGE_IMAGE_BG | "" | Login page image background color code |
3633
| ORGANIZATION_NAME | "" | Name of the organization |
3734
| POSTHOG_ENABLED | "true" | PostHog integration status |
3835
| POSTHOG_TOKEN | XXXXXXXX | PostHog API token |

index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
2+
@import url('https://fonts.googleapis.com/css2?family=Inconsolata&display=swap');
3+
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap');
4+
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');
5+
16
/*
27
* Although this is duplicated but this would help us with consistent loader in case
38
* the theme is same as the system theme.

index.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818
<html lang="en">
1919
<head>
2020
<meta charset="utf-8" />
21-
<link
22-
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
23-
rel="stylesheet"
24-
/>
25-
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap" rel="stylesheet" />
26-
<link
27-
href="https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap"
28-
rel="stylesheet"
29-
/>
3021
<link rel="stylesheet" href="./index.css" />
3122
<link rel="shortcut icon" href="/favicon.ico" />
3223
<script src="/dashboard/env-config.js"></script>

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": "1.10.5",
7+
"@devtron-labs/devtron-fe-common-lib": "1.10.6",
88
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
99
"@rjsf/core": "^5.13.3",
1010
"@rjsf/utils": "^5.13.3",

src/App.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ import {
4242
} from './components/common'
4343
import { UPDATE_AVAILABLE_TOAST_PROGRESS_BG, URLS } from './config'
4444
import { validateToken } from './services/service'
45+
import { getCentralAPIHealth } from './utils'
4546

4647
const NavigationRoutes = lazy(() => import('./components/common/navigation/NavigationRoutes'))
4748
const Login = lazy(() => import('./components/login/Login'))
4849
const GenericDirectApprovalModal = importComponentFromFELibrary('GenericDirectApprovalModal')
50+
const ActivateLicense = importComponentFromFELibrary('ActivateLicense', null, 'function')
4951

5052
export default function App() {
5153
const onlineToastRef = useRef(null)
@@ -159,15 +161,13 @@ export default function App() {
159161
}
160162

161163
useEffect(() => {
162-
if (typeof Storage !== 'undefined') {
163-
// TODO (Arun): Remove in next packet
164-
localStorage.removeItem('undefined')
165-
}
164+
166165
if (navigator.serviceWorker) {
167166
navigator.serviceWorker.addEventListener('controllerchange', handleControllerChange)
168167
}
169168
// If not K8S_CLIENT then validateToken otherwise directly redirect
170-
if (!window._env_.K8S_CLIENT) {
169+
// No need to validate token if on license auth page
170+
if (!window._env_.K8S_CLIENT && location.pathname !== CommonURLS.LICENSE_AUTH) {
171171
// By Passing validations for direct email approval notifications
172172
if (isDirectApprovalNotification) {
173173
redirectToDirectApprovalNotification()
@@ -178,6 +178,9 @@ export default function App() {
178178
setValidating(false)
179179
defaultRedirection()
180180
}
181+
182+
getCentralAPIHealth()
183+
181184
return () => {
182185
navigator.serviceWorker.removeEventListener('controllerchange', handleControllerChange)
183186
}
@@ -340,6 +343,11 @@ export default function App() {
340343
/>
341344
</Route>
342345
)}
346+
{ActivateLicense && (
347+
<Route path={CommonURLS.LICENSE_AUTH}>
348+
<ActivateLicense />
349+
</Route>
350+
)}
343351
{!window._env_.K8S_CLIENT && <Route path="/login" component={Login} />}
344352
<Route path="/" render={() => <NavigationRoutes />} />
345353
<Redirect

src/Pages/GlobalConfigurations/Authorization/SSOLoginServices/SSOLogin.component.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
/* eslint-disable jsx-a11y/label-has-associated-control */
2626
/* eslint-disable react/destructuring-assignment */
2727
import React, { Component, createRef } from 'react'
28+
import ReactGA from 'react-ga4'
2829
import {
2930
showError,
3031
Progressing,
@@ -189,6 +190,11 @@ class SSOLogin extends Component<SSOLoginProps, SSOLoginState> {
189190

190191
handleSSOClick(event): void {
191192
const newsso = event.target.value
193+
ReactGA.event({
194+
category: 'login-card__sso-item',
195+
action: `LOGIN_WITH_${newsso}_CLICKED`,
196+
})
197+
192198
getSSOConfig(newsso)
193199
.then((response) => {
194200
this.setConfig(response, newsso)

src/assets/icons/ic-timer.svg

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/components/common/navigation/Navigation.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ interface NavigationType extends RouteComponentProps<{}> {
156156
isSuperAdmin: boolean
157157
isAirgapped: boolean
158158
currentServerInfo: MainContext['currentServerInfo']
159+
showStackManager: boolean
159160
}
160161

161162
export default class Navigation extends Component<
@@ -364,9 +365,7 @@ export default class Navigation extends Component<
364365
return this.renderNavLink(item)
365366
}
366367
})}
367-
{!window._env_.K8S_CLIENT &&
368-
!this.props.isAirgapped &&
369-
this.props.currentServerInfo.serverInfo?.installationType !== 'enterprise' && (
368+
{!window._env_.K8S_CLIENT && !this.props.isAirgapped && this.props.showStackManager && (
370369
<>
371370
<div className="short-nav__divider" />
372371
{this.renderNavLink(NavigationStack, 'short-nav__stack-manager')}

0 commit comments

Comments
 (0)