Skip to content

Commit 10a8c34

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/dashboard into refactor/remove-monaco
2 parents b4335ac + 342d5cd commit 10a8c34

39 files changed

+449
-205
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,7 @@ FEATURE_CLUSTER_MAP_ENABLE=true
6161
FEATURE_DEFAULT_LANDING_RB_ENABLE=false
6262
FEATURE_ACTION_AUDIOS_ENABLE=true
6363
FEATURE_APPLICATION_TEMPLATES_ENABLE=true
64+
FEATURE_CODE_MIRROR_ENABLE=true
6465
FEATURE_DEFAULT_AUTHENTICATED_VIEW_ENABLE=false
6566
GATEKEEPER_URL=https://license.devtron.ai/dashboard
67+
FEATURE_AI_INTEGRATION_ENABLE=false

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

src/Pages/App/CreateAppModal/UpdateTemplateConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const UpdateTemplateConfig = ({
109109
return (
110110
<>
111111
<div className="divider__secondary--horizontal" />
112-
<div className="br-8 border__secondary bg__primary p-20 pb-0-imp flexbox-col dc__gap-16">
112+
<div className="br-8 border__secondary bg__primary p-20 flexbox-col dc__gap-16">
113113
<h4 className="fs-14 fw-6 lh-20 cn-9 m-0">Code Source</h4>
114114
<MaterialList
115115
isCreateAppView

src/Shared/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './utils'

src/Shared/utils.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { AppType } from '@devtron-labs/devtron-fe-common-lib'
2+
3+
const getAppTypeCategory = (appType: AppType) => {
4+
switch (appType) {
5+
case AppType.DEVTRON_APP:
6+
return 'DA'
7+
case AppType.DEVTRON_HELM_CHART:
8+
case AppType.EXTERNAL_HELM_CHART:
9+
return 'HA'
10+
case AppType.EXTERNAL_ARGO_APP:
11+
return 'ACD'
12+
case AppType.EXTERNAL_FLUX_APP:
13+
return 'FCD'
14+
default:
15+
return 'DA'
16+
}
17+
}
18+
19+
export const getAIAnalyticsEvents = (context: string, appType?: AppType) =>
20+
`AI_${appType ? `${getAppTypeCategory(appType)}_` : ''}${context}`

src/components/ApplicationGroup/AppGroupAppFilter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export default function AppGroupAppFilter() {
5353
setSelectedFilterTab(_filterTab)
5454
}
5555

56-
const handleFilterGAEvent = (isItemClick?: boolean) => {
56+
const handleFilterGAEvent = (filterType?: string) => {
5757
ReactGA.event({
5858
category: 'Group filter',
59-
action: `${filterParentType} filter ${isItemClick ? 'item' : ''} clicked`,
59+
action: `${filterParentType === FilterParentType.app ? 'DA_ENV' : 'AG_APP'}_FILTER${filterType ? `_${filterType}` : ''}_CLICKED`,
6060
})
6161
}
6262

@@ -118,7 +118,7 @@ export default function AppGroupAppFilter() {
118118
})
119119
}
120120
}
121-
handleFilterGAEvent(true)
121+
handleFilterGAEvent(selectedFilterTab === AppFilterTabs.APP_FILTER ? 'ITEM' : 'SAVED_ITEM')
122122
}
123123

124124
const getPlaceHolder = (): string => {

src/components/ApplicationGroup/AppGroupDetailsRoute.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
ToastVariantType,
4141
URLS as CommonURLS,
4242
DeleteConfirmationModal,
43+
useMainContext,
4344
} from '@devtron-labs/devtron-fe-common-lib'
4445
import ReactGA from 'react-ga4'
4546
import { MultiValue } from 'react-select'
@@ -98,6 +99,7 @@ export function useAppGroupAppFilterContext() {
9899

99100
export default function AppGroupDetailsRoute({ isSuperAdmin }: AppGroupAdminType) {
100101
const { path } = useRouteMatch()
102+
const { setIntelligenceConfig } = useMainContext()
101103
const { envId } = useParams<{ envId: string }>()
102104
const [envName, setEnvName] = useState<string>('')
103105
const [showEmpty, setShowEmpty] = useState<boolean>(false)
@@ -160,6 +162,7 @@ export default function AppGroupDetailsRoute({ isSuperAdmin }: AppGroupAdminType
160162
setAppListOptions([])
161163
setAppGroupListData(null)
162164
setDescription('')
165+
setIntelligenceConfig(null)
163166
}
164167
}, [envId])
165168

src/components/ClusterNodes/ClusterEvents.tsx

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

17-
import React, { useState, useEffect } from 'react'
17+
import { useState, useEffect } from 'react'
1818
import { showError } from '@devtron-labs/devtron-fe-common-lib'
1919
import { MESSAGING_UI } from '../../config'
2020
import { EventsTable } from '../v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/EventsTable'
2121
import { PodEventsType } from '../v2/appDetails/k8Resource/nodeDetail/NodeDetailTabs/node.type'
2222
import MessageUI from '../v2/common/message.ui'
2323
import { getClusterEvents } from './clusterNodes.service'
2424
import { ClusterEventsType } from './types'
25+
import { getAIAnalyticsEvents } from 'src/Shared'
2526

26-
export default function ClusterEvents({ terminalAccessId, reconnectStart }: ClusterEventsType) {
27+
export default function ClusterEvents({ terminalAccessId, reconnectStart, clusterId }: ClusterEventsType) {
2728
const [events, setEvents] = useState([])
2829
const [errorValue, setErrorValue] = useState<PodEventsType>()
2930
const [loading, setLoading] = useState<boolean>(true)
@@ -75,6 +76,13 @@ export default function ClusterEvents({ terminalAccessId, reconnectStart }: Clus
7576
return isResourceMissing ? (
7677
<MessageUI msg={MESSAGING_UI.NO_EVENTS} size={24} />
7778
) : (
78-
<EventsTable loading={loading} eventsList={events} errorValue={errorValue} reconnect={reconnectStart} />
79+
<EventsTable
80+
loading={loading}
81+
eventsList={events}
82+
errorValue={errorValue}
83+
reconnect={reconnectStart}
84+
clusterId={clusterId}
85+
aiWidgetAnalyticsEvent={getAIAnalyticsEvents('RB_EVENT')}
86+
/>
7987
)
8088
}

src/components/ClusterNodes/ClusterTerminal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,11 @@ const ClusterTerminal = ({
704704
</div>
705705
{selectedTabIndex === 1 && (
706706
<div className="flex-grow-1 flexbox-col dc__overflow-auto">
707-
<ClusterEvents terminalAccessId={terminalAccessIdRef.current} reconnectStart={reconnectStart} />
707+
<ClusterEvents
708+
terminalAccessId={terminalAccessIdRef.current}
709+
reconnectStart={reconnectStart}
710+
clusterId={clusterId}
711+
/>
708712
</div>
709713
)}
710714
{selectedTabIndex === 2 && (

src/components/ClusterNodes/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export interface ClusterImageList {
216216
imageList: ImageList[]
217217
}
218218

219-
export interface ClusterEventsType {
219+
export interface ClusterEventsType extends Pick<ClusterTerminalType, 'clusterId'> {
220220
terminalAccessId: number
221221
reconnectStart?: () => void
222222
}

0 commit comments

Comments
 (0)