<div class="channels__channel channels__channel--ethernet">
  <div class="channels-protocol-list">
    <div class="channels-protocol__item"
        ng-class="{'channels-protocol__item--active': ethernet.active}">
      <div class="channels-protocol-title" translate>Ethernet</div>
      <div class="channels-protocol-status-list">
        <channel-status-item ng-show="showChannelStatus()" active="ethernet.active" error="isError()">
          <div class="channels-protocol-status-list__item-title"
               ng-switch="ethernet.state">
            <span ng-switch-when="NONE" translate>Идет инициализация</span>
            <span ng-switch-when="WAIT_LINK" translate>Ожидаем подключения кабеля</span>
            <span ng-switch-when="DHCP" translate>Идет получение настроек по DHCP</span>
            <span ng-switch-when="NO_LINK" translate>Сетевой кабель не подключен</span>
            <span ng-switch-when="DHCP_FAILED" translate>Ошибка получения настроек по DHCP</span>
            <span ng-switch-when="SC_CONNECTION_FAILED" translate>Ошибка подключения к «Центру охраны»</span>
          </div>
        </channel-status-item>

        <channel-status-item ng-show="showConnectionInfo()" active="ethernet.active" error="isError()">
          <div class="channels-protocol-status-list__item-title"
              ng-switch="ethernet.state">
            <span ng-switch-when="READY" translate>Идет подключение к «Центру охраны»</span>
            <span ng-switch-when="WORKING" translate>Подключено к «Центру охраны»</span>
            <span ng-switch-default translate>Нет подключения к «Центру охраны»</span>
          </div>
          <div
              class="channels-protocol-status-list__item-subtitle">
            {[ utils.SCAddress(ethernet.address_port_pair) ]}
          </div>
        </channel-status-item>

        <channel-status-item ng-show="showConnectionInfo()"
                             active="ethernet.active" error="isError() || isCloudError()">
          <div class="channels-protocol-status-list__item-title"
              ng-switch="ethernet.state">
            <span ng-switch-when="READY" translate>Идет подключение к Облаку</span>
            <span ng-switch-when="WORKING">
              <span ng-if="ethernet.cloud_connected" translate>
                Подключено к Облаку
              </span>
              <span ng-if="!ethernet.cloud_connected" translate>
                Нет подключения к Облаку
              </span>
            </span>
            <span ng-switch-default translate>Нет подключения к Облаку</span>
          </div>
          <div only-desktop
              class="channels-protocol-status-list__item-subtitle">
            {[ utils.cloudAddress() ]}
          </div>
        </channel-status-item>

      </div>
      <div class="channels-protocol-messages">{[ ethernet.events_delivered ]}</div>
      <channel-activator channel-type="ethernet" channel-num="0" channel-active="ethernet.active"/>
    </div>
  </div>
</div>
