Minor code cleaning

This commit is contained in:
deaflynx 2020-07-21 08:44:49 +03:00
parent c989c31f1f
commit 8c9aa0c8df
3 changed files with 10 additions and 12 deletions

View File

@ -15,11 +15,11 @@
limitations under the License.
-->
<div class="tb-cell" flex="20">{{event.createdTime | date : 'yyyy-MM-dd HH:mm:ss'}}</div>
<div class="tb-cell" flex="20">{{event.edgeEventType}}</div>
<div class="tb-cell" flex="40">{{event.edgeEventAction}}</div>
<div class="tb-cell" flex="20">{{event.entityId}}</div>
<div class="tb-cell" flex="15" ng-style="isPending ? {'color': 'rgba(0, 0, 0, 0.38)'} : {'color': '#000'}">{{updateStatus(event.createdTime)}}</div>
<div class="tb-cell" flex="20">{{ event.createdTime | date : 'yyyy-MM-dd HH:mm:ss' }}</div>
<div class="tb-cell" flex="20">{{ event.edgeEventType }}</div>
<div class="tb-cell" flex="40">{{ event.edgeEventAction }}</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="10">
<md-button class="md-icon-button md-primary"
ng-click="showEdgeEntityContent($event, 'edge.entity-info', 'JSON')"

View File

@ -149,13 +149,13 @@ export default function EventRowDirective($compile, $templateCache, $mdDialog, $
if (scope.queueStartTs) {
var status;
if (eventCreatedTime < scope.queueStartTs) {
status = 'edge.success';
status = $translate.instant('edge.success');
scope.isPending = false;
} else {
status = 'edge.failed';
status = $translate.instant('edge.failed');
scope.isPending = true;
}
return $translate.instant(status);
return status;
}
}
}

View File

@ -22,8 +22,8 @@ import eventTableTemplate from './event-table.tpl.html';
/* eslint-enable import/no-unresolved, import/default */
/*@ngInject*/
export default function EventTableDirective($compile, $templateCache, $rootScope, types, eventService, edgeService,
attributeService, $log) {
export default function EventTableDirective($compile, $templateCache, $rootScope, types,
eventService, edgeService, attributeService) {
var linker = function (scope, element, attrs) {
@ -68,8 +68,6 @@ export default function EventTableDirective($compile, $templateCache, $rootScope
}
}
$log.info("scope.entityType", scope.entityType);
scope.eventType = attrs.defaultEventType;
var pageSize = 20;