Merge pull request #4599 from Ansuel/move-svg
authorJo-Philipp Wich <jo@mein.io>
Tue, 17 Nov 2020 23:48:43 +0000 (00:48 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Nov 2020 23:48:43 +0000 (00:48 +0100)
luci-mod-status: move svg to dedicated dir

14 files changed:
modules/luci-mod-status/htdocs/luci-static/resources/bandwidth.svg [deleted file]
modules/luci-mod-status/htdocs/luci-static/resources/connections.svg [deleted file]
modules/luci-mod-status/htdocs/luci-static/resources/load.svg [deleted file]
modules/luci-mod-status/htdocs/luci-static/resources/svg/bandwidth.svg [new file with mode: 0644]
modules/luci-mod-status/htdocs/luci-static/resources/svg/connections.svg [new file with mode: 0644]
modules/luci-mod-status/htdocs/luci-static/resources/svg/load.svg [new file with mode: 0644]
modules/luci-mod-status/htdocs/luci-static/resources/svg/wifirate.svg [new file with mode: 0644]
modules/luci-mod-status/htdocs/luci-static/resources/svg/wireless.svg [new file with mode: 0644]
modules/luci-mod-status/htdocs/luci-static/resources/view/status/bandwidth.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/connections.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/load.js
modules/luci-mod-status/htdocs/luci-static/resources/view/status/wireless.js
modules/luci-mod-status/htdocs/luci-static/resources/wifirate.svg [deleted file]
modules/luci-mod-status/htdocs/luci-static/resources/wireless.svg [deleted file]

diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/bandwidth.svg b/modules/luci-mod-status/htdocs/luci-static/resources/bandwidth.svg
deleted file mode 100644 (file)
index 5a121b8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-       <polyline id="rx" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
-       <polyline id="tx" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
-
-       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/connections.svg b/modules/luci-mod-status/htdocs/luci-static/resources/connections.svg
deleted file mode 100644 (file)
index 5794e79..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-       <polyline id="tcp" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
-       <polyline id="udp" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
-       <polyline id="other" points="" style="fill:red;fill-opacity:0.4;stroke:red;stroke-width:1" />
-
-       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/load.svg b/modules/luci-mod-status/htdocs/luci-static/resources/load.svg
deleted file mode 100644 (file)
index 716d376..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-       <polyline id="load01" points="" style="fill:#ff0000;fill-opacity:0.4;stroke:#ff0000;stroke-width:1" />
-       <polyline id="load05" points="" style="fill:#ff6600;fill-opacity:0.4;stroke:#ff6600;stroke-width:1" />
-       <polyline id="load15" points="" style="fill:#ffaa00;fill-opacity:0.4;stroke:#ffaa00;stroke-width:1" />
-
-       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/svg/bandwidth.svg b/modules/luci-mod-status/htdocs/luci-static/resources/svg/bandwidth.svg
new file mode 100644 (file)
index 0000000..5a121b8
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
+       <polyline id="rx" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
+       <polyline id="tx" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
+
+       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/svg/connections.svg b/modules/luci-mod-status/htdocs/luci-static/resources/svg/connections.svg
new file mode 100644 (file)
index 0000000..5794e79
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
+       <polyline id="tcp" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
+       <polyline id="udp" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
+       <polyline id="other" points="" style="fill:red;fill-opacity:0.4;stroke:red;stroke-width:1" />
+
+       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/svg/load.svg b/modules/luci-mod-status/htdocs/luci-static/resources/svg/load.svg
new file mode 100644 (file)
index 0000000..716d376
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
+       <polyline id="load01" points="" style="fill:#ff0000;fill-opacity:0.4;stroke:#ff0000;stroke-width:1" />
+       <polyline id="load05" points="" style="fill:#ff6600;fill-opacity:0.4;stroke:#ff6600;stroke-width:1" />
+       <polyline id="load15" points="" style="fill:#ffaa00;fill-opacity:0.4;stroke:#ffaa00;stroke-width:1" />
+
+       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/svg/wifirate.svg b/modules/luci-mod-status/htdocs/luci-static/resources/svg/wifirate.svg
new file mode 100644 (file)
index 0000000..e75ea61
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
+       <polyline id="rate" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
+
+       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/svg/wireless.svg b/modules/luci-mod-status/htdocs/luci-static/resources/svg/wireless.svg
new file mode 100644 (file)
index 0000000..00cc2a1
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+
+<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
+       <polyline id="rssi" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
+       <polyline id="noise" points="" style="fill:red;fill-opacity:0.4;stroke:red;stroke-width:1" />
+
+       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+
+       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
+       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
+</svg>
index edb934ed93170cd4ed701e47d40bec87beddfba3..7953d8dbf5867d90d8dc9a0bd6a12bf2951a4981 100644 (file)
@@ -27,7 +27,7 @@ function rate(n, br) {
 return view.extend({
        load: function() {
                return Promise.all([
-                       this.loadSVG(L.resource('bandwidth.svg')),
+                       this.loadSVG(L.resource('svg/bandwidth.svg')),
                        network.getDevices()
                ]);
        },
index 4c1b097f2b0e16eca697533114ed29d5ba1672bb..cc898114283860db71e2ce503c57a98866fc0005 100644 (file)
@@ -36,7 +36,7 @@ Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
 return view.extend({
        load: function() {
                return Promise.all([
-                       this.loadSVG(L.resource('connections.svg'))
+                       this.loadSVG(L.resource('svg/connections.svg'))
                ]);
        },
 
index 3b302dc5099c45585033dfe87187051eb5bd864d..cfb7a96b0888605762f4194b72d5e50b965be295 100644 (file)
@@ -19,7 +19,7 @@ Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
 return view.extend({
        load: function() {
                return Promise.all([
-                       this.loadSVG(L.resource('load.svg'))
+                       this.loadSVG(L.resource('svg/load.svg'))
                ]);
        },
 
index 171899262a3e1ed56cd860e6d162aab323db51ca..95077bc10aa0736485c7dc8e397c0def19d66e8e 100644 (file)
@@ -21,8 +21,8 @@ Math.log2 = Math.log2 || function(x) { return Math.log(x) * Math.LOG2E; };
 return view.extend({
        load: function() {
                return Promise.all([
-                       this.loadSVG(L.resource('wireless.svg')),
-                       this.loadSVG(L.resource('wifirate.svg')),
+                       this.loadSVG(L.resource('svg/wireless.svg')),
+                       this.loadSVG(L.resource('svg/wifirate.svg')),
                        network.getWifiDevices().then(function(radios) {
                                var tasks = [], all_networks = [];
 
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/wifirate.svg b/modules/luci-mod-status/htdocs/luci-static/resources/wifirate.svg
deleted file mode 100644 (file)
index e75ea61..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-       <polyline id="rate" points="" style="fill:green;fill-opacity:0.4;stroke:green;stroke-width:1" />
-
-       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-</svg>
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/wireless.svg b/modules/luci-mod-status/htdocs/luci-static/resources/wireless.svg
deleted file mode 100644 (file)
index 00cc2a1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-
-<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-       <polyline id="rssi" points="" style="fill:blue;fill-opacity:0.4;stroke:blue;stroke-width:1" />
-       <polyline id="noise" points="" style="fill:red;fill-opacity:0.4;stroke:red;stroke-width:1" />
-
-       <line x1="0" y1="25%" x2="100%" y2="25%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_75" x="20" y="24%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="50%" x2="100%" y2="50%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_50" x="20" y="49%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-
-       <line x1="0" y1="75%" x2="100%" y2="75%" style="stroke:black;stroke-width:0.1" />
-       <text id="label_25" x="20" y="74%" style="fill:#eee; font-size:9pt; font-family:sans-serif; text-shadow:1px 1px 1px #000"> </text>
-</svg>