\
- \
+ \
'+tr("VM Template")+' \
'+tr("VM Instance")+' \
'+tr("Virtual Network")+' \
@@ -296,5 +300,13 @@ function updateDashboard(what,json_info){
var total_acls=json_info.length;
$('#total_acls',db).html(total_acls);
break;
+ case "clusters":
+ var total_clusters=json_info.length;
+ $('#total_clusters',db).html(total_clusters);
+ break;
+ case "datastores":
+ var total_datastores=json_info.length;
+ $('#total_datastores',db).html(total_datastores);
+ break;
}
}
\ No newline at end of file
diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js
index 603fd6867e..88afb16aab 100644
--- a/src/sunstone/public/js/plugins/datastores-tab.js
+++ b/src/sunstone/public/js/plugins/datastores-tab.js
@@ -265,7 +265,8 @@ var datastore_buttons = {
},
"Datastore.create_dialog" : {
type: "create_dialog",
- text: tr("+ New")
+ text: tr("+ New"),
+ condition: mustBeAdmin,
},
"Datastore.update_dialog" : {
type: "action",
@@ -277,6 +278,7 @@ var datastore_buttons = {
text: tr("Select cluster"),
select: clusters_sel,
tip: tr("Select the destination cluster:"),
+ condition: mustBeAdmin,
},
"Datastore.chown" : {
type: "confirm_with_select",
@@ -354,22 +356,34 @@ function datastoreInfoListener(){
Sunstone.runAction("Datastore.showinfo",id);
return false;
});
-}
+};
+
+function updateDatastoreSelect(){
+ datastores_select = makeSelectOptions(dataTable_datastores,
+ 1,
+ 4,
+ [],
+ []
+ );
+};
function updateDatastoreElement(request, element_json){
var id = element_json.DATASTORE.ID;
var element = datastoreElementArray(element_json);
updateSingleElement(element,dataTable_datastores,'#datastore_'+id)
+ updateDatastoreSelect();
}
function deleteDatastoreElement(request){
deleteElement(dataTable_datastores,'#datastore_'+request.request.data);
+ updateDatastoreSelect();
}
function addDatastoreElement(request,element_json){
var id = element_json.DATASTORE.ID;
var element = datastoreElementArray(element_json);
addElement(element,dataTable_datastores);
+ updateDatastoreSelect();
}
@@ -381,17 +395,28 @@ function updateDatastoresView(request, list){
});
updateView(list_array,dataTable_datastores);
+ updateDatastoreSelect();
updateDashboard("datastores",list);
}
function updateDatastoreInfo(request,ds){
var info = ds.DATASTORE;
+ var images_str = "";
+ if (info.IMAGES.ID &&
+ info.IMAGES.ID.constructor == Array){
+ for (var i=0; i\
+ '\
\
'+tr("Datastore information")+' - '+info.NAME+' | \
\
@@ -428,6 +453,10 @@ function updateDatastoreInfo(request,ds){
'+tr("Base path")+' | \
'+info.BASE_PATH+' | \
\
+ \
+ '+tr("Images")+' | \
+ '+images_str+' | \
+ \
'+tr("Permissions")+' | | \
\
'+tr("Owner")+' | \
diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js
index ad8d818883..ca5dd57182 100644
--- a/src/sunstone/public/js/plugins/images-tab.js
+++ b/src/sunstone/public/js/plugins/images-tab.js
@@ -63,6 +63,12 @@ var create_image_tmpl =
\
'+tr("Human readable description of the image for other users.")+' \
\
+ \
+ \
+ \
+ '+tr("Select the datastore for this image")+' \
+ \
\
|