Skip to content

Commit

Permalink
Merge pull request #234 from dbarzin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dbarzin authored Nov 27, 2024
2 parents 00f6179 + ed72460 commit 9c4e101
Show file tree
Hide file tree
Showing 14 changed files with 320 additions and 126 deletions.
4 changes: 0 additions & 4 deletions INSTALL.debian.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ Installer les packages avec composer

composer install

Publier tous les actifs publiables à partir des packages des fournisseurs

php artisan vendor:publish --all

## MariaDB

Installer MariaDB
Expand Down
4 changes: 0 additions & 4 deletions INSTALL.debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ Install packages with composer

composer install

Publish all publishable assets from vendor packages

php artisan vendor:publish --all

## MariaDB

Install MariaDB
Expand Down
4 changes: 0 additions & 4 deletions INSTALL.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ Installer les packages avec composer

composer install

Publier tous les actifs publiables à partir des packages des fournisseurs

php artisan vendor:publish --all

## MySQL

Installer MySQL
Expand Down
6 changes: 1 addition & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Recommended configuration

- OS : Ubuntu 22.04 LTS
- OS : Ubuntu 24.04 LTS
- RAM : 2G
- Disk : 30G
- VCPU 2
Expand Down Expand Up @@ -36,10 +36,6 @@ Install packages with composer :
mkdir -p bootstrap/cache
composer install

Publish all publishable assets from vendor packages

php artisan vendor:publish --all

## MySQL

Install MySQL
Expand Down
1 change: 1 addition & 0 deletions app/Models/Control.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Control extends Model
'attributes',
'model',
'action_plan',
'plan_date'
];

protected $dates = [
Expand Down
202 changes: 103 additions & 99 deletions composer.lock

Large diffs are not rendered by default.

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

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_auth_codes', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->unsignedBigInteger('user_id')->index();
$table->unsignedBigInteger('client_id');
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_auth_codes');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_access_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->unsignedBigInteger('client_id');
$table->string('name')->nullable();
$table->text('scopes')->nullable();
$table->boolean('revoked');
$table->timestamps();
$table->dateTime('expires_at')->nullable();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_access_tokens');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->string('access_token_id', 100)->index();
$table->boolean('revoked');
$table->dateTime('expires_at')->nullable();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_refresh_tokens');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_clients', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->string('name');
$table->string('secret', 100)->nullable();
$table->string('provider')->nullable();
$table->text('redirect');
$table->boolean('personal_access_client');
$table->boolean('password_client');
$table->boolean('revoked');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_clients');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_personal_access_clients', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('client_id');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_personal_access_clients');
}
};
60 changes: 55 additions & 5 deletions database/schema/mysql-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `action_measure`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `action_measure` (
`action_id` int(10) unsigned NOT NULL,
`measure_id` int(10) unsigned NOT NULL,
KEY `action_measure_action_id_foreign` (`action_id`),
KEY `action_measure_measure_id_foreign` (`measure_id`),
CONSTRAINT `action_measure_action_id_foreign` FOREIGN KEY (`action_id`) REFERENCES `actions` (`id`),
CONSTRAINT `action_measure_measure_id_foreign` FOREIGN KEY (`measure_id`) REFERENCES `measures` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `action_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `action_user` (
`action_id` int(10) unsigned NOT NULL,
`user_id` bigint(20) unsigned NOT NULL,
KEY `action_user_action_id_foreign` (`action_id`),
KEY `action_user_user_id_foreign` (`user_id`),
CONSTRAINT `action_user_action_id_foreign` FOREIGN KEY (`action_id`) REFERENCES `actions` (`id`),
CONSTRAINT `action_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `actions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `actions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`reference` varchar(32) DEFAULT NULL,
`type` varchar(32) DEFAULT NULL,
`criticity` int(11) NOT NULL,
`status` int(11) NOT NULL,
`scope` varchar(32) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`cause` text DEFAULT NULL,
`remediation` text DEFAULT NULL,
`control_id` int(10) unsigned DEFAULT NULL,
`creation_date` date DEFAULT NULL,
`due_date` date DEFAULT NULL,
`close_date` date DEFAULT NULL,
`justification` text DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `actions_control_id_foreign` (`control_id`),
CONSTRAINT `actions_control_id_foreign` FOREIGN KEY (`control_id`) REFERENCES `controls` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `attributes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
Expand Down Expand Up @@ -288,8 +337,9 @@ INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (20,'2024_06_27_123
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (21,'2024_07_02_101657_add_framework_to_domains',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2024_07_05_174735_clause_unique',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2024_10_01_181052_remove_clause',1);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2016_06_01_000001_create_oauth_auth_codes_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2016_06_01_000002_create_oauth_access_tokens_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2016_06_01_000003_create_oauth_refresh_tokens_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (27,'2016_06_01_000004_create_oauth_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (28,'2016_06_01_000005_create_oauth_personal_access_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (52,'2016_06_01_000001_create_oauth_auth_codes_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (53,'2016_06_01_000002_create_oauth_access_tokens_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (54,'2016_06_01_000003_create_oauth_refresh_tokens_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (55,'2016_06_01_000004_create_oauth_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (56,'2016_06_01_000005_create_oauth_personal_access_clients_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (61,'2024_11_06_123808_add_actions',3);
2 changes: 1 addition & 1 deletion resources/views/radar/domains.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</tr>
@endforeach
</tbody>

</table>
</div>
</div>
</form>
Expand Down
7 changes: 3 additions & 4 deletions resources/views/search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<b>{{ trans("cruds.measure.title")}}</b> -
<a href="/alice/show/{{ $result['id'] }}">{{ $result['clause'] }}</a> : {{ $result["name"] }}
@elseif ($result['model']==='App\\Models\\Control')
<b>{{ trans("cruds.control.title_singular")}}</b> - {{ $result["name"] }}
@if (array_key_exists("realisation_date",$result))
- <a href="/bob/show/{{ $result['id'] }}">{{ $result["plan_date"] }}</a>
@endif
<b>{{ trans("cruds.control.title_singular")}}</b> -
{{ $result["name"] }} -
<a href="/bob/show/{{ $result['id'] }}">{{ $result["plan_date"] }}</a>
@endif
<br>
@endforeach
Expand Down

0 comments on commit 9c4e101

Please sign in to comment.