mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-12 16:13:13 +02:00
added session duration and http proxy to the flags included in the closing report
This commit is contained in:
+9
-8
@@ -20,14 +20,15 @@
|
||||
|
||||
* UserWorkflow.cpp (UserWorkflow::report): see #1466 Implemented
|
||||
instrumentation that should help us improve user experience. Will
|
||||
track few things that new users do (or don't) and report as a
|
||||
combination of bit flags at the end of the GUI session. Reporting
|
||||
things such as if user looked at "Getting Started" tutorial, if
|
||||
they created their first firewall object, modified any rules,
|
||||
tried to compile or install. Information passed in the report is
|
||||
strictly a set of boolean flags, is not identifiable and does not
|
||||
reveal what firewall platform they are using or anything about
|
||||
their objects and rules.
|
||||
track few things that new users do (or don't do) and report as a
|
||||
combination of boolean flags at the end of the GUI
|
||||
session. Reporting things such as if user ever looked at the
|
||||
"Getting Started" tutorial, if they created their first firewall
|
||||
object, modified any rules, tried to compile, install or import
|
||||
existing rule set. Information passed in the report is strictly a
|
||||
set of boolean flags, it is not identifiable and does not reveal
|
||||
what firewall platform they are using or anything about their
|
||||
objects and rules. List of flags is listed in the module UserWorkflow.h
|
||||
|
||||
2010-05-23 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
|
||||
@@ -489,6 +489,9 @@ void PrefsDialog::accept()
|
||||
st->setCheckUpdates(m_dialog->checkUpdates->isChecked());
|
||||
st->setCheckUpdatesProxy(m_dialog->checkUpdatesProxy->text());
|
||||
|
||||
wfl->registerFlag(UserWorkflow::USING_HTTP_PROXY,
|
||||
!st->getCheckUpdatesProxy().isEmpty());
|
||||
|
||||
st->setSSHPath( m_dialog->sshPath->text() );
|
||||
st->setSCPPath( m_dialog->scpPath->text() );
|
||||
st->setBool("Environment/RememberSshPassEnabled", m_dialog->rememberSshPass->isChecked());
|
||||
@@ -533,10 +536,8 @@ void PrefsDialog::accept()
|
||||
|
||||
wfl->registerFlag(UserWorkflow::TIP_OF_THE_DAY_DISABLED,
|
||||
m_dialog->showTips->isChecked());
|
||||
|
||||
st->setBool("UI/NoStartTip", m_dialog->showTips->isChecked());
|
||||
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ UserWorkflow::UserWorkflow()
|
||||
str >> flags;
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug() << "UserWorkflow flags initialization:" << flagsToQueryString();
|
||||
qDebug() << "UserWorkflow flags initialization:" << flagsToQueryString(0);
|
||||
|
||||
// what if the user disabled tip of the day before they upgraded
|
||||
// to the version with UserWorkflow ? Or re-enabled version update
|
||||
@@ -84,11 +84,12 @@ void UserWorkflow::registerTutorialViewing(const QString &tutorial_name)
|
||||
registerFlag(UserWorkflow::GETTING_STARTED_TUTOTIAL, true);
|
||||
}
|
||||
|
||||
QString UserWorkflow::flagsToQueryString()
|
||||
QString UserWorkflow::flagsToQueryString(int session_duration)
|
||||
{
|
||||
// query string of flags has the format uc=0&gs=1&ft=0 ...
|
||||
// each flag is a two-characters variable with a value of 0 or 1
|
||||
QStringList fl;
|
||||
fl << QString("sd=%1").arg(session_duration);
|
||||
fl << QString("uc=%1").arg(flags.value(UPDATE_CHECKS_DISABLED));
|
||||
fl << QString("gs=%1").arg(flags.value(GETTING_STARTED_TUTOTIAL));
|
||||
fl << QString("ft=%1").arg(flags.value(NEW_FW_WITH_TEMPLATE));
|
||||
@@ -98,6 +99,7 @@ QString UserWorkflow::flagsToQueryString()
|
||||
fl << QString("in=%1").arg(flags.value(INSTALL));
|
||||
fl << QString("im=%1").arg(flags.value(IMPORT));
|
||||
fl << QString("ti=%1").arg(flags.value(TIP_OF_THE_DAY_DISABLED));
|
||||
fl << QString("pr=%1").arg(flags.value(USING_HTTP_PROXY));
|
||||
return fl.join("&");
|
||||
}
|
||||
|
||||
@@ -117,7 +119,7 @@ void UserWorkflow::report()
|
||||
str.setVersion(QDataStream::Qt_4_0);
|
||||
str << flags;
|
||||
|
||||
qDebug() << "UserWorkflow::report():" << flagsToQueryString();
|
||||
qDebug() << "UserWorkflow::report():" << flagsToQueryString(elapsed_time);
|
||||
qDebug() << "Session:" << elapsed_time << "sec";
|
||||
}
|
||||
|
||||
@@ -141,7 +143,7 @@ void UserWorkflow::report()
|
||||
// each flag is a two-characters variable with a value of 0 or 1
|
||||
|
||||
QString url = QString(report_url)
|
||||
.arg(VERSION).arg(st->getAppGUID()).arg(flagsToQueryString());
|
||||
.arg(VERSION).arg(st->getAppGUID()).arg(flagsToQueryString(elapsed_time));
|
||||
|
||||
// start http query
|
||||
if (!report_query->get(url) && fwbdebug)
|
||||
|
||||
@@ -83,6 +83,7 @@ public:
|
||||
INSTALL,
|
||||
IMPORT,
|
||||
TIP_OF_THE_DAY_DISABLED,
|
||||
USING_HTTP_PROXY,
|
||||
};
|
||||
|
||||
private:
|
||||
@@ -90,7 +91,7 @@ private:
|
||||
QHash<quint32, quint32> flags;
|
||||
HttpGet *report_query;
|
||||
|
||||
QString flagsToQueryString();
|
||||
QString flagsToQueryString(int session_duration);
|
||||
|
||||
public:
|
||||
UserWorkflow();
|
||||
|
||||
Reference in New Issue
Block a user