Just for expiramentarion.
If you want to add a speedtest under applications in glinet ui.
ssh in your terminal and run this:
mkdir -p /www/views &&
cat > /usr/share/oui/menu.d/zz-speedtest.json <<'EOF'
{
"index": 120,
"view": "speedtest",
"title": "Speed Test",
"level": 2,
"parent": "applications",
"parent_icon": "application",
"parent_index": 50,
"show_mode": \["router"\]
}
EOF
cat > /tmp/speedtest.js <<'EOF'
module.exports = {
name: "speedtest",
render(h) {
return h("div", {
style: {
width: "100%",
height: "100vh",
background: "#000"
}
}, \[
h("iframe", {
attrs: {
src: "https://fast.com",
style: "width:100%;height:100%;border:none;"
}
})
\])
}
}
EOF
gzip -c /tmp/speedtest.js > /www/views/gl-sdk4-ui-speedtest.common.js.gz &&
rm /tmp/speedtest.js &&
rm -rf /tmp/luci-\* /tmp/nginx\* &&
/etc/init.d/nginx restart &&
echo "SpeedTest installed safely."
If you want to remove it
rm -f /usr/share/oui/menu.d/zz-speedtest.json
/www/views/gl-sdk4-ui-speedtest.common.js.gz &&
rm -rf /tmp/luci-\* &&
/etc/init.d/nginx restart