diff --git a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp
index e5aae3b49..ad0c261c9 100644
--- a/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp
+++ b/retroshare-gui/src/gui/Identity/IdDetailsDialog.cpp
@@ -17,6 +17,7 @@
* along with this program. If not, see . *
* *
*******************************************************************************/
+#include
#include "IdDetailsDialog.h"
#include "ui_IdDetailsDialog.h"
@@ -53,6 +54,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
+ mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created);
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->ownOpinion_CB);
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->overallOpinion_TF);
@@ -63,6 +65,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId);
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
+ mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created);
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
@@ -70,6 +73,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId);
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
+ mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Created);
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
@@ -80,7 +84,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
Settings->loadWidgetInformation(this);
- ui->headerFrame->setHeaderImage(QPixmap(":/images/identity/identity_64.png"));
+ ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/person.png"));
ui->headerFrame->setHeaderText(tr("Person Details"));
//connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup()));
@@ -178,8 +182,10 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
ui->autoBanIdentities_CB->setVisible(!data.mPgpId.isNull()) ;
ui->banoption_label->setVisible(!data.mPgpId.isNull()) ;
- time_t now = time(NULL) ;
- ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ;
+ ui->lineEdit_Created->setText(QDateTime::fromMSecsSinceEpoch(qint64(1000)*data.mMeta.mPublishTs).toString(Qt::SystemLocaleShortDate));
+
+ time_t now = time(NULL) ;
+ ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ;
QPixmap pixmap;
diff --git a/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui b/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui
index 73e1006f0..3faad4076 100644
--- a/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui
+++ b/retroshare-gui/src/gui/Identity/IdDetailsDialog.ui
@@ -17,7 +17,7 @@
:/images/logo/logo_32.png:/images/logo/logo_32.png
-
+
0
@@ -30,6 +30,9 @@
0
+
+ 0
+
-
-
-
+
9
@@ -52,235 +55,99 @@
9
- 0
+ 9
-
Identity Info
-
-
-
-
-
- 6
+
+
-
+
+
+ Qt::Vertical
-
- 6
+
+
+ 20
+ 40
+
-
- 6
-
-
- 6
-
-
-
-
-
-
- 75
- true
-
-
-
- Overall:
-
-
-
- -
-
-
- Friends votes:
-
-
-
- -
-
-
- Your opinion:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the average of your friend's opinions. If not, your own opinion gives the score.</span></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -0.6, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a higher reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 30 days). </span></p></body></html>
-
-
- 0
-
-
-
-
- Negative
-
-
-
- :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png
-
-
- -
-
- Neutral
-
-
-
- :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png
-
-
- -
-
- Positive
-
-
-
- :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png
-
-
-
-
- -
-
-
- <html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html>
-
-
- true
-
-
-
- -
-
-
- Owner node ID :
-
-
-
- -
-
-
- Type:
-
-
-
- -
-
-
- Owner node name :
-
-
-
- -
-
-
- Identity name :
-
-
-
- -
-
-
- Identity ID :
-
-
-
- -
-
-
- Last used:
-
-
-
- -
-
-
- Ban-option:
-
-
-
- -
-
-
- Auto-Ban all identities signed by the same node
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
-
+
- -
+
-
+
+
+ Ban-option:
+
+
+
+ -
+
+
+ <html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html>
+
+
+ true
+
+
+
+ -
+
+
+ Auto-Ban all identities signed by the same node
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Overall:
+
+
+
+ -
+
+
+ Type:
+
+
+
+ -
+
+
+ Identity ID :
+
+
+
+ -
+
+
+ -
+
+
+ Owner node ID :
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
QLayout::SetDefaultConstraint
@@ -426,25 +293,172 @@ p, li { white-space: pre-wrap; }
- -
-
-
- Qt::Vertical
+
-
+
+
+ Owner node name :
-
-
- 20
- 40
-
+
+
+ -
+
+
+ true
-
+
+ true
+
+
+
+ -
+
+
+ Last used:
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Identity name :
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Friends votes:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the average of your friend's opinions. If not, your own opinion gives the score.</span></p>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -0.6, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a higher reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 30 days). </span></p></body></html>
+
+
+ 0
+
+
-
+
+ Negative
+
+
+
+ :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png
+
+
+ -
+
+ Neutral
+
+
+
+ :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png
+
+
+ -
+
+ Positive
+
+
+
+ :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png
+
+
+
+
+ -
+
+
+ Your opinion:
+
+
+
+ -
+
+
+ <html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html>
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Created :
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
- -
+
-
9
@@ -483,19 +497,6 @@ p, li { white-space: pre-wrap; }
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
diff --git a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp
index 85adb8293..0a992353b 100644
--- a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp
+++ b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.cpp
@@ -18,6 +18,7 @@
* *
*******************************************************************************/
+#include
#include
#include
#include
@@ -39,6 +40,9 @@
#include "gui/Identity/IdDetailsDialog.h"
#include "gui/settings/rsharesettings.h"
+#include "gui/gxs/GxsIdDetails.h"
+#include "gui/gxs/GxsIdTreeWidgetItem.h"
+#include "util/DateTime.h"
#include "util/QtVersion.h"
#include "util/misc.h"
@@ -49,9 +53,11 @@
#define COL_TUNNELSTATUS 4
#define COL_DATASIZE 5
#define COL_DATAHASH 6
-#define COL_RECEIVED 7
-#define COL_SEND 8
+#define COL_RECEIVED 7
+#define COL_SEND 8
#define COL_DUPLICATION_FACTOR 9
+#define COL_RECEIVEDTIME 10
+#define COL_SENDTIME 11
static const int PARTIAL_VIEW_SIZE = 9 ;
//static const int MAX_TUNNEL_REQUESTS_DISPLAY = 10 ;
@@ -65,7 +71,7 @@ static QColor colorScale(float f)
}
GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent)
- : RsAutoUpdatePage(2000,parent)
+ : RsAutoUpdatePage(4000,parent)
{
setupUi(this) ;
@@ -168,7 +174,8 @@ void GlobalRouterStatistics::updateContent()
for(uint32_t i=0;iaddTopLevelItem(item);
RsIdentityDetails details ;
@@ -177,7 +184,13 @@ void GlobalRouterStatistics::updateContent()
if(nicknames.isEmpty())
nicknames = tr("Unknown");
-
+
+ QDateTime routingtime;
+ routingtime.setTime_t(cache_infos[i].routing_time);
+ QDateTime senttime;
+ senttime.setTime_t(cache_infos[i].last_sent_time);
+
+ item -> setId(cache_infos[i].destination,COL_NICKNAME, false) ;
item -> setData(COL_ID, Qt::DisplayRole, QString::number(cache_infos[i].mid,16).rightJustified(16,'0'));
item -> setData(COL_NICKNAME, Qt::DisplayRole, nicknames ) ;
item -> setData(COL_DESTINATION, Qt::DisplayRole, QString::fromStdString(cache_infos[i].destination.toStdString()));
@@ -185,9 +198,11 @@ void GlobalRouterStatistics::updateContent()
item -> setData(COL_TUNNELSTATUS, Qt::DisplayRole, tunnel_status_string[cache_infos[i].tunnel_status % 3]);
item -> setData(COL_DATASIZE, Qt::DisplayRole, misc::friendlyUnit(cache_infos[i].data_size));
item -> setData(COL_DATAHASH, Qt::DisplayRole, QString::fromStdString(cache_infos[i].item_hash.toStdString()));
- item -> setData(COL_RECEIVED, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time));
- item -> setData(COL_SEND, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time));
- item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor));
+ item -> setData(COL_RECEIVED, Qt::DisplayRole, DateTime::formatDateTime(routingtime));
+ item -> setData(COL_SEND, Qt::DisplayRole, DateTime::formatDateTime(senttime));
+ item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor));
+ item -> setData(COL_RECEIVEDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time));
+ item -> setData(COL_SENDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time));
}
}
diff --git a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui
index 1a5133251..83de70e5b 100644
--- a/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui
+++ b/retroshare-gui/src/gui/statistics/GlobalRouterStatistics.ui
@@ -91,6 +91,21 @@
Data hash
+
+
+ Receive time
+
+
+
+
+ Sending time
+
+
+
+
+ Branching factor
+
+
Receive time (secs ago)
@@ -101,11 +116,6 @@
Sending time (secs ago)
-
-
- Branching factor
-
-
diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp
index 87b59cb16..b5a42264e 100644
--- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp
+++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.cpp
@@ -33,7 +33,6 @@
#include
#include
-
#include
#include
#include
@@ -47,6 +46,8 @@
#include "gui/common/UIStateHelper.h"
#include "util/misc.h"
#include "gui/gxs/GxsIdLabel.h"
+#include "gui/gxs/GxsIdDetails.h"
+#include "gui/gxs/GxsIdTreeWidgetItem.h"
#define COL_PENDING_ID 0
#define COL_PENDING_DESTINATION 1
@@ -55,6 +56,8 @@
#define COL_PENDING_DATAHASH 4
#define COL_PENDING_SEND 5
#define COL_PENDING_GROUP_ID 6
+#define COL_PENDING_SENDTIME 7
+#define COL_PENDING_DESTINATION_ID 8
#define COL_GROUP_GRP_ID 0
#define COL_GROUP_NUM_MSGS 1
@@ -89,9 +92,11 @@ GxsTransportStatistics::GxsTransportStatistics(QWidget *parent)
/* Set header resize modes and initial section sizes Uploads TreeView*/
QHeaderView_setSectionResizeMode(treeWidget->header(), QHeaderView::ResizeToContents);
+ QHeaderView_setSectionResizeMode(groupTreeWidget->header(), QHeaderView::ResizeToContents);
connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CustomPopupMenu(QPoint)));
-
+
+ treeWidget->setColumnHidden(COL_PENDING_DESTINATION_ID,true);
// load settings
processSettings(true);
@@ -204,6 +209,8 @@ void GxsTransportStatistics::updateContent()
//time_t now = time(NULL) ;
// 1 - fill the table for pending packets
+
+ time_t now = time(NULL) ;
groupBox->setTitle(tr("Pending data items")+": " + QString::number(transinfo.outgoing_records.size()) );
@@ -211,7 +218,8 @@ void GxsTransportStatistics::updateContent()
{
const RsGxsTransOutgoingRecord& rec(transinfo.outgoing_records[i]) ;
- QTreeWidgetItem *item = new QTreeWidgetItem();
+ //QTreeWidgetItem *item = new QTreeWidgetItem();
+ GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(NULL,GxsIdDetails::ICON_TYPE_AVATAR) ;
treeWidget->addTopLevelItem(item);
RsIdentityDetails details ;
@@ -221,17 +229,19 @@ void GxsTransportStatistics::updateContent()
if(nickname.isEmpty())
nickname = tr("Unknown");
+ item -> setId(rec.recipient,COL_PENDING_DESTINATION, false) ;
item -> setData(COL_PENDING_ID, Qt::DisplayRole, QString::number(rec.trans_id,16).rightJustified(8,'0'));
item -> setData(COL_PENDING_DATASTATUS, Qt::DisplayRole, getStatusString(rec.status));
item -> setData(COL_PENDING_DATASIZE, Qt::DisplayRole, misc::friendlyUnit(rec.data_size));
item -> setData(COL_PENDING_DATAHASH, Qt::DisplayRole, QString::fromStdString(rec.data_hash.toStdString()));
item -> setData(COL_PENDING_SEND, Qt::DisplayRole, QDateTime::fromTime_t(rec.send_TS).toString());
item -> setData(COL_PENDING_GROUP_ID, Qt::DisplayRole, QString::fromStdString(rec.group_id.toStdString()));
+ item -> setData(COL_PENDING_DESTINATION_ID, Qt::DisplayRole, QString::fromStdString(rec.recipient.toStdString()));
+ item -> setData(COL_PENDING_SENDTIME, Qt::DisplayRole, QString::number(now - rec.send_TS));
- GxsIdLabel *label = new GxsIdLabel() ;
- label->setId(rec.recipient) ;
+ item->setTextAlignment(COL_PENDING_DATASIZE, Qt::AlignRight );
+ item->setTextAlignment(COL_PENDING_SEND, Qt::AlignRight );
- treeWidget -> setItemWidget(item,COL_PENDING_DESTINATION, label) ;
}
// 2 - fill the table for pending group data
@@ -293,6 +303,16 @@ void GxsTransportStatistics::updateContent()
GxsIdLabel *label = new GxsIdLabel();
label->setId(meta.mAuthorId) ;
groupTreeWidget->setItemWidget(sitem,COL_GROUP_GRP_ID,label) ;
+
+ RsIdentityDetails idDetails ;
+ rsIdentity->getIdDetails(meta.mAuthorId,idDetails);
+
+ QPixmap pixmap ;
+
+ if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL))
+ pixmap = GxsIdDetails::makeDefaultIcon(meta.mAuthorId,GxsIdDetails::SMALL);
+
+ sitem->setIcon(COL_GROUP_GRP_ID, QIcon(pixmap));
sitem->setData(COL_GROUP_UNIQUE_ID, Qt::DisplayRole,QString::fromStdString(meta.mMsgId.toStdString()));
sitem->setData(COL_GROUP_NUM_MSGS,Qt::DisplayRole, QDateTime::fromTime_t(meta.mPublishTs).toString());
@@ -303,7 +323,7 @@ void GxsTransportStatistics::updateContent()
void GxsTransportStatistics::personDetails()
{
QTreeWidgetItem *item = treeWidget->currentItem();
- std::string id = item->text(COL_PENDING_DESTINATION).toStdString();
+ std::string id = item->text(COL_PENDING_DESTINATION_ID).toStdString();
if (id.empty()) {
return;
diff --git a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui
index 07b726275..e2c7449c0 100644
--- a/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui
+++ b/retroshare-gui/src/gui/statistics/GxsTransportStatistics.ui
@@ -70,7 +70,7 @@
- Sending time (secs ago)
+ Sending time
@@ -78,6 +78,16 @@
Group ID
+
+
+ Sending time (secs ago)
+
+
+
+
+ Destination ID
+
+
@@ -95,6 +105,9 @@
Qt::Vertical
+
+ Qt::CustomContextMenu
+
Group ID / Author