Skip to content

Commit abd1967

Browse files
chore: merge master into develop after 2.0.dev350 version tagging
2 parents 6c1b188 + a46468a commit abd1967

File tree

18 files changed

+30
-27
lines changed

18 files changed

+30
-27
lines changed

Diff for: 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-dev349",
3+
"version": "2.0.0-dev350",
44
"private": true,
55
"description": "Cloudforet Console Web Application",
66
"author": "Cloudforet",

Diff for: apps/web/src/common/modules/navigations/top-bar/modules/top-bar-toolset/TopBarToolset.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const state = reactive({
3838
isDomainAdmin: computed(() => userStore.getters.isDomainAdmin),
3939
isAdminMode: computed(() => appContextStore.getters.isAdminMode),
4040
isGrantLoading: computed(() => appContextStore.getters.globalGrantLoading),
41-
visibleAlertIcon: computed(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleAlertIcon),
41+
visibleAlertIcon: computed(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleAlertIcon),
4242
tooltipTexts: computed<Record<string, string>>(() => ({
4343
adminToggle: (state.isAdminMode ? i18n.t('COMMON.GNB.TOOLTIP.EXIT_ADMIN_MODE') : i18n.t('COMMON.GNB.TOOLTIP.ENABLE_ADMIN_MODE')) as string,
4444
})),

Diff for: apps/web/src/lib/config/global-config/feature-schema-manager.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export class FeatureSchemaManager {
1616
...this.config,
1717
...config,
1818
};
19-
this.createSchema();
19+
this.setFeatureSchema();
2020
}
2121

22-
createSchema() {
22+
setFeatureSchema() {
2323
const globalConfigStore = useGlobalConfigStore();
2424
const schema = {} as FeatureSchemaType;
2525

@@ -32,7 +32,6 @@ export class FeatureSchemaManager {
3232
const currentVersion = this.config[feature]?.VERSION || 'V1';
3333
configurator.initialize(currentVersion);
3434
const menuConfig = configurator.getMenu(this.config);
35-
3635
if (configurator.uiAffect) {
3736
configurator.uiAffect.forEach((uiAffect) => {
3837
const targetFeature = uiAffect.feature;

Diff for: apps/web/src/lib/config/global-config/types/type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface FeatureConfiguratorType {
3939
getRoutes: () => FeatureRouteConfig;
4040
getMenu: (config?: GlobalServiceConfig) => FeatureMenuConfig;
4141
initialize: (version: FeatureVersion) => void;
42-
uiAffect: FeatureUiAffect[];
42+
uiAffect?: FeatureUiAffect[];
4343
}
4444

4545
interface UiAffectConfig {

Diff for: apps/web/src/lib/site-initializer/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { initDomain } from '@/lib/site-initializer/domain';
2727
import { initDomainSettings } from '@/lib/site-initializer/domain-settings';
2828
import { initEcharts } from '@/lib/site-initializer/echarts';
2929
import { initErrorHandler } from '@/lib/site-initializer/error-handler';
30-
import { initTaskManagementTemplate } from '@/lib/site-initializer/initTaskManagementTemplate';
3130
import { mergeConfig } from '@/lib/site-initializer/merge-config';
3231
import { initModeSetting } from '@/lib/site-initializer/mode-setting';
3332
import { checkSsoAccessToken } from '@/lib/site-initializer/sso';
@@ -106,7 +105,6 @@ const init = async () => {
106105
initRequestIdleCallback();
107106
const results = await Promise.allSettled([
108107
checkSsoAccessToken(),
109-
initTaskManagementTemplate(),
110108
]);
111109
const errors: any[] = [];
112110
results.forEach((result) => {

Diff for: apps/web/src/lib/site-initializer/initTaskManagementTemplate.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import { pinia } from '@/store/pinia';
2-
import { useUserStore } from '@/store/user/user-store';
32

43
import {
54
useTaskManagementTemplateStore,
65
} from '@/services/ops-flow/task-management-templates/stores/use-task-management-template-store';
76

8-
export const initTaskManagementTemplate = async () => {
9-
const userStore = useUserStore(pinia);
10-
if (userStore.state.isSessionExpired) return;
117

8+
export const initTaskManagementTemplate = async () => {
129
const taskManagementTemplateStore = useTaskManagementTemplateStore(pinia);
1310
await Promise.allSettled([
1411
taskManagementTemplateStore.setInitialTemplateId(),

Diff for: apps/web/src/lib/site-initializer/merge-config.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { SpaceConnector } from '@cloudforet/core-lib/space-connector';
2+
import { APIError } from '@cloudforet/core-lib/space-connector/error';
23

34
import type { PublicConfigGetParameters } from '@/api-clients/config/public-config/schema/api-verbs/get';
45
import { PUBLIC_CONFIG_NAMES } from '@/api-clients/config/public-config/schema/constant';
56
import type { PublicConfigModel } from '@/api-clients/config/public-config/schema/model';
67

78
import type { GlobalServiceConfig } from '@/lib/config/global-config/types/type';
89

10+
import ErrorHandler from '@/common/composables/error/errorHandler';
11+
912
export const mergeConfig = async (config, domainId: string): Promise<GlobalServiceConfig> => {
1013
const baseConfig = config.get('SERVICES') || {};
1114

@@ -16,8 +19,12 @@ export const mergeConfig = async (config, domainId: string): Promise<GlobalServi
1619
domain_id: domainId,
1720
});
1821
overrideConfig = overrideConfigData.SERVICES || {};
19-
} catch {
20-
console.warn('404 Not Found: Data not found. Setting default values.');
22+
} catch (e: any) {
23+
if (e instanceof APIError && e.status === 404) {
24+
console.warn('404 Not Found: Service Setting Data not found. Setting default values.');
25+
} else {
26+
ErrorHandler.handleError(e);
27+
}
2128
}
2229

2330
Object.keys(overrideConfig).forEach((serviceName) => {

Diff for: apps/web/src/services/alert-manager/v2/components/ServiceDetailTabsSettingsEventRuleCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const state = reactive({
9898
result[type].push({
9999
label: i18n.t('ALERT_MANAGER.EVENT_RULE.ASSET_TYPE'),
100100
name: 'asset_types',
101-
value: matchAssetValue.asset_types.map((i) => storeState.cloudServiceType[i].label).join(', '),
101+
value: matchAssetValue.asset_types.map((i) => (storeState.cloudServiceType[i] ? storeState.cloudServiceType[i].label : i)).join(', '),
102102
});
103103
}
104104
if (matchAssetValue.key) {

Diff for: apps/web/src/services/asset-inventory/components/CloudServiceDetailTabs.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const { visibleContents } = useContentsAccessibility(MENU_ID.OPS_FLOW);
6969
7070
/* Tabs */
7171
const state = reactive({
72-
visibleAlertTab: computed(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleAssetAlertTab),
72+
visibleAlertTab: computed(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleAssetAlertTab),
7373
});
7474
const singleItemTabState = reactive({
7575
tabs: computed(() => {

Diff for: apps/web/src/services/auth/authenticator/index.ts

-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import { useErrorStore } from '@/store/error/error-store';
1010
import { pinia } from '@/store/pinia';
1111
import { useUserStore } from '@/store/user/user-store';
1212

13-
import { initTaskManagementTemplate } from '@/lib/site-initializer/initTaskManagementTemplate';
14-
1513

1614
abstract class Authenticator {
1715
static async signIn(credentials: Record<string, any>, authType: AuthType | 'SAML', verifyCode?: string): Promise<void> {
@@ -29,7 +27,6 @@ abstract class Authenticator {
2927
await userWorkspaceStore.load();
3028
displayStore.setIsSignInFailed(false);
3129
errorStore.reset();
32-
await initTaskManagementTemplate();
3330
}
3431

3532
static async signOut(): Promise<void> {

Diff for: apps/web/src/services/cost-explorer/pages/BudgetDetailPage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const budgetPageState = budgetPageStore.$state;
3636
const state = reactive({
3737
loading: true,
3838
budgetData: computed<BudgetModel|null>(() => budgetPageState.budgetData),
39-
visibleBudgetNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleBudgetNotification ?? false),
39+
visibleBudgetNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleBudgetNotification ?? false),
4040
isWorkspaceTarget: computed<boolean>(() => (state.budgetData?.resource_group === 'WORKSPACE')),
4141
adminModeLink: computed<Location>(() => ({
4242
name: ADMIN_COST_EXPLORER_ROUTE.BUDGET.DETAIL._NAME,

Diff for: apps/web/src/services/my-page/components/NotificationAddForm.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const router = useRouter();
4141
const globalConfigStore = useGlobalConfigStore();
4242
4343
const state = reactive({
44-
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleUserNotification ?? false),
44+
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleUserNotification ?? false),
4545
isDataValid: false,
4646
notificationLevel: 'LV1' as NotificationLevel,
4747
//

Diff for: apps/web/src/services/my-page/components/NotificationChannelList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const props = withDefaults(defineProps<{
6262
});
6363
const route = useRoute();
6464
const state = reactive({
65-
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleUserNotification ?? false),
65+
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleUserNotification ?? false),
6666
loading: true,
6767
channelLoading: true,
6868
userId: computed<string|undefined>(() => (route.params.userId ? decodeURIComponent(route.params.userId) : userStore.state.userId)),

Diff for: apps/web/src/services/my-page/composables/notification-item.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const globalConfigStore = useGlobalConfigStore();
3434

3535
export const useNotificationItem = <Data>(_state: NotificationItemState<Data>, emit: Emit<Data>) => {
3636
const state = reactive({
37-
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER.uiAffects?.visibleUserNotification ?? false),
37+
visibleUserNotification: computed<boolean>(() => globalConfigStore.state.schema.ALERT_MANAGER?.uiAffects?.visibleUserNotification ?? false),
3838
isEditMode: _state.isEditMode,
3939
dataForEdit: _state.dataForEdit,
4040
userChannelId: _state.userChannelId,

Diff for: apps/web/src/services/ops-flow/configurator.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type {
33
} from '@/lib/config/global-config/types/type';
44
import type { Menu } from '@/lib/menu/config';
55
import { MENU_ID } from '@/lib/menu/config';
6+
import { initTaskManagementTemplate } from '@/lib/site-initializer/initTaskManagementTemplate';
67

78
import adminOpsFlowRoutes from '@/services/ops-flow/routes/admin/routes';
89
import opsFlowRoutes from '@/services/ops-flow/routes/routes';
@@ -25,6 +26,8 @@ class OpsFlowConfigurator implements FeatureConfiguratorType {
2526
}
2627

2728
getMenu(): FeatureMenuConfig {
29+
initTaskManagementTemplate();
30+
2831
const baseMenu: Menu = {
2932
id: MENU_ID.OPS_FLOW,
3033
needPermissionByRole: true,

Diff for: apps/web/src/services/ops-flow/task-management-templates/stores/use-task-management-template-store.ts

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export const useTaskManagementTemplateStore = defineStore('task-management-templ
8484
} catch (e) {
8585
if (e instanceof APIError && e.status === 404) {
8686
state.templateId = 'default';
87+
console.warn('404 Not Found: Template Id Data not found.');
8788
return;
8889
}
8990
ErrorHandler.handleError(e);
@@ -111,6 +112,7 @@ export const useTaskManagementTemplateStore = defineStore('task-management-templ
111112
} catch (e) {
112113
if (e instanceof APIError && e.status === 404) {
113114
state.enableLanding = false;
115+
console.warn('404 Not Found: Template Landing Data not found.');
114116
return;
115117
}
116118
ErrorHandler.handleError(e);

Diff for: package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudforet-console",
3-
"version": "2.0.0-dev349",
3+
"version": "2.0.0-dev350",
44
"private": true,
55
"workspaces": [
66
"apps/*",

0 commit comments

Comments
 (0)