Skip to content

Commit

Permalink
Make module sync rely on local cache only
Browse files Browse the repository at this point in the history
This commit makes the module sync route rely on the local cache only
without requiring queries to the module index. It also removes the
tab to install assets since dynamic installation is now in play. Since
the tab is removed and there's only one tab for most users of SI, the
tab group will be disabled and the pill counter will move to the title
of the assets panel.

Signed-off-by: Nick Gerace <[email protected]>
  • Loading branch information
nickgerace committed Feb 24, 2025
1 parent d9eb98d commit 8fac807
Show file tree
Hide file tree
Showing 20 changed files with 264 additions and 673 deletions.
25 changes: 16 additions & 9 deletions app/web/src/components/AssetListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<template #label>
<div class="flex flex-row gap-xs">
<div>Assets Installed</div>
<PillCounter
v-if="!featureFlagsStore.MODULES_TAB"
:count="assetList.length"
/>
</div>
</template>
<div class="flex flex-row gap-xs items-center">
Expand Down Expand Up @@ -203,15 +207,18 @@ const categorizedAssets = computed(() =>
return include;
})
.reduce((categorized, asset) => {
let catList = categorized[asset.category];
if (!catList) {
catList = [];
}
catList.push(asset);
categorized[asset.category] = catList;
return categorized;
}, {} as { [key: string]: SchemaVariant[] }),
.reduce(
(categorized, asset) => {
let catList = categorized[asset.category];
if (!catList) {
catList = [];
}
catList.push(asset);
categorized[asset.category] = catList;
return categorized;
},
{} as { [key: string]: SchemaVariant[] },
),
);
const categoryColor = (category: string) => {
Expand Down
19 changes: 7 additions & 12 deletions app/web/src/components/CustomizeTabs.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<TabGroup
v-if="featureFlagsStore.MODULES_TAB"
ref="group"
:startSelectedTabSlug="tabContentSlug"
marginTop="2xs"
Expand All @@ -12,21 +13,15 @@
</template>
<slot name="assets" />
</TabGroupItem>
<TabGroupItem slug="newassets">
<template #label>
Assets Available
<PillCounter :count="moduleStore.installableModules.length" />
</template>
<slot name="newassets" />
</TabGroupItem>
<TabGroupItem
v-if="featureFlagsStore.MODULES_TAB"
slug="packages"
label="M"
>
<TabGroupItem slug="packages" label="Modules (Internal)">
<slot name="packages" />
</TabGroupItem>
</TabGroup>

<!-- NOTE(nick): do not use the tab group if only one slot is used -->
<div v-else>
<slot name="assets" />
</div>
</template>

<script lang="ts" setup>
Expand Down
215 changes: 0 additions & 215 deletions app/web/src/components/InstallAsset.vue

This file was deleted.

106 changes: 0 additions & 106 deletions app/web/src/components/InstallAssetsPanel.vue

This file was deleted.

Loading

0 comments on commit 8fac807

Please sign in to comment.