Added network to dead site overview.

This commit is contained in:
DebaucheryLibrarian 2025-09-15 05:19:42 +02:00
parent c90d0c3f3c
commit 1de174a8c4
2 changed files with 15 additions and 2 deletions

View File

@ -28,6 +28,7 @@
<thead> <thead>
<tr> <tr>
<th class="table-header">Entity</th> <th class="table-header">Entity</th>
<th class="table-header">Network</th>
<th <th
class="table-header noselect" class="table-header noselect"
@ -46,8 +47,18 @@
v-for="entity in alertEntities" v-for="entity in alertEntities"
:key="`entity-${entity.id}`" :key="`entity-${entity.id}`"
> >
<td class="table-cell table-name ellipsis">{{ entity.name }}</td> <td
:title="entity.id"
class="table-cell table-name ellipsis"
>{{ entity.name }}</td>
<td
:title="entity.parent?.id"
class="table-cell table-name ellipsis"
>{{ entity.parent?.name }}</td>
<td class="table-cell table-total">{{ entity.totalReleases }}</td> <td class="table-cell table-total">{{ entity.totalReleases }}</td>
<td <td
class="table-cell table-date" class="table-cell table-date"
:class="{ alert: entity.latestReleaseDate && entity.latestReleaseDate < alertDate }" :class="{ alert: entity.latestReleaseDate && entity.latestReleaseDate < alertDate }"

View File

@ -185,12 +185,14 @@ export async function fetchEntityHealths(options) {
const entities = await knex('entities') const entities = await knex('entities')
.select( .select(
'entities.*', 'entities.*',
knex.raw('row_to_json(parents) as parent'),
knex.raw('max(effective_date) as latest_release_date'), knex.raw('max(effective_date) as latest_release_date'),
knex.raw('count(releases.id) as total_releases'), knex.raw('count(releases.id) as total_releases'),
) )
.leftJoin('releases', 'releases.entity_id', 'entities.id') .leftJoin('releases', 'releases.entity_id', 'entities.id')
.leftJoin('entities as parents', 'parents.id', 'entities.parent_id')
.orderBy(sortMap[options.sort] || options.sort || sortMap.releases, options.order || 'desc') .orderBy(sortMap[options.sort] || options.sort || sortMap.releases, options.order || 'desc')
.groupBy('entities.id'); .groupBy('entities.id', 'parents.id');
const curatedEntities = entities.map((entity) => ({ const curatedEntities = entities.map((entity) => ({
...curateEntity(entity), ...curateEntity(entity),