summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2007-07-21 22:20:46 +0000
committerPreston Cody <codeman@gentoo.org>2007-07-21 22:20:46 +0000
commit129ec6176718c60138cd40b26d24c0b13d9f3709 (patch)
tree49576dc8740dc261557aadfbb9f6b4107e1c4cae
parentadding back in the sequences DB code (diff)
downloadscire-129ec6176718c60138cd40b26d24c0b13d9f3709.tar.gz
scire-129ec6176718c60138cd40b26d24c0b13d9f3709.tar.bz2
scire-129ec6176718c60138cd40b26d24c0b13d9f3709.zip
changing the dyn_tags table to use scriptid instead of jobid
fixing up the script creation section. still a work in progress. svn path=/; revision=235
-rw-r--r--docs/scire.sql6
-rw-r--r--scire/.smarty/templates/script.tpl21
2 files changed, 15 insertions, 12 deletions
diff --git a/docs/scire.sql b/docs/scire.sql
index f449d95..7f05a6c 100644
--- a/docs/scire.sql
+++ b/docs/scire.sql
@@ -227,11 +227,11 @@ CREATE TABLE GLI_profiles (
DROP TABLE IF EXISTS dyn_tags;
CREATE TABLE dyn_tags (
- jobid INT NOT NULL,
+ scriptid INT NOT NULL,
tag VARCHAR(30) NOT NULL,
tag_value VARCHAR(255),
- PRIMARY KEY (jobid, tag),
- FOREIGN KEY (jobid) REFERENCES jobs.jobid
+ PRIMARY KEY (scriptid, tag),
+ FOREIGN KEY (scriptid) REFERENCES scripts.scriptid
) ENGINE = MyISAM;
drop table if exists modules;
diff --git a/scire/.smarty/templates/script.tpl b/scire/.smarty/templates/script.tpl
index 4c93fe7..9802abc 100644
--- a/scire/.smarty/templates/script.tpl
+++ b/scire/.smarty/templates/script.tpl
@@ -8,15 +8,15 @@
<table class="table" width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><label for="addname">*Script Name:</label></td>
- <td><input type="text" id="addname" name="addname" /></td>
+ <td><input type="text" id="addname" name="addname" value="{$addname}" /></td>
</tr><tr>
<td><label for="desc">*Description:</label></td>
- <td><input type="text" id="desc" name="desc" size="50" /></td>
+ <td><input type="text" id="desc" name="desc" size="50" value="{$desc}" /></td>
</tr>
<tr>
<td><label for="runas">System user to run as (can be overwritten by job):</label></td>
- <td colspan="3">Manual: <input type="text" id="runas" name="runas" /></td>
+ <td colspan="3">Manual: <input type="text" id="runas" name="runas" value="{$runas}" /></td>
</tr>
<tr>
<td><input type="radio" name="runas_radio" value="root">root
@@ -28,7 +28,7 @@
<td><label for="priority">Recommended Priority:</label></td>
<td><select name="priority" size="1">
{foreach from=$priorities item=pri key=key}
- <option value="{$pri}">{$pri}</option>
+ <option value="{$pri}" {if $pri eq $priority}selected{/if}>{$pri}</option>
{/foreach}
</select>
</td>
@@ -36,7 +36,7 @@
<td>
<select name="permission" size="7">
{foreach from=$perms item=perm key=id}
- <option value="{$perm}">{$perm}</option>
+ <option value="{$perm}" {if $perm eq $permission}selected{/if}>{$perm}</option>
{/foreach}
</select>
</td>
@@ -54,27 +54,30 @@
</tr>
<tr>
<td colspan="2"><textarea name="script_data_manual" rows="10" cols="80" >
-#!/bin/bash
-emerge %%package%%
+{$script_data}
</textarea> </td>
</tr>
<tr>
- <td><input type="button" name="continue" value="Continue">this button will take input above and parse and look for dynamic tags. it will then generate the table below
+ <td><input type="submit" name="continue" value="Find Dynamic Tags">this button will take input above and parse and look for dynamic tags. it will then generate the table below
</td>
</tr>
</table>
<table class="table" width="100%" border="1" cellspacing="0" cellpadding="0">
+ {if $dyn_tags}
<tr>
<th>Dynamic Tag</th><th>Default Value</th>
</tr>
+ {foreach from=$dyn_tags item=tag key=tagnum}
<tr>
- <td>%%package%%</td><td><input type="text" name="%%package%%" value="gaim" disabled /></td>
+ <td>Tag: <b>{$tag}</b></td><td><input type="text" name="tag_{$tag}" value="" /></td>
</tr>
+ {/foreach}
<tr>
<td><hr></td>
</tr>
+ {/if}
<tr>
<td>Success return code (default 0): <input type="text" name="success_code" value="0">
</td>