This commit is contained in:
parent
307f146e7c
commit
19d6871dfd
5 changed files with 34 additions and 5 deletions
|
|
@ -1,2 +1,19 @@
|
|||
@import "tailwindcss" source("./**/*.{js,html}");
|
||||
@plugin "daisyui";
|
||||
@plugin "daisyui";
|
||||
|
||||
/* Custom link styling for better visibility on dark backgrounds */
|
||||
.link {
|
||||
color: #60a5fa; /* Light blue that works on dark backgrounds */
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: #93c5fd; /* Lighter blue on hover */
|
||||
}
|
||||
|
||||
.link-primary {
|
||||
color: #60a5fa !important;
|
||||
}
|
||||
|
||||
.link-primary:hover {
|
||||
color: #93c5fd !important;
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ export const RecentActivity = {
|
|||
m('div.dashboard-header.mb-6', [
|
||||
m('div.flex.justify-between.items-center.mb-4', [
|
||||
m('h1.text-3xl.font-bold', 'DataBuild Dashboard'),
|
||||
m('div.badge.badge-success.badge-lg', `System: ${data.systemStatus}`)
|
||||
m('div.badge.badge-primary.badge-lg', data.graphName)
|
||||
]),
|
||||
|
||||
// Statistics
|
||||
|
|
@ -432,7 +432,14 @@ export const BuildStatus = {
|
|||
this.data.requestedPartitions?.map((partitionRef: string) => {
|
||||
const status = this.partitionStatuses.get(partitionRef);
|
||||
return m('.partition-card.border.border-base-300.rounded.p-3', [
|
||||
m('.partition-ref.font-mono.text-sm.break-all.mb-2', partitionRef),
|
||||
m('a.partition-ref.font-mono.text-sm.break-all.mb-2.link.link-primary', {
|
||||
href: `/partitions/${encodePartitionRef(partitionRef)}`,
|
||||
onclick: (e: Event) => {
|
||||
e.preventDefault();
|
||||
m.route.set(`/partitions/${encodePartitionRef(partitionRef)}`);
|
||||
},
|
||||
title: `View details for partition: ${partitionRef}`
|
||||
}, partitionRef),
|
||||
m('.flex.justify-between.items-center', [
|
||||
m(PartitionStatusBadge, { status: status?.status || 'Unknown' }),
|
||||
status?.lastUpdated ?
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export interface RecentActivitySummary {
|
|||
recentPartitions: PartitionBuild[];
|
||||
totalPartitions: number;
|
||||
systemStatus: string;
|
||||
graphName: string;
|
||||
}
|
||||
|
||||
// API Service for fetching recent activity data
|
||||
|
|
@ -69,7 +70,8 @@ export class DashboardService {
|
|||
recentBuilds,
|
||||
recentPartitions,
|
||||
totalPartitions: activityResponse.totalPartitionsCount,
|
||||
systemStatus: activityResponse.systemStatus
|
||||
systemStatus: activityResponse.systemStatus,
|
||||
graphName: activityResponse.graphName
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch recent activity:', error);
|
||||
|
|
@ -80,7 +82,8 @@ export class DashboardService {
|
|||
recentBuilds: [],
|
||||
recentPartitions: [],
|
||||
totalPartitions: 0,
|
||||
systemStatus: 'error'
|
||||
systemStatus: 'error',
|
||||
graphName: 'Unknown Graph'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -761,6 +761,7 @@ pub async fn get_activity_summary(
|
|||
recent_partitions,
|
||||
total_partitions_count: summary.total_partitions_count,
|
||||
system_status,
|
||||
graph_name: service.graph_label.clone(),
|
||||
}))
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ pub struct ActivityResponse {
|
|||
pub recent_partitions: Vec<PartitionSummary>,
|
||||
pub total_partitions_count: u32,
|
||||
pub system_status: String,
|
||||
pub graph_name: String,
|
||||
}
|
||||
|
||||
impl BuildGraphService {
|
||||
|
|
|
|||
Loading…
Reference in a new issue