forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional-guest-memory-overhead-ratio setting
Signed-off-by: andy.lee <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
pkg/harvester/components/settings/additional-guest-memory-overhead-ratio.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script> | ||
import CreateEditView from '@shell/mixins/create-edit-view'; | ||
import { LabeledInput } from '@components/Form/LabeledInput'; | ||
export default { | ||
name: 'AdditionalGuestMemoryOverheadRatio', | ||
components: { LabeledInput }, | ||
mixins: [CreateEditView], | ||
data() { | ||
return { ratio: this.value.value || this.value.default }; | ||
}, | ||
methods: { | ||
update() { | ||
this.$set(this.value, 'value', this.ratio); | ||
}, | ||
useDefault() { | ||
this.$set(this, 'ratio', this.value.default); | ||
this.update(); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div class="row"> | ||
<div class="col span-12"> | ||
<LabeledInput | ||
v-model="ratio" | ||
:label="t('harvester.setting.ratio')" | ||
@input="update" | ||
/> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters