Skip to content

Commit

Permalink
Adding ipv6 to caprover, owncloud and freeflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maayarosama committed Jun 23, 2024
1 parent be0b48e commit a545262
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/playground/src/components/caprover_worker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:small="{ cpu: 1, memory: 2, disk: 50 }"
:medium="{ cpu: 2, memory: 4, disk: 100 }"
/>
<Networks v-model:mycelium="$props.modelValue.mycelium" />
<Networks v-model:mycelium="$props.modelValue.mycelium" v-model:ipv6="$props.modelValue.ipv6" />

<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual.dedicated_machines">
<v-switch color="primary" inset label="Dedicated" v-model="$props.modelValue.dedicated" />
Expand All @@ -34,6 +34,7 @@
<TfSelectionDetails
:filters="{
ipv4: true,
ipv6: $props.modelValue.ipv6,
certified: $props.modelValue.certified,
dedicated: $props.modelValue.dedicated,
cpu: $props.modelValue.solution?.cpu,
Expand All @@ -58,7 +59,7 @@ import { generateName } from "../utils/strings";
import SelectSolutionFlavor from "./select_solution_flavor.vue";
export function createWorker(name: string = generateName({ prefix: "wr" })): CaproverWorker {
return { name, mycelium: true };
return { name, mycelium: true, ipv6: false };
}
export default {
Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface CaproverWorker {
certified?: boolean;
selectionDetails?: SelectionDetails;
mycelium: boolean;
ipv6: boolean;
}

export interface FarmInterface {
Expand Down
5 changes: 4 additions & 1 deletion packages/playground/src/weblets/freeflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
:large="{ cpu: 4, memory: 32, disk: 1000 }"
/>

<Networks v-model:ipv4="ipv4"></Networks>
<Networks v-model:ipv4="ipv4" v-model:ipv6="ipv6"></Networks>

<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual.dedicated_machines">
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
Expand All @@ -59,6 +59,7 @@
<TfSelectionDetails
:filters="{
ipv4,
ipv6,
certified,
dedicated,
cpu: solution?.cpu,
Expand Down Expand Up @@ -103,6 +104,7 @@ const disks = ref<Disk[]>([]);
const dedicated = ref(false);
const certified = ref(false);
const ipv4 = ref(false);
const ipv6 = ref(false);
const rootFilesystemSize = computed(() => rootFs(solution.value?.cpu ?? 0, solution.value?.memory ?? 0));
const selectionDetails = ref<SelectionDetails>();
const selectedSSHKeys = ref("");
Expand Down Expand Up @@ -160,6 +162,7 @@ async function deploy() {
flist: flist?.value!.value,
entryPoint: flist.value!.entryPoint,
publicIpv4: ipv4.value,
publicIpv6: ipv6.value,
envs: [
{ key: "SSH_KEY", value: selectedSSHKeys.value },
{ key: "USER_ID", value: threebotName.value },
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/weblets/tf_caprover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ function normalizeCaproverWorker(worker: CW, envs: Env[]): Machine {
publicIpv4: true,
planetary: true,
mycelium: worker.mycelium || false,
publicIpv6: worker.ipv6 || false,
rootFilesystemSize: rootFs(worker.solution!.cpu, worker.solution!.memory),
disks: [
{
Expand Down
5 changes: 4 additions & 1 deletion packages/playground/src/weblets/tf_owncloud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
:medium="{ cpu: 4, memory: 16, disk: 500 }"
:large="{ cpu: 8, memory: 32, disk: 1000 }"
/>
<Networks v-model:ipv4="ipv4" v-model:mycelium="mycelium" />
<Networks v-model:ipv4="ipv4" v-model:mycelium="mycelium" v-model:ipv6="ipv6" />
<input-tooltip inline tooltip="Click to know more about dedicated machines." :href="manual.dedicated_machines">
<v-switch color="primary" inset label="Dedicated" v-model="dedicated" hide-details />
</input-tooltip>
Expand All @@ -92,6 +92,7 @@
<TfSelectionDetails
:filters="{
ipv4,
ipv6,
certified,
dedicated,
cpu: solution?.cpu,
Expand Down Expand Up @@ -150,6 +151,7 @@ const flist: Flist = {
const dedicated = ref(false);
const certified = ref(false);
const ipv4 = ref(false);
const ipv6 = ref(false);
const mycelium = ref(true);
const smtp = ref(createSMTPServer());
const rootFilesystemSize = computed(() => rootFs(solution.value?.cpu ?? 0, solution.value?.memory ?? 0));
Expand Down Expand Up @@ -205,6 +207,7 @@ async function deploy() {
entryPoint: flist.entryPoint,
rootFilesystemSize: rootFilesystemSize.value,
publicIpv4: ipv4.value,
publicIpv6: ipv6.value,
planetary: true,
mycelium: mycelium.value,
envs: [
Expand Down

0 comments on commit a545262

Please sign in to comment.