You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2014/07/01 11:40:01 UTC
[4/4] git commit: updated refs/heads/4.3 to ba9ae0c
[UI] add view instances in template/iso details page
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba9ae0c6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba9ae0c6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba9ae0c6
Branch: refs/heads/4.3
Commit: ba9ae0c6636e30a9a9629851fafa14349897fcbf
Parents: 39cc82d
Author: Wei Zhou <w....@leaseweb.com>
Authored: Tue Jul 1 10:55:46 2014 +0200
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Tue Jul 1 11:39:38 2014 +0200
----------------------------------------------------------------------
.../apache/cloudstack/api/response/IsoVmResponse.java | 4 ++++
ui/scripts/instances.js | 12 ++++++++++++
ui/scripts/templates.js | 8 ++++++++
3 files changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba9ae0c6/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java b/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
index 14803d5..170ba90 100644
--- a/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
@@ -17,10 +17,14 @@
package org.apache.cloudstack.api.response;
import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
import com.cloud.serializer.Param;
+import com.cloud.template.VirtualMachineTemplate;
import com.google.gson.annotations.SerializedName;
+@EntityReference(value=VirtualMachineTemplate.class)
+@SuppressWarnings("unused")
public class IsoVmResponse extends BaseResponse {
@SerializedName("id") @Param(description="the ISO ID")
private String id;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba9ae0c6/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 591cf4c..896b535 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -327,6 +327,18 @@
});
}
+ if ("templates" in args.context) {
+ $.extend(data, {
+ templateid: args.context.templates[0].id
+ });
+ }
+
+ if ("isos" in args.context) {
+ $.extend(data, {
+ isoid: args.context.isos[0].id
+ });
+ }
+
$.ajax({
url: createURL('listVirtualMachines'),
data: data,
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba9ae0c6/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index 49817b1..379c69b 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -593,6 +593,10 @@
detailView: {
name: 'Template details',
+ viewAll: {
+ label: 'label.instances',
+ path: 'instances'
+ },
actions: {
edit: {
label: 'label.edit',
@@ -1421,6 +1425,10 @@
detailView: {
name: 'label.details',
+ viewAll: {
+ label: 'label.instances',
+ path: 'instances'
+ },
actions: {
edit: {
label: 'label.edit',