-
Notifications
You must be signed in to change notification settings - Fork 40
chore: fixed minor issue #5957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fixed minor issue #5957
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,6 @@ import { | |
| PFieldGroup, | ||
| PFieldTitle, | ||
| PI, | ||
| PRadio, | ||
| PRadioGroup, | ||
| PBadge, | ||
| PSelectDropdown, PTextInput, | ||
| PToggleButton, screens, | ||
|
|
@@ -151,12 +149,12 @@ const handleUpdateToggle = (action: string, value: boolean) => { | |
|
|
||
| watch([ | ||
| () => state.selectedActions, () => state.key, () => state.selectedAssetList, () => state.selectedTempAssetRadio, () => state.period, | ||
| ], ([selectedActions, key, assetList, tempAsset, period]) => { | ||
| ], ([selectedActions, key, assetList, period]) => { | ||
| emit('change-form', { | ||
| match_asset: selectedActions.match_asset ? { | ||
| key, | ||
| asset_types: assetList?.map((asset) => asset.name), | ||
| create_temporary_asset: tempAsset === 'CREATE', | ||
| // create_temporary_asset: tempAsset === 'CREATE', | ||
| } : undefined, | ||
| merge_asset_labels: selectedActions.merge_asset_labels ? { | ||
| period, | ||
|
|
@@ -283,7 +281,8 @@ watch(() => storeState.isEventRuleEditMode, (isEditMode) => { | |
| /> | ||
| </p-field-group> | ||
| </div> | ||
| <div class="field-group flex items-center"> | ||
| <!-- TODO: used when adding temporary asset functionality --> | ||
|
||
| <!-- <div class="field-group flex items-center"> | ||
| <p-field-title font-weight="regular" | ||
| class="field-title toggle-wrapper" | ||
| > | ||
|
|
@@ -311,7 +310,7 @@ watch(() => storeState.isEventRuleEditMode, (isEditMode) => { | |
| <span>{{ $t('ALERT_MANAGER.EVENT_RULE.TEMP_ASSET_DESC') }}</span> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </div> --> | ||
| </div> | ||
| <div v-if="action.name === 'merge_asset_labels'" | ||
| class="field-group flex items-center pt-3 pr-3 pl-3 merge-asset-wrapper" | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -108,11 +108,11 @@ const state = reactive({ | |||||||||||
| value: matchAssetValue.key, | ||||||||||||
| }); | ||||||||||||
| } | ||||||||||||
| result[type].push({ | ||||||||||||
| label: i18n.t('ALERT_MANAGER.EVENT_RULE.TEMP_ASSET'), | ||||||||||||
| name: 'create_temporary_asset', | ||||||||||||
| value: matchAssetValue.create_temporary_asset ? i18n.t('ALERT_MANAGER.CREATE') : i18n.t('ALERT_MANAGER.EVENT_RULE.DO_NOT_CREATE'), | ||||||||||||
| }); | ||||||||||||
| // result[type].push({ | ||||||||||||
| // label: i18n.t('ALERT_MANAGER.EVENT_RULE.TEMP_ASSET'), | ||||||||||||
| // name: 'create_temporary_asset', | ||||||||||||
| // value: matchAssetValue.create_temporary_asset ? i18n.t('ALERT_MANAGER.CREATE') : i18n.t('ALERT_MANAGER.EVENT_RULE.DO_NOT_CREATE'), | ||||||||||||
| // }); | ||||||||||||
|
Comment on lines
+111
to
+115
|
||||||||||||
| // result[type].push({ | |
| // label: i18n.t('ALERT_MANAGER.EVENT_RULE.TEMP_ASSET'), | |
| // name: 'create_temporary_asset', | |
| // value: matchAssetValue.create_temporary_asset ? i18n.t('ALERT_MANAGER.CREATE') : i18n.t('ALERT_MANAGER.EVENT_RULE.DO_NOT_CREATE'), | |
| // }); |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -103,10 +103,10 @@ const state = reactive({ | |||||||||||
| } | ||||||||||||
|
|
||||||||||||
| if (state.actions) { | ||||||||||||
| if (state.actions.match_asset?.create_temporary_asset) { | ||||||||||||
| const matchAssetValid = state.actions.match_asset.asset_types.length > 0 && state.actions.match_asset.key !== ''; | ||||||||||||
| if (!matchAssetValid) return false; | ||||||||||||
| } | ||||||||||||
| // if (state.actions.match_asset?.create_temporary_asset) { | ||||||||||||
| // const matchAssetValid = state.actions.match_asset.asset_types.length > 0 && state.actions.match_asset.key !== ''; | ||||||||||||
| // if (!matchAssetValid) return false; | ||||||||||||
| // } | ||||||||||||
|
Comment on lines
+106
to
+109
|
||||||||||||
| // if (state.actions.match_asset?.create_temporary_asset) { | |
| // const matchAssetValid = state.actions.match_asset.asset_types.length > 0 && state.actions.match_asset.key !== ''; | |
| // if (!matchAssetValid) return false; | |
| // } | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] If the temporary asset functionality is no longer used, consider removing the commented-out assignment to reduce clutter.