pub struct DashboardRenderer { /* private fields */ }Expand description
Dashboard renderer with template registry support
Implementations§
Source§impl DashboardRenderer
impl DashboardRenderer
Sourcepub fn new() -> Result<Self, Box<dyn Error>>
pub fn new() -> Result<Self, Box<dyn Error>>
Create a new dashboard renderer (built-in templates only)
Sourcepub fn with_external_templates(
templetes_dir: Option<PathBuf>,
) -> Result<Self, Box<dyn Error>>
pub fn with_external_templates( templetes_dir: Option<PathBuf>, ) -> Result<Self, Box<dyn Error>>
Create a new dashboard renderer with optional external template directory
The single built-in merged dashboard template lives at
src/render_engine/dashboard/templates/dashboard_unified.html.
External templates (if any) are loaded from <manifest>/templetes/<dir>/code.html.
Sourcepub fn render_with_template(
&self,
template_id: &str,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_with_template( &self, template_id: &str, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render using the template registry (new API)
Injects embedded asset scripts (tailwind, fonts, chart, d3) into the context
so templates can use {{{tailwind_script}}}, {{{fonts_css}}}, etc.
Sourcepub fn list_templates(&self) -> Vec<String>
pub fn list_templates(&self) -> Vec<String>
List available template IDs
Sourcepub fn build_context_from_tracker(
&self,
tracker: &Tracker,
passport_tracker: &Arc<MemoryPassportTracker>,
) -> Result<DashboardContext, Box<dyn Error>>
pub fn build_context_from_tracker( &self, tracker: &Tracker, passport_tracker: &Arc<MemoryPassportTracker>, ) -> Result<DashboardContext, Box<dyn Error>>
Build dashboard context from tracker data
Sourcepub fn build_context_from_tracker_with_async(
&self,
tracker: &Tracker,
passport_tracker: &Arc<MemoryPassportTracker>,
async_tracker: Option<&Arc<AsyncTracker>>,
) -> Result<DashboardContext, Box<dyn Error>>
pub fn build_context_from_tracker_with_async( &self, tracker: &Tracker, passport_tracker: &Arc<MemoryPassportTracker>, async_tracker: Option<&Arc<AsyncTracker>>, ) -> Result<DashboardContext, Box<dyn Error>>
Build dashboard context from tracker data with async support
Sourcepub fn render_from_tracker(
&self,
tracker: &Tracker,
passport_tracker: &Arc<MemoryPassportTracker>,
) -> Result<String, Box<dyn Error>>
pub fn render_from_tracker( &self, tracker: &Tracker, passport_tracker: &Arc<MemoryPassportTracker>, ) -> Result<String, Box<dyn Error>>
Render dashboard from tracker data (for standalone template)
Sourcepub fn render_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render dashboard from context
Sourcepub fn render_standalone_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_standalone_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render standalone dashboard (no external dependencies, works with file:// protocol)
Sourcepub fn render_unified_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_unified_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render unified dashboard — uses the merged dashboard_unified template
Sourcepub fn render_final_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_final_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render final dashboard — now delegates to the same unified template
Sourcepub fn render_binary_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_binary_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render binary dashboard (legacy template)
Sourcepub fn render_clean_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_clean_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render clean dashboard (legacy template)
Sourcepub fn render_hybrid_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_hybrid_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render hybrid dashboard (legacy template)
Sourcepub fn render_performance_dashboard(
&self,
context: &DashboardContext,
) -> Result<String, Box<dyn Error>>
pub fn render_performance_dashboard( &self, context: &DashboardContext, ) -> Result<String, Box<dyn Error>>
Render performance dashboard (legacy template)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DashboardRenderer
impl !UnwindSafe for DashboardRenderer
impl Freeze for DashboardRenderer
impl Send for DashboardRenderer
impl Sync for DashboardRenderer
impl Unpin for DashboardRenderer
impl UnsafeUnpin for DashboardRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more