From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci site/luci/Extensions/storage_adapte ...
Date: 26 Jun 2007 17:00:54 -0000 [thread overview]
Message-ID: <20070626170054.13165.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-06-26 17:00:53
Modified files:
luci/site/luci/Extensions: storage_adapters.py
luci/storage : form-macros index_html
Log message:
Add the long-promised 'reprobe storage' button.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/storage_adapters.py.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.3&r2=1.7.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.17.2.5&r2=1.17.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/index_html.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.1&r2=1.7.2.2
--- conga/luci/site/luci/Extensions/storage_adapters.py 2007/06/18 18:39:33 1.7.2.3
+++ conga/luci/site/luci/Extensions/storage_adapters.py 2007/06/26 17:00:53 1.7.2.4
@@ -10,9 +10,13 @@
PT_MAPPER_TYPE, PT_PATH, STONAME, STORAGE, STORAGESYS, \
VIEW_BD, VIEW_BDS, VIEW_MAPPER, VIEW_MAPPERS
-from ricci_defines import MAPPER_SYS_TYPE, MAPPER_VG_TYPE, SYSTEM_PREFIX, VG_PREFIX
+from ricci_defines import MAPPER_SYS_TYPE, MAPPER_VG_TYPE, \
+ SYSTEM_PREFIX, VG_PREFIX
+
from LuciZope import get_systems_statuses
+from StorageReport import invalidate_storage_report
+
def createStorageChooser(self, request, systems):
dummynode = {}
@@ -29,6 +33,15 @@
except KeyError, e:
url = "."
+ if stoname and request.has_key('reprobe_storage'):
+ try:
+ invalidate_storage_report(request.SESSION, stoname)
+ redirect_url = '%s?%s' % (request['ACTUAL_URL'], request['QUERY_STRING'])
+ redirect_url = redirect_url.replace('&reprobe_storage=true', '')
+ request.RESPONSE.redirect(redirect_url)
+ except:
+ pass
+
try:
pagetype = request[PAGETYPE]
except KeyError, e:
--- conga/luci/storage/form-macros 2007/06/18 18:39:49 1.17.2.5
+++ conga/luci/storage/form-macros 2007/06/26 17:00:53 1.17.2.6
@@ -103,7 +103,7 @@
tal:define="batch_id python:here.apply_storage_changes(ricci, storage_report, request);
check_URL context/storage/check-batch/absolute_url;
check_url python:check_URL + '?storagename=' + storagename + '&batch_id=' + batch_id">
- <div metal:use-macro="here/form-macros/macros/display-commiting-changes"/>
+ <div metal:use-macro="here/form-macros/macros/display-committing-changes"/>
<form id="urls_form">
<input tal:attributes="type string:hidden;
name string:check_url;
@@ -148,7 +148,7 @@
} else {
m = msg;
}
- alert('An error has occured while commiting changes:\n\n' + m);
+ alert('An error has occured while committing changes:\n\n' + m);
window.location = err_url;
}
} else {
@@ -179,7 +179,7 @@
-<div metal:define-macro="display-commiting-changes">
+<div metal:define-macro="display-committing-changes">
<table style="width: 100%;">
<tr>
<td align="center">
@@ -188,7 +188,7 @@
</tr>
<tr>
<td align="center">
- <div style="padding-bottom: 4cm;">Commiting Changes</div>
+ <div style="padding-bottom: 4cm;">Committing Changes</div>
</td>
</tr>
</table>
--- conga/luci/storage/index_html 2007/06/18 18:39:49 1.7.2.1
+++ conga/luci/storage/index_html 2007/06/26 17:00:53 1.7.2.2
@@ -174,7 +174,7 @@
global storage_report nothing"/>
<span tal:omit-tag=""
tal:condition="storagename"
- tal:define="report_cached python:here.is_storage_report_cached(request.SESSION, storagename)">
+ tal:define="global report_cached python:here.is_storage_report_cached(request.SESSION, storagename)">
<span tal:omit-tag=""
tal:condition="report_cached">
<span tal:omit-tag=""
@@ -221,6 +221,17 @@
<metal:main-form-content use-macro="here/form-chooser/macros/main-form">
<h1>Future Site of Forms</h1>
</metal:main-form-content>
+ <div style="padding-top: 10px;"
+ tal:condition="report_cached">
+ <form>
+ <input type="hidden" name="reprobe_url"
+ tal:attributes="value
+ python:'%s?%s&reprobe_storage=true' % (request['ACTUAL_URL'], request['QUERY_STRING'])" />
+ <input class="form_button" type="button" name="reprobe"
+ value="Reprobe Storage"
+ onclick="javascript:location=this.form.reprobe_url.value;" />
+ </form>
+ </div>
</td>
<tal:comment replace="nothing"> End of main content block </tal:comment>
</tr>
next reply other threads:[~2007-06-26 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 17:00 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-07 1:04 [Cluster-devel] conga/luci site/luci/Extensions/storage_adapte kupcevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070626170054.13165.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.