You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/12/20 22:48:11 UTC

[jira] [Commented] (CLOUDSTACK-5544) JS error on snapshot view of storage tab

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

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

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

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)