| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <div class="no-activities" ng-if="tasks.length === 0">No activities</div> |
| <div ng-if="tasks.length !== 0" class="task-list"> |
| <div class="form-group search-bar-with-controls"> |
| <div class="btn-group activity-tag-filter" uib-dropdown keyboard-nav="true" dropdown-append-to="model.appendTo" |
| ng-if="filters.selectedDisplay && (globalFilters.transient || !isEmpty(filters.available))"> |
| <button id="single-button" type="button" class="btn btn-default" uib-dropdown-toggle> |
| <i class="fa fa-filter" class="funnel"></i> <span class="selection-summary"> |
| <span class="dropdown-badges-for-category" ng-repeat="classAndBadges in filters.selectedDisplay" id="{{ classAndBadges.class }}" |
| ><span class="dropdown-badge-for-category {{ classAndBadges.class }}" ng-repeat="badge in classAndBadges.badges" id="{{ badge }}">{{ badge }}</span |
| ></span> |
| </span> <span class="caret"></span> |
| </button> |
| <ul class="dropdown-menu with-checks" uib-dropdown-menu role="menu" aria-labelledby="single-button"> |
| <li role="menuitem" ng-repeat="(tag,value) in filters.available track by tag" |
| class="activity-tag-filter-tag {{value.classes}}" |
| ng-click="clickFilter(value, tag)" |
| ng-class="{'selected': filters.selectedFilters[tag]}"> |
| |
| <i class="fa fa-check check if-selected"></i> |
| |
| <span class="main" title="{{value.help}}">{{value.display}}</span> |
| |
| <span ng-if="!value.hideBadges"> |
| <span class="badge included" |
| title="Activities included by this filter"> |
| {{value.count}} |
| </span> |
| <span class="badge excluded-here" |
| ng-if="value.count > 0" |
| title="Activities included by this filter"> |
| {{value.count}} |
| </span> |
| <span class="badge more-excluded-elsewhere" |
| title="Additional activities excluded by other filter categories" |
| ng-if="value.count > 0 && value.countAbsolute > value.count"> |
| {{ value.countAbsolute - value.count}} |
| </span> |
| <span class="badge all-excluded-elsewhere" |
| title="Activities are excluded by other filter categories" |
| ng-if="value.count == 0 && value.countAbsolute > 0"> |
| {{ value.countAbsolute - value.count}} |
| </span> |
| </span> |
| </li> |
| <li role="menuitem" class="activity-tag-filter-action divider-above" style="padding-bottom: 9px;" |
| ng-if="globalFilters.transient" ng-click="globalFilters.transient.onClick()" |
| ng-class="{'selected': globalFilters.transient.checked}"> |
| <i class="fa fa-check check if-selected"></i> |
| <span class="main" title="{{globalFilters.transient.help}}">{{globalFilters.transient.display}}</span> |
| </li> |
| <li role="menuitem" class="activity-tag-filter-action divider-above" style="padding-bottom: 9px;" |
| ng-if="!isEmpty(filters.available)" ng-click="resetFilters()"> |
| <span class="main" title="Recompute the default filter set for the current tasks">Reset filters</span> |
| </li> |
| <li role="menuitem" class="activity-tag-filter-error" ng-if="!globalFilters.transient && isEmpty(filters.available)"> |
| <i><span class="main">No filter options</span></i> |
| </li> |
| </ul> |
| </div> |
| |
| <input type="text" class="form-control activity-name-filter" placeholder="Filter by name" ng-model="filterValue" /> |
| </div> |
| |
| <div class="table-responsive activity-table"> |
| <table class="table table-bordered"> |
| <thead> |
| <tr> |
| <th style="text-align: center;"> |
| Status |
| </th> |
| <th> |
| {{activityColumnTitle || 'Activity'}} |
| </th> |
| <th> |
| Started |
| </th> |
| <th> |
| Duration |
| </th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr ng-repeat="task in tasksFilteredByTag | activityFilter:filterValue as filterResult track by task.id"> |
| <td class="status"> |
| <a ui-sref="main.inspect.activities.detail({entityId: task.entityId, activityId: task.id, workflowId: getTaskWorkflowId(task)})"> |
| <brooklyn-status-icon value="{{isScheduled(task) ? 'Scheduled' : task.currentStatus}}" |
| class="scheduled-icon-as-success"></brooklyn-status-icon> |
| </a> |
| </td> |
| <td class="name"> |
| <a ui-sref="main.inspect.activities.detail({entityId: task.entityId, activityId: task.id, workflowId: getTaskWorkflowId(task)})" |
| title="Task {{ task.id |
| }}{{ task.workflowId ? '\n'+'Workflow '+task.workflowId : '' |
| }}{{ task.isTaskStubFromWorkflowRecord ? '\n\n'+'This task is no longer available at the server. This stub was created from the limited information in the workflow record.' : '' |
| }}{{ task.workflowId && !task.isWorkflowTopLevel ? '\n\n'+'This is a nested workflow, launched from workflow '+task.workflowParentId+'.' : '' |
| }}{{ !task.isWorkflowFirstRun && task.isWorkflowLastRun ? '\n\n'+'Workflow replayed. This is the most recent.' : '' |
| }}{{ task.workflowId && !task.isWorkflowLastRun ? '\n\n'+'Workflow replayed. This is an earlier run.' : '' |
| }}" |
| >{{task.displayName}} |
| </a> |
| </td> |
| <td class="started"> |
| <a ui-sref="main.inspect.activities.detail({entityId: task.entityId, activityId: task.id, workflowId: getTaskWorkflowId(task)})"> |
| {{task.startTimeUtc | timeAgoFilter}} |
| </a> |
| </td> |
| <td class="duration"> |
| <a ui-sref="main.inspect.activities.detail({entityId: task.entityId, activityId: task.id, workflowId: getTaskWorkflowId(task)})" |
| ng-if="task.startTimeUtc && task.startTimeUtc>0"> |
| {{getTaskDuration(task) | durationFilter}} <span ng-if="task.endTimeUtc === null">and counting</span> |
| </a> |
| </td> |
| </tr> |
| {{ model.filterResult = filterResult; "comment: update those interested in the result of the filter"; "" }} |
| <tr ng-if="filterResult.length == 0 "> |
| <td colspan="4" class="text-center no-tasks-found"> |
| No tasks found matching |
| <span ng-if="filterValue">current search <code>{{filterValue}}</code> and</span> |
| filter options |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |