cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-5544) JS error on snapshot view of storage tab
Date Fri, 20 Dec 2013 21:50:09 GMT

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

ASF subversion and git services commented on CLOUDSTACK-5544:
-------------------------------------------------------------

Commit 08a69b00535caaa72a5727c595c2de80b8fce202 in branch refs/heads/master from [~bfederle]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=08a69b0 ]

CLOUDSTACK-5544: Snapshot action filter: Remove check on volume state

Removes conditional check of volume state for snapshot action filter,
since it causes a null pointer when trying to access view outside the storage
section. Now only '.revertable' attribute is checked. Storage state should now
be verified at the API level only.


> JS error on snapshot view of storage tab
> ----------------------------------------
>
>                 Key: CLOUDSTACK-5544
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5544
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: UI
>    Affects Versions: 4.3.0
>            Reporter: Chris Suich
>            Assignee: Brian Federle
>              Labels: ui
>             Fix For: 4.3.0
>
>
> In this bit of code:
>    var snapshotActionfilter = function(args) {
>        var jsonObj = args.context.item;
>        if (jsonObj.state == 'Destroyed') {
>            return [];
>        }
>        var allowedActions = [];
>        if (jsonObj.state == "BackedUp") {
>            allowedActions.push("createTemplate");
>            allowedActions.push("createVolume");
>            if (jsonObj.revertable && args.context.volumes[0].vmstate == "Stopped")
{
>                allowedActions.push("revertSnapshot");
>            }
>        }
>        allowedActions.push("remove");
>        return allowedActions;
>    }
> An error is thrown on the snapshot view of the storage tab if jsonObj.revertable is true,
since args.context.volumes is undefined when on this page.
> We should remove the ' && args.context.volumes[0].vmstate == "Stopped"' condition
and simply make that check on the server side since the volume/vm state information is not
available when looking at the snapshots page.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message