Fixed queue start ts display on UI - use value instead of last update ts. Fixed ++ for queuestartts
This commit is contained in:
		
							parent
							
								
									c3e65c5019
								
							
						
					
					
						commit
						9d0867e272
					
				@ -501,8 +501,9 @@ public final class EdgeGrpcSession implements Closeable {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    private ListenableFuture<List<Void>> updateQueueStartTs(Long newStartTs) {
 | 
					    private ListenableFuture<List<Void>> updateQueueStartTs(Long newStartTs) {
 | 
				
			||||||
        log.trace("[{}] updating QueueStartTs [{}][{}]", this.sessionId, edge.getId(), newStartTs);
 | 
					        log.trace("[{}] updating QueueStartTs [{}][{}]", this.sessionId, edge.getId(), newStartTs);
 | 
				
			||||||
        newStartTs = ++newStartTs; // increments ts by 1 - next edge event search starts from current offset + 1
 | 
					        List<AttributeKvEntry> attributes = Collections.singletonList(
 | 
				
			||||||
        List<AttributeKvEntry> attributes = Collections.singletonList(new BaseAttributeKvEntry(new LongDataEntry(QUEUE_START_TS_ATTR_KEY, newStartTs), System.currentTimeMillis()));
 | 
					                new BaseAttributeKvEntry(
 | 
				
			||||||
 | 
					                        new LongDataEntry(QUEUE_START_TS_ATTR_KEY, newStartTs), System.currentTimeMillis()));
 | 
				
			||||||
        return ctx.getAttributesService().save(edge.getTenantId(), edge.getId(), DataConstants.SERVER_SCOPE, attributes);
 | 
					        return ctx.getAttributesService().save(edge.getTenantId(), edge.getId(), DataConstants.SERVER_SCOPE, attributes);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,7 @@ public interface EdgeEventRepository extends PagingAndSortingRepository<EdgeEven
 | 
				
			|||||||
    @Query("SELECT e FROM EdgeEventEntity e WHERE " +
 | 
					    @Query("SELECT e FROM EdgeEventEntity e WHERE " +
 | 
				
			||||||
            "e.tenantId = :tenantId " +
 | 
					            "e.tenantId = :tenantId " +
 | 
				
			||||||
            "AND e.edgeId = :edgeId " +
 | 
					            "AND e.edgeId = :edgeId " +
 | 
				
			||||||
            "AND (:startTime IS NULL OR e.createdTime >= :startTime) " +
 | 
					            "AND (:startTime IS NULL OR e.createdTime > :startTime) " +
 | 
				
			||||||
            "AND (:endTime IS NULL OR e.createdTime <= :endTime) " +
 | 
					            "AND (:endTime IS NULL OR e.createdTime <= :endTime) " +
 | 
				
			||||||
            "AND LOWER(e.edgeEventType) LIKE LOWER(CONCAT('%', :textSearch, '%'))"
 | 
					            "AND LOWER(e.edgeEventType) LIKE LOWER(CONCAT('%', :textSearch, '%'))"
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
@ -44,7 +44,7 @@ public interface EdgeEventRepository extends PagingAndSortingRepository<EdgeEven
 | 
				
			|||||||
    @Query("SELECT e FROM EdgeEventEntity e WHERE " +
 | 
					    @Query("SELECT e FROM EdgeEventEntity e WHERE " +
 | 
				
			||||||
            "e.tenantId = :tenantId " +
 | 
					            "e.tenantId = :tenantId " +
 | 
				
			||||||
            "AND e.edgeId = :edgeId " +
 | 
					            "AND e.edgeId = :edgeId " +
 | 
				
			||||||
            "AND (:startTime IS NULL OR e.createdTime >= :startTime) " +
 | 
					            "AND (:startTime IS NULL OR e.createdTime > :startTime) " +
 | 
				
			||||||
            "AND (:endTime IS NULL OR e.createdTime <= :endTime) " +
 | 
					            "AND (:endTime IS NULL OR e.createdTime <= :endTime) " +
 | 
				
			||||||
            "AND e.edgeEventAction <> 'TIMESERIES_UPDATED' " +
 | 
					            "AND e.edgeEventAction <> 'TIMESERIES_UPDATED' " +
 | 
				
			||||||
            "AND LOWER(e.edgeEventType) LIKE LOWER(CONCAT('%', :textSearch, '%'))"
 | 
					            "AND LOWER(e.edgeEventType) LIKE LOWER(CONCAT('%', :textSearch, '%'))"
 | 
				
			||||||
 | 
				
			|||||||
@ -98,9 +98,7 @@ export class EdgeDownlinkTableConfig extends EntityTableConfig<EdgeEvent, TimePa
 | 
				
			|||||||
      map[attribute.key] = attribute;
 | 
					      map[attribute.key] = attribute;
 | 
				
			||||||
      return map;
 | 
					      return map;
 | 
				
			||||||
    }, {});
 | 
					    }, {});
 | 
				
			||||||
    if (edge.queueStartTs) {
 | 
					    this.queueStartTs = edge.queueStartTs && edge.queueStartTs.value ? edge.queueStartTs.value : 0;
 | 
				
			||||||
      this.queueStartTs = edge.queueStartTs.lastUpdateTs;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private updateColumns(updateTableColumns: boolean = false): void {
 | 
					  private updateColumns(updateTableColumns: boolean = false): void {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user