mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Add telemetry to get insight into updates
This commit is contained in:
@@ -61,9 +61,9 @@ class UpdateController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Show page with update options.
|
* Show page with update options.
|
||||||
*
|
*
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @return Factory|View
|
* @return Factory|View
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
@@ -100,6 +100,11 @@ class UpdateController extends Controller
|
|||||||
$checkForUpdates = (int) $request->get('check_for_updates');
|
$checkForUpdates = (int) $request->get('check_for_updates');
|
||||||
$channel = $request->get('update_channel');
|
$channel = $request->get('update_channel');
|
||||||
$channel = in_array($channel, ['stable', 'beta', 'alpha'], true) ? $channel : 'stable';
|
$channel = in_array($channel, ['stable', 'beta', 'alpha'], true) ? $channel : 'stable';
|
||||||
|
|
||||||
|
// store as telemetry
|
||||||
|
app('telemetry')->feature('admin.update.channel', $channel);
|
||||||
|
app('telemetry')->feature('admin.update.permission', (string) $checkForUpdates);
|
||||||
|
|
||||||
app('fireflyconfig')->set('permission_update_check', $checkForUpdates);
|
app('fireflyconfig')->set('permission_update_check', $checkForUpdates);
|
||||||
app('fireflyconfig')->set('last_update_check', time());
|
app('fireflyconfig')->set('last_update_check', time());
|
||||||
app('fireflyconfig')->set('update_channel', $channel);
|
app('fireflyconfig')->set('update_channel', $channel);
|
||||||
|
Reference in New Issue
Block a user