<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/13/2014 04:28 PM, Aline Manera
wrote:<br>
</div>
<blockquote cite="mid:532214D2.60307@linux.vnet.ibm.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 03/13/2014 02:02 AM, Hongliang
Wang wrote:<br>
</div>
<blockquote cite="mid:53213BE3.1040402@linux.vnet.ibm.com"
type="cite">On 03/13/2014 12:11 PM, Adam King wrote: <br>
<blockquote type="cite">This patch addendum addresses the
remaining issues with Repository management <br>
UI except providing the ability to enable/disable a
repository. <br>
Reviewing API.md I found that "enabled" is not a valid
parameter as input to <br>
the PUT method of a repository. We need to add enable/disable
actions to the <br>
menu, and invoke the appropriate POST action on the selected
repo. <br>
<br>
Signed-off-by: Adam King <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:rak@linux.vnet.ibm.com"><rak@linux.vnet.ibm.com></a>
<br>
--- <br>
ui/js/src/kimchi.grid.js | 2 +- <br>
ui/js/src/kimchi.repository_edit_main.js | 17
++--------------- <br>
ui/pages/repository-add.html.tmpl | 2 +- <br>
ui/pages/repository-edit.html.tmpl | 22
---------------------- <br>
4 files changed, 4 insertions(+), 39 deletions(-) <br>
<br>
diff --git a/ui/js/src/kimchi.grid.js
b/ui/js/src/kimchi.grid.js <br>
index 215d6ea..4cc7807 100644 <br>
--- a/ui/js/src/kimchi.grid.js <br>
+++ b/ui/js/src/kimchi.grid.js <br>
@@ -158,7 +158,7 @@ kimchi.widget.Grid = function(params) { <br>
var rowNode =
$('<tr></tr>').appendTo(tbody); <br>
$.each(fields, function(fi, field) { <br>
var fieldName = field['name']; <br>
- var value = row[fieldName]; <br>
+ var value = row[fieldName]==null ? '' :
row[fieldName]; <br>
</blockquote>
Cleanup <br>
<blockquote type="cite"> $('<td><div
class="cell-text-wrapper"' + <br>
(field['makeTitle'] === true <br>
? ' title="' + value + '"' <br>
diff --git a/ui/js/src/kimchi.repository_edit_main.js
b/ui/js/src/kimchi.repository_edit_main.js <br>
index 0ab008e..6083327 100644 <br>
--- a/ui/js/src/kimchi.repository_edit_main.js <br>
+++ b/ui/js/src/kimchi.repository_edit_main.js <br>
@@ -47,24 +47,11 @@ kimchi.repository_edit_main = function() {
<br>
}); <br>
}); <br>
<br>
- var booleanFields = ['is_mirror', 'gpgcheck']; <br>
- <br>
var editRepository = function(event) { <br>
var formData = $(editForm).serializeObject(); <br>
<br>
- $(booleanFields).each(function(i, f) { <br>
- switch(formData[f]) { <br>
- case 'true': <br>
- formData[f] = true; <br>
- break; <br>
- case 'false': <br>
- formData[f] = false; <br>
- break; <br>
- default: <br>
- delete formData[f]; <br>
- break; <br>
- } <br>
- }); <br>
+ formData["is_mirror"] =
(formData["is_mirror"]=="true") ? true : false; <br>
+ formData["gpgcheck"] = (formData["gpgkey"])? true :
false; <br>
<br>
kimchi.updateRepository(kimchi.selectedRepository,
formData, function() { <br>
kimchi.topic('kimchi/repositoryUpdated').publish(); <br>
diff --git a/ui/pages/repository-add.html.tmpl
b/ui/pages/repository-add.html.tmpl <br>
index a170f1d..4a97fd3 100644 <br>
--- a/ui/pages/repository-add.html.tmpl <br>
+++ b/ui/pages/repository-add.html.tmpl <br>
@@ -62,7 +62,7 @@ <br>
<div class="textbox-wrapper"> <br>
<input type="radio"
id="isMirrorRadioTrue" name="is_mirror" value="true" /> <br>
<label
for="isMirrorRadioTrue">$_("Yes")</label> <br>
</blockquote>
<br>
<blockquote type="cite">- <input
type="radio" id="isMirrorRadioFalse" name="is_mirror"
value="false" /> <br>
+ <input type="radio"
id="isMirrorRadioFalse" checked="checked" name="is_mirror"
value="false" <br>
</blockquote>
Regarding to API.md, this is_mirror field is optional so I
checked neither of them by default to provide an "untouched"
option for the user. <br>
<blockquote type="cite"> /> <br>
<label
for="isMirrorRadioFalse">$_("No")</label> <br>
</div> <br>
</div> <br>
diff --git a/ui/pages/repository-edit.html.tmpl
b/ui/pages/repository-edit.html.tmpl <br>
index 9adf0a1..d6baf2f 100644 <br>
--- a/ui/pages/repository-edit.html.tmpl <br>
+++ b/ui/pages/repository-edit.html.tmpl <br>
@@ -48,17 +48,6 @@ <br>
</div> <br>
<div> <br>
<div
class="repository-edit-wrapper-label"> <br>
-
<label>$_("Enabled")</label> <br>
- </div> <br>
- <div
class="repository-edit-wrapper-controls"> <br>
- <input
id="repository-edit-enabled-radio-true" name="enabled"
type="radio" value="true" disabled="disabled" /> <br>
- <label
for="repository-edit-enabled-radio-true">$_("Yes")</label>
<br>
- <input
id="repository-edit-enabled-radio-false" name="enabled"
type="radio" value="false" disabled="disabled" /> <br>
- <label
for="repository-edit-enabled-radio-false">$_("No")</label>
<br>
- </div> <br>
- </div> <br>
- <div> <br>
- <div
class="repository-edit-wrapper-label"> <br>
</blockquote>
OK. I'll include "enable/disable" in the grid. <br>
<blockquote type="cite"> <label
for="repository-edit-baseurl-textbox">$_("Base
URL")</label> <br>
</div> <br>
<div
class="repository-edit-wrapper-controls"> <br>
@@ -88,17 +77,6 @@ <br>
</div> <br>
<div> <br>
<div
class="repository-edit-wrapper-label"> <br>
- <label>$_("GPG
Check")</label> <br>
- </div> <br>
- <div
class="repository-edit-wrapper-controls"> <br>
- <input
id="repository-edit-gpgcheck-radio-true" name="gpgcheck"
type="radio" value="true" /> <br>
- <label
for="repository-edit-gpgcheck-radio-true">$_("Yes")</label>
<br>
- <input
id="repository-edit-gpgcheck-radio-false" name="gpgcheck"
type="radio" value="false" /> <br>
- <label
for="repository-edit-gpgcheck-radio-false">$_("No")</label>
<br>
- </div> <br>
- </div> <br>
- <div> <br>
- <div
class="repository-edit-wrapper-label"> <br>
</blockquote>
@Paulo & Aline, the relationship between GPGCheck and
GPGKey. <br>
</blockquote>
<br>
From rpm doc:<br>
<br>
<div class="variablelist">
<dl>
<dt class="varlistentry"><span class="term"><em
class="parameter"><code>gpgcheck</code></em></span></dt>
<dd>
<div class="para"> It can be '1 'or '0'. This tells yum
whether or not to perform a GPG signature verification on
packages obtained from this repository. </div>
</dd>
</dl>
</div>
<div class="variablelist">
<dl>
<dt class="varlistentry"><span class="term"><em
class="parameter"><code>gpgkey</code></em></span></dt>
<dd>
<div class="para"> A URL that points to a file containing
ASCII GPG key for the repository. This option is used if
yum needs a public key to verify the packages and the
required key has not been imported into the RPM database.
If this option is placed yum will automatically import the
key specified by the URL. yum will ask for confirmation
before installing the key unless you specify <em
class="parameter"><code>assumeyes</code></em>. Also you
can list multiple URLs in the same way as it was done for
baseurl. </div>
</dd>
</dl>
</div>
(<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://docs.fedoraproject.org/en-US/Fedora/14/html/Software_Management_Guide/ch04s08s02.html">http://docs.fedoraproject.org/en-US/Fedora/14/html/Software_Management_Guide/ch04s08s02.html</a>)<br>
<br>
So yes, they are different things.<br>
We can not associate one with other.<br>
</blockquote>
<br>
Reading the doc you pasted, I am thinking we need friendlier words
than gpgcheck and gpgkey<br>
<br>
<blockquote cite="mid:532214D2.60307@linux.vnet.ibm.com" type="cite">
<br>
<br>
<blockquote cite="mid:53213BE3.1040402@linux.vnet.ibm.com"
type="cite">
<blockquote type="cite"> <label
for="repository-edit-gpgkey-textbox">$_("GPG
Key")</label> <br>
</div> <br>
<div
class="repository-edit-wrapper-controls"> <br>
</blockquote>
<br>
_______________________________________________ <br>
Kimchi-devel mailing list <br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Adam King <a class="moz-txt-link-rfc2396E" href="mailto:rak@linux.vnet.ibm.com"><rak@linux.vnet.ibm.com></a>
IBM CSI</pre>
</body>
</html>