mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-02 22:51:34 -06:00
add Shared memory to settings, fixes #82.
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
<tr><th style="width:50%;"> CPUs </th><td :title="settings.resources.nano_cpus"><span v-if="settings.resources.nano_cpus">{{ settings.resources.nano_cpus | nanocpus }}</span><i v-else>--undefined--</i></td></tr>
|
||||
<tr><th> Memory </th><td :title="settings.resources.memory"><span v-if="settings.resources.memory">{{ settings.resources.memory | memory }}</span><i v-else>--undefined--</i></td></tr>
|
||||
<tr><th> CPU Shares </th><td :title="settings.resources.cpu_shares"><span v-if="settings.resources.cpu_shares">{{ settings.resources.cpu_shares }}</span><i v-else>--undefined--</i></td></tr>
|
||||
<tr><th> Shm Size </th><td :title="settings.resources.shm_size">{{ settings.resources.shm_size | memory }}</td></tr>
|
||||
<tr><th> Shared memory </th><td :title="settings.resources.shm_size">{{ settings.resources.shm_size | memory }}</td></tr>
|
||||
</tbody>
|
||||
</template>
|
||||
</v-simple-table>
|
||||
|
||||
@@ -313,6 +313,7 @@
|
||||
:max="8*1e9"
|
||||
:step="0.2*1e9"
|
||||
color="blue"
|
||||
hide-details
|
||||
>
|
||||
<template v-slot:thumb-label="{ value }">
|
||||
<span v-if="value">{{ value | memory }}</span>
|
||||
@@ -330,6 +331,7 @@
|
||||
:max="8*1e9"
|
||||
:step="0.2*1e9"
|
||||
color="blue"
|
||||
hide-details
|
||||
>
|
||||
<template v-slot:thumb-label="{ value }">
|
||||
<span v-if="value">{{ value | nanocpus }}</span>
|
||||
@@ -338,6 +340,25 @@
|
||||
</v-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row align="center">
|
||||
<v-col>
|
||||
<v-slider
|
||||
v-model="data.resources.shm_size"
|
||||
label="Shared memory"
|
||||
thumb-label="always"
|
||||
:thumb-size="30"
|
||||
:min="0"
|
||||
:max="20*1e9"
|
||||
:step="0.2*1e9"
|
||||
color="blue"
|
||||
>
|
||||
<template v-slot:thumb-label="{ value }">
|
||||
<span v-if="value">{{ value | memory }}</span>
|
||||
<span v-else>N/A</span>
|
||||
</template>
|
||||
</v-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<hr />
|
||||
@@ -653,11 +674,6 @@ export default class RoomsCreate extends Vue {
|
||||
...this.$store.state.defaultRoomSettings,
|
||||
// eslint-disable-next-line
|
||||
neko_image: this.nekoImages[0],
|
||||
resources: {
|
||||
// eslint-disable-next-line
|
||||
nano_cpus: 0,
|
||||
memory: 0,
|
||||
},
|
||||
}
|
||||
this.browserPolicyContent = { ...this.$store.state.defaultBrowserPolicyContent }
|
||||
this.envList = Object.entries({...this.data.envs}).map(([ key, val ]) => ({ key, val, }))
|
||||
|
||||
@@ -67,7 +67,15 @@ export const state = {
|
||||
// eslint-disable-next-line
|
||||
envs: {},
|
||||
// eslint-disable-next-line
|
||||
mounts: [],
|
||||
mounts: [],
|
||||
// eslint-disable-next-line
|
||||
resources: {
|
||||
// eslint-disable-next-line
|
||||
nano_cpus: 0,
|
||||
memory: 0,
|
||||
// eslint-disable-next-line
|
||||
shm_size: 2000000000,
|
||||
},
|
||||
} as RoomSettings,
|
||||
videoCodecs: [
|
||||
"VP8",
|
||||
|
||||
Reference in New Issue
Block a user