mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
feat: ship docker as a first-party in-process plugin
Moves docker backend and frontend into plugins/docker/, alongside ssh-terminal. Adds a host editor tab seam, a dashboard card registry, and a build step to compile plugin backends into dist.
This commit is contained in:
1 parent
c94a453f1e
commit
a2479c19b0
34 files changed
+729
-143
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
registerDashboardCard,
|
||||
registeredDashboardCardList,
|
||||
unregisterDashboardCard,
|
||||
} from "@/dashboard/dashboard-cards-registry";
|
||||
|
||||
const FAKE_CARD_ID = "__test_plugin_dashboard_card__";
|
||||
|
||||
describe("registerDashboardCard seam", () => {
|
||||
afterEach(() => {
|
||||
unregisterDashboardCard(FAKE_CARD_ID);
|
||||
});
|
||||
|
||||
it("is not registered by default", () => {
|
||||
expect(registeredDashboardCardList()).toEqual([]);
|
||||
});
|
||||
|
||||
it("registers and unregisters a plugin dashboard card", () => {
|
||||
registerDashboardCard({
|
||||
id: FAKE_CARD_ID,
|
||||
titleKey: "nav.fakePluginItem",
|
||||
render: () => null,
|
||||
});
|
||||
|
||||
expect(registeredDashboardCardList().map((c) => c.id)).toContain(
|
||||
FAKE_CARD_ID,
|
||||
);
|
||||
|
||||
unregisterDashboardCard(FAKE_CARD_ID);
|
||||
|
||||
expect(registeredDashboardCardList().map((c) => c.id)).not.toContain(
|
||||
FAKE_CARD_ID,
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user