diff --git a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsModel.groovy b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsModel.groovy index 340211d2..20599da3 100644 --- a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsModel.groovy +++ b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsModel.groovy @@ -15,7 +15,7 @@ class UploadsModel { private final Core core private CliSettings props private final List uploaders = new ArrayList<>() - private final TableModel model = new TableModel("Name","Progress","Downloader","Remote Pieces") + private final TableModel model = new TableModel("Name","Progress","Downloader","Remote Pieces", "Speed") UploadsModel(TextGUIThread guiThread, Core core, CliSettings props) { this.guiThread = guiThread @@ -86,7 +86,10 @@ class UploadsModel { totalSize = " of " + DataHelper.formatSize2Decimal(size, false) + "B" String remotePieces = String.format("%02d", percentTotal) + "% ${totalSize} ($done/$pieces) pcs".toString() - model.addRow([name, percentString, downloader, remotePieces]) + String speed = DataHelper.formatSize2Decimal(it.uploader.speed(), false) + "B/sec" + + + model.addRow([name, percentString, downloader, remotePieces, speed]) } } diff --git a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsView.groovy b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsView.groovy index 3da4c0f5..e502bec0 100644 --- a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsView.groovy +++ b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/UploadsView.groovy @@ -24,7 +24,7 @@ class UploadsView extends BasicWindow { contentPanel.setLayoutManager(new GridLayout(1)) LayoutData layoutData = GridLayout.createLayoutData(Alignment.CENTER, Alignment.CENTER, true, false) - table = new Table("Name","Progress","Downloader","Remote Pieces") + table = new Table("Name","Progress","Downloader","Remote Pieces","Speed") table.setCellSelection(false) table.setTableModel(model.model) table.setVisibleRows(terminalSize.getRows())