summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scire/.smarty/templates')
-rw-r--r--scire/.smarty/templates/header.tpl2
-rw-r--r--scire/.smarty/templates/job.tpl269
-rw-r--r--scire/.smarty/templates/modules/Exporter/index.tpl36
-rw-r--r--scire/.smarty/templates/modules/quickstart/index.tpl86
-rw-r--r--scire/.smarty/templates/script_library.tpl2
5 files changed, 306 insertions, 89 deletions
diff --git a/scire/.smarty/templates/header.tpl b/scire/.smarty/templates/header.tpl
index 51f5387..d0d40b5 100644
--- a/scire/.smarty/templates/header.tpl
+++ b/scire/.smarty/templates/header.tpl
@@ -12,7 +12,7 @@
<title>Scire{if ($title ne "")} - {$title}{if ($subtitle ne "")} - {$subtitle}{/if}{/if}</title>
<link rel="icon" href="{$baseurl}favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{$baseurl}favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="{$theme}.css" type="text/css" />
+ <link rel="stylesheet" href="{$baseurl}{$theme}.css" type="text/css" />
{if isset($head)}{$head}{/if}
</head>
diff --git a/scire/.smarty/templates/job.tpl b/scire/.smarty/templates/job.tpl
index 124e03c..8919f02 100644
--- a/scire/.smarty/templates/job.tpl
+++ b/scire/.smarty/templates/job.tpl
@@ -1,115 +1,210 @@
{include file="header.tpl" title="Jobs"}
-<form action="" method="post" name="edit_jobform">
-{if $Action eq "addgroup"}
- <table width="100%" border="0" cellspacing="0" cellpadding="5">
- <tr><td class="boxtitle">Add client to group</td></tr>
- <tr>
- <td colspan="2" align="center" valign="top">
- <table class="box" width="100%" border="1" cellspacing="0" cellpadding="0">
- <tr>
- <td class="boxtitle" width="15">Add</td><td class="boxtitle">Group Name</td>
- </tr>
- {foreach from=$groups name=ugroup item=item key=id}
- <tr>
- <td><input type="checkbox" name="addgroupid[]" value="{$id}"
- {if isset($ingroups)} {if in_array($id, $ingroups)} checked {/if} {/if}
- ></td>
- <td>{$item}</td>
- </tr>
- {/foreach}
- <tr><td>
- <input type="hidden" name="clientid" value="{$clientid}">
- <input type="submit" name="addgroup_confirm" value="Save Changes">
- </td></tr>
- </table>
- </td>
- </tr>
- </table>
-{elseif $Action eq "create"}
+{if $Action eq "create"}
+<h1>Add a Job</h1>
+<form action="" method="post" name="add_jobform">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
- <td colspan="2" align="center" valign="top">
- <table class="box" width="100%" border="1" cellspacing="0" cellpadding="0">
+ <td align="left" valign="top">
+ <table class="box" width="90%" border="1" cellspacing="0" cellpadding="0">
<tr>
- <td class="boxtitle">Client</td><td class="boxtitle">Groups</td>
+ <td class="boxtitle">Script Selection</td>
</tr>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="5">
<tr>
- <td><label for="addhostname">*Hostname:</label></td>
- <td><input type="text" id="addhostname" name="addhostname" /></td>
- <td><label for="ip">*IP Address:</label></td>
- <td><input type="text" id="ip" name="ip" /></td>
-
- </tr>
- <tr>
- <td><label for="assetid">Asset ID:</label></td>
- <td><input type="text" id="assetid" name="assetid" /></td>
- <td><label for="mac">*MAC:</label></td>
- <td><input type="text" id="mac" name="mac" /></td>
-
+ <td><label for="scripts">Scripts:</label></td>
</tr>
<tr>
- <td><label for="digest">Digest (DO NOT EDIT):</label></td>
- <td colspan="3"><input type="text" id="digest" name="digest" size="58"></td>
- </tr>
- <tr>
- <td><label for="gli_profile">GLI Profile:</label></td>
- <td><select name="gli_profile" size="1">
- {section name=p loop=$gli_profiles}
- <option value="{$gli_profiles[p].profileid}">{$gli_profiles[p].profile_name}</option>
- {/section}
- </select>
- </td>
- <td><label for="status">Status:</label></td>
- <td><select id="status" name="status" size="1">
- <option value="active" selected="selected">Active</option>
- <option value="disabled">Disabled</option>
- </select>
- </td>
+ {if isset($get.scriptid)}
+
+ <td>Selected script:</td>
+ <td><input type="hidden" name="script" value="{$script.scriptid}">{$script.name}</td>
+ {else}
+ <td>Categories will go here</td>
+ <td>
+ <select name="script" size="1" >
+ {foreach from=$scripts item=script key=key}
+ <option value="{$script.scriptid}">
+ {$script.name}</option>
+ {/foreach}
+ </select>
+ </td>
+ {/if}
</tr>
+ {if !isset($get.scriptid)}
<tr>
- <td><label for="osid">OS:</label></td>
- <td><select name="osid" size="1">
- {section name=o loop=$oss}
- <option value="{$oss[o].osid}">{$oss[o].osname}</option>
- {/section}
- </select>
- </td>
- <td><label for="contact">Contact:</label></td>
- <td><select name="contact" size="1">
- {section name=con loop=$users}
- <option value="{$users[con].userid}">{$users[con].username}</option>
- {/section}
- </select></td>
+ <td colspan="2">Or just type in the ID of the script: <input type="text" name="scriptID" ></td>
</tr>
+ {/if}
<tr>
- <td><label for="installtime">Install Time <br>(leave blank for NOW):</label></td>
- <td colspan="3"><input type="text" id="installtime" name="installtime" size="25"/></td>
+ <td colspan="2"><hr><h4>Override Script default values:</h4><br>
+ Permission: <select size="1" name="permission">
+ {foreach from=$perms item=perm key=id}
+ <option value="{$perm}"
+ {if isset($script.permission)}
+ {if $perm eq $script.permission} selected {/if}
+ {/if}
+ >{$perm}</option>
+ {/foreach}
+ </select><br>
+
+ Set Priority: <select size="1" name="priority">
+ {foreach from=$priorities item=priority key=id}
+ <option value="{$priority}"
+ {if isset($script.priority)}
+ {if $priority eq $script.priority} selected {/if}
+ {/if}
+ >{$priority}</option>
+ {/foreach}
+ </select><br>
+ Log Location: <input type="text" name="log_location" value="{$script.log_location}"><br>
+ Success Code: (not worrying bout this now)<br>
+ Set dynamic content: <br>
+ </td>
</tr>
</table>
- <p><input type="submit" name="AddClientSubmit" value="Add Client" /></p>
</td>
+ </tr>
+ </table>
+ </td>
+
+ <td align="right" valign="top">
+ <table class="box" width="50%" border="1" cellspacing="0" cellpadding="0">
+ <tr>
+ <td class="boxtitle">Client Selection</td>
+ </tr>
+ <tr>
<td>
- <table>
- <tr><td>Assign client to the following groups:</td></tr>
- <tr><td>
- <select name="groups[]" size="10" multiple="multiple" id="groups">
- {foreach from=$groups item=ugroup key=id}
- <option value="{$id}">{$ugroup}</option>
- {/foreach}
- </select>
- </td>
- </tr></table>
+ <table border="0" cellspacing="0" cellpadding="5">
+ <tr>
+ {if isset($get.clientid)}
+
+ <td>Selected client:</td>
+ <td><input type="hidden" name="clients[]" value="{$client.hostname}">{$client.hostname}</td>
+ {elseif isset($get.cgroupid)}
+ <td>Selected clientgroup:</td>
+ <td><input type="hidden" name="cgroups[]" value="{$get.cgroupid}">NAME HERE</td>
+ {else}
+ <td><label for="clientgroups">Clientgroups:</label></td>
+ <td><label for="clients">Clients:</label></td>
+ </tr>
+ <tr>
+ <td>
+ <select name="clientgroups[]" size="18" multiple="multiple">
+ {foreach from=$cgroups item=cgroup key=id}
+ <option value="{$id}">{$cgroup}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td>
+ <select name="clients[]" size="18" multiple="multiple">
+ {section loop=$clients name=clients}
+ <option value="{$clients[clients].clientid}">{$clients[clients].hostname}</option>
+ {/section}
+ </select>
+ </td>
+ {/if}
+ </tr>
+ </table>
</td>
</tr>
</table>
+ Input staging client hostname (optional): <input type="text" name="staging"><br>
+ Staging success: <input type="radio" name="staging_success" value="result">Positive Result Code <input type="radio" name="staging_success" value="user">Manually approved
</td>
</tr>
+ </table>
+ <hr>
+ <table>
+ {if $dyn_tags}
+ <tr>
+ <th>Dynamic Tag</th><th>Value</th>
+ </tr>
+ {foreach from=$dyn_tags item=tag key=tagnum}
+ <tr>
+ <td>Tag: <b>{$tag}</b></td><td><input type="text" name="tag_{$tag}" value="{$tag_values[$tag]}" /></td>
+ </tr>
+ {/foreach}
+ {/if}
+</table>
+<hr>
+Job Description: <br><textarea name="description" rows="3" cols="40"></textarea><br>
+<table><tr>
+ <td><label for="runs_chedule">Run schedule:</label></td>
+ <td><input type="text" id="run_schedule" name="run_schedule" size="25" value="{$job.run_schedule}" /></td>
+ <td><label for="validity_period">Validity Period:<br>(in minutes)</label></td>
+ <td><input type="text" id="validity_period" name="validity_period" size="25" value="{$job.validity_period}" /></td>
+</tr></table>
+ <fieldset>
+ <legend>Run Schedule</legend>
+ <table>
+ <tr>
+ <td>
+ <p>Minute(s):</p>
+ {html_options name=minutes options=$minutes selected=$selectedMinute size=6}
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td>
+ <p>Hour(s):</p>
+ {html_options name=hours options=$hours selected=$selectedHour size=6}
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td>
+ <p>Month(s):</p>
+ {html_options name=months options=$months selected=$selectedMonth size=6}
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <p>Day(s):</p>
+ {html_options name=days options=$days selected=$selectedDay size=6}
+ </td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>
+ <p>Weekday(s):</p>
+ {html_options name=weekdays options=$weekdays selected=$selectedWeekday size=6}
+ </td>
+ </tr>
+ </table>
+
+ </fieldset>
+<table>
+<tr><td>
+<script language="JavaScript" src="calendar/calendar3.js"></script><!-- Date only with year scrolling -->
+<label for="deploy_time">Start time: <input type="Text" name="deploy_time" value="">
+ <a href="javascript:cal1.popup();"><img src="calendar/img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a></label>
+</td>
+<td>
+<label for="expiration_time">End time: <input type="Text" name="expiration_time" value="">
+ <a href="javascript:cal2.popup();"><img src="calendar/img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a></label>
+<script language="JavaScript">
+ <!-- // create calendar object(s) just after form tag closed
+ // specify form element as the only parameter (document.forms['formname'].elements['inputname']);
+ // note: you can have as many calendar objects as you need for your application
+ var cal1 = new calendar3(document.forms['add_jobform'].elements['deploy_time']);
+ cal1.year_scroll = false;
+ cal1.time_comp = true;
+ var cal2 = new calendar3(document.forms['add_jobform'].elements['expiration_time']);
+ cal2.year_scroll = false;
+ cal2.time_comp = true;
+ //-->
+ </script>
+</td>
+</tr>
+</table>
+<hr>
+Job dependency stuff here.<B>CODE ME</B><br>
+<!-- Set notification email address: <input type="radio" name="notify_addr" value="{$useremail}">{$useremail}</input><input type="radio" name="notify_addr" value="new"><input type="text" name="notify_new"></input> -->
+<input type="submit" name="ADD" value="ADD JOB!!!">
+</form>
{elseif $Action eq "edit"}
-<h1>EDITING</h1>
- <table width="100%" border="0" cellspacing="0" cellpadding="5">
+<h1>Edit Job</h1>
+<form action="" method="post" name="edit_jobform">
+<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td colspan="2" align="center" valign="top">
<table class="box" width="100%" border="1" cellspacing="0" cellpadding="0">
diff --git a/scire/.smarty/templates/modules/Exporter/index.tpl b/scire/.smarty/templates/modules/Exporter/index.tpl
new file mode 100644
index 0000000..93cb8e5
--- /dev/null
+++ b/scire/.smarty/templates/modules/Exporter/index.tpl
@@ -0,0 +1,36 @@
+{include file="header.tpl" title="Server Information Exporter"}
+List of clients in group:
+<form name="form1" method="post" action="#">
+<select name="group" size="1">
+<option value=""></option>
+<!--
+foreach ($profile_list as $profile)
+ print "<option value=\"". $profile['profileid']."\">".$profile['profile_name']."</option>\n";
+?> -->
+</select>
+<input type="submit" name="ChangeView" value="Go, because i hate doing it with javascript.">
+</form>
+<form name="form2" method="post" action="ExportedData.php">
+<table><tr>
+ <th>HOSTNAME</th>
+ <th>STATUS</th>
+ <th>IP</th>
+ <th>MAC</th>
+ <th>ASSET ID</th>
+ <th>INSTALL TIME</th>
+ </tr>
+<!--
+foreach ($clients as $client)
+ print "<tr><td>".$client['hostname']."</td>\n";
+ print "<td>".$client['status']."</td>\n";
+ print "<td>".$client['ip']."</td>\n";
+ print "<td>".$client['mac']."</td>\n";
+ print "<td>".$client['assetid']."</td>\n";
+ print "<td>".$client['installtime']."</td>\n";
+?> -->
+</table>
+<hr>
+<input type="submit" name="ExportToXML" value="Export To XML">
+<input type="submit" name="ExportToCSV" value="Export To CSV">
+<input type="submit" name="ExportToTXT" value="Export To TXT">
+{include file="footer.tpl"}
diff --git a/scire/.smarty/templates/modules/quickstart/index.tpl b/scire/.smarty/templates/modules/quickstart/index.tpl
new file mode 100644
index 0000000..8440724
--- /dev/null
+++ b/scire/.smarty/templates/modules/quickstart/index.tpl
@@ -0,0 +1,86 @@
+{include file="header.tpl" title="Quickstart Server"}
+<h3>Quickstart Server Status Overview</h3>
+<form name="form1" method="post" action="#">
+List of clients currently installing:<br>
+<table class="table" border="2">
+ <tr>
+ <th>MAC</th>
+ <th>IP</th>
+ <th>PROFILE</th>
+ <th>STATUS</th>
+ </tr>
+{foreach from=$clients item=client key=key}
+ {if $client.status eq 'Installing'}
+ <tr>
+ <td>{$client.mac}</td>
+ <td>{$client.ip}</td>
+ <td>{$client.profile}</td>
+ <td>{$client.status}</td>
+ </tr>
+
+ {/if}
+{/foreach}
+</table>
+List of clients pending installation:<br>
+<table class="table">
+ <tr>
+ <th>MAC</th>
+ <th>IP</th>
+ <th>PROFILE</th>
+ <th>STATUS</th>
+ </tr>
+{foreach from=$clients item=client key=key}
+ {if $client.status eq 'Scheduled for Install'}
+ <tr>
+ <td>{$client.mac}</td>
+ <td>{$client.ip}</td>
+ <td>{$client.profile}</td>
+ <td>{$client.status}</td>
+ </tr>
+
+ {/if}
+{/foreach}
+</table>
+List of completed installations:<br>
+<table class="table">
+ <tr>
+ <th>MAC</th>
+ <th>IP</th>
+ <th>PROFILE</th>
+ <th>STATUS</th>
+ </tr>
+{foreach from=$clients item=client key=key}
+ {if $client.status eq 'Install Complete'}
+ <tr>
+ <td>{$client.mac}</td>
+ <td>{$client.ip}</td>
+ <td>{$client.profile}</td>
+ <td>{$client.status}</td>
+ </tr>
+
+ {/if}
+{/foreach}
+</table>
+List of available profiles:<br>
+<table class="table">
+ <tr>
+ <th>Profile ID</th>
+ <th>Profile Name</th>
+ <th>Filename/URI</th>
+ <th>Description</th>
+ </tr>
+{foreach from=$profiles item=profile key=key}
+ <tr>
+ <td>{$profile.profileid}</td>
+ <td>{$profile.profile_name}</td>
+ <td>{$profile.location}</td>
+ <td>{$profile.description}</td>
+ </tr>
+
+{/foreach}
+</table>
+
+
+<input type="submit" name="Submit" value="Submit">
+</form>
+{include file="footer.tpl"}
diff --git a/scire/.smarty/templates/script_library.tpl b/scire/.smarty/templates/script_library.tpl
index 670f00c..be796f5 100644
--- a/scire/.smarty/templates/script_library.tpl
+++ b/scire/.smarty/templates/script_library.tpl
@@ -13,7 +13,7 @@
<td>LAST USED HERE</td>
<td>ADD OS TO SCRIPT TABLE</td>
<td>{$script.permission}</td>
- <td><a href="add_job.php?scriptid={$script.scriptid}">Create Job</a>|<a href="script.php?Action=Edit&scriptid={$script.scriptid}">Edit</a>|<a href="script.php?Action=Delete&scriptid={$script.scriptid}">Delete</a><a href="script.php?Action=Copy&scriptid={$script.scriptid}">Copy as New</a></td>
+ <td><a href="job.php?Action=create&scriptid={$script.scriptid}">Create Job</a>|<a href="script.php?Action=Edit&scriptid={$script.scriptid}">Edit</a>|<a href="script.php?Action=Delete&scriptid={$script.scriptid}">Delete</a><a href="script.php?Action=Copy&scriptid={$script.scriptid}">Copy as New</a></td>
</tr>
{/foreach}
<tr class="table">