-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de02f8e
commit 9e3c077
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
# Copyright © 2023 FirstWave. All Rights Reserved. | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
include 'shared/collection_functions.php'; | ||
$every = ''; | ||
if (stripos($data[0]->{'attributes'}->{'hour'}, '*/') !== false) { | ||
$every = str_replace('*/', '', $data[0]->{'attributes'}->{'hour'}) . ' hours'; | ||
} | ||
if (stripos($data[0]->{'attributes'}->{'minute'}, '*/') !== false) { | ||
$minute = str_replace('*/', '', $data[0]->{'attributes'}->{'minute'}); | ||
if ($every != "") { | ||
$every .= ', ' . $minute . ' minutes'; | ||
} else { | ||
$every = $minute . ' minutes'; | ||
} | ||
} | ||
?> | ||
<main class="container-fluid"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<div class="row"> | ||
<div class="col-4 clearfix"> | ||
<h6 style="padding-top:10px;"><span class="fa fa-chart-bar oa-icon"></span><?= __('Collector') ?></h6> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-body"> | ||
<div class="row"> | ||
<p class="text-center"><br /> | ||
<?php if ($every != '') { ?> | ||
This collector requests tasks every <?= $every ?>.<br /><br /> | ||
<?php if ($data[0]->{'attributes'}->{'last_run'} != "2000-01-01 00:00:00") { ?> | ||
The last time this task was run was <?= $data[0]->{'attributes'}->{'last_run'}; ?>.<br /><br /> | ||
<?php } else { ?> | ||
This task has not yet been run.<br /><br /> | ||
<?php } ?> | ||
<?php } else { ?> | ||
<b>This collector is not requesting tasks.</b><br /><br /> | ||
<?php } ?> | ||
The number of devices discovered by this collector is <?= $config->device_count ?>. | ||
</div> | ||
</div> | ||
</div> | ||
<br /> | ||
</main> |