mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
NAC - Improve search in WebUI - Keep Historical data (#15629)
* search improvement for PortNac * rename func * style * DB migration for timestamps * style * rules * fix manually db_schema * remove vlan only search for now * add a bool column to ident historical nac entries * add columns to the table * queryByOui renamed everywhere * age value instead of delete * style * style * use Illuminate\Support\Facades\DB; * tests fix * module_tables.yaml * dump model instead of tests/module_tables.yaml * tests * testVrp * daily * config * display historical NAC entries in global view * same for NAC device page * nac tab on device/port view * and display the tab link if necessary * filter by port as well * historical data in port tab * formatters
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('ports_nac', function (Blueprint $table) {
|
||||
$table->timestamps();
|
||||
$table->boolean('historical')->default(0);
|
||||
});
|
||||
DB::table('ports_nac')->update(['created_at' => \Carbon\Carbon::now()]);
|
||||
DB::table('ports_nac')->update(['updated_at' => \Carbon\Carbon::now()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('ports_nac', function (Blueprint $table) {
|
||||
$table->dropColumn(['created_at', 'updated_at', 'historical']);
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user