Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,20 @@ watch(() => [
state.isContinueAble = isInitialValid && isGrowthValid;
return;
} else if (budgetCreatePageState.selectedMonthlyBudgetAllocation === 'enterManually') {
const startDate = dayjs.utc(budgetCreatePageState.startMonth[0]);
const endDate = dayjs.utc(budgetCreatePageState.endMonth[0]);
const length = endDate.diff(startDate, 'month') + 1;
const valid = budgetCreatePageState.budgetEachDate.length === length
&& budgetCreatePageState.budgetEachDate.every((v, idx) => isDateInRange(idx) && isValidPositiveNumber(v));
if (valid) {
const allValuesFilled = budgetCreatePageState.budgetEachDate.length === 12 && budgetCreatePageState.budgetEachDate
.every((v, idx) => {
if (isDateInRange(idx)) {
return isValidPositiveNumber(v);
}
return true; // skip validation for disabled months
});

if (allValuesFilled) {
state.isContinueAble = true;
return;
}
state.isContinueAble = false;
return;
}
state.isContinueAble = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ watch(() => state.selectedBudgetManager, (nv, ov) => {
show-user-list
selection-type="multiple"
:selected-ids="data"
:excluded-selected-ids="[budgetPageState.budgetData?.budget_manager_id ?? '']"
@update:selected-ids="handleSelectAlertRecipients"
/>
<p-button v-if="!state.alertRecipientsEdit && !storeState.isAdminMode && hasReadWriteAccess"
Expand Down
10 changes: 10 additions & 0 deletions apps/web/src/services/cost-explorer/routes/admin/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,22 @@ const adminCostExplorerRoutes: RouteConfig = {
} else if (to.params.dataSourceId && to.params.costQuerySetId) {
next();
} else {
const normalizedQuery = { ...to.query };
if (normalizedQuery.project) {
normalizedQuery.project_id = normalizedQuery.project;
delete normalizedQuery.project;
}
if (normalizedQuery.service_account) {
normalizedQuery.service_account_id = normalizedQuery.service_account;
delete normalizedQuery.service_account;
}
next({
name: ADMIN_COST_EXPLORER_ROUTE.COST_ANALYSIS.QUERY_SET._NAME,
params: {
dataSourceId: UNIFIED_COST_KEY,
costQuerySetId: MANAGED_COST_QUERY_SET_IDS.MONTHLY_PRODUCT,
},
query: normalizedQuery,
});
}
} catch (e) {
Expand Down
Loading