Skip to content
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

Add TFRobot solution #2793

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/playground/public/info/tfrobot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: TFRobot
---

TFRobot is a command line interface tool that offers simultaneous mass deployment of groups of VMs on the ThreeFold Grid, with support of multiple retries for failed deployments, and customizable configurations, where you can define node groups, VMs groups and other configurations through a YAML or a JSON file. For more details, check [TFRobot documentation](https://manual.grid.tf/documentation/developers/tfrobot/tfrobot.html?highlight=tfrobot#).
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section>
<section class="mt-4">
<template v-if="!disableNodeSelection">
<h3 class="bg-primary pa-2 text-h6 rounded">Node Selection</h3>
<p class="text-h6 mb-4 mt-2 ml-2">Choose a way to select Node</p>
Expand Down
14 changes: 7 additions & 7 deletions packages/playground/src/components/vm_deployment_table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ async function loadDeployments() {
}

const filteredHeaders = computed(() => {
const headers = [
let headers = [
{ title: "PLACEHOLDER", key: "data-table-select" },
{ title: "Name", key: "name" },
{
Expand All @@ -269,7 +269,7 @@ const filteredHeaders = computed(() => {
{ title: "Actions", key: "actions", sortable: false },
];

const IPV6Solutions = [ProjectName.VM, ProjectName.Fullvm] as string[];
const IPV6Solutions = [ProjectName.VM, ProjectName.Fullvm, ProjectName.TFRobot] as string[];

const IPV4Solutions = [
ProjectName.VM,
Expand All @@ -284,9 +284,10 @@ const filteredHeaders = computed(() => {
ProjectName.Taiga,
ProjectName.StaticWebsite,
ProjectName.Wordpress,
ProjectName.TFRobot,
] as string[];

const WireguardSolutions = [ProjectName.VM, ProjectName.Fullvm, ProjectName.Umbrel] as string[];
const WireguardSolutions = [ProjectName.VM, ProjectName.Fullvm, ProjectName.Umbrel, ProjectName.TFRobot] as string[];

const flistSolutions = [ProjectName.VM, ProjectName.Fullvm] as string[];

Expand All @@ -302,10 +303,9 @@ const filteredHeaders = computed(() => {
if (!WireguardSolutions.includes(props.projectName)) {
headers[2].children = headers[2].children.filter(h => h.key !== "wireguard");
}

if (!flistSolutions.includes(props.projectName)) {
headers[2].children = headers[2].children.filter(h => h.key !== "flist");
}
}
if (!flistSolutions.includes(props.projectName)) {
headers = headers.filter(h => h.key !== "flist");
}

return headers;
Expand Down
4 changes: 4 additions & 0 deletions packages/playground/src/constants/deployment_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ export const deploymentListEnvironments = {
transform: prefixUrl("https"),
},
},

tfrobot: {
SSH_KEY: _ssh,
},
};
22 changes: 22 additions & 0 deletions packages/playground/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,28 @@ function createApplicationsRoutes(): RouteRecordRaw[] {
// },
// },
// },
{
path: DashboardRoutes.Applications.TFRobot,
component: () => import("../views/tfrobot_view.vue"),
meta: {
title: "TFRobot",
info: { page: "info/tfrobot.md" },
navbarConfig: {
back: true,
path: [
{ title: "Deploy" },
{
title: "Applications",
disabled: false,
to: DashboardRoutes.Deploy.Applications,
},
{
title: "TFRobot",
},
],
},
},
},
];
}

Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum ApplicationRoutes {
Wordpress = "/deploy/applications/wordpress/",
Umbrel = "/deploy/applications/umbrel/",
Freeflow = "/deploy/applications/freeflow/",
TFRobot = "/deploy/applications/tfrobot/",
}

const DashboardRoutes = {
Expand Down
3 changes: 3 additions & 0 deletions packages/playground/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export enum ProjectName {
Umbrel = "Umbrel",
FreeFlow = "Freeflow",
StaticWebsite = "StaticWebsite",
TFRobot = "TFRobot",
}

export enum SolutionCode {
Expand All @@ -147,6 +148,7 @@ export enum SolutionCode {
umbrel = "um",
wordpress = "wp",
staticwebsite = "sw",
tfrobot = "tfr",
}

export const solutionType: { [key: string]: string } = {
Expand All @@ -170,6 +172,7 @@ export const solutionType: { [key: string]: string } = {
vm: "Micro Virtual Machine",
wordpress: "Wordpress",
staticwebsite: "Static Website",
tfrobot: "TFRobot",
};

export interface solutionFlavor {
Expand Down
21 changes: 7 additions & 14 deletions packages/playground/src/views/solutions_view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ export default {
name: "SolutionsView",
setup() {
const cards: Card[] = [
{
title: "TFRobot",
excerpt:
"TFRobot is a command line interface tool that offers simultaneous mass deployment of groups of VMs on the ThreeFold Grid, with support of multiple retries for failed deployments, and customizable configurations.",
icon: "tfrobot.png",
route: DashboardRoutes.Applications.TFRobot,
},
{
title: "Peertube",
excerpt: "Peertube aspires to be a decentralized and free/libre alternative to video broadcasting services.",
Expand Down Expand Up @@ -100,13 +107,6 @@ export default {
icon: "static_website.png",
route: DashboardRoutes.Applications.StaticWebsite,
},
// {
// title: "Owncloud",
// excerpt:
// "ownCloud develops and provides open-source software for content collaboration, allowing teams to easily share and work on files seamlessly regardless of device or location.",
// icon: "owncloud.png",
// route: DashboardRoutes.Applications.Owncloud,
// },
{
title: "Nextcloud",
excerpt:
Expand Down Expand Up @@ -157,13 +157,6 @@ export default {
icon: "umbrel.png",
route: DashboardRoutes.Applications.Umbrel,
},
// {
// title: "Freeflow",
// excerpt: `Freeflow is a convenient ecosystem on top of a resilient internet grid. We bring you a new internet with a set of
// productivity tools so you can enhance collaboration within your country, your company, your community.`,
// icon: "freeflow.png",
// route: DashboardRoutes.Applications.Freeflow,
// },
{
title: "Wordpress",
excerpt:
Expand Down
26 changes: 26 additions & 0 deletions packages/playground/src/views/tfrobot_view.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<view-layout>
<TFRobot />

<template #list>
<TfDeploymentList title="TFRobot" :project-name="name" />
</template>
</view-layout>
</template>

<script lang="ts">
import { ProjectName } from "../types";
import TfDeploymentList from "../weblets/tf_deployment_list.vue";
import TFRobot from "../weblets/tfrobot.vue";

export default {
name: "TFRobotView",
components: {
TFRobot,
TfDeploymentList,
},
setup() {
return { name: ProjectName.TFRobot };
},
};
</script>
9 changes: 9 additions & 0 deletions packages/playground/src/weblets/tf_deployment_list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@
/>
</template>

<template #TFRobot-actions="{ item }">
<IconActionBtn
tooltip="Show Details"
icon="mdi-eye-outline"
@click="openDialog(tabs[activeTab].value, item)"
/>
</template>

<template #Wordpress-actions="{ item }">
<IconActionBtn
tooltip="Show Details"
Expand Down Expand Up @@ -393,6 +401,7 @@ const tabs: Tab[] = [
{ title: "Freeflow", value: "Freeflow", imgPath: "images/icons/freeflow.png" },
{ title: "Wordpress", value: "Wordpress", imgPath: "images/icons/wordpress.png" },
{ title: "Static Website", value: "StaticWebsite", imgPath: "images/icons/wordpress.png" },
{ title: "TFRobot", value: "TFRobot", imgPath: "images/icons/tfrobot.png" },
];

const layout = useLayout();
Expand Down
Loading
Loading