summaryrefslogtreecommitdiff
blob: 124e03ceba2247042556664de8fd9452ac64e5ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{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"}
<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">
		<tr>
		  <td class="boxtitle">Client</td><td class="boxtitle">Groups</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>

			  </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>
			  </tr>
			  <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>
			  </tr>
			  <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>
			  </tr>
			</table>
			<p><input type="submit" name="AddClientSubmit" value="Add Client" /></p>
		  </td>
		  <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>
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
{elseif $Action eq "edit"}
<h1>EDITING</h1>
 <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">
		<tr>
		  <td class="boxtitle">Job</td>
		</tr>
		<tr>
		  <td>
			<table border="0" cellspacing="0" cellpadding="5">
			  <tr>
				<td><label for="addpriority">*Priority:</label></td>
				<td><input type="text" id="editpriority" name="editpriority" value="{$job.priority}" /></td>
				<td><label for="creator">Creator:</label></td>
				<td><input type="text" id="creator" disabled name="creator" value="{$job.creator}" /></td>
				
			  </tr>
			  <tr>
				<td><label for="permission:">Permission:</label></td>
				<td><input type="text" id="permission" name="permission" value="{$job.permission}" /></td>

			  </tr>
			  <tr>
				<td><label for="description">Description:</label></td>
				<td colspan="3"><textarea id="description" name="description" cols="55" rows="5" > {$job.description}</textarea></td>
				</tr>
				<tr>
				<td><label for="script">Script:</label></td>
				<td><select id="script" name="script" size="1">
				    {foreach item=sc from=$scripts }
				        {if $sc.scriptid eq $job.script}
					<option value="{$sc.scriptid}" selected="selected">{$sc.name}</option>
					{else}
					<option value="{$sc.scriptid}">{$sc.name}</option>
					{/if}
				    {/foreach}
				</select>
				</td>
			  </tr>
			  <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>


			<input type="hidden" name="jobid" value="{$job.jobid}">
			<p><input type="submit" name="EditJobSubmit" value="Save Changes" /></form></p>
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
</table>
{elseif $Action eq "delete"}
<h1>DELETING</h1>
<b>Are you absolutely SURE you want to delete job {$jobid}:<br>Description:{$job.description}?</b>
<input type="hidden" name="jobid" value="{$jobid}">
<input type="submit" name="delete_confirm" value="Yes, get rid of it!"><input type="submit" name="delete_cancel" value="No wait!">
{/if}

{include file="footer.tpl"}