Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1BEB7107E5 for ; Tue, 1 Jul 2014 09:39:59 +0000 (UTC) Received: (qmail 46101 invoked by uid 500); 1 Jul 2014 09:39:58 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 45981 invoked by uid 500); 1 Jul 2014 09:39:58 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 45957 invoked by uid 99); 1 Jul 2014 09:39:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2014 09:39:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 81208990BB7; Tue, 1 Jul 2014 09:39:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: weizhou@apache.org To: commits@cloudstack.apache.org Date: Tue, 01 Jul 2014 09:40:01 -0000 Message-Id: In-Reply-To: <201e6cdb1b7647708fa3697bd71e5d23@git.apache.org> References: <201e6cdb1b7647708fa3697bd71e5d23@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [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 Authored: Tue Jul 1 10:55:46 2014 +0200 Committer: Wei Zhou 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',