Skip to content

Commit

Permalink
added 3 templates to provisioning editor
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bibb committed Apr 3, 2016
1 parent da2d79c commit 4db7c2b
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 10 deletions.
20 changes: 15 additions & 5 deletions apps/cmstapp/code/provisioning/prov_ed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent) : QDialog(parent)
group_template = new QActionGroup(this);
group_template->addAction(ui.actionTemplateEduroamLong);
group_template->addAction(ui.actionTemplateEduroamShort);
group_template->addAction(ui.actionTemplateeap_peap);
group_template->addAction(ui.actionTemplateeap_tls);
group_template->addAction(ui.actionTemplateeap_ttls);

group_freeform = new QActionGroup(this);
group_freeform->addAction(ui.actionGlobal);
Expand Down Expand Up @@ -162,6 +165,10 @@ ProvisioningEditor::ProvisioningEditor(QWidget* parent) : QDialog(parent)
menu_template = new QMenu(tr("Templates"), this);menu_template->addAction(ui.actionTemplateEduroamShort);
menu_template->addAction(ui.actionTemplateEduroamLong);
menu_template->addAction(ui.actionTemplateEduroamShort);
menu_template->addSeparator();
menu_template->addAction(ui.actionTemplateeap_peap);
menu_template->addAction(ui.actionTemplateeap_tls);
menu_template->addAction(ui.actionTemplateeap_ttls);

// add menus to UI
menubar->addMenu(menu_global);
Expand Down Expand Up @@ -427,14 +434,18 @@ void ProvisioningEditor::templateTriggered(QAction* act)
// get the source string depending on the action
if (act == ui.actionTemplateEduroamLong) source = ":/text/text/eduroam_long.txt";
else if (act == ui.actionTemplateEduroamShort) source = ":/text/text/eduroam_short.txt";

else if (act == ui.actionTemplateeap_peap) source = ":/text/text/eap-peap.txt";
else if (act == ui.actionTemplateeap_tls) source = ":/text/text/eap-tls.txt";
else if (act == ui.actionTemplateeap_ttls) source = ":/text/text/eap-ttls.txt";
else return;

// get the text
QFile file(source);
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QByteArray ba = file.readAll();

// seed the textedit with the template
this->seedTextEdit(QString(ba));
// append the template to the textedit
ui.plainTextEdit_main->appendPlainText(QString(ba) );
} // if


Expand Down Expand Up @@ -592,8 +603,7 @@ void ProvisioningEditor::processFileList(const QStringList& sl_conf)

//
// Slot to seed the QTextEdit window with data read from file. Connected to
// fileReadCompleted signal in root helper. Also called directly from
// the templateTriggered slot.
// fileReadCompleted signal in root helper.
void ProvisioningEditor::seedTextEdit(const QString& data)
{
// clear the text edit and seed it with the read data
Expand Down
24 changes: 24 additions & 0 deletions apps/cmstapp/code/provisioning/ui/provisioning_editor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,30 @@
<string>IPv6.Privacy</string>
</property>
</action>
<action name="actionTemplateeap_peap">
<property name="text">
<string>EAP-PEAP</string>
</property>
<property name="toolTip">
<string>EAP-PEAP</string>
</property>
</action>
<action name="actionTemplateeap_tls">
<property name="text">
<string>EAP-TLS</string>
</property>
<property name="toolTip">
<string>EAP-TLS</string>
</property>
</action>
<action name="actionTemplateeap_ttls">
<property name="text">
<string>EAP-TTLS</string>
</property>
<property name="toolTip">
<string>EAP-TTLS</string>
</property>
</action>
</widget>
<resources/>
<connections>
Expand Down
4 changes: 2 additions & 2 deletions apps/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ DEALINGS IN THE SOFTWARE.
///////////////////////////////// Program Values ///////////////////////
//
// Program Info (may be visible, but don't mark for tranalation)
#define VERSION "2016.03.30-1"
#define VERSION "2016.04.03-1"

#define RELEASE_DATE "26 January 2016"
#define RELEASE_DATE "3 April 2016"
#define COPYRIGHT_DATE "2013-2016"

// Program Values:
Expand Down
3 changes: 3 additions & 0 deletions cmst.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<RCC>
<qresource prefix="text">
<file>text/eap-peap.txt</file>
<file>text/eap-tls.txt</file>
<file>text/eap-ttls.txt</file>
<file>text/changelog.txt</file>
<file>text/icon_def.txt</file>
<file>text/eduroam_long.txt</file>
Expand Down
3 changes: 2 additions & 1 deletion text/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<b><center>Connman System Tray (CMST)</center></b>
<b><center>Change Log</center></b>
<b>In Progress</b>
<b>2016.04.03</b>
<ul>
<li>Removed unnecessary calls to managerReacan from servicePropertyChanged slot.<li>
<li>Added nicknames for display to wired and hidden wifi connections.</li>
Expand All @@ -10,6 +10,7 @@
<li>Added ability to tether a technology.</li>
<li>Can reposition tabs in the main dialog.</li>
<li>Revise move before/after to only be active for and show services which can actually be moved.</li>
<li>Added three templates (EAP) to provisioning editor.</li>
</ul>
<b>2016.01.26</b>
<ul>
Expand Down
8 changes: 8 additions & 0 deletions text/eap-peap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[service_peap]
Type = wifi_OR_ethernet
Name = peap_ssid
EAP = peap
CACertFile = /path/to/ca.pem
Phase2 = MSCHAPV2
Identity = yourusername

9 changes: 9 additions & 0 deletions text/eap-tls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[service_tls]
Type = wifi_OR_ethernet
Name = tls_ssid
EAP = tls
CACertFile = /path/to/ca.pem
ClientCertFile = /path/to/client.pem
PrivateKeyFile = /path/to/client.fsid.pem
PrivateKeyPassphraseType = fsid
Identity = yourusername
7 changes: 7 additions & 0 deletions text/eap-ttls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[service_ttls]
Type = wifi_OR_ethernet
Name = ttls_ssid
EAP = ttls
CACertFile = /path/to/ca.pem
Phase2 = MSCHAPV2
Identity = yourusername
2 changes: 1 addition & 1 deletion text/eduroam_long.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[service_eduroam]
Type=wifi
Type=wifi_OR_ethernet
Name=eduroam
EAP=peap
CACertFile=/etc/ssl/certs/ca-certificates.crt
Expand Down
2 changes: 1 addition & 1 deletion text/eduroam_short.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[service_eduroam]
Type = wifi
Type = wifi_OR_ethernet
Name = eduroam
EAP = peap
Phase2 = MSCHAPV2

0 comments on commit 4db7c2b

Please sign in to comment.