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 deployment list page #3002

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions packages/playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ const routes: AppRoute[] = [
route: DashboardRoutes.Deploy.YourContracts,
tooltip: "Explore and modify your TFChain contracts.",
},
{
title: "Your Deployments",
icon: "mdi-file-document-edit",
route: DashboardRoutes.Deploy.YourDeployments,
tooltip: "Explore and modify your TFChain contracts.",
},
{
title: "Images",
icon: "mdi-open-in-new",
Expand Down
41 changes: 41 additions & 0 deletions packages/playground/src/dashboard/deployment_list.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<template>
<view-layout>
<template #list>
<div>
<div v-for="(project, index) in projects" :key="index">
<TfDeploymentList :title="`${project.name} Instances`" :project-name="project.value" />
</div>
</div>
</template>
</view-layout>
</template>

<script lang="ts">
import { ref } from "vue";

import { ProjectName } from "../types";
import TfDeploymentList from "../weblets/tf_deployment_list.vue";
import Subsquid from "../weblets/tf_subsquid.vue";

export default {
name: "DeploymentsList",
components: {
TfDeploymentList,
},

setup() {
const projects = ref();

// Convert enum to array of objects
projects.value = Object.keys(ProjectName).map(key => ({
name: key,
value: ProjectName[key as keyof typeof ProjectName],
}));
Object.keys(ProjectName).forEach(key => {
const enumValue = ProjectName[key as keyof typeof ProjectName];
console.log(`${key} = ${enumValue}`);
});
return { projects };
},
};
</script>
16 changes: 16 additions & 0 deletions packages/playground/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,22 @@ function createDeployRoutes(): RouteRecordRaw[] {
info: { page: "info/contracts_list.md" },
},
},
{
path: DashboardRoutes.Deploy.YourContracts,
component: () => import("../dashboard/contracts_list.vue"),
meta: {
title: "Your Contracts List",
info: { page: "info/deployment_list.md" },
},
},
{
path: DashboardRoutes.Deploy.YourDeployments,
component: () => import("../dashboard/deployment_list.vue"),
meta: {
title: "Your Contracts List",
info: { page: "info/deployment_list.md" },
},
},

{
path: DashboardRoutes.Deploy.SSHKey,
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ enum DeployRoutes {
Orchestrators = "/deploy/orchestrators/",
Applications = "/deploy/applications/",
YourContracts = "/deploy/your-contracts/",
YourDeployments = "/deploy/your-deployments/",

Images = "https://hub.grid.tf/",
SSHKey = "/deploy/sshkey/",
}
Expand Down
Loading