From c1932b3510116fe5731d5f884b94422739c0db1b Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Tue, 16 Jan 2024 13:23:02 -0600 Subject: [PATCH] mongodb migration button --- src/lib/helpers/types.js | 2 ++ src/routes/page/mongodb/+page.svelte | 24 +++++++++++++++++++++++ src/routes/page/plugin/plugin-list.svelte | 7 ++++++- src/routes/page/setting/+page.svelte | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/routes/page/mongodb/+page.svelte diff --git a/src/lib/helpers/types.js b/src/lib/helpers/types.js index 002d5c04..a6856b4e 100644 --- a/src/lib/helpers/types.js +++ b/src/lib/helpers/types.js @@ -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 */ diff --git a/src/routes/page/mongodb/+page.svelte b/src/routes/page/mongodb/+page.svelte new file mode 100644 index 00000000..e7427fc8 --- /dev/null +++ b/src/routes/page/mongodb/+page.svelte @@ -0,0 +1,24 @@ + + + + + + +

Migrate agents from file repository to MongoDB

+ diff --git a/src/routes/page/plugin/plugin-list.svelte b/src/routes/page/plugin/plugin-list.svelte index 1cc12ef9..cd4a9d6c 100644 --- a/src/routes/page/plugin/plugin-list.svelte +++ b/src/routes/page/plugin/plugin-list.svelte @@ -68,8 +68,13 @@ Public
- Settings + View + {#if item.settings_name} + Settings + {/if} + {#if !item.is_core} handlePluginStatus(item.id, !item.enabled)}>{item.enabled ? "Remove" : "Install"} + {/if}
diff --git a/src/routes/page/setting/+page.svelte b/src/routes/page/setting/+page.svelte index 16d1fab4..f1204610 100644 --- a/src/routes/page/setting/+page.svelte +++ b/src/routes/page/setting/+page.svelte @@ -58,7 +58,7 @@