Skip to content

Commit

Permalink
mongodb migration button
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Jan 16, 2024
1 parent 0792881 commit c1932b3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/lib/helpers/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
* @property {string} name - The plugin name.
* @property {string} description - The plugin description.
* @property {string} assembly - The plugin assembly.
* @property {boolean} is_core
* @property {string} icon_url
* @property {string} [settings_name]
* @property {string[]} agent_ids
* @property {boolean} enabled
*/
Expand Down
24 changes: 24 additions & 0 deletions src/routes/page/mongodb/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script>
import { Col, Row } from '@sveltestrap/sveltestrap';
import Breadcrumb from '$lib/common/Breadcrumb.svelte';
import HeadTitle from '$lib/common/HeadTitle.svelte';
import { onMount } from 'svelte';
/** @type {import('$types').AgentModel[]} */
let agents = [];
onMount(async () => {
agents = await getAgents({
isEvaluator: false
});
});
</script>

<HeadTitle title="MongoDB" />

<Breadcrumb title="MongoDB" pagetitle="Setting" />

<h3>Migrate agents from file repository to MongoDB</h3>
<button class="btn btn-primary btn-sm">
<i class="bx bx-copy" /> Start Migration
</button>
7 changes: 6 additions & 1 deletion src/routes/page/plugin/plugin-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@
<span class="badge rounded-1 badge-soft-info">Public</span>
</div>
<div class="mt-2 hstack pt-2 gap-2 border-top">
<a href="/plugin/{item.id}" class="btn btn-soft-success btn-sm">Settings</a>
<a href="#" class="btn btn-soft-success btn-sm">View</a>
{#if item.settings_name}
<a href="/page/setting#{item.settings_name}" class="btn btn-soft-success btn-sm">Settings</a>
{/if}
{#if !item.is_core}
<a href="#" class="btn btn-soft-warning btn-sm" on:click={() => handlePluginStatus(item.id, !item.enabled)}>{item.enabled ? "Remove" : "Install"}</a>
{/if}
</div>
</CardBody>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/page/setting/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<Nav tabs class="nav-tabs-custom nav-justified">
{#each settings as tab}
<NavItem>
<NavItem id={tab}>
<NavLink
style="cursor: pointer"
on:click={() => handleGetSettingDetail(tab)}
Expand Down

0 comments on commit c1932b3

Please sign in to comment.