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 { if err != nil {
log.Fatal(err) 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, log.Info(http.ListenAndServeTLS(config.Conf.AdminConf.ListenURL, config.Conf.AdminConf.CertPath, config.Conf.AdminConf.KeyPath,
handlers.CombinedLoggingHandler(log.Writer(), adminHandler))) handlers.CombinedLoggingHandler(log.Writer(), adminHandler)))
} else { } 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))) log.Info(http.ListenAndServe(config.Conf.AdminConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, adminHandler)))
} }
}() }()
@ -112,11 +112,11 @@ func main() {
defer wg.Done() defer wg.Done()
phishHandler := gziphandler.GzipHandler(controllers.CreatePhishingRouter()) phishHandler := gziphandler.GzipHandler(controllers.CreatePhishingRouter())
if config.Conf.PhishConf.UseTLS { // use TLS for Phish web server if available 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, log.Info(http.ListenAndServeTLS(config.Conf.PhishConf.ListenURL, config.Conf.PhishConf.CertPath, config.Conf.PhishConf.KeyPath,
handlers.CombinedLoggingHandler(log.Writer(), phishHandler))) handlers.CombinedLoggingHandler(log.Writer(), phishHandler)))
} else { } 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))) log.Fatal(http.ListenAndServe(config.Conf.PhishConf.ListenURL, handlers.CombinedLoggingHandler(os.Stdout, phishHandler)))
} }
}() }()

View File

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