cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8968) UI icon over VM snapshot to deploy user instance
Date Sat, 06 Feb 2016 20:20:39 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15135989#comment-15135989
] 

ASF GitHub Bot commented on CLOUDSTACK-8968:
--------------------------------------------

Github user rodrigo93 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1320#discussion_r52106924
  
    --- Diff: ui/scripts/instanceWizard.js ---
    @@ -294,53 +295,67 @@
     
                 // Step 3: Service offering
                 function(args) {
    -                selectedTemplateObj = null; //reset
    -                if (args.currentData["select-template"] == "select-template") {
    -                    if (featuredTemplateObjs != null && featuredTemplateObjs.length
> 0) {
    -                        for (var i = 0; i < featuredTemplateObjs.length; i++) {
    -                            if (featuredTemplateObjs[i].id == args.currentData.templateid)
{
    -                                selectedTemplateObj = featuredTemplateObjs[i];
    -                                break;
    +                snapshotObjs = null;
    +                selectedSnapshotObj = null;
    +
    +                if (args.moreArgs && args.moreArgs.snapshot)
    +                {
    +                    zoneObjs = args.moreArgs.zone;
    +                    selectedZoneObj = zoneObjs[0];
    +                    hypervisorObjs = args.moreArgs.hypervisor;
    +                    selectedHypervisor = hypervisorObjs[0].name;
    +                    snapshotObjs = args.moreArgs.snapshot;
    +                    selectedSnapshotObj = snapshotObjs[0];
    +                }
    +                else {
    +                    selectedTemplateObj = null; //reset
    +                    if (args.currentData["select-template"] == "select-template") {
    +                        if (featuredTemplateObjs != null && featuredTemplateObjs.length
> 0) {
    +                            for (var i = 0; i < featuredTemplateObjs.length; i++)
{
    +                                if (featuredTemplateObjs[i].id == args.currentData.templateid)
{
    +                                    selectedTemplateObj = featuredTemplateObjs[i];
    +                                    break;
    +                                }
                                 }
                             }
    -                    }
    -                    if (selectedTemplateObj == null) {
    -                        if (communityTemplateObjs != null && communityTemplateObjs.length
> 0) {
    -                            for (var i = 0; i < communityTemplateObjs.length; i++)
{
    -                                if (communityTemplateObjs[i].id == args.currentData.templateid)
{
    -                                    selectedTemplateObj = communityTemplateObjs[i];
    -                                    break;
    +                        if (selectedTemplateObj == null) {
    --- End diff --
    
    Hi @nitin-maharana 
    Couldn't this _if_ and the following _ifs_ be merged into one? 
    Like:
    
    > if ( selectedTemplateObj == null && communityTemplateObjs != null &&
communityTemplateObjs.length > 0)


> UI icon over VM snapshot to deploy user instance
> ------------------------------------------------
>
>                 Key: CLOUDSTACK-8968
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8968
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Nitin Kumar Maharana
>
> A new icon over VM snapshot object, which upon invoked will open a deploy user instance
wizard, where there is no choice to choose zone and ISO or template to deploy the user instance
from.
> 1) A new icon to indicate deploy user instance from VM snapshot
> 2) The new icon is placed as an operation over each VM snapshot object.
> 3) Clicking this icon will show the wizard to deploy user instance, which is same as
wizard for normal user instance except that zone selection page and ISO/template selection
page would not be present in this wizard.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message