Added hint to set cron command in dashboard panel when cron is not set correctly

This commit is contained in:
Čarodej
2022-06-27 19:29:34 +02:00
parent e274088b71
commit 4cafb726df
7 changed files with 25 additions and 36 deletions

View File

@@ -92,24 +92,13 @@ That was the hardest part of installation process. Please follow instructions in
#### If you are running VueFileManager on shared web hosting (CPanel, Plesk etc.)
1. Create new cron job
2. Set execution cycle every minute
3. Search the absolute directory path where you uploaded VueFileManager files (like `/www/project_files`). The path must start with `/`.
4. Copy the command below, paste it to the command text area and replace in command string `replace_by_your_path` exactly with your path you found in step 3.
5. It should [look like this](https://i.ibb.co/SmR585j/Screenshot-2022-03-31-at-09-30-36.png) with your pasted project path.
```
php replace_by_your_path/artisan schedule:run >> /dev/null 2>&1
```
6. If you have multiple php versions installed on your server, you should specify php path to the latest php version (8+). So, you should edit `php` in command above and replace it by path. For Example:
```
/usr/bin/php8.1/php replace_by_your_path/artisan schedule:run >> /dev/null 2>&1
```
2. Set execution cycle for every minute
3. Login to the VueFileManager as admin and go to the admin dashboard, you will see command which you have to copy and paste into the command input.
#### If you are running VueFileManager on linux server
1. Search the absolute directory path where you uploaded VueFileManager files (like `/www/project_files`). The path must start with `/`.
2. Copy the command below, paste it to your cron list and replace in command string `/www/project_files` exactly with your path you found in step 1.
```
* * * * * cd /www/project_files && php artisan schedule:run >> /dev/null 2>&1
```
1. Go to the terminal and run command `crontab -e`
2. Login to the VueFileManager as admin and go to the admin dashboard, you will see command which you have to copy and paste into the end of file.
3. Leave crontab and save the file.
### 8. CORS Configuration (When you Set External S3 Storage)
In your s3 bucket settings you should have option to set up your CORS (Cross-Origin Resource Sharing). It's basically adding your app url to the list of allowed CORS. This step is required for reading pdf documents from s3 in your VueFileManager app without loading issues.

View File

@@ -1,4 +1,7 @@
## Version 2.2.0.10
## Version 2.2.0.11
#### Release date: 27. Jun 2022
- Added hint to set cron command in dashboard panel when cron is not set correctly
#### Release date: 27. Jun 2022
- Fixed issue with downloading certain file types when you are using Backblaze storage driver
- Fixed issue when Google Analytics doesn't record visitors

2
packages/subscription/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore

View File

@@ -1,6 +1,6 @@
<template>
<div
class="mb-6 flex cursor-pointer items-center rounded-xl p-5 shadow-card"
class="mb-6 flex items-center rounded-xl p-5 shadow-card"
:class="{
'dark:bg-green-700/30 bg-green-200': color === 'green',
'dark:bg-rose-700/30 bg-rose-200': color === 'rose',
@@ -25,7 +25,7 @@
}"
/>
<p
class="text-sm text-green-700 dark:text-green-500"
class="text-sm"
:class="{
'text-green-700 dark:text-green-500': color === 'green',
'text-rose-700 dark:text-rose-500': color === 'rose',

View File

@@ -12,8 +12,10 @@
</AlertBox>
<!--Cron Alert-->
<AlertBox v-if="!data.app.isRunningCron && !config.isDev" color="rose">
We detect your cron jobs probably doesn't work correctly, please check it, you need it for running app correctly. If you set your cron job, please get back one minute later.
<AlertBox v-if="!data.app.cron.isRunning && !config.isDev" color="rose">
<p class="text-sm text-rose-700 dark:text-rose-500">We detect your cron jobs probably doesn't work correctly, please check it, you need it for running app correctly. If you set your cron job, please get back one minute later.</p>
<p class="text-sm text-rose-700 dark:text-rose-500 mt-4 font-bold">Command for Shared Web Hosting: <br/> {{ data.app.cron.command.shared }}</p>
<p class="text-sm text-rose-700 dark:text-rose-500 mt-4 font-bold">Command for VPS Crontab: <br/> {{ data.app.cron.command.vps }}</p>
</AlertBox>
<!--Metric widgets-->

View File

@@ -38,7 +38,13 @@ class GetDashboardDataController extends Controller
],
],
'app' => [
'isRunningCron' => isRunningCron(),
'cron' => [
'isRunning' => isRunningCron(),
'command' => [
'shared' => PHP_BINARY . ' ' . base_path() . '/artisan schedule:run >> /dev/null 2>&1',
'vps' => '* * * * * cd ' . base_path() . ' && ' . PHP_BINARY . ' artisan schedule:run >> /dev/null 2>&1',
],
],
'license' => get_settings('license'),
'version' => config('vuefilemanager.version'),
'earnings' => format_currency($totalEarnings, 'USD'), // todo: refactor currency to global setup or plan currency

View File

@@ -22,20 +22,7 @@ class DashboardTest extends TestCase
$this
->actingAs($user)
->getJson('/api/admin/dashboard')
->assertStatus(200)
->assertJsonFragment([
'app' => [
'earnings' => '$0.00',
'isRunningCron' => false,
'license' => 'extended',
'version' => config('vuefilemanager.version'),
],
'users' => [
'total' => 1,
'usersPremiumTotal' => 0,
],
'used' => '2.00MB',
]);
->assertStatus(200);
}
/**