<?php

use yii\bootstrap\Alert;

if (Yii::$app->session->getFlash('message') != null) {
    echo Alert::widget([
        'options' => [
            'class' => 'alert-info',
        ],
        'body' => Yii::$app->session->getFlash('message'),
    ]);
}

use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\GridView;
use yii\widgets\Menu;
use yii\bootstrap\Tabs;
use yii\widgets\ActiveForm;
use yii\bootstrap\Button;
use yii\bootstrap\Nav;

$this->title = 'Traceroute';
$this->params['breadcrumbs'] = [
    'Mikrotik',
    $this->title,
];
?>
<div class="site-plugins">
    <div class="row">
        <div class="col-lg-3">
            <?php
            echo Menu::widget($menu);
            ?> 
        </div>
        <div class="col-md-9">
            <h1 style="margin-top: 0px"><?= Html::encode($this->title) ?></h1>
            <?php
            $item['none'] = '';
            foreach ($items as $value) {
                $item[$value] = $value;
            }
            ?>


            <?php $form = ActiveForm::begin([]); ?>

            <?= $form->field($model, 'dst')->label('Traceroute To'); ?>
            <?= $form->field($model, 'interface')->dropDownList($item); ?>
            <?= $form->field($model, 'size')->label('Packet Size'); ?>
            <?= $form->field($model, 'timeout')->label('Timeout'); ?>
            <?= $form->field($model, 'protocol')->dropDownList(['icmp' => 'icmp', 'udp' => 'udp']); ?>


            <?= Html::submitButton('OK', ['class' => 'btn btn-primary']) ?>

            <?= $form->field($model, 'response')->textarea(['style' => 'width: 850px; height: 400px;word-wrap:break-word;', 'readonly' => true]) ?>
            <?php
            ActiveForm::end();
            ?>



        </div>
    </div>
</div>



