cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/master to 0d9c38e
Date Mon, 01 Dec 2014 11:04:16 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 9b907902d -> 0d9c38e13


Add 'View Instances' in template/iso details view


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0d9c38e1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d9c38e1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d9c38e1

Branch: refs/heads/master
Commit: 0d9c38e131ce7d1bdcb5f058c1d4d1ecba00b9c4
Parents: 9b90790
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Mon Dec 1 12:03:47 2014 +0100
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Mon Dec 1 12:03:47 2014 +0100

----------------------------------------------------------------------
 .../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/0d9c38e1/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 204fdc8..27f286d 100644
--- a/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java
@@ -19,9 +19,13 @@ package org.apache.cloudstack.api.response;
 import com.google.gson.annotations.SerializedName;
 
 import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
 
 import com.cloud.serializer.Param;
+import com.cloud.template.VirtualMachineTemplate;
 
+@EntityReference(value=VirtualMachineTemplate.class)
+@SuppressWarnings("unused")
 public class IsoVmResponse extends BaseResponse {
     @SerializedName("id")
     @Param(description = "the ISO ID")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d9c38e1/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 11aa725..5312e90 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -347,6 +347,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/0d9c38e1/ui/scripts/templates.js
----------------------------------------------------------------------
diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js
index e41c018..141b48a 100644
--- a/ui/scripts/templates.js
+++ b/ui/scripts/templates.js
@@ -643,6 +643,10 @@
 
                     detailView: {
                         name: 'Template details',
+                        viewAll: {
+                            label: 'label.instances',
+                            path: 'instances'
+                        },
                         actions: {
                             edit: {
                                 label: 'label.edit',
@@ -1777,6 +1781,10 @@
 
                     detailView: {
                         name: 'label.details',
+                        viewAll: {
+                            label: 'label.instances',
+                            path: 'instances'
+                        },
                         actions: {
                             edit: {
                                 label: 'label.edit',


Mime
View raw message