mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #~: Remove preview layout images (#1034)
This commit is contained in:
parent
c8327a2f3d
commit
34b80d5712
@ -18,9 +18,6 @@ define(function(require) {
|
||||
var Locale = require('utils/locale');
|
||||
var Config = require('sunstone-config');
|
||||
var Sunstone = require('sunstone');
|
||||
var Notifier = require('utils/notifier');
|
||||
var OpenNebulaVM = require('opennebula/vm');
|
||||
var Accounting = require('utils/accounting');
|
||||
var OpenNebula = require('opennebula');
|
||||
var QuotaWidgets = require('utils/quotas/quota-widgets');
|
||||
var QuotaDefaults = require('utils/quotas/quota-defaults');
|
||||
|
@ -24,8 +24,7 @@ define(function(require) {
|
||||
var DATATABLE_ID = "dataTableGroups";
|
||||
|
||||
var _dialogs = [
|
||||
require('./groups-tab/dialogs/quotas'),
|
||||
require('./groups-tab/dialogs/image')
|
||||
require('./groups-tab/dialogs/quotas')
|
||||
];
|
||||
|
||||
var _panels = [
|
||||
|
@ -1,84 +0,0 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
define(function(require) {
|
||||
/*
|
||||
DEPENDENCIES
|
||||
*/
|
||||
|
||||
var BaseDialog = require('utils/dialogs/dialog');
|
||||
var TemplateHTML = require('hbs!./image/html');
|
||||
var Locale = require('utils/locale');
|
||||
|
||||
/*
|
||||
CONSTANTS
|
||||
*/
|
||||
|
||||
var DIALOG_ID = require('./image/dialogId');
|
||||
var TAB_ID = require('../tabId');
|
||||
var RESOURCE = "Group";
|
||||
var XML_ROOT = "GROUP";
|
||||
|
||||
/*
|
||||
CONSTRUCTOR
|
||||
*/
|
||||
|
||||
function Dialog() {
|
||||
this.dialogId = DIALOG_ID;
|
||||
|
||||
this.element = undefined;
|
||||
|
||||
BaseDialog.call(this);
|
||||
}
|
||||
|
||||
Dialog.DIALOG_ID = DIALOG_ID;
|
||||
Dialog.prototype = Object.create(BaseDialog.prototype);
|
||||
Dialog.prototype.constructor = Dialog;
|
||||
Dialog.prototype.html = _html;
|
||||
Dialog.prototype.onShow = _onShow;
|
||||
Dialog.prototype.setup = _setup;
|
||||
Dialog.prototype.setParams = _setParams;
|
||||
|
||||
return Dialog;
|
||||
|
||||
/*
|
||||
FUNCTION DEFINITIONS
|
||||
*/
|
||||
|
||||
function _html() {
|
||||
return TemplateHTML({
|
||||
'dialogId': this.dialogId,
|
||||
'element': this.element
|
||||
});
|
||||
}
|
||||
|
||||
function _setup(context) {
|
||||
var that = this;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} params
|
||||
* - params.element : group object, or empty object {}
|
||||
*/
|
||||
function _setParams(params) {
|
||||
this.element = params.element;
|
||||
}
|
||||
|
||||
function _onShow(context) {
|
||||
return false;
|
||||
}
|
||||
});
|
@ -1,19 +0,0 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Copyright 2002-2021, OpenNebula Project, OpenNebula Systems */
|
||||
/* */
|
||||
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
||||
/* not use this file except in compliance with the License. You may obtain */
|
||||
/* a copy of the License at */
|
||||
/* */
|
||||
/* http://www.apache.org/licenses/LICENSE-2.0 */
|
||||
/* */
|
||||
/* Unless required by applicable law or agreed to in writing, software */
|
||||
/* distributed under the License is distributed on an "AS IS" BASIS, */
|
||||
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
|
||||
/* See the License for the specific language governing permissions and */
|
||||
/* limitations under the License. */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
define(function(require){
|
||||
return 'groupImagesDialog';
|
||||
});
|
@ -1,30 +0,0 @@
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
{{! Copyright 2002-2021, OpenNebula Project, OpenNebula Systems }}
|
||||
{{! }}
|
||||
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }}
|
||||
{{! not use this file except in compliance with the License. You may obtain }}
|
||||
{{! a copy of the License at }}
|
||||
{{! }}
|
||||
{{! http://www.apache.org/licenses/LICENSE-2.0 }}
|
||||
{{! }}
|
||||
{{! Unless required by applicable law or agreed to in writing, software }}
|
||||
{{! distributed under the License is distributed on an "AS IS" BASIS, }}
|
||||
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }}
|
||||
{{! See the License for the specific language governing permissions and }}
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<div id="{{dialogId}}" class="reveal large max-height" role="dialog" data-reveal >
|
||||
<div class="row">
|
||||
<h3 class="subheader">{{element.name}}</h3>
|
||||
</div>
|
||||
<div class="confirm-resources-header"></div>
|
||||
<div class="row">
|
||||
<img src="images/{{element.preview}}">
|
||||
</div>
|
||||
<form data-abide novalidate id="{{dialogId}}Form">
|
||||
<button class="close-button" data-close aria-label="{{tr "Close modal"}}" type="button">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
@ -40,7 +40,6 @@ define(function(require) {
|
||||
|
||||
var FORM_PANEL_ID = require('./create/formPanelId');
|
||||
var TAB_ID = require('../tabId');
|
||||
var IMAGE_DIALOG_ID = require('../dialogs/image/dialogId');
|
||||
|
||||
/*
|
||||
CONSTRUCTOR
|
||||
@ -86,7 +85,6 @@ define(function(require) {
|
||||
var filtered_views = {
|
||||
cloud : [],
|
||||
advanced : [],
|
||||
vcenter : [],
|
||||
other : []
|
||||
};
|
||||
|
||||
@ -101,9 +99,6 @@ define(function(require) {
|
||||
case 'cloud':
|
||||
filtered_views.cloud.push(view_info);
|
||||
break;
|
||||
case 'vcenter':
|
||||
filtered_views.vcenter.push(view_info);
|
||||
break;
|
||||
default:
|
||||
filtered_views.other.push({
|
||||
id: view_id,
|
||||
@ -127,17 +122,12 @@ define(function(require) {
|
||||
|
||||
$.each(filtered_views, function(view_type, views){
|
||||
if (views.length > 0) {
|
||||
var link = "";
|
||||
if(Views.types[view_type].preview){
|
||||
link = Views.types[view_type].preview.split(".")[0]
|
||||
}
|
||||
viewTypes.push(
|
||||
{
|
||||
'name': Views.types[view_type].name,
|
||||
'description': Views.types[view_type].description,
|
||||
'preview': Views.types[view_type].preview,
|
||||
'views': views,
|
||||
'link': link
|
||||
'views': views
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -199,23 +189,6 @@ define(function(require) {
|
||||
_generateViewsSelect(context, "admin", "groupadmin");
|
||||
_generateViewsSelect(context, "user", "cloud");
|
||||
}
|
||||
|
||||
$.each(this.filtered_views, function(view_type, views){
|
||||
if (views.length > 0) {
|
||||
if(Views.types[view_type].preview){
|
||||
$("#link_"+Views.types[view_type].preview.split(".")[0], context).on("click", function(){
|
||||
Sunstone.getDialog(IMAGE_DIALOG_ID).setParams({element: {
|
||||
"preview":Views.types[view_type].preview,
|
||||
"name": Views.types[view_type].name}});
|
||||
Sunstone.getDialog(IMAGE_DIALOG_ID).reset();
|
||||
Sunstone.getDialog(IMAGE_DIALOG_ID).show();
|
||||
});
|
||||
}
|
||||
else{
|
||||
$("#link_", context).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function _submitWizard(context) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="row collapse" id="default_vdc_warning">
|
||||
<div class="large-12 columns">
|
||||
<span class="radius warning label">
|
||||
<i class="fas fa-exclamation-triangle"/> {{tr "New Groups are automatically added to the default VDC"}}
|
||||
<i class="fas fa-exclamation-triangle" /> {{tr "New Groups are automatically added to the default VDC"}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -56,7 +56,7 @@
|
||||
<label>
|
||||
{{tr "Name"}}
|
||||
<input required type="text" name="name" id="name" />
|
||||
</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -65,7 +65,7 @@
|
||||
<div class="large-12 columns">
|
||||
<p class="subheader">
|
||||
{{tr "Allow users in this group to use the following Sunstone views"}}
|
||||
 
|
||||
 
|
||||
<span class="tip">
|
||||
{{tr "Not required. Defaults to the one set in sunstone-views.yaml"}}
|
||||
</span>
|
||||
@ -90,10 +90,9 @@
|
||||
<div class="large-7 columns">
|
||||
<h6>
|
||||
{{name}}
|
||||
{{#if description}}
|
||||
{{#if description}}
|
||||
<span class="tip">{{description}}</span>
|
||||
{{/if}}
|
||||
<a id="link_{{link}}">{{tr "Image"}}</a>
|
||||
</h6>
|
||||
<table class="dataTable">
|
||||
<tr>
|
||||
@ -105,26 +104,23 @@
|
||||
<tr>
|
||||
<td>
|
||||
{{name}} {{tr "View"}}
|
||||
{{#if description}}
|
||||
{{#if description}}
|
||||
<span class="tip">{{description}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<input class="user_view_input" type="checkbox"
|
||||
id="group_view_{{id}}"
|
||||
value="{{id}}"/>
|
||||
<input class="user_view_input" type="checkbox" id="group_view_{{id}}" value="{{id}}" />
|
||||
</td>
|
||||
<td>
|
||||
<input class="admin_view_input" type="checkbox"
|
||||
id="group_admin_view_{{id}}"
|
||||
value="{{id}}"/>
|
||||
<input class="admin_view_input" type="checkbox" id="group_admin_view_{{id}}" value="{{id}}" />
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<br>{{/each}}</div>
|
||||
<br>{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="administrators" class="tabs-panel">
|
||||
@ -146,41 +142,42 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="system" class="tabs-panel">
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{tr "Image & Datastore"}}
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
{{tr "Make new images persistent by default"}}
|
||||
<span class="tip">
|
||||
{{tr "Control the default value for the PERSISTENT attribute on image creation (oneimage create)."}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="large-4 columns">
|
||||
<select id="default_image_persistent_new">
|
||||
<option value=""></option>
|
||||
<option value="YES"> {{tr "YES"}}</option>
|
||||
<option value="NO"> {{tr "NO"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>
|
||||
{{tr "Image & Datastore"}}
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
{{tr "Make new images persistent by default"}}
|
||||
<span class="tip">
|
||||
{{tr "Control the default value for the PERSISTENT attribute on image creation (oneimage create)."}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
{{tr "Make save-as and clone images persistent by default"}}
|
||||
<span class="tip">
|
||||
{{tr "Control the default value for the PERSISTENT attribute on image creation (oneimage clone, onevm disk-saveas). If blank images will inherit the persistent attribute from the base image."}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="large-4 columns">
|
||||
<select id="default_image_persistent">
|
||||
<option value=""></option>
|
||||
<option value="YES"> {{tr "YES"}}</option>
|
||||
<option value="NO"> {{tr "NO"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="large-4 columns">
|
||||
<select id="default_image_persistent_new">
|
||||
<option value=""></option>
|
||||
<option value="YES"> {{tr "YES"}}</option>
|
||||
<option value="NO"> {{tr "NO"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
{{tr "Make save-as and clone images persistent by default"}}
|
||||
<span class="tip">
|
||||
{{tr "Control the default value for the PERSISTENT attribute on image creation (oneimage clone, onevm
|
||||
disk-saveas). If blank images will inherit the persistent attribute from the base image."}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="large-4 columns">
|
||||
<select id="default_image_persistent">
|
||||
<option value=""></option>
|
||||
<option value="YES"> {{tr "YES"}}</option>
|
||||
<option value="NO"> {{tr "NO"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="resource_creation" class="tabs-panel">
|
||||
<div class="row">
|
||||
@ -189,7 +186,8 @@
|
||||
<input type="checkbox" id="shared_resources" name="shared_resources" value="YES" />
|
||||
{{tr "Allow users to view the VMs and Services of other users in the same group"}}
|
||||
<span class="tip">
|
||||
{{tr "An ACL Rule will be created to give users in this group access to all the resources in the same group."}}
|
||||
{{tr "An ACL Rule will be created to give users in this group access to all the resources in the same
|
||||
group."}}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -198,9 +196,10 @@
|
||||
<div class="large-12 columns">
|
||||
<p class="subheader">
|
||||
{{tr "Allow users in this group to create the following resources"}}
|
||||
 
|
||||
 
|
||||
<span class="tip">
|
||||
{{tr "This will create new ACL Rules to define which virtual resources this group's users will be able to create."}}
|
||||
{{tr "This will create new ACL Rules to define which virtual resources this group's users will be able to
|
||||
create."}}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
@ -219,7 +218,8 @@
|
||||
<th>
|
||||
{{tr "Documents"}}
|
||||
<span class="tip">
|
||||
{{tr "Documents are a special tool used for general purposes, mainly by OneFlow. If you want to enable users of this group to use service composition via OneFlow, let it checked."}}
|
||||
{{tr "Documents are a special tool used for general purposes, mainly by OneFlow. If you want to
|
||||
enable users of this group to use service composition via OneFlow, let it checked."}}
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
@ -227,27 +227,30 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_vm" name="group_res_vm" class="resource_cb" value="VM"/>
|
||||
<input type="checkbox" id="group_res_vm" name="group_res_vm" class="resource_cb" value="VM" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_net" name="group_res_net" class="resource_cb" value="NET"/>
|
||||
<input type="checkbox" id="group_res_net" name="group_res_net" class="resource_cb" value="NET" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_sg" name="group_res_sg" class="resource_cb" value="SECGROUP"/>
|
||||
<input type="checkbox" id="group_res_sg" name="group_res_sg" class="resource_cb" value="SECGROUP" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_vr" name="group_res_vr" class="resource_cb" value="VROUTER"/>
|
||||
<input type="checkbox" id="group_res_vr" name="group_res_vr" class="resource_cb" value="VROUTER" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_image" name="group_res_image" class="resource_cb" value="IMAGE"/>
|
||||
<input type="checkbox" id="group_res_image" name="group_res_image" class="resource_cb"
|
||||
value="IMAGE" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_template" name="group_res_template" class="resource_cb" value="TEMPLATE"/>
|
||||
<input type="checkbox" id="group_res_template" name="group_res_template" class="resource_cb"
|
||||
value="TEMPLATE" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="group_res_document" name="group_res_document" class="resource_cb" value="DOCUMENT"/>
|
||||
<input type="checkbox" id="group_res_document" name="group_res_document" class="resource_cb"
|
||||
value="DOCUMENT" />
|
||||
</td>
|
||||
<td/>
|
||||
<td />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -20,23 +20,15 @@ define(function(require) {
|
||||
var _view_types = {
|
||||
advanced : {
|
||||
name: 'Advanced Layout',
|
||||
description : Locale.tr("Exposes a complete view of the cloud, allowing administrators and advanced users full control of any physical or virtual resource."),
|
||||
preview: "advanced_layout.png"
|
||||
description : Locale.tr("Exposes a complete view of the cloud, allowing administrators and advanced users full control of any physical or virtual resource.")
|
||||
},
|
||||
cloud : {
|
||||
name: 'Cloud Layout',
|
||||
description : Locale.tr("Simplified version of the cloud allowing group admins and cloud end-users to manage any virtual resource."),
|
||||
preview: "cloud_layout.png"
|
||||
},
|
||||
vcenter : {
|
||||
name: 'vCenter Layout',
|
||||
description : Locale.tr("Set of views to present valid operations over a vCenter infrastructure"),
|
||||
preview: "vcenter_layout.png"
|
||||
description : Locale.tr("Simplified version of the cloud allowing group admins and cloud end-users to manage any virtual resource.")
|
||||
},
|
||||
other : {
|
||||
name: 'Other Layouts',
|
||||
description : '',
|
||||
preview: null
|
||||
description : ''
|
||||
}
|
||||
};
|
||||
|
||||
@ -64,24 +56,6 @@ define(function(require) {
|
||||
name: "Cloud",
|
||||
description: Locale.tr("Simplified view mainly where users can provision new Virtual Machines easily from pre-defined Templates."),
|
||||
type: "cloud"
|
||||
},
|
||||
admin_vcenter : {
|
||||
id: 'admin_vcenter',
|
||||
name: "Admin vCenter",
|
||||
description: Locale.tr("View designed to present the valid operations over a vCenter infrastructure to a cloud administrator"),
|
||||
type: "vcenter"
|
||||
},
|
||||
groupadmin_vcenter : {
|
||||
id: 'groupadmin_vcenter',
|
||||
name: "Group Admin vCenter",
|
||||
description: Locale.tr("View designed to present the valid operations over a vCenter infrastructure to a group administrator"),
|
||||
type: "vcenter"
|
||||
},
|
||||
cloud_vcenter : {
|
||||
id: 'cloud_vcenter',
|
||||
name: "Cloud vCenter",
|
||||
description: Locale.tr("View designed to present the valid operations over a vCenter infrastructure to a cloud consumer"),
|
||||
type: "vcenter"
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -23,11 +23,6 @@ define(function(require) {
|
||||
var TAB_ID = require('./hosts-tab/tabId');
|
||||
var DATATABLE_ID = "dataTableHosts";
|
||||
|
||||
//var _dialogs = [
|
||||
// require('./hosts-tab/dialogs/create'),
|
||||
// require('./hosts-tab/dialogs/clone')
|
||||
//];
|
||||
|
||||
var _panels = [
|
||||
require('./hosts-tab/panels/info'),
|
||||
require('./hosts-tab/panels/monitor'),
|
||||
|
@ -1,17 +1,17 @@
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
{{! Copyright 2002-2021, OpenNebula Project, OpenNebula Systems }}
|
||||
{{! }}
|
||||
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }}
|
||||
{{! not use this file except in compliance with the License. You may obtain }}
|
||||
{{! a copy of the License at }}
|
||||
{{! }}
|
||||
{{! http://www.apache.org/licenses/LICENSE-2.0 }}
|
||||
{{! }}
|
||||
{{! Unless required by applicable law or agreed to in writing, software }}
|
||||
{{! distributed under the License is distributed on an "AS IS" BASIS, }}
|
||||
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }}
|
||||
{{! See the License for the specific language governing permissions and }}
|
||||
{{! limitations under the License. }}
|
||||
{{! Copyright 2002-2021, OpenNebula Project, OpenNebula Systems }}
|
||||
{{! }}
|
||||
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }}
|
||||
{{! not use this file except in compliance with the License. You may obtain }}
|
||||
{{! a copy of the License at }}
|
||||
{{! }}
|
||||
{{! http://www.apache.org/licenses/LICENSE-2.0 }}
|
||||
{{! }}
|
||||
{{! Unless required by applicable law or agreed to in writing, software }}
|
||||
{{! distributed under the License is distributed on an "AS IS" BASIS, }}
|
||||
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }}
|
||||
{{! See the License for the specific language governing permissions and }}
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<div style="
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 95 KiB |
Binary file not shown.
Before Width: | Height: | Size: 175 KiB |
Binary file not shown.
Before Width: | Height: | Size: 241 KiB |
Loading…
x
Reference in New Issue
Block a user