<?php

$this->renderTabMenu('applianceCmd');

$this->widget('ext.PlGrid.PlGridView', array(
    'id' => 'process-grid',
    'enableHeaderTranslation' => false,
    'itemsCssClass' => 'plTable items',
    'dataProvider' => $model->getApplianceCmds(),
    'enableSearchButton' => false,
    'showAlertBlock' => true,
    'enableAddButton' => false,
    'summaryText' => false,
    'showNavbar' => false,
    'columns' => array(
        array(
            'header' => __('SYSTEM_OVERVIEW_PROCESS_STATUS_TITLE'),
            'headerHtmlOptions' => array('data-translation-id' => 'SYSTEM_OVERVIEW_PROCESS_STATUS_TITLE'),
            'type' => 'raw',
            'value' => array($this, 'renderProcessStatus'),
        ),
        array(
            'header' => __('SYSTEM_OVERVIEW_RESTART_PROCESS_BUTTON'),
            'headerHtmlOptions' => array('data-translation-id' => 'SYSTEM_OVERVIEW_RESTART_PROCESS_BUTTON'),
            'type' => 'raw',
            'value' => array($this, 'renderRestartProcessButtons'),
        ),
        array(
            'header' => __('SYSTEM_OVERVIEW_PROCESS_NAME'),
            'headerHtmlOptions' => array('data-translation-id' => 'SYSTEM_OVERVIEW_PROCESS_NAME'),
            'type' => 'raw',
            'value' => array($this, 'renderProcessName'),
        )
    ),
        )
);

$this->widget('ext.PlGrid.PlGridView', array(
    'id' => 'statistics-overview-grid',
    'enableHeaderTranslation' => false,
    'itemsCssClass' => 'plTable items',
    'dataProvider' => $model->shutdownRebootCmds(),
    'enableSearchButton' => false,
    'showAlertBlock' => true,
    'enableAddButton' => false,
    'summaryText' => false,
    'showNavbar' => false,
    'columns' => array(
        array(
            'type' => 'raw',
            'value' => array($this, 'renderSystemShutdownRebootBtn'),
        ),
        array(
            'type' => 'raw',
            'value' => array($this, 'renderSystemShutdownRebootName'),
        )
    ),
        )
);

if (Yii::app()->user->translateMode) {
    echo '<span data-translation-id="SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_RUNNING">SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_RUNNING: ' . __('SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_RUNNING') . '</span><br />';
    echo '<span data-translation-id="SYSTEM_OVERVIEW_PROCESS_STATUS_STARTING">SYSTEM_OVERVIEW_PROCESS_STATUS_STARTING: ' . __('SYSTEM_OVERVIEW_PROCESS_STATUS_STARTING') . '</span><br />';
    echo '<span data-translation-id="SYSTEM_OVERVIEW_PROCESS_STATUS_RUNNING">SYSTEM_OVERVIEW_PROCESS_STATUS_RUNNING: ' . __('SYSTEM_OVERVIEW_PROCESS_STATUS_RUNNING') . '</span><br />';
    echo '<span data-translation-id="SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_FOUND">SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_FOUND: ' . __('SYSTEM_OVERVIEW_PROCESS_STATUS_NOT_FOUND') . '</span><br />';
    
    echo '<span data-translation-id="SYSTEM_OVERVIEW_DIALOG_HEADER">SYSTEM_OVERVIEW_DIALOG_HEADER: ' . __('SYSTEM_OVERVIEW_DIALOG_HEADER') . '</span><br />';
    echo '<span data-translation-id="SYSTEM_OVERVIEW_DIALOG_TEXT">SYSTEM_OVERVIEW_DIALOG_TEXT: ' . __('SYSTEM_OVERVIEW_DIALOG_TEXT') . '</span><br />';
    echo '<span data-translation-id="SYSTEM_OVERVIEW_DIALOG_TEXT_SHUTDOWN">SYSTEM_OVERVIEW_DIALOG_TEXT_SHUTDOWN: ' . __('SYSTEM_OVERVIEW_DIALOG_TEXT_SHUTDOWN') . '</span><br />';
}