Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust telemetry to meet requirements #406

Merged
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
23 changes: 13 additions & 10 deletions commands/status.bee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -284,22 +284,19 @@ function status_bee_callback($arguments, $options) {
array('value' => bt('Status')),
array('value' => $telemetry_status ? 'on' : 'off'),
);
if ($telemetry_status) {
$data_summary = json_encode(bee_telemetry_get_data());
}
else {
$data_summary = bt('None');
}
$rows[] = array(
array('value' => bt('Data')),
array('value' => $data_summary),
);
if ($telemetry_status) {
$rows[] = array(
array('value' => bt('Last sent')),
array('value' => $bee_telemetry_last),
);
}
if ($telemetry_status) {
$data_summary = json_encode(bee_telemetry_get_data());
}
else {
$data_summary = bt('None');
}
$data_string = " Data: $data_summary\n";

echo "\n";
return array(
Expand All @@ -312,6 +309,12 @@ function status_bee_callback($arguments, $options) {
'delimiter_right' => ' ',
),
),
array(
'type' => 'text',
'variables' => array(
'value' => $data_string,
),
),
);
}
else {
Expand Down
1 change: 1 addition & 0 deletions includes/telemetry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ function bee_telemetry_get_data() {
$data = array(
'bee' => array(
'version' => BEE_VERSION,
'bee_version' => BEE_VERSION,
'php_version' => PHP_VERSION,
'multisite' => !empty($_bee_multisites) ? 'Yes' : 'No',
),
Expand Down
Loading