Edge events fixed queueStartTs attribute
This commit is contained in:
parent
94437d84fb
commit
9ee792cac3
@ -19,7 +19,7 @@
|
||||
<div class="tb-cell" flex="20">{{ event.type }}</div>
|
||||
<div class="tb-cell" flex="40">{{ event.action }}</div>
|
||||
<div class="tb-cell" flex="20">{{ event.entityId }}</div>
|
||||
<div class="tb-cell" flex="15" ng-style="isPending ? {'color': 'rgba(0, 0, 0, .38)'} : {'color': '#000'}">{{ updateStatus(event.createdTime) | translate }}</div>
|
||||
<div class="tb-cell" flex="15" ng-style="{'color': statusColor}">{{ updateStatus(event.createdTime) | translate }}</div>
|
||||
<div class="tb-cell" flex="10">
|
||||
<md-button ng-if="checkEdgeEventType(event.type)" class="md-icon-button md-primary"
|
||||
ng-click="showEdgeEntityContent($event, 'edge.entity-info', 'JSON')"
|
||||
|
||||
@ -167,19 +167,17 @@ export default function EventRowDirective($compile, $templateCache, $mdDialog, $
|
||||
$compile(element.contents())(scope);
|
||||
|
||||
scope.updateStatus = function(eventCreatedTime) {
|
||||
if (scope.queueStartTs) {
|
||||
var status;
|
||||
if (eventCreatedTime < scope.queueStartTs) {
|
||||
status = $translate.instant('edge.success');
|
||||
scope.isPending = false;
|
||||
scope.statusColor = '#000';
|
||||
} else {
|
||||
status = $translate.instant('edge.failed');
|
||||
scope.isPending = true;
|
||||
scope.statusColor = 'rgba(0, 0, 0, .38)';
|
||||
}
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
restrict: "A",
|
||||
|
||||
@ -220,7 +220,6 @@ export default function EventTableDirective($compile, $templateCache, $rootScope
|
||||
}
|
||||
|
||||
scope.subscriptionId = null;
|
||||
scope.queueStartTs = 0;
|
||||
|
||||
scope.loadEdgeInfo = function() {
|
||||
attributeService.getEntityAttributesValues(
|
||||
@ -228,11 +227,10 @@ export default function EventTableDirective($compile, $templateCache, $rootScope
|
||||
scope.entityId,
|
||||
types.attributesScope.server.value,
|
||||
types.edgeAttributeKeys.queueStartTs,
|
||||
{})
|
||||
.then(function success(attributes) {
|
||||
scope.onEdgeAttributesUpdate(attributes);
|
||||
null).then(
|
||||
function success(attributes) {
|
||||
attributes.length > 0 ? scope.onEdgeAttributesUpdate(attributes) : scope.queueStartTs = 0;
|
||||
});
|
||||
|
||||
scope.checkSubscription();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user