Skip to content

Commit 102341e

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature-itsm
Signed-off-by: Wanjin Noh <[email protected]>
2 parents 8099032 + 1c43e41 commit 102341e

File tree

51 files changed

+1425
-855
lines changed

Some content is hidden

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

51 files changed

+1425
-855
lines changed

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,16 @@ The final configuration file will be generated by merging the default configurat
7070

7171
### 3. Add your chart license keys to your config file (Optional)
7272

73-
The Web Console internally uses amCharts(both 4 and 5 versions) for charts. <br/>
73+
The Web Console internally uses amCharts 5 for charts. <br/>
7474
Before using the Console, look carefully at [amCharts' license](https://www.amcharts.com/online-store/licenses-explained/). <br/>
75-
You can download and use all amCharts 4 and 5 products for free. <br/>
75+
You can download and use all amCharts 5 products for free. <br/>
7676
The only limitation of the free version is that a small amCharts logo will be displayed in the corner of your charts. <br/>
7777
If you’d rather have your charts without any branding, please purchase a [commercial license](https://www.amcharts.com/online-store/) and configure it to your config file with the following format: <br/>
7878

7979
```json
8080
{
8181
"AMCHARTS_LICENSE": {
8282
"ENABLED": true,
83-
"CHARTS": "",
84-
"MAPS": "",
85-
"TIMELINE": "",
8683
"AM5_CHARTS": "",
8784
"AM5_MAPS": ""
8885
}

apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web",
3-
"version": "2.0.0-dev238",
3+
"version": "2.0.0-dev240",
44
"private": true,
55
"description": "Cloudforet Console Web Application",
66
"author": "Cloudforet",

apps/web/public/config/default.json

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"ADMIN_DOMAIN": "root",
77
"AMCHARTS_LICENSE": {
88
"ENABLED": false,
9-
"CHARTS": "",
10-
"MAPS": "",
11-
"TIMELINE": "",
129
"AM5_CHARTS": "",
1310
"AM5_MAPS": ""
1411
},

apps/web/src/App.vue

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ watch(() => state.userId, (userId) => {
185185
:modal-type="MODAL_TYPE.SEND"
186186
/>
187187
<notice-popup v-if="!state.globalGrantLoading" />
188-
<!-- <survey-modal />-->
189188
</template>
190189
<!-- Modal for Cross Browsing -->
191190
<recommended-browser-modal v-if="showsBrowserRecommendation()" />

apps/web/src/common/modules/navigations/gnb/GNBToolbox.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const state = reactive({
6060
routes.push({
6161
name: i18n.t('MENU.CONSOLE_HOME'),
6262
to: {
63-
name: LANDING_ROUTE._NAME,
63+
name: LANDING_ROUTE.DOMAIN._NAME,
6464
},
6565
});
6666
} else if (!storeState.isAdminMode && storeState.currentWorkspaceId) {

apps/web/src/common/modules/navigations/top-bar/modules/top-bar-header/TopBarWorkspaces.vue

+6-57
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import Vue, {
2+
import {
33
computed, onMounted, reactive, ref, watch,
44
} from 'vue';
55
import type { Location } from 'vue-router';
@@ -8,20 +8,18 @@ import { useRouter } from 'vue-router/composables';
88
import { clone, sortBy } from 'lodash';
99
1010
import {
11-
PSelectDropdown, PTooltip, PI, PButton, PDivider, PTextHighlighting, PEmpty,
11+
PSelectDropdown, PTooltip, PI, PButton, PTextHighlighting, PEmpty,
1212
} from '@cloudforet/mirinae';
1313
import type { MenuItem } from '@cloudforet/mirinae/src/controls/context-menu/type';
1414
import { CONTEXT_MENU_TYPE } from '@cloudforet/mirinae/src/controls/context-menu/type';
1515
1616
import type { WorkspaceModel } from '@/schema/identity/workspace/model';
17-
import { store } from '@/store';
1817
import { i18n } from '@/translations';
1918
20-
import { makeAdminRouteName } from '@/router/helpers/route-helper';
21-
2219
import { useAppContextStore } from '@/store/app-context/app-context-store';
2320
import { useUserWorkspaceStore } from '@/store/app-context/workspace/user-workspace-store';
2421
22+
import type { ReferenceData } from '@/lib/helper/config-data-helper';
2523
import { convertWorkspaceConfigToReferenceData } from '@/lib/helper/config-data-helper';
2624
import type { MenuId } from '@/lib/menu/config';
2725
import { MENU_ID } from '@/lib/menu/config';
@@ -37,7 +35,6 @@ import { RECENT_TYPE } from '@/common/modules/navigations/type';
3735
3836
import { gray, violet } from '@/styles/colors';
3937
40-
import { ADVANCED_ROUTE } from '@/services/advanced/routes/route-constant';
4138
import { LANDING_ROUTE } from '@/services/landing/routes/route-constant';
4239
4340
const PAGE_SIZE = 9;
@@ -62,18 +59,16 @@ const router = useRouter();
6259
const selectDropdownRef = ref<PSelectDropdown|null>(null);
6360
6461
const storeState = reactive({
65-
isDomainAdmin: computed(() => store.getters['user/isDomainAdmin']),
6662
workspaceList: computed<WorkspaceModel[]>(() => workspaceStoreGetters.workspaceList),
6763
selectedWorkspace: computed<WorkspaceModel|undefined>(() => workspaceStoreGetters.currentWorkspace),
6864
currentWorkspaceId: computed<string|undefined>(() => userWorkspaceStore.getters.currentWorkspaceId),
69-
favoriteItems: computed<FavoriteItem[]>(() => {
65+
favoriteItems: computed<ReferenceData[]>(() => {
7066
const sortedList = sortBy(favoriteGetters.workspaceItems, 'label');
7167
return convertWorkspaceConfigToReferenceData(
7268
sortedList ?? [],
7369
storeState.workspaceList,
7470
);
7571
}),
76-
isRootRoleReadonly: computed<boolean>(() => store.getters['user/isRootRoleReadonly']),
7772
});
7873
const state = reactive({
7974
visibleSelectDropdown: false,
@@ -91,24 +86,6 @@ const selectWorkspace = (name: string): void => {
9186
userWorkspaceStore.setCurrentWorkspace(workspaceId);
9287
router.push({ name: MENU_INFO_MAP[targetMenuId].routeName, params: { workspaceId } }).catch(() => {});
9388
};
94-
const handleClickButton = (hasNoWorkspace?: string) => {
95-
const selectedWorkspaceId = !hasNoWorkspace && storeState.selectedWorkspace?.workspace_id || '';
96-
appContextStore.enterAdminMode();
97-
router.push({
98-
name: makeAdminRouteName(ADVANCED_ROUTE.WORKSPACES._NAME),
99-
query: {
100-
hasNoWorkspace,
101-
selectedWorkspaceId: !hasNoWorkspace ? selectedWorkspaceId : undefined,
102-
},
103-
});
104-
Vue.notify({
105-
group: 'toastTopCenter',
106-
type: 'info',
107-
title: i18n.t('COMMON.GNB.ADMIN.SWITCH_ADMIN') as string,
108-
duration: 2000,
109-
speed: 1,
110-
});
111-
};
11289
const formatMenuItems = (menuItems: WorkspaceModel[] = []): MenuItem[] => {
11390
const result = menuItems.length > 0 ? [
11491
{ type: CONTEXT_MENU_TYPE.header, name: 'workspace_header', label: `${i18n.t('COMMON.GNB.WORKSPACE.WORKSPACES')} (${storeState.workspaceList.length})` },
@@ -143,7 +120,7 @@ const filterStarredItems = (menuItems: FavoriteItem[] = []): MenuItem[] => {
143120
};
144121
const handleClickAllWorkspaceButton = () => {
145122
router.push({
146-
name: LANDING_ROUTE._NAME,
123+
name: LANDING_ROUTE.WORKSPACE._NAME,
147124
});
148125
};
149126
const checkFavoriteItem = (id: string) => {
@@ -197,7 +174,7 @@ onMounted(() => {
197174
</div>
198175
<p-select-dropdown v-if="!props.isAdminMode"
199176
ref="selectDropdownRef"
200-
:class="{'workspace-dropdown': true, 'is-domain-admin': storeState.isDomainAdmin}"
177+
:class="{'workspace-dropdown': true}"
201178
style-type="transparent"
202179
menu-width="20rem"
203180
:visible-menu.sync="state.visibleSelectDropdown"
@@ -280,28 +257,6 @@ onMounted(() => {
280257
>
281258
{{ $t("COMMON.GNB.WORKSPACE.VIEW_WORKSPACES") }}
282259
</p-button>
283-
<div v-if="storeState.isDomainAdmin && !storeState.isRootRoleReadonly"
284-
class="workspace-toolbox"
285-
>
286-
<p-divider />
287-
<p-button style-type="substitutive"
288-
size="sm"
289-
class="create-new-button tool"
290-
icon-left="ic_plus_bold"
291-
@click="handleClickButton('true')"
292-
>
293-
{{ $t("COMMON.GNB.WORKSPACE.CREATE_WORKSPACE") }}
294-
</p-button>
295-
<p-divider class="tools-divider" />
296-
<p-button style-type="tertiary"
297-
size="sm"
298-
class="manage-button tool"
299-
icon-left="ic_settings"
300-
@click="handleClickButton()"
301-
>
302-
{{ $t("COMMON.GNB.WORKSPACE.MANAGE_WORKSPACE") }}
303-
</p-button>
304-
</div>
305260
</div>
306261
</template>
307262
<template #no-data-area>
@@ -478,12 +433,6 @@ onMounted(() => {
478433
}
479434
}
480435
481-
&.is-domain-admin {
482-
.workspace-toolbox-wrapper {
483-
padding-bottom: 1rem;
484-
}
485-
}
486-
487436
.selected-workspace {
488437
@apply text-label-lg text-gray-800 inline-block font-medium;
489438
max-width: 16rem;

apps/web/src/common/modules/navigations/top-bar/modules/top-bar-toolset/modules/top-bar-admin-toggle-button/TopBarAdminToggleButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const handleToggleAdminMode = throttle(async () => {
3737
if (state.isAdminMode) {
3838
await userWorkspaceStore.load();
3939
if (state.workspaceList.length === 0) {
40-
await router.push({ name: LANDING_ROUTE._NAME });
40+
await router.push({ name: LANDING_ROUTE.DOMAIN._NAME });
4141
return;
4242
}
4343
appContextStore.exitAdminMode();

apps/web/src/common/modules/navigations/top-bar/modules/top-bar-toolset/modules/top-bar-profile/TopBarProfile.vue

+1-6
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,7 @@ const handleClickGoToMyPage = () => {
159159
};
160160
const handleClickGoToConsoleHome = () => {
161161
appContextStore.setGlobalGrantLoading(true);
162-
router.push({
163-
name: LANDING_ROUTE.DOMAIN._NAME,
164-
params: {
165-
force: 'true',
166-
},
167-
}).catch(() => {});
162+
router.push({ name: LANDING_ROUTE.DOMAIN._NAME }).catch(() => {});
168163
hideProfileMenu();
169164
};
170165

0 commit comments

Comments
 (0)