Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Schmitz
FoD
Commits
c847bb42
Commit
c847bb42
authored
1 year ago
by
David Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
fix/wrong_ratelimit_stats: update
parent
d596e69f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/flowspy/route_details.html
+54
-46
54 additions, 46 deletions
templates/flowspy/route_details.html
with
54 additions
and
46 deletions
templates/flowspy/route_details.html
+
54
−
46
View file @
c847bb42
...
@@ -152,12 +152,12 @@ function plotGraph(route_then_action, data)
...
@@ -152,12 +152,12 @@ function plotGraph(route_then_action, data)
var
ybytesdata
=
Array
();
var
ybytesdata
=
Array
();
var
ybytesdatarel
=
Array
();
var
ybytesdatarel
=
Array
();
var
y
dropp
edpkgdata
=
Array
();
var
y
match
edpkgdata
=
Array
();
var
y
dropp
edpkgdatarel
=
Array
();
var
y
match
edpkgdatarel
=
Array
();
var
y
dropp
edbytesdata
=
Array
();
var
y
match
edbytesdata
=
Array
();
var
y
dropp
edbytesdatarel
=
Array
();
var
y
match
edbytesdatarel
=
Array
();
var
y
dropp
ed_available
=
false
;
var
y
match
ed_available
=
false
;
for
(
i
=
0
;
i
<
data
[
"
data
"
].
length
;
i
++
)
{
for
(
i
=
0
;
i
<
data
[
"
data
"
].
length
;
i
++
)
{
var
d
=
data
[
"
data
"
][
data
[
"
data
"
].
length
-
1
-
i
];
var
d
=
data
[
"
data
"
][
data
[
"
data
"
].
length
-
1
-
i
];
...
@@ -178,21 +178,29 @@ function plotGraph(route_then_action, data)
...
@@ -178,21 +178,29 @@ function plotGraph(route_then_action, data)
ybytesdatarel
[
i
]
=
(
bytesdelta
===
undefined
||
bytesdelta
>=
0
)
?
bytesdelta
:
0
;
ybytesdatarel
[
i
]
=
(
bytesdelta
===
undefined
||
bytesdelta
>=
0
)
?
bytesdelta
:
0
;
}
}
if
(
d
.
value_dropped
!=
undefined
)
{
if
(
d
.
value_matched
!=
undefined
)
{
ydropped_available
=
true
ymatched_available
=
true
ymatched_packets
=
d
.
value_matched
.
packets
;
ymatched_bytes
=
d
.
value_matched
.
bytes
;
}
else
if
(
d
.
value_dropped
!=
undefined
)
{
// support for ".value_dropped" which actually really effectively was matched bytes/packets (as having been wrongly used/named, and which was in use for a short time in 2024-02)
ymatched_available
=
true
ymatched_packets
=
d
.
value_dropped
.
packets
;
ymatched_bytes
=
d
.
value_dropped
.
bytes
;
}
ydroppedpkgdata
[
i
]
=
d
.
value_dropped
.
packets
;
if
(
ymatched_available
)
{
ydroppedbytesdata
[
i
]
=
d
.
value_dropped
.
bytes
;
ymatchedpkgdata
[
i
]
=
ymatched_packets
;
ymatchedbytesdata
[
i
]
=
ymatched_bytes
;
if
(
i
==
0
)
{
if
(
i
==
0
)
{
y
dropp
edpkgdatarel
[
i
]
=
0
;
y
match
edpkgdatarel
[
i
]
=
0
;
y
dropp
edbytesdatarel
[
i
]
=
0
;
y
match
edbytesdatarel
[
i
]
=
0
;
}
else
{
}
else
{
delta
=
(
y
dropp
edpkgdata
[
i
]
===
undefined
)
?
undefined
:
(
y
dropp
edpkgdata
[
i
-
1
]
===
undefined
)
?
y
dropp
edpkgdata
[
i
]
:
(
y
dropp
edpkgdata
[
i
]
-
y
dropp
edpkgdata
[
i
-
1
]);
delta
=
(
y
match
edpkgdata
[
i
]
===
undefined
)
?
undefined
:
(
y
match
edpkgdata
[
i
-
1
]
===
undefined
)
?
y
match
edpkgdata
[
i
]
:
(
y
match
edpkgdata
[
i
]
-
y
match
edpkgdata
[
i
-
1
]);
y
dropp
edpkgdatarel
[
i
]
=
(
delta
===
undefined
||
delta
>=
0
)
?
delta
:
0
;
y
match
edpkgdatarel
[
i
]
=
(
delta
===
undefined
||
delta
>=
0
)
?
delta
:
0
;
bytesdelta
=
(
y
dropp
edbytesdata
[
i
]
===
undefined
)
?
undefined
:
(
y
dropp
edbytesdata
[
i
-
1
]
===
undefined
)
?
y
dropp
edbytesdata
[
i
]
:
(
y
dropp
edbytesdata
[
i
]
-
y
dropp
edbytesdata
[
i
-
1
]);
bytesdelta
=
(
y
match
edbytesdata
[
i
]
===
undefined
)
?
undefined
:
(
y
match
edbytesdata
[
i
-
1
]
===
undefined
)
?
y
match
edbytesdata
[
i
]
:
(
y
match
edbytesdata
[
i
]
-
y
match
edbytesdata
[
i
-
1
]);
y
dropp
edbytesdatarel
[
i
]
=
(
bytesdelta
===
undefined
||
bytesdelta
>=
0
)
?
bytesdelta
:
0
;
y
match
edbytesdatarel
[
i
]
=
(
bytesdelta
===
undefined
||
bytesdelta
>=
0
)
?
bytesdelta
:
0
;
}
}
...
@@ -228,24 +236,24 @@ function plotGraph(route_then_action, data)
...
@@ -228,24 +236,24 @@ function plotGraph(route_then_action, data)
if
(
is_drop_rule
)
{
if
(
is_drop_rule
)
{
match
ed_text
=
"
matched and dropped
"
;
dropp
ed_text
=
"
matched and dropped
"
;
value1__borderColor
=
drop__borderColor
;
value1__borderColor
=
drop__borderColor
;
value1__pointbackgroundColor
=
drop__pointbackgroundColor
;
value1__pointbackgroundColor
=
drop__pointbackgroundColor
;
value1__backgroundColor
=
drop__backgroundColor
;
value1__backgroundColor
=
drop__backgroundColor
;
}
else
if
(
is_accept_rule
)
{
}
else
if
(
is_accept_rule
)
{
match
ed_text
=
"
matched and accepted
"
;
dropp
ed_text
=
"
matched and accepted
"
;
value1__borderColor
=
accept__borderColor
;
value1__borderColor
=
accept__borderColor
;
value1__pointbackgroundColor
=
accept__pointbackgroundColor
;
value1__pointbackgroundColor
=
accept__pointbackgroundColor
;
value1__backgroundColor
=
accept__backgroundColor
;
value1__backgroundColor
=
accept__backgroundColor
;
}
else
{
}
else
{
match
ed_text
=
"
match
ed
"
;
dropp
ed_text
=
"
dropp
ed
"
;
value1__borderColor
=
matched
__borderColor
;
value1__borderColor
=
drop
__borderColor
;
value1__pointbackgroundColor
=
matched
__pointbackgroundColor
;
value1__pointbackgroundColor
=
drop
__pointbackgroundColor
;
value1__backgroundColor
=
matched
__backgroundColor
;
value1__backgroundColor
=
drop
__backgroundColor
;
}
}
var
ypkg_datasets
=
[{
var
ypkg_datasets
=
[{
label
:
'
# packets
'
+
match
ed_text
,
label
:
'
# packets
'
+
dropp
ed_text
,
data
:
ypkgdata
,
data
:
ypkgdata
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
value1__borderColor
,
borderColor
:
value1__borderColor
,
...
@@ -256,7 +264,7 @@ function plotGraph(route_then_action, data)
...
@@ -256,7 +264,7 @@ function plotGraph(route_then_action, data)
//backgroundColor: "#99bfff"
//backgroundColor: "#99bfff"
}];
}];
var
ypkgrel_datasets
=
[{
var
ypkgrel_datasets
=
[{
label
:
'
# packets
'
+
match
ed_text
,
label
:
'
# packets
'
+
dropp
ed_text
,
data
:
ypkgdatarel
,
data
:
ypkgdatarel
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
value1__borderColor
,
borderColor
:
value1__borderColor
,
...
@@ -267,7 +275,7 @@ function plotGraph(route_then_action, data)
...
@@ -267,7 +275,7 @@ function plotGraph(route_then_action, data)
//backgroundColor: "#ff877a"
//backgroundColor: "#ff877a"
}];
}];
var
ybytes_datasets
=
[{
var
ybytes_datasets
=
[{
label
:
'
# bytes
'
+
match
ed_text
,
label
:
'
# bytes
'
+
dropp
ed_text
,
data
:
ybytesdata
,
data
:
ybytesdata
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
value1__borderColor
,
borderColor
:
value1__borderColor
,
...
@@ -278,7 +286,7 @@ function plotGraph(route_then_action, data)
...
@@ -278,7 +286,7 @@ function plotGraph(route_then_action, data)
//backgroundColor: "#99bfff"
//backgroundColor: "#99bfff"
}];
}];
var
ybytesrel_datasets
=
[{
var
ybytesrel_datasets
=
[{
label
:
'
# bytes
'
+
match
ed_text
,
label
:
'
# bytes
'
+
dropp
ed_text
,
data
:
ybytesdatarel
,
data
:
ybytesdatarel
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
value1__borderColor
,
borderColor
:
value1__borderColor
,
...
@@ -290,38 +298,38 @@ function plotGraph(route_then_action, data)
...
@@ -290,38 +298,38 @@ function plotGraph(route_then_action, data)
}];
}];
if
(
y
dropp
ed_available
)
{
if
(
y
match
ed_available
)
{
ypkg_datasets
.
push
({
ypkg_datasets
.
push
({
label
:
'
# packets
dropp
ed
'
,
label
:
'
# packets
match
ed
'
,
data
:
y
dropp
edpkgdata
,
data
:
y
match
edpkgdata
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
drop
__borderColor
,
borderColor
:
matched
__borderColor
,
pointBackgroundColor
:
drop
__pointbackgroundColor
,
pointBackgroundColor
:
matched
__pointbackgroundColor
,
backgroundColor
:
drop
__backgroundColor
backgroundColor
:
matched
__backgroundColor
});
});
ypkgrel_datasets
.
push
({
ypkgrel_datasets
.
push
({
label
:
'
# packets
dropp
ed
'
,
label
:
'
# packets
match
ed
'
,
data
:
y
dropp
edpkgdatarel
,
data
:
y
match
edpkgdatarel
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
drop
__borderColor
,
borderColor
:
matched
__borderColor
,
pointBackgroundColor
:
drop
__pointbackgroundColor
,
pointBackgroundColor
:
matched
__pointbackgroundColor
,
backgroundColor
:
drop
__backgroundColor
backgroundColor
:
matched
__backgroundColor
});
});
ybytes_datasets
.
push
({
ybytes_datasets
.
push
({
label
:
'
# bytes
dropp
ed
'
,
label
:
'
# bytes
match
ed
'
,
data
:
y
dropp
edbytesdata
,
data
:
y
match
edbytesdata
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
drop
__borderColor
,
borderColor
:
matched
__borderColor
,
pointBackgroundColor
:
drop
__pointbackgroundColor
,
pointBackgroundColor
:
matched
__pointbackgroundColor
,
backgroundColor
:
drop
__backgroundColor
backgroundColor
:
matched
__backgroundColor
});
});
ybytesrel_datasets
.
push
({
ybytesrel_datasets
.
push
({
label
:
'
# bytes
dropp
ed
'
,
label
:
'
# bytes
match
ed
'
,
data
:
y
dropp
edbytesdatarel
,
data
:
y
match
edbytesdatarel
,
borderWidth
:
2
,
borderWidth
:
2
,
borderColor
:
drop
__borderColor
,
borderColor
:
matched
__borderColor
,
pointBackgroundColor
:
drop
__pointbackgroundColor
,
pointBackgroundColor
:
matched
__pointbackgroundColor
,
backgroundColor
:
drop
__backgroundColor
backgroundColor
:
matched
__backgroundColor
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment