Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ldap/hooks/addldapmenuitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,29 @@ public function __construct()
['PAGES_WITH_OBJECTS', 'addPageWithObject'],
['PERMISSION_REGISTRY_DATA', 'permData'],
['SUB_MENULINK_DATA', 'menuUpdate'],
['REPORT_TITLE_DATA', 'reportTitle'],
]);
}
/**
* Names this plugin's report in the Reports menu.
*
* Without this the sidebar shows ucwords() of the FILE name -- "Ldap Report"
* -- while the page it opens is headed "Export LDAP Servers". Two names for one
* screen, and the file name is the half nobody chose.
*
* Keyed the way the menu and the base64 `f` parameter are: the file
* name with underscores as spaces, lower case. The report reads the
* same map back through reportTitle() for its heading, so the two
* cannot drift apart again.
*
* @param mixed $arguments The titles to modify.
*
* @return void
*/
public function reportTitle($arguments)
{
$arguments['titles']['ldap report'] = _('Export LDAP Servers');
}
/**
* Add the new items beyond list/create.
*
Expand Down
2 changes: 1 addition & 1 deletion ldap/js/fog.ldap.report.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{data: 'nestedDepth', visible: false},
{data: 'tlsVerify', visible: false},
{data: 'tlsCaCert', visible: false}
]);
], {fullExport: true});
break;
}
})(jQuery);
20 changes: 11 additions & 9 deletions ldap/reports/ldap_report.report.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LDAP_Report extends \FOG\ReportManagement
*/
public function file()
{
$this->title = _('Export LDAP Servers');
$this->title = self::reportTitle();

$this->headerData = [
_('LDAP Connection Name'),
Expand Down Expand Up @@ -86,7 +86,7 @@ public function file()
echo '<div class="card">';
echo '<div class="card-header">';
echo '<h4 class="card-title">';
echo _('Export LDAP Servers');
echo $this->title;
echo '</h4>';
echo '<p class="form-text">';
echo _('Use the selector to choose how many items you want exported');
Expand All @@ -98,16 +98,18 @@ public function file()
echo '</div>';
}
/**
* Returns the JSON data for this report.
* The rows this report serves.
*
* @return void
* Split from the emit so the grid and the "CSV (All)" export run the
* same query -- ReportManagement::exportAll() serves this, and cannot
* take back control from a getList() that exits.
*
* @return array
*/
public function getList()
protected function reportRows()
{
header('Content-type: application/json');
\FOG\Router\Route::listem('ldap');
http_response_code(\FOG\Router\HTTPResponseCodes::HTTP_SUCCESS);
echo \FOG\Router\Route::getData();
exit;

return (array) json_decode(\FOG\Router\Route::getData(), true);
}
}
21 changes: 21 additions & 0 deletions location/hooks/addlocationmenuitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,29 @@ public function __construct()
['PAGES_WITH_OBJECTS', 'addPageWithObject'],
['PERMISSION_REGISTRY_DATA', 'permData'],
['SUB_MENULINK_DATA', 'menuUpdate'],
['REPORT_TITLE_DATA', 'reportTitle'],
]);
}
/**
* Names this plugin's report in the Reports menu.
*
* Without this the sidebar shows ucwords() of the FILE name -- "Location Report"
* -- while the page it opens is headed "Export Locations". Two names for one
* screen, and the file name is the half nobody chose.
*
* Keyed the way the menu and the base64 `f` parameter are: the file
* name with underscores as spaces, lower case. The report reads the
* same map back through reportTitle() for its heading, so the two
* cannot drift apart again.
*
* @param mixed $arguments The titles to modify.
*
* @return void
*/
public function reportTitle($arguments)
{
$arguments['titles']['location report'] = _('Export Locations');
}
/**
* Add the new items beyond list/create.
*
Expand Down
2 changes: 1 addition & 1 deletion location/js/fog.location.report.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{data: 'storagegroupID', visible: false},
{data: 'storagenodeID', visible: false},
{data: 'tftp', visible: false}
]);
], {fullExport: true});
break;
}
})(jQuery);
20 changes: 11 additions & 9 deletions location/reports/location_report.report.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Location_Report extends \FOG\ReportManagement
*/
public function file()
{
$this->title = _('Export Locations');
$this->title = self::reportTitle();

$this->headerData = [
_('Location Name'),
Expand All @@ -52,7 +52,7 @@ public function file()
echo '<div class="card">';
echo '<div class="card-header">';
echo '<h4 class="card-title">';
echo _('Export Locations');
echo $this->title;
echo '</h4>';
echo '<p class="form-text">';
echo _('Use the selector to choose how many items you want exported');
Expand All @@ -64,16 +64,18 @@ public function file()
echo '</div>';
}
/**
* Returns the JSON data for this report.
* The rows this report serves.
*
* @return void
* Split from the emit so the grid and the "CSV (All)" export run the
* same query -- ReportManagement::exportAll() serves this, and cannot
* take back control from a getList() that exits.
*
* @return array
*/
public function getList()
protected function reportRows()
{
header('Content-type: application/json');
\FOG\Router\Route::listem('location');
http_response_code(\FOG\Router\HTTPResponseCodes::HTTP_SUCCESS);
echo \FOG\Router\Route::getData();
exit;

return (array) json_decode(\FOG\Router\Route::getData(), true);
}
}
21 changes: 21 additions & 0 deletions ou/hooks/addoumenuitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,29 @@ public function __construct()
['PAGES_WITH_OBJECTS', 'addPageWithObject'],
['PERMISSION_REGISTRY_DATA', 'permData'],
['SUB_MENULINK_DATA', 'menuUpdate'],
['REPORT_TITLE_DATA', 'reportTitle'],
]);
}
/**
* Names this plugin's report in the Reports menu.
*
* Without this the sidebar shows ucwords() of the FILE name -- "Ou Report"
* -- while the page it opens is headed "Export OUs". Two names for one
* screen, and the file name is the half nobody chose.
*
* Keyed the way the menu and the base64 `f` parameter are: the file
* name with underscores as spaces, lower case. The report reads the
* same map back through reportTitle() for its heading, so the two
* cannot drift apart again.
*
* @param mixed $arguments The titles to modify.
*
* @return void
*/
public function reportTitle($arguments)
{
$arguments['titles']['ou report'] = _('Export OUs');
}
/**
* Add the new items beyond list/create.
*
Expand Down
2 changes: 1 addition & 1 deletion ou/js/fog.ou.report.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{data: 'createdBy', visible: false},
{data: 'createdTime', visible: false},
{data: 'ou'}
]);
], {fullExport: true});
break;
}
})(jQuery);
20 changes: 11 additions & 9 deletions ou/reports/ou_report.report.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class OU_Report extends \FOG\ReportManagement
*/
public function file()
{
$this->title = _('Export OUs');
$this->title = self::reportTitle();

$this->headerData = [
_('OU Name'),
Expand All @@ -48,7 +48,7 @@ public function file()
echo '<div class="card">';
echo '<div class="card-header">';
echo '<h4 class="card-title">';
echo _('Export OUs');
echo $this->title;
echo '</h4>';
echo '<p class="form-text">';
echo _('Use the selector to choose how many items you want exported');
Expand All @@ -60,16 +60,18 @@ public function file()
echo '</div>';
}
/**
* Returns the JSON data for this report.
* The rows this report serves.
*
* @return void
* Split from the emit so the grid and the "CSV (All)" export run the
* same query -- ReportManagement::exportAll() serves this, and cannot
* take back control from a getList() that exits.
*
* @return array
*/
public function getList()
protected function reportRows()
{
header('Content-type: application/json');
\FOG\Router\Route::listem('ou');
http_response_code(\FOG\Router\HTTPResponseCodes::HTTP_SUCCESS);
echo \FOG\Router\Route::getData();
exit;

return (array) json_decode(\FOG\Router\Route::getData(), true);
}
}
21 changes: 21 additions & 0 deletions subnetgroup/hooks/addsubnetgroupmenuitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,29 @@ public function __construct()
['PAGES_WITH_OBJECTS', 'addPageWithObject'],
['PERMISSION_REGISTRY_DATA', 'permData'],
['SUB_MENULINK_DATA', 'menuUpdate'],
['REPORT_TITLE_DATA', 'reportTitle'],
]);
}
/**
* Names this plugin's report in the Reports menu.
*
* Without this the sidebar shows ucwords() of the FILE name -- "Subnetgroup Report"
* -- while the page it opens is headed "Export Subnet Groups". Two names for one
* screen, and the file name is the half nobody chose.
*
* Keyed the way the menu and the base64 `f` parameter are: the file
* name with underscores as spaces, lower case. The report reads the
* same map back through reportTitle() for its heading, so the two
* cannot drift apart again.
*
* @param mixed $arguments The titles to modify.
*
* @return void
*/
public function reportTitle($arguments)
{
$arguments['titles']['subnetgroup report'] = _('Export Subnet Groups');
}
/**
* Add the new items beyond list/create.
*
Expand Down
2 changes: 1 addition & 1 deletion subnetgroup/js/fog.subnetgroup.report.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$('#subnetgroup-report-table').registerReportTable([
{data: 'name'},
{data: 'groupID'}
]);
], {fullExport: true});
break;
}
})(jQuery);
20 changes: 11 additions & 9 deletions subnetgroup/reports/subnetgroup_report.report.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SubnetGroup_Report extends \FOG\ReportManagement
*/
public function file()
{
$this->title = _('Export Subnet Groups');
$this->title = self::reportTitle();

$this->headerData = [
_('Name'),
Expand All @@ -42,7 +42,7 @@ public function file()
echo '<div class="card">';
echo '<div class="card-header">';
echo '<h4 class="card-title">';
echo _('Export Subnet Groups');
echo $this->title;
echo '</h4>';
echo '<p class="form-text">';
echo _('Use the selector to choose how many items you want exported');
Expand All @@ -54,16 +54,18 @@ public function file()
echo '</div>';
}
/**
* Returns the JSON data for this report.
* The rows this report serves.
*
* @return void
* Split from the emit so the grid and the "CSV (All)" export run the
* same query -- ReportManagement::exportAll() serves this, and cannot
* take back control from a getList() that exits.
*
* @return array
*/
public function getList()
protected function reportRows()
{
header('Content-type: application/json');
\FOG\Router\Route::listem('subnetgroup');
http_response_code(\FOG\Router\HTTPResponseCodes::HTTP_SUCCESS);
echo \FOG\Router\Route::getData();
exit;

return (array) json_decode(\FOG\Router\Route::getData(), true);
}
}
21 changes: 21 additions & 0 deletions taskstateedit/hooks/addtaskstateeditmenuitem.hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,29 @@ public function __construct()
['PAGES_WITH_OBJECTS', 'addPageWithObject'],
['PERMISSION_REGISTRY_DATA', 'permData'],
['SUB_MENULINK_DATA', 'menuUpdate'],
['REPORT_TITLE_DATA', 'reportTitle'],
]);
}
/**
* Names this plugin's report in the Reports menu.
*
* Without this the sidebar shows ucwords() of the FILE name -- "Taskstateedit Report"
* -- while the page it opens is headed "Export Task States". Two names for one
* screen, and the file name is the half nobody chose.
*
* Keyed the way the menu and the base64 `f` parameter are: the file
* name with underscores as spaces, lower case. The report reads the
* same map back through reportTitle() for its heading, so the two
* cannot drift apart again.
*
* @param mixed $arguments The titles to modify.
*
* @return void
*/
public function reportTitle($arguments)
{
$arguments['titles']['taskstateedit report'] = _('Export Task States');
}
/**
* Add the new items beyond list/create.
*
Expand Down
2 changes: 1 addition & 1 deletion taskstateedit/js/fog.taskstateedit.report.file.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{data: 'description'},
{data: 'order', visible: false},
{data: 'icon', visible: false}
]);
], {fullExport: true});
break;
}
})(jQuery);
Loading