diff --git a/web/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/web/app/Http/Middleware/PreventRequestsDuringMaintenance.php index d3fb161..aa2a98a 100644 --- a/web/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ b/web/app/Http/Middleware/PreventRequestsDuringMaintenance.php @@ -21,7 +21,7 @@ class PreventRequestsDuringMaintenance * * @var array */ - protected $except = []; + protected $except = ['banners/data']; /** * Create a new middleware instance. diff --git a/web/app/Models/FastGroup.php b/web/app/Models/FastGroup.php index a463240..b2041d7 100644 --- a/web/app/Models/FastGroup.php +++ b/web/app/Models/FastGroup.php @@ -5,7 +5,7 @@ namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -class FastGroup extends Model +class Fastgroup extends Model { use HasFactory; } diff --git a/web/database/migrations/2021_12_15_224204_create_fflags_table.php b/web/database/migrations/2021_12_15_224204_create_fflags_table.php index 1dd2ff6..6ba9868 100644 --- a/web/database/migrations/2021_12_15_224204_create_fflags_table.php +++ b/web/database/migrations/2021_12_15_224204_create_fflags_table.php @@ -17,8 +17,8 @@ class CreateFflagsTable extends Migration $table->id(); $table->string('name'); $table->string('value'); - $table->enum('dataType', ['Log', 'Int', 'String']); - $table->enum('type', ['Raw', 'Fast', 'Dynamic', 'Shared']); + $table->enum('dataType', ['Log', 'Int', 'String', 'Boolean']); + $table->enum('type', ['Unscoped', 'Fast', 'Dynamic', 'Synchronised']); $table->bigInteger('groupId'); $table->timestamps(); }); diff --git a/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php b/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php index 1ccf2dc..98339ba 100644 --- a/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php +++ b/web/database/migrations/2021_12_16_011850_create_fastgroups_table.php @@ -17,6 +17,7 @@ class CreateFastgroupsTable extends Migration $table->id(); $table->string('name'); $table->boolean('protected')->default(false); + $table->json('inheritedGroupIds')->default('[]'); $table->timestamps(); }); } diff --git a/web/database/seeders/DatabaseSeeder.php b/web/database/seeders/DatabaseSeeder.php index ed4c823..038af9a 100644 --- a/web/database/seeders/DatabaseSeeder.php +++ b/web/database/seeders/DatabaseSeeder.php @@ -16,7 +16,8 @@ class DatabaseSeeder extends Seeder public function run() { $this->call([ - WebStatusSeeder::class + WebStatusSeeder::class, + FFlagSeeder::class ]); } } diff --git a/web/database/seeders/FFlagSeeder.php b/web/database/seeders/FFlagSeeder.php index e9a48d6..4b02ad1 100644 --- a/web/database/seeders/FFlagSeeder.php +++ b/web/database/seeders/FFlagSeeder.php @@ -5,7 +5,7 @@ namespace Database\Seeders; use Illuminate\Database\Seeder; use App\Models\FFlag; -use App\Models\FastGroup; +use App\Models\Fastgroup; class FFlagSeeder extends Seeder { @@ -16,28 +16,43 @@ class FFlagSeeder extends Seeder */ public function run() { - $clientAppSettings = FastGroup::create([ - 'name' => 'ClientAppSettings' + $appSettingsCommon = Fastgroup::create([ + 'name' => 'AppSettingsCommon', + 'protected' => true ]); - $cloudAppSettings = FastGroup::create([ - 'name' => 'CloudCompute' + $clientAppSettings = Fastgroup::create([ + 'name' => 'ClientAppSettings', + 'inheritedGroupIds' => json_encode([ $appSettingsCommon->id ]) ]); - $clientSharedSettings = FastGroup::create([ + $cloudAppSettings = Fastgroup::create([ + 'name' => 'CloudCompute', + 'protected' => true, + 'inheritedGroupIds' => json_encode([ $appSettingsCommon->id ]) + ]); + + $clientSharedSettings = Fastgroup::create([ 'name' => 'ClientSharedSettings' ]); - $arbiterAppSettings = FastGroup::create([ + $arbiterAppSettings = Fastgroup::create([ 'name' => 'Arbiter' ]); - $windowsBootstrapperSettings = FastGroup::create([ - 'name' => 'WindowsBootstrapperSettings' + $bootstrapperCommon = Fastgroup::create([ + 'name' => 'BootstrapperCommon', + 'protected' => true ]); - $windowsStudioBootstrapperSettings = FastGroup::create([ - 'name' => 'WindowsStudioBootstrapperSettings' + $windowsBootstrapperSettings = Fastgroup::create([ + 'name' => 'WindowsBootstrapperSettings', + 'inheritedGroupIds' => json_encode([ $bootstrapperCommon->id ]) + ]); + + $windowsStudioBootstrapperSettings = Fastgroup::create([ + 'name' => 'WindowsStudioBootstrapperSettings', + 'inheritedGroupIds' => json_encode([ $bootstrapperCommon->id ]) ]); } } diff --git a/web/resources/js/layouts/App.js b/web/resources/js/layouts/App.js index 448a1fa..f35b0b6 100644 --- a/web/resources/js/layouts/App.js +++ b/web/resources/js/layouts/App.js @@ -53,7 +53,8 @@ class App extends React.Component { { axios.get(protocol + 'apis.' + url + '/') .then((response) => { - app.setState({maintenance: false}); + if(app.state.maintenance == true) + window.location.reload(); }) .catch((error) => { if (error.response) diff --git a/web/resources/views/javascript.blade.php b/web/resources/views/javascript.blade.php new file mode 100644 index 0000000..104a504 --- /dev/null +++ b/web/resources/views/javascript.blade.php @@ -0,0 +1,15 @@ +@extends('layouts.app', ['title' => 'JavaScript', 'jsPage' => true]) + +@section('content') +