PHP Classes

File: SmallServerAdmin/services/widget.php

Recommend this page to a friend!
  Classes of Aleksey Nemiro   PHP Small Server Administrator   SmallServerAdmin/services/widget.php   Download  
File: SmallServerAdmin/services/widget.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Small Server Administrator
Web panel for small Debian and Ubuntu servers
Author: By
Last change:
Date: 8 years ago
Size: 3,296 bytes
 

Contents

Class file image Download
<div ng-controller="ServiceListController" ng-init="<?=isset($config['widgets']['services']['NgInit']) ? $config['widgets']['services']['NgInit'] : ''?>">

  <div class="panel panel-default ng-hide" ng-show="Loading" ng-cloak>
    <div class="panel-body">
      <span class="glyphicon glyphicon-refresh fa-spin"></span>
      ${SERVICES_LOADING}
    </div>
  </div>

  <input type="text" name="search" class="hidden" ng-model="SearchString" />

  <div class="panel panel-default ng-hide" ng-show="!Loading && Services != null && Services.length > 0" ng-cloak>
    <div class="panel-body">
      <table class="table table-hover cell-align-middle">
        <thead>
          <tr>
            <th class="col-xs-9 col-sm-9 col-md-9 col-lg-9">${Service name}</th>
            <th class="col-xs-1 col-sm-1 col-md-1 col-lg-1 text-center">${Status}</th>
            <th class="col-xs-1 col-sm-1 col-md-1 col-lg-1">&nbsp;</th>
            <th class="col-xs-1 col-sm-1 col-md-1 col-lg-1">&nbsp;</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="service in Services" ng-class="service.Status == 'Stopped' ? 'status-stopped' : ''">
            <td class="text-nowrap">
              <span class="fa fa-cog"></span>
              {{service.Name}}
            </td>
            <td class="text-center">
              <span ng-show="!service.Loading">{{service.Status}}</span>
              <span ng-show="service.Loading" class="glyphicon glyphicon-option-horizontal"></span>
            </td>
            <td class="text-center">
              <a class="btn btn-silver btn-sm" ng-show="service.Status == 'Started'" ng-click="SetStatus(service, 'Stopped')" ng-disabled="service.Loading">
                <span ng-show="service.Loading"><i class="glyphicon glyphicon-refresh fa-spin"></i></span>
                <span ng-show="!service.Loading" class="glyphicon glyphicon-stop"></span>
                <span class="hidden-xs hidden-sm hidden-md"> ${Stop}</span>
              </a>
              <a class="btn btn-gray btn-sm" ng-show="service.Status != 'Started'" ng-click="SetStatus(service, 'Started')" ng-disabled="service.Loading">
                <span ng-show="service.Loading"><i class="glyphicon glyphicon-refresh fa-spin"></i></span>
                <span ng-show="!service.Loading" class="glyphicon glyphicon-play"></span>
                <span class="hidden-xs hidden-sm hidden-md"> ${Start}</span>
              </a>
            </td>
            <td class="text-center">
              <a class="btn btn-silver btn-sm" ng-disabled="service.Status != 'Started' || service.Loading" ng-click="SetStatus(service, 'Reload')">
                <span ng-show="service.Loading"><i class="glyphicon glyphicon-refresh fa-spin"></i></span>
                <span ng-show="!service.Loading" class="glyphicon glyphicon-refresh"></span>
                <span class="hidden-xs hidden-sm hidden-md"> ${Reload}</span>
              </a>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>

  <div class="well well-lg text-center" ng-show="!Loading && (Services == null || Services.length == 0)" ng-cloak>
    <p>${SERVICES_NOT_FOUND}</p>
  </div>

  <?php
 
include_once \Nemiro\Server::MapPath('~/services/dialogs/confirmToStopService.php');
 
?>
</div>