diff options
Diffstat (limited to 'scire/.smarty/templates/job.tpl')
-rw-r--r-- | scire/.smarty/templates/job.tpl | 269 |
1 files changed, 182 insertions, 87 deletions
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> </td> + <td> + <p>Hour(s):</p> + {html_options name=hours options=$hours selected=$selectedHour size=6} + </td> + <td> </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"> |