Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
91bea3dd
Unverified
Commit
91bea3dd
authored
Dec 04, 2017
by
Conor Broderick
Committed by
GitHub
Dec 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #932 from paystee/fix-label-matching
Fix label matching in routing tree editor
parents
a3bfe8c8
2f78f749
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
routing-tree.js
static/routing-tree.js
+5
-2
No files found.
static/routing-tree.js
View file @
91bea3dd
...
...
@@ -115,7 +115,10 @@ function matchLabels(matchers, labelSet) {
// Compare single matcher to labelSet
function
matchLabel
(
matcher
,
labelSet
)
{
var
v
=
labelSet
[
matcher
.
name
];
var
v
=
""
;
if
(
matcher
.
name
in
labelSet
)
{
v
=
labelSet
[
matcher
.
name
];
}
if
(
matcher
.
isRegex
)
{
return
matcher
.
value
.
test
(
v
)
...
...
@@ -156,7 +159,7 @@ function massage(root) {
for
(
var
key
in
root
.
match_re
)
{
var
o
=
{};
o
.
isRegex
=
true
;
o
.
value
=
new
RegExp
(
root
.
match_re
[
key
]
);
o
.
value
=
new
RegExp
(
"
^(?:
"
+
root
.
match_re
[
key
]
+
"
)$
"
);
o
.
name
=
key
;
matchers
.
push
(
o
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment