<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
<?= $this->section('content') ?>
<?php if ($error = session('error')): echo $viewDatas['service']->getHelper()->alert($error) ?><?php endif ?>
<div id="container" class="content">
  <div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div>
  <table class="table table-bordered table-striped">
    <tr>
      <th width="50%">서버정보[<?= $viewDatas['entity']->getCode() ?>]</th>
      <th>추가정보</th>
    </tr>
    <tr>
      <td>
        <table class="table table-bordered table-hover table-striped">
          <?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
            <tr>
              <th nowrap class="text-end"><?= $viewDatas['service']->getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
              <td nowrap class="text-start">
                <?= $viewDatas['service']->getHelper()->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?>
                <span><?= validation_show_error($field); ?></span>
              </td>
            </tr>
          <?php endforeach; ?>
        </table>
      </td>
      <td>
        <div style="margin-top:10px">서버정보[<?= $viewDatas['serverEntity']->getCode() ?>]</div>
        <div>Model : <?= $viewDatas['serverEntity']->getTitle() ?></div>
        <div>IP : <?= $viewDatas['serverEntity']->getIP() ?></div>
        <div>OS : <?= $viewDatas['serverEntity']->getOS() ?></div>
        <div style="margin-top:10px">서버파트정보</div>
        <?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", [
          'serverinfo_uid' => $viewDatas['serverEntity']->getPK(),
          'types' => SERVERPART['ALL_PARTTYPES']
        ]) ?>
      </td>
    </tr>
  </table>
  <div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div>
</div>
<?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?>
<?= $this->endSection() ?>