Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #525 from threefoldtech/development_update_deploym…
Browse files Browse the repository at this point in the history
…ents_list

add mattermost and discourse to deployment list
  • Loading branch information
abom authored Feb 3, 2022
2 parents b5e0e5d + 35d8c6b commit 110ff1f
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 6 deletions.
15 changes: 9 additions & 6 deletions easy-docs/src/views/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,23 @@ class Weblet {
export default class Editor extends Vue {
public sections = ["deployment", "my account", "calculator"];
public weblets: Weblet[] = [
new Weblet("CapRover", "caprover", "caprover", "deployment"),
new Weblet("Discourse", "discourse", "discourse", "deployment"),
new Weblet("Virtual Machine", "vm", "vm", "deployment"),
new Weblet("Kubernetes", `kubernetes`, "k8s", "deployment"),
new Weblet("Contracts", "contractslist", "", "my account"),
new Weblet("Deployments", "deployedlist", "", "my account"),
new Weblet("Farming Calculator", "farming-calculator", "", "calculator"),
new Weblet("CapRover", "caprover", "caprover", "deployment"),
new Weblet("Peertube", "peertube", "peertube", "deployment"),
new Weblet("Funkwhale", "funkwhale", "funkwhale", "deployment"),
new Weblet("Mattermost", "mattermost", "mattermost", "deployment"),
new Weblet("Discourse", "discourse", "discourse", "deployment"),
new Weblet("Taiga", "taiga", "taiga", "deployment"),
new Weblet("Owncloud", "owncloud", "owncloud", "deployment"),
new Weblet("Contracts", "contractslist", "", "my account"),
new Weblet("Deployments", "deployedlist", "", "my account"),
new Weblet("Farming Calculator", "farming-calculator", "", "calculator"),
];
public active = 0;
Expand Down
93 changes: 93 additions & 0 deletions src/elements/DeployedList/DeployedList.wc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
| "funkwhale"
| "peertube"
| "mattermost"
| "discourse"
| "taiga"
| "owncloud";
export let tab: TabsType = undefined;
Expand All @@ -33,6 +35,8 @@
{ label: "Caprover", value: "caprover" },
{ label: "FunkWhale", value: "funkwhale" },
{ label: "Peertube", value: "peertube" },
{ label: "Mattermost", value: "mattermost" },
{ label: "Discourse", value: "discourse" },
{ label: "Taiga", value: "taiga" },
{ label: "Owncloud", value: "owncloud" }
];
Expand Down Expand Up @@ -361,6 +365,7 @@
message={err.message || err || "Failed to list Peertube"}
/>
{/await}

<!-- FunkWhale -->
{:else if active === "funkwhale"}
{#await list?.loadFunkwhale()}
Expand Down Expand Up @@ -403,6 +408,8 @@
message={err.message || err || "Failed to list Funkwhale"}
/>
{/await}

<!-- Taiga -->
{:else if active === "taiga"}
{#await list.loadTaiga()}
<Alert type="info" message="Listing Taiga Instances..." />
Expand Down Expand Up @@ -462,6 +469,92 @@
/>
{/await}

<!-- Mattermost -->
{:else if active === "mattermost"}
{#await list?.loadMattermost()}
<Alert type="info" message="Listing Mattermost..." />
{:then rows}
{#if rows.length}
<Table
rowsData={rows}
headers={_vmHeader}
rows={_createVMRow(rows)}
actions={[
{
type: "info",
label: "Show Details",
click: (_, i) => (infoToShow = rows[i].details),
disabled: () => removing !== null,
loading: (i) => removing === rows[i].name,
},
{
type: "warning",
label: "Visit",
click: (_, i) => {
const domain = rows[i].details.env.SITE_URL;
window.open(domain, "_blank").focus();
},
disabled: (i) => {
const env = rows[i].details.env;
return !env || !env.SITE_URL || removing !== null;
},
},
]}
on:selected={_onSelectRowHandler}
/>
{:else}
<Alert type="info" message="No Mattermost found on this profile." />
{/if}
{:catch err}
<Alert
type="danger"
message={err.message || err || "Failed to list Mattermost"}
/>
{/await}

<!-- Discourse -->
{:else if active === "discourse"}
{#await list?.loadDiscourse()}
<Alert type="info" message="Listing Discourse..." />
{:then rows}
{#if rows.length}
<Table
rowsData={rows}
headers={_vmHeader}
rows={_createVMRow(rows)}
actions={[
{
type: "info",
label: "Show Details",
click: (_, i) => (infoToShow = rows[i].details),
disabled: () => removing !== null,
loading: (i) => removing === rows[i].name,
},
{
type: "warning",
label: "Visit",
click: (_, i) => {
const domain = rows[i].details.env.DISCOURSE_HOSTNAME;
window.open("https://" + domain, "_blank").focus();
},
disabled: (i) => {
const env = rows[i].details.env;
return !env || !env.DISCOURSE_HOSTNAME || removing !== null;
},
},
]}
on:selected={_onSelectRowHandler}
/>
{:else}
<Alert type="info" message="No Discourses found on this profile." />
{/if}
{:catch err}
<Alert
type="danger"
message={err.message || err || "Failed to list Discourse"}
/>
{/await}

<!-- Owncloud -->
{:else if active === "owncloud"}
{#await list.loadOwncloud()}
Expand Down

0 comments on commit 110ff1f

Please sign in to comment.