mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
Add tooltips in form fields and make size mandatory on vm creation
This commit is contained in:
1 parent
b61f57d780
commit
0fa77ef074
6 files changed
+36
-15
No files matched your search
@@ -27,7 +27,9 @@ module Parser
|
||||
UNITS = %W(B KiB MiB GiB TiB).freeze
|
||||
|
||||
def self.humanize_size(number)
|
||||
if number.to_i < 1024
|
||||
number = number.to_i
|
||||
|
||||
if number < 1024
|
||||
exponent = 0
|
||||
|
||||
else
|
||||
|
||||
@@ -42,7 +42,8 @@ class Appliance
|
||||
:default => 'raw'
|
||||
},
|
||||
'size' => {
|
||||
:type => :string
|
||||
:type => :string,
|
||||
:required => true
|
||||
},
|
||||
'compression' => {
|
||||
:type => :string,
|
||||
|
||||
@@ -22,24 +22,35 @@
|
||||
%label.control-label{'for' => 'short_description_form'} Short Description
|
||||
.controls
|
||||
%textarea.input-xlarge{'name' => 'short_description', 'id' => 'short_description_form', 'rows' => '3'}
|
||||
%p This information will be shown in the list view
|
||||
.control-group
|
||||
%label.control-label{'for' => 'description_form'} Description
|
||||
.controls
|
||||
%textarea.input-xlarge{'name' => 'description', 'id' => 'description_form', 'rows' => '8'}
|
||||
%p
|
||||
This information will be shown in the detailed view
|
||||
%br
|
||||
Description is parsed with Markdown.
|
||||
.control-group
|
||||
%label.control-label{'for' => 'version_form'} Version
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'version', 'id' => 'version_form', 'type' => 'text'}
|
||||
%p Example: 1.0
|
||||
.control-group
|
||||
%label.control-label{'for' => 'tags_form'} Tags
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'tags', 'id' => 'tags_form', 'type' => 'text'}
|
||||
%p.help-block Comma-separated tags
|
||||
%p Comma-separated tags. Example: ubuntu,hpc,mysql
|
||||
%hr
|
||||
.control-group
|
||||
%label.control-label{'for' => 'url_form'} URL
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'files.0.url', 'id' => 'files.0.url_form', 'type' => 'text'}
|
||||
.control-group
|
||||
%label.control-label{'for' => 'files.0.size'} Size
|
||||
.controls
|
||||
%input.input{'name' => 'files.0.size', 'id' => 'files.0.size_form', 'type' => 'text'}
|
||||
%p Bytes
|
||||
.control-group
|
||||
%label.control-label{'for' => 'files.0.md5'} MD5
|
||||
.controls
|
||||
@@ -75,14 +86,17 @@
|
||||
%label.control-label{'for' => 'files.0.os-id'} OS id
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'files.0.os-id', 'id' => 'files.0.os-id_form', 'type' => 'text'}
|
||||
%p Example: Ubuntu
|
||||
.control-group
|
||||
%label.control-label{'for' => 'files.0.os-release'} OS release
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'files.0.os-release', 'id' => 'files.0.os-release_form', 'type' => 'text'}
|
||||
%p Example: 12.04
|
||||
.control-group
|
||||
%label.control-label{'for' => 'files.0.os-arch'} OS arch
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'files.0.os-arch', 'id' => 'files.0.os-arch_form', 'type' => 'text'}
|
||||
%p Example: x86_64
|
||||
- if @session.admin?
|
||||
Admin parameters
|
||||
%hr
|
||||
@@ -98,8 +112,4 @@
|
||||
%label.control-label{'for' => 'publisher_form'} Publisher
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'publisher','id' => 'publisher_form', 'type' => 'text'}
|
||||
.control-group
|
||||
%label.control-label{'for' => 'files.0.size'} Size
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'files.0.size', 'id' => 'files.0.size_form', 'type' => 'text'}
|
||||
%hr
|
||||
@@ -69,13 +69,13 @@
|
||||
%select#format.span2
|
||||
|
||||
|
||||
%table{'class' => "table table-striped table-no-head", 'id' => "apps"}
|
||||
%thead
|
||||
%tr
|
||||
%th Appliances
|
||||
%th CATALOG
|
||||
%th TAGS
|
||||
%th Hypervisor
|
||||
%table{'class' => "table table-striped table-no-head", 'id' => "apps"}
|
||||
%thead
|
||||
%tr
|
||||
%th Appliances
|
||||
%th CATALOG
|
||||
%th TAGS
|
||||
%th Hypervisor
|
||||
|
||||
%hr
|
||||
|
||||
|
||||
@@ -102,12 +102,18 @@
|
||||
%h6
|
||||
%small= @app['opennebula_version']
|
||||
%hr
|
||||
- if @app['files'][0]['checksum']
|
||||
- if @app['files'][0]['checksum'] && @app['files'][0]['checksum']['md5']
|
||||
%dt
|
||||
%h6 Checksum MD5
|
||||
%dd
|
||||
%h6
|
||||
%small= @app['files'][0]['checksum']['md5']
|
||||
- if @app['files'][0]['checksum'] && @app['files'][0]['checksum']['sha1']
|
||||
%dt
|
||||
%h6 Checksum SHA1
|
||||
%dd
|
||||
%h6
|
||||
%small= @app['files'][0]['checksum']['sha1']
|
||||
%dt
|
||||
%h6 Compression
|
||||
%dd
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
%label.control-label{'for' => 'organization_form'} Organization
|
||||
.controls
|
||||
%input.input-xlarge{'name' => 'organization','id' => 'organization_form', 'type' => 'text'}
|
||||
%p It will be used as publisher when posting new appliances
|
||||
.control-group
|
||||
%label.control-label{'for' => 'first_name_form'} First Name
|
||||
.controls
|
||||
@@ -51,6 +52,7 @@
|
||||
- if @session.admin?
|
||||
Admin parameters
|
||||
%hr
|
||||
%p This parameters will be filled by the AppMarket server, change them at your own risk
|
||||
.control-group
|
||||
%label.control-label{'for' => 'status'} Status
|
||||
.controls
|
||||
|
||||
Reference in new issue
Block a user