Change all URLs to jump URLs
This commit is contained in:
parent
f9b83763bd
commit
b3fb053cca
38
client/jumpurl.h
Normal file
38
client/jumpurl.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright (C) 2017 Srivats P.
|
||||||
|
|
||||||
|
This file is part of "Ostinato"
|
||||||
|
|
||||||
|
This is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _JUMP_URL_H
|
||||||
|
#define _JUMP_URL_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
inline QString jumpUrl(
|
||||||
|
QString keyword,
|
||||||
|
QString source="app",
|
||||||
|
QString medium="hint",
|
||||||
|
QString name="help")
|
||||||
|
{
|
||||||
|
return QString("http://jump.ostinato.org/" + keyword + "?"
|
||||||
|
+ "utm_source=" + source + "&"
|
||||||
|
+ "utm_medium=" + medium + "&"
|
||||||
|
+ "utm_campaign=" + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
#include "dbgthread.h"
|
#include "dbgthread.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "jumpurl.h"
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "portgrouplist.h"
|
#include "portgrouplist.h"
|
||||||
#include "portstatswindow.h"
|
#include "portstatswindow.h"
|
||||||
@ -313,8 +314,7 @@ void MainWindow::on_actionViewRestoreDefaults_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionHelpOnline_triggered()
|
void MainWindow::on_actionHelpOnline_triggered()
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(
|
QDesktopServices::openUrl(QUrl(jumpUrl("help", "app", "menu")));
|
||||||
QUrl("http://ostinato.org/docs/?utm_source=app&utm_medium=menu&utm_campaign=help"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionHelpAbout_triggered()
|
void MainWindow::on_actionHelpAbout_triggered()
|
||||||
@ -376,28 +376,29 @@ void MainWindow::reportLocalServerError()
|
|||||||
if (localServer_->exitCode() == STATUS_DLL_NOT_FOUND)
|
if (localServer_->exitCode() == STATUS_DLL_NOT_FOUND)
|
||||||
errorStr.append(tr("<p>This is most likely because Packet.dll "
|
errorStr.append(tr("<p>This is most likely because Packet.dll "
|
||||||
"was not found - make sure you have "
|
"was not found - make sure you have "
|
||||||
"<a href='http://www.winpcap.org'>WinPcap</a> "
|
"<a href='%1'>WinPcap"
|
||||||
"installed.</p>"));
|
"</a> installed.</p>")
|
||||||
|
.arg(jumpUrl("winpcap")));
|
||||||
#endif
|
#endif
|
||||||
msgBox.setText(errorStr);
|
msgBox.setText(errorStr);
|
||||||
msgBox.setInformativeText(tr("Try running drone directly."));
|
msgBox.setInformativeText(tr("Try running drone directly."));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
||||||
QString archUrl("https://userguide.ostinato.org/Architecture.html");
|
|
||||||
QMessageBox::information(this, QString(),
|
QMessageBox::information(this, QString(),
|
||||||
tr("<p>If you have remote drone agents running, you can still add "
|
tr("<p>If you have remote drone agents running, you can still add "
|
||||||
"and connect to them.</p>"
|
"and connect to them.</p>"
|
||||||
"<p>If you don't want to start the local drone agent at startup, "
|
"<p>If you don't want to start the local drone agent at startup, "
|
||||||
"provide the <b>-s</b> option to Ostinato on the command line.</p>"
|
"provide the <b>-s</b> option to Ostinato on the command line.</p>"
|
||||||
"<p>Learn about Ostinato's <a href='%1'>Controller-Agent "
|
"<p>Learn about Ostinato's <a href='%1'>Controller-Agent "
|
||||||
"architecture</a></p>").arg(archUrl));
|
"architecture</a></p>").arg(jumpUrl("arch")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onNewVersion(QString newVersion)
|
void MainWindow::onNewVersion(QString newVersion)
|
||||||
{
|
{
|
||||||
QLabel *msg = new QLabel(tr("New Ostinato version %1 available. Visit "
|
QLabel *msg = new QLabel(tr("New Ostinato version %1 available. Visit "
|
||||||
"<a href='http://ostinato.org'>ostinato.org</a> to download")
|
"<a href='%2'>ostinato.org</a> to download")
|
||||||
.arg(newVersion));
|
.arg(newVersion)
|
||||||
|
.arg(jumpUrl("download", "app", "status", "update")));
|
||||||
msg->setOpenExternalLinks(true);
|
msg->setOpenExternalLinks(true);
|
||||||
statusBar()->addPermanentWidget(msg);
|
statusBar()->addPermanentWidget(msg);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "portgroup.h"
|
#include "portgroup.h"
|
||||||
|
|
||||||
|
#include "jumpurl.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
#include "emulproto.pb.h"
|
#include "emulproto.pb.h"
|
||||||
@ -315,7 +316,6 @@ void PortGroup::on_rpcChannel_notification(int notifType,
|
|||||||
|
|
||||||
void PortGroup::when_portListChanged(quint32 /*portGroupId*/)
|
void PortGroup::when_portListChanged(quint32 /*portGroupId*/)
|
||||||
{
|
{
|
||||||
QString faq("http://ostinato.org/docs/faq#q-port-group-has-no-interfaces");
|
|
||||||
if (state() == QAbstractSocket::ConnectedState && numPorts() <= 0)
|
if (state() == QAbstractSocket::ConnectedState && numPorts() <= 0)
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
@ -330,7 +330,7 @@ void PortGroup::when_portListChanged(quint32 /*portGroupId*/)
|
|||||||
.arg(int(serverPort()));
|
.arg(int(serverPort()));
|
||||||
msgBox.setText(msg);
|
msgBox.setText(msg);
|
||||||
msgBox.setInformativeText(tr("See the <a href='%1'>Ostinato FAQ</a> "
|
msgBox.setInformativeText(tr("See the <a href='%1'>Ostinato FAQ</a> "
|
||||||
"for instructions to fix this problem").arg(faq));
|
"for instructions to fix this problem").arg(jumpUrl("noports")));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
<p>To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more packets.</p>
|
<p>To generate packets, you need to create and configure packet streams. A stream is a sequence of one or more packets.</p>
|
||||||
<p>To create a stream, select the port on which you want to send packets.</p>
|
<p>To create a stream, select the port on which you want to send packets.</p>
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>Don't see the port that you want (or any ports at all) inside the port group? <a href="http://ostinato.org/docs/faq">Get Help!</a></p></string>
|
<p>Don't see the port that you want (or any ports at all) inside the port group? <a href="http://jump.ostinato.org/noports">Get Help!</a></p></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
Loading…
Reference in New Issue
Block a user