Add styling on links

This commit is contained in:
2024-08-04 17:41:39 +02:00
commit d35c46078f
533 changed files with 1299486 additions and 0 deletions
.gitattributes.gitignore
archetypes
assets
content
hugo.toml
static/assets
ansible
as8298
asr9006
asr920
bucketlist
clearfog
colo
coloclue-ipng
coloclue-loadtest
coloclue-vpp
css
debian-vpp
dwdm.png
fiber7-litexchange
fiber7-x
fitlet2
freebsd-vpp
freeix
fs-switch
geofeed
gowin-n305
ipng-frontends
lab
logo
main.scss
mastodon
minima-social-icons.svg
mlxsw
mpls-core
nat64
netgate-6100
network
oem-switch
pcengines-apu6
pdf
pdu19.png
pixelfed
r86s
sixxs-sunset
smtp
supermicro.png
syslog-telegram
vpp-babel
vpp-ixp-gateway
vpp-mpls
vpp-ospf
vpp-papi
vpp-proto
vpp-stats
vpp
vppcfg
themes/hugo-theme-notrack

@ -0,0 +1,89 @@
(function () {
function Graph(elem, ltdata, error) {
var chart = c3.generate({
bindto: elem,
size: {
width: 1200,
height: error ? 400 : 600,
},
data: {
columns: ltdata['data'],
regions: {
'ideal': error ? [] : [{'start': 0, 'style': 'dashed'}]
},
colors: {
'ideal': '#bbbbbb',
'txrate': '#bbbbbb',
},
axes: {
'txrate': 'y2'
}
},
point: {
show: false
},
axis: {
x: {
tick: {
values: ltdata['ticks'],
},
label: {
text: 'seconds',
position: 'outer-center'
}
},
y: {
min: 0,
max: error ? 1 : ltdata['max'],
padding: { top: 0, bottom: 0 },
type: (error ? 'log' : 'linear'),
tick: {
format: d3.format('.3f'),
},
label: {
text: (error ? 'err fraction of txrate (log)' : ltdata['yprefix'] + 'pps'),
position: 'outer-middle'
}
},
y2: {
show: true,
min: 0,
max: error ? ltdata['max'] : 1,
type: (error ? 'linear' : 'linear'),
tick: {
format: d3.format(error ? '.3f' : '.1f'),
},
padding: { top: 0, bottom: 0 },
label: {
text: error ? 'txrate ' + ltdata['yprefix'] + 'pps' : 'fraction of linerate',
position: 'outer-middle'
}
}
},
grid: {
y: {
lines: error ? [{value: ltdata['ft'], text: 'fail threshold', class: 'ft', position: 'start'}] : [{value: ltdata['max']}]
}
}
});
}
function LoadtestGraph(elem, ltdata) {
return Graph(elem, ltdata, false);
}
function ErrorGraph(elem, ltdata) {
return Graph(elem, ltdata, true);
}
$(window).on("load", function() {
$('div.loadtest-graph').each(function(index, el) {
if (el.dataset.ltdata) {
LoadtestGraph(el, JSON.parse(el.dataset.ltdata));
} else if (el.dataset.errdata) {
ErrorGraph(el, JSON.parse(el.dataset.errdata));
}
});
});
})();