Branch 'VADER' - backend/server
by Pradeep Kilambi
backend/server/importlib/backend.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 64469b3fd82cf3bb742eb315442d33343e74f39f
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 2 10:06:29 2009 -0400
509245 - only add md5sum as primary key if it does'nt already exist. This causes dup column query construction and bailing out.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index b31aa7c..fdb737d 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -688,7 +688,8 @@ class Backend:
tbs = self.tables['rhnPackage']
if CFG.ENABLE_NVREA:
# Add md5sum as a primarykey if nevra is enabled
- tbs.pk.append('md5sum')
+ if 'md5sum' not in tbs.pk:
+ tbs.pk.append('md5sum')
childTables = {
'rhnPackageProvides': 'package_id',
14 years, 10 months
backend/server
by Pradeep Kilambi
backend/server/importlib/backend.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 652bab0a00bdb3c2e51612636817c774985dd966
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Thu Jul 2 10:06:29 2009 -0400
509245 - only add md5sum as primary key if it does'nt already exist. This causes dup column query construction and bailing out.
diff --git a/backend/server/importlib/backend.py b/backend/server/importlib/backend.py
index b31aa7c..fdb737d 100644
--- a/backend/server/importlib/backend.py
+++ b/backend/server/importlib/backend.py
@@ -688,7 +688,8 @@ class Backend:
tbs = self.tables['rhnPackage']
if CFG.ENABLE_NVREA:
# Add md5sum as a primarykey if nevra is enabled
- tbs.pk.append('md5sum')
+ if 'md5sum' not in tbs.pk:
+ tbs.pk.append('md5sum')
childTables = {
'rhnPackageProvides': 'package_id',
14 years, 10 months
Branch 'ssm-kickstart' - java/code
by Partha Aji
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf | 2
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf | 4
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf | 76 ++++++----
java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp | 26 +--
4 files changed, 67 insertions(+), 41 deletions(-)
New commits:
commit c927b408893e93dc0229882640efa25a96b364b0
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jul 1 21:24:20 2009 -0400
Adding profile stuff to the schedule UI
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
index 3840730..216b86b 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
@@ -25,7 +25,7 @@ function setStep(stepName) {
<%@ include file="/WEB-INF/pages/common/fragments/systems/system-header.jspf" %>
<h2><img src="/img/icon_kickstart_session-medium.gif" /><bean:message key="kickstart.schedule.heading4.jsp" /></h2>
-
+<c:set var="form" value="${kickstartScheduleWizardForm.map}"/>
<html:form method="POST" action="${actionUrl}" styleId="wizard-form">
<html:hidden property="wizardStep" value="third" styleId="wizard-step" />
<html:hidden property="scheduleAsap" />
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
index bacd83e..de3615e 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
@@ -34,7 +34,7 @@
<html:radio value="custom" property="kernelParamsType" onclick="form.kernelParamsId.disabled = false;">
<strong><bean:message key="Custom" /></strong>
- </html:radio>: <html:text styleId = "kernelParamsId" property="kernelParams" onkeydown="return blockEnter(event)" disabled= "${kickstartScheduleWizardForm.map.kernelParamsType ne "custom"}" /><br /><br />
+ </html:radio>: <html:text styleId = "kernelParamsId" property="kernelParams" onkeydown="return blockEnter(event)" disabled= "${form.kernelParamsType ne "custom"}" /><br /><br />
<rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
</td>
</tr>
@@ -59,7 +59,7 @@
<strong><bean:message key="Custom" /></strong>
</html:radio>: <html:text styleId = "postKernelParamsId"
property="postKernelParams"
- onkeydown="return blockEnter(event)" disabled= "${kickstartScheduleWizardForm.map.postKernelParamsType ne "custom"}"/><br /><br />
+ onkeydown="return blockEnter(event)" disabled= "${form.postKernelParamsType ne "custom"}"/><br /><br />
<rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
</td>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf
index 60fdf40..323fd86 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf
@@ -7,35 +7,57 @@
<th width="10%"><bean:message key="kickstart.schedule.sync.pkg.profile.jsp" />:</th>
<td>
<c:if test="${not empty regularKS}">
- <html:radio styleId="syncExisting" value="existing" property="targetProfileType"
- onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = true;">
+ <input type="radio" name="targetProfileType" value="existing"
+ onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = true;"
+ id="syncExisting"
+ <c:if test="${form.targetProfileType == 'existing'}">checked="checked"</c:if>
+ />
<bean:message key="kickstart.schedule.sync.pkg.profile.option1.jsp" />
- </html:radio><br /><br />
+ <br /><br />
</c:if>
- <html:radio styleId="syncPackage"
- onclick="form.syncPackageSelect.disabled = false; form.syncSystemSelect.disabled = true;"
- value="package" property="targetProfileType" disabled="${syncPackageDisabled}">
- <bean:message key="kickstart.schedule.sync.pkg.profile.option2.jsp" />
- </html:radio>:
- <html:select styleId="syncPackageSelect" property="targetProfile"
- disabled= "${kickstartScheduleWizardForm.map.targetProfileType ne "package"}">
- <html:optionsCollection property="syncPackages"
- label="name" value="id"/>
- </html:select>
+
+ <input type="radio" name="targetProfileType" value="package"
+ onclick="form.syncPackageSelect.disabled = false; form.syncSystemSelect.disabled = true;"
+ id="syncPackage"
+ <c:if test="${form.targetProfileType == 'package'}">checked="checked"</c:if>
+ <c:if test="${syncPackageDisabled or empty form.syncPackages}">disabled="true"</c:if>
+ />
+ <bean:message key="kickstart.schedule.sync.pkg.profile.option2.jsp" />:
+
+ <select name="targetProfile" id="syncPackageSelect"
+ <c:if test="${form.targetProfileType ne 'package' or empty form.syncPackages}">disabled="true"</c:if>
+ >
+ <c:forEach var="package" items="${form.syncPackages}">
+ <option
+ <c:if test="${package.id == form.targetProfile}">selected="selected"</c:if>
+ value='${package.id}'>${package.name}</option>
+ </c:forEach>
+ </select>
<br /><br />
- <html:radio styleId="syncSystem" value="system" property="targetProfileType"
- onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = false;"
- disabled="${syncSystemDisabled}">
- <bean:message key="kickstart.schedule.sync.pkg.profile.option3.jsp" />
- </html:radio>:
- <html:select styleId="syncSystemSelect" property="targetProfile"
- disabled= "${kickstartScheduleWizardForm.map.targetProfileType ne "system"}">
- <html:optionsCollection property="syncSystems"
- label="name" value="id"/>
- </html:select>
- <br /><br />
- <html:radio styleId="syncNone" value="none" property="targetProfileType"
- onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = true;">
- <bean:message key="kickstart.schedule.sync.pkg.profile.option4.jsp" /></html:radio><br />
+ <!--- System profile sync-->
+ <input type="radio" name="targetProfileType" value="system"
+ onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = false;"
+ id="syncSystem"
+ <c:if test="${form.targetProfileType == 'system'}">checked="checked"</c:if>
+ <c:if test="${syncSystemDisabled or empty form.syncSystems}">disabled="true"</c:if>
+ />
+<bean:message key="kickstart.schedule.sync.pkg.profile.option3.jsp" />:
+
+ <select name="targetProfile" id="syncSystemSelect"
+ <c:if test="${form.targetProfileType ne 'system' or empty form.syncSystems}">disabled="true"</c:if>
+ >
+ <c:forEach var="system" items="${form.syncSystems}">
+ <option
+ <c:if test="${system.id == form.targetProfile}">selected="selected"</c:if>
+ value='${system.id}'>${system.name}</option>
+ </c:forEach>
+ </select>
+ <br /><br />
+ <input type="radio" name="targetProfileType" value="none"
+ onclick="form.syncPackageSelect.disabled = true; form.syncSystemSelect.disabled = true;"
+ id="syncNone"
+ <c:if test="${empty form.targetProfileType or form.targetProfileType == 'none'}">checked="checked"</c:if>
+ />
+<bean:message key="kickstart.schedule.sync.pkg.profile.option4.jsp" /><br />
</td>
</tr>
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp b/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
index e133e27..2c56ddd 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
@@ -35,6 +35,8 @@
<bean:message key="ssm.kickstart.schedule.heading2.text.jsp" />
</p>
</div>
+<c:set var="regularKS" value="true"/>
+<c:set var="form" value="${kickstartScheduleWizardForm.map}"/>
<rl:listset name="form">
<c:if test="${empty requestScope.isIP}">
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf" %>
@@ -49,23 +51,23 @@
<th width="10%"><bean:message key="kickstartdetails.jsp.kernel_options" />:</th>
<td>
<input type="radio" name="kernelParamsType" value="distro" onclick="form.kernelParamsId.disabled = true;"
- <c:if test="${empty kickstartScheduleWizardForm.map.kernelParamsType or kickstartScheduleWizardForm.map.kernelParamsType == 'distro'}">checked="checked"</c:if>
+ <c:if test="${empty form.kernelParamsType or form.kernelParamsType == 'distro'}">checked="checked"</c:if>
/>
<bean:message key="kickstart.schedule.kernel.options.distro"/>
<br /><br />
<input type="radio" name="kernelParamsType" value="profile"
- <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType == 'profile'}">checked="checked"</c:if>
+ <c:if test="${form.kernelParamsType == 'profile'}">checked="checked"</c:if>
onclick="form.kernelParamsId.disabled = true;" />
<bean:message key="kickstart.schedule.kernel.options.profile"/>
<br /><br />
<input type="radio" name="kernelParamsType" value="custom"
- <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType == 'custom'}">checked="checked"</c:if>
+ <c:if test="${form.kernelParamsType == 'custom'}">checked="checked"</c:if>
onclick="form.kernelParamsId.disabled = false;" />
<strong><bean:message key="Custom" /></strong>:
- <input type="text" name="kernelParams" value="${kickstartScheduleWizardForm.map.kernelParams}"
- <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType ne 'custom'}">disabled= "true"</c:if>
+ <input type="text" name="kernelParams" value="${form.kernelParams}"
+ <c:if test="${form.kernelParamsType ne 'custom'}">disabled= "true"</c:if>
onkeydown="return blockEnter(event)" id="kernelParamsId" /><br /><br />
<rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
</td>
@@ -74,27 +76,29 @@
<th width="10%"><bean:message key="kickstartdetails.jsp.post_kernel_options" />:</th>
<td>
<input type="radio" name="postKernelParamsType" value="distro" onclick="form.postKernelParamsId.disabled = true;"
- <c:if test="${empty kickstartScheduleWizardForm.map.postKernelParamsType or kickstartScheduleWizardForm.map.postKernelParamsType == 'distro'}">checked="checked"</c:if>
+ <c:if test="${empty form.postKernelParamsType or form.postKernelParamsType == 'distro'}">checked="checked"</c:if>
/>
<bean:message key="kickstart.schedule.kernel.options.distro"/>
<br /><br />
<input type="radio" name="postKernelParamsType" value="profile" onclick="form.postKernelParamsId.disabled = true;"
- <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType == 'profile'}">checked="checked"</c:if>
+ <c:if test="${form.postKernelParamsType == 'profile'}">checked="checked"</c:if>
/>
<bean:message key="kickstart.schedule.kernel.options.profile"/><br /><br />
<input type="radio" name="postKernelParamsType" value="custom" onclick="form.postKernelParamsId.disabled = false;"
- <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType == 'custom'}">checked="checked"</c:if>
+ <c:if test="${form.postKernelParamsType == 'custom'}">checked="checked"</c:if>
/>
<strong><bean:message key="Custom" /></strong>:
- <input type="text" name="postKernelParams" value="${kickstartScheduleWizardForm.map.postKernelParams}"
- <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType ne 'custom'}">disabled= "true"</c:if>
+ <input type="text" name="postKernelParams" value="${form.postKernelParams}"
+ <c:if test="${form.postKernelParamsType ne 'custom'}">disabled= "true"</c:if>
onkeydown="return blockEnter(event)" id="postKernelParamsId" />
<br /><br />
<rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
</td>
- </tr>
+ </tr>
+
+ <%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf" %>
</table>
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/schedule-options.jspf" %>
14 years, 10 months
backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/sync_handlers.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
New commits:
commit 31a6603e5d8dc2b6e919f8e8f86eadb36a629188
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 20:27:30 2009 -0400
some clean up and todos to work on
diff --git a/backend/satellite_tools/sync_handlers.py b/backend/satellite_tools/sync_handlers.py
index 6ffbbe5..567f8ee 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -183,6 +183,7 @@ def import_channels(channels, orgid=None):
collection = ChannelCollection()
batch = []
import satCerts
+ orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
for c in channels:
try:
timestamp = collection.get_channel_timestamp(c)
@@ -195,19 +196,20 @@ def import_channels(channels, orgid=None):
# Check to see if we're asked to sync to an orgid,
# make sure the org from the export is not null org,
# finally if the orgs differ so we might wanna use
- # requested org's channel-family.
- orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
+ # requested org's channel-family.
+ # TODO: Move these checks somewhere more appropriate
if not orgid and c_obj['org_id'] is not None and \
c_obj['org_id'] not in orgs:
#If the src org is not present default to org 1
- #orgid = 1
- c_obj['org_id'] = 1
- else:
+ orgid = 1
+
+ if orgid is not None and c_obj['org_id'] is not None and \
+ c_obj['org_id'] != orgid:
+ #Only set the channel family if its a custom channel
c_obj['org_id'] = orgid
- #Only set the channel family if its a custom channel
- if c_obj['org_id'] is not None and c_obj['org_id'] != orgid:
for family in c_obj['families']:
- family['label'] = 'private-channel-family-' + str(c_obj['org_id'])
+ family['label'] = 'private-channel-family-' + \
+ str(c_obj['org_id'])
batch.append(c_obj)
14 years, 10 months
Branch 'VADER' - backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/sync_handlers.py | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
New commits:
commit 301b179fbfefca0f888ee5da153e2e7c53c344d8
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 20:27:30 2009 -0400
some clean up and todos to work on
diff --git a/backend/satellite_tools/sync_handlers.py b/backend/satellite_tools/sync_handlers.py
index 6ffbbe5..567f8ee 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -183,6 +183,7 @@ def import_channels(channels, orgid=None):
collection = ChannelCollection()
batch = []
import satCerts
+ orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
for c in channels:
try:
timestamp = collection.get_channel_timestamp(c)
@@ -195,19 +196,20 @@ def import_channels(channels, orgid=None):
# Check to see if we're asked to sync to an orgid,
# make sure the org from the export is not null org,
# finally if the orgs differ so we might wanna use
- # requested org's channel-family.
- orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
+ # requested org's channel-family.
+ # TODO: Move these checks somewhere more appropriate
if not orgid and c_obj['org_id'] is not None and \
c_obj['org_id'] not in orgs:
#If the src org is not present default to org 1
- #orgid = 1
- c_obj['org_id'] = 1
- else:
+ orgid = 1
+
+ if orgid is not None and c_obj['org_id'] is not None and \
+ c_obj['org_id'] != orgid:
+ #Only set the channel family if its a custom channel
c_obj['org_id'] = orgid
- #Only set the channel family if its a custom channel
- if c_obj['org_id'] is not None and c_obj['org_id'] != orgid:
for family in c_obj['families']:
- family['label'] = 'private-channel-family-' + str(c_obj['org_id'])
+ family['label'] = 'private-channel-family-' + \
+ str(c_obj['org_id'])
batch.append(c_obj)
14 years, 10 months
Branch 'ssm-kickstart' - java/code
by Partha Aji
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 4
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf | 22 +--
java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp | 57 ++++++++++
java/code/webapp/WEB-INF/struts-config.xml | 4
4 files changed, 72 insertions(+), 15 deletions(-)
New commits:
commit 770c6a6d788c0689da987657ae6ffed56851c4bb
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jul 1 19:53:01 2009 -0400
Added kernel options
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 7527dd8..48ab0ab 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -16427,10 +16427,10 @@ the <a href="/rhn/kickstart/ActivationKeysList.do?ksid={0}">Acti
<source>Bootloader</source>
</trans-unit>
<trans-unit id="kickstart.schedule.kernel.options.distro">
- <source><strong>As specified by Kickstart Distribution</strong>({0})</source>
+ <source><strong>As specified by Kickstart Distribution</strong></source>
</trans-unit>
<trans-unit id="kickstart.schedule.kernel.options.profile">
- <source><strong>As specified by Kickstart Profile</strong>({0})</source>
+ <source><strong>As specified by Kickstart Profile</strong></source>
</trans-unit>
<trans-unit id="kickstart.schedule.kernel.options.custom.tip">
<source>If you would not like any kernel options, select '{0}' and leave the form field blank.</source>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
index 602b346..bacd83e 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf
@@ -6,27 +6,27 @@
<tr>
<th width="10%"><bean:message key="kickstartdetails.jsp.kernel_options" />:</th>
<td>
- <c:set var="profile_url"><a href="/rhn/kickstart/KickstartDetailsEdit.do?ksid=${requestScope.profile.id}">${requestScope.profile.label}</a></c:set>
+ <c:set var="profile_url">(<a href="/rhn/kickstart/KickstartDetailsEdit.do?ksid=${requestScope.profile.id}">${requestScope.profile.label}</a>)</c:set>
<c:choose>
<c:when test = "${not requestScope.distro.rhnTree}">
- <c:set var="distro_url"><a href="/rhn/kickstart/TreeEdit.do?kstid=${requestScope.distro.id}">${requestScope.distro.label}</a></c:set>
+ <c:set var="distro_url">(<a href="/rhn/kickstart/TreeEdit.do?kstid=${requestScope.distro.id}">${requestScope.distro.label}</a>)</c:set>
</c:when>
<c:otherwise>
- <c:set var="distro_url">${requestScope.distro.label}</c:set>
+ <c:set var="distro_url">(${requestScope.distro.label})</c:set>
</c:otherwise>
</c:choose>
<html:radio value="distro" property="kernelParamsType" onclick="form.kernelParamsId.disabled = true;">
- <bean:message key="kickstart.schedule.kernel.options.distro" arg0="${distro_url}"/>
- </html:radio>:<br/>
+ <bean:message key="kickstart.schedule.kernel.options.distro"/>
+ </html:radio> ${distro_url}:<br/>
<c:choose> <c:when test = "${not empty requestScope.distro_kernel_params}"> ${requestScope.distro_kernel_params}</c:when>
<c:otherwise>(<bean:message key="none specified"/>)</c:otherwise>
</c:choose>
<br /><br />
<html:radio value="profile" property="kernelParamsType" onclick="form.kernelParamsId.disabled = true;">
- <bean:message key="kickstart.schedule.kernel.options.profile" arg0="${profile_url}"/>
- </html:radio>:<br/>
+ <bean:message key="kickstart.schedule.kernel.options.profile"/>
+ </html:radio> ${profile_url}:<br/>
<c:choose> <c:when test = "${not empty requestScope.profile_kernel_params}"> ${requestScope.profile_kernel_params}</c:when>
<c:otherwise>(<bean:message key="none specified"/>)</c:otherwise>
</c:choose>
@@ -42,15 +42,15 @@
<th width="10%"><bean:message key="kickstartdetails.jsp.post_kernel_options" />:</th>
<td>
<html:radio value="distro" property="postKernelParamsType" onclick="form.postKernelParamsId.disabled = true;">
- <bean:message key="kickstart.schedule.kernel.options.distro" arg0="${distro_url}"/>
- </html:radio>:<br/>
+ <bean:message key="kickstart.schedule.kernel.options.distro"/>
+ </html:radio> ${distro_url}:<br/>
<c:choose> <c:when test = "${not empty requestScope.distro_post_kernel_params}"> ${requestScope.distro_post_kernel_params}</c:when>
<c:otherwise>(<bean:message key="none specified"/>)</c:otherwise>
</c:choose><br /><br />
<html:radio value="profile" property="postKernelParamsType" onclick="form.postKernelParamsId.disabled = true;">
- <bean:message key="kickstart.schedule.kernel.options.profile" arg0="${profile_url}"/>
- </html:radio>:<br/>
+ <bean:message key="kickstart.schedule.kernel.options.profile"/>
+ </html:radio> ${profile_url}:<br/>
<c:choose> <c:when test = "${not empty requestScope.profile_post_kernel_params}"> ${requestScope.profile_post_kernel_params}</c:when>
<c:otherwise>(<bean:message key="none specified"/>)</c:otherwise>
</c:choose><br /><br />
diff --git a/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp b/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
index 4a562e2..e133e27 100644
--- a/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
+++ b/java/code/webapp/WEB-INF/pages/kickstart/ssm/schedule.jsp
@@ -40,6 +40,63 @@
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/profile-list.jspf" %>
</c:if>
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/proxy-options.jspf" %>
+ <br/>
+ <h2>
+ <bean:message key="ssm.kickstart.schedule.advanced.options"/>
+ </h2>
+ <table class="details">
+ <tr>
+ <th width="10%"><bean:message key="kickstartdetails.jsp.kernel_options" />:</th>
+ <td>
+ <input type="radio" name="kernelParamsType" value="distro" onclick="form.kernelParamsId.disabled = true;"
+ <c:if test="${empty kickstartScheduleWizardForm.map.kernelParamsType or kickstartScheduleWizardForm.map.kernelParamsType == 'distro'}">checked="checked"</c:if>
+ />
+ <bean:message key="kickstart.schedule.kernel.options.distro"/>
+ <br /><br />
+ <input type="radio" name="kernelParamsType" value="profile"
+ <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType == 'profile'}">checked="checked"</c:if>
+ onclick="form.kernelParamsId.disabled = true;" />
+ <bean:message key="kickstart.schedule.kernel.options.profile"/>
+
+ <br /><br />
+
+ <input type="radio" name="kernelParamsType" value="custom"
+ <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType == 'custom'}">checked="checked"</c:if>
+ onclick="form.kernelParamsId.disabled = false;" />
+ <strong><bean:message key="Custom" /></strong>:
+ <input type="text" name="kernelParams" value="${kickstartScheduleWizardForm.map.kernelParams}"
+ <c:if test="${kickstartScheduleWizardForm.map.kernelParamsType ne 'custom'}">disabled= "true"</c:if>
+ onkeydown="return blockEnter(event)" id="kernelParamsId" /><br /><br />
+ <rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
+ </td>
+ </tr>
+ <tr>
+ <th width="10%"><bean:message key="kickstartdetails.jsp.post_kernel_options" />:</th>
+ <td>
+ <input type="radio" name="postKernelParamsType" value="distro" onclick="form.postKernelParamsId.disabled = true;"
+ <c:if test="${empty kickstartScheduleWizardForm.map.postKernelParamsType or kickstartScheduleWizardForm.map.postKernelParamsType == 'distro'}">checked="checked"</c:if>
+ />
+ <bean:message key="kickstart.schedule.kernel.options.distro"/>
+ <br /><br />
+
+ <input type="radio" name="postKernelParamsType" value="profile" onclick="form.postKernelParamsId.disabled = true;"
+ <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType == 'profile'}">checked="checked"</c:if>
+ />
+ <bean:message key="kickstart.schedule.kernel.options.profile"/><br /><br />
+
+ <input type="radio" name="postKernelParamsType" value="custom" onclick="form.postKernelParamsId.disabled = false;"
+ <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType == 'custom'}">checked="checked"</c:if>
+ />
+ <strong><bean:message key="Custom" /></strong>:
+ <input type="text" name="postKernelParams" value="${kickstartScheduleWizardForm.map.postKernelParams}"
+ <c:if test="${kickstartScheduleWizardForm.map.postKernelParamsType ne 'custom'}">disabled= "true"</c:if>
+ onkeydown="return blockEnter(event)" id="postKernelParamsId" />
+<br /><br />
+ <rhn:tooltip><bean:message key="kickstart.schedule.kernel.options.custom.tip" arg0="${rhn:localize('Custom')}"/></rhn:tooltip>
+ </td>
+ </tr>
+ </table>
+
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/schedule-options.jspf" %>
<div align="right">
<hr />
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 2e4399c..ba9acbc 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -4620,7 +4620,7 @@
redirect= "true"/>
</action>
<action path="/systems/ssm/kickstart/ScheduleByProfile"
- name ="datePickerForm"
+ name ="kickstartScheduleWizardForm"
scope="request"
input="/WEB-INF/pages/kickstart/ssm/schedule.jsp"
type="com.redhat.rhn.frontend.action.kickstart.ssm.SsmKSScheduleAction"
@@ -4634,7 +4634,7 @@
</action>
<action path="/systems/ssm/kickstart/ScheduleByIp"
- name ="datePickerForm"
+ name ="kickstartScheduleWizardForm"
scope="request"
input="/WEB-INF/pages/kickstart/ssm/schedule.jsp"
type="com.redhat.rhn.frontend.action.kickstart.ssm.SsmKSScheduleAction"
14 years, 10 months
Branch 'VADER' - java/code
by Mike McCune
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 5 ++++-
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit a624bf6db6719cfaf62d576e377d184c038114b4
Author: Mike McCune <mmccune(a)gibson.pdx.redhat.com>
Date: Wed Jul 1 16:45:06 2009 -0700
509019 - adding tooltip on howto copypaste
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 5ad2ea2..5a884e9 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -9834,7 +9834,10 @@ Please note that some manual configuration of these scripts may still be require
</trans-unit>
<trans-unit id="kickstart.advanced.filedetails.jsp.tip.edit">
<source> Alternatively, you can upload a new version in the '{0}' section below and select '{1}'.</source>
- </trans-unit>
+ </trans-unit>
+ <trans-unit id="kickstart.advanced.filedetails.jsp.tip.copypaste">
+ <source> If you wish to re-use an existing Kickstart Profile we recommend you copy-paste the template from /var/lib/rhn/kickstarts instead of from your browser. This will ensure that the template variables will be preserved and the registration process will work properly after the kickstart.</source>
+ </trans-unit>
</group>
<trans-unit id="kickstartdatadelete.jsp.confirmdelete">
<source>Delete Kickstart</source>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
index e290a04..b334c36 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
@@ -74,6 +74,7 @@
arg0 = "${rhn:localize('kickstart.advanced.jsp.uploadtab')}"
arg1 = "${rhn:localize(requestScope.uploadKey)}"
/></rhn:tooltip>
+ <rhn:tooltip><bean:message key="kickstart.advanced.filedetails.jsp.tip.copypaste"/></rhn:tooltip>
</td>
</tr>
</table>
14 years, 10 months
java/code
by Mike McCune
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 5 ++++-
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit f87886620bef29da0804cb148e7c996c5a59d5b5
Author: Mike McCune <mmccune(a)gibson.pdx.redhat.com>
Date: Wed Jul 1 16:45:06 2009 -0700
509019 - adding tooltip on howto copypaste
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 7527dd8..d9b9a1f 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -9834,7 +9834,10 @@ Please note that some manual configuration of these scripts may still be require
</trans-unit>
<trans-unit id="kickstart.advanced.filedetails.jsp.tip.edit">
<source> Alternatively, you can upload a new version in the '{0}' section below and select '{1}'.</source>
- </trans-unit>
+ </trans-unit>
+ <trans-unit id="kickstart.advanced.filedetails.jsp.tip.copypaste">
+ <source> If you wish to re-use an existing Kickstart Profile we recommend you copy-paste the template from /var/lib/rhn/kickstarts instead of from your browser. This will ensure that the template variables will be preserved and the registration process will work properly after the kickstart.</source>
+ </trans-unit>
</group>
<trans-unit id="kickstartdatadelete.jsp.confirmdelete">
<source>Delete Kickstart</source>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
index e290a04..b334c36 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf
@@ -74,6 +74,7 @@
arg0 = "${rhn:localize('kickstart.advanced.jsp.uploadtab')}"
arg1 = "${rhn:localize(requestScope.uploadKey)}"
/></rhn:tooltip>
+ <rhn:tooltip><bean:message key="kickstart.advanced.filedetails.jsp.tip.copypaste"/></rhn:tooltip>
</td>
</tr>
</table>
14 years, 10 months
backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/satsync.py | 9 +++++----
backend/satellite_tools/sync_handlers.py | 13 ++++++++-----
2 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit b3cd83ba4a828c56ef7c004e49cc6ed62a7d4867
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 19:28:49 2009 -0400
fixing the org id logic to take into account nul orgs
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 9be12e9..3c44efb 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2007,10 +2007,11 @@ def _validate_package_org(batch):
orgid = OPTIONS.orgid or None
orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
for pkg in batch:
- if pkg['org_id'] is not None and pkg['org_id'] not in orgs:
- orgid = 1
- if orgid is not None and pkg['org_id'] is not None and \
- pkg['org_id'] != orgid:
+ if not OPTIONS.orgid and pkg['org_id'] is not None and \
+ pkg['org_id'] not in orgs:
+
+ pkg['org_id'] = 1
+ else:
pkg['org_id'] = orgid
diff --git a/backend/satellite_tools/sync_handlers.py b/backend/satellite_tools/sync_handlers.py
index f2488a7..6ffbbe5 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -197,14 +197,17 @@ def import_channels(channels, orgid=None):
# finally if the orgs differ so we might wanna use
# requested org's channel-family.
orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
- if c_obj['org_id'] is not None and c_obj['org_id'] not in orgs:
+ if not orgid and c_obj['org_id'] is not None and \
+ c_obj['org_id'] not in orgs:
#If the src org is not present default to org 1
- orgid = str(1)
- if orgid is not None and c_obj['org_id'] is not None and \
- c_obj['org_id'] != orgid:
+ #orgid = 1
+ c_obj['org_id'] = 1
+ else:
c_obj['org_id'] = orgid
+ #Only set the channel family if its a custom channel
+ if c_obj['org_id'] is not None and c_obj['org_id'] != orgid:
for family in c_obj['families']:
- family['label'] = 'private-channel-family-' + c_obj['org_id']
+ family['label'] = 'private-channel-family-' + str(c_obj['org_id'])
batch.append(c_obj)
14 years, 10 months
Branch 'VADER' - backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/satsync.py | 9 +++++----
backend/satellite_tools/sync_handlers.py | 13 ++++++++-----
2 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit f86fe497ab4e89389712455d2e40944136338381
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 1 19:28:49 2009 -0400
fixing the org id logic to take into account nul orgs
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 9be12e9..3c44efb 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2007,10 +2007,11 @@ def _validate_package_org(batch):
orgid = OPTIONS.orgid or None
orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
for pkg in batch:
- if pkg['org_id'] is not None and pkg['org_id'] not in orgs:
- orgid = 1
- if orgid is not None and pkg['org_id'] is not None and \
- pkg['org_id'] != orgid:
+ if not OPTIONS.orgid and pkg['org_id'] is not None and \
+ pkg['org_id'] not in orgs:
+
+ pkg['org_id'] = 1
+ else:
pkg['org_id'] = orgid
diff --git a/backend/satellite_tools/sync_handlers.py b/backend/satellite_tools/sync_handlers.py
index f2488a7..6ffbbe5 100644
--- a/backend/satellite_tools/sync_handlers.py
+++ b/backend/satellite_tools/sync_handlers.py
@@ -197,14 +197,17 @@ def import_channels(channels, orgid=None):
# finally if the orgs differ so we might wanna use
# requested org's channel-family.
orgs = map(lambda a: a['id'], satCerts.get_all_orgs())
- if c_obj['org_id'] is not None and c_obj['org_id'] not in orgs:
+ if not orgid and c_obj['org_id'] is not None and \
+ c_obj['org_id'] not in orgs:
#If the src org is not present default to org 1
- orgid = str(1)
- if orgid is not None and c_obj['org_id'] is not None and \
- c_obj['org_id'] != orgid:
+ #orgid = 1
+ c_obj['org_id'] = 1
+ else:
c_obj['org_id'] = orgid
+ #Only set the channel family if its a custom channel
+ if c_obj['org_id'] is not None and c_obj['org_id'] != orgid:
for family in c_obj['families']:
- family['label'] = 'private-channel-family-' + c_obj['org_id']
+ family['label'] = 'private-channel-family-' + str(c_obj['org_id'])
batch.append(c_obj)
14 years, 10 months