cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Suich (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CLOUDSTACK-5544) JS error on snapshot view of storage tab
Date Wed, 18 Dec 2013 17:53:11 GMT
Chris Suich created CLOUDSTACK-5544:
---------------------------------------

             Summary: 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
             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