Пример #1
0
 @Override
 protected void onError(Action action, String reason) {
   if (action instanceof StreamLogFile) {
     Console.info(reason);
     streamingProgress.done();
   }
 }
Пример #2
0
  @Override
  public void onAction(Action action) {
    if (action instanceof ReadLogFiles) {
      getView().list(logStore.getLogFiles());

    } else if (action instanceof StreamLogFile) {
      streamingProgress.done();
      getView().open(logStore.getActiveLogFile());

    } else if (action instanceof SelectLogFile) {
      getView().open(logStore.getActiveLogFile());

    } else if (action instanceof SelectServerInstance) {
      onReset();
    }
  }
Пример #3
0
 public void onStreamLogFile(final String logFile, final int fileSize) {
   if (logStore.isOpen(logFile)) {
     this.circuit.dispatch(new SelectLogFile(logFile));
   } else {
     if (fileSize > LOG_FILE_SIZE_THRESHOLD) {
       Feedback.confirm(
           "Download Log File",
           "Downloading this log file may take some time. Do you want to proceed?",
           new Feedback.ConfirmationHandler() {
             @Override
             public void onConfirmation(boolean isConfirmed) {
               if (isConfirmed) {
                 streamingProgress.monitor(logFile);
               }
             }
           });
     } else {
       streamingProgress.monitor(logFile);
     }
   }
 }