OSDN Git Service

Add watch window (#7)
authorkeisuke fukawa <keisuke@karesansui-project.info>
Tue, 13 Apr 2010 01:56:04 +0000 (10:56 +0900)
committerkeisuke fukawa <keisuke@karesansui-project.info>
Tue, 13 Apr 2010 01:56:04 +0000 (10:56 +0900)
 * add column "Target Machine" in list

karesansui/gadget/hostby1watch.py
karesansui/templates/default/hostby1watch/hostby1watch.input
karesansui/templates/default/hostby1watch/hostby1watch.part
karesansui/templates/default/hostby1watchby1/hostby1watchby1.part

index bd5b217..047b9a5 100644 (file)
@@ -29,11 +29,10 @@ from karesansui.db.access.watch import \
 from karesansui.db.access.watchdetail import \
     new as wd_new, save as wd_save
 
-from karesansui.lib.utils import is_param, get_karesansui_version, \
-    get_collectd_version
+from karesansui.lib.utils import is_param, get_karesansui_version
 
 from karesansui.lib.collectd.utils import  create_plugin_selector, \
-    create_value_selector
+    create_value_selector, get_collectd_version
 
 from karesansui.lib.const import WATCH_LIST_RANGE, \
     COLLECTD_PLUGIN_CPU, COLLECTD_PLUGIN_DF, \
index f15d971..99cd5fe 100644 (file)
@@ -307,19 +307,21 @@ $(document).ready(function(){
             <div id="value-section">
                 <input type="button" name="add_value_section" id="add_value_section" value="${_('Add')}" />
                 <div id="value-section_1">
-                    <div class="grayout-param">${_('Threshold Value')}<span id="watch_threshold_value_help"></span></div>
+                    <div class="grayout-param">${_('Threshold Value')}_1<span id="watch_threshold_value_help"></span></div>
                     <div class="grayout-value grayout-form">
                            <input type="text" name="threshold_value_1" id="threshold_value_1" />
                     </div>
-                    <div class="grayout-param">${_('Value Bounds')}<span id="watch_value_bounds_help"></span></div>
+                    <div class="grayout-param">${_('Value Bounds')}_1<span id="watch_value_bounds_help"></span></div>
                     <div class="grayout-value grayout-form">
                            <input type="radio" name="value_bounds_1" value="${value_bounds_lower}">${_('Lower')}
                            <input type="radio" name="value_bounds_1" value="${value_bounds_upper}" checked>${_('Upper')}
                     </div>
-                    <div class="grayout-param">${_('Shell Script')}<span id="watch_shell_script_help"></span></div>
+                    <div class="grayout-param">${_('Shell Script')}_1<span id="watch_shell_script_help"></span></div>
                     <div class="grayout-value grayout-form">
                            <textarea name="shell_script_1" id="shell_script_1" />
                     </div>
+                    <div>------------------------------------------------------</div>
+                    <br style="clear: both;"/>
                 </div>
             </div>
 
index 4587e83..2de9362 100644 (file)
@@ -216,14 +216,16 @@ $(document).ready(function(){
                                         <thead>
                                             <tr>
                                                 <th style="width: 5%;">${_('ID')}</th>
+                                                <th style="width: 30%;">${_('Watch Machine')}</th>
                                                 <th style="width: 15%;">${_('Watch Target')}</th>
-                                                <th style="width: 75%;";>${_('Watch Name')}</th>
+                                                <th style="width: 50%;";>${_('Watch Name')}</th>
                                             </tr>
                                         </thead>
                                         <tbody>
 % for watch in pager.get_displays():
                                             <tr id="watch_list_row${watch.id}">
                                                 <td align="center">${watch.id |h}</td>
+                                                <td>${watch.machine.name |h}</td>
                                                 <td>${watch.plugin |h}</td>
                                                 <td>${watch.name |h}</td>
                                             </tr>
index a2d8625..0947379 100644 (file)
                         <td><pre>${info.name |h}</pre></td>
                     </tr>
                     <tr>
+                        <th>${_('Watch Machine')}</th>
+                        <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
+                        <td><pre>${info.machine.name |h}</pre></td>
+                    </tr>
+                    <tr>
                         <th>${_('Watch Target')}</th>
                         <td class="detail-separator"><img src="${ctx.homepath}/static/images/table-space.gif" alt="" /></td>
                         <td><pre>${info.plugin |h}</pre></td>