Cleaned up dashboard page when no campaigns have been launched

pull/1090/head
Jordan Wright 2018-05-26 21:37:22 -05:00
parent 420410b52c
commit a04f6d031b
2 changed files with 47 additions and 25 deletions

View File

@ -99,11 +99,11 @@ func main() {
if err != nil {
log.Fatal(err)
}
log.Infof("Starting admin server at https://%s\n", config.Conf.AdminConf.ListenURL)
log.Infof("Starting admin server at https://%s", config.Conf.AdminConf.ListenURL)
log.Info(http.ListenAndServeTLS(config.Conf.AdminConf.ListenURL, config.Conf.AdminConf.CertPath, config.Conf.AdminConf.KeyPath,
handlers.CombinedLoggingHandler(log.Writer(), adminHandler)))
} else {
log.Infof("Starting admin server at http://%s\n", config.Conf.AdminConf.ListenURL)
log.Infof("Starting admin server at http://%s", config.Conf.AdminConf.ListenURL)
log.Info(http.ListenAndServe(config.Conf.AdminConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, adminHandler)))
}
}()
@ -112,11 +112,11 @@ func main() {
defer wg.Done()
phishHandler := gziphandler.GzipHandler(controllers.CreatePhishingRouter())
if config.Conf.PhishConf.UseTLS { // use TLS for Phish web server if available
log.Infof("Starting phishing server at https://%s\n", config.Conf.PhishConf.ListenURL)
log.Infof("Starting phishing server at https://%s", config.Conf.PhishConf.ListenURL)
log.Info(http.ListenAndServeTLS(config.Conf.PhishConf.ListenURL, config.Conf.PhishConf.CertPath, config.Conf.PhishConf.KeyPath,
handlers.CombinedLoggingHandler(log.Writer(), phishHandler)))
} else {
log.Infof("Starting phishing server at http://%s\n", config.Conf.PhishConf.ListenURL)
log.Infof("Starting phishing server at http://%s", config.Conf.PhishConf.ListenURL)
log.Fatal(http.ListenAndServe(config.Conf.PhishConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, phishHandler)))
}
}()

View File

@ -3,24 +3,35 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
<li class="active"><a href="/">Dashboard</a>
<li class="active">
<a href="/">Dashboard</a>
</li>
<li><a href="/campaigns">Campaigns</a>
<li>
<a href="/campaigns">Campaigns</a>
</li>
<li><a href="/users">Users &amp; Groups</a>
<li>
<a href="/users">Users &amp; Groups</a>
</li>
<li><a href="/templates">Email Templates</a>
<li>
<a href="/templates">Email Templates</a>
</li>
<li><a href="/landing_pages">Landing Pages</a>
<li>
<a href="/landing_pages">Landing Pages</a>
</li>
<li><a href="/sending_profiles">Sending Profiles</a>
<li>
<a href="/sending_profiles">Sending Profiles</a>
</li>
<li><a href="/settings">Settings</a>
<li>
<a href="/settings">Settings</a>
</li>
<li><hr></li>
<li><a href="https://gophish.gitbooks.io/user-guide/content/">User Guide</a>
<li>
<hr>
</li>
<li><a href="/api/">API Documentation</a>
<li>
<a href="https://gophish.gitbooks.io/user-guide/content/">User Guide</a>
</li>
<li>
<a href="/api/">API Documentation</a>
</li>
</ul>
</div>
@ -38,7 +49,7 @@
No campaigns created yet. Let's create one!
</div>
</div>
<div id="dashboard">
<div id="dashboard" style="display:none;">
<div class="row">
<div id="overview_chart" style="height:200px;" class="col-lg-12 col-md-12 col-sm-12 col-xs-12"></div>
</div>
@ -55,7 +66,9 @@
<h2>Recent Campaigns</h2>
</div>
<div class="row">
<a href="/campaigns"><button type="button" class="btn btn-primary">View All</button></a>
<a href="/campaigns">
<button type="button" class="btn btn-primary">View All</button>
</a>
</div>
&nbsp;&nbsp;
<div class="row">
@ -64,13 +77,23 @@
<tr>
<th class="col-md-2 col-sm-2">Name</th>
<th class="col-md-2 col-sm-2">Created Date</th>
<th class="col-md-1 col-sm-1"><i class="fa fa-envelope-o"></i></th>
<th class="col-md-1 col-sm-1"><i class="fa fa-envelope-open-o"></i></th>
<th class="col-md-1 col-sm-1"><i class="fa fa-mouse-pointer"></i></th>
<th class="col-md-1 col-sm-1"><i class="fa fa-exclamation-circle"></i></th>
<th class="col-md-1 col-sm-1"><i class="fa fa-bullhorn"></i></th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-envelope-o"></i>
</th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-envelope-open-o"></i>
</th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-mouse-pointer"></i>
</th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-exclamation-circle"></i>
</th>
<th class="col-md-1 col-sm-1">
<i class="fa fa-bullhorn"></i>
</th>
<th class="col-md-1 col-sm-1">Status</th>
<th class="col-md-2 col-sm-2 no-sort"></i></th>
<th class="col-md-2 col-sm-2 no-sort"></th>
</tr>
</thead>
<tbody>
@ -79,7 +102,6 @@
</div>
</div>
</div>
{{end}}
{{define "scripts"}}
{{end}} {{define "scripts"}}
<script src="/js/dist/app/dashboard.min.js"></script>
{{end}}