This commit is contained in:
Tim Blume 2020-09-03 00:33:17 +02:00
parent aab0f45d61
commit c4c82988ca
3 changed files with 10 additions and 25 deletions

View file

@ -46,13 +46,13 @@ void MainWindow::on_selectionChange(const QItemSelection &selection)
{
if(!selection.indexes().isEmpty()) {
auto index = selection.indexes().at(7);
ui->textEdit->setText(history_proxy.data(index).toString());
ui->plainTextEdit->setPlainText(history_proxy.data(index).toString());
index = selection.indexes().at(8);
ui->textEdit_2->setText(history_proxy.data(index).toString());
ui->plainTextEdit_2->setPlainText(history_proxy.data(index).toString());
index = selection.indexes().at(9);
ui->textEdit_3->setText(history_proxy.data(index).toString());
ui->plainTextEdit_3->setPlainText(history_proxy.data(index).toString());
index = selection.indexes().at(10);
ui->textEdit_4->setText(history_proxy.data(index).toString());
ui->plainTextEdit_4->setPlainText(history_proxy.data(index).toString());
}
}

View file

@ -130,37 +130,22 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTextEdit" name="textEdit">
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_3">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit_2"/>
</widget>
<widget class="QSplitter" name="splitter_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTextEdit" name="textEdit_2">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QTextEdit" name="textEdit_4">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit_3"/>
<widget class="QPlainTextEdit" name="plainTextEdit_4"/>
</widget>
</widget>
</item>

View file

@ -64,8 +64,8 @@ private:
const char* get_tbl = R"rstr( SELECT name FROM sqlite_master WHERE type='table' AND name=?; )rstr";
const char* get_setting = R"rstr( SELECT value FROM setting WHERE key=?; )rstr";
const char* get_request_headers = R"rstr( SELECT * FROM response_header WHERE response_id=?; )rstr";
const char* get_response_headers = R"rstr( SELECT * FROM request_header WHERE request_id=?; )rstr";
const char* get_request_headers = R"rstr( SELECT key,value FROM response_header WHERE response_id=?; )rstr";
const char* get_response_headers = R"rstr( SELECT key,value FROM request_header WHERE request_id=?; )rstr";
const char* get_all_history = R"rstr( SELECT f.id,req.timestamp_start,req.method,req.scheme,req.host,req.port,req.path,res.status_code,res.reason,res.timestamp_end-res.timestamp_start,length(res.content),req.http_version,req.content,res.http_version,res.content FROM flow f JOIN request req ON f.request_id=req.id JOIN response res ON f.response_id=res.id; )rstr";
const char* insert_request = R"rstr( INSERT INTO request (server_ip_address, tls, content, scheme, method, host, port, http_version, path, timestamp_start, timestamp_end, error) VALUES (?,?,?,?,?,?,?,?,?,?,?,?); )rstr";