Skip to content

Commit

Permalink
Update tag filtering in webdash
Browse files Browse the repository at this point in the history
- Thanks @matthewpeterkort for the help and recommendation on this!
  • Loading branch information
lbeckman314 committed Oct 11, 2023
1 parent 0d972f1 commit f52d343
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 1 deletion.
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-bar-foo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag bar:foo",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"bar": "foo"
}
}
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-foo-bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag foo:bar",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"foo": "bar"
}
}
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-foo-baz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag foo:baz",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"foo": "baz"
}
}
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-foo-nil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag foo:",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"foo": ""
}
}
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-nil-bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag :bar",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"": "bar"
}
}
15 changes: 15 additions & 0 deletions tag-filtering-tests/task-nil-nil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Task with tag :",
"executors": [
{
"image": "alpine",
"command": [
"echo",
"hello"
]
}
],
"tags": {
"": ""
}
}
5 changes: 4 additions & 1 deletion webdash/src/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ function TaskList({pageToken, setPageToken,
for (var i = 0; i < tagsFilter.length; i++) {
var tag = tagsFilter[i];
if (tag.key !== "") {
params.set("tags["+tag.key+"]", tag.value);
params.set("tag_key", tag.key);
};
if (tag.value !== "") {
params.set("tag_value", tag.value);
};
};
if (pageToken !== "") {
Expand Down

0 comments on commit f52d343

Please sign in to comment.