Skip to content

Commit

Permalink
Fix for issue #113
Browse files Browse the repository at this point in the history
Closes #113
  • Loading branch information
CraigHawker committed Aug 4, 2023
1 parent 8d19af0 commit e0b3f1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,17 @@ public override string GetDashboardContent(IConfigurationRequestContext context)
// Return the dashboard.
try
{
return dashboard.ToString();
var dashboardContent = dashboard.ToString();

// If we have no dashboard content and the base implementation
// of StartApplication was not called then this is likely a bug.
if(dashboard.Contents.Count == 0
&& !this.startApplicationCalled)
{
dashboardContent = "<p style='color: red;'>Exception rendering dashboard: <span style='font-family: Courier New, monospace'>base.StartApplication</span> not called.</p>";
}

return dashboardContent;
}
catch (Exception e)
{
Expand Down
4 changes: 3 additions & 1 deletion MFiles.VAF.Extensions/ConfigurableVaultApplicationBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ protected internal new IApplicationLicense License
set { base.License = value; }
}

private bool startApplicationCalled = false;

protected override void StartApplication()
{

this.startApplicationCalled = true;
this.RecurringOperationConfigurationManager = new RecurringOperationConfigurationManager<TSecureConfiguration>(this);
this.ApplicationOverviewDashboardContentRenderer = this.GetApplicationOverviewDashboardContentRenderer();
this.AsynchronousDashboardContentRenderer = this.GetAsynchronousDashboardContentRenderer();
Expand Down

0 comments on commit e0b3f1f

Please sign in to comment.