Skip to content

Commit a30a0c5

Browse files
committed
op hierarchy problematic ops - cables-gl/cables/issues/7545
1 parent 23d54ed commit a30a0c5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

shared/api/utils/shared_ops_util.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ export default class SharedOpsUtil extends SharedUtil
16171617
if (!outerName || !innerName) return "Unknow op";
16181618
if (this.getNamespace(innerName).startsWith(this.getNamespace(outerName)) || this.getNamespace(outerName).startsWith(this.getNamespace(innerName))) return false;
16191619

1620-
const innerLink = "<a href=\"/op/" + innerName + "\">" + innerName + "</a>";
1620+
const innerLink = "<a href=\"/op/" + innerName + "\" target=\"_blank\">" + innerName + "</a>";
16211621
const opText = "<br/>Rename " + innerLink;
16221622

16231623
let convertText = "";
@@ -1638,7 +1638,7 @@ export default class SharedOpsUtil extends SharedUtil
16381638
}
16391639
else if (this.isTeamOp(outerName))
16401640
{
1641-
convertText = " to a op of the same team.";
1641+
convertText = " to an op of the same team.";
16421642
if (this.isTeamOp(innerName) && this.getNamespace(innerName) !== this.getNamespace(outerName)) return "Team ops cannot contain ops of other teams." + opText + convertText;
16431643
if (this.isUserOp(innerName)) return "Team ops cannot contain user ops." + opText + convertText;
16441644
if (this.isPatchOp(innerName)) return "Team ops cannot contain patch ops." + opText + convertText;
@@ -2841,13 +2841,14 @@ export default class SharedOpsUtil extends SharedUtil
28412841
const subPatchAtt = this.getSubPatchOpAttachment(oneOldName);
28422842
if (subPatchAtt)
28432843
{
2844-
subPatchAtt.ops.forEach((subPatchOp) =>
2844+
subPatchAtt.ops.forEach((subPatchOp, i) =>
28452845
{
28462846
const subPatchOpName = this.getOpNameById(subPatchOp.opId);
28472847
const hierarchyProblem = this.getNamespaceHierarchyProblem(oneNewName, subPatchOpName);
28482848
if (hierarchyProblem)
28492849
{
2850-
problems.bad_op_hierarchy = hierarchyProblem;
2850+
const problemKey = "bad_op_hierarchy_" + i;
2851+
problems[problemKey] = hierarchyProblem;
28512852
}
28522853
});
28532854
}

0 commit comments

Comments
 (0)