Compare commits
4 commits
shift-1309
...
develop
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bdc9c413e2 | ||
![]() |
2b16841702 | ||
![]() |
1d6390ddd6 | ||
![]() |
3eb3c7e746 |
1075 changed files with 14091 additions and 30468 deletions
2
.env.ci
2
.env.ci
|
@ -15,7 +15,7 @@ DB_DATABASE=convoy
|
|||
DB_USERNAME=convoy_user
|
||||
DB_PASSWORD=YzLa2BCBwDGWVkpG
|
||||
|
||||
CACHE_STORE=redis
|
||||
CACHE_DRIVER=redis
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=redis
|
||||
SESSION_DRIVER=redis
|
||||
|
|
|
@ -4,9 +4,9 @@ APP_KEY=
|
|||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_TIMEZONE=UTC
|
||||
APP_LOCALE=en
|
||||
APP_MAINTENANCE_DRIVER=cache
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=database
|
||||
|
@ -15,7 +15,7 @@ DB_DATABASE=convoy
|
|||
DB_USERNAME=convoy_user
|
||||
DB_PASSWORD=
|
||||
|
||||
CACHE_STORE=redis
|
||||
CACHE_DRIVER=redis
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=redis
|
||||
SESSION_DRIVER=redis
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
APP_NAME=Convoy
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_TIMEZONE=UTC
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
APP_MAINTENANCE_STORE=database
|
||||
BCRYPT_ROUNDS=12
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=database
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=convoy
|
||||
DB_USERNAME=convoy_user
|
||||
DB_PASSWORD=
|
||||
|
||||
CACHE_STORE=redis
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=redis
|
||||
SESSION_DRIVER=redis
|
||||
SESSION_LIFETIME=525600
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailhog
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
PHP_XDEBUG=false
|
||||
PHP_XDEBUG_MODE='debug'
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
@ -45,7 +45,6 @@ jobs:
|
|||
files_to_include=(
|
||||
".editorconfig"
|
||||
".env.example"
|
||||
".env.full_example"
|
||||
".gitattributes"
|
||||
".gitignore"
|
||||
".prettierignore"
|
||||
|
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -19,10 +19,4 @@ _ide_*.php
|
|||
stats.html
|
||||
.fleet
|
||||
lang/php_*.json
|
||||
/resources/scripts/routeTree.gen.ts
|
||||
.DS_Store
|
||||
._.DS_Store
|
||||
**/.DS_Store
|
||||
**/._.DS_Store
|
||||
.php-cs-fixer.cache
|
||||
.phpunit.cache
|
|
@ -1,165 +0,0 @@
|
|||
<?php
|
||||
|
||||
use PhpCsFixer\Config;
|
||||
use PhpCsFixer\Finder;
|
||||
|
||||
$rules = [
|
||||
'array_indentation' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
'binary_operator_spaces' => [
|
||||
'default' => 'single_space',
|
||||
'operators' => ['=>' => null],
|
||||
],
|
||||
'blank_line_after_namespace' => true,
|
||||
'blank_line_after_opening_tag' => true,
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => ['return'],
|
||||
],
|
||||
'braces' => true,
|
||||
'cast_spaces' => true,
|
||||
'class_attributes_separation' => [
|
||||
'elements' => [
|
||||
'const' => 'one',
|
||||
'method' => 'one',
|
||||
'property' => 'one',
|
||||
'trait_import' => 'none',
|
||||
],
|
||||
],
|
||||
'class_definition' => [
|
||||
'multi_line_extends_each_single_line' => true,
|
||||
'single_item_single_line' => true,
|
||||
'single_line' => true,
|
||||
],
|
||||
'concat_space' => [
|
||||
'spacing' => 'none',
|
||||
],
|
||||
'constant_case' => ['case' => 'lower'],
|
||||
'declare_equal_normalize' => true,
|
||||
'elseif' => true,
|
||||
'encoding' => true,
|
||||
'full_opening_tag' => true,
|
||||
'fully_qualified_strict_types' => true, // added by Shift
|
||||
'function_declaration' => true,
|
||||
'function_typehint_space' => true,
|
||||
'general_phpdoc_tag_rename' => true,
|
||||
'heredoc_to_nowdoc' => true,
|
||||
'include' => true,
|
||||
'increment_style' => ['style' => 'post'],
|
||||
'indentation_type' => true,
|
||||
'linebreak_after_opening_tag' => true,
|
||||
'line_ending' => true,
|
||||
'lowercase_cast' => true,
|
||||
'lowercase_keywords' => true,
|
||||
'lowercase_static_reference' => true, // added from Symfony
|
||||
'magic_method_casing' => true, // added from Symfony
|
||||
'magic_constant_casing' => true,
|
||||
'method_argument_space' => [
|
||||
'on_multiline' => 'ignore',
|
||||
],
|
||||
'multiline_whitespace_before_semicolons' => [
|
||||
'strategy' => 'no_multi_line',
|
||||
],
|
||||
'native_function_casing' => true,
|
||||
'no_alias_functions' => true,
|
||||
'no_extra_blank_lines' => [
|
||||
'tokens' => [
|
||||
'extra',
|
||||
'throw',
|
||||
'use',
|
||||
],
|
||||
],
|
||||
'no_blank_lines_after_class_opening' => true,
|
||||
'no_blank_lines_after_phpdoc' => true,
|
||||
'no_closing_tag' => true,
|
||||
'no_empty_phpdoc' => true,
|
||||
'no_empty_statement' => true,
|
||||
'no_leading_import_slash' => true,
|
||||
'no_leading_namespace_whitespace' => true,
|
||||
'no_mixed_echo_print' => [
|
||||
'use' => 'echo',
|
||||
],
|
||||
'no_multiline_whitespace_around_double_arrow' => true,
|
||||
'no_short_bool_cast' => true,
|
||||
'no_singleline_whitespace_before_semicolons' => true,
|
||||
'no_spaces_after_function_name' => true,
|
||||
'no_spaces_around_offset' => [
|
||||
'positions' => ['inside', 'outside'],
|
||||
],
|
||||
'no_spaces_inside_parenthesis' => true,
|
||||
'no_trailing_comma_in_list_call' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_trailing_whitespace' => true,
|
||||
'no_trailing_whitespace_in_comment' => true,
|
||||
'no_unneeded_control_parentheses' => [
|
||||
'statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield'],
|
||||
],
|
||||
'no_unreachable_default_argument_value' => true,
|
||||
'no_useless_return' => true,
|
||||
'no_whitespace_before_comma_in_array' => true,
|
||||
'no_whitespace_in_blank_line' => true,
|
||||
'normalize_index_brace' => true,
|
||||
'not_operator_with_successor_space' => true,
|
||||
'object_operator_without_whitespace' => true,
|
||||
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
||||
'psr_autoloading' => true,
|
||||
'phpdoc_indent' => true,
|
||||
'phpdoc_inline_tag_normalizer' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_no_useless_inheritdoc' => true,
|
||||
'phpdoc_scalar' => true,
|
||||
'phpdoc_single_line_var_spacing' => true,
|
||||
'phpdoc_summary' => false,
|
||||
'phpdoc_to_comment' => false, // override to preserve user preference
|
||||
'phpdoc_tag_type' => true,
|
||||
'phpdoc_trim' => true,
|
||||
'phpdoc_types' => true,
|
||||
'phpdoc_var_without_name' => true,
|
||||
'self_accessor' => true,
|
||||
'short_scalar_cast' => true,
|
||||
'simplified_null_return' => false, // disabled as "risky"
|
||||
'single_blank_line_at_eof' => true,
|
||||
'single_blank_line_before_namespace' => true,
|
||||
'single_class_element_per_statement' => [
|
||||
'elements' => ['const', 'property'],
|
||||
],
|
||||
'single_import_per_statement' => true,
|
||||
'single_line_after_imports' => true,
|
||||
'single_line_comment_style' => [
|
||||
'comment_types' => ['hash'],
|
||||
],
|
||||
'single_quote' => true,
|
||||
'space_after_semicolon' => true,
|
||||
'standardize_not_equals' => true,
|
||||
'switch_case_semicolon_to_colon' => true,
|
||||
'switch_case_space' => true,
|
||||
'ternary_operator_spaces' => true,
|
||||
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
|
||||
'trim_array_spaces' => true,
|
||||
'unary_operator_spaces' => true,
|
||||
'visibility_required' => [
|
||||
'elements' => ['method', 'property'],
|
||||
],
|
||||
'whitespace_after_comma_in_array' => true,
|
||||
];
|
||||
|
||||
|
||||
$finder = Finder::create()
|
||||
->in([
|
||||
__DIR__ . '/app',
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/database',
|
||||
__DIR__ . '/resources',
|
||||
__DIR__ . '/routes',
|
||||
__DIR__ . '/tests',
|
||||
])
|
||||
->name('*.php')
|
||||
->notName('*.blade.php')
|
||||
->ignoreDotFiles(true)
|
||||
->ignoreVCS(true);
|
||||
|
||||
return (new Config())
|
||||
->setFinder($finder)
|
||||
->setRules($rules)
|
||||
->setRiskyAllowed(true)
|
||||
->setUsingCache(true);
|
|
@ -1,37 +1,29 @@
|
|||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSameLine": false,
|
||||
"bracketSpacing": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxSingleQuote": true,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "consistent",
|
||||
"requirePragma": false,
|
||||
"semi": false,
|
||||
"singleAttributePerLine": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false,
|
||||
"vueIndentScriptAndStyle": false,
|
||||
"tabWidth": 4,
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true,
|
||||
"importOrder": [
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"^@/lib/(.*)$",
|
||||
"^@/api/(.*)$",
|
||||
"^@/components/layouts/(.*)$",
|
||||
"^@/components/interfaces/(.*)$",
|
||||
"^@/components/ui/(.*)$",
|
||||
"^@/components/(.*)$",
|
||||
"^@/assets/(.*)$",
|
||||
"^[./]"
|
||||
],
|
||||
"plugins": [
|
||||
"@trivago/prettier-plugin-sort-imports",
|
||||
"prettier-plugin-tailwindcss"
|
||||
]
|
||||
"arrowParens": "avoid",
|
||||
"bracketSameLine": false,
|
||||
"bracketSpacing": true,
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxSingleQuote": true,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "consistent",
|
||||
"requirePragma": false,
|
||||
"semi": false,
|
||||
"singleAttributePerLine": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false,
|
||||
"vueIndentScriptAndStyle": false,
|
||||
"tabWidth": 4,
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true,
|
||||
"importOrder": [
|
||||
"^@/api/(.*)$",
|
||||
"^@/components/elements/(.*)$",
|
||||
"^@/components/(.*)$",
|
||||
"^[./]"
|
||||
],
|
||||
"plugins": ["@trivago/prettier-plugin-sort-imports"]
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
namespace Convoy\Actions\Fortify;
|
||||
|
||||
use App\Models\User;
|
||||
use Convoy\Models\User;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Laravel\Fortify\Contracts\CreatesNewUsers;
|
||||
|
||||
class CreateNewUser implements CreatesNewUsers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
namespace Convoy\Actions\Fortify;
|
||||
|
||||
use Laravel\Fortify\Rules\Password;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
namespace Convoy\Actions\Fortify;
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
namespace Convoy\Actions\Fortify;
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Fortify;
|
||||
namespace Convoy\Actions\Fortify;
|
||||
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
|
||||
|
||||
class UpdateUserProfileInformation implements UpdatesUserProfileInformation
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Casts;
|
||||
namespace Convoy\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
|
||||
class StorageSizeCast implements CastsAttributes
|
||||
class MebibytesToAndFromBytes implements CastsAttributes
|
||||
{
|
||||
/**
|
||||
* Cast the given value.
|
||||
*/
|
||||
public function get(Model $model, string $key, mixed $value, array $attributes): ?int
|
||||
{
|
||||
return $value >= 0 ? $value * 1048576 : -1; // Convert from megabytes to bytes
|
||||
return !is_null($value) ? $value * 1048576 : $value; // Convert from megabytes to bytes
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,8 +20,6 @@ class StorageSizeCast implements CastsAttributes
|
|||
*/
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): ?int
|
||||
{
|
||||
return $value >= 0 ? intval(
|
||||
floor($value / 1048576),
|
||||
) : -1; // Convert from bytes to megabytes to prevent overflow
|
||||
return !is_null($value) ? intval(floor($value / 1048576)) : $value; // Convert from bytes to megabytes to prevent overflow
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Casts;
|
||||
namespace Convoy\Casts;
|
||||
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
|
||||
|
||||
class NullableEncrypter implements CastsAttributes
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ class NullableEncrypter implements CastsAttributes
|
|||
*/
|
||||
public function get(Model $model, string $key, mixed $value, array $attributes): ?string
|
||||
{
|
||||
return ! empty($value) ? app(Encrypter::class)->decrypt($value) : null;
|
||||
return !empty($value) ? app(Encrypter::class)->decrypt($value) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,6 @@ class NullableEncrypter implements CastsAttributes
|
|||
*/
|
||||
public function set(Model $model, string $key, mixed $value, array $attributes): ?string
|
||||
{
|
||||
return ! empty($value) ? app(Encrypter::class)->encrypt($value) : null;
|
||||
return !empty($value) ? app(Encrypter::class)->encrypt($value) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands\Maintenance;
|
||||
namespace Convoy\Console\Commands\Maintenance;
|
||||
|
||||
use App\Repositories\Eloquent\BackupRepository;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Console\Command;
|
||||
use InvalidArgumentException;
|
||||
use Illuminate\Console\Command;
|
||||
use Convoy\Repositories\Eloquent\BackupRepository;
|
||||
|
||||
class PruneOrphanedBackupsCommand extends Command
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands\Maintenance;
|
||||
namespace Convoy\Console\Commands\Maintenance;
|
||||
|
||||
use App\Jobs\Node\PruneUsersJob;
|
||||
use App\Models\Node;
|
||||
use Convoy\Models\Node;
|
||||
use Illuminate\Console\Command;
|
||||
use Convoy\Jobs\Node\PruneUsersJob;
|
||||
use Illuminate\Console\View\Components\Task;
|
||||
|
||||
class PruneUsersCommand extends Command
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands\Server;
|
||||
namespace Convoy\Console\Commands\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use Convoy\Models\Server;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ResetUsagesCommand extends Command
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands\Server;
|
||||
namespace Convoy\Console\Commands\Server;
|
||||
|
||||
use App\Jobs\Node\SyncServerRateLimitsJob;
|
||||
use App\Models\Node;
|
||||
use Convoy\Models\Node;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Console\View\Components\Task;
|
||||
use Convoy\Jobs\Node\SyncServerRateLimitsJob;
|
||||
|
||||
class UpdateRateLimitsCommand extends Command
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands\Server;
|
||||
namespace Convoy\Console\Commands\Server;
|
||||
|
||||
use App\Jobs\Node\SyncServerUsagesJob;
|
||||
use App\Models\Node;
|
||||
use Convoy\Models\Node;
|
||||
use Illuminate\Console\Command;
|
||||
use Convoy\Jobs\Node\SyncServerUsagesJob;
|
||||
use Illuminate\Console\View\Components\Task;
|
||||
|
||||
class UpdateUsagesCommand extends Command
|
||||
|
|
|
@ -23,13 +23,13 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||
SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace App\Console\Commands\User;
|
||||
namespace Convoy\Console\Commands\User;
|
||||
|
||||
use App\Exceptions\Model\DataValidationException;
|
||||
use App\Models\User;
|
||||
use Exception;
|
||||
use Convoy\Models\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Convoy\Exceptions\Model\DataValidationException;
|
||||
|
||||
class MakeUserCommand extends Command
|
||||
{
|
||||
|
|
48
app/Console/Kernel.php
Normal file
48
app/Console/Kernel.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Convoy\Console;
|
||||
|
||||
use Convoy\Models\ActivityLog;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Database\Console\PruneCommand;
|
||||
use Convoy\Console\Commands\Server\ResetUsagesCommand;
|
||||
use Convoy\Console\Commands\Server\UpdateUsagesCommand;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
use Convoy\Console\Commands\Maintenance\PruneUsersCommand;
|
||||
use Convoy\Console\Commands\Server\UpdateRateLimitsCommand;
|
||||
use Convoy\Console\Commands\Maintenance\PruneOrphanedBackupsCommand;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*/
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
$schedule->command('queue:prune-batches')->daily();
|
||||
|
||||
if (config('backups.prune_age')) {
|
||||
// Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted.
|
||||
$schedule->command(PruneOrphanedBackupsCommand::class)->everyThirtyMinutes();
|
||||
}
|
||||
|
||||
if (config('activity.prune_days')) {
|
||||
$schedule->command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily();
|
||||
}
|
||||
|
||||
$schedule->command(ResetUsagesCommand::class)->daily();
|
||||
$schedule->command(PruneUsersCommand::class)->daily();
|
||||
$schedule->command(UpdateUsagesCommand::class)->everyFiveMinutes();
|
||||
$schedule->command(UpdateRateLimitsCommand::class)->everyTenMinutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*/
|
||||
protected function commands(): void
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
|
||||
//require base_path('routes/console.php');
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Contracts\Repository;
|
||||
namespace Convoy\Contracts\Repository;
|
||||
|
||||
use App\Models\ActivityLog;
|
||||
use App\Models\Server;
|
||||
use Convoy\Models\Server;
|
||||
use Convoy\Models\ActivityLog;
|
||||
|
||||
interface ActivityRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App\Contracts\Repository;
|
||||
namespace Convoy\Contracts\Repository;
|
||||
|
||||
use App\Exceptions\Model\DataValidationException;
|
||||
use App\Exceptions\Repository\RecordNotFoundException;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Convoy\Exceptions\Model\DataValidationException;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Convoy\Exceptions\Repository\RecordNotFoundException;
|
||||
|
||||
interface RepositoryInterface
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Contracts\Repository;
|
||||
namespace Convoy\Contracts\Repository;
|
||||
|
||||
use App\Exceptions\Repository\RecordNotFoundException;
|
||||
use App\Models\Server;
|
||||
use Convoy\Models\Server;
|
||||
use Convoy\Exceptions\Repository\RecordNotFoundException;
|
||||
|
||||
interface ServerRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Helpers;
|
||||
namespace Convoy\Data\Helpers;
|
||||
|
||||
use App\Enums\Helpers\ChecksumAlgorithm;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Enums\Helpers\ChecksumAlgorithm;
|
||||
|
||||
class ChecksumData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $checksum,
|
||||
public string $checksum,
|
||||
public ChecksumAlgorithm $algorithm,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Access;
|
||||
namespace Convoy\Data\Node\Access;
|
||||
|
||||
use App\Enums\Node\Access\RealmType;
|
||||
use Carbon\Carbon;
|
||||
use Spatie\LaravelData\Attributes\Validation\Max;
|
||||
use Spatie\LaravelData\Attributes\Validation\Min;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Convoy\Enums\Node\Access\RealmType;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
use Spatie\LaravelData\Attributes\Validation\Min;
|
||||
use Spatie\LaravelData\Attributes\Validation\Max;
|
||||
|
||||
class CreateUserData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
#[WithCast(EnumCast::class)]
|
||||
public RealmType $realm_type,
|
||||
public bool $enabled,
|
||||
public bool $enabled,
|
||||
#[Min(1), Max(60)]
|
||||
public ?string $username = null,
|
||||
public ?string $username = null,
|
||||
#[Min(1), Max(64)]
|
||||
public ?string $password = null,
|
||||
public ?Carbon $expires_at = null,
|
||||
) {
|
||||
public ?string $password = null,
|
||||
public ?Carbon $expires_at = null,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Access;
|
||||
namespace Convoy\Data\Node\Access;
|
||||
|
||||
use App\Enums\Node\Access\RealmType;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Enums\Node\Access\RealmType;
|
||||
|
||||
class UserCredentialsData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $username,
|
||||
public string $username,
|
||||
public RealmType $realm_type,
|
||||
public string $ticket,
|
||||
public string $csrf_token,
|
||||
) {
|
||||
public string $ticket,
|
||||
public string $csrf_token,
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function fromRaw(array $raw): self
|
||||
public static function fromRaw(array $raw): UserCredentialsData
|
||||
{
|
||||
return new self(...[
|
||||
'username' => explode('@', $raw['username'])[0],
|
||||
|
@ -24,4 +26,4 @@ class UserCredentialsData extends Data
|
|||
'csrf_token' => $raw['CSRFPreventionToken'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,33 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Access;
|
||||
namespace Convoy\Data\Node\Access;
|
||||
|
||||
use App\Enums\Node\Access\RealmType;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Arr;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Convoy\Enums\Node\Access\RealmType;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
|
||||
class UserData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $username,
|
||||
public ?string $email,
|
||||
public string $username,
|
||||
public ?string $email,
|
||||
#[WithCast(EnumCast::class)]
|
||||
public RealmType $realm_type,
|
||||
public bool $enabled,
|
||||
public ?Carbon $expires_at,
|
||||
) {
|
||||
public bool $enabled,
|
||||
public ?Carbon $expires_at,
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public static function fromRaw(array $raw): self
|
||||
public static function fromRaw(array $raw): UserData
|
||||
{
|
||||
return new self(...[
|
||||
'username' => explode('@', $raw['userid'])[0],
|
||||
'email' => Arr::get($raw, 'email'),
|
||||
'realm_type' => RealmType::from($raw['realm-type']),
|
||||
'enabled' => (bool) $raw['enable'],
|
||||
'enabled' => (bool)$raw['enable'],
|
||||
'expires_at' => Arr::get($raw, 'expire') ? Carbon::createFromTimestamp($raw['expire']) : null,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Storage;
|
||||
namespace Convoy\Data\Node\Storage;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -9,7 +9,8 @@ class FileMetaData extends Data
|
|||
public function __construct(
|
||||
public string $file_name,
|
||||
public string $mime_type,
|
||||
public int $size,
|
||||
) {
|
||||
public int $size,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Storage;
|
||||
namespace Convoy\Data\Node\Storage;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Spatie\LaravelData\Data;
|
||||
|
@ -8,9 +8,10 @@ use Spatie\LaravelData\Data;
|
|||
class IsoData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $file_name,
|
||||
public int $size,
|
||||
public string $file_name,
|
||||
public int $size,
|
||||
public CarbonInterface $created_at,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Node\Storage;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class StorageData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $name,
|
||||
public int $used,
|
||||
public int $free,
|
||||
public int $total,
|
||||
public bool $enabled,
|
||||
public bool $online,
|
||||
public bool $has_kvm,
|
||||
public bool $has_lxc,
|
||||
public bool $has_lxc_templates,
|
||||
public bool $has_backups,
|
||||
public bool $has_iso,
|
||||
public bool $has_snippets,
|
||||
) {
|
||||
}
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Deployments;
|
||||
namespace Convoy\Data\Server\Deployments;
|
||||
|
||||
use App\Data\Server\Eloquent\AddressData;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Data\Server\Eloquent\AddressData;
|
||||
|
||||
class CloudinitAddressConfigData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public ?AddressData $ipv4,
|
||||
public ?AddressData $ipv6,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Deployments;
|
||||
namespace Convoy\Data\Server\Deployments;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\Template;
|
||||
use Convoy\Models\Server;
|
||||
use Convoy\Models\Template;
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class ServerDeploymentData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public Server $server,
|
||||
public Server $server,
|
||||
public ?Template $template,
|
||||
public string $account_password,
|
||||
public bool $should_create_server,
|
||||
public bool $start_on_completion,
|
||||
) {
|
||||
public ?string $account_password,
|
||||
public bool $should_create_server,
|
||||
public bool $start_on_completion,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Eloquent;
|
||||
namespace Convoy\Data\Server\Eloquent;
|
||||
|
||||
use Spatie\LaravelData\Attributes\Validation\In;
|
||||
use Spatie\LaravelData\Attributes\Validation\IP;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Attributes\Validation\IP;
|
||||
use Spatie\LaravelData\Attributes\Validation\In;
|
||||
|
||||
class AddressData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public int $address_pool_id,
|
||||
public ?int $server_id,
|
||||
public int $id,
|
||||
public int $address_pool_id,
|
||||
public ?int $server_id,
|
||||
#[In(['ipv4', 'ipv6'])]
|
||||
public string $type,
|
||||
public string $type,
|
||||
#[IP]
|
||||
public string $address,
|
||||
public int $cidr,
|
||||
public string $gateway,
|
||||
public string $address,
|
||||
public int $cidr,
|
||||
public string $gateway,
|
||||
public ?string $mac_address,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Eloquent;
|
||||
namespace Convoy\Data\Server\Eloquent;
|
||||
|
||||
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\DataCollection;
|
||||
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
||||
|
||||
class ServerAddressesData extends Data
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ class ServerAddressesData extends Data
|
|||
public DataCollection $ipv4,
|
||||
#[DataCollectionOf(AddressData::class)]
|
||||
public DataCollection $ipv6,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Eloquent;
|
||||
namespace Convoy\Data\Server\Eloquent;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class ServerEloquentData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public string $uuid_short,
|
||||
public string $uuid,
|
||||
public int $node_id,
|
||||
public string $hostname,
|
||||
public string $name,
|
||||
public ?string $description,
|
||||
public ?string $status,
|
||||
public int $id,
|
||||
public string $uuid_short,
|
||||
public string $uuid,
|
||||
public int $node_id,
|
||||
public string $hostname,
|
||||
public string $name,
|
||||
public ?string $description,
|
||||
public ?string $status,
|
||||
public ServerUsagesData $usages,
|
||||
public ServerLimitsData $limits,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Eloquent;
|
||||
namespace Convoy\Data\Server\Eloquent;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class ServerLimitsData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $cpu,
|
||||
public int $memory,
|
||||
public int $disk,
|
||||
public ?int $snapshots,
|
||||
public ?int $backups,
|
||||
public ?int $bandwidth,
|
||||
public int $cpu,
|
||||
public int $memory,
|
||||
public int $disk,
|
||||
public ?int $snapshots,
|
||||
public ?int $backups,
|
||||
public ?int $bandwidth,
|
||||
public ServerAddressesData $addresses,
|
||||
public ?string $mac_address,
|
||||
) {
|
||||
public ?string $mac_address,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Eloquent;
|
||||
namespace Convoy\Data\Server\Eloquent;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -8,6 +8,7 @@ class ServerUsagesData extends Data
|
|||
{
|
||||
public function __construct(
|
||||
public int $bandwidth,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server;
|
||||
namespace Convoy\Data\Server;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -9,6 +9,7 @@ class MacAddressData extends Data
|
|||
public function __construct(
|
||||
public ?string $proxmox,
|
||||
public ?string $eloquent,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Config;
|
||||
namespace Convoy\Data\Server\Proxmox\Config;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -9,6 +9,7 @@ class AddressConfigData extends Data
|
|||
public function __construct(
|
||||
public ?AddressData $ipv4,
|
||||
public ?AddressData $ipv6,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Config;
|
||||
namespace Convoy\Data\Server\Proxmox\Config;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -8,8 +8,9 @@ class AddressData extends Data
|
|||
{
|
||||
public function __construct(
|
||||
public string $address,
|
||||
public int $cidr,
|
||||
public int $cidr,
|
||||
public string $gateway,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Config;
|
||||
namespace Convoy\Data\Server\Proxmox\Config;
|
||||
|
||||
use App\Enums\Server\DiskInterface;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Casts\EnumCast;
|
||||
use Convoy\Enums\Server\DiskInterface;
|
||||
use Spatie\LaravelData\Attributes\WithCast;
|
||||
|
||||
class DiskData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
#[WithCast(EnumCast::class)]
|
||||
public DiskInterface $interface,
|
||||
public bool $is_primary_disk,
|
||||
public bool $is_media,
|
||||
public ?string $media_name,
|
||||
public int $size,
|
||||
) {
|
||||
public bool $is_primary_disk,
|
||||
|
||||
public bool $is_media,
|
||||
public ?string $media_name,
|
||||
|
||||
public int $size,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Config;
|
||||
namespace Convoy\Data\Server\Proxmox\Config;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -8,6 +8,7 @@ class MediaData extends Data
|
|||
{
|
||||
public function __construct(
|
||||
//
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Config;
|
||||
namespace Convoy\Data\Server\Proxmox\Config;
|
||||
|
||||
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\DataCollection;
|
||||
use Spatie\LaravelData\Attributes\DataCollectionOf;
|
||||
|
||||
class ServerConfigData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public string $mac_address,
|
||||
public string $mac_address,
|
||||
#[DataCollectionOf(DiskData::class)]
|
||||
public DataCollection $boot_order,
|
||||
#[DataCollectionOf(DiskData::class)]
|
||||
public DataCollection $disks,
|
||||
/* public AddressConfigData $addresses */
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Console;
|
||||
namespace Convoy\Data\Server\Proxmox\Console;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class NoVncCredentialsData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $port,
|
||||
public int $port,
|
||||
public string $ticket,
|
||||
public string $pve_auth_cookie,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,18 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Console;
|
||||
namespace Convoy\Data\Server\Proxmox\Console;
|
||||
|
||||
use App\Enums\Node\Access\RealmType;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Enums\Node\Access\RealmType;
|
||||
|
||||
class XTermCredentialsData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $port,
|
||||
public string $ticket,
|
||||
public string $username,
|
||||
public int $port,
|
||||
public string $ticket,
|
||||
public string $username,
|
||||
public RealmType $realm_type,
|
||||
public string $pve_auth_cookie,
|
||||
) {
|
||||
public string $pve_auth_cookie,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox;
|
||||
namespace Convoy\Data\Server\Proxmox;
|
||||
|
||||
use App\Data\Server\Proxmox\Config\ServerConfigData;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Data\Server\Proxmox\Config\ServerConfigData;
|
||||
|
||||
class ServerProxmoxData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $id,
|
||||
public string $uuid_short,
|
||||
public string $uuid,
|
||||
public int $node_id,
|
||||
public string $state,
|
||||
public bool $locked,
|
||||
public int $id,
|
||||
public string $uuid_short,
|
||||
public string $uuid,
|
||||
public int $node_id,
|
||||
public string $state,
|
||||
public bool $locked,
|
||||
public ServerConfigData $config,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox;
|
||||
namespace Convoy\Data\Server\Proxmox;
|
||||
|
||||
use App\Enums\Server\State;
|
||||
use Spatie\LaravelData\Data;
|
||||
use Convoy\Enums\Server\State;
|
||||
|
||||
class ServerStateData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public State $state,
|
||||
public float $cpu_used,
|
||||
public int $memory_total,
|
||||
public int $memory_used,
|
||||
public int $uptime,
|
||||
) {
|
||||
public int $memory_total,
|
||||
public int $memory_used,
|
||||
public int $uptime,
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public static function fromRaw(array $raw)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Usages;
|
||||
namespace Convoy\Data\Server\Proxmox\Usages;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -9,6 +9,7 @@ class ServerDiskData extends Data
|
|||
public function __construct(
|
||||
public int $write,
|
||||
public int $read,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Usages;
|
||||
namespace Convoy\Data\Server\Proxmox\Usages;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
|
@ -9,6 +9,7 @@ class ServerNetworkData extends Data
|
|||
public function __construct(
|
||||
public int $in,
|
||||
public int $out,
|
||||
) {
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Usages;
|
||||
|
||||
use Carbon\CarbonImmutable;
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class ServerTimepointData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public float $cpu_used,
|
||||
public float $memory_used,
|
||||
public ServerNetworkData $network,
|
||||
public ServerDiskData $disk,
|
||||
public CarbonImmutable $timestamp,
|
||||
) {
|
||||
}
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Data\Server\Proxmox\Usages;
|
||||
namespace Convoy\Data\Server\Proxmox\Usages;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
class ServerUsagesData extends Data
|
||||
{
|
||||
public function __construct(
|
||||
public int $bandwidth,
|
||||
public int $bandwidth,
|
||||
public ServerNetworkData $network,
|
||||
public ServerDiskData $disk,
|
||||
) {
|
||||
public ServerDiskData $disk,
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Activity;
|
||||
namespace Convoy\Enums\Activity;
|
||||
|
||||
enum Status: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Api;
|
||||
namespace Convoy\Enums\Api;
|
||||
|
||||
enum ApiKeyType: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Helpers;
|
||||
namespace Convoy\Enums\Helpers;
|
||||
|
||||
enum ChecksumAlgorithm: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Network;
|
||||
namespace Convoy\Enums\Network;
|
||||
|
||||
enum AddressType: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Node\Access;
|
||||
namespace Convoy\Enums\Node\Access;
|
||||
|
||||
enum RealmType: string
|
||||
{
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Node\Storage;
|
||||
namespace Convoy\Enums\Node\Storage;
|
||||
|
||||
enum ContentType: string
|
||||
{
|
||||
case KVM_IMAGES = 'images';
|
||||
case LXC_DATA = 'rootdir';
|
||||
case LXC_TEMPLATES = 'vztmpl';
|
||||
case BACKUPS = 'backup';
|
||||
case ISO = 'iso';
|
||||
case SNIPPETS = 'snippets';
|
||||
case VZTMPL = 'vztmpl';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum AuthenticationType: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum BackupCompressionType: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum BackupMode: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum BiosType: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum ConsoleType: string
|
||||
{
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
|
||||
enum DeploymentType: string
|
||||
{
|
||||
case INSTALL = 'install';
|
||||
case REINSTALL = 'reinstall';
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum DiskInterface: string
|
||||
{
|
||||
|
|
9
app/Enums/Server/MetricParameter.php
Normal file
9
app/Enums/Server/MetricParameter.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum MetricParameter: string
|
||||
{
|
||||
case AVERAGE = 'AVERAGE';
|
||||
case MAX = 'MAX';
|
||||
}
|
12
app/Enums/Server/MetricTimeframe.php
Normal file
12
app/Enums/Server/MetricTimeframe.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum MetricTimeframe: string
|
||||
{
|
||||
case HOUR = 'hour';
|
||||
case DAY = 'day';
|
||||
case WEEK = 'week';
|
||||
case MONTH = 'month';
|
||||
case YEAR = 'year';
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum PowerAction: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum State: string
|
||||
{
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
|
||||
enum StatisticConsolidatorFunction: string
|
||||
{
|
||||
case AVERAGE = 'AVERAGE';
|
||||
case MAX = 'MAX';
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
|
||||
enum StatisticTimeRange: string
|
||||
{
|
||||
case HOUR_AGO = 'hour';
|
||||
case DAY_AGO = 'day';
|
||||
case WEEK_AGO = 'week';
|
||||
case MONTH_AGO = 'month';
|
||||
case YEAR_AGO = 'year';
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum Status: string
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Enums\Server;
|
||||
namespace Convoy\Enums\Server;
|
||||
|
||||
enum SuspensionAction: string
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Events\Activity;
|
||||
namespace Convoy\Events\Activity;
|
||||
|
||||
use App\Models\ActivityLog;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
use Convoy\Models\ActivityLog;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
abstract class Activity
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
namespace Convoy\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
namespace Convoy\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Throwable;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
use Throwable;
|
||||
|
||||
class DisplayException extends ConvoyException implements HttpExceptionInterface
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
namespace Convoy\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Http\Server;
|
||||
namespace Convoy\Exceptions\Http\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||
use Throwable;
|
||||
use Convoy\Models\Server;
|
||||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||
|
||||
class ServerStatusConflictException extends ConflictHttpException
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Model;
|
||||
namespace Convoy\Exceptions\Model;
|
||||
|
||||
use App\Exceptions\ConvoyException;
|
||||
use Illuminate\Contracts\Support\MessageProvider;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\MessageBag;
|
||||
use Convoy\Exceptions\ConvoyException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
use Illuminate\Contracts\Support\MessageProvider;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
|
||||
class DataValidationException extends ConvoyException implements HttpExceptionInterface, MessageProvider
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Repository\Eloquent;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
|
||||
class TooManyRootSnapshotsException extends DisplayException
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(
|
||||
'The snapshot tree can\'t be constructed because there are too many root snapshots.',
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Repository\Proxmox;
|
||||
namespace Convoy\Exceptions\Repository\Proxmox;
|
||||
|
||||
use App\Exceptions\Repository\RepositoryException;
|
||||
use Illuminate\Http\Client\RequestException;
|
||||
use Illuminate\Http\Client\Response;
|
||||
use Illuminate\Http\Client\RequestException;
|
||||
use Convoy\Exceptions\Repository\RepositoryException;
|
||||
|
||||
class ProxmoxConnectionException extends RepositoryException
|
||||
{
|
||||
public function __construct(Response $response, RequestException $exception)
|
||||
{
|
||||
parent::__construct($response->reason().PHP_EOL.$exception->getMessage().PHP_EOL.$exception->getTraceAsString(), $exception->getCode(), $exception);
|
||||
}
|
||||
public function __construct(Response $response, RequestException $exception)
|
||||
{
|
||||
parent::__construct($response->reason() . PHP_EOL . $exception->getMessage() . PHP_EOL . $exception->getTraceAsString(), $exception->getCode(), $exception);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Repository;
|
||||
namespace Convoy\Exceptions\Repository;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Repository;
|
||||
namespace Convoy\Exceptions\Repository;
|
||||
|
||||
use App\Exceptions\ConvoyException;
|
||||
use Convoy\Exceptions\ConvoyException;
|
||||
|
||||
class RepositoryException extends ConvoyException
|
||||
{
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Api;
|
||||
|
||||
use App\Exceptions\ConvoyException;
|
||||
namespace Convoy\Exceptions\Service\Api;
|
||||
use Throwable;
|
||||
use Convoy\Exceptions\ConvoyException;
|
||||
|
||||
class InvalidJWTException extends ConvoyException
|
||||
{
|
||||
|
@ -11,4 +10,4 @@ class InvalidJWTException extends ConvoyException
|
|||
{
|
||||
parent::__construct(message: 'Invalid JWT token', previous: $previous);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Backup;
|
||||
namespace Convoy\Exceptions\Service\Backup;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class BackupLockedException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Backup;
|
||||
namespace Convoy\Exceptions\Service\Backup;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class TooManyBackupsException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Deployment;
|
||||
namespace Convoy\Exceptions\Service\Deployment;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class InvalidTemplateException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Network;
|
||||
namespace Convoy\Exceptions\Service\Network;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class AddressInUseException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Node\IsoLibrary;
|
||||
namespace Convoy\Exceptions\Service\Node\IsoLibrary;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class InvalidIsoLinkException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Server\Allocation;
|
||||
namespace Convoy\Exceptions\Service\Server\Allocation;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class IsoAlreadyMountedException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Server\Allocation;
|
||||
namespace Convoy\Exceptions\Service\Server\Allocation;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class IsoAlreadyUnmountedException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Server\Allocation;
|
||||
namespace Convoy\Exceptions\Service\Server\Allocation;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class NoAvailableDiskInterfaceException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Server\Allocation;
|
||||
namespace Convoy\Exceptions\Service\Server\Allocation;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class NoUniqueUuidComboException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions\Service\Server\Allocation;
|
||||
namespace Convoy\Exceptions\Service\Server\Allocation;
|
||||
|
||||
use App\Exceptions\DisplayException;
|
||||
use Convoy\Exceptions\DisplayException;
|
||||
|
||||
class NoUniqueVmidException extends DisplayException
|
||||
{
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Extensions\Lcobucci\JWT\Validation;
|
||||
namespace Convoy\Extensions\Lcobucci\JWT\Validation;
|
||||
|
||||
use Carbon\CarbonImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use DateTimeImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Psr\Clock\ClockInterface;
|
||||
|
||||
class Clock implements ClockInterface
|
||||
{
|
||||
private CarbonInterface $date;
|
||||
|
||||
public function __construct(?CarbonInterface $date = null)
|
||||
{
|
||||
public function __construct(?CarbonInterface $date = null) {
|
||||
$this->date = $date ?? CarbonImmutable::now();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Extensions\Spatie\Fractal;
|
||||
|
||||
use League\Fractal\Serializer\ArraySerializer;
|
||||
|
||||
class RecursiveSerializer extends ArraySerializer
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function collection(?string $resourceKey, array $data): array
|
||||
{
|
||||
return ['data' => $data];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function item(?string $resourceKey, array $data): array
|
||||
{
|
||||
return ['data' => $data];
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively serialize included data
|
||||
*
|
||||
* @param string $resourceKey
|
||||
* @param array $data
|
||||
* @param array $includedData
|
||||
* @return array
|
||||
*/
|
||||
public function recursiveInclude($resourceKey, array $data, array $includedData): array
|
||||
{
|
||||
foreach ($includedData as $include) {
|
||||
if (isset($data[$include])) {
|
||||
$data[$include] = $this->recursiveInclude(
|
||||
$include,
|
||||
$data[$include],
|
||||
$includedData[$include],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges included data with transformed data recursively
|
||||
*
|
||||
* @param array $transformedData
|
||||
* @param array $includedData
|
||||
* @return array
|
||||
*/
|
||||
public function mergeIncludes(array $transformedData, array $includedData): array
|
||||
{
|
||||
$transformedData = parent::mergeIncludes($transformedData, $includedData);
|
||||
|
||||
// Recursively include any nested data
|
||||
foreach ($includedData as $key => $value) {
|
||||
if (isset($transformedData[$key])) {
|
||||
$transformedData[$key] = $this->recursiveInclude(
|
||||
$key,
|
||||
$transformedData[$key],
|
||||
$value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $transformedData;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Facades;
|
||||
namespace Convoy\Facades;
|
||||
|
||||
use App\Services\Activity\ActivityLogService;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Convoy\Services\Activity\ActivityLogService;
|
||||
|
||||
class Activity extends Facade
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Facades;
|
||||
namespace Convoy\Facades;
|
||||
|
||||
use App\Services\Activity\ActivityLogBatchService;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Convoy\Services\Activity\ActivityLogBatchService;
|
||||
|
||||
class LogBatch extends Facade
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Facades;
|
||||
namespace Convoy\Facades;
|
||||
|
||||
use App\Services\Activity\ActivityLogTargetableService;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Convoy\Services\Activity\ActivityLogTargetableService;
|
||||
|
||||
class LogTarget extends Facade
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
namespace Convoy\Helpers;
|
||||
|
||||
use App\Enums\Network\AddressType;
|
||||
use Convoy\Enums\Network\AddressType;
|
||||
use GMP;
|
||||
|
||||
function ipv6ToInteger(string $ip): GMP
|
||||
|
@ -42,4 +42,4 @@ function getAddressesFromRange(AddressType $type, string $from, string $to): arr
|
|||
}
|
||||
|
||||
return $addresses;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue