jameswlane/status-board

View on GitHub
src/webapp/routes/dashboard.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function renderDashboard has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function renderDashboard(packagesPath: any,
                                dashboardName: any,
                                request: Request,
                                response: Response) {
  const safeDashboardName = getSafeItemName(dashboardName);
Severity: Minor
Found in src/webapp/routes/dashboard.ts - About 1 hr to fix

Function listAllDashboards has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function listAllDashboards(packagesPath: any, request: Request, response: Response) {
  get(packagesPath, 'dashboards', '.json', (getError: any, dashboardConfigFiles: string[]) => {
    if (getError) {
      logger().error(getError);
      return response.status(400).send('Error loading dashboards');
Severity: Minor
Found in src/webapp/routes/dashboard.ts - About 1 hr to fix

There are no issues that match your filters.

Category
Status