Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions console_backend/src/cli_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub struct CliOptions {
#[clap(long = "sbp-log")]
pub sbp_log: Option<CliSbpLogging>,

/// Set Console Log Level Filter. Default: INFO.
/// Set Console Log Level Filter. Default: WARNING.
#[clap(long = "log-level")]
pub log_level: Option<CliLogLevel>,

Expand Down Expand Up @@ -305,7 +305,7 @@ pub fn handle_cli(opt: CliOptions, conn_manager: &ConnectionManager, shared_stat
let log_level = if let Some(log_level_) = opt.log_level {
(*log_level_).clone()
} else {
LogLevel::INFO
LogLevel::WARNING
};
shared_state.set_log_level(log_level);
let mut shared_data = shared_state.lock();
Expand Down
2 changes: 1 addition & 1 deletion console_backend/src/shared_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ pub struct LogPanelState {
impl LogPanelState {
fn new() -> LogPanelState {
LogPanelState {
log_level: LogLevel::INFO,
log_level: LogLevel::WARNING,
}
}
}
Expand Down
57 changes: 8 additions & 49 deletions resources/AdvancedTabComponents/MetricsMonitor.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "../Constants"
import "../TableComponents"
import Qt.labs.qmlmodels 1.0
import QtCharts 2.2
import QtQuick 2.15
Expand All @@ -7,9 +8,7 @@ import QtQuick.Layouts 1.15
import SwiftConsole 1.0

Item {
property variant columnWidths: [width / 2, width / 2]
property real mouse_x: 0
property int selectedRow: -1
property variant entries: []
property bool csacReceived: false

Expand All @@ -29,6 +28,8 @@ Item {
}

Rectangle {
property variant columnWidths: [width / 2, width / 2]

Layout.fillWidth: true
Layout.fillHeight: true
clip: true
Expand Down Expand Up @@ -93,25 +94,14 @@ Item {

}

TableView {
SwiftTableView {
id: tableView

columnSpacing: -1
rowSpacing: -1
columnWidthProvider: function(column) {
return columnWidths[column];
}
reuseItems: true
boundsBehavior: Flickable.StopAtBounds
anchors.top: horizontalHeader.bottom
width: parent.width
height: parent.height - horizontalHeader.height

ScrollBar.horizontal: ScrollBar {
}

ScrollBar.vertical: ScrollBar {
}
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
columnWidths: parent.columnWidths

model: TableModel {
id: tableModel
Expand All @@ -128,37 +118,6 @@ Item {

}

delegate: Rectangle {
implicitHeight: Constants.genericTable.cellHeight
implicitWidth: tableView.columnWidthProvider(column)
border.color: Constants.genericTable.borderColor
color: row == selectedRow ? Constants.genericTable.cellHighlightedColor : Constants.genericTable.cellColor

Label {
width: parent.width
horizontalAlignment: Text.AlignLeft
clip: true
font.family: Constants.genericTable.fontFamily
font.pointSize: Constants.largePointSize
text: model.display
elide: Text.ElideRight
padding: Constants.genericTable.padding
}

MouseArea {
width: parent.width
height: parent.height
anchors.centerIn: parent
onPressed: {
if (selectedRow == row)
selectedRow = -1;
else
selectedRow = row;
}
}

}

}

Timer {
Expand Down
67 changes: 9 additions & 58 deletions resources/AdvancedTabComponents/NetworkInfo.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "../Constants"
import "../TableComponents"
import Qt.labs.qmlmodels 1.0
import QtQuick 2.15
import QtQuick.Controls 2.15
Expand All @@ -9,18 +10,14 @@ ColumnLayout {
property variant entries: []
property var columnWidths: [parent.width / 5, parent.width / 5, parent.width / 5, parent.width / 5, parent.width / 5]
property real mouse_x: 0
property int selectedRow: -1

spacing: Constants.networking.layoutSpacing

HorizontalHeaderView {
id: horizontalHeader

Layout.fillWidth: true
Layout.preferredHeight: Constants.genericTable.cellHeight
interactive: false
syncView: table
z: Constants.genericTable.headerZOffset
syncView: tableView

delegate: Rectangle {
implicitWidth: columnWidths[index]
Expand All @@ -32,7 +29,7 @@ ColumnLayout {
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: table.model.columns[index].display
text: tableView.model.columns[index].display
elide: Text.ElideRight
clip: true
font.family: Constants.genericTable.fontFamily
Expand All @@ -51,12 +48,12 @@ ColumnLayout {
if (pressed) {
var delta_x = (mouseX - mouse_x);
var next_idx = (index + 1) % 5;
var min_width = table.width / 10;
var min_width = tableView.width / 10;
if (columnWidths[index] + delta_x > min_width && columnWidths[next_idx] - delta_x > min_width) {
columnWidths[index] += delta_x;
columnWidths[next_idx] -= delta_x;
}
table.forceLayout();
tableView.forceLayout();
}
}
}
Expand All @@ -78,27 +75,12 @@ ColumnLayout {

}

TableView {
id: table
SwiftTableView {
id: tableView

columnSpacing: -1
rowSpacing: -1
columnWidthProvider: function(column) {
return columnWidths[column];
}
reuseItems: true
boundsBehavior: Flickable.StopAtBounds
Layout.fillWidth: true
Layout.fillHeight: true
onWidthChanged: {
table.forceLayout();
}

ScrollBar.horizontal: ScrollBar {
}

ScrollBar.vertical: ScrollBar {
}
columnWidths: parent.columnWidths

model: TableModel {
rows: [Constants.networking.defaultList]
Expand All @@ -125,37 +107,6 @@ ColumnLayout {

}

delegate: Rectangle {
implicitHeight: Constants.genericTable.cellHeight
implicitWidth: table.columnWidthProvider(column)
border.color: Constants.genericTable.borderColor
color: row == selectedRow ? Constants.genericTable.cellHighlightedColor : Constants.genericTable.cellColor

Label {
width: parent.width
horizontalAlignment: Text.AlignLeft
clip: true
font.family: Constants.genericTable.fontFamily
font.pointSize: Constants.largePointSize
text: model.display
elide: Text.ElideRight
padding: Constants.genericTable.padding
}

MouseArea {
width: parent.width
height: parent.height
anchors.centerIn: parent
onPressed: {
if (selectedRow == row)
selectedRow = -1;
else
selectedRow = row;
}
}

}

}

Timer {
Expand All @@ -174,7 +125,7 @@ ColumnLayout {
new_row[Constants.networking.columnHeaders[2]] = entries[idx][2];
new_row[Constants.networking.columnHeaders[3]] = entries[idx][3];
new_row[Constants.networking.columnHeaders[4]] = entries[idx][4];
table.model.setRow(idx, new_row);
tableView.model.setRow(idx, new_row);
}
}
}
Expand Down
57 changes: 6 additions & 51 deletions resources/AdvancedTabComponents/ThreadStateTable.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "../Constants"
import "../TableComponents"
import Qt.labs.qmlmodels 1.0
import QtCharts 2.2
import QtQuick 2.15
Expand All @@ -9,7 +10,6 @@ import SwiftConsole 1.0
Item {
property variant columnWidths: [parent.width / 3, parent.width / 3, parent.width / 3]
property real mouse_x: 0
property int selectedRow: -1
property variant entries: []

HorizontalHeaderView {
Expand Down Expand Up @@ -75,28 +75,14 @@ Item {

}

TableView {
SwiftTableView {
id: tableView

columnSpacing: -1
rowSpacing: -1
columnWidthProvider: function(column) {
return columnWidths[column];
}
reuseItems: true
boundsBehavior: Flickable.StopAtBounds
anchors.top: horizontalHeader.bottom
width: parent.width
height: parent.height - horizontalHeader.height
onWidthChanged: {
tableView.forceLayout();
}

ScrollBar.horizontal: ScrollBar {
}

ScrollBar.vertical: ScrollBar {
}
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
columnWidths: parent.columnWidths

model: TableModel {
id: tableModel
Expand All @@ -117,37 +103,6 @@ Item {

}

delegate: Rectangle {
implicitHeight: Constants.genericTable.cellHeight
implicitWidth: tableView.columnWidthProvider(column)
border.color: Constants.genericTable.borderColor
color: row == selectedRow ? Constants.genericTable.cellHighlightedColor : Constants.genericTable.cellColor

Label {
width: parent.width
horizontalAlignment: Text.AlignLeft
clip: true
font.family: Constants.genericTable.fontFamily
font.pointSize: Constants.largePointSize
text: model.display
elide: Text.ElideRight
padding: Constants.genericTable.padding
}

MouseArea {
width: parent.width
height: parent.height
anchors.centerIn: parent
onPressed: {
if (selectedRow == row)
selectedRow = -1;
else
selectedRow = row;
}
}

}

}

Timer {
Expand Down
3 changes: 2 additions & 1 deletion resources/BaselineTab.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MainTab {
height: parent.height

Rectangle {
SplitView.minimumWidth: Constants.baselineTable.width
SplitView.minimumWidth: Constants.baselineTable.minimumWidth
SplitView.fillHeight: true

BaselineTabComponents.BaselineTable {
Expand All @@ -26,6 +26,7 @@ MainTab {
}

BaselineTabComponents.BaselinePlot {
SplitView.minimumWidth: Constants.baselinePlot.minimumWidth
SplitView.fillWidth: true
SplitView.fillHeight: true
}
Expand Down
Loading