Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
941138d6
Commit
941138d6
authored
Jun 23, 2017
by
fv3rdugo
Browse files
[#275] Add textarea for description
Add column in domains table Add upgrade column
parent
8a63c0f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
941138d6
...
...
@@ -567,6 +567,7 @@ sub _upgrade_tables {
$self
->
_upgrade_table
('
networks
','
n_order
','
int(11) not null default 0
');
$self
->
_upgrade_table
('
domains
','
spice_password
','
varchar(20) DEFAULT NULL
');
$self
->
_upgrade_table
('
domains
','
description
','
text DEFAULT NULL
');
}
...
...
sql/mysql/domains.sql
View file @
941138d6
...
...
@@ -13,6 +13,7 @@ CREATE TABLE `domains` (
`id_owner`
int
(
11
),
`vm`
char
(
120
)
NOT
NULL
,
`spice_password`
char
(
20
)
DEFAULT
NULL
,
`description`
text
,
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`id_base`
(
`id_base`
,
`name`
),
UNIQUE
KEY
`name`
(
`name`
)
...
...
sql/upgrades/0.1.1/domains.sql
View file @
941138d6
...
...
@@ -5,4 +5,5 @@ alter table domains change created created int not null default 0;
alter
table
domains
add
`file_screenshot`
varchar
(
255
)
DEFAULT
NULL
;
alter
table
domains
add
vm
char
(
120
)
not
null
;
alter
table
domains
add
id_base
int
;
alter
table
domains
add
description
text
;
update
domains
set
is_public
=
1
where
is_base
=
1
;
templates/main/vm_description.html.ep
View file @
941138d6
% my $disable_rename = 0;
% my $message_rename;
% if ( $domain->is_active ) {
% $message_rename = 'This VM is running and can\'t be renamed.';
% $disable_rename = 1;
% }
% if ( $domain->domain->has_managed_save_image ) {
% $message_rename = 'This VM has a saved hybernated state and can\'t be renamed.';
% $disable_rename = 1;
% }
%# if $domain->is_paused || $domain->domain->has_managed_save_image;
<div class="panel-body">
<div class="row">
<div class="col-md-6">
% if ($message_rename) {
<div class="panel panel-warning">
<div class="panel-heading"><%= $message_rename %></div>
</div>
% }
<span>Useful information that may contain: e.g. Access credentials, machine type</span>
<input class="form-control" type="text" name="new_name" ng-model="new_name"
ng-change="validate_new_name(showmachine.name)"
ng-disabled="<%= $disable_rename %>"
>
<button type="button" ng-disabled="<%= $disable_rename %> || new_name_duplicated"
ng-click="rename(showmachine.id, showmachine.name)">
<i class="fa fa-check" aria-hidden="true"></i>
</button>
<div class="form-group has-error">
<label ng-show="new_name_duplicated"
class="control-label" for="new_name">
This name is duplicated
</label>
</div>
</div>
<div class="col-md-6">
</div>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<div class="row">
<div class="col-md-6">
<form class="form-inline" action="<%= $action %>" method="post">
<label>This information will be available to user</label>
<textarea class="col-md-12" rows="6" placeholder="E.g. Perl Dev Classrom Group B Login: uservm Password: uservm Version 2.1" required></textarea>
</div>
<div class="col-md-6">
</div>
</div>
<input type="submit" class="btn btn-default">
</form>
</div>
</div>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment