Commit 941138d6 authored by fv3rdugo's avatar fv3rdugo
Browse files

[#275] Add textarea for description

Add column in domains table
Add upgrade column
parent 8a63c0f2
......@@ -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');
}
......
......@@ -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`)
......
......@@ -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;
% 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.&#10;Perl Dev Classrom&#10;Group B&#10;Login: uservm&#10;Password: uservm&#10;Version 2.1" required></textarea>
</div>
<div class="col-md-6">
</div>
</div>
<input type="submit" class="btn btn-default">
</form>
</div>
</div>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment