mirror of https://github.com/apache/cloudstack.git
ui: Don't pass account name when in project mode (#3435)
When users try to list instances in project mode from Account > SSHKeyPairs > Key > View Instances, we don't need to include sshkeypairs account name into the API Param. It's redundant and causes error. Fixes #2895
This commit is contained in:
parent
2ecd5ec804
commit
14bf2e98f3
|
|
@ -750,9 +750,13 @@
|
|||
if ("sshkeypairs" in args.context) {
|
||||
$.extend(data, {
|
||||
domainid: args.context.sshkeypairs[0].domainid,
|
||||
account: args.context.sshkeypairs[0].account,
|
||||
keypair: args.context.sshkeypairs[0].name
|
||||
});
|
||||
if (!cloudStack.context || !cloudStack.context.projects) {
|
||||
// In case we are in project mode sshkeypairs provides project account name which
|
||||
// should not be passed as part of API params. So only extend if NOT in project mode.
|
||||
$.extend(data, { account: args.context.sshkeypairs[0].account});
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
|
|
|
|||
Loading…
Reference in New Issue