Commit dc9521a2 authored by Jason Frisvold's avatar Jason Frisvold
Browse files

- Remove submenus (Not bootstrap standard)

- Add new link on each page
- Show server and target IPs on schedule list instead of IDs
- Some layout changes
parent 4637df24
......@@ -70,8 +70,12 @@
// Pull all data from the timers table
$result = $app->db->table('timers')
->select('id', 'cloud_id', 'spawn_id', 'target_id', 'hour', 'minute',
'day', 'month', 'description', 'disabled', 'last_modified')
->join('cloud', 'timers.cloud_id', '=', 'cloud.id')
->join('target', 'timers.target_id', '=', 'target.id')
->select('timers.id', 'cloud.server_ip', 'target.address',
'target.cidr', 'timers.hour', 'timers.minute',
'timers.day', 'timers.month', 'timers.description',
'timers.disabled', 'timers.last_modified')
->get();
$smarty_data['results'] = $result;
......
......@@ -33,6 +33,7 @@
<div class='page-header'>
<h1>Scan Type Editor</h1>
</div>
<form action='/edit-scantype' method='post'>
<div class='row'>
<div class="col-md-4">
......
......@@ -33,17 +33,18 @@
<div class='page-header'>
<h1>Schedule Editor</h1>
</div>
<form action='/edit-schedule' method='post'>
<div class='row'>
<div class="col-md-4">
<div class='input-group'>
<span class="input-group-addon">Cloud ID</span>
<span class="input-group-addon">Server</span>
{html_options name=cloud_id options=$servers selected=$result.cloud_id|default:""}
</div>
</div>
<div class="col-md-4">
<div class='input-group'>
<span class="input-group-addon">Spawn ID</span>
<span class="input-group-addon">Scan Type</span>
{html_options name=spawn_id options=$scantypes selected=$result.spawn_id|default:""}
</div>
</div>
......@@ -51,7 +52,7 @@
<div class='row'>
<div class="col-md-4">
<div class='input-group'>
<span class="input-group-addon">Target ID</span>
<span class="input-group-addon">Target</span>
{html_options name=target_id options=$targets selected=$result.target_id|default:""}
</div>
</div>
......@@ -84,18 +85,18 @@
</div>
</div>
<div class="col-md-4">
<div class='checkbox'>
<label>
<input type='checkbox' name='disabled' value='disabled' {if $result.disabled|default:""}checked{/if} /> Disabled
</label>
<div class='input-group'>
<span class="input-group-addon">Description</span>
<textarea name='description'>{$result.description|default:""}</textarea>
</div>
</div>
</div>
<div class='row'>
<div class="col-md-4">
<div class='input-group'>
<span class="input-group-addon">Description</span>
<textarea name='description'>{$result.description|default:""}</textarea>
<div class='checkbox'>
<label>
<input type='checkbox' name='disabled' value='disabled' {if $result.disabled|default:""}checked{/if} /> Disabled
</label>
</div>
</div>
</div>
......
......@@ -33,6 +33,7 @@
<div class='page-header'>
<h1>Server Editor</h1>
</div>
<form action='/edit-server' method='post'>
<div class='row'>
<div class="col-md-4">
......
......@@ -33,6 +33,7 @@
<div class='page-header'>
<h1>Target Editor</h1>
</div>
<form action='/edit-target' method='post'>
<div class='row'>
<div class="col-md-4">
......
......@@ -40,21 +40,12 @@
{else}
<li class="dropdown">
{/if}
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Timers <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Scanners <span class="caret"></span></a>
<ul class="dropdown-menu multi-level" role="menu">
<li><a href="/servers">Scan Servers</a></li>
<li><a href="/servers">Servers</a></li>
<li><a href="/targets">Targets</a></li>
<li><a href="/scantypes">Scan Types</a></li>
<li><a href="/schedule">Scheduling</a></li>
<li class='dropdown-submenu'>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Add</a>
<ul class="dropdown-menu" role="menu">
<li><a href="/edit-server">Scan Server</a></li>
<li><a href="/edit-target">Target</a></li>
<li><a href="/edit-scantype">Scan Type</a></li>
<li><a href="/edit-schedule">Schedule</a></li>
</ul>
</li>
<li><a href="/schedule">Schedule</a></li>
</ul>
</li>
{if $page == 'report'}
......
......@@ -31,7 +31,8 @@
<div class='container'>
<div class='page-header'>
<h1>Scan Type List</h1>
<h1>Scan Types</h1>
<h5><a href='/edit-scantype'>Add New</a></h5>
</div>
<div>
......
......@@ -31,15 +31,15 @@
<div class='container'>
<div class='page-header'>
<h1>Schedule List</h1>
<h1>Schedule</h1>
<h5><a href='/edit-schedule'>Add New</a></h5>
</div>
<div>
<table class='table table-striped'>
<tr>
<th>Cloud ID</th>
<th>Spawn ID</th>
<th>Target ID</th>
<th>Server</th>
<th>Target</th>
<th>Hour</th>
<th>Minute</th>
<th>Day</th>
......@@ -50,9 +50,8 @@
</tr>
{foreach from=$results item=row}
<tr>
<td><a href='/edit-schedule/{$row.id}'>{$row.cloud_id}</a></td>
<td>{$row.spawn_id}</td>
<td>{$row.target_id}</td>
<td><a href='/edit-schedule/{$row.id}'>{long2ip($row.server_ip)}</a></td>
<td>{long2ip($row.address)}/{$row.cidr}</td>
<td>{$row.hour}</td>
<td>{$row.minute}</td>
<td>{$row.day}</td>
......
......@@ -31,7 +31,8 @@
<div class='container'>
<div class='page-header'>
<h1>Server List</h1>
<h1>Servers</h1>
<h5><a href='/edit-server'>Add New</a></h5>
</div>
<div>
......@@ -39,7 +40,7 @@
<tr>
<th>IP Address</th>
<th>Description</th>
<th>Frequency<br>(in minutes)</th>
<th>Contact Frequency<br>(in minutes)</th>
<th>Last Contacted</th>
<th>State</th>
<th>Last Modified</th>
......
......@@ -31,7 +31,8 @@
<div class='container'>
<div class='page-header'>
<h1>Target List</h1>
<h1>Targets</h1>
<h5><a href='/edit-target'>Add New</a></h5>
</div>
<div>
......
......@@ -17,56 +17,6 @@ body {
background-color: #f5f5f5;
}
/* Submenus for dropdown menu */
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment