[
https://issues.apache.org/jira/browse/CLOUDSTACK-5544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Suich closed CLOUDSTACK-5544.
-----------------------------------
> 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.5#6160)