Bug 810871 - Not acceptable languages to write cobbler snippets
Not acceptable languages to write cobbler snippets
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
1.8
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Stephen Herr
Red Hat Satellite QA List
:
Depends On: 690588 825383
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-04-09 09:42 EDT by Stephen Herr
Modified: 2012-11-01 12:19 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 690588
Environment:
Last Closed: 2012-11-01 12:19:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen Herr 2012-04-09 09:42:49 EDT
+++ This bug was initially created as a clone of Bug #690588 +++

Description of problem:

When you click in the drop down option you see a list of impossible languages, including languages such as:

Basic
Brainfuck
cpp
VisualBasic

And others.

Version-Release number of selected component (if applicable):

5.4

How reproducible:

Always.

Steps to Reproduce:

1. Navigate to the Systems tab and click Kickstart then Kickstart Snippets 
2. Select "Create Snippet"
3. Click on the drop down for language type in the Content box 
  
Actual results:

Languages such as the listed above.


Expected results:

Only valid languages

Additional info:

--- Additional comment from cperry@redhat.com on 2011-03-24 14:02:10 EDT ---

Think this is the 'editarea' we ship to allow folks a text editor UI within Satellite. Used in a few areas of product. 

Grabbing src rpm

[cperry@cperry editarea]$ grep -irl brain * 
editarea_0_8_2/edit_area/edit_area_loader.js
editarea_0_8_2/edit_area/edit_area_full.js
editarea_0_8_2/edit_area/reg_syntax/brainfuck.js
editarea_0_8_2/exemples/exemple_full.html
editarea_0_8_2/docs/credits.html
editarea_0_8_2/docs/about.html
editarea_0_8_2/change_log.txt
editarea_0_8_2-bash.patch
editarea_0_8_2.zip
[cperry@cperry editarea]$ 


Within spacewalk code, we use edit area for:

[cperry@cperry java]$ grep -ir editarea *
code/webapp/WEB-INF/pages/common/fragments/editarea.jspf:<script language="javascript" type="text/javascript" src="/editarea/edit_area_full.js"></script>
code/webapp/WEB-INF/pages/common/fragments/editarea.jspf:editAreaLoader.init({
code/webapp/WEB-INF/pages/common/fragments/configuration/files/contents.jspf:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/common/fragments/configuration/channel/create.jspf:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/common/fragments/kickstart/advanced/details.jspf:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/admin/catalina.jsp:<script language="javascript" type="text/javascript" src="/editarea/edit_area_full.js"></script>
code/webapp/WEB-INF/pages/admin/catalina.jsp:editAreaLoader.init({
code/webapp/WEB-INF/pages/kickstart/cobbler/snippetview.jsp:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/kickstart/cobbler/snippetdetails.jsp:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/kickstart/scriptcreate.jsp:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
code/webapp/WEB-INF/pages/kickstart/scriptedit.jsp:<%@ include file="/WEB-INF/pages/common/fragments/editarea.jspf" %>
spacewalk-java.spec:- making the editarea not highlight by default (jsherril@redhat.com)
spacewalk-java.spec:- fixed syntax highliging in editarea textareas
spacewalk-java.spec:- Make spacewalk use the editarea RPM and remove supplied editarea files (colin.coe@gmail.com)
[cperry@cperry java]$ 


So, configuration, kickstart scripts and cobbler snippets. 

We can likely modify editarea src.rpm with patch to remove a bunch of these languages which do not make sense in anaconda and Linux config stuff in general. 

Cliff

--- Additional comment from sherr@redhat.com on 2012-04-04 11:29:56 EDT ---

Note to developer, whereas technically you can have anything at all in in kickstart snippet, the desire here is to limit the syntax highlighting options in the editor to common useful languages. I'm going to define those languages as:

bash, perl, php, python, ruby, xml

Note in addition that if you change the languages available in the editarea jar, you will be affecting every place we use an editarea, so including (but not limited to)

1) config file editing
2) kickstart snippets
3) kickstart pre/post sections
Comment 1 Stephen Herr 2012-04-09 09:52:14 EDT
Committed to Spacewalk master: 91e2cc74c8a6e81c7b3faee7866c609c04463449
Comment 3 Jan Pazdziora 2012-10-30 15:24:12 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 4 Jan Pazdziora 2012-11-01 12:19:29 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

Note You need to log in before you can comment on or make changes to this bug.