public DataTablesResponseDTO searchList()

in alpha/alpha-ui/src/main/java/org/apache/servicecomb/pack/alpha/ui/controller/TransactionController.java [113:140]


  public DataTablesResponseDTO searchList(
      @ModelAttribute DataTablesRequestDTO dataTablesRequestDTO) throws Exception {
    if (dataTablesRequestDTO.getQuery() != null) {
      List<TransactionRowDTO> data = new ArrayList<>();
      GlobalTransaction globalTransaction = findGlobalTransactionByGlobalTxId(
          dataTablesRequestDTO.getQuery());
      if (globalTransaction != null) {
        data.add(TransactionRowDTO.builder()
            .serviceName(globalTransaction.getServiceName())
            .instanceId(globalTransaction.getInstanceId())
            .globalTxId(globalTransaction.getGlobalTxId())
            .state(globalTransaction.getState())
            .beginTime(globalTransaction.getBeginTime())
            .endTime(globalTransaction.getEndTime())
            .subTxSize(globalTransaction.getSubTxSize())
            .durationTime(globalTransaction.getDurationTime())
            .build());
      }
      return DataTablesResponseDTO.builder()
          .draw(dataTablesRequestDTO.getDraw())
          .recordsTotal(1)
          .recordsFiltered(1)
          .data(data)
          .build();
    } else {
      return this.sagaList(dataTablesRequestDTO);
    }
  }