diff --git a/client/src/components/ActivityBar/ActivityBar.vue b/client/src/components/ActivityBar/ActivityBar.vue
index 9a440d5ddd27..0e2c54e7b181 100644
--- a/client/src/components/ActivityBar/ActivityBar.vue
+++ b/client/src/components/ActivityBar/ActivityBar.vue
@@ -16,6 +16,7 @@ import ActivityItem from "./ActivityItem.vue";
import InteractiveItem from "./Items/InteractiveItem.vue";
import NotificationItem from "./Items/NotificationItem.vue";
import UploadItem from "./Items/UploadItem.vue";
+import AdminPanel from "@/components/admin/AdminPanel.vue";
import FlexPanel from "@/components/Panels/FlexPanel.vue";
import MultiviewPanel from "@/components/Panels/MultiviewPanel.vue";
import NotificationsPanel from "@/components/Panels/NotificationsPanel.vue";
@@ -31,7 +32,7 @@ const { hashedUserId } = useHashedUserId();
const eventStore = useEventStore();
const activityStore = useActivityStore();
-const { isAnonymous } = storeToRefs(userStore);
+const { isAdmin, isAnonymous } = storeToRefs(userStore);
const emit = defineEmits(["dragstart"]);
@@ -173,7 +174,7 @@ watch(
:to="activity.to"
@click="onToggleSidebar()" />
+
@@ -219,6 +229,7 @@ watch(
+
diff --git a/client/src/components/ActivityBar/ActivityItem.vue b/client/src/components/ActivityBar/ActivityItem.vue
index c6ce2a2ee75b..0586a1657f99 100644
--- a/client/src/components/ActivityBar/ActivityItem.vue
+++ b/client/src/components/ActivityBar/ActivityItem.vue
@@ -24,6 +24,7 @@ export interface Props {
progressStatus?: string;
options?: Option[];
to?: string;
+ variant?: string;
}
const props = withDefaults(defineProps(), {
@@ -37,6 +38,7 @@ const props = withDefaults(defineProps(), {
to: undefined,
tooltip: undefined,
tooltipPlacement: "right",
+ variant: "primary",
});
const emit = defineEmits<{
@@ -70,7 +72,7 @@ function onClick(evt: MouseEvent): void {
width: `${Math.round(progressPercentage)}%`,
}" />
-
+
{{ Math.min(indicator, 99) }}
diff --git a/client/src/components/admin/AdminPanel.test.js b/client/src/components/admin/AdminPanel.test.js
index f30528512d6f..33919a126cbc 100644
--- a/client/src/components/admin/AdminPanel.test.js
+++ b/client/src/components/admin/AdminPanel.test.js
@@ -1,10 +1,19 @@
import { mount } from "@vue/test-utils";
import { getLocalVue } from "tests/jest/helpers";
+import { useConfig } from "@/composables/config";
+
import MountTarget from "./AdminPanel.vue";
const localVue = getLocalVue(true);
+jest.mock("@/composables/config", () => ({
+ useConfig: jest.fn(() => ({
+ config: { value: { enable_quotas: true, tool_shed_urls: ["tool_shed_url"], version_major: "1.0.1" } },
+ isConfigLoaded: true,
+ })),
+}));
+
function createTarget(propsData = {}) {
return mount(MountTarget, {
localVue,
@@ -16,21 +25,29 @@ function createTarget(propsData = {}) {
}
describe("AdminPanel", () => {
- it("ensure reactivity to prop changes", async () => {
- const wrapper = createTarget();
- const sections = {
- isToolshedInstalled: "#admin-link-toolshed",
- enableQuotas: "#admin-link-quotas",
- };
- for (const elementId of Object.values(sections)) {
- expect(wrapper.find(elementId).exists()).toBe(false);
- }
+ it("ensure section visibility with config changes", async () => {
+ const options = [
+ {
+ name: "tool_shed_urls",
+ elementId: "#admin-link-toolshed",
+ value: ["toolshed_url"],
+ },
+ {
+ name: "enable_quotas",
+ elementId: "#admin-link-quotas",
+ value: true,
+ },
+ ];
for (const available of [true, false]) {
- for (const [propId, elementId] of Object.entries(sections)) {
+ for (const option of options) {
const props = {};
- props[propId] = available;
- await wrapper.setProps(props);
- expect(wrapper.find(elementId).exists()).toBe(available);
+ props[option.name] = available ? option.value : undefined;
+ useConfig.mockImplementation(() => ({
+ config: { value: { ...props, version_major: "1.0.1" } },
+ isConfigLoaded: true,
+ }));
+ const wrapper = createTarget();
+ expect(wrapper.find(option.elementId).exists()).toBe(available);
}
}
});
diff --git a/client/src/components/admin/AdminPanel.vue b/client/src/components/admin/AdminPanel.vue
index 8853ed812d39..b6a5ea2bfd45 100644
--- a/client/src/components/admin/AdminPanel.vue
+++ b/client/src/components/admin/AdminPanel.vue
@@ -1,17 +1,135 @@
+
+
-
-
+
+ Galaxy Version {{ adminProperties.versionMajor }}