mirror of
https://github.com/openziti/zrok.git
synced 2024-11-08 01:04:08 +01:00
Merge pull request #348 from openziti/v0.4.0_override_endpoint
--override-endpoint Fixes (#347)
This commit is contained in:
commit
1d09d32866
@ -18,6 +18,8 @@ CHANGE: The underlying database store now utilizes a `deleted` flag on all table
|
||||
|
||||
CHANGE: Updated to latest `github.com/openziti/sdk-golang` (https://github.com/openziti/zrok/issues/335)
|
||||
|
||||
FIX: `zrok share reserved --override-endpoint` now works correctly; `--override-endpoint` was being incorrectly ignore previously (https://github.com/openziti/zrok/pull/348)
|
||||
|
||||
# v0.3.7
|
||||
|
||||
FIX: Improved TUI word-wrapping (https://github.com/openziti/zrok/issues/180)
|
||||
|
@ -73,6 +73,7 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) {
|
||||
}
|
||||
panic(err)
|
||||
}
|
||||
target = cmd.overrideEndpoint
|
||||
if target == "" {
|
||||
target = resp.Payload.BackendProxyEndpoint
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ func (h *updateShareHandler) Handle(params share.UpdateShareParams, principal *r
|
||||
|
||||
envFound := false
|
||||
for _, senv := range senvs {
|
||||
if senv.Id == sshr.Id {
|
||||
if senv.Id == sshr.EnvironmentId {
|
||||
envFound = true
|
||||
break
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ const sortNodes = (nodes) => {
|
||||
|
||||
const nodesEqual = (a, b) => {
|
||||
if(a.length !== b.length) return false;
|
||||
return a.every((e, i) => e.id === b[i].id && e.limited === b[i].limited);
|
||||
return a.every((e, i) => e.id === b[i].id && e.limited === b[i].limited && e.label === b[i].label);
|
||||
}
|
||||
|
||||
export const mergeGraph = (oldGraph, user, accountLimited, newOverview) => {
|
||||
@ -116,11 +116,11 @@ export const mergeGraph = (oldGraph, user, accountLimited, newOverview) => {
|
||||
// we're going to need to recompute a new graph... but we want to maintain the instances that already exist...
|
||||
|
||||
// we want to preserve nodes that exist in the new graph, and remove those that don't.
|
||||
let outputNodes = oldGraph.nodes.filter(oldNode => newGraph.nodes.find(newNode => newNode.id === oldNode.id && newNode.limited === oldNode.limited));
|
||||
let outputNodes = oldGraph.nodes.filter(oldNode => newGraph.nodes.find(newNode => newNode.id === oldNode.id && newNode.limited === oldNode.limited && newNode.label === oldNode.label));
|
||||
let outputLinks = oldGraph.nodes.filter(oldLink => newGraph.links.find(newLink => newLink.target === oldLink.target && newLink.source === oldLink.source));
|
||||
|
||||
// and then do the opposite; add any nodes that are in newGraph that are missing from oldGraph.
|
||||
outputNodes.push(...newGraph.nodes.filter(newNode => !outputNodes.find(oldNode => oldNode.id === newNode.id && oldNode.limited === newNode.limited)));
|
||||
outputNodes.push(...newGraph.nodes.filter(newNode => !outputNodes.find(oldNode => oldNode.id === newNode.id && oldNode.limited === newNode.limited && oldNode.label === newNode.label)));
|
||||
outputLinks.push(...newGraph.links.filter(newLink => !outputLinks.find(oldLink => oldLink.target === newLink.target && oldLink.source === newLink.source)));
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user