zettapi_client
Version:
Client side CRUD operations in angular to use with zettapi_server rest api to get started quickly in any CMS project
48 lines • 2.09 kB
HTML
<div class="col-sm-12">
<div class="table-responsive">
<table class="table table-bordered table-hover table-condensed">
<thead>
<tr>
<th></th>
<th></th>
<th colspan="4">Periodicidade</th>
<th colspan="3">Último processamento</th>
<th></th>
<th></th>
</tr>
<tr>
<th>Nome</th>
<th>Estado</th>
<th>M</th>
<th>S</th>
<th>H</th>
<th>M</th>
<th>Executou</th>
<th>Duração</th>
<th>Situação</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in items">
<td><button ng-click="run(item);" ng-disabled="item.runs.length > 0 ? item.runs[0].isRunning : false" type="button"
class="btn btn-default btn-xs"><span class="fa fa-play"></span></button> {{item.name}}</td>
<td>
<button ng-click="toggleState(item);" type="button" class="btn btn-default btn-xs"><span class="fa fa-refresh"></span></button> {{item.isActive ? "Ativo" : "Inativo"}}
</td>
<td>{{item.criteria.month}}</td>
<td>{{item.criteria.weekday}}</td>
<td>{{item.criteria.hour}}</td>
<td>{{item.criteria.minute}}</td>
<td class="text-nowrap">{{item.runs.length === 0 ? "Nunca" : formatDatetime(item.runs[0].startTimestamp)}}</td>
<td class="text-nowrap">{{item.runs.length === 0 ? "-" : calculateTimespan(item.runs[0].startTimestamp, item.runs[0].endTimestamp)}}</td>
<td>{{item.runs.length === 0 ? "-" : (item.runs[0].isRunning ? "Em execução" : (item.runs[0].success ? "Completou"
: "Falhou"))}}</td>
<td><button ng-click="openEdit(item);" type="button" class="btn btn-primary btn-xs"><span class="fa fa-pencil"></span></button></td>
<td><button ng-click="remove(item);" type="button" class="btn btn-danger btn-xs"><span class="fa fa-trash-o"></span></button></td>
</tr>
</tbody>
</table>
</div>
</div>