mirror of https://github.com/apache/cloudstack.git
new UI - add Global Settings page.
This commit is contained in:
parent
2f39664f94
commit
c385ead5f9
|
|
@ -60,6 +60,8 @@ offer.HA = Offer HA
|
|||
network.type = Network Type
|
||||
created = Created
|
||||
disk.size = Disk Size
|
||||
value = Value
|
||||
description = Description
|
||||
|
||||
disk.offering = Disk Offering
|
||||
copy.ISO.to = Copy ISO to
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ long milliseconds = new Date().getTime();
|
|||
|
||||
<script type="text/javascript" src="scripts/cloud.core2.diskoffering.js?t=<%=milliseconds%>"></script>
|
||||
|
||||
<script type="text/javascript" src="scripts/cloud.core2.globalsetting.js?t=<%=milliseconds%>"></script>
|
||||
|
||||
<title>Cloud.com CloudStack</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,193 @@
|
|||
<%@ page import="java.util.*" %>
|
||||
|
||||
<%@ page import="com.cloud.utils.*" %>
|
||||
|
||||
<%
|
||||
Locale browserLocale = request.getLocale();
|
||||
CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
|
||||
%>
|
||||
<!-- ISO detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
<!--
|
||||
<div class="main_titleicon">
|
||||
<img src="images/title_isoicon.gif" alt="ISO" /></div>
|
||||
-->
|
||||
<h1>
|
||||
Global Settings
|
||||
</h1>
|
||||
</div>
|
||||
<div class="contentbox" id="right_panel_content">
|
||||
<div class="info_detailbox errorbox" id="after_action_info_container" style="display: none">
|
||||
<p id="after_action_info">
|
||||
</p>
|
||||
</div>
|
||||
<div class="tabbox" style="margin-top: 15px;">
|
||||
<div class="content_tabs on">
|
||||
<%=t.t("details")%></div>
|
||||
</div>
|
||||
<div id="tab_content_details">
|
||||
<div class="grid_actionpanel">
|
||||
<div class="grid_actionbox" id="action_link">
|
||||
<div class="grid_actionsdropdown_box" id="action_menu" style="display: none;">
|
||||
<ul class="actionsdropdown_boxlist" id="action_list">
|
||||
<li><%=t.t("no.available.actions")%></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_editbox" id="edit_button">
|
||||
</div>
|
||||
<div class="gridheader_loaderbox" id="spinning_wheel" style="border: 1px solid #999;
|
||||
display: none;">
|
||||
<div class="gridheader_loader" id="Div1">
|
||||
</div>
|
||||
<p id="description">
|
||||
Waiting …</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_container">
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("name")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="name">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows even">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("value")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="value">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_rows odd">
|
||||
<div class="grid_row_cell" style="width: 20%;">
|
||||
<div class="row_celltitles">
|
||||
<%=t.t("description")%>:</div>
|
||||
</div>
|
||||
<div class="grid_row_cell" style="width: 79%;">
|
||||
<div class="row_celltitles" id="description">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_botactionpanel">
|
||||
<div class="gridbot_buttons" id="save_button" style="display:none;">Save</div>
|
||||
<div class="gridbot_buttons" id="cancel_button" style="display:none;">Cancel</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ISO detail panel (end) -->
|
||||
|
||||
<!-- Add ISO Dialog (begin) -->
|
||||
<div id="dialog_add_iso" title="Add ISO" style="display:none">
|
||||
<div class="dialog_formcontent">
|
||||
<form action="#" method="post" id="form2">
|
||||
<ol>
|
||||
<li>
|
||||
<label><%=t.t("name")%>:</label>
|
||||
<input class="text" type="text" name="add_iso_name" id="add_iso_name" style="width:250px"/>
|
||||
<div id="add_iso_name_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("display.text")%>:</label>
|
||||
<input class="text" type="text" name="add_iso_display_text" id="add_iso_display_text" style="width:250px"/>
|
||||
<div id="add_iso_display_text_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("URL")%>:</label>
|
||||
<input class="text" type="text" name="add_iso_url" id="add_iso_url" style="width:250px"/>
|
||||
<div id="add_iso_url_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("zone")%>:</label>
|
||||
<select class="select" id="add_iso_zone">
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="add_iso_public"><%=t.t("bootable")%>:</label>
|
||||
<select class="select" name="add_iso_bootable" id="add_iso_bootable">
|
||||
<option value="true">Yes</option>
|
||||
<option value="false">No</option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="add_iso_os_type"><%=t.t("os.type")%>:</label>
|
||||
<select class="select" name="add_iso_os_type" id="add_iso_os_type">
|
||||
</select>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add ISO Dialog (end) -->
|
||||
|
||||
<!-- Copy ISO Dialog (begin) -->
|
||||
<div id="dialog_copy_iso" title="Copy ISO" style="display:none">
|
||||
<p>
|
||||
<%=t.t("copy.ISO.to")%>:
|
||||
</p>
|
||||
<div class="dialog_formcontent">
|
||||
<form action="#" method="post" id="form4">
|
||||
<ol>
|
||||
<li>
|
||||
<label><%=t.t("zone")%>:</label>
|
||||
<select class="select" id="copy_iso_zone">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
</li>
|
||||
<div id="copy_iso_zone_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Copy ISO Dialog (end) -->
|
||||
|
||||
<!-- Create VM from ISO (begin) -->
|
||||
<div id="dialog_create_vm_from_iso" title="Create VM from ISO" style="display:none">
|
||||
<div class="dialog_formcontent">
|
||||
<form action="#" method="post" id="form5">
|
||||
<ol>
|
||||
<li>
|
||||
<label><%=t.t("name")%>:</label>
|
||||
<input class="text" type="text" id="name"/>
|
||||
<div id="name_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("group")%>:</label>
|
||||
<input class="text" type="text" id="group"/>
|
||||
<div id="group_errormsg" class="dialog_formcontent_errormsg" style="display:none;"></div>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("service.offering")%>:</label>
|
||||
<select class="select" id="service_offering">
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label><%=t.t("disk.offering")%>:</label>
|
||||
<select class="select" id="disk_offering">
|
||||
</select>
|
||||
</li>
|
||||
</ol>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Create VM from template/ISO (end) -->
|
||||
|
||||
<div id="dialog_confirmation_delete_iso_all_zones" title="Confirmation" style="display:none">
|
||||
<p>
|
||||
<%=t.t("the.ISO.is.used.by.all.zones.please.confirm.you.want.to.delete.it.from.all.zones")%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="dialog_confirmation_delete_iso" title="Confirmation" style="display:none">
|
||||
<p>
|
||||
<%=t.t("please.confirm.you.want.to.delete.the.ISO")%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
function afterLoadGlobalSettingJSP() {
|
||||
|
||||
}
|
||||
|
||||
function globalSettingGetMidmenuId(jsonObj) {
|
||||
return "midmenuItem_" + fromdb(jsonObj.name).replace(/\./g, "_").replace(/\s/g, ""); //remove all spaces in jsonObj.name
|
||||
}
|
||||
|
||||
function globalSettingToMidmenu(jsonObj, $midmenuItem1) {
|
||||
var id = globalSettingGetMidmenuId(jsonObj);
|
||||
$midmenuItem1.attr("id", id);
|
||||
|
||||
$midmenuItem1.data("jsonObj", jsonObj);
|
||||
|
||||
//var $iconContainer = $midmenuItem1.find("#icon_container").show();
|
||||
//$iconContainer.find("#icon").attr("src", "images/midmenuicon_storage_volume.png");
|
||||
|
||||
$midmenuItem1.find("#first_row").text(fromdb(jsonObj.name).substring(0,25));
|
||||
$midmenuItem1.find("#second_row").text(fromdb(jsonObj.value).substring(0,25));
|
||||
}
|
||||
|
||||
function globalSettingToRigntPanel($midmenuItem) {
|
||||
var jsonObj = $midmenuItem.data("jsonObj");
|
||||
globalSettingJsonToDetailsTab(jsonObj);
|
||||
}
|
||||
|
||||
function globalSettingJsonToDetailsTab(jsonObj) {
|
||||
var $detailsTab = $("#right_panel_content #tab_content_details");
|
||||
$detailsTab.data("jsonObj", jsonObj);
|
||||
$detailsTab.find("#name").text(fromdb(jsonObj.name));
|
||||
$detailsTab.find("#value").text(fromdb(jsonObj.value));
|
||||
$detailsTab.find("#description").text(fromdb(jsonObj.description));
|
||||
}
|
||||
|
|
@ -88,6 +88,7 @@ $(document).ready(function() {
|
|||
|
||||
listMidMenuItems("leftmenu_service_offering", "listServiceOfferings", "listserviceofferingsresponse", "serviceoffering", "jsp/serviceoffering.jsp", afterLoadServiceOfferingJSP, serviceOfferingToMidmenu, serviceOfferingToRigntPanel);
|
||||
listMidMenuItems("leftmenu_disk_offering", "listDiskOfferings", "listdiskofferingsresponse", "diskoffering", "jsp/diskoffering.jsp", afterLoadDiskOfferingJSP, diskOfferingToMidmenu, diskOfferingToRigntPanel);
|
||||
listMidMenuItems("leftmenu_global_setting", "listConfigurations", "listconfigurationsresponse", "configuration", "jsp/globalsetting.jsp", afterLoadGlobalSettingJSP, globalSettingToMidmenu, globalSettingToRigntPanel, globalSettingGetMidmenuId);
|
||||
|
||||
$("#leftmenu_instance_group_header").bind("click", function(event) {
|
||||
showMiddleMenu();
|
||||
|
|
|
|||
Loading…
Reference in New Issue