Skip to content

Commit

Permalink
Feature/bugbug (#2303)
Browse files Browse the repository at this point in the history
* chore: update minor things

Signed-off-by: yuda <[email protected]>

* fix: fix minor bug

Signed-off-by: yuda <[email protected]>

---------

Signed-off-by: yuda <[email protected]>
  • Loading branch information
yuda110 authored Nov 23, 2023
1 parent 51b432d commit b5e9132
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
>
<project-select-dropdown :selected-project-ids="dataForUpdate ? [dataForUpdate] : []"
project-selectable
class="dropdown"
@select="onSelectProject"
/>
<div class="button-group ml-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { showSuccessMessage } from '@/lib/helper/notice-alert-helper';
import ErrorHandler from '@/common/composables/error/errorHandler';
import EventRuleActionForm from '@/services/project/components/ProjectAlertEventRuleActionForm.vue';
import EventRuleConditionForm from '@/services/project/components/ProjectAlertEventRuleConditionForm.vue';
import ProjectAlertEventRuleActionForm from '@/services/project/components/ProjectAlertEventRuleActionForm.vue';
import ProjectAlertEventRuleConditionForm from '@/services/project/components/ProjectAlertEventRuleConditionForm.vue';
const CONDITIONS_POLICY = Object.freeze({
Expand Down Expand Up @@ -163,12 +163,12 @@ watch(() => state.conditions, (conditions) => {
<template>
<div class="event-rule-form">
<event-rule-condition-form
<project-alert-event-rule-condition-form
class="event-rule-condition-form"
:conditions-policy.sync="state.conditionsPolicy"
:conditions.sync="state.conditions"
/>
<event-rule-action-form
<project-alert-event-rule-action-form
class="event-rule-action-form"
:actions.sync="state.actions"
:options.sync="state.options"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ watch([() => props.selectedOption, () => props.visible], ([selectedOption]) => {
<div class="select-card-wrapper">
<p-select-card v-for="(option, index) in state.selectOptions"
:key="option.name"
v-model="recoveryMode"
v-model="state.recoveryMode"
:tab-index="index"
:value="option.name"
:label="option.label"
Expand Down
33 changes: 18 additions & 15 deletions apps/web/src/services/project/pages/ProjectAlertEventRulePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import DeleteModal from '@/common/components/modals/DeleteModal.vue';
import ErrorHandler from '@/common/composables/error/errorHandler';
import GeneralPageLayout from '@/common/modules/page-layouts/GeneralPageLayout.vue';
import EventRuleContent from '@/services/project/components/ProjectAlertEventRuleContent.vue';
import EventRuleForm from '@/services/project/components/ProjectAlertEventRuleForm.vue';
import ProjectAlertEventRuleContent from '@/services/project/components/ProjectAlertEventRuleContent.vue';
import ProjectAlertEventRuleForm from '@/services/project/components/ProjectAlertEventRuleForm.vue';
const EDIT_MODE = Object.freeze({
CREATE: 'CREATE',
Expand Down Expand Up @@ -174,7 +174,7 @@ const onClickFormCancel = () => {
</script>

<template>
<general-page-layout class="add-service-account-container">
<general-page-layout>
<p-breadcrumbs class="flex-grow"
:routes="routeState.routes"
/>
Expand Down Expand Up @@ -257,26 +257,29 @@ const onClickFormCancel = () => {
</div>
</template>
</template>
<event-rule-form v-if="state.isEditMode && (state.selectedOrder === data.order)"
:project-id="props.projectId"
:event-rule-id="data.event_rule_id"
:mode="EDIT_MODE.UPDATE"
@confirm="onClickFormConfirm"
@cancel="onClickFormCancel"
<project-alert-event-rule-form
v-if="state.isEditMode && (state.selectedOrder === data.order)"
:project-id="props.projectId"
:event-rule-id="data.event_rule_id"
:mode="EDIT_MODE.UPDATE"
@confirm="onClickFormConfirm"
@cancel="onClickFormCancel"
/>
<event-rule-content v-else
:data="data"
<project-alert-event-rule-content
v-else
:data="data"
/>
</p-card>
</div>
<p-card v-if="state.isEditMode && (state.mode === EDIT_MODE.CREATE)"
style-type="indigo400"
:header="$t('PROJECT.EVENT_RULE.ADD_EVENT_RULE')"
>
<event-rule-form :project-id="props.projectId"
:mode="EDIT_MODE.CREATE"
@confirm="onClickFormConfirm"
@cancel="onClickFormCancel"
<project-alert-event-rule-form
:project-id="props.projectId"
:mode="EDIT_MODE.CREATE"
@confirm="onClickFormConfirm"
@cancel="onClickFormCancel"
/>
</p-card>
<p-button v-if="state.cardData.length"
Expand Down

1 comment on commit b5e9132

@vercel
Copy link

@vercel vercel bot commented on b5e9132 Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

console – ./

console-git-master-cloudforet.vercel.app
console-cloudforet.vercel.app

Please sign in to comment.