Skip to content

Commit

Permalink
add v3.7.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwang401 committed Feb 26, 2023
1 parent 758fb32 commit f3f2e40
Show file tree
Hide file tree
Showing 39 changed files with 780 additions and 658 deletions.
94 changes: 56 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.

## v3.7.0-beta

### Fixed

- Overallocation check logic whenever an administrator tries to update a server's build #16
- Issue where you can't use IPv6 for nameservers

### Changed

- Made account_password required by default for creating new servers and server installations
- Refactored all settings pages
- Refactored menu component to reduce bundle size
- Refactored Server Usages and Rate Limit sync for better scaling
- Minor frontend styling
- Refactored disk data transfer object
- All password inputs (except for Convoy user account password) has these two validation rules:
1. `/^[A-Za-z0-9!@#$%^&*()_+\-=[\]{}|;\':",.\/<>?\\ ]*$/` for checking if the password contains only characters on
the U.S. English keyboard.
2. `/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/` for checking if the password contains 8
characters, 1 uppercase, 1 lowercase, 1 number and 1 special character.

### Added

Expand All @@ -31,7 +42,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.

### Note

If you are developing automation software for Convoy, please implement these regular expressions in your code. Otherwise, your code will error when you send invalid requests.
If you are developing automation software for Convoy, please implement these regular expressions in your code.
Otherwise, your code will error when you send invalid requests.

- server `account_password` validation
- `/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/` to detect special characters from other language
- `/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u` minimum password requirements
Expand Down Expand Up @@ -70,132 +83,137 @@ If you are developing automation software for Convoy, please implement these reg

### Changed

- Settings layout for client side server settings
- Settings layout for client side server settings

### Fixed

- possibility that `address_ids` will cause an exception when it's null when creating a new server
- possibility that `address_ids` will cause an exception when it's null when creating a new server

## v3.4.0-beta

### Changed

- Refactored routes
- Refactored routes

### Added

- Navigation Bar Context. Now switching pages are even more seamless
- Navigation Bar Context. Now switching pages are even more seamless

## v3.3.0-beta

### Fixed

- Lack of cancel button when deleting an API key
- Lack of cancel button when deleting an API key

### Added

- Ability for administrators to impersonate the client view for a server and also visit the server's configuration in the admin area.
- Warnings when creating a new node to disable privilege separation and grant root permissions.
- Ability for administrators to impersonate the client view for a server and also visit the server's configuration in
the admin area.
- Warnings when creating a new node to disable privilege separation and grant root permissions.

## v3.2.0-beta

### Fixed

- Broken network syncing when updating an address's assigned server
- Text alignment for server counter on the users table in the admin area
- Broken network syncing when updating an address's assigned server
- Text alignment for server counter on the users table in the admin area

### Added

- Hyperlinks to the owner on the servers table
- Hyperlinks to the owner on the servers table

## v3.1.2-beta

### Fixed

- Scoped routing bindings in RouteServiceProvider that were breaking some routes
- Scoped routing bindings in RouteServiceProvider that were breaking some routes

## v3.1.1-beta

### Fixed

- Conflicting named routes that would break route optimization/caching
- Conflicting named routes that would break route optimization/caching

## v3.1.0-beta

### Fixed

- IP Address updating
- Server build updating
- IP Address updating
- Server build updating

### Removed

- Option to sync or not sync network settings when deleting an IP address
- The default behavior is always to sync
- Option to sync or not sync network settings when deleting an IP address
- The default behavior is always to sync

## v3.0.0-beta (Tuxedo)

### Fixed

- Server installs
- a bunch of other stuff
- Server installs
- a bunch of other stuff

### Changed

- from proprietary hard-coded api tokens to Bearer tokens for the application/external api
- the whole entire frontend
- from proprietary hard-coded api tokens to Bearer tokens for the application/external api
- the whole entire frontend

### Added

- Server hostnames
- Node location grouping
- Server hostnames
- Node location grouping

### Notes

- This release is so big that I can't really summarize everything
- This release is so big that I can't really summarize everything

![The maxwell cat meme is the mascot for v3](https://imgur.com/mowvogE.png)

## v2.0.3-beta

### Fixed

- Inability to delete IP address from the admin user interface
- Inability to delete IP address from the admin user interface

## v2.0.2-beta

### Fixed

- FQDN validator for the hostname field when adding a new node
- FQDN validator for the hostname field when adding a new node

## v2.0.1-beta

### Fixed

- Problem where validation errors for the SSH key wouldn't show up
- Bug where user couldn't unset a SSH key after saving one
- Problem where validation errors for the SSH key wouldn't show up
- Bug where user couldn't unset a SSH key after saving one

## v2.0.0-beta (Bombay)

### Added

- Storing of CPU, memory, disk, snapshots, backups, and bandwidth limits
- Added server suspensions
- Added real-time status updates of server installs (though it will be deprecated in v3.x.x)
- Automatic bandwidth throttler when a user exceeds the bandwidth limit
- Storing of CPU, memory, disk, snapshots, backups, and bandwidth limits
- Added server suspensions
- Added real-time status updates of server installs (though it will be deprecated in v3.x.x)
- Automatic bandwidth throttler when a user exceeds the bandwidth limit

### Changed

- Internally, server details are now passed around the application using Laravel Data by Spatie. Though in v3.x.x, we are planning on switching to Data Transfer Objects by Spatie. We pulled the wrong package and didn't realize until one month in using the package LOL.
- Virtual machines are now limited to one disk. Multiple disks may be supported when a daemon is available in the future.
- The built-in web server is now Caddy instead of Nginx. This provides auto SSL out of the box.
- Internally, server details are now passed around the application using Laravel Data by Spatie. Though in v3.x.x, we
are planning on switching to Data Transfer Objects by Spatie. We pulled the wrong package and didn't realize until one
month in using the package LOL.
- Virtual machines are now limited to one disk. Multiple disks may be supported when a daemon is available in the
future.
- The built-in web server is now Caddy instead of Nginx. This provides auto SSL out of the box.

### Fixed

- The commands in the node viewing page for installing the VNC Broker and templates.
- The commands in the node viewing page for installing the VNC Broker and templates.

### Known Bugs

- The real-time server installation communication is known to be buggy and will be resolved in v3.x.x
- Editing the server field for IP Addresses will sometime result in the first server of the node to be used. This will be resolved in v3.x.x
- The real-time server installation communication is known to be buggy and will be resolved in v3.x.x
- Editing the server field for IP Addresses will sometime result in the first server of the node to be used. This will
be resolved in v3.x.x

![The Bombay cat breed is the mascot for v2](https://imgur.com/fP6oxn9.png)
2 changes: 1 addition & 1 deletion app/Console/Commands/Maintenance/PruneUsersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Convoy\Jobs\Node\PruneUsersJob;
use Convoy\Models\Node;
use Convoy\Services\Nodes\Access\UserPruneService;
use Convoy\Services\Nodes\UserPruneService;
use Illuminate\Console\Command;
use Illuminate\Console\View\Components\Task;

Expand Down
26 changes: 18 additions & 8 deletions app/Data/Server/Proxmox/Config/DiskData.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@

class DiskData extends Data
{
// public function __construct(
// #[In(['disk', 'media'])]
// public string $type,
// public string $name,
// public int $size,
// public ?string $display_name,
// )
// {
// }

public function __construct(
#[In(['disk', 'media'])]
public string $type,
public string $name,
public int $size,
public ?string $display_name,
)
{
}
public string $interface,
public bool $is_primary_disk,

public bool $is_media,
public ?string $media_name,

public int $size,
){}
}
12 changes: 12 additions & 0 deletions app/Data/Server/Proxmox/Config/MediaData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Convoy\Data\Server\Proxmox\Config;

use Spatie\LaravelData\Data;

class MediaData extends Data
{
public function __construct(
//
) {}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Convoy\Exceptions\Service\Server\Allocation;

use Convoy\Exceptions\ConvoyException;

class NoAvailableDiskInterfaceException extends ConvoyException
{
public function __construct()
{
parent::__construct('There is no available disk interface on the virtual machine to satisfy the request.');
}
}
6 changes: 3 additions & 3 deletions app/Http/Controllers/Client/Servers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function getBootOrder(Server $server)
$unconfiguredDevices = [];

foreach ($availableDevices as $device) {
if ($configuredDevices->where('name', '=', $device->name)->first() === null) {
array_push($unconfiguredDevices, $device->toArray());
if ($configuredDevices->where('interface', '=', $device->interface)->first() === null) {
array_push($unconfiguredDevices, $device);
}
}

Expand All @@ -124,7 +124,7 @@ public function getMedia(Request $request, Server $server)
}

$media = array_map(function ($iso) use ($disks) {
if ($disks->where('display_name', '=', $iso['name'])->first()) {
if ($disks->where('media_name', '=', $iso['name'])->first()) {
return [
'mounted' => true,
...$iso,
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/Admin/Nodes/StoreNodeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Convoy\Http\Requests\Admin\Nodes;

use Convoy\Models\Node;
use Convoy\Rules\Network\Fqdn;
use Convoy\Rules\Fqdn;
use Illuminate\Foundation\Http\FormRequest;

class StoreNodeRequest extends FormRequest
Expand Down
1 change: 0 additions & 1 deletion app/Http/Requests/Admin/Nodes/UpdateNodeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function rules()

public function withValidator(Validator $validator)
{

$validator->after(function (Validator $validator) {
$node = $this->parameter('node', Node::class);
// multiply memory by memory_overallocate (which indicates how much you can go over) percentage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ public function withValidator(Validator $validator)
// check if the memory and disk isn't exceeding the node limits
$node = Node::findOrFail($server->node_id)->load('servers');

$nodeMemoryLimit = ($node->memory * (($node->memory_overallocate / 100) + 1)) - $node->memory_allocated;
$nodeDiskLimit = ($node->disk * (($node->disk_overallocate / 100) + 1)) - $node->disk_allocated;
$nodeMemoryLimit = ($node->memory * (($node->memory_overallocate / 100) + 1)) - ($node->memory_allocated - $server->memory);
$nodeDiskLimit = ($node->disk * (($node->disk_overallocate / 100) + 1)) - ($node->disk_allocated - $server->disk);

$memory = intval($this->input('memory'));
$disk = intval($this->input('disk'));

if ($memory > $nodeMemoryLimit || $memory < 0) {
$validator->errors()->add('memory', 'The memory value exceeds the node\'s limit.');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Convoy\Http\Requests\FormRequest;
use Convoy\Models\Server;
use Convoy\Rules\Network\Hostname;
use Convoy\Rules\Hostname;

class UpdateGeneralInfoRequest extends FormRequest
{
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Requests/Admin/Servers/StoreServerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use Convoy\Models\IPAddress;
use Convoy\Models\Node;
use Convoy\Models\Server;
use Convoy\Rules\EnglishKeyboardCharacters;
use Convoy\Rules\Password;
use Illuminate\Validation\Validator;

/**
Expand Down Expand Up @@ -37,7 +39,7 @@ public function rules()
'limits.bandwidth' => $rules['bandwidth_limit'],
'limits.address_ids' => 'sometimes|nullable|array',
'limits.address_ids.*' => 'integer|exists:ip_addresses,id',
'account_password' => ['required', 'string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u', 'regex:/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/'],
'account_password' => ['required', 'string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters(),],
'should_create_server' => 'present|boolean',
'template_uuid' => 'required_if:create_server,1|string|exists:templates,uuid',
'start_on_completion' => 'present|boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use Convoy\Http\Requests\FormRequest;
use Convoy\Models\Server;
use Convoy\Models\Template;
use Convoy\Rules\EnglishKeyboardCharacters;
use Convoy\Rules\Password;

class ReinstallServerRequest extends FormRequest
{
Expand All @@ -27,7 +29,7 @@ public function rules()
{
return [
'template_uuid' => 'required|string|exists:templates,uuid',
'account_password' => ['required', 'string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u'],
'account_password' => ['required', 'string', 'min:8', 'max:191', new Password(), new EnglishKeyboardCharacters()],
'start_on_completion' => 'present|boolean',
];
}
Expand Down
Loading

0 comments on commit f3f2e40

Please sign in to comment.