Skip to content

Commit 96b86a3

Browse files
authored
Merge pull request #2077 from devtron-labs/chore/rename-virtual-resources
chore: rename virtual resources
2 parents 699721b + 9e7e0bd commit 96b86a3

File tree

13 files changed

+98
-13
lines changed

13 files changed

+98
-13
lines changed

.github/semantic.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
titleOnly: true
2+
3+
types:
4+
- fix
5+
- feat
6+
- feature
7+
- fixes
8+
- chore
9+
- perf
10+
- docs
11+
- doc
12+
- release
13+
- misc
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Increment tag for patch or minor
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed # Trigger only when a PR is closed (merged or not)
9+
10+
jobs:
11+
tag:
12+
if: github.event.pull_request.merged == true
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create new tag
21+
env:
22+
TOKEN: ${{ secrets.TAG_CREATION_TOKEN_PUBLIC }}
23+
run: |
24+
echo $TOKEN | gh auth login --with-token
25+
latest_tag=$(git tag | sort -V | tail -n 1)
26+
echo "Latest tag: $latest_tag"
27+
28+
# Extract major and minor versions
29+
version=$(echo $latest_tag | cut -d. -f1-2)
30+
# Extract patch version
31+
patch=$(echo $latest_tag | cut -d. -f3)
32+
# Extract minor version
33+
minor=$(echo $latest_tag | cut -d. -f2)
34+
major=$(echo $latest_tag | cut -d. -f1)
35+
36+
# Check if the incoming branch starts with 'release-candidate-'
37+
incoming_branch="${{ github.head_ref }}"
38+
if [[ "$incoming_branch" == release-candidate-* ]]; then
39+
# Increment minor version and reset patch
40+
new_minor=$((minor+1))
41+
new_tag="$major.$new_minor.0"
42+
echo "New tag will be (minor increment): $new_tag"
43+
else
44+
# Increment patch version
45+
new_tag="$version.$((patch+1))"
46+
echo "New tag will be (patch increment): $new_tag"
47+
fi
48+
49+
git config --global user.email "[email protected]"
50+
git config --global user.name "systemsdt"
51+
git tag $new_tag
52+
git push origin $new_tag

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

src/components/ResourceBrowser/ResourceBrowser.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ const ResourceBrowser: React.FC = () => {
6464
detailClusterList?.result || clusterListMinData?.result || [],
6565
'name',
6666
) as ClusterDetail[]
67-
).filter((option) => !window._env_.HIDE_DEFAULT_CLUSTER || option.id !== DEFAULT_CLUSTER_ID),
67+
).filter(
68+
(option) =>
69+
!(window._env_.HIDE_DEFAULT_CLUSTER && option.id === DEFAULT_CLUSTER_ID) &&
70+
!option.isVirtualCluster,
71+
),
6872
[detailClusterList, clusterListMinData],
6973
)
7074

src/components/app/details/appDetails/AppDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ export const EnvSelector = ({
886886

887887
const groupList =
888888
sortedEnvironments?.reduce((acc, env) => {
889-
const key = env.isVirtualEnvironment ? 'Virtual environments' : ''
889+
const key = env.isVirtualEnvironment ? 'Isolated environments' : ''
890890
const found = acc.find((item) => item.label === key)
891891

892892
if (found) {
@@ -912,7 +912,7 @@ export const EnvSelector = ({
912912
}, []) || []
913913

914914
// Pushing the virtual environment group to the end of the list
915-
if (groupList[0]?.label === 'Virtual environments' && groupList.length === 2) {
915+
if (groupList[0]?.label === 'Isolated environments' && groupList.length === 2) {
916916
groupList.reverse()
917917
}
918918

src/components/app/details/triggerView/cdMaterial.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ const CDMaterial = ({
19661966
<>
19671967
{getDeployButtonIcon()}
19681968
{buttonLabel}
1969-
{isVirtualEnvironment && ' to virtual env'}
1969+
{isVirtualEnvironment && ' to isolated env'}
19701970
{deploymentWindowMetadata.userActionState === ACTION_STATE.BLOCKED && (
19711971
<InfoOutline className="icon-dim-16 ml-5" />
19721972
)}

src/components/app/list-new/AppListFilters.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ import {
88
Tooltip,
99
useSuperAdmin,
1010
} from '@devtron-labs/devtron-fe-common-lib'
11+
import ReactGA from 'react-ga4'
1112
import { FILE_NAMES } from '@Components/common/ExportToCsv/constants'
1213
import ExportToCsv from '@Components/common/ExportToCsv/ExportToCsv'
1314
import { APP_STATUS_FILTER_OPTIONS, SELECT_CLUSTER_TIPPY, TEMPLATE_TYPE_FILTER_OPTIONS } from './Constants'
1415
import { AppListFiltersProps, AppListUrlFilters, AppStatuses } from './AppListType'
1516
import { getDevtronAppListDataToExport } from './AppListService'
16-
import { useFilterOptions } from './list.utils'
17+
import { getAppTabNameFromAppType, useFilterOptions } from './list.utils'
1718

1819
const AppListFilters = ({
1920
filterConfig,
@@ -88,6 +89,7 @@ const AppListFilters = ({
8889
isSuperAdmin && appType === AppListConstants.AppType.DEVTRON_APPS && serverMode !== SERVER_MODE.EA_ONLY
8990

9091
const handleUpdateFilters = (filterKey: AppListUrlFilters) => (selectedOptions: SelectPickerOptionType[]) => {
92+
ReactGA.event({ category: getAppTabNameFromAppType(appType), action: filterKey })
9193
updateSearchParams({ [filterKey]: selectedOptions.map((option) => String(option.value)) })
9294
}
9395

src/components/app/list-new/GenericAppList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ const GenericAppList = ({
155155
}, [])
156156

157157
const handleArgoAppListing = () => {
158+
if (!clusterIdsCsv) return
158159
setDataStateType(AppListViewType.LOADING)
159160
getArgoInstalledExternalApps(clusterIdsCsv)
160161
.then((appsListResponse) => {

src/components/app/list-new/list.utils.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ export const getChangeAppTabURL = (appTabType) => {
4343
}
4444
}
4545

46+
export const getAppTabNameFromAppType = (appType: string) => {
47+
switch (appType) {
48+
case AppListConstants.AppType.HELM_APPS:
49+
return AppListConstants.AppTabs.HELM_APPS
50+
case AppListConstants.AppType.ARGO_APPS:
51+
return AppListConstants.AppTabs.ARGO_APPS
52+
case AppListConstants.AppType.FLUX_APPS:
53+
return AppListConstants.AppTabs.FLUX_APPS
54+
default:
55+
return AppListConstants.AppTabs.DEVTRON_APPS
56+
}
57+
}
58+
4659
export const renderIcon = (appType: string): string => {
4760
if (appType === AppListConstants.AppType.FLUX_APPS) {
4861
return FluxCDAppIcon

src/components/cluster/Cluster.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ const Cluster = ({
644644
toggleEditMode((t) => !t)
645645
}
646646

647-
const subTitle: string = isVirtualCluster ? 'Virtual cluster' : server_url
647+
const subTitle: string = isVirtualCluster ? 'Isolated cluster' : server_url
648648

649649
return (
650650
<>

0 commit comments

Comments
 (0)