UNPKG

zettapi_client

Version:

Admin panel and client-side CRUD operations in angular to use with zettapi_server rest api to get started quickly in any CMS project.

54 lines (53 loc) 2.17 kB
<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" ng-if="item.runs.length === 0">Nunca</td> <td class="text-nowrap" ng-if="item.runs.length !== 0">{{item.runs[0].startTimestamp | date: 'yyyy-MM-dd HH:mm:ss'}}</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 class="text-right"> <entity-modal entity="{{entity}}" item="item" lookup="lookup"></entity-modal> </td> <td class="text-right"> <entity-remove entity="{{entity}}" item="item"></entity-remove> </td> </tr> </tbody> </table> </div> </div>