Pop Update
Features: * Komplettes kabelmanagement auf Rack He Modul Basis
This commit is contained in:
@@ -278,7 +278,7 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
</div>
|
||||
<div class="modal fade" id="rackModal" tabindex="-1" role="dialog" aria-labelledby="rackModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="rackModalLabel">Schrank</h5>
|
||||
@@ -332,7 +332,7 @@ if (!empty(trim($pops->vlan_ipv6)))
|
||||
|
||||
<div class="modal fade " id="rackModuleModal" tabindex="-1" role="dialog" aria-labelledby="rackModuleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="rackModuleModalLabel">Modul hinzufügen</h5>
|
||||
|
||||
@@ -75,7 +75,7 @@ class PoprackModel
|
||||
$items[$counter]['rack']['he'] = $data['he'];
|
||||
$modulecounter = 0;
|
||||
}
|
||||
if ($data['modulname']) {
|
||||
// if ($data['modulname']) {
|
||||
if ($data['device_id']) {
|
||||
$items[$counter]['modules'][$data['moduleside']][$data['start_he']]['slots'][$data['moduleid']]['device_id'] = $data['device_id'];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class PoprackmoduleAddFieldStatus extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Poprackmodule");
|
||||
$table->addColumn("status", "enum", ['values' => ['productive', 'planned'],'null' => false,'default' => 'front', "after" => "side"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("Poprackmodule")->removeColumn("status")->save();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
41
db/migrations/20251012100137_poprackmodulecable.php
Normal file
41
db/migrations/20251012100137_poprackmodulecable.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class Poprackmodulecable extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("Poprackmodulecable", ["signed" => true]);
|
||||
|
||||
$table->addColumn("poprackmodule_id", "integer", ["null" => false]);
|
||||
$table->addColumn("cable_name", "", ["null" => false]);
|
||||
$table->addColumn("port_start", "integer", ["null" => false]);
|
||||
$table->addColumn("port_end", "integer", ["null" => false]);
|
||||
$table->addColumn("fiber_start", "integer", ["null" => true]);
|
||||
$table->addColumn("fiber_end", "integer", ["null" => true]);
|
||||
$table->addColumn("description", "text", ["null" => true]);
|
||||
$table->addColumn("create_by", "integer", ["null" => false]);
|
||||
$table->addColumn("edit_by", "integer", ["null" => false]);
|
||||
$table->addColumn("create", "integer", ["null" => false]);
|
||||
$table->addColumn("edit", "integer", ["null" => false]);
|
||||
$table->save();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$this->table("Poprackmodulecable")->drop()->save();
|
||||
}
|
||||
if ($this->getEnvironment() == "addressdb") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -261,7 +261,7 @@ $(document).ready(function () {
|
||||
var endhe = parseInt($.trim($('#module-he-start').val())) + parseInt($.trim($('#module-he-count').val())) - 1;
|
||||
|
||||
|
||||
if (!$.trim($('#module-name').val()) && $.trim($('#module-type').val()) != "1") {
|
||||
if (!$.trim($('#module-name').val()) && $.trim($('#module-type').val()) != "1" && $.trim($('#module-type').val()) != "0") {
|
||||
error = "Modul Name darf nicht leer sein";
|
||||
}
|
||||
if ($.trim($('#module-type').val()) == "1" && !$.trim($('#module-device-id').val())) {
|
||||
@@ -318,7 +318,7 @@ $(document).ready(function () {
|
||||
var rackid = trigger.closest('table').find('th').data('rackid');
|
||||
var error;
|
||||
let side = trigger.closest('tbody').data('side');
|
||||
if (!$.trim($('#module-name').val())) {
|
||||
if (!$.trim($('#module-name').val()) && $.trim($('#module-type').val()) != "1" && $.trim($('#module-type').val()) != "0") {
|
||||
error = "Modul Name darf nicht leer sein";
|
||||
}
|
||||
if (!error) {
|
||||
|
||||
Reference in New Issue
Block a user