Permalink
Browse files

Imported eucalyptus-ui as a console subtree

  • Loading branch information...
2 parents 390fc8d + 9654cc7 commit cbf4ab939e7eb91354ae4ba2344bc4c425fb2f54 @sangmin sangmin committed Oct 24, 2012
Showing with 57,237 additions and 0 deletions.
  1. +1 −0 console/.gitignore
  2. +88 −0 console/README.md
  3. +1 −0 console/VERSION
  4. 0 console/esapi/__init__.py
  5. 0 console/esapi/codecs/__init__.py
  6. +113 −0 console/esapi/codecs/codec.py
  7. +481 −0 console/esapi/codecs/html_entity.py
  8. +176 −0 console/esapi/codecs/push_back_string.py
  9. +185 −0 console/euca-console-server
  10. +5 −0 console/launcher.sh
  11. +24 −0 console/mockdata/Addresses.json
  12. +8 −0 console/mockdata/ConsoleOutput.json
  13. +114 −0 console/mockdata/Groups.json
  14. +744 −0 console/mockdata/Images.json
  15. +432 −0 console/mockdata/Instances.json
  16. +101 −0 console/mockdata/Keypairs.json
  17. +50 −0 console/mockdata/Snapshots.json
  18. +91 −0 console/mockdata/Volumes.json
  19. +12 −0 console/mockdata/Zones.json
  20. +390 −0 console/server/__init__.py
  21. +523 −0 console/server/api.py
  22. +249 −0 console/server/botoclcinterface.py
  23. +120 −0 console/server/botojsonencoder.py
  24. +331 −0 console/server/cachingclcinterface.py
  25. +198 −0 console/server/clcinterface.py
  26. +46 −0 console/server/configloader.py
  27. +96 −0 console/server/console.ini
  28. +366 −0 console/server/mockclcinterface.py
  29. +21 −0 console/server/response.py
  30. +45 −0 console/server/token.py
  31. +29 −0 console/setup.py
  32. +2,791 −0 console/static/css/eucalyptus.css
  33. +12 −0 console/static/css/gray-gradient.svg
  34. +12 −0 console/static/css/green-gradient-hover.svg
  35. +12 −0 console/static/css/green-gradient.svg
  36. +500 −0 console/static/css/normalize.css
  37. +688 −0 console/static/custom/Messages.properties
  38. +1 −0 console/static/custom/Messages_en.properties
  39. +1 −0 console/static/custom/Messages_en_US.properties
  40. +688 −0 console/static/custom/Messages_es_ES.properties
  41. +688 −0 console/static/custom/Messages_fr_FR.properties
  42. +688 −0 console/static/custom/Messages_it_IT.properties
  43. +1 −0 console/static/custom/Messages_ko.properties
  44. +691 −0 console/static/custom/Messages_ko_KR.properties
  45. +689 −0 console/static/custom/Messages_ru.properties
  46. +1 −0 console/static/custom/Messages_ru_RU.properties
  47. +688 −0 console/static/custom/Messages_zh_CN.properties
  48. +94 −0 console/static/fonts/play/Play OFL SIL Font License 1.1.txt
  49. BIN console/static/fonts/play/Play-Bold-webfont.eot
  50. +147 −0 console/static/fonts/play/Play-Bold-webfont.svg
  51. BIN console/static/fonts/play/Play-Bold-webfont.ttf
  52. BIN console/static/fonts/play/Play-Bold-webfont.woff
  53. BIN console/static/fonts/play/Play-Regular-webfont.eot
  54. +147 −0 console/static/fonts/play/Play-Regular-webfont.svg
  55. BIN console/static/fonts/play/Play-Regular-webfont.ttf
  56. BIN console/static/fonts/play/Play-Regular-webfont.woff
  57. +115 −0 console/static/help/en/console_about.html
  58. +58 −0 console/static/help/en/console_allocate_eip.html
  59. +52 −0 console/static/help/en/console_associate_eip.html
  60. +63 −0 console/static/help/en/console_attach_volume.html
  61. +217 −0 console/static/help/en/console_create_instances.html
  62. +91 −0 console/static/help/en/console_create_keypair.html
  63. +99 −0 console/static/help/en/console_create_security_group.html
  64. +52 −0 console/static/help/en/console_create_snapshot.html
  65. +76 −0 console/static/help/en/console_create_volume.html
  66. +141 −0 console/static/help/en/console_dashboard.html
  67. +50 −0 console/static/help/en/console_delete_keypair.html
  68. +50 −0 console/static/help/en/console_delete_security_group.html
  69. +50 −0 console/static/help/en/console_delete_snapshot.html
  70. +50 −0 console/static/help/en/console_delete_volumes.html
  71. +53 −0 console/static/help/en/console_detach_volume.html
  72. +53 −0 console/static/help/en/console_disassociate_eip.html
  73. +94 −0 console/static/help/en/console_edit_security_group.html
  74. +46 −0 console/static/help/en/console_get_console_output.html
  75. +53 −0 console/static/help/en/console_import_keypair.html
  76. +133 −0 console/static/help/en/console_launch_more_instances.html
  77. +62 −0 console/static/help/en/console_login.html
  78. +162 −0 console/static/help/en/console_manage_eips.html
  79. +96 −0 console/static/help/en/console_manage_images.html
  80. +204 −0 console/static/help/en/console_manage_instances.html
  81. +109 −0 console/static/help/en/console_manage_keypairs.html
  82. +101 −0 console/static/help/en/console_manage_security_groups.html
  83. +116 −0 console/static/help/en/console_manage_snapshots.html
  84. +177 −0 console/static/help/en/console_manage_volumes.html
  85. +50 −0 console/static/help/en/console_reboot_instances.html
  86. +50 −0 console/static/help/en/console_release_eip.html
  87. +50 −0 console/static/help/en/console_stop_instances.html
  88. +50 −0 console/static/help/en/console_terminate_instances.html
  89. +1 −0 console/static/help/en_US
  90. BIN console/static/images/css-sprites-small.png
  91. BIN console/static/images/css-sprites.png
  92. BIN console/static/images/dialog-overlay-bgfill.png
  93. BIN console/static/images/dots32.gif
  94. BIN console/static/images/expanded-row-shadows.png
  95. BIN console/static/images/explorer-icon-sprites.png
  96. BIN console/static/images/favicon.ico
  97. BIN console/static/images/footer-bgfill.png
  98. BIN console/static/images/images-icon-sprites.png
  99. BIN console/static/images/koalas.jpeg
  100. BIN console/static/images/loading.gif
  101. BIN console/static/images/main-bgfill.png
  102. BIN console/static/images/more-action-arrow.png
  103. BIN console/static/images/resources-nav-sprites.png
  104. BIN console/static/images/side-shadow.png
  105. BIN console/static/images/sort_asc.png
  106. BIN console/static/images/sort_asc_disabled.png
  107. BIN console/static/images/sort_both.png
  108. BIN console/static/images/sort_desc.png
  109. BIN console/static/images/sort_desc_disabled.png
  110. BIN console/static/images/table-header-bg.png
  111. BIN console/static/images/table-header-sort-asc.png
  112. BIN console/static/images/table-header-sort-desc.png
  113. BIN console/static/images/wizard-instances.png
  114. BIN console/static/images/wizard-pointer.png
  115. BIN console/static/images/wizard-summary-sprites.png
  116. +1,463 −0 console/static/index.html
  117. +230 −0 console/static/js/dashboard.js
  118. +481 −0 console/static/js/eip.js
  119. +201 −0 console/static/js/eucadata.js
  120. +67 −0 console/static/js/eucaevent.js
  121. +111 −0 console/static/js/eucalyptus.js
  122. +96 −0 console/static/js/eucawidget.js
  123. +122 −0 console/static/js/explorer.js
  124. +46 −0 console/static/js/footer.js
  125. +122 −0 console/static/js/header.js
  126. +279 −0 console/static/js/help.js
  127. +36 −0 console/static/js/i18n.js
  128. +237 −0 console/static/js/image.js
  129. +1,060 −0 console/static/js/instance.js
  130. +87 −0 console/static/js/jquery_ext.js
  131. +76 −0 console/static/js/jquery_generate_file.js
  132. +322 −0 console/static/js/keypair.js
  133. +1,395 −0 console/static/js/launcher.js
  134. +139 −0 console/static/js/login.js
  135. +127 −0 console/static/js/main.js
  136. +183 −0 console/static/js/main_container.js
  137. +97 −0 console/static/js/notification.js
  138. +958 −0 console/static/js/sgroup.js
  139. +429 −0 console/static/js/snapshot.js
  140. +505 −0 console/static/js/support.js
  141. +483 −0 console/static/js/template/eucadialog.js
  142. +589 −0 console/static/js/template/eucatable.js
  143. +677 −0 console/static/js/volume.js
  144. +41 −0 console/static/lib/dataTables.fnGetTds.js
  145. BIN console/static/lib/images/ui-bg_flat_0_aaaaaa_40x100.png
  146. BIN console/static/lib/images/ui-bg_flat_75_ffffff_40x100.png
  147. BIN console/static/lib/images/ui-bg_glass_55_fbf9ee_1x400.png
  148. BIN console/static/lib/images/ui-bg_glass_65_ffffff_1x400.png
  149. BIN console/static/lib/images/ui-bg_glass_75_dadada_1x400.png
  150. BIN console/static/lib/images/ui-bg_glass_75_e6e6e6_1x400.png
  151. BIN console/static/lib/images/ui-bg_glass_95_fef1ec_1x400.png
  152. BIN console/static/lib/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  153. BIN console/static/lib/images/ui-icons_222222_256x240.png
  154. BIN console/static/lib/images/ui-icons_2e83ff_256x240.png
  155. BIN console/static/lib/images/ui-icons_454545_256x240.png
  156. BIN console/static/lib/images/ui-icons_888888_256x240.png
  157. BIN console/static/lib/images/ui-icons_cd0a0a_256x240.png
  158. +4 −0 console/static/lib/jquery-1.7.2.min.js
  159. +538 −0 console/static/lib/jquery-table.css
  160. +565 −0 console/static/lib/jquery-ui-1.8.21.custom.css
  161. +471 −0 console/static/lib/jquery-ui-1.9.0-beta1.css
  162. +14,659 −0 console/static/lib/jquery-ui-1.9.0-beta1.js
  163. +390 −0 console/static/lib/jquery.ba-hashchange.js
  164. +147 −0 console/static/lib/jquery.base64.js
  165. +142 −0 console/static/lib/jquery.contextMenu.css
  166. +1,585 −0 console/static/lib/jquery.contextMenu.js
  167. +72 −0 console/static/lib/jquery.cookie.js
  168. +99 −0 console/static/lib/jquery.css
  169. +7,442 −0 console/static/lib/jquery.dataTables.js
  170. +1,072 −0 console/static/lib/jquery.fileupload.js
  171. +341 −0 console/static/lib/jquery.flip.js
  172. +9 −0 console/static/lib/jquery.i18n.properties-min-1.0.9.js
  173. +172 −0 console/static/lib/jquery.iframe-transport.js
  174. +1 −0 console/static/lib/jquery.qtip.min.css
  175. +2 −0 console/static/lib/jquery.qtip.min.js
  176. +5 −0 console/static/lib/jquery.ui.core.min.js
  177. +252 −0 console/static/lib/jquery.ui.position.js
  178. +5 −0 console/static/lib/jquery.ui.tabs.min.js
  179. +5 −0 console/static/lib/jquery.ui.widget.min.js
  180. +8 −0 console/static/lib/jquery.watermark.min.js
  181. +1,035 −0 console/static/lib/jsrender.js
  182. +6 −0 console/static/lib/moment.min.js
  183. +26 −0 console/tests/proxy/addresstests.py
  184. +47 −0 console/tests/proxy/grouptests.py
  185. +38 −0 console/tests/proxy/imagetests.py
  186. +69 −0 console/tests/proxy/instancetests.py
  187. +26 −0 console/tests/proxy/keypairtests.py
  188. +21 −0 console/tests/proxy/loadtest.py
  189. +56 −0 console/tests/proxy/snapshottests.py
  190. +345 −0 console/tests/proxy/uiproxyclient.py
  191. +60 −0 console/tests/proxy/volumetests.py
  192. +10 −0 console/tests/proxy/zonetests.py
  193. +41 −0 console/tests/selenium/Action-CreateNewKeyPairs
  194. +51 −0 console/tests/selenium/GoToPage-Keypairs
  195. +51 −0 console/tests/selenium/GoToPage-Running
  196. +52 −0 console/tests/selenium/GoToPage-SecurityGroups
  197. +51 −0 console/tests/selenium/GoToPage-Volumes
  198. +61 −0 console/tests/selenium/Login
  199. +66 −0 console/tests/selenium/Logout
  200. +20 −0 console/tests/selenium/TEST-SUITE-EUI-SPRINT01
  201. +57 −0 console/tests/selenium/create_volumne_sel_case
View
@@ -0,0 +1 @@
+*.pyc
View
@@ -0,0 +1,88 @@
+eucalyptus management console
+=============
+
+The Eucalyptus Management Console allows cloud users to do in a web browser what otherwise is done over the Eucalyptus API or command-line interface.
+The design goal is to build a tool that is elegant and easy to use.
+The tool provides graphical access to the underlying API and CLI, but does not provide additional functionality of its own
+
+The management console consists of a web server implementation using Python Tornado and a rich Ajax client based on JQuery.
+The server exposes various REST interfaces, which are roughly equivalent to EC2/S3 apis.
+
+PREREQUISITE
+
+The management console works with Eucalyptus version 3.2 and later (earlier versions do not work).
+This is due to the new authentication mechanism added in 3.2 to support the management console.
+If you run the console in mock mode (see below), the Eucalyptus 3.2 is not required (Eucalyptus cloud is not required).
+
+The management console was tested with the following browsers:
+ - Firefox 15 (Recommended)
+ - Google Chrome 22 (Recommended)
+ - Safari 6
+ - Internet Explorer 9
+
+INSTALLATION
+
+You will need to download and install tornado based on their instructions: http://www.tornadoweb.org/. For RHEL or Centos 5/6, you can install it from the package repository:
+ - (optional) configure the EPEL repo for your version: http://fedoraproject.org/wiki/EPEL
+ - yum install python-tornado
+
+Likewise, for UBUNTU, use:
+ - apt-get install python-tornado
+
+You also need to install python-boto and m2crypto, which are required to communicate with Eucalyptus Cloud Controller.
+
+For RHEL or Centos 5/6, use:
+ - yum install m2crypto python-boto
+
+For UBUNTU, use:
+ - apt-get install python-m2crypto python-boto
+
+
+CONFIGURATION
+
+To configure the console to work with your Eucalyptus cloud (version 3.2 and later), edit server/console.ini and change the endpoint.
+ - clchost: "HOSTNAME OR IP OF YOUR EUCALYPTUS CLC".
+Make sure that the 'clchost' is reachable from the host that runs console's web server.
+
+You can also test the console's functionality using the supplied mock data. To enable the mock mode:
+ - usemock: True
+
+Other notable configuration options include:
+ - uiport: the port number to listen for incoming HTTP request
+ - sslcert/sslkey: the path to the SSL certificate to be used for HTTPS
+ - session.idle.timeout: the timeout that expires users' session after idling period
+ - session.abs.timeout: the absolute timeout afterwhich users' should log-in the console again
+ - language: the language code to be used for internationalization (see below)
+ - support.url: the url (or mailto: admin ) of your Cloud support page
+
+HOW TO RUN
+
+To launch the console's web server, simply run "launcher.sh".
+
+USING THE CONSOLE
+
+ - Open your web brower and point to 'http://localhost:8888' (replace localhost and 8888, with the address of console's web server and the uiport).
+ - When prompted the log-in screen, use your Eucalyptus credential to log-in. For example,
+ - Account name : fred
+ - Username : admin
+ - Password : foobar
+ You may need to visit Eucalyptus admin console to setup your account first. The default address of the admin console is 'https:{clchost}:8443'.
+ - Make sure your account/username has the corresponding access key and secret key. You can create one using the admin console.
+ - If you are running the console in mock mode, you can put any string in the log-in field.
+
+INTERNATIONALIZATION
+
+The management console is designed to support many different languages. Currently Russian and Korean are supported, in addition to English by default.
+We expect the more languages would be added by the Eucalyptus community.
+To add a language, follow these steps:
+ - Go to 'static/custom/' and copy 'Messages.properties' file to a new file. The new file name should starts with 'Messages', followed by the language and country code, according to the convention defined in ISO 639 and ISO 3166. For example, for main-land Chinese use 'Messages_zh_CN.properties'. For Japanese, one can use 'Messages_ja_JP.properties'
+ - Update 'language' option in server/console.ini to the new language. For example, 'language = zh_CN' for main-land Chinese.
+ - After updating 'Messages_xx_YY.properties' during the translation, you can simply refresh your browser to see the change.
+ - The console includes HTML help files stored under 'static/help'. You may want to translate the static HTML files as well to your language (If no such translation found, the console falls back to the English help). You should create a subdirectory named after the language&country code, under 'static/help', and store your translated help files.
+
+DISCLAIMER
+
+The Eucalyptus management console is in-progress and hasn't been released yet.
+It is our plan to make it feature complete with Eucalyptus 3.2 release.
+For answers to some of your questions, try here: https://github.com/eucalyptus/eucalyptus-ui/wiki/FAQ
+
View
@@ -0,0 +1 @@
+3.2.0
No changes.
No changes.
@@ -0,0 +1,113 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+"""
+@license: OWASP Enterprise Security API (ESAPI)
+
+ This file is part of the Open Web Application Security Project (OWASP)
+ Enterprise Security API (ESAPI) project. For details, please see
+ U{http://www.owasp.org/index.php/ESAPI<http://www.owasp.org/index.php/ESAPI>}.
+
+ The ESAPI is published by OWASP under the BSD license. You should read and
+ accept the LICENSE before you use, modify, and/or redistribute this software.
+
+@summary: The Codec interface defines a set of methods for encoding and
+ decoding application level encoding schemes.
+@copyright: Copyright (c) 2009 - The OWASP Foundation
+@author: Craig Younkins (craig.younkins@owasp.org)
+"""
+
+from esapi.codecs.push_back_string import PushbackString
+
+def is_8bit(char):
+ """
+ Returns True if ord(char) < 256, False otherwise
+ """
+ return ord(char) < 256
+
+def is_control_char(char):
+ if (ord(char) <= 0x1F or # C0 control codes
+ 0x7F <= ord(char) <= 0x9F): # Del and C1 control codes
+ return True
+
+ return False
+
+def get_hex_for_char(char):
+ """
+ Returns the hex equivalent of the given character in the form 3C
+ """
+ return hex(ord(char))[2:]
+
+class Codec():
+ """
+ The Codec interface defines a set of methods for encoding and decoding
+ application level encoding schemes, such as HTML entity encoding and
+ percent encoding (aka URL encoding). Codecs are used in output encoding
+ and canonicalization. The design of these codecs allows for
+ character-by-character decoding, which is necessary to detect
+ double-encoding and the use of multiple encoding schemes, both of which are
+ techniques used by attackers to bypass validation and bury encoded attacks
+ in data.
+
+ @author: Craig Younkins (craig.younkins@owasp.org)
+ @see: L{esapi.encoder}
+ """
+
+ def __init__(self):
+ pass
+
+ def encode(self, immune, raw):
+ """
+ Encode a String so that it can be safely used in a specific context.
+
+ @param immune: @param raw
+ the String to encode
+ @return: the encoded String
+ """
+ ret = ''
+ try:
+ for char in raw:
+ ret += self.encode_character(immune, char)
+ return ret
+ except TypeError:
+ return None
+
+ def encode_character(self, immune, char):
+ """
+ Default implementation that should be overridden in specific codecs.
+
+ @param immune: characters immune to encoding
+ @param char: the character to encode
+ @return: the encoded Character
+ """
+ raise NotImplementedError()
+
+ def decode(self, encoded):
+ """
+ Decode a String that was encoded using the encode method in this Class
+
+ @param encoded: the string to decode
+ @return: the decoded string
+ """
+ buf = ''
+ pbs = PushbackString(encoded)
+ while pbs.has_next():
+ char = self.decode_character(pbs)
+ if char is not None:
+ buf += char
+ else:
+ buf += pbs.next()
+ return buf
+
+ def decode_character(self, pbs):
+ """
+ Returns the decoded version of the next character from the input
+ string and advances the current character in the PushbackString.
+ If the current character is not encoded, this method MUST reset the
+ PushbackString.
+
+ @param pbs: the PushBackString to decode a character from
+
+ @return: the decoded Character
+ """
+ raise NotImplementedError()
Oops, something went wrong.

0 comments on commit cbf4ab9

Please sign in to comment.