[tracking] Switch UI to use radio buttons

Following KDE Pholio M116, switch to using a radio button; instead
of 4 individually toggle-able settings, use a "level" indicator
to select none, install, machine, user .. each of which implies
the previous levels. Each level is individually enable-able from
the distro side.
This commit is contained in:
Adriaan de Groot 2017-11-21 07:51:30 -05:00
parent 188050a77c
commit 93052311aa
7 changed files with 385 additions and 276 deletions

View file

@ -28,13 +28,9 @@
#include "utils/Retranslator.h" #include "utils/Retranslator.h"
#include "ViewManager.h" #include "ViewManager.h"
#include <QApplication> #include <QButtonGroup>
#include <QBoxLayout>
#include <QDesktopServices> #include <QDesktopServices>
#include <QFocusEvent>
#include <QLabel> #include <QLabel>
#include <QComboBox>
#include <QMessageBox>
TrackingPage::TrackingPage(QWidget *parent) TrackingPage::TrackingPage(QWidget *parent)
: QWidget( parent ) : QWidget( parent )
@ -45,41 +41,44 @@ TrackingPage::TrackingPage(QWidget *parent)
ui->setupUi( this ); ui->setupUi( this );
CALAMARES_RETRANSLATE( CALAMARES_RETRANSLATE(
ui->retranslateUi( this ); ui->retranslateUi( this );
ui->installExplanation->setText( tr( "Installation tracking helps %1 count how many people use it. If you enable install-tracking, at the end of the installation, information about your hardware will be sent <b>one time only</b> to our servers. To see what will be sent, click on the help-icon." ).arg( *StringEntry::ShortProductName ) ); ui->generalExplanation->setText( tr( "Install tracking helps %1 to see how many users they have, what hardware they install %1 to and (with the last two options below), get continuous information about preferred applications. To see what will be sent, please click the help icon next to each area." ).arg( *StringEntry::ShortProductName ) );
ui->machineExplanation->setText( tr( "Machine tracking helps %1 count how many people use it on an ongoing basis. If you enable machine-tracking, the system will send limited information about your hardware and installed software <b>periodically</b> to our servers. For information about the kind of information being sent, click on the help icon." ).arg( *StringEntry::ShortProductName ) ); ui->installExplanation->setText( tr( "By selecting this you will send information about your installation and hardware. This information will <b>only be sent once</b> after the installation finishes." ) );
ui->userExplanation->setText( tr( "User tracking helps %1 understand how people use the system and the applications. If you enable user-tracking, the system will send information about your use of the installed software <b>regularly</b> to our servers. For information about the kind of information being sent and the policies that apply, click on the help icon." ).arg( *StringEntry::ShortProductName ) ); ui->machineExplanation->setText( tr( "By selecting this you will <b>periodically</b> send information about your installation, hardware and applications, to %1." ).arg( *StringEntry::ShortProductName ) );
ui->userExplanation->setText( tr( "By selecting this you will <b>regularly</b> send information about your installation, hardware, applications and usage patterns, to %1." ).arg( *StringEntry::ShortProductName ) );
) )
QButtonGroup *group = new QButtonGroup( this );
group->setExclusive( true );
group->addButton( ui->noneRadio );
group->addButton( ui->installRadio );
group->addButton( ui->machineRadio );
group->addButton( ui->userRadio );
ui->noneRadio->setChecked( true );
} }
void TrackingPage::setTrackingOption(TrackingType t, bool setting, bool user) void TrackingPage::enableTrackingOption(TrackingType t, bool enabled)
{ {
QGroupBox* group = nullptr; QWidget* group = nullptr;
QCheckBox* check = nullptr;
switch ( t ) switch ( t )
{ {
case TrackingType::InstallTracking: case TrackingType::InstallTracking:
group = ui->installTrackingBox; group = ui->installGroup;
check = ui->installCheckBox;
break; break;
case TrackingType::MachineTracking: case TrackingType::MachineTracking:
group = ui->machineTrackingBox; group = ui->machineGroup;
check = ui->machineCheckBox;
break; break;
case TrackingType::UserTracking: case TrackingType::UserTracking:
group = ui->userTrackingBox; group = ui->userGroup;
check = ui->userCheckBox;
break; break;
} }
if ( (group != nullptr) && (check != nullptr)) if ( group != nullptr )
{ {
if ( setting ) if ( enabled )
group->show(); group->show();
else else
group->hide(); group->hide();
check->setChecked( user );
} }
else else
cDebug() << "WARNING: unknown tracking option" << int(t); cDebug() << "WARNING: unknown tracking option" << int(t);
@ -87,22 +86,22 @@ void TrackingPage::setTrackingOption(TrackingType t, bool setting, bool user)
bool TrackingPage::getTrackingOption(TrackingType t) bool TrackingPage::getTrackingOption(TrackingType t)
{ {
QCheckBox* check = nullptr; bool enabled = false;
// A tracking type is enabled if it is checked, or
// any higher level is checked.
switch ( t ) switch ( t )
{ {
case TrackingType::InstallTracking: case TrackingType::InstallTracking:
check = ui->installCheckBox; enabled |= ui->installRadio->isChecked();
break; // FALLTHRU
case TrackingType::MachineTracking: case TrackingType::MachineTracking:
check = ui->machineCheckBox; enabled |= ui->machineRadio->isChecked();
break; // FALLTHRU
case TrackingType::UserTracking: case TrackingType::UserTracking:
check = ui->userCheckBox; enabled |= ui->userRadio->isChecked();
break;
} }
return enabled;
return (check != nullptr) && check->isChecked();
} }
void TrackingPage::setTrackingPolicy(TrackingType t, QString url) void TrackingPage::setTrackingPolicy(TrackingType t, QString url)
@ -132,3 +131,36 @@ void TrackingPage::setTrackingPolicy(TrackingType t, QString url)
else else
cDebug() << "WARNING: unknown tracking option" << int(t); cDebug() << "WARNING: unknown tracking option" << int(t);
} }
void TrackingPage::setGeneralPolicy( QString url )
{
if ( url.isEmpty() )
ui->generalPolicyLabel->hide();
else
{
ui->generalPolicyLabel->show();
ui->generalPolicyLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
ui->generalPolicyLabel->show();
connect( ui->generalPolicyLabel, &QLabel::linkActivated, [url]{ QDesktopServices::openUrl( url ); } );
}
}
void TrackingPage::setTrackingLevel(const QString& l)
{
QString level = l.toLower();
QRadioButton* button = nullptr;
if (level.isEmpty() || level == "none")
button = ui->noneRadio;
else if (level == "install")
button = ui->installRadio;
else if (level == "machine")
button = ui->machineRadio;
else if (level == "user")
button = ui->userRadio;
if ( button != nullptr )
button->setChecked( true );
else
cDebug() << "WARNING: unknown default tracking level" << l;
}

View file

@ -39,14 +39,23 @@ public:
* Enables or disables the tracking-option block for the given * Enables or disables the tracking-option block for the given
* tracking option @p t, and sets the initial state of the * tracking option @p t, and sets the initial state of the
* checkbox to the @p user default. * checkbox to the @p user default.
*
* Call this in ascending order of tracking type.
*/ */
void setTrackingOption( TrackingType t, bool setting, bool user ); void enableTrackingOption( TrackingType t, bool enabled );
/** /**
* Returns the state of the user checkbox for tracking option @p t. * Returns whether tracking type @p is selected by the user
* (i.e. is the radio button for that level, or for a higher
* tracking level, enabled).
*/ */
bool getTrackingOption( TrackingType t ); bool getTrackingOption( TrackingType t );
/* URL for given level @p t */
void setTrackingPolicy( TrackingType t, QString url ); void setTrackingPolicy( TrackingType t, QString url );
/* URL for the global link */
void setGeneralPolicy( QString url );
/* Select one of the four levels by name */
void setTrackingLevel( const QString& level );
private: private:
Ui::TrackingPage* ui; Ui::TrackingPage* ui;

View file

@ -102,12 +102,12 @@ TrackingViewStep::isAtEnd() const
void TrackingViewStep::onLeave() void TrackingViewStep::onLeave()
{ {
cDebug() << "Install tracking:" << m_installTracking.userEnabled = m_widget->getTrackingOption( TrackingType::InstallTracking );
(tracking( TrackingType::InstallTracking ).userEnabled = m_widget->getTrackingOption( TrackingType::InstallTracking )); m_machineTracking.userEnabled = m_widget->getTrackingOption( TrackingType::MachineTracking );
cDebug() << "Machine tracking:" << m_userTracking.userEnabled = m_widget->getTrackingOption( TrackingType::UserTracking );
(tracking( TrackingType::MachineTracking ).userEnabled = m_widget->getTrackingOption( TrackingType::MachineTracking )); cDebug() << "Install tracking:" << m_installTracking.enabled();
cDebug() << " User tracking:" << cDebug() << "Machine tracking:" << m_machineTracking.enabled();
(tracking( TrackingType::UserTracking ).userEnabled = m_widget->getTrackingOption( TrackingType::UserTracking )); cDebug() << " User tracking:" << m_userTracking.enabled();
} }
@ -141,10 +141,7 @@ TrackingViewStep::jobs() const
QVariantMap TrackingViewStep::setTrackingOption(const QVariantMap& configurationMap, const QString& key, TrackingType t) QVariantMap TrackingViewStep::setTrackingOption(const QVariantMap& configurationMap, const QString& key, TrackingType t)
{ {
cDebug() << "Tracking configuration" << key;
bool settingEnabled = false; bool settingEnabled = false;
bool userEnabled = false;
bool success = false; bool success = false;
auto config = CalamaresUtils::getSubMap( configurationMap, key, success ); auto config = CalamaresUtils::getSubMap( configurationMap, key, success );
@ -152,15 +149,13 @@ QVariantMap TrackingViewStep::setTrackingOption(const QVariantMap& configuration
if ( success ) if ( success )
{ {
settingEnabled = CalamaresUtils::getBool( config, "enabled", false ); settingEnabled = CalamaresUtils::getBool( config, "enabled", false );
userEnabled = settingEnabled && CalamaresUtils::getBool( config, "default", false );
} }
cDebug() << " .. settable=" << settingEnabled << "default=" << userEnabled;
TrackingEnabled& trackingConfiguration = tracking( t ); TrackingEnabled& trackingConfiguration = tracking( t );
trackingConfiguration.settingEnabled = settingEnabled; trackingConfiguration.settingEnabled = settingEnabled;
trackingConfiguration.userEnabled = userEnabled; trackingConfiguration.userEnabled = false;
m_widget->setTrackingOption(t, settingEnabled, userEnabled); m_widget->enableTrackingOption(t, settingEnabled);
m_widget->setTrackingPolicy(t, CalamaresUtils::getString( config, "policy" ) ); m_widget->setTrackingPolicy(t, CalamaresUtils::getString( config, "policy" ) );
return config; return config;
@ -177,4 +172,7 @@ TrackingViewStep::setConfigurationMap( const QVariantMap& configurationMap )
setTrackingOption( configurationMap, "machine", TrackingType::MachineTracking ); setTrackingOption( configurationMap, "machine", TrackingType::MachineTracking );
setTrackingOption( configurationMap, "user", TrackingType::UserTracking ); setTrackingOption( configurationMap, "user", TrackingType::UserTracking );
m_widget->setGeneralPolicy( CalamaresUtils::getString( configurationMap, "policy" ) );
m_widget->setTrackingLevel( CalamaresUtils::getString( configurationMap, "default" ) );
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

View file

@ -1,5 +1,6 @@
<RCC> <RCC>
<qresource prefix="tracking"> <qresource prefix="tracking">
<file>none.png</file>
<file>machine.png</file> <file>machine.png</file>
<file>../../../data/images/information.svgz</file> <file>../../../data/images/information.svgz</file>
<file>binoculars.png</file> <file>binoculars.png</file>

View file

@ -13,230 +13,289 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0,0,0,0,0">
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,0"> <widget class="QLabel" name="label">
<item> <property name="text">
<widget class="QGroupBox" name="installTrackingBox"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:16pt;&quot;&gt;Install Tracking&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<property name="title"> </property>
<string>Install Tracking</string> </widget>
</property> </item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <item>
<item> <widget class="QLabel" name="generalExplanation">
<layout class="QVBoxLayout" name="verticalLayout_2"> <property name="text">
<item> <string>Placeholder</string>
<layout class="QHBoxLayout" name="horizontalLayout_2"> </property>
<item> <property name="wordWrap">
<widget class="QLabel" name="installActionIcon"> <bool>true</bool>
<property name="maximumSize"> </property>
<size> </widget>
<width>64</width> </item>
<height>64</height> <item>
</size> <widget class="QWidget" name="noneGroup" native="true">
</property> <layout class="QHBoxLayout" name="noneLayout">
<property name="baseSize"> <item>
<size> <widget class="QRadioButton" name="noneRadio">
<width>64</width> <property name="text">
<height>64</height> <string/>
</size> </property>
</property> </widget>
<property name="text"> </item>
<string/> <item>
</property> <widget class="QLabel" name="noneIcon">
<property name="pixmap"> <property name="maximumSize">
<pixmap resource="page_trackingstep.qrc">:/tracking/phone.png</pixmap> <size>
</property> <width>64</width>
</widget> <height>64</height>
</item> </size>
<item> </property>
<widget class="QLabel" name="installExplanation"> <property name="baseSize">
<property name="text"> <size>
<string>Placeholder text</string> <width>64</width>
</property> <height>64</height>
<property name="textFormat"> </size>
<enum>Qt::RichText</enum> </property>
</property> <property name="text">
<property name="wordWrap"> <string/>
<bool>true</bool> </property>
</property> <property name="pixmap">
</widget> <pixmap resource="page_trackingstep.qrc">:/tracking/none.png</pixmap>
</item> </property>
<item> </widget>
<widget class="QToolButton" name="installPolicyButton"> </item>
<property name="text"> <item>
<string>...</string> <widget class="QLabel" name="noneExplanation">
</property> <property name="sizePolicy">
<property name="icon"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<iconset resource="page_trackingstep.qrc"> <horstretch>0</horstretch>
<normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="arrowType"> </property>
<enum>Qt::NoArrow</enum> <property name="text">
</property> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;By selecting this, you will send &lt;span style=&quot; font-weight:600;&quot;&gt;no information at all&lt;/span&gt; about your installation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</widget> </property>
</item> <property name="wordWrap">
</layout> <bool>true</bool>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="installCheckBox"> </item>
<property name="text"> </layout>
<string>Enable install-tracking</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QWidget" name="installGroup" native="true">
</layout> <layout class="QHBoxLayout" name="installLayout">
</item> <item>
</layout> <widget class="QRadioButton" name="installRadio">
</widget> <property name="text">
</item> <string/>
<item> </property>
<widget class="QGroupBox" name="machineTrackingBox"> </widget>
<property name="title"> </item>
<string>Machine Tracking</string> <item>
</property> <widget class="QLabel" name="installIcon">
<layout class="QVBoxLayout" name="verticalLayout_7"> <property name="maximumSize">
<item> <size>
<layout class="QVBoxLayout" name="verticalLayout_4"> <width>64</width>
<item> <height>64</height>
<layout class="QHBoxLayout" name="horizontalLayout_3"> </size>
<item> </property>
<widget class="QLabel" name="machineActionIcon"> <property name="baseSize">
<property name="maximumSize"> <size>
<size> <width>64</width>
<width>64</width> <height>64</height>
<height>64</height> </size>
</size> </property>
</property> <property name="text">
<property name="baseSize"> <string/>
<size> </property>
<width>64</width> <property name="pixmap">
<height>64</height> <pixmap resource="page_trackingstep.qrc">:/tracking/phone.png</pixmap>
</size> </property>
</property> </widget>
<property name="text"> </item>
<string/> <item>
</property> <widget class="QLabel" name="installExplanation">
<property name="pixmap"> <property name="sizePolicy">
<pixmap resource="page_trackingstep.qrc">:/tracking/machine.png</pixmap> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
</property> <horstretch>0</horstretch>
</widget> <verstretch>0</verstretch>
</item> </sizepolicy>
<item> </property>
<widget class="QLabel" name="machineExplanation"> <property name="text">
<property name="text"> <string>TextLabel</string>
<string>Placeholder text</string> </property>
</property> <property name="wordWrap">
<property name="wordWrap"> <bool>true</bool>
<bool>true</bool> </property>
</property> </widget>
</widget> </item>
</item> <item>
<item> <widget class="QToolButton" name="installPolicyButton">
<widget class="QToolButton" name="machinePolicyButton"> <property name="text">
<property name="text"> <string>...</string>
<string>...</string> </property>
</property> <property name="icon">
<property name="icon"> <iconset resource="page_trackingstep.qrc">
<iconset resource="page_trackingstep.qrc"> <normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset>
<normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset> </property>
</property> </widget>
</widget> </item>
</item> </layout>
</layout> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="machineCheckBox"> <widget class="QWidget" name="machineGroup" native="true">
<property name="text"> <layout class="QHBoxLayout" name="machineLayout">
<string>Enable machine-tracking</string> <item>
</property> <widget class="QRadioButton" name="machineRadio">
</widget> <property name="text">
</item> <string/>
</layout> </property>
</item> </widget>
</layout> </item>
</widget> <item>
</item> <widget class="QLabel" name="machineIcon">
<item> <property name="maximumSize">
<widget class="QGroupBox" name="userTrackingBox"> <size>
<property name="title"> <width>64</width>
<string>User Tracking</string> <height>64</height>
</property> </size>
<layout class="QVBoxLayout" name="verticalLayout_6"> </property>
<item> <property name="baseSize">
<layout class="QVBoxLayout" name="verticalLayout_5"> <size>
<item> <width>64</width>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <height>64</height>
<item> </size>
<widget class="QLabel" name="userActionIcon"> </property>
<property name="maximumSize"> <property name="text">
<size> <string/>
<width>64</width> </property>
<height>64</height> <property name="pixmap">
</size> <pixmap resource="page_trackingstep.qrc">:/tracking/machine.png</pixmap>
</property> </property>
<property name="baseSize"> </widget>
<size> </item>
<width>64</width> <item>
<height>64</height> <widget class="QLabel" name="machineExplanation">
</size> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<property name="text"> <horstretch>0</horstretch>
<string/> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="pixmap"> </property>
<pixmap resource="page_trackingstep.qrc">:/tracking/binoculars.png</pixmap> <property name="text">
</property> <string>TextLabel</string>
</widget> </property>
</item> <property name="wordWrap">
<item> <bool>true</bool>
<widget class="QLabel" name="userExplanation"> </property>
<property name="text"> </widget>
<string>Placeholder text</string> </item>
</property> <item>
<property name="wordWrap"> <widget class="QToolButton" name="machinePolicyButton">
<bool>true</bool> <property name="text">
</property> <string>...</string>
</widget> </property>
</item> <property name="icon">
<item> <iconset resource="page_trackingstep.qrc">
<widget class="QToolButton" name="userPolicyButton"> <normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset>
<property name="text"> </property>
<string>...</string> </widget>
</property> </item>
<property name="icon"> </layout>
<iconset resource="page_trackingstep.qrc"> </widget>
<normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset> </item>
</property> <item>
</widget> <widget class="QWidget" name="userGroup" native="true">
</item> <layout class="QHBoxLayout" name="userLayout">
</layout> <item>
</item> <widget class="QRadioButton" name="userRadio">
<item> <property name="text">
<widget class="QCheckBox" name="userCheckBox"> <string/>
<property name="text"> </property>
<string>Enable user-tracking</string> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QLabel" name="userIcon">
</layout> <property name="maximumSize">
</item> <size>
</layout> <width>64</width>
</widget> <height>64</height>
</item> </size>
<item> </property>
<spacer name="verticalSpacer"> <property name="baseSize">
<property name="orientation"> <size>
<enum>Qt::Vertical</enum> <width>64</width>
</property> <height>64</height>
<property name="sizeHint" stdset="0"> </size>
<size> </property>
<width>20</width> <property name="text">
<height>40</height> <string/>
</size> </property>
</property> <property name="pixmap">
</spacer> <pixmap resource="page_trackingstep.qrc">:/tracking/binoculars.png</pixmap>
</item> </property>
</layout> </widget>
</item>
<item>
<widget class="QLabel" name="userExplanation">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>TextLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="userPolicyButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="page_trackingstep.qrc">
<normaloff>:/tracking/data/images/information.svgz</normaloff>:/tracking/data/images/information.svgz</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="generalPolicyLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;placeholder&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2980b9;&quot;&gt;Click here for more information about Install Tracking&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="openExternalLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget> </widget>

View file

@ -27,11 +27,9 @@
# with the appropriate framework, and the KDE User Telemetry # with the appropriate framework, and the KDE User Telemetry
# policy applies. # policy applies.
# #
# Each area has a key *enabled*, and a key *default*. If the area # Each area has a key *enabled*. If the area is enabled, it is shown to
# is enabled, it is shown to the user with a checkbox to enable # the user. This defaults to off, which means no tracking would be
# or disable that piece of user-tracking. The default state of that # configured or enabled by Calamares.
# checkbox is set to the value of *default*. Both keys default to
# "off", disabling all tracking-configuration through Calamares.
# #
# Each area has a key *policy*, which is a Url to be opened when # Each area has a key *policy*, which is a Url to be opened when
# the user clicks on the corresponding Help button for an explanation # the user clicks on the corresponding Help button for an explanation
@ -41,7 +39,22 @@
# #
# Each area may have other configuration keys, depending on the # Each area may have other configuration keys, depending on the
# area and how it needs to be configured. # area and how it needs to be configured.
#
# Globally, there are two other keys:
#
# policy: (optional) url about tracking settings for this distro.
# default: (optional) level to enable by default
#
--- ---
# This is the global policy; it is displayed as a link on the page.
# If blank or commented out, no link is displayed on the tracking
# page. It is recommended to either provide policy URLs for each
# area, *or* one general link, and not to mix them.
policy: "https://github.com/calamares/calamares/wiki/Users-Guide#installation-tracking"
# This is the default level to enable for tracking. If commented out,
# empty, or otherwise invalid, "none" is used, so no tracking by default.
default: user
# The install area has one specific configuration key: # The install area has one specific configuration key:
# url: this URL (remember to include the protocol, and prefer https) # url: this URL (remember to include the protocol, and prefer https)
@ -58,7 +71,6 @@
# module then. # module then.
install: install:
enabled: false enabled: false
default: false
policy: "https://github.com/calamares/calamares/wiki/Users-Guide#installation-tracking" policy: "https://github.com/calamares/calamares/wiki/Users-Guide#installation-tracking"
# url: "https://example.com/install.php?c=$CPU&m=$MEMORY" # url: "https://example.com/install.php?c=$CPU&m=$MEMORY"
@ -69,10 +81,8 @@ install:
# system to enable system-tracking. # system to enable system-tracking.
machine: machine:
enabled: false enabled: false
default: false
style: neon style: neon
# The user area is not yet implemented, and has no specific configuration. # The user area is not yet implemented, and has no specific configuration.
user: user:
enabled: false enabled: false
default: false