|
1 |
| -[](https://travis-ci.org/tcatm/meshviewer) |
| 1 | +Our clone of meshviewer. |
2 | 2 |
|
3 |
| -# Meshviewer |
4 |
| - |
5 |
| -Meshviewer is a frontend for |
6 |
| -[ffmap-backend](https://github.com/ffnord/ffmap-backend). |
7 |
| - |
8 |
| - |
9 |
| -[Changelog](CHANGELOG.md) |
10 |
| - |
11 |
| -# Screenshots |
12 |
| - |
13 |
| - |
14 |
| - |
15 |
| - |
16 |
| - |
17 |
| - |
18 |
| - |
19 |
| -# Dependencies |
20 |
| - |
21 |
| -- npm |
22 |
| -- bower |
23 |
| -- grunt-cli |
24 |
| -- Sass (>= 3.2) |
25 |
| - |
26 |
| -# Installing dependencies |
27 |
| - |
28 |
| -Install npm and Sass with your package-manager. On Debian-like systems run: |
29 |
| - |
30 |
| - sudo apt-get install npm ruby-sass |
31 |
| - |
32 |
| -Execute these commands on your server as a normal user to prepare the dependencies: |
33 |
| - |
34 |
| - git clone https://github.com/tcatm/meshviewer.git |
35 |
| - cd meshviewer |
36 |
| - npm install |
37 |
| - npm install bower grunt-cli |
38 |
| - node_modules/.bin/bower install |
39 |
| - |
40 |
| -# Configure |
41 |
| - |
42 |
| -Copy `config.js.example` to `config.js` and change it to match your community. |
43 |
| - |
44 |
| -## dataPath (string) |
45 |
| - |
46 |
| -`dataPath` must point to a directory containing `nodes.json` and `graph.json` |
47 |
| -(both are generated by |
48 |
| -[ffmap-backend](https://github.com/ffnord/ffmap-backend)). Don't forget the |
49 |
| -trailing slash! Data may be served from a different domain with [CORS enabled]. |
50 |
| -Also, GZip will greatly reduce bandwidth consumption. |
51 |
| - |
52 |
| -## siteName (string) |
53 |
| - |
54 |
| -Change this to match your communities' name. It will be used in various places. |
55 |
| - |
56 |
| -## mapSigmaScale (float) |
57 |
| - |
58 |
| -This affects the initial scale of the map. Greater values will show a larger |
59 |
| -area. Values like 1.0 and 0.5 might be good choices. |
60 |
| - |
61 |
| -## showContact (bool) |
62 |
| - |
63 |
| -Setting this to `false` will hide contact information for nodes. |
64 |
| - |
65 |
| -## maxAge (integer) |
66 |
| - |
67 |
| -Nodes being online for less than maxAge days are considered "new". Likewise, |
68 |
| -nodes being offline for less than than maxAge days are considered "lost". |
69 |
| - |
70 |
| -## nodeInfos (array, optional) |
71 |
| - |
72 |
| -This option allows to show client statistics depending on following case-sensitive parameters: |
73 |
| - |
74 |
| -- `name` caption of statistics segment in infobox |
75 |
| -- `href` absolute or relative URL to statistics image |
76 |
| -- `thumbnail` absolute or relative URL to thumbnail image, |
77 |
| - can be the same like `href` |
78 |
| -- `caption` is shown, if `thumbnail` is not present (no thumbnail in infobox) |
79 |
| - |
80 |
| -To insert current node-id in either `href`, `thumbnail` or `caption` |
81 |
| -you can use the case-sensitive template string `{NODE_ID}`. |
82 |
| - |
83 |
| -Examples for `nodeInfos`: |
84 |
| - |
85 |
| - "nodeInfos": [ |
86 |
| - { "name": "Clientstatistik", |
87 |
| - "href": "nodes/{NODE_ID}.png", |
88 |
| - "thumbnail": "nodes/{NODE_ID}.png", |
89 |
| - "caption": "Knoten {NODE_ID}" |
90 |
| - }, |
91 |
| - { "name": "Uptime", |
92 |
| - "href": "nodes_uptime/{NODE_ID}.png", |
93 |
| - "thumbnail": "nodes_uptime/{NODE_ID}.png", |
94 |
| - "caption": "Knoten {NODE_ID}" |
95 |
| - } |
96 |
| - ] |
97 |
| - |
98 |
| -In order to have statistics images available, you have to run the backend with parameter `--with-rrd` or generate them in other ways. |
99 |
| - |
100 |
| -## globalInfos (array, optional) |
101 |
| - |
102 |
| -This option allows to show global statistics on statistics page depending on following case-sensitive parameters: |
103 |
| - |
104 |
| -- `name` caption of statistics segment in infobox |
105 |
| -- `href` absolute or relative URL to statistics image |
106 |
| -- `thumbnail` absolute or relative URL to thumbnail image, |
107 |
| - can be the same like `href` |
108 |
| -- `caption` is shown, if `thumbnail` is not present (no thumbnail in infobox) |
109 |
| - |
110 |
| -In contrast to `nodeInfos` there is no template substitution in `href`, `thumbnail` or `caption`. |
111 |
| - |
112 |
| -Examples for `globalInfos`: |
113 |
| - |
114 |
| - "globalInfos": [ |
115 |
| - { "name": "Wochenstatistik", |
116 |
| - "href": "nodes/globalGraph.png", |
117 |
| - "thumbnail": "nodes/globalGraph.png", |
118 |
| - "caption": "Bild mit Wochenstatistik" |
119 |
| - }, |
120 |
| - { "name": "Jahresstatistik", |
121 |
| - "href": "nodes/globalGraph52.png", |
122 |
| - "thumbnail": "nodes/globalGraph52.png", |
123 |
| - "caption": "Bild mit Jahresstatistik" |
124 |
| - } |
125 |
| - ] |
126 |
| - |
127 |
| -In order to have global statistics available, you have to run the backend with parameter `--with-rrd` (this only creates globalGraph.png) or generate them in other ways. |
128 |
| - |
129 |
| -# Building |
130 |
| - |
131 |
| -Just run the following command from the meshviewer directory: |
132 |
| - |
133 |
| - node_modules/.bin/grunt |
134 |
| - |
135 |
| -This will generate `build/` containing all required files. |
136 |
| - |
137 |
| -[CORS enabled]: http://enable-cors.org/server.html |
| 3 | +Don't clone this if you come from another community the original can be found at http://draic.info/meshviewer/ |
0 commit comments