Skip to content

Commit

Permalink
Merge branch 'ui-list-plugins' into 'main'
Browse files Browse the repository at this point in the history
Show enabled plugins in UI

See merge request reportcreator/reportcreator!772
  • Loading branch information
MWedl committed Nov 21, 2024
2 parents ef177f7 + 9c46e70 commit a543ca2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/src/reportcreator_api/utils/license.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from django.utils import dateparse, timezone
from rest_framework import permissions

from reportcreator_api.conf import plugins
from reportcreator_api.utils.decorators import cache


Expand Down Expand Up @@ -135,6 +136,7 @@ def get_license_info():
'total_users': PentestUser.objects.get_total_user_count(),
'installation_id': settings.INSTALLATION_ID,
'software_version': settings.VERSION,
'plugins': [p.name.split('.')[-1] for p in plugins.enabled_plugins],
}

async def aget_license_info():
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/pages/license.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<td>Software Version:</td>
<td>{{ license.software_version }}</td>
</tr>
<tr>
<td>Plugins:</td>
<td>{{ license.plugins.join(', ') || '-' }}</td>
</tr>
</tbody>
</v-table>
</v-container>
Expand All @@ -60,7 +64,7 @@ useHeadExtended({
breadcrumbs: () => [{ title: 'License', to: '/license/' }],
});
const license = await useFetchE<LicenseInfoDetails>('/api/v1/utils/license', { method: 'GET' });
const license = await useFetchE<LicenseInfoDetails>('/api/v1/utils/license/', { method: 'GET' });
const licenseWarning = computed(() => {
if (!license.value || !license.value.valid_until) {
return false;
Expand Down
1 change: 1 addition & 0 deletions packages/nuxt-base-layer/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export type LicenseInfoDetails = {
readonly users: number;
readonly active_users: number;
readonly software_version: string;
readonly plugins: string[];
}

export enum MfaMethodType {
Expand Down

0 comments on commit a543ca2

Please sign in to comment.