From e7d86a5611381ff4e3373e5d528c3b8de15d9240 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 6 May 2015 21:18:45 +0100 Subject: [PATCH] Allow "hidden" option to reports config --- Netdisco/Changes | 6 ++++++ Netdisco/lib/App/Netdisco/Manual/Configuration.pod | 7 ++++++- Netdisco/lib/App/Netdisco/Web/GenericReport.pm | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 188604d9..a952169f 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.032004 - + + [ENHANCEMENTS] + + * Allow "hidden" option to reports config + 2.032003 - 2015-05-05 [ENHANCEMENTS] diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index d2c09264..b1662012 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -245,8 +245,9 @@ code or HTML templates. For example: reports: - tag: power_inventory - category: Device label: 'Power Supply Inventory' + category: Device + hidden: true columns: - {name: 'Name'} - {ps1_type: 'PS1 Type'} @@ -293,6 +294,10 @@ Section of the Reports menu where this report will appear. See L for the full list. If not supplied, reports appear in a I category. +=head4 C (optional) + +Set to true to skip inclusion of this report from the Reports menu. + =head4 C (optional) If supplying code to munge the data, the columns returned from your database diff --git a/Netdisco/lib/App/Netdisco/Web/GenericReport.pm b/Netdisco/lib/App/Netdisco/Web/GenericReport.pm index 61abcc37..a6c3e959 100644 --- a/Netdisco/lib/App/Netdisco/Web/GenericReport.pm +++ b/Netdisco/lib/App/Netdisco/Web/GenericReport.pm @@ -18,6 +18,7 @@ foreach my $report (@{setting('reports')}) { tag => $r, label => $report->{label}, category => ($report->{category} || 'My Reports'), + ($report->{hidden} ? (hidden => true) : ()), provides_csv => true, });