Compare commits
445 commits
Author | SHA1 | Date | |
---|---|---|---|
|
7cf9ed27e0 | ||
|
097fb5f7df | ||
|
005ca44075 | ||
|
d4644a3a73 | ||
|
280e9f296c | ||
|
16572ca099 | ||
|
3358db7faf | ||
|
e2e0b2cfd2 | ||
|
0c30bf5ffa | ||
|
f6ecf917bf | ||
|
679f02d14b | ||
|
b4a92d368e | ||
|
a44de71eda | ||
|
fee5fa10bf | ||
|
351fc5886a | ||
|
aef0391657 | ||
|
4ca5275a9b | ||
|
249e236ab7 | ||
|
6f9723640b | ||
|
0f60f1be22 | ||
|
76ba4dff83 | ||
|
cf22d01f09 | ||
|
d42861c922 | ||
|
aa3857dd55 | ||
|
3411f32d58 | ||
|
22dafeac57 | ||
|
1a75b5f103 | ||
|
5988427fa2 | ||
|
b4729018ac | ||
|
c2c366ab61 | ||
|
2322d876af | ||
|
a37d9f8d34 | ||
|
a89c1fa5d2 | ||
|
aae312e759 | ||
|
5a2c8db890 | ||
|
b24c8aa25f | ||
|
1782db2a22 | ||
|
daa3f92c16 | ||
|
aed9483e4b | ||
|
1699850552 | ||
|
c629629c16 | ||
|
5afd00ec90 | ||
|
9f6b7550e4 | ||
|
318c7831ba | ||
|
5e481381d5 | ||
|
f698890d2e | ||
|
563f22c831 | ||
|
8183a8f4de | ||
|
a27a6291f4 | ||
|
b5e913024b | ||
|
8b4ed85b7d | ||
|
ce74e82973 | ||
|
0a75fda7ce | ||
|
26336c5eda | ||
|
7253f64bcb | ||
|
ce7fe7297c | ||
|
df932b8989 | ||
|
30ccc03e8f | ||
|
463bfccc7e | ||
|
56f41d6393 | ||
|
73ebad06da | ||
|
0ff2553ea2 | ||
|
5723346226 | ||
|
e928518ba7 | ||
|
10a73eb41a | ||
|
8f660635c2 | ||
|
d27ff9d2d9 | ||
|
0c978dc697 | ||
|
90b2eeb9fd | ||
|
8fdf06b232 | ||
|
626e9999ba | ||
|
a262e3dfe2 | ||
|
a928465fda | ||
|
832a13f485 | ||
|
54c33b7083 | ||
|
ef4275b89b | ||
|
6067bc9f52 | ||
|
8ecde162ba | ||
|
6c811156af | ||
|
667d88fb27 | ||
|
9edf0dbb7c | ||
|
3637f6adc7 | ||
|
c2aada24ac | ||
|
84f0d1bf02 | ||
|
96c4451b1a | ||
|
0ddb6064a3 | ||
|
684dc1a1aa | ||
|
c213621fd7 | ||
|
b87c0f469d | ||
|
933210b681 | ||
|
a7a532d8cc | ||
|
239801927d | ||
|
703b52d256 | ||
|
3ed8c6364b | ||
|
3c4485c22d | ||
|
5fecc84ad8 | ||
|
7e2dc277dc | ||
|
3cb72545bb | ||
|
92ed481813 | ||
|
dc1e631be8 | ||
|
777597468b | ||
|
2aff7e13fc | ||
|
fb57c6fd37 | ||
|
0f47987d1a | ||
|
add843cc3f | ||
|
49454b8334 | ||
|
90e80d9f06 | ||
|
85cbbf0029 | ||
|
0f95453276 | ||
|
f617f8f8a4 | ||
|
99edb71f4c | ||
|
db3d4fbb5e | ||
|
04ffae93f5 | ||
|
0bdf302f9f | ||
|
907f27f8b2 | ||
|
24b099ef0c | ||
|
147badd0b5 | ||
|
a813f9532b | ||
|
ad1af012ed | ||
|
2515ecbc26 | ||
|
adaed27551 | ||
|
2c34f6d366 | ||
|
3f0436713d | ||
|
75bad86cab | ||
|
0e41ce82a8 | ||
|
8208d68ff4 | ||
|
eae5ea40f6 | ||
|
66fc38228c | ||
|
09fce67d9a | ||
|
260cbe6340 | ||
|
1058b052e0 | ||
|
66ee1a8c92 | ||
|
1f88711e2c | ||
|
5b9bad1f07 | ||
|
ee96cb2dfd | ||
|
ba30e75719 | ||
|
df9ca2c72d | ||
|
3c6c27f93e | ||
|
e50137c73c | ||
|
22827dbef4 | ||
|
2cdeb9dbf6 | ||
|
ea925d4bfc | ||
|
90d7bd84e5 | ||
|
410886fea5 | ||
|
38ed02962c | ||
|
9856a5f602 | ||
|
6c83242d9d | ||
|
e7234befc3 | ||
|
be29cd90da | ||
|
15e2fbca3f | ||
|
f2b3332d3f | ||
|
242bffe894 | ||
|
1b4d4ff11a | ||
|
27109e5245 | ||
|
279d1cadd0 | ||
|
5cfe67624b | ||
|
aa5a88985d | ||
|
1b460753ad | ||
|
7cfd5cd27e | ||
|
ce4811f128 | ||
|
e4eacc60f3 | ||
|
a7acecc2f7 | ||
|
f9893376b7 | ||
|
f33ae6e8cd | ||
|
b7479f61a0 | ||
|
fc7d1e62a9 | ||
|
88ac7d2475 | ||
|
740c4bec4b | ||
|
a498bb51a8 | ||
|
097ccf2502 | ||
|
ca7c50624f | ||
|
eceeed951f | ||
|
1b42cbb63f | ||
|
d158c5b9f0 | ||
|
bcb9241d46 | ||
|
a65451fcff | ||
|
66c1cf92f7 | ||
|
fbd63dafcc | ||
|
13f51f1521 | ||
|
5be014ef72 | ||
|
767e03b575 | ||
|
f41f564091 | ||
|
119a545ffc | ||
|
9d0a49fb4b | ||
|
82c9c00115 | ||
|
796204cd58 | ||
|
8d2626f0fd | ||
|
7e1a2a94ae | ||
|
2b2bdac371 | ||
|
d79c187fcd | ||
|
7df44a6215 | ||
|
19b3320a9f | ||
|
7dab1b3303 | ||
|
60646f63cc | ||
|
ef3b58f760 | ||
|
2160131d66 | ||
|
65beeabab5 | ||
|
08f7b36130 | ||
|
0ab8119bf2 | ||
|
fa9f794755 | ||
|
491f6af135 | ||
|
8565a58930 | ||
|
1ebccd440f | ||
|
62cba232e5 | ||
|
5407471378 | ||
|
88a826934c | ||
|
09ef00ec1c | ||
|
9649d061c6 | ||
|
3aae2b5775 | ||
|
5c018b446a | ||
|
cd5a6fe9d3 | ||
|
ea361d9d2c | ||
|
e703d536cc | ||
|
0cc5fdd394 | ||
|
f3157bc759 | ||
|
9ffa9958d8 | ||
|
dc73daa720 | ||
|
8887bed8b6 | ||
|
0b46add42e | ||
|
7429b91e4b | ||
|
0cab54fb46 | ||
|
300590e66d | ||
|
93fca713e6 | ||
|
c1e213a535 | ||
|
84710e742d | ||
|
5536480cde | ||
|
14b64e45c5 | ||
|
293173f1a8 | ||
|
4081526ba7 | ||
|
8b1ddef6a4 | ||
|
2fa1cc30c5 | ||
|
c7852861cf | ||
|
e1224f7bd0 | ||
|
4e8472ebbb | ||
|
8d007f3a1c | ||
|
c78457ff89 | ||
|
741acaec8f | ||
|
c0a970d7a8 | ||
|
e2dbd2a66b | ||
|
b3a866f0c9 | ||
|
47268f5533 | ||
|
57f8e6acd3 | ||
|
338391eacb | ||
|
973771c9d3 | ||
|
06514656f1 | ||
|
1b41df2c29 | ||
|
4ef86cacad | ||
|
b5bbc5041f | ||
|
c1d9107be8 | ||
|
3ec8d04c66 | ||
|
a10c57ca0a | ||
|
b405f14dfa | ||
|
499981160b | ||
|
285b78a4b4 | ||
|
4f6a244c70 | ||
|
fdcdb98f8d | ||
|
6d23bc3c1e | ||
|
5d6651be86 | ||
|
4c84e15d79 | ||
|
3f8ce1ad10 | ||
|
d37f5bedf1 | ||
|
586b4a9e37 | ||
|
413ac9895e | ||
|
203af0504b | ||
|
fa5b0a5a3e | ||
|
67fd838640 | ||
|
f373b657c5 | ||
|
1ecec8981c | ||
|
173ceeecd0 | ||
|
70ab4f8329 | ||
|
fc9260a0e5 | ||
|
2bef86c824 | ||
|
e861e7bffc | ||
|
c61cfb3e16 | ||
|
4114169f2c | ||
|
69a117b090 | ||
|
392b115870 | ||
|
2fd21d049a | ||
|
cde0e671a7 | ||
|
27adbcf125 | ||
|
00465c9a4b | ||
|
c6affb6a7e | ||
|
27350b7a77 | ||
|
bb2def3940 | ||
|
e77637b96e | ||
|
4dfa176aad | ||
|
cfdfa4ea1a | ||
|
2f4957fc3c | ||
|
fbeebdac7e | ||
|
bf93ade61c | ||
|
8fb1ea2a32 | ||
|
2f78d8c81c | ||
|
36ea3e54ec | ||
|
ea1346519a | ||
|
9fb0f37769 | ||
|
b74e8cfb22 | ||
|
a5c6e56adf | ||
|
023880275f | ||
|
462d4572d9 | ||
|
4f68b04b9c | ||
|
9c9c78be10 | ||
|
7a9c3efcec | ||
|
8ab62a9e0a | ||
|
04cac6936e | ||
|
d69e2df945 | ||
|
d951b66b45 | ||
|
3f414ad694 | ||
|
faef90cae0 | ||
|
bb63ae4647 | ||
|
8a690a0614 | ||
|
3d0ed18228 | ||
|
4b20e81132 | ||
|
9c53825afb | ||
|
3a72402097 | ||
|
d7fdd89030 | ||
|
13288521ec | ||
|
f967cc34d6 | ||
|
1fb3e99614 | ||
|
fc93ba2c0e | ||
|
332b98918c | ||
|
cc85e4fd05 | ||
|
85fbb033cf | ||
|
4e8af56ac1 | ||
|
24fdb77e8e | ||
|
87efdcc59d | ||
|
5c6a1b6268 | ||
|
e4d5abb00d | ||
|
7d5fd78c99 | ||
|
52e1cfd4f9 | ||
|
8960741927 | ||
|
6385f4b6ba | ||
|
b55cab10b1 | ||
|
1962c906b8 | ||
|
2da8f3324e | ||
|
6576ff9a05 | ||
|
d2d07e348f | ||
|
24cc552788 | ||
|
38d6f14c9b | ||
|
fa40172915 | ||
|
c8170941b9 | ||
|
9a02c8634e | ||
|
2c8ed3f1ea | ||
|
cf5fbff0a2 | ||
|
cda77e18f6 | ||
|
82730423e4 | ||
|
b9110f3fa3 | ||
|
f64a0200f6 | ||
|
3a450ce9bc | ||
|
b53da072e4 | ||
|
35f3c60956 | ||
|
e729187444 | ||
|
d75a5cc9d1 | ||
|
5912b88021 | ||
|
1096c222c5 | ||
|
452498f9bc | ||
|
662217d7e5 | ||
|
bd9ce36daa | ||
|
3768aadd98 | ||
|
564c363e9d | ||
|
b9cf0e6355 | ||
|
29052f08df | ||
|
0b93c1cd50 | ||
|
f5aa042f47 | ||
|
41aeb0d56b | ||
|
56885c203a | ||
|
6f837e8f82 | ||
|
7507056762 | ||
|
d99a7020e8 | ||
|
d2df455f79 | ||
|
b70d78d41c | ||
|
8e7544e059 | ||
|
c9bbacbbcc | ||
|
9319ae924c | ||
|
7d9d8fe624 | ||
|
93dc16c976 | ||
|
8dce2f16ee | ||
|
63a3a887f6 | ||
|
6764141650 | ||
|
e190a99be1 | ||
|
27bee8b23d | ||
|
7f48a879a2 | ||
|
4770351d7d | ||
|
0e7016a528 | ||
|
5805267164 | ||
|
1999bfc066 | ||
|
e20ee5ca00 | ||
|
e96f838644 | ||
|
4f354ea95a | ||
|
5679f19503 | ||
|
5d103ba1a9 | ||
|
3915eb48ae | ||
|
244dfe0711 | ||
|
24fc615353 | ||
|
64f835a291 | ||
|
a175a17761 | ||
|
0f3e734ef4 | ||
|
5761b6e2dc | ||
|
924ae9c404 | ||
|
5c03d681b2 | ||
|
bc257d4275 | ||
|
0b8afcfece | ||
|
b900125140 | ||
|
ebb2e0ecb6 | ||
|
18ad45afe6 | ||
|
5162ea9277 | ||
|
de06412668 | ||
|
354ea05067 | ||
|
d61d0795a1 | ||
|
0dbf2f171b | ||
|
f2a70398f2 | ||
|
379ec16b1e | ||
|
edd5f20c2a | ||
|
c6793efe93 | ||
|
61d2797a15 | ||
|
1932ef3294 | ||
|
e81501aed4 | ||
|
a730476b78 | ||
|
11482835c8 | ||
|
c41f8343d9 | ||
|
078e6212d3 | ||
|
1fe083b59a | ||
|
8f8da32d7e | ||
|
78a3ecd136 | ||
|
a843884d86 | ||
|
b5cd786bc1 | ||
|
4d1d384f52 | ||
|
3ec269b8d0 | ||
|
39c3569a36 | ||
|
2bf6516a7f | ||
|
20ebf826d2 | ||
|
24ede00c83 | ||
|
314f7e8fe5 | ||
|
3373bdfca6 | ||
|
f95576cd57 | ||
|
59c72ebc0e | ||
|
37b79596bb | ||
|
0d12944af5 | ||
|
61e25ee927 | ||
|
094f2fa534 | ||
|
c3d41e6cba | ||
|
6941d64884 | ||
|
71b7fcb7e9 | ||
|
456ece8064 | ||
|
97d4eddc43 | ||
|
1773c2e54c |
763 changed files with 46814 additions and 12966 deletions
221
.cproject
Normal file
221
.cproject
Normal file
|
@ -0,0 +1,221 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341">
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="luci" buildProperties="" description="" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341" name="Preference Configuration" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.407447051" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.407447051.1470931541" name=""/>
|
||||||
|
<builder id="org.eclipse.cdt.build.core.settings.default.builder.823611263" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1685234798" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.570824141" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.491129717" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.858094059" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.344617955" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.564526987" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1426860237" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.869454750" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.838425449" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include/lua5.1"/>
|
||||||
|
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1755775295" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341" moduleId="org.eclipse.cdt.core.settings" name="Preference Configuration">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1510318341">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="makefileGenerator">
|
||||||
|
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||||
|
<buildOutputProvider>
|
||||||
|
<openAction enabled="true" filePath=""/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</buildOutputProvider>
|
||||||
|
<scannerInfoProvider id="specsFile">
|
||||||
|
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||||
|
<parser enabled="true"/>
|
||||||
|
</scannerInfoProvider>
|
||||||
|
</profile>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="luci.null.949486034" name="luci"/>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
66
.project
66
.project
|
@ -5,8 +5,74 @@
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
<dictionary>
|
||||||
|
<key>?name?</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
|
||||||
|
<value>all</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||||
|
<value></value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||||
|
<value>make</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||||
|
<value>clean</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.contents</key>
|
||||||
|
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||||
|
<value>false</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
|
||||||
|
<value>all</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
<dictionary>
|
||||||
|
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||||
|
<value>true</value>
|
||||||
|
</dictionary>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
<nature>org.eclipse.dltk.lua.core.nature</nature>
|
<nature>org.eclipse.dltk.lua.core.nature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
10
INSTALL
10
INSTALL
|
@ -6,10 +6,10 @@ TOC:
|
||||||
|
|
||||||
|
|
||||||
1. Kamikaze Feed
|
1. Kamikaze Feed
|
||||||
1. Change to your OpenWRT buildroot
|
1. Change to your OpenWrt buildroot
|
||||||
|
|
||||||
2. Add the following line to your OpenWRT feeds.conf:
|
2. Add the following line to your OpenWrt feeds.conf:
|
||||||
src-svn luci https://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package
|
src-svn luci http://svn.luci.subsignal.org/luci/trunk/contrib/package
|
||||||
|
|
||||||
3. Run ./scripts/feeds update
|
3. Run ./scripts/feeds update
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ TOC:
|
||||||
2. Kamikaze Packages
|
2. Kamikaze Packages
|
||||||
1. cd to the "package" directory of your kamikaze buildroot
|
1. cd to the "package" directory of your kamikaze buildroot
|
||||||
|
|
||||||
3. Type: ln -s /path/to/ff-luci/contrib/package/* ./
|
3. Type: ln -s /path/to/luci/contrib/package/* ./
|
||||||
|
|
||||||
4. cd to your kamikaze build root and type: make menuconfig
|
4. cd to your kamikaze build root and type: make menuconfig
|
||||||
You will find luci in the menu "Administration"
|
You will find luci in the menu "Administration"
|
||||||
|
|
27
Makefile
27
Makefile
|
@ -1,6 +1,6 @@
|
||||||
include build/config.mk
|
include build/config.mk
|
||||||
|
|
||||||
MODULES = applications/* libs/* modules/* themes/* i18n/* contrib/*
|
MODULES = contrib/* applications/* libs/* modules/* themes/* i18n/*
|
||||||
|
|
||||||
OS:=$(shell uname)
|
OS:=$(shell uname)
|
||||||
export OS
|
export OS
|
||||||
|
@ -12,7 +12,7 @@ all: build
|
||||||
build: gccbuild luabuild
|
build: gccbuild luabuild
|
||||||
|
|
||||||
gccbuild:
|
gccbuild:
|
||||||
for i in $(MODULES); do make -C$$i compile; done
|
for i in $(MODULES); do make -C$$i compile; done
|
||||||
|
|
||||||
luabuild:
|
luabuild:
|
||||||
for i in $(MODULES); do make -C$$i luabuild; done
|
for i in $(MODULES); do make -C$$i luabuild; done
|
||||||
|
@ -29,23 +29,24 @@ gcchost: gccbuild hostcopy
|
||||||
luahost: luabuild hostcopy
|
luahost: luabuild hostcopy
|
||||||
|
|
||||||
hostcopy:
|
hostcopy:
|
||||||
mkdir -p host
|
mkdir -p host/tmp
|
||||||
for i in $(MODULES); do cp -a $$i/dist/* host/ -R 2>/dev/null || true; done
|
for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
|
||||||
for i in $(MODULES); do cp -a $$i/hostfiles/* host/ -R 2>/dev/null || true; done
|
for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
|
||||||
rm -f host/luci
|
rm -f host/luci
|
||||||
ln -s .$(LUCI_MODULEDIR) host/luci
|
ln -s .$(LUCI_MODULEDIR) host/luci
|
||||||
|
rm -rf /tmp/luci-* || true
|
||||||
|
|
||||||
hostenv: host ucidefaults
|
hostenv: host ucidefaults
|
||||||
|
|
||||||
ucidefaults:
|
ucidefaults:
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-community-*"
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
|
||||||
|
|
||||||
runboa: hostenv
|
runboa: hostenv
|
||||||
libs/sgi-webuci/host/buildconfig.sh $(realpath host) > host/etc/boa/boa.conf
|
libs/sgi-webuci/host/buildconfig.sh $(realpath host) > host/etc/boa/boa.conf
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/boa) -c $(realpath host/etc/boa) -d"
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/boa) -c $(realpath host/etc/boa) -d"
|
||||||
|
|
||||||
runhttpd: hostenv
|
runhttpd: hostenv
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/lucittpd) $(realpath host)/usr/lib/lucittpd/plugins"
|
||||||
|
|
||||||
runluci: luahost
|
runluci: luahost
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
|
||||||
|
@ -62,11 +63,21 @@ hostclean: clean
|
||||||
apidocs: hostenv
|
apidocs: hostenv
|
||||||
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
|
||||||
|
|
||||||
|
uvldocs: hostenv
|
||||||
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \
|
||||||
|
"build/uvldoc $(realpath host) $(UVL_SCHEMEDIR) uvldocs $(DOCS)"
|
||||||
|
|
||||||
|
po: host
|
||||||
|
for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
|
||||||
|
sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
|
||||||
|
build/i18n-lua2po.pl . $(realpath host)/po $$L; \
|
||||||
|
done
|
||||||
|
|
||||||
run:
|
run:
|
||||||
# make run is deprecated #
|
# make run is deprecated #
|
||||||
# Please use: #
|
# Please use: #
|
||||||
# #
|
# #
|
||||||
# To run LuCI WebUI using LuCI HTTPD #
|
# To run LuCI WebUI using LuCIttpd #
|
||||||
# make runhttpd #
|
# make runhttpd #
|
||||||
# #
|
# #
|
||||||
# To run LuCI WebUI using Boa/Webuci #
|
# To run LuCI WebUI using Boa/Webuci #
|
||||||
|
|
7
THANKYOU
7
THANKYOU
|
@ -3,11 +3,14 @@ I'd like to thank the following people for contributing to this software:
|
||||||
* Anton Popov
|
* Anton Popov
|
||||||
- for rewriting the openwrt.org theme
|
- for rewriting the openwrt.org theme
|
||||||
|
|
||||||
* Florian Fainelli (OpenWRT)
|
* Florian Fainelli (OpenWrt)
|
||||||
- for the french translation
|
- for the french translation
|
||||||
|
|
||||||
* Alina Friedrichsen
|
* Alina Friedrichsen
|
||||||
- for the reworked translation system, help on standards compliance and accessibility
|
- for the reworked translation system, help on standards compliance and accessibility
|
||||||
|
|
||||||
|
* Yanira
|
||||||
|
- several applications and bugreports
|
||||||
|
|
||||||
|
|
||||||
Also a big thank you goes to:
|
Also a big thank you goes to:
|
||||||
|
@ -19,5 +22,5 @@ Also a big thank you goes to:
|
||||||
- for donating several boards for testing and his feedback
|
- for donating several boards for testing and his feedback
|
||||||
|
|
||||||
* Mickey (Freifunk Hannover)
|
* Mickey (Freifunk Hannover)
|
||||||
- for his feedback and fixes for the OpenWRT builds
|
- for his feedback and fixes for the OpenWrt builds
|
||||||
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
|
||||||
( . /etc/uci-defaults/luci-community-augsburg ) && rm -f /etc/uci-defaults/luci-community-augsburg
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uci batch <<-EOF
|
|
||||||
set freifunk.community.name='Freifunk Augsburg'
|
|
||||||
set freifunk.community.homepage=http://augsburg.freifunk.net
|
|
||||||
set freifunk.community.essid=augsburg.freifunk.net
|
|
||||||
set freifunk.community.bssid=02:CA:FF:EE:BA:BE
|
|
||||||
set freifunk.community.channel=1
|
|
||||||
set freifunk.community.net=191.161.0.0
|
|
||||||
set freifunk.community.mask=255.255.0.0
|
|
||||||
set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
|
|
||||||
set luci.main.mediaurlbase=/luci-static/fledermaus
|
|
||||||
set luci.main.lang=de
|
|
||||||
commit freifunk
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
|
||||||
( . /etc/uci-defaults/luci-community-berlin ) && rm -f /etc/uci-defaults/luci-community-berlin
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uci batch <<-EOF
|
|
||||||
set freifunk.community.name='Freifunk Berlin'
|
|
||||||
set freifunk.community.homepage=http://berlin.freifunk.net
|
|
||||||
set freifunk.community.essid=olsr.freifunk.net
|
|
||||||
set freifunk.community.bssid=02:CA:FF:EE:BA:BE
|
|
||||||
set freifunk.community.channel=10
|
|
||||||
set freifunk.community.net=104.0.0.0
|
|
||||||
set freifunk.community.mask=255.0.0.0
|
|
||||||
set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
|
|
||||||
set luci.main.mediaurlbase=/luci-static/fledermaus
|
|
||||||
set luci.main.lang=de
|
|
||||||
commit freifunk
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
|
||||||
( . /etc/uci-defaults/luci-community-halle ) && rm -f /etc/uci-defaults/luci-community-halle
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uci batch <<-EOF
|
|
||||||
set freifunk.community.name='Freifunk Halle'
|
|
||||||
set freifunk.community.homepage=http://halle.freifunk.net
|
|
||||||
set freifunk.community.essid=halle.freifunk.net
|
|
||||||
set freifunk.community.bssid=02:CA:FF:EE:BA:BE
|
|
||||||
set freifunk.community.realm=pool.freifunk-halle.net
|
|
||||||
set freifunk.community.channel=1
|
|
||||||
set freifunk.community.net=104.0.0.0
|
|
||||||
set freifunk.community.mask=255.0.0.0
|
|
||||||
set freifunk.community.dhcp=10.0.0.0
|
|
||||||
set freifunk.community.dhcpmask=255.255.255.0
|
|
||||||
set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
|
|
||||||
set luci.main.mediaurlbase=/luci-static/fledermaus
|
|
||||||
set luci.main.lang=de
|
|
||||||
commit freifunk
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
|
||||||
( . /etc/uci-defaults/luci-community-hannover ) && rm -f /etc/uci-defaults/luci-community-hannover
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uci batch <<-EOF
|
|
||||||
set freifunk.community.name='Freifunk Hannover'
|
|
||||||
set freifunk.community.homepage=http://www.freifunk-hannover.de
|
|
||||||
set freifunk.community.essid=hannover.freifunk.net
|
|
||||||
set freifunk.community.bssid=CA:FF:EE:CA:FF:EE
|
|
||||||
set freifunk.community.realm=db.freifunk-hannover.de
|
|
||||||
set freifunk.community.channel=1
|
|
||||||
set freifunk.community.net=10.2.0.0
|
|
||||||
set freifunk.community.mask=255.255.0.0
|
|
||||||
set luci.main.mediaurlbase=/luci-static/fledermaus
|
|
||||||
set luci.main.lang=de
|
|
||||||
commit freifunk
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
[ -n "${IPKG_INSTROOT}" ] || {
|
|
||||||
( . /etc/uci-defaults/luci-community-leipzig ) && rm -f /etc/uci-defaults/luci-community-leipzig
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
uci batch <<-EOF
|
|
||||||
set freifunk.community.name='Freifunk Leipzig'
|
|
||||||
set freifunk.community.homepage=http://leipzig.freifunk.net
|
|
||||||
set freifunk.community.essid=leipzig.freifunk.net
|
|
||||||
set freifunk.community.bssid=02:CA:FF:EE:BA:BE
|
|
||||||
set freifunk.community.realm=db.leipzig.freifunk.net
|
|
||||||
set freifunk.community.channel=1
|
|
||||||
set freifunk.community.net=104.0.0.0
|
|
||||||
set freifunk.community.mask=255.0.0.0
|
|
||||||
set freifunk.community.dhcp=10.0.0.0
|
|
||||||
set freifunk.community.dhcpmask=255.255.255.0
|
|
||||||
set freifunk.community.dns='88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222'
|
|
||||||
set luci.main.mediaurlbase=/luci-static/fledermaus
|
|
||||||
set luci.main.lang=de
|
|
||||||
commit freifunk
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
|
|
10
applications/freifunk-community/htdocs/cgi-bin-nodes.html
Normal file
10
applications/freifunk-community/htdocs/cgi-bin-nodes.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; URL=/cgi-bin/luci/freifunk/olsr" />
|
||||||
|
</head>
|
||||||
|
<body style="background-color: black">
|
||||||
|
<a style="color: white; text-decoration: none" href="/cgi-bin/luci/freifunk/olsr">LuCI - Lua Configuration Interface</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
10
applications/freifunk-community/htdocs/cgi-bin-status.html
Normal file
10
applications/freifunk-community/htdocs/cgi-bin-status.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; URL=/cgi-bin/luci/freifunk/olsr" />
|
||||||
|
</head>
|
||||||
|
<body style="background-color: black">
|
||||||
|
<a style="color: white; text-decoration: none" href="/cgi-bin/luci/freifunk/olsr">LuCI - Lua Configuration Interface</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -17,7 +17,7 @@ module("luci.controller.ddns", package.seeall)
|
||||||
function index()
|
function index()
|
||||||
require("luci.i18n")
|
require("luci.i18n")
|
||||||
luci.i18n.loadc("ddns")
|
luci.i18n.loadc("ddns")
|
||||||
if not luci.fs.isfile("/etc/config/ddns") then
|
if not luci.fs.access("/etc/config/ddns") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function index()
|
||||||
page.dependent = true
|
page.dependent = true
|
||||||
|
|
||||||
|
|
||||||
local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddnsmini"), luci.i18n.translate("ddns"), 60)
|
local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddnsmini", {autoapply=true}), luci.i18n.translate("ddns"), 60)
|
||||||
page.i18n = "ddns"
|
page.i18n = "ddns"
|
||||||
page.dependent = true
|
page.dependent = true
|
||||||
end
|
end
|
8
applications/luci-ddns/luasrc/i18n/ddns.fr.lua
Normal file
8
applications/luci-ddns/luasrc/i18n/ddns.fr.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ddns = 'DNS Dynamique'
|
||||||
|
ddns_desc = 'Le DNS Dynamique permet au routeur d'être joint avec un nom d'hôte fixe bien que changeant dynamiquement d'adresse IP.'
|
||||||
|
ddns_service_ipsource = 'Source de l'adresse IP'
|
||||||
|
ddns_service_checkinterval = 'Vérifier l'adresse IP toutes les'
|
||||||
|
ddns_service_checkunit = 'Unité de temps'
|
||||||
|
ddns_service_forceinterval = 'Vérification forcée toutes les'
|
||||||
|
ddns_service_forceunit = 'Unité de temps'
|
||||||
|
ddns_service_updateurl = 'Url de mise à jour personnalisée'
|
13
applications/luci-ddns/luasrc/i18n/ddns.fr.xml
Normal file
13
applications/luci-ddns/luasrc/i18n/ddns.fr.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="ddns">DNS Dynamique</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_desc">Le DNS Dynamique permet au routeur d'être joint avec un nom d'hôte fixe bien que changeant dynamiquement d'adresse IP.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_ipsource">Source de l'adresse IP</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_checkinterval">Vérifier l'adresse IP toutes les</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_checkunit">Unité de temps</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_forceinterval">Vérification forcée toutes les</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_forceunit">Unité de temps</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_updateurl">Url de mise à jour personnalisée</i18n:msg>
|
||||||
|
</i18n:msgs>
|
8
applications/luci-ddns/luasrc/i18n/ddns.pt-br.lua
Normal file
8
applications/luci-ddns/luasrc/i18n/ddns.pt-br.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ddns = 'DNS Dinâmico'
|
||||||
|
ddns_desc = 'DNS dinâmico permite que o seu router possa ser encontrado a partir de um hostname fixo, mesmo usando um Endereço-IP dinâmico.'
|
||||||
|
ddns_service_ipsource = 'Origem do Endereço-IP'
|
||||||
|
ddns_service_checkinterval = 'Verificar a cada mudança de IP'
|
||||||
|
ddns_service_checkunit = 'Unidade de tempo para verificação'
|
||||||
|
ddns_service_forceinterval = 'Forçar atualização a cada'
|
||||||
|
ddns_service_forceunit = 'Unidade de tempo para atualização forçada'
|
||||||
|
ddns_service_updateurl = 'URL para atualização customizada'
|
13
applications/luci-ddns/luasrc/i18n/ddns.pt-br.xml
Normal file
13
applications/luci-ddns/luasrc/i18n/ddns.pt-br.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="ddns">DNS Dinâmico</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_desc">DNS dinâmico permite que o seu router possa ser encontrado a partir de um hostname fixo, mesmo usando um Endereço-IP dinâmico.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_ipsource">Origem do Endereço-IP</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_checkinterval">Verificar a cada mudança de IP</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_checkunit">Unidade de tempo para verificação</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_forceinterval">Forçar atualização a cada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_forceunit">Unidade de tempo para atualização forçada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ddns_service_updateurl">URL para atualização customizada</i18n:msg>
|
||||||
|
</i18n:msgs>
|
|
@ -31,7 +31,9 @@ svc:value("freedns.afraid.org")
|
||||||
|
|
||||||
s:option(Value, "domain", translate("hostname")).rmempty = true
|
s:option(Value, "domain", translate("hostname")).rmempty = true
|
||||||
s:option(Value, "username", translate("username")).rmempty = true
|
s:option(Value, "username", translate("username")).rmempty = true
|
||||||
s:option(Value, "password", translate("password")).rmempty = true
|
pw = s:option(Value, "password", translate("password"))
|
||||||
|
pw.rmempty = true
|
||||||
|
pw.password = true
|
||||||
|
|
||||||
src = s:option(ListValue, "ip_source")
|
src = s:option(ListValue, "ip_source")
|
||||||
src:value("network", translate("network"))
|
src:value("network", translate("network"))
|
||||||
|
@ -69,4 +71,4 @@ unit:value("minutes", "min")
|
||||||
unit:value("hours", "h")
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -29,7 +29,9 @@ svc:value("freedns.afraid.org")
|
||||||
|
|
||||||
s:option(Value, "domain", translate("hostname")).rmempty = true
|
s:option(Value, "domain", translate("hostname")).rmempty = true
|
||||||
s:option(Value, "username", translate("username")).rmempty = true
|
s:option(Value, "username", translate("username")).rmempty = true
|
||||||
s:option(Value, "password", translate("password")).rmempty = true
|
pw = s:option(Value, "password", translate("password"))
|
||||||
|
pw.rmempty = true
|
||||||
|
pw.password = true
|
||||||
|
|
||||||
s.defaults.ip_source = "network"
|
s.defaults.ip_source = "network"
|
||||||
s.defaults.ip_network = "wan"
|
s.defaults.ip_network = "wan"
|
||||||
|
@ -47,4 +49,4 @@ unit:value("minutes", "min")
|
||||||
unit:value("hours", "h")
|
unit:value("hours", "h")
|
||||||
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package ddns
|
package ddns
|
||||||
|
|
||||||
|
config package
|
||||||
|
option title 'Dynamic DNS configuration'
|
||||||
|
|
||||||
config section
|
config section
|
||||||
option name 'service'
|
option name 'service'
|
||||||
option title 'DynDNS service entry'
|
option title 'DynDNS service entry'
|
|
@ -17,5 +17,5 @@ $Id$
|
||||||
module "luci.controller.ffwizard"
|
module "luci.controller.ffwizard"
|
||||||
|
|
||||||
function index()
|
function index()
|
||||||
entry({"admin", "index", "ffwizard"}, form("ffwizard"), "Freifunkassistent", 50)
|
entry({"admin", "freifunk", "ffwizard"}, form("ffwizard"), "Freifunkassistent", 50)
|
||||||
end
|
end
|
|
@ -17,6 +17,8 @@ $Id$
|
||||||
|
|
||||||
local uci = require "luci.model.uci".cursor()
|
local uci = require "luci.model.uci".cursor()
|
||||||
local tools = require "luci.tools.ffwizard"
|
local tools = require "luci.tools.ffwizard"
|
||||||
|
local util = require "luci.util"
|
||||||
|
local sys = require "luci.sys"
|
||||||
|
|
||||||
|
|
||||||
-------------------- View --------------------
|
-------------------- View --------------------
|
||||||
|
@ -33,11 +35,13 @@ uci:foreach("wireless", "wifi-device",
|
||||||
|
|
||||||
main = f:field(Flag, "wifi", "Freifunkzugang einrichten")
|
main = f:field(Flag, "wifi", "Freifunkzugang einrichten")
|
||||||
|
|
||||||
net = f:field(Value, "net", "Freifunknetz")
|
net = f:field(Value, "net", "Freifunknetz", "1. Teil der IP-Adresse")
|
||||||
net.rmempty = true
|
net.rmempty = true
|
||||||
net:depends("wifi", "1")
|
net:depends("wifi", "1")
|
||||||
net:value("104.61", "Leipzig (104.61)")
|
uci:foreach("freifunk", "community", function(s)
|
||||||
net:value("104.62", "Halle (104.62)")
|
net:value(s[".name"], "%s (%s)" % {s.name, s.prefix})
|
||||||
|
end)
|
||||||
|
|
||||||
function net.cfgvalue(self, section)
|
function net.cfgvalue(self, section)
|
||||||
return uci:get("freifunk", "wizard", "net")
|
return uci:get("freifunk", "wizard", "net")
|
||||||
end
|
end
|
||||||
|
@ -47,12 +51,9 @@ function net.write(self, section, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
subnet = f:field(ListValue, "subnet", "Subnetz (Projekt)")
|
subnet = f:field(Value, "subnet", "Subnetz (Projekt)", "2. Teil der IP-Adresse")
|
||||||
subnet.rmempty = true
|
subnet.rmempty = true
|
||||||
subnet:depends("wifi", "1")
|
subnet:depends("wifi", "1")
|
||||||
for i=0, 255 do
|
|
||||||
subnet:value(i)
|
|
||||||
end
|
|
||||||
function subnet.cfgvalue(self, section)
|
function subnet.cfgvalue(self, section)
|
||||||
return uci:get("freifunk", "wizard", "subnet")
|
return uci:get("freifunk", "wizard", "subnet")
|
||||||
end
|
end
|
||||||
|
@ -61,7 +62,7 @@ function subnet.write(self, section, value)
|
||||||
uci:save("freifunk")
|
uci:save("freifunk")
|
||||||
end
|
end
|
||||||
|
|
||||||
node = f:field(Value, "node", "Knoten")
|
node = f:field(Value, "node", "Knoten", "3. Teil der IP-Adresse")
|
||||||
node.rmempty = true
|
node.rmempty = true
|
||||||
node:depends("wifi", "1")
|
node:depends("wifi", "1")
|
||||||
for i=1, 51 do
|
for i=1, 51 do
|
||||||
|
@ -77,14 +78,19 @@ end
|
||||||
|
|
||||||
client = f:field(Flag, "client", "WLAN-DHCP anbieten")
|
client = f:field(Flag, "client", "WLAN-DHCP anbieten")
|
||||||
client:depends("wifi", "1")
|
client:depends("wifi", "1")
|
||||||
|
client.rmempty = true
|
||||||
|
|
||||||
olsr = f:field(Flag, "olsr", "OLSR einrichten")
|
olsr = f:field(Flag, "olsr", "OLSR einrichten")
|
||||||
|
olsr.rmempty = true
|
||||||
|
|
||||||
share = f:field(ListValue, "sharenet", "Eigenen Internetzugang freigeben")
|
lat = f:field(Value, "lat", "Latitude")
|
||||||
share:value("maybe", "-- keine Aktion --")
|
lat:depends("olsr", "1")
|
||||||
share:value("yes", "einschalten")
|
|
||||||
share:value("no", "ausschalten")
|
lon = f:field(Value, "lon", "Longitude")
|
||||||
|
lon:depends("olsr", "1")
|
||||||
|
|
||||||
|
share = f:field(Flag, "sharenet", "Eigenen Internetzugang freigeben")
|
||||||
|
share.rmempty = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,17 +120,22 @@ function main.write(self, section, value)
|
||||||
if value == "0" then
|
if value == "0" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local device = dev:formvalue(section)
|
local device = dev:formvalue(section)
|
||||||
|
local community, external
|
||||||
|
|
||||||
-- Collect IP-Address
|
-- Collect IP-Address
|
||||||
local inet = net:formvalue(section)
|
local inet = net:formvalue(section)
|
||||||
local isubnet = subnet:formvalue(section)
|
local isubnet = subnet:formvalue(section)
|
||||||
local inode = node:formvalue(section)
|
local inode = node:formvalue(section)
|
||||||
|
|
||||||
-- Invalidate fields
|
-- Invalidate fields
|
||||||
if not inet then
|
if not inet then
|
||||||
net.tag_missing[section] = true
|
net.tag_missing[section] = true
|
||||||
|
else
|
||||||
|
community = inet
|
||||||
|
external = uci:get("freifunk", community, "external") or ""
|
||||||
|
inet = uci:get("freifunk", community, "prefix") or inet
|
||||||
end
|
end
|
||||||
if not isubnet then
|
if not isubnet then
|
||||||
subnet.tag_missing[section] = true
|
subnet.tag_missing[section] = true
|
||||||
|
@ -132,58 +143,119 @@ function main.write(self, section, value)
|
||||||
if not inode then
|
if not inode then
|
||||||
node.tag_missing[section] = true
|
node.tag_missing[section] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if not inet or not isubnet or not inode then
|
if not inet or not isubnet or not inode then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local ip = "%s.%s.%s" % {inet, isubnet, inode}
|
local ip = "%s.%s.%s" % {inet, isubnet, inode}
|
||||||
|
|
||||||
|
|
||||||
-- Cleanup
|
-- Cleanup
|
||||||
luci.util.perror("1")
|
|
||||||
tools.wifi_delete_ifaces(device)
|
tools.wifi_delete_ifaces(device)
|
||||||
luci.util.perror("2")
|
|
||||||
tools.network_remove_interface(device)
|
tools.network_remove_interface(device)
|
||||||
luci.util.perror("3")
|
|
||||||
tools.firewall_zone_remove_interface("freifunk", device)
|
tools.firewall_zone_remove_interface("freifunk", device)
|
||||||
|
|
||||||
|
-- Tune community settings
|
||||||
|
if community and uci:get("freifunk", community) then
|
||||||
|
uci:tset("freifunk", "community", uci:get_all("freifunk", community))
|
||||||
|
end
|
||||||
|
|
||||||
-- Tune wifi device
|
-- Tune wifi device
|
||||||
local devconfig = _strip_internals(uci:get_all("freifunk", "wifi_device"))
|
local devconfig = uci:get_all("freifunk", "wifi_device")
|
||||||
|
util.update(devconfig, uci:get_all(external, "wifi_device") or {})
|
||||||
uci:tset("wireless", device, devconfig)
|
uci:tset("wireless", device, devconfig)
|
||||||
|
|
||||||
-- Create wifi iface
|
-- Create wifi iface
|
||||||
local ifconfig = _strip_internals(uci:get_all("freifunk", "wifi_iface"))
|
local ifconfig = uci:get_all("freifunk", "wifi_iface")
|
||||||
|
util.update(ifconfig, uci:get_all(external, "wifi_iface") or {})
|
||||||
ifconfig.device = device
|
ifconfig.device = device
|
||||||
|
ifconfig.network = device
|
||||||
|
ifconfig.ssid = uci:get("freifunk", community, "ssid")
|
||||||
uci:section("wireless", "wifi-iface", nil, ifconfig)
|
uci:section("wireless", "wifi-iface", nil, ifconfig)
|
||||||
|
|
||||||
-- Save wifi
|
-- Save wifi
|
||||||
uci:save("wireless")
|
uci:save("wireless")
|
||||||
|
|
||||||
-- Create firewall zone and add default rules (first time)
|
-- Create firewall zone and add default rules (first time)
|
||||||
local newzone = tools.firewall_create_zone("freifunk", "DROP", "ACCEPT", "DROP", true)
|
local newzone = tools.firewall_create_zone("freifunk", "REJECT", "ACCEPT", "REJECT", true)
|
||||||
if newzone then
|
if newzone then
|
||||||
uci:foreach("freifunk", "fw_forwarding", function(section)
|
uci:foreach("freifunk", "fw_forwarding", function(section)
|
||||||
uci:section("firewall", "forwarding", nil, _strip_internals(section))
|
uci:section("firewall", "forwarding", nil, section)
|
||||||
end)
|
end)
|
||||||
|
uci:foreach(external, "fw_forwarding", function(section)
|
||||||
|
uci:section("firewall", "forwarding", nil, section)
|
||||||
|
end)
|
||||||
|
|
||||||
uci:foreach("freifunk", "fw_rule", function(section)
|
uci:foreach("freifunk", "fw_rule", function(section)
|
||||||
uci:section("firewall", "rule", nil, _strip_internals(section))
|
uci:section("firewall", "rule", nil, section)
|
||||||
|
end)
|
||||||
|
uci:foreach(external, "fw_rule", function(section)
|
||||||
|
uci:section("firewall", "rule", nil, section)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
uci:save("firewall")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Enforce firewall include
|
||||||
-- Crate network interface
|
local has_include = false
|
||||||
local netconfig = _strip_internals(uci:get_all("freifunk", "interface"))
|
uci:foreach("firewall", "include",
|
||||||
|
function(section)
|
||||||
|
if section.path == "/etc/firewall.freifunk" then
|
||||||
|
has_include = true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not has_include then
|
||||||
|
uci:section("firewall", "include", nil,
|
||||||
|
{ path = "/etc/firewall.freifunk" })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Allow state: invalid packets
|
||||||
|
uci:foreach("firewall", "defaults",
|
||||||
|
function(section)
|
||||||
|
uci:set("firewall", section[".name"], "drop_invalid", "0")
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Prepare advanced config
|
||||||
|
local has_advanced = false
|
||||||
|
uci:foreach("firewall", "advanced",
|
||||||
|
function(section) has_advanced = true end)
|
||||||
|
|
||||||
|
if not has_advanced then
|
||||||
|
uci:section("firewall", "advanced", nil,
|
||||||
|
{ tcp_ecn = "0", ip_conntrack_max = "8192", tcp_westwood = "1" })
|
||||||
|
end
|
||||||
|
|
||||||
|
uci:save("firewall")
|
||||||
|
|
||||||
|
|
||||||
|
-- Create network interface
|
||||||
|
local netconfig = uci:get_all("freifunk", "interface")
|
||||||
|
util.update(netconfig, uci:get_all(external, "interface") or {})
|
||||||
|
netconfig.proto = "static"
|
||||||
netconfig.ipaddr = ip
|
netconfig.ipaddr = ip
|
||||||
uci:section("network", "interface", device, netconfig)
|
uci:section("network", "interface", device, netconfig)
|
||||||
|
|
||||||
uci:save("network")
|
uci:save("network")
|
||||||
|
|
||||||
tools.firewall_zone_add_interface("freifunk", device)
|
tools.firewall_zone_add_interface("freifunk", device)
|
||||||
|
|
||||||
|
|
||||||
|
local new_hostname = ip:gsub("%.", "-")
|
||||||
|
local old_hostname = sys.hostname()
|
||||||
|
|
||||||
|
uci:foreach("system", "system",
|
||||||
|
function(s)
|
||||||
|
-- Make crond silent
|
||||||
|
uci:set("system", s['.name'], "cronloglevel", "10")
|
||||||
|
|
||||||
|
-- Set hostname
|
||||||
|
if old_hostname == "OpenWrt" or old_hostname:match("^%d+-%d+-%d+-%d+$") then
|
||||||
|
uci:set("system", s['.name'], "hostname", new_hostname)
|
||||||
|
sys.hostname(new_hostname)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
uci:save("system")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,31 +263,86 @@ function olsr.write(self, section, value)
|
||||||
if value == "0" then
|
if value == "0" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local device = dev:formvalue(section)
|
local device = dev:formvalue(section)
|
||||||
|
|
||||||
|
local community = net:formvalue(section)
|
||||||
|
local external = community and uci:get("freifunk", community, "external") or ""
|
||||||
|
|
||||||
|
local latval = tonumber(lat:formvalue(section))
|
||||||
|
local lonval = tonumber(lon:formvalue(section))
|
||||||
|
|
||||||
|
|
||||||
-- Delete old interface
|
-- Delete old interface
|
||||||
uci:delete_all("freifunk", "Interface", {Interface=device})
|
uci:delete_all("olsrd", "Interface", {interface=device})
|
||||||
|
|
||||||
-- Write new interface
|
-- Write new interface
|
||||||
local olsrbase = _strip_internals(uci:get_all("freifunk", "olsr_interface"))
|
local olsrbase = uci:get_all("freifunk", "olsr_interface")
|
||||||
olsrbase.Interface = device
|
util.update(olsrbase, uci:get_all(external, "olsr_interface") or {})
|
||||||
uci:section("olsr", "Interface", nil, olsrbase)
|
olsrbase.interface = device
|
||||||
uci:save("olsr")
|
olsrbase.ignore = "0"
|
||||||
|
uci:section("olsrd", "Interface", nil, olsrbase)
|
||||||
|
|
||||||
|
-- Delete old watchdog settings
|
||||||
|
uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_watchdog.so.0.1"})
|
||||||
|
|
||||||
|
-- Write new watchdog settings
|
||||||
|
uci:section("olsrd", "LoadPlugin", nil, {
|
||||||
|
library = "olsrd_watchdog.so.0.1",
|
||||||
|
file = "/var/run/olsrd.watchdog",
|
||||||
|
interval = "30"
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Delete old nameservice settings
|
||||||
|
uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_nameservice.so.0.3"})
|
||||||
|
|
||||||
|
-- Write new nameservice settings
|
||||||
|
uci:section("olsrd", "LoadPlugin", nil, {
|
||||||
|
library = "olsrd_nameservice.so.0.3",
|
||||||
|
suffix = ".olsr",
|
||||||
|
hosts_file = "/var/etc/hosts.olsr",
|
||||||
|
latlon_file = "/var/run/latlon.js",
|
||||||
|
lat = latval and string.format("%.15f", latval) or "",
|
||||||
|
lon = lonval and string.format("%.15f", lonval) or ""
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Save latlon to system too
|
||||||
|
if latval and lonval then
|
||||||
|
uci:foreach("system", "system", function(s)
|
||||||
|
uci:set("system", s[".name"], "latlon",
|
||||||
|
string.format("%.15f %.15f", latval, lonval))
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
uci:foreach("system", "system", function(s)
|
||||||
|
uci:delete("system", s[".name"], "latlon")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Import hosts
|
||||||
|
uci:foreach("dhcp", "dnsmasq", function(s)
|
||||||
|
uci:set("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr")
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Make sure that OLSR is enabled
|
||||||
|
sys.exec("/etc/init.d/olsrd enable")
|
||||||
|
|
||||||
|
uci:save("olsrd")
|
||||||
|
uci:save("dhcp")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function share.write(self, section, value)
|
function share.write(self, section, value)
|
||||||
if value == "maybe" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
uci:delete_all("firewall", "forwarding", {src="freifunk", dest="wan"})
|
uci:delete_all("firewall", "forwarding", {src="freifunk", dest="wan"})
|
||||||
|
uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw_plain.so.0.4"})
|
||||||
if value == "yes" then
|
|
||||||
|
if value == "1" then
|
||||||
uci:section("firewall", "forwarding", nil, {src="freifunk", dest="wan"})
|
uci:section("firewall", "forwarding", nil, {src="freifunk", dest="wan"})
|
||||||
|
uci:section("olsrd", "LoadPlugin", nil, {library="olsrd_dyn_gw_plain.so.0.4"})
|
||||||
end
|
end
|
||||||
uci:save("firewall")
|
uci:save("firewall")
|
||||||
|
uci:save("olsrd")
|
||||||
|
uci:save("system")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -223,50 +350,96 @@ function client.write(self, section, value)
|
||||||
if value == "0" then
|
if value == "0" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local device = dev:formvalue(section)
|
local device = dev:formvalue(section)
|
||||||
|
|
||||||
-- Collect IP-Address
|
-- Collect IP-Address
|
||||||
local inet = net:formvalue(section)
|
local inet = net:formvalue(section)
|
||||||
local isubnet = subnet:formvalue(section)
|
local isubnet = subnet:formvalue(section)
|
||||||
local inode = node:formvalue(section)
|
local inode = node:formvalue(section)
|
||||||
|
|
||||||
if not inet or not isubnet or not inode then
|
if not inet or not isubnet or not inode then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local community = inet
|
||||||
local dhcpbeg = 48 + tonumber(inode) * 4
|
local external = community and uci:get("freifunk", community, "external") or ""
|
||||||
|
inet = uci:get("freifunk", community, "prefix") or inet
|
||||||
|
|
||||||
|
local dhcpbeg = 48 + tonumber(inode) * 4
|
||||||
local dclient = "%s.%s.%s" % {inet:gsub("^[0-9]+", "10"), isubnet, dhcpbeg}
|
local dclient = "%s.%s.%s" % {inet:gsub("^[0-9]+", "10"), isubnet, dhcpbeg}
|
||||||
local limit = dhcpbeg < 252 and 3 or 2
|
local limit = dhcpbeg < 252 and 3 or 2
|
||||||
|
|
||||||
-- Delete old alias
|
-- Delete old alias
|
||||||
uci:delete("network", device .. "dhcp")
|
uci:delete("network", device .. "dhcp")
|
||||||
|
|
||||||
-- Create alias
|
-- Create alias
|
||||||
local aliasbase = _strip_internals(uci:get_all("freifunk", "alias"))
|
local aliasbase = uci:get_all("freifunk", "alias")
|
||||||
|
util.update(aliasbase, uci:get_all(external, "alias") or {})
|
||||||
aliasbase.interface = device
|
aliasbase.interface = device
|
||||||
aliasbase.ipaddr = dclient
|
aliasbase.ipaddr = dclient
|
||||||
aliasbase.proto = "static"
|
aliasbase.proto = "static"
|
||||||
uci:section("network", "alias", device .. "dhcp", aliasbase)
|
uci:section("network", "alias", device .. "dhcp", aliasbase)
|
||||||
uci:save("network")
|
uci:save("network")
|
||||||
|
|
||||||
|
|
||||||
-- Create dhcp
|
-- Create dhcp
|
||||||
local dhcpbase = _strip_internals(uci:get_all("freifunk", "dhcp"))
|
local dhcpbase = uci:get_all("freifunk", "dhcp")
|
||||||
|
util.update(dhcpbase, uci:get_all(external, "dhcp") or {})
|
||||||
dhcpbase.interface = device .. "dhcp"
|
dhcpbase.interface = device .. "dhcp"
|
||||||
dhcpbase.start = dhcpbeg
|
dhcpbase.start = dhcpbeg
|
||||||
dhcpbase.limit = limit
|
dhcpbase.limit = limit
|
||||||
|
dhcpbase.force = 1
|
||||||
|
|
||||||
uci:section("dhcp", "dhcp", device .. "dhcp", dhcpbase)
|
uci:section("dhcp", "dhcp", device .. "dhcp", dhcpbase)
|
||||||
uci:save("dhcp")
|
uci:save("dhcp")
|
||||||
|
|
||||||
|
uci:delete_all("firewall", "rule", {
|
||||||
|
src="freifunk",
|
||||||
|
proto="udp",
|
||||||
|
dest_port="53"
|
||||||
|
})
|
||||||
|
uci:section("firewall", "rule", nil, {
|
||||||
|
src="freifunk",
|
||||||
|
proto="udp",
|
||||||
|
dest_port="53",
|
||||||
|
target="ACCEPT"
|
||||||
|
})
|
||||||
|
uci:delete_all("firewall", "rule", {
|
||||||
|
src="freifunk",
|
||||||
|
proto="udp",
|
||||||
|
src_port="68",
|
||||||
|
dest_port="67"
|
||||||
|
})
|
||||||
|
uci:section("firewall", "rule", nil, {
|
||||||
|
src="freifunk",
|
||||||
|
proto="udp",
|
||||||
|
src_port="68",
|
||||||
|
dest_port="67",
|
||||||
|
target="ACCEPT"
|
||||||
|
})
|
||||||
|
uci:delete_all("firewall", "rule", {
|
||||||
|
src="freifunk",
|
||||||
|
proto="tcp",
|
||||||
|
dest_port="8082",
|
||||||
|
})
|
||||||
|
uci:section("firewall", "rule", nil, {
|
||||||
|
src="freifunk",
|
||||||
|
proto="tcp",
|
||||||
|
dest_port="8082",
|
||||||
|
target="ACCEPT"
|
||||||
|
})
|
||||||
|
|
||||||
|
uci:save("firewall")
|
||||||
|
|
||||||
-- Delete old splash
|
-- Delete old splash
|
||||||
uci:delete_all("luci_splash", "iface", {net=device, zone="freifunk"})
|
uci:delete_all("luci_splash", "iface", {network=device.."dhcp", zone="freifunk"})
|
||||||
|
|
||||||
-- Register splash
|
-- Register splash
|
||||||
uci:section("luci_splash", "iface", nil, {net=device, zone="freifunk"})
|
uci:section("luci_splash", "iface", nil, {network=device.."dhcp", zone="freifunk"})
|
||||||
uci:save("luci_splash")
|
uci:save("luci_splash")
|
||||||
|
|
||||||
|
-- Make sure that luci_splash is enabled
|
||||||
|
sys.exec("/etc/init.d/luci_splash enable")
|
||||||
end
|
end
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
|
@ -32,35 +32,35 @@ end
|
||||||
-- Deletes a network interface and all occurences of it in firewall zones and dhcp
|
-- Deletes a network interface and all occurences of it in firewall zones and dhcp
|
||||||
function network_remove_interface(iface)
|
function network_remove_interface(iface)
|
||||||
local cursor = uci.cursor()
|
local cursor = uci.cursor()
|
||||||
|
|
||||||
if not cursor:delete("network", iface) then
|
if not cursor:delete("network", iface) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local aliases = {iface}
|
local aliases = {iface}
|
||||||
cursor:foreach("network", "alias",
|
cursor:foreach("network", "alias",
|
||||||
function(section)
|
function(section)
|
||||||
if section.interface == iface then
|
if section.interface == iface then
|
||||||
table.insert(aliases, section[".name"])
|
table.insert(aliases, section[".name"])
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Delete Aliases and Routes
|
-- Delete Aliases and Routes
|
||||||
cursor:delete_all("network", "route", {interface=iface})
|
cursor:delete_all("network", "route", {interface=iface})
|
||||||
cursor:delete_all("network", "alias", {interface=iface})
|
cursor:delete_all("network", "alias", {interface=iface})
|
||||||
|
|
||||||
-- Delete DHCP sections
|
-- Delete DHCP sections
|
||||||
cursor:delete_all("dhcp", "dhcp",
|
cursor:delete_all("dhcp", "dhcp",
|
||||||
function(section)
|
function(section)
|
||||||
return util.contains(aliases, section.interface)
|
return util.contains(aliases, section.interface)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Remove OLSR sections
|
-- Remove OLSR sections
|
||||||
cursor:delete_all("olsr", "Interface", {Interface=iface})
|
cursor:delete_all("olsrd", "Interface", {Interface=iface})
|
||||||
|
|
||||||
-- Remove Splash sections
|
-- Remove Splash sections
|
||||||
cursor:delete_all("luci-splash", "iface", {network=iface})
|
cursor:delete_all("luci-splash", "iface", {network=iface})
|
||||||
|
|
||||||
cursor:save("network")
|
cursor:save("network")
|
||||||
cursor:save("olsr")
|
cursor:save("olsr")
|
||||||
cursor:save("dhcp")
|
cursor:save("dhcp")
|
||||||
|
@ -88,7 +88,8 @@ function firewall_zone_add_interface(name, interface)
|
||||||
local cursor = uci.cursor()
|
local cursor = uci.cursor()
|
||||||
local zone = firewall_find_zone(name)
|
local zone = firewall_find_zone(name)
|
||||||
local net = cursor:get("firewall", zone, "network")
|
local net = cursor:get("firewall", zone, "network")
|
||||||
cursor:set("firewall", zone, "network", (net or name .. " ") .. interface)
|
local old = net or (cursor:get("network", name) and name)
|
||||||
|
cursor:set("firewall", zone, "network", (old and old .. " " or "") .. interface)
|
||||||
cursor:save("firewall")
|
cursor:save("firewall")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -114,14 +115,14 @@ end
|
||||||
-- Finds the firewall zone with given name
|
-- Finds the firewall zone with given name
|
||||||
function firewall_find_zone(name)
|
function firewall_find_zone(name)
|
||||||
local find
|
local find
|
||||||
|
|
||||||
uci.cursor():foreach("firewall", "zone",
|
uci.cursor():foreach("firewall", "zone",
|
||||||
function (section)
|
function (section)
|
||||||
if section.name == name then
|
if section.name == name then
|
||||||
find = section[".name"]
|
find = section[".name"]
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return find
|
return find
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -134,15 +135,15 @@ function remove_list_entry(value, entry)
|
||||||
if type(value) == "nil" then
|
if type(value) == "nil" then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local result = type(value) == "table" and value or util.split(value, " ")
|
local result = type(value) == "table" and value or util.split(value, " ")
|
||||||
local key = util.contains(result, entry)
|
local key = util.contains(result, entry)
|
||||||
|
|
||||||
while key do
|
while key do
|
||||||
table.remove(result, key)
|
table.remove(result, key)
|
||||||
key = util.contains(result, entry)
|
key = util.contains(result, entry)
|
||||||
end
|
end
|
||||||
|
|
||||||
result = type(value) == "table" and result or table.concat(result, " ")
|
result = type(value) == "table" and result or table.concat(result, " ")
|
||||||
return result ~= value and result
|
return result ~= value and result
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,20 +3,11 @@ module("luci.controller.luci_fw.luci_fw", package.seeall)
|
||||||
function index()
|
function index()
|
||||||
require("luci.i18n").loadc("luci-fw")
|
require("luci.i18n").loadc("luci-fw")
|
||||||
local i18n = luci.i18n.translate
|
local i18n = luci.i18n.translate
|
||||||
|
|
||||||
local nodes = {}
|
|
||||||
|
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60))
|
entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60).i18n = "luci-fw"
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/general"), i18n("fw_zones"), 10))
|
entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/zones"), i18n("fw_zones"), 10)
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall", "portfw"}, cbi("luci_fw/portfw"), i18n("fw_portfw"), 20))
|
entry({"admin", "network", "firewall", "redirect"}, arcombine(cbi("luci_fw/redirect"), cbi("luci_fw/rrule")), i18n("fw_redirect"), 30).leaf = true
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall", "forwarding"}, cbi("luci_fw/routing"), i18n("fw_forwarding"), 30))
|
entry({"admin", "network", "firewall", "rule"}, arcombine(cbi("luci_fw/traffic"), cbi("luci_fw/trule")), i18n("fw_traffic"), 20).leaf = true
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall", "rules"}, cbi("luci_fw/firewall"), i18n("fw_rules"), 40))
|
|
||||||
table.insert(nodes, entry({"admin", "network", "firewall", "customfwd"}, cbi("luci_fw/customfwd"), i18n("fw_custfwd"), 50))
|
|
||||||
|
|
||||||
table.insert(nodes, entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw"), i18n("fw_portfw", "Portweiterleitung"), 70))
|
entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), i18n("fw_portfw", "Portweiterleitung"), 70).i18n = "luci-fw"
|
||||||
|
|
||||||
for i,n in ipairs(nodes) do
|
|
||||||
n.i18n = "luci-fw"
|
|
||||||
n.dependent = true
|
|
||||||
end
|
|
||||||
end
|
end
|
|
@ -1,12 +1,19 @@
|
||||||
fw_portfw = 'Portweiterleitung'
|
fw_portfw = 'Portweiterleitung'
|
||||||
fw_forwarding = 'Weiterleitung'
|
fw_redirect = 'Umleitungen'
|
||||||
|
fw_redirect_desc = 'Umleitungen erlauben es das Ziel von weitergeleiteten Paketen zu verändern.'
|
||||||
|
fw_forwarding = 'Zone-zu-Zone Verkehr'
|
||||||
fw_fw = 'Firewall'
|
fw_fw = 'Firewall'
|
||||||
fw_zone = 'Zone'
|
fw_zone = 'Zone'
|
||||||
fw_zones = 'Zonen'
|
fw_zones = 'Zonen'
|
||||||
fw_custfwd = 'Eigene Weiterleitungen'
|
fw_custfwd = 'Erweiterte Weiterleitung'
|
||||||
fw_rules = 'Eigene Regeln'
|
firewall_rule = 'Erweiterte Regeln'
|
||||||
fw_rules1 = 'An dieser Stelle können benutzerdefinierte Firewallregeln eingestellt werden um den Netzverkehr zu kontrollieren.'
|
firewall_rule_desc = 'Mit erweiterten Regeln kann die Firewall an die eigenen Bedürfnisse angepasst werden. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.'
|
||||||
fw_fw1 = 'Die Firewall erstellt Netzwerkzonen über bestimmte Netzwerkschnittstellen um den Netzverkehr zu trennen.'
|
fw_fw1 = 'Die Firewall erstellt Netzwerkzonen über bestimmte Netzwerkschnittstellen um den Netzverkehr zu trennen.'
|
||||||
|
fw_src = 'Quelle'
|
||||||
|
fw_dest = 'Ziel'
|
||||||
|
fw_traffic = 'Verkehrskontrolle'
|
||||||
|
fw_mtufix = 'MSS Clamping'
|
||||||
|
fw_dropinvalid = 'Ungültige Pakete verwerfen'
|
||||||
firewall_rule_src = 'Eingangszone'
|
firewall_rule_src = 'Eingangszone'
|
||||||
firewall_rule_dest = 'Ausgangszone'
|
firewall_rule_dest = 'Ausgangszone'
|
||||||
firewall_rule_srcip = 'Quelladresse'
|
firewall_rule_srcip = 'Quelladresse'
|
||||||
|
@ -26,7 +33,9 @@ firewall_redirect_destip = 'Interne Adresse'
|
||||||
firewall_redirect_destip_desc = 'IP-Adresse'
|
firewall_redirect_destip_desc = 'IP-Adresse'
|
||||||
firewall_redirect_destport = 'Interner Port (optional)'
|
firewall_redirect_destport = 'Interner Port (optional)'
|
||||||
firewall_redirect_destport_desc = 'Port od. Erster-Letzter Port'
|
firewall_redirect_destport_desc = 'Port od. Erster-Letzter Port'
|
||||||
fw_forwarding1 = 'An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.'
|
firewall_redirect_srcip = 'Quelladresse'
|
||||||
|
firewall_redirect_srcmac = 'Quell-MAC-Adresse'
|
||||||
|
fw_forwarding1 = 'An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert. Bei gelegentlich auftretenden Verbindungsproblemen kann MSS Clamping helfen, ansonsten sollte dies aus Performancegründen deaktiviert bleiben.'
|
||||||
firewall_forwarding_src = 'Eingang'
|
firewall_forwarding_src = 'Eingang'
|
||||||
firewall_forwarding_dest = 'Ausgang'
|
firewall_forwarding_dest = 'Ausgang'
|
||||||
firewall_defaults = 'Grundeinstellungen'
|
firewall_defaults = 'Grundeinstellungen'
|
||||||
|
|
|
@ -3,14 +3,21 @@
|
||||||
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<i18n:msg xml:id="fw_portfw">Portweiterleitung</i18n:msg>
|
<i18n:msg xml:id="fw_portfw">Portweiterleitung</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_forwarding">Weiterleitung</i18n:msg>
|
<i18n:msg xml:id="fw_redirect">Umleitungen</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect_desc">Umleitungen erlauben es das Ziel von weitergeleiteten Paketen zu verändern.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_forwarding">Zone-zu-Zone Verkehr</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_fw">Firewall</i18n:msg>
|
<i18n:msg xml:id="fw_fw">Firewall</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_zone">Zone</i18n:msg>
|
<i18n:msg xml:id="fw_zone">Zone</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_zones">Zonen</i18n:msg>
|
<i18n:msg xml:id="fw_zones">Zonen</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_custfwd">Eigene Weiterleitungen</i18n:msg>
|
<i18n:msg xml:id="fw_custfwd">Erweiterte Weiterleitung</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_rules">Eigene Regeln</i18n:msg>
|
<i18n:msg xml:id="firewall_rule">Erweiterte Regeln</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_rules1">An dieser Stelle können benutzerdefinierte Firewallregeln eingestellt werden um den Netzverkehr zu kontrollieren.</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_desc">Mit erweiterten Regeln kann die Firewall an die eigenen Bedürfnisse angepasst werden. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_fw1">Die Firewall erstellt Netzwerkzonen über bestimmte Netzwerkschnittstellen um den Netzverkehr zu trennen.</i18n:msg>
|
<i18n:msg xml:id="fw_fw1">Die Firewall erstellt Netzwerkzonen über bestimmte Netzwerkschnittstellen um den Netzverkehr zu trennen.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_src">Quelle</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dest">Ziel</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_traffic">Verkehrskontrolle</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_mtufix">MSS Clamping</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dropinvalid">Ungültige Pakete verwerfen</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_src">Eingangszone</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_src">Eingangszone</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_dest">Ausgangszone</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_dest">Ausgangszone</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_srcip">Quelladresse</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_srcip">Quelladresse</i18n:msg>
|
||||||
|
@ -31,8 +38,11 @@
|
||||||
<i18n:msg xml:id="firewall_redirect_destip_desc">IP-Adresse</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destip_desc">IP-Adresse</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destport">Interner Port (optional)</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destport">Interner Port (optional)</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destport_desc">Port od. Erster-Letzter Port</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destport_desc">Port od. Erster-Letzter Port</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcip">Quelladresse</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcmac">Quell-MAC-Adresse</i18n:msg>
|
||||||
|
|
||||||
<i18n:msg xml:id="fw_forwarding1">An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.</i18n:msg>
|
|
||||||
|
<i18n:msg xml:id="fw_forwarding1">An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert. Bei gelegentlich auftretenden Verbindungsproblemen kann MSS Clamping helfen, ansonsten sollte dies aus Performancegründen deaktiviert bleiben.</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_forwarding_src">Eingang</i18n:msg>
|
<i18n:msg xml:id="firewall_forwarding_src">Eingang</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_forwarding_dest">Ausgang</i18n:msg>
|
<i18n:msg xml:id="firewall_forwarding_dest">Ausgang</i18n:msg>
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
fw_portfw = 'Port forwarding'
|
fw_portfw = 'Port forwarding'
|
||||||
fw_forwarding = 'Forwarding'
|
fw_redirect = 'Traffic Redirection'
|
||||||
|
fw_redirect_desc = 'Traffic redirection allows you to change the destination address of forwarded packets.'
|
||||||
|
fw_forwarding = 'Zone-to-Zone traffic'
|
||||||
fw_fw = 'Firewall'
|
fw_fw = 'Firewall'
|
||||||
fw_zone = 'Zone'
|
fw_zone = 'Zone'
|
||||||
fw_zones = 'Zones'
|
fw_zones = 'Zones'
|
||||||
fw_custfwd = 'Custom redirect'
|
fw_custfwd = 'Custom forwarding'
|
||||||
fw_rules = 'Custom Rules'
|
|
||||||
fw_rules1 = 'Here you can create custom firewall rules to control your network traffic.'
|
|
||||||
fw_fw1 = 'The firewall creates zones over your network interfaces to control network traffic flow.'
|
fw_fw1 = 'The firewall creates zones over your network interfaces to control network traffic flow.'
|
||||||
|
firewall_rule = 'Advanced Rules'
|
||||||
|
firewall_rule_desc = 'Advanced rules let you customize the firewall to your needs. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.'
|
||||||
firewall_rule_src = 'Input Zone'
|
firewall_rule_src = 'Input Zone'
|
||||||
firewall_rule_dest = 'Output Zone'
|
firewall_rule_dest = 'Output Zone'
|
||||||
firewall_rule_srcip = 'Source address'
|
firewall_rule_srcip = 'Source address'
|
||||||
|
@ -18,15 +20,22 @@ firewall_rule_target = 'Action'
|
||||||
fw_accept = 'accept'
|
fw_accept = 'accept'
|
||||||
fw_reject = 'reject'
|
fw_reject = 'reject'
|
||||||
fw_drop = 'drop'
|
fw_drop = 'drop'
|
||||||
|
fw_src = 'Source'
|
||||||
|
fw_dest = 'Destination'
|
||||||
|
fw_traffic = 'Traffic Control'
|
||||||
|
fw_mtufix = 'MSS Clamping'
|
||||||
|
fw_dropinvalid = 'Drop invalid packets'
|
||||||
fw_portfw1 = 'Port forwarding allows to provide network services in the internal network to an external network.'
|
fw_portfw1 = 'Port forwarding allows to provide network services in the internal network to an external network.'
|
||||||
firewall_redirect_src_desc = 'External Zone'
|
firewall_redirect_src_desc = 'External Zone'
|
||||||
firewall_redirect_srcdport = 'External port'
|
firewall_redirect_srcdport = 'External port'
|
||||||
firewall_redirect_srcdport_desc = 'port or range as first-last'
|
firewall_redirect_srcdport_desc = 'port or range as first-last'
|
||||||
|
firewall_redirect_srcip = 'Source address'
|
||||||
|
firewall_redirect_srcmac = 'Source MAC'
|
||||||
firewall_redirect_destip = 'Internal address'
|
firewall_redirect_destip = 'Internal address'
|
||||||
firewall_redirect_destip_desc = 'IP-Address'
|
firewall_redirect_destip_desc = 'IP-Address'
|
||||||
firewall_redirect_destport = 'Internal port (optional)'
|
firewall_redirect_destport = 'Internal port (optional)'
|
||||||
firewall_redirect_destport_desc = 'port or range as first-last'
|
firewall_redirect_destport_desc = 'port or range as first-last'
|
||||||
fw_forwarding1 = 'Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.'
|
fw_forwarding1 = 'Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall. If you experience occasional connection problems try enabling MSS Clamping otherwise disable it for performance reasons.'
|
||||||
firewall_forwarding_src = 'Input'
|
firewall_forwarding_src = 'Input'
|
||||||
firewall_forwarding_dest = 'Output'
|
firewall_forwarding_dest = 'Output'
|
||||||
firewall_defaults = 'Defaults'
|
firewall_defaults = 'Defaults'
|
||||||
|
|
|
@ -3,14 +3,16 @@
|
||||||
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<i18n:msg xml:id="fw_portfw">Port forwarding</i18n:msg>
|
<i18n:msg xml:id="fw_portfw">Port forwarding</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_forwarding">Forwarding</i18n:msg>
|
<i18n:msg xml:id="fw_redirect">Traffic Redirection</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect_desc">Traffic redirection allows you to change the destination address of forwarded packets.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_forwarding">Zone-to-Zone traffic</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_fw">Firewall</i18n:msg>
|
<i18n:msg xml:id="fw_fw">Firewall</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_zone">Zone</i18n:msg>
|
<i18n:msg xml:id="fw_zone">Zone</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_zones">Zones</i18n:msg>
|
<i18n:msg xml:id="fw_zones">Zones</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_custfwd">Custom redirect</i18n:msg>
|
<i18n:msg xml:id="fw_custfwd">Custom forwarding</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_rules">Custom Rules</i18n:msg>
|
|
||||||
<i18n:msg xml:id="fw_rules1">Here you can create custom firewall rules to control your network traffic.</i18n:msg>
|
|
||||||
<i18n:msg xml:id="fw_fw1">The firewall creates zones over your network interfaces to control network traffic flow.</i18n:msg>
|
<i18n:msg xml:id="fw_fw1">The firewall creates zones over your network interfaces to control network traffic flow.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule">Advanced Rules</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_desc">Advanced rules let you customize the firewall to your needs. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_src">Input Zone</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_src">Input Zone</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_dest">Output Zone</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_dest">Output Zone</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_rule_srcip">Source address</i18n:msg>
|
<i18n:msg xml:id="firewall_rule_srcip">Source address</i18n:msg>
|
||||||
|
@ -22,17 +24,24 @@
|
||||||
<i18n:msg xml:id="fw_accept">accept</i18n:msg>
|
<i18n:msg xml:id="fw_accept">accept</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_reject">reject</i18n:msg>
|
<i18n:msg xml:id="fw_reject">reject</i18n:msg>
|
||||||
<i18n:msg xml:id="fw_drop">drop</i18n:msg>
|
<i18n:msg xml:id="fw_drop">drop</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_src">Source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dest">Destination</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_traffic">Traffic Control</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_mtufix">MSS Clamping</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dropinvalid">Drop invalid packets</i18n:msg>
|
||||||
|
|
||||||
<i18n:msg xml:id="fw_portfw1">Port forwarding allows to provide network services in the internal network to an external network.</i18n:msg>
|
<i18n:msg xml:id="fw_portfw1">Port forwarding allows to provide network services in the internal network to an external network.</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_src_desc">External Zone</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_src_desc">External Zone</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_srcdport">External port</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_srcdport">External port</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_srcdport_desc">port or range as first-last</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_srcdport_desc">port or range as first-last</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcip">Source address</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcmac">Source MAC</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destip">Internal address</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destip">Internal address</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destip_desc">IP-Address</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destip_desc">IP-Address</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destport">Internal port (optional)</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destport">Internal port (optional)</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_redirect_destport_desc">port or range as first-last</i18n:msg>
|
<i18n:msg xml:id="firewall_redirect_destport_desc">port or range as first-last</i18n:msg>
|
||||||
|
|
||||||
<i18n:msg xml:id="fw_forwarding1">Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.</i18n:msg>
|
<i18n:msg xml:id="fw_forwarding1">Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall. If you experience occasional connection problems try enabling MSS Clamping otherwise disable it for performance reasons.</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_forwarding_src">Input</i18n:msg>
|
<i18n:msg xml:id="firewall_forwarding_src">Input</i18n:msg>
|
||||||
<i18n:msg xml:id="firewall_forwarding_dest">Output</i18n:msg>
|
<i18n:msg xml:id="firewall_forwarding_dest">Output</i18n:msg>
|
||||||
|
|
||||||
|
|
56
applications/luci-fw/luasrc/i18n/luci-fw.fr.lua
Normal file
56
applications/luci-fw/luasrc/i18n/luci-fw.fr.lua
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
fw_portfw = 'Redirection de port'
|
||||||
|
fw_redirect = 'Redirection de trafic'
|
||||||
|
fw_redirect_desc = 'La redirection de trafic vous permet de changer l'adresse de destination des paquets transférés.'
|
||||||
|
fw_forwarding = 'Trafic inter-zone'
|
||||||
|
fw_fw = 'Pare-Feu'
|
||||||
|
fw_zone = 'Zone'
|
||||||
|
fw_zones = 'Zones'
|
||||||
|
fw_custfwd = 'Transfert particulière'
|
||||||
|
fw_fw1 = 'Le pare-feu crée des zone à partir des interfaces réseaux pour controller le trafic réseau.'
|
||||||
|
firewall_rule = 'Règles Avancées'
|
||||||
|
firewall_rule_desc = 'Les règles avancées vous laisse personnaliser le pare-feu selon vos besoins. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.'
|
||||||
|
firewall_rule_src = 'Zone d'Entrée (Input)'
|
||||||
|
firewall_rule_dest = 'Zone de Sortie (Output)'
|
||||||
|
firewall_rule_srcip = 'Adresse source'
|
||||||
|
firewall_rule_destip = 'Adresse de destination'
|
||||||
|
firewall_rule_srcmac = 'Adresse MAC source'
|
||||||
|
firewall_rule_srcport = 'Port source'
|
||||||
|
firewall_rule_destport = 'Port de destination'
|
||||||
|
firewall_rule_target = 'Action'
|
||||||
|
fw_accept = 'accepter'
|
||||||
|
fw_reject = 'rejeter'
|
||||||
|
fw_drop = 'ignorer (drop)'
|
||||||
|
fw_src = 'Source'
|
||||||
|
fw_dest = 'Destination'
|
||||||
|
fw_traffic = 'Contrôle de Trafic'
|
||||||
|
fw_mtufix = 'MSS-Correction'
|
||||||
|
fw_dropinvalid = 'Drop incorrect packets'
|
||||||
|
fw_portfw1 = 'La redirection de port vous permet d'exposer des services réseaux de votre réseau local au réseau externe.'
|
||||||
|
firewall_redirect_src_desc = 'Zone externe'
|
||||||
|
firewall_redirect_srcdport = 'Port externe'
|
||||||
|
firewall_redirect_srcdport_desc = 'port ou plage de ports (premier-dernier)'
|
||||||
|
firewall_redirect_srcip = 'Adresse source'
|
||||||
|
firewall_redirect_srcmac = 'MAC source'
|
||||||
|
firewall_redirect_destip = 'Adresse interne'
|
||||||
|
firewall_redirect_destip_desc = 'Adresse IP'
|
||||||
|
firewall_redirect_destport = 'Port interne'
|
||||||
|
firewall_redirect_destport_desc = 'port ou plage de ports (premier-dernier)'
|
||||||
|
fw_forwarding1 = 'Ici, vous pouvez spécifier quel trafic réseau est autorisé à transiter entre les zones réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.'
|
||||||
|
firewall_forwarding_src = 'Entrée (Input)'
|
||||||
|
firewall_forwarding_dest = 'Sortie (Output)'
|
||||||
|
firewall_defaults = 'Défauts'
|
||||||
|
firewall_defaults_desc = 'Ceci sont les paramètres par défaut qui sont utilisés si aucune autre règle ne s'applique.'
|
||||||
|
firewall_defaults_synflood = 'Protection anti SYN-flood'
|
||||||
|
firewall_defaults_input = 'Trafic Entrant'
|
||||||
|
firewall_defaults_output = 'Trafic Sortant'
|
||||||
|
firewall_defaults_forward = 'Trafic Transféré'
|
||||||
|
firewall_zone_desc = 'Les zones partagent les interfaces réseaux en régions isolées pour séparer les trafic réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.'
|
||||||
|
firewall_zone_input = 'Trafic Entrant'
|
||||||
|
firewall_zone_input_desc = 'Politique par Défaut'
|
||||||
|
firewall_zone_output = 'Trafic Sortant'
|
||||||
|
firewall_zone_output_desc = 'Politique par Défaut'
|
||||||
|
firewall_zone_forward = 'Trafic Transféré'
|
||||||
|
firewall_zone_forward_desc = 'Politique par Défaut'
|
||||||
|
firewall_zone_masq = 'MASQ'
|
||||||
|
firewall_zone_network = 'Réseaux'
|
||||||
|
firewall_zone_network_desc = 'réseaux compris'
|
66
applications/luci-fw/luasrc/i18n/luci-fw.fr.xml
Normal file
66
applications/luci-fw/luasrc/i18n/luci-fw.fr.xml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_portfw">Redirection de port</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect">Redirection de trafic</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect_desc">La redirection de trafic vous permet de changer l'adresse de destination des paquets transférés.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_forwarding">Trafic inter-zone</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_fw">Pare-Feu</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_zone">Zone</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_zones">Zones</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_custfwd">Transfert particulière</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_fw1">Le pare-feu crée des zone à partir des interfaces réseaux pour controller le trafic réseau.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule">Règles Avancées</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_desc">Les règles avancées vous laisse personnaliser le pare-feu selon vos besoins. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_src">Zone d'Entrée (Input)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_dest">Zone de Sortie (Output)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcip">Adresse source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_destip">Adresse de destination</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcmac">Adresse MAC source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcport">Port source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_destport">Port de destination</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_target">Action</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_accept">accepter</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_reject">rejeter</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_drop">ignorer (drop)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_src">Source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dest">Destination</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_traffic">Contrôle de Trafic</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_mtufix">MSS-Correction</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dropinvalid">Drop incorrect packets</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_portfw1">La redirection de port vous permet d'exposer des services réseaux de votre réseau local au réseau externe.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_src_desc">Zone externe</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcdport">Port externe</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcdport_desc">port ou plage de ports (premier-dernier)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcip">Adresse source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcmac">MAC source</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destip">Adresse interne</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destip_desc">Adresse IP</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destport">Port interne</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destport_desc">port ou plage de ports (premier-dernier)</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_forwarding1">Ici, vous pouvez spécifier quel trafic réseau est autorisé à transiter entre les zones réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_forwarding_src">Entrée (Input)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_forwarding_dest">Sortie (Output)</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="firewall_defaults">Défauts</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_desc">Ceci sont les paramètres par défaut qui sont utilisés si aucune autre règle ne s'applique.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_synflood">Protection anti SYN-flood</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_input">Trafic Entrant</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_output">Trafic Sortant</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_forward">Trafic Transféré</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="firewall_zone_desc">Les zones partagent les interfaces réseaux en régions isolées pour séparer les trafic réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_input">Trafic Entrant</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_input_desc">Politique par Défaut</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_output">Trafic Sortant</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_output_desc">Politique par Défaut</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_forward">Trafic Transféré</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_forward_desc">Politique par Défaut</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_masq">MASQ</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_network">Réseaux</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_network_desc">réseaux compris</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
56
applications/luci-fw/luasrc/i18n/luci-fw.pt-br.lua
Normal file
56
applications/luci-fw/luasrc/i18n/luci-fw.pt-br.lua
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
fw_portfw = 'Redirecionamento de portas'
|
||||||
|
fw_redirect = 'Redirecionamento de Tráfego'
|
||||||
|
fw_redirect_desc = 'Redirecionamento do tráfego permite que você altere o endereço de destino dos pacotes enviados.'
|
||||||
|
fw_forwarding = 'Tráfego de Zona-para-Zona'
|
||||||
|
fw_fw = 'Firewall'
|
||||||
|
fw_zone = 'Zona'
|
||||||
|
fw_zones = 'Zonas'
|
||||||
|
fw_custfwd = 'Redirecionamento customizado'
|
||||||
|
fw_fw1 = 'O firewall cria zonas sobre suas interfaces de rede para controlar o fluxo do tráfego.'
|
||||||
|
firewall_rule = 'Regras Avançadas'
|
||||||
|
firewall_rule_desc = 'As regras avançadas permitem que você personalize o firewall de acordo com suas necessidades. Somente novas conexões serão processadas. Pacotes pertencentes às conexões já abertas estão automaticamente permitidos para passar pelo firewall.'
|
||||||
|
firewall_rule_src = 'Zona de Entrada'
|
||||||
|
firewall_rule_dest = 'Zona de Saída'
|
||||||
|
firewall_rule_srcip = 'Endereço de origem'
|
||||||
|
firewall_rule_destip = 'Endereço de destino'
|
||||||
|
firewall_rule_srcmac = 'Endereço-MAC de origem'
|
||||||
|
firewall_rule_srcport = 'Porta de origem'
|
||||||
|
firewall_rule_destport = 'Porta de destino'
|
||||||
|
firewall_rule_target = 'Ação'
|
||||||
|
fw_accept = 'aceitar'
|
||||||
|
fw_reject = 'rejeitar'
|
||||||
|
fw_drop = 'dropar'
|
||||||
|
fw_src = 'Origem'
|
||||||
|
fw_dest = 'Destino'
|
||||||
|
fw_traffic = 'Controle de Tráfego'
|
||||||
|
fw_mtufix = 'MSS-Correction'
|
||||||
|
fw_dropinvalid = 'Drop invalid packets'
|
||||||
|
fw_portfw1 = 'O redirecionamento de portas permite prover serviços de rede na rede interna para uma rede externa.'
|
||||||
|
firewall_redirect_src_desc = 'Zona Externa'
|
||||||
|
firewall_redirect_srcdport = 'Porta Externa'
|
||||||
|
firewall_redirect_srcdport_desc = 'porta ou intervalo primeira-última'
|
||||||
|
firewall_redirect_srcip = 'Endereço de origem'
|
||||||
|
firewall_redirect_srcmac = 'MAC de origem'
|
||||||
|
firewall_redirect_destip = 'Endereço interno'
|
||||||
|
firewall_redirect_destip_desc = 'Endereço-IP'
|
||||||
|
firewall_redirect_destport = 'Porta interna (opcional)'
|
||||||
|
firewall_redirect_destport_desc = 'porta ou intervalo primeira-última'
|
||||||
|
fw_forwarding1 = 'Aqui você pode especificar qual tráfego de rede será permitido para o fluxo entre zonas das redes. Somente novas conexões serão processadas. Pacotes pertencentes à conexões já abertas estão automaticamente permitidos para passar pelo firewall.'
|
||||||
|
firewall_forwarding_src = 'Entrada'
|
||||||
|
firewall_forwarding_dest = 'Saída'
|
||||||
|
firewall_defaults = 'Padrões'
|
||||||
|
firewall_defaults_desc = 'Estas são as configurações padrões, que serão usadas se não houver outras regras.'
|
||||||
|
firewall_defaults_synflood = 'Proteção SYN-flood'
|
||||||
|
firewall_defaults_input = 'Tráfego de Entrada'
|
||||||
|
firewall_defaults_output = 'Tráfego de Saída'
|
||||||
|
firewall_defaults_forward = 'Tráfego Redirecionado'
|
||||||
|
firewall_zone_desc = 'Zonas são interfaces de redes usadas para separar o tráfego da rede. Uma ou mais redes podem pertencer a uma zona. A flag-MASQ ativa o mascaramento NAT para todo o tráfego de saída desta zona.'
|
||||||
|
firewall_zone_input = 'Tráfego de Entrada'
|
||||||
|
firewall_zone_input_desc = 'Política Padrão'
|
||||||
|
firewall_zone_output = 'Tráfego de Saída'
|
||||||
|
firewall_zone_output_desc = 'Política Padrão'
|
||||||
|
firewall_zone_forward = 'Tráfego Redirecionado'
|
||||||
|
firewall_zone_forward_desc = 'Política Padrão'
|
||||||
|
firewall_zone_masq = 'MASQ'
|
||||||
|
firewall_zone_network = 'Redes'
|
||||||
|
firewall_zone_network_desc = 'redes contidas'
|
66
applications/luci-fw/luasrc/i18n/luci-fw.pt-br.xml
Normal file
66
applications/luci-fw/luasrc/i18n/luci-fw.pt-br.xml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_portfw">Redirecionamento de portas</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect">Redirecionamento de Tráfego</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_redirect_desc">Redirecionamento do tráfego permite que você altere o endereço de destino dos pacotes enviados.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_forwarding">Tráfego de Zona-para-Zona</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_fw">Firewall</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_zone">Zona</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_zones">Zonas</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_custfwd">Redirecionamento customizado</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_fw1">O firewall cria zonas sobre suas interfaces de rede para controlar o fluxo do tráfego.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule">Regras Avançadas</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_desc">As regras avançadas permitem que você personalize o firewall de acordo com suas necessidades. Somente novas conexões serão processadas. Pacotes pertencentes às conexões já abertas estão automaticamente permitidos para passar pelo firewall.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_src">Zona de Entrada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_dest">Zona de Saída</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcip">Endereço de origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_destip">Endereço de destino</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcmac">Endereço-MAC de origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_srcport">Porta de origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_destport">Porta de destino</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_rule_target">Ação</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_accept">aceitar</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_reject">rejeitar</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_drop">dropar</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_src">Origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dest">Destino</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_traffic">Controle de Tráfego</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_mtufix">MSS-Correction</i18n:msg>
|
||||||
|
<i18n:msg xml:id="fw_dropinvalid">Drop invalid packets</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_portfw1">O redirecionamento de portas permite prover serviços de rede na rede interna para uma rede externa.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_src_desc">Zona Externa</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcdport">Porta Externa</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcdport_desc">porta ou intervalo primeira-última</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcip">Endereço de origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_srcmac">MAC de origem</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destip">Endereço interno</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destip_desc">Endereço-IP</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destport">Porta interna (opcional)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_redirect_destport_desc">porta ou intervalo primeira-última</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="fw_forwarding1">Aqui você pode especificar qual tráfego de rede será permitido para o fluxo entre zonas das redes. Somente novas conexões serão processadas. Pacotes pertencentes à conexões já abertas estão automaticamente permitidos para passar pelo firewall.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_forwarding_src">Entrada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_forwarding_dest">Saída</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="firewall_defaults">Padrões</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_desc">Estas são as configurações padrões, que serão usadas se não houver outras regras.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_synflood">Proteção SYN-flood</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_input">Tráfego de Entrada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_output">Tráfego de Saída</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_defaults_forward">Tráfego Redirecionado</i18n:msg>
|
||||||
|
|
||||||
|
<i18n:msg xml:id="firewall_zone_desc">Zonas são interfaces de redes usadas para separar o tráfego da rede. Uma ou mais redes podem pertencer a uma zona. A flag-MASQ ativa o mascaramento NAT para todo o tráfego de saída desta zona.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_input">Tráfego de Entrada</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_input_desc">Política Padrão</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_output">Tráfego de Saída</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_output_desc">Política Padrão</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_forward">Tráfego Redirecionado</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_forward_desc">Política Padrão</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_masq">MASQ</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_network">Redes</i18n:msg>
|
||||||
|
<i18n:msg xml:id="firewall_zone_network_desc">redes contidas</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
|
@ -1,64 +0,0 @@
|
||||||
--[[
|
|
||||||
LuCI - Lua Configuration Interface
|
|
||||||
|
|
||||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
]]--
|
|
||||||
m = Map("firewall", translate("fw_rules"), translate("fw_rules1"))
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "rule", "")
|
|
||||||
s.addremove = true
|
|
||||||
s.anonymous = true
|
|
||||||
|
|
||||||
iface = s:option(ListValue, "src")
|
|
||||||
iface:value("")
|
|
||||||
iface.rmempty = true
|
|
||||||
|
|
||||||
oface = s:option(ListValue, "dest")
|
|
||||||
oface.optional = true
|
|
||||||
|
|
||||||
luci.model.uci.cursor():foreach("firewall", "zone",
|
|
||||||
function (section)
|
|
||||||
iface:value(section.name)
|
|
||||||
oface:value(section.name)
|
|
||||||
end)
|
|
||||||
|
|
||||||
proto = s:option(ListValue, "proto", translate("protocol"))
|
|
||||||
proto.optional = true
|
|
||||||
proto:value("")
|
|
||||||
proto:value("tcpudp", "TCP+UDP")
|
|
||||||
proto:value("tcp", "TCP")
|
|
||||||
proto:value("udp", "UDP")
|
|
||||||
proto:value("icmp", "ICMP")
|
|
||||||
|
|
||||||
s:option(Value, "src_ip").optional = true
|
|
||||||
s:option(Value, "dest_ip").optional = true
|
|
||||||
s:option(Value, "src_mac").optional = true
|
|
||||||
|
|
||||||
sport = s:option(Value, "src_port")
|
|
||||||
sport.optional = true
|
|
||||||
sport:depends("proto", "tcp")
|
|
||||||
sport:depends("proto", "udp")
|
|
||||||
sport:depends("proto", "tcpudp")
|
|
||||||
|
|
||||||
dport = s:option(Value, "dest_port")
|
|
||||||
dport.optional = true
|
|
||||||
dport:depends("proto", "tcp")
|
|
||||||
dport:depends("proto", "udp")
|
|
||||||
dport:depends("proto", "tcpudp")
|
|
||||||
|
|
||||||
jump = s:option(ListValue, "target")
|
|
||||||
jump.rmempty = true
|
|
||||||
jump:value("DROP", translate("fw_drop"))
|
|
||||||
jump:value("ACCEPT", translate("fw_accept"))
|
|
||||||
jump:value("REJECT", translate("fw_reject"))
|
|
||||||
|
|
||||||
|
|
||||||
return m
|
|
|
@ -12,13 +12,14 @@ You may obtain a copy of the License at
|
||||||
$Id$
|
$Id$
|
||||||
]]--
|
]]--
|
||||||
require("luci.sys")
|
require("luci.sys")
|
||||||
m = Map("firewall", translate("fw_portfw"), translate("fw_portfw1"))
|
m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc"))
|
||||||
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "redirect", "")
|
s = m:section(TypedSection, "redirect", "")
|
||||||
s.template = "cbi/tblsection"
|
s.template = "cbi/tblsection"
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
s.extedit = luci.dispatcher.build_url("admin", "network", "firewall", "redirect", "%s")
|
||||||
|
|
||||||
name = s:option(Value, "_name", translate("name"), translate("cbi_optional"))
|
name = s:option(Value, "_name", translate("name"), translate("cbi_optional"))
|
||||||
name.size = 10
|
name.size = 10
|
|
@ -1,30 +0,0 @@
|
||||||
--[[
|
|
||||||
LuCI - Lua Configuration Interface
|
|
||||||
|
|
||||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
$Id$
|
|
||||||
]]--
|
|
||||||
m = Map("firewall", translate("fw_forwarding"), translate("fw_forwarding1"))
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "forwarding", "")
|
|
||||||
s.template = "cbi/tblsection"
|
|
||||||
s.addremove = true
|
|
||||||
s.anonymous = true
|
|
||||||
|
|
||||||
iface = s:option(ListValue, "src")
|
|
||||||
oface = s:option(ListValue, "dest")
|
|
||||||
|
|
||||||
luci.model.uci.cursor():foreach("firewall", "zone",
|
|
||||||
function (section)
|
|
||||||
iface:value(section.name)
|
|
||||||
oface:value(section.name)
|
|
||||||
end)
|
|
||||||
|
|
||||||
return m
|
|
|
@ -12,12 +12,18 @@ You may obtain a copy of the License at
|
||||||
$Id$
|
$Id$
|
||||||
]]--
|
]]--
|
||||||
require("luci.sys")
|
require("luci.sys")
|
||||||
m = Map("firewall", translate("fw_portfw"), translate("fw_portfw1"))
|
arg[1] = arg[1] or ""
|
||||||
|
|
||||||
|
m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc"))
|
||||||
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "redirect", "")
|
s = m:section(NamedSection, arg[1], "redirect", "")
|
||||||
s.addremove = true
|
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
s.addremove = false
|
||||||
|
|
||||||
|
back = s:option(DummyValue, "_overview", translate("overview"))
|
||||||
|
back.value = ""
|
||||||
|
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirect")
|
||||||
|
|
||||||
name = s:option(Value, "_name", translate("name"))
|
name = s:option(Value, "_name", translate("name"))
|
||||||
name.rmempty = true
|
name.rmempty = true
|
||||||
|
@ -30,11 +36,10 @@ luci.model.uci.cursor():foreach("firewall", "zone",
|
||||||
iface:value(section.name)
|
iface:value(section.name)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
s:option(Value, "src_ip").optional = true
|
s:option(Value, "src_ip", translate("firewall_redirect_srcip")).optional = true
|
||||||
s:option(Value, "src_mac").optional = true
|
s:option(Value, "src_mac", translate("firewall_redirect_srcmac")).optional = true
|
||||||
|
|
||||||
sport = s:option(Value, "src_port")
|
sport = s:option(Value, "src_port", translate("firewall_rule_srcport"))
|
||||||
sport.optional = true
|
|
||||||
sport:depends("proto", "tcp")
|
sport:depends("proto", "tcp")
|
||||||
sport:depends("proto", "udp")
|
sport:depends("proto", "udp")
|
||||||
sport:depends("proto", "tcpudp")
|
sport:depends("proto", "tcpudp")
|
||||||
|
@ -46,19 +51,18 @@ proto:value("tcp", "TCP")
|
||||||
proto:value("udp", "UDP")
|
proto:value("udp", "UDP")
|
||||||
proto:value("tcpudp", "TCP+UDP")
|
proto:value("tcpudp", "TCP+UDP")
|
||||||
|
|
||||||
dport = s:option(Value, "src_dport")
|
dport = s:option(Value, "src_dport", translate("firewall_redirect_srcdport"))
|
||||||
dport.size = 5
|
dport.size = 5
|
||||||
dport.optional = true
|
|
||||||
dport:depends("proto", "tcp")
|
dport:depends("proto", "tcp")
|
||||||
dport:depends("proto", "udp")
|
dport:depends("proto", "udp")
|
||||||
dport:depends("proto", "tcpudp")
|
dport:depends("proto", "tcpudp")
|
||||||
|
|
||||||
to = s:option(Value, "dest_ip")
|
to = s:option(Value, "dest_ip", translate("firewall_redirect_destip"))
|
||||||
for i, dataset in ipairs(luci.sys.net.arptable()) do
|
for i, dataset in ipairs(luci.sys.net.arptable()) do
|
||||||
to:value(dataset["IP address"])
|
to:value(dataset["IP address"])
|
||||||
end
|
end
|
||||||
|
|
||||||
toport = s:option(Value, "dest_port")
|
toport = s:option(Value, "dest_port", translate("firewall_redirect_destport"))
|
||||||
toport.optional = true
|
toport.optional = true
|
||||||
toport.size = 5
|
toport.size = 5
|
||||||
|
|
82
applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua
Normal file
82
applications/luci-fw/luasrc/model/cbi/luci_fw/traffic.lua
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
|
||||||
|
m = Map("firewall", translate("fw_traffic"))
|
||||||
|
s = m:section(TypedSection, "forwarding", translate("fw_forwarding"), translate("fw_forwarding1"))
|
||||||
|
s.template = "cbi/tblsection"
|
||||||
|
s.addremove = true
|
||||||
|
s.anonymous = true
|
||||||
|
|
||||||
|
iface = s:option(ListValue, "src", translate("fw_src"))
|
||||||
|
oface = s:option(ListValue, "dest", translate("fw_dest"))
|
||||||
|
s:option(Flag, "mtu_fix", translate("fw_mtufix"))
|
||||||
|
|
||||||
|
luci.model.uci.cursor():foreach("firewall", "zone",
|
||||||
|
function (section)
|
||||||
|
iface:value(section.name)
|
||||||
|
oface:value(section.name)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
s = m:section(TypedSection, "rule")
|
||||||
|
s.addremove = true
|
||||||
|
s.anonymous = true
|
||||||
|
s.template = "cbi/tblsection"
|
||||||
|
s.extedit = luci.dispatcher.build_url("admin", "network", "firewall", "rule", "%s")
|
||||||
|
s.defaults.target = "ACCEPT"
|
||||||
|
|
||||||
|
local created = nil
|
||||||
|
|
||||||
|
function s.create(self, section)
|
||||||
|
created = TypedSection.create(self, section)
|
||||||
|
end
|
||||||
|
|
||||||
|
function s.parse(self, ...)
|
||||||
|
TypedSection.parse(self, ...)
|
||||||
|
if created then
|
||||||
|
m.uci:save("firewall")
|
||||||
|
luci.http.redirect(luci.dispatcher.build_url(
|
||||||
|
"admin", "network", "firewall", "rule", created
|
||||||
|
))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
s:option(DummyValue, "_name", translate("name"))
|
||||||
|
s:option(DummyValue, "proto", translate("protocol"))
|
||||||
|
|
||||||
|
src = s:option(DummyValue, "src", translate("fw_src"))
|
||||||
|
function src.cfgvalue(self, s)
|
||||||
|
return "%s:%s:%s" % {
|
||||||
|
self.map:get(s, "src") or "*",
|
||||||
|
self.map:get(s, "src_ip") or "0.0.0.0/0",
|
||||||
|
self.map:get(s, "src_port") or "*"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
dest = s:option(DummyValue, "dest", translate("fw_dest"))
|
||||||
|
function dest.cfgvalue(self, s)
|
||||||
|
return "%s:%s:%s" % {
|
||||||
|
self.map:get(s, "dest") or translate("device", "device"),
|
||||||
|
self.map:get(s, "dest_ip") or "0.0.0.0/0",
|
||||||
|
self.map:get(s, "dest_port") or "*"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
s:option(DummyValue, "target")
|
||||||
|
|
||||||
|
|
||||||
|
return m
|
72
applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua
Normal file
72
applications/luci-fw/luasrc/model/cbi/luci_fw/trule.lua
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
arg[1] = arg[1] or ""
|
||||||
|
m = Map("firewall", translate("firewall_rule"), translate("firewall_rule_desc"))
|
||||||
|
|
||||||
|
s = m:section(NamedSection, arg[1], "rule", "")
|
||||||
|
s.anonymous = true
|
||||||
|
s.addremove = false
|
||||||
|
|
||||||
|
back = s:option(DummyValue, "_overview", translate("overview"))
|
||||||
|
back.value = ""
|
||||||
|
back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "rule")
|
||||||
|
|
||||||
|
|
||||||
|
name = s:option(Value, "_name", translate("name")..translate("cbi_optional"))
|
||||||
|
name.rmempty = true
|
||||||
|
|
||||||
|
iface = s:option(ListValue, "src", translate("fw_src"))
|
||||||
|
iface.rmempty = true
|
||||||
|
|
||||||
|
oface = s:option(ListValue, "dest", translate("fw_dest"))
|
||||||
|
oface:value("", translate("device", "device"))
|
||||||
|
oface.rmempty = true
|
||||||
|
|
||||||
|
luci.model.uci.cursor():foreach("firewall", "zone",
|
||||||
|
function (section)
|
||||||
|
iface:value(section.name)
|
||||||
|
oface:value(section.name)
|
||||||
|
end)
|
||||||
|
|
||||||
|
proto = s:option(Value, "proto", translate("protocol"))
|
||||||
|
proto.optional = true
|
||||||
|
proto:value("")
|
||||||
|
proto:value("tcpudp", "TCP+UDP")
|
||||||
|
proto:value("tcp", "TCP")
|
||||||
|
proto:value("udp", "UDP")
|
||||||
|
proto:value("icmp", "ICMP")
|
||||||
|
|
||||||
|
s:option(Value, "src_ip", translate("firewall_rule_srcip")).optional = true
|
||||||
|
s:option(Value, "dest_ip", translate("firewall_rule_destip")).optional = true
|
||||||
|
s:option(Value, "src_mac", translate("firewall_rule_srcmac")).optional = true
|
||||||
|
|
||||||
|
sport = s:option(Value, "src_port", translate("firewall_rule_srcport"))
|
||||||
|
sport:depends("proto", "tcp")
|
||||||
|
sport:depends("proto", "udp")
|
||||||
|
sport:depends("proto", "tcpudp")
|
||||||
|
|
||||||
|
dport = s:option(Value, "dest_port", translate("firewall_rule_destport"))
|
||||||
|
dport:depends("proto", "tcp")
|
||||||
|
dport:depends("proto", "udp")
|
||||||
|
dport:depends("proto", "tcpudp")
|
||||||
|
|
||||||
|
jump = s:option(ListValue, "target", translate("firewall_rule_target"))
|
||||||
|
jump.rmempty = true
|
||||||
|
jump.default = "ACCEPT"
|
||||||
|
jump:value("DROP", translate("fw_drop"))
|
||||||
|
jump:value("ACCEPT", translate("fw_accept"))
|
||||||
|
jump:value("REJECT", translate("fw_reject"))
|
||||||
|
|
||||||
|
|
||||||
|
return m
|
|
@ -19,12 +19,19 @@ s.anonymous = true
|
||||||
|
|
||||||
s:option(Flag, "syn_flood")
|
s:option(Flag, "syn_flood")
|
||||||
|
|
||||||
|
local di = s:option(Flag, "drop_invalid", translate("fw_dropinvalid"))
|
||||||
|
di.rmempty = false
|
||||||
|
function di.cfgvalue(...)
|
||||||
|
return AbstractValue.cfgvalue(...) or "1"
|
||||||
|
end
|
||||||
|
|
||||||
p = {}
|
p = {}
|
||||||
p[1] = s:option(ListValue, "input")
|
p[1] = s:option(ListValue, "input")
|
||||||
p[2] = s:option(ListValue, "output")
|
p[2] = s:option(ListValue, "output")
|
||||||
p[3] = s:option(ListValue, "forward")
|
p[3] = s:option(ListValue, "forward")
|
||||||
|
|
||||||
for i, v in ipairs(p) do
|
for i, v in ipairs(p) do
|
||||||
|
v:value("REJECT", translate("fw_reject"))
|
||||||
v:value("DROP", translate("fw_drop"))
|
v:value("DROP", translate("fw_drop"))
|
||||||
v:value("ACCEPT", translate("fw_accept"))
|
v:value("ACCEPT", translate("fw_accept"))
|
||||||
end
|
end
|
||||||
|
@ -44,6 +51,7 @@ p[2] = s:option(ListValue, "output")
|
||||||
p[3] = s:option(ListValue, "forward")
|
p[3] = s:option(ListValue, "forward")
|
||||||
|
|
||||||
for i, v in ipairs(p) do
|
for i, v in ipairs(p) do
|
||||||
|
v:value("REJECT", translate("fw_reject"))
|
||||||
v:value("DROP", translate("fw_drop"))
|
v:value("DROP", translate("fw_drop"))
|
||||||
v:value("ACCEPT", translate("fw_accept"))
|
v:value("ACCEPT", translate("fw_accept"))
|
||||||
end
|
end
|
||||||
|
@ -54,10 +62,10 @@ net = s:option(MultiValue, "network")
|
||||||
net.widget = "select"
|
net.widget = "select"
|
||||||
net.rmempty = true
|
net.rmempty = true
|
||||||
luci.tools.webadmin.cbi_add_networks(net)
|
luci.tools.webadmin.cbi_add_networks(net)
|
||||||
|
|
||||||
function net.cfgvalue(self, section)
|
function net.cfgvalue(self, section)
|
||||||
local value = MultiValue.cfgvalue(self, section)
|
local value = MultiValue.cfgvalue(self, section)
|
||||||
return value or name:cfgvalue(section)
|
return value or name:cfgvalue(section)
|
||||||
end
|
end
|
||||||
|
|
||||||
return m
|
return m
|
|
@ -1,5 +1,8 @@
|
||||||
package firewall
|
package firewall
|
||||||
|
|
||||||
|
config package
|
||||||
|
option title 'Firewall configuration'
|
||||||
|
|
||||||
config section
|
config section
|
||||||
option name 'zone'
|
option name 'zone'
|
||||||
option title 'Firewall zones'
|
option title 'Firewall zones'
|
||||||
|
@ -7,13 +10,13 @@ config section
|
||||||
|
|
||||||
config variable
|
config variable
|
||||||
option name 'name'
|
option name 'name'
|
||||||
option title 'Name of this firewall zone'
|
option title 'Name'
|
||||||
option section 'firewall.zone'
|
option section 'firewall.zone'
|
||||||
option required true
|
option required true
|
||||||
|
|
||||||
config variable
|
config variable
|
||||||
option name 'network'
|
option name 'network'
|
||||||
option title 'Associated network of this firewall zone'
|
option title 'Networks belonging to this zone'
|
||||||
option section 'firewall.zone'
|
option section 'firewall.zone'
|
||||||
option valueof 'network.interface'
|
option valueof 'network.interface'
|
||||||
option multival true
|
option multival true
|
||||||
|
@ -75,11 +78,17 @@ config variable
|
||||||
option section 'firewall.defaults'
|
option section 'firewall.defaults'
|
||||||
option datatype 'boolean'
|
option datatype 'boolean'
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'drop_invalid'
|
||||||
|
option title 'Do not drop packages with state invalid'
|
||||||
|
option section 'firewall.defaults'
|
||||||
|
option datatype 'boolean'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config section
|
config section
|
||||||
option name 'forwarding'
|
option name 'forwarding'
|
||||||
option title 'Firewall traffic forwarding rules'
|
option title 'Forwarding rules'
|
||||||
option package 'firewall'
|
option package 'firewall'
|
||||||
|
|
||||||
config variable
|
config variable
|
||||||
|
@ -96,14 +105,26 @@ config variable
|
||||||
option valueof 'firewall.zone.name'
|
option valueof 'firewall.zone.name'
|
||||||
option required true
|
option required true
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'mtu_fix'
|
||||||
|
option title 'Fixup MTU of outgoing packages'
|
||||||
|
option section 'firewall.forwarding'
|
||||||
|
option datatype 'boolean'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config section
|
config section
|
||||||
option name 'rule'
|
option name 'rule'
|
||||||
option title 'Custom rule specification'
|
option title 'Custom rules'
|
||||||
option package 'firewall'
|
option package 'firewall'
|
||||||
list depends 'target, src'
|
list depends 'target, src'
|
||||||
list depends 'target, dest'
|
list depends 'target, dest'
|
||||||
|
list depends 'target, src_ip'
|
||||||
|
list depends 'target, src_port'
|
||||||
|
list depends 'target, src_mac'
|
||||||
|
list depends 'target, dest_ip'
|
||||||
|
list depends 'target, dest_port'
|
||||||
|
list depends 'target, proto'
|
||||||
|
|
||||||
config variable
|
config variable
|
||||||
option name 'src'
|
option name 'src'
|
||||||
|
@ -158,13 +179,12 @@ config variable
|
||||||
option title 'Option target'
|
option title 'Option target'
|
||||||
option section 'firewall.rule'
|
option section 'firewall.rule'
|
||||||
option datatype 'string'
|
option datatype 'string'
|
||||||
option required true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config section
|
config section
|
||||||
option name 'redirect'
|
option name 'redirect'
|
||||||
option title 'Traffic redirection rule definition'
|
option title 'Redirection rules'
|
||||||
option package 'firewall'
|
option package 'firewall'
|
||||||
|
|
||||||
config variable
|
config variable
|
5
applications/luci-hd_idle/ipkg/postinst
Normal file
5
applications/luci-hd_idle/ipkg/postinst
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
[ -n "${IPKG_INSTROOT}" ] || {
|
||||||
|
( . /etc/uci-defaults/luci-hd_idle ) && rm -f /etc/uci-defaults/luci-hd_idle
|
||||||
|
/etc/init.d/hd-idle enabled || /etc/init.d/hd-idle enable
|
||||||
|
}
|
28
applications/luci-hd_idle/luasrc/controller/hd_idle.lua
Normal file
28
applications/luci-hd_idle/luasrc/controller/hd_idle.lua
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
--[[
|
||||||
|
|
||||||
|
LuCI hd-idle
|
||||||
|
(c) 2008 Yanira <forum-2008@email.de>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
module("luci.controller.hd_idle", package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
require("luci.i18n")
|
||||||
|
luci.i18n.loadc("hd_idle")
|
||||||
|
if not luci.fs.access("/etc/config/hd-idle") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), luci.i18n.translate("hd_idle", "hd-idle"), 60)
|
||||||
|
page.i18n = "hd_idle"
|
||||||
|
page.dependent = true
|
||||||
|
end
|
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.de.lua
Normal file
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.de.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
disk = 'Festplatte'
|
||||||
|
enable_debug = 'Debug-Ausgaben aktivieren'
|
||||||
|
hd_idle = 'hd-idle'
|
||||||
|
hd_idle_desc = 'hd-idle ist ein Hilfsprogramm um externe Festplatten nach einer festgelegten Leerlaufzeit herunter zu fahren.'
|
||||||
|
idle_time_interval = 'Leerlaufzeit'
|
||||||
|
idle_time_unit = 'Leerlaufzeiteinheit'
|
||||||
|
settings = 'Einstellungen'
|
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.de.xml
Normal file
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.de.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="disk">Festplatte</i18n:msg>
|
||||||
|
<i18n:msg xml:id="enable_debug">Debug-Ausgaben aktivieren</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle">hd-idle</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle_desc">hd-idle ist ein Hilfsprogramm um externe Festplatten nach einer festgelegten Leerlaufzeit herunter zu fahren.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_interval">Leerlaufzeit</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_unit">Leerlaufzeiteinheit</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Einstellungen</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.en.lua
Normal file
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.en.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
disk = 'Disk'
|
||||||
|
enable_debug = 'Enable debug'
|
||||||
|
hd_idle = 'hd-idle'
|
||||||
|
hd_idle_desc = 'hd-idle is a utility program for spinning-down external disks after a period of idle time.'
|
||||||
|
idle_time_interval = 'Idle-Time'
|
||||||
|
idle_time_unit = 'Idle-Time unit'
|
||||||
|
settings = 'Settings'
|
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.en.xml
Normal file
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.en.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="disk">Disk</i18n:msg>
|
||||||
|
<i18n:msg xml:id="enable_debug">Enable debug</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle">hd-idle</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle_desc">hd-idle is a utility program for spinning-down external disks after a period of idle time.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_interval">Idle-Time</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_unit">Idle-Time unit</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Settings</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.lua
Normal file
7
applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.lua
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
disk = 'Disco'
|
||||||
|
enable_debug = 'Habilitar debug'
|
||||||
|
hd_idle = 'Hd-idle'
|
||||||
|
hd_idle_desc = 'Hd-idle é um programa utilitário para ativar o modo "economia de energia" (spinning-down) de discos externos após um período de ociosidade.'
|
||||||
|
idle_time_interval = 'Tempo de ociosidade'
|
||||||
|
idle_time_unit = 'Unidade do tempo de ociosidade'
|
||||||
|
settings = 'Configurações'
|
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.xml
Normal file
13
applications/luci-hd_idle/luasrc/i18n/hd_idle.pt-br.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="disk">Disco</i18n:msg>
|
||||||
|
<i18n:msg xml:id="enable_debug">Habilitar debug</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle">Hd-idle</i18n:msg>
|
||||||
|
<i18n:msg xml:id="hd_idle_desc">Hd-idle é um programa utilitário para ativar o modo "economia de energia" (spinning-down) de discos externos após um período de ociosidade.</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_interval">Tempo de ociosidade</i18n:msg>
|
||||||
|
<i18n:msg xml:id="idle_time_unit">Unidade do tempo de ociosidade</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Configurações</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
41
applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
Normal file
41
applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
--[[
|
||||||
|
|
||||||
|
LuCI hd-idle
|
||||||
|
(c) 2008 Yanira <forum-2008@email.de>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
require("luci.fs")
|
||||||
|
|
||||||
|
m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc"))
|
||||||
|
|
||||||
|
s = m:section(TypedSection, "hd-idle", translate("settings"))
|
||||||
|
s.anonymous = true
|
||||||
|
|
||||||
|
s:option(Flag, "enabled", translate("enable", "Enable"))
|
||||||
|
|
||||||
|
disk = s:option(Value, "disk", translate("disk"))
|
||||||
|
disk.rmempty = true
|
||||||
|
for _, dev in ipairs(luci.fs.glob("/dev/[sh]d[a-z]")) do
|
||||||
|
disk:value(luci.fs.basename(dev))
|
||||||
|
end
|
||||||
|
|
||||||
|
s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10
|
||||||
|
s.rmempty = true
|
||||||
|
unit = s:option(ListValue, "idle_time_unit", translate("idle_time_unit"))
|
||||||
|
unit.default = "minutes"
|
||||||
|
unit:value("minutes", "min")
|
||||||
|
unit:value("hours", "h")
|
||||||
|
unit.rmempty = true
|
||||||
|
|
||||||
|
s:option(Flag, "enable_debug", translate("enable_debug"))
|
||||||
|
|
||||||
|
return m
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
uci batch <<-EOF
|
||||||
|
add ucitrack hd-idle
|
||||||
|
set ucitrack.@hd-idle[-1].init=hd-idle
|
||||||
|
commit ucitrack
|
||||||
|
EOF
|
29
applications/luci-initmgr/luasrc/controller/init.lua
Normal file
29
applications/luci-initmgr/luasrc/controller/init.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
module("luci.controller.init", package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
if not luci.fs.access("/etc/rc.common") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require("luci.i18n")
|
||||||
|
luci.i18n.loadc("initmgr")
|
||||||
|
|
||||||
|
entry(
|
||||||
|
{"admin", "system", "init"}, form("init/init"),
|
||||||
|
luci.i18n.translate("initmgr", "Init Scripts")
|
||||||
|
).i18n = "initmgr"
|
||||||
|
end
|
5
applications/luci-initmgr/luasrc/i18n/initmgr.de.lua
Normal file
5
applications/luci-initmgr/luasrc/i18n/initmgr.de.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
initmgr = 'Startscripte'
|
||||||
|
initmgr_desc = 'Hier können installierte Startscripte aktiviert oder deaktiviert werden. Änderungen werden erst mit einem Geräteneustart angewendet.<br /><strong>Warnung: Wenn essentialle Startscripte wie "network" deaktiviert werden könnte das Gerät unerreichbar werden!</strong>'
|
||||||
|
initmgr_index = 'Startpriorität'
|
||||||
|
initmgr_name = 'Startscript'
|
||||||
|
initmgr_enabled = 'Aktivieren/Deaktivieren'
|
11
applications/luci-initmgr/luasrc/i18n/initmgr.de.xml
Normal file
11
applications/luci-initmgr/luasrc/i18n/initmgr.de.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="initmgr">Startscripte</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_desc">Hier können installierte Startscripte aktiviert oder deaktiviert werden. Änderungen werden erst mit einem Geräteneustart angewendet.<br /><strong>Warnung: Wenn essentialle Startscripte wie "network" deaktiviert werden könnte das Gerät unerreichbar werden!</strong></i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_index">Startpriorität</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_name">Startscript</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_enabled">Aktivieren/Deaktivieren</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
5
applications/luci-initmgr/luasrc/i18n/initmgr.el.lua
Normal file
5
applications/luci-initmgr/luasrc/i18n/initmgr.el.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
initmgr = 'Σενάρια Εκκίνησης'
|
||||||
|
initmgr_desc = 'Μπορείτε να ενεργοποιήσετε ή να απενεργοποιήσετε σενάρια εκκίνησης εδώ. Οι αλλαγές θα εφαρμοστούν αφού επανεκκινήσετε τη συσκευή.<br /><strong>Προειδοποίηση: Αν απενεργοποιήσετε απαραίτητα σενάρια εκκίνησης όπως το "network", η συσκευή σας μπορεί να γίνει μη-προσβάσιμη!</strong>'
|
||||||
|
initmgr_index = 'Προτεραιότητα εκκίνησης'
|
||||||
|
initmgr_name = 'Σενάριο εκκίνησης'
|
||||||
|
initmgr_enabled = 'Ενεργοποίηση/Απενεργοποίηση'
|
5
applications/luci-initmgr/luasrc/i18n/initmgr.en.lua
Normal file
5
applications/luci-initmgr/luasrc/i18n/initmgr.en.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
initmgr = 'Initscripts'
|
||||||
|
initmgr_desc = 'You can enable or disable installed init scripts here. Changes will applied after a device reboot.<br /><strong>Warning: If you disable essential init scripts like "network", your device might become inaccesable!</strong>'
|
||||||
|
initmgr_index = 'Start priority'
|
||||||
|
initmgr_name = 'Initscript'
|
||||||
|
initmgr_enabled = 'Enable/Disable'
|
11
applications/luci-initmgr/luasrc/i18n/initmgr.en.xml
Normal file
11
applications/luci-initmgr/luasrc/i18n/initmgr.en.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="initmgr">Initscripts</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_desc">You can enable or disable installed init scripts here. Changes will applied after a device reboot.<br /><strong>Warning: If you disable essential init scripts like "network", your device might become inaccesable!</strong></i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_index">Start priority</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_name">Initscript</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_enabled">Enable/Disable</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
5
applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.lua
Normal file
5
applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.lua
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
initmgr = 'Scripts de Inicialização'
|
||||||
|
initmgr_desc = 'Você pode ativar ou desativar os scripts de inicialização instalados aqui. As mudanças serão aplicadas após a reinicialização do equipamento.<br /><strong>Aviso: Se você desativar algum script de inicialização essencial como por exemplo "rede/network", o dispositivo poderá tornar-se inacessível!</strong>'
|
||||||
|
initmgr_index = 'Prioridade de inicialização'
|
||||||
|
initmgr_name = 'Script de inicialização'
|
||||||
|
initmgr_enabled = 'Ativar/Desativar'
|
11
applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.xml
Normal file
11
applications/luci-initmgr/luasrc/i18n/initmgr.pt-br.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="initmgr">Scripts de Inicialização</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_desc">Você pode ativar ou desativar os scripts de inicialização instalados aqui. As mudanças serão aplicadas após a reinicialização do equipamento.<br /><strong>Aviso: Se você desativar algum script de inicialização essencial como por exemplo "rede/network", o dispositivo poderá tornar-se inacessível!</strong></i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_index">Prioridade de inicialização</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_name">Script de inicialização</i18n:msg>
|
||||||
|
<i18n:msg xml:id="initmgr_enabled">Ativar/Desativar</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
58
applications/luci-initmgr/luasrc/model/cbi/init/init.lua
Normal file
58
applications/luci-initmgr/luasrc/model/cbi/init/init.lua
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
|
||||||
|
require("luci.sys")
|
||||||
|
require("luci.util")
|
||||||
|
|
||||||
|
local inits = { }
|
||||||
|
|
||||||
|
for _, name in ipairs(luci.sys.init.names()) do
|
||||||
|
local index = luci.sys.init.index(name)
|
||||||
|
local enabled = luci.sys.init.enabled(name)
|
||||||
|
|
||||||
|
inits["%02i.%s" % { index, name }] = {
|
||||||
|
name = name,
|
||||||
|
index = tostring(index),
|
||||||
|
enabled = enabled
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
m = SimpleForm("initmgr", translate("initmgr"), translate("initmgr_desc"))
|
||||||
|
m.reset = false
|
||||||
|
|
||||||
|
s = m:section(Table, inits)
|
||||||
|
|
||||||
|
i = s:option(DummyValue, "index", translate("initmgr_index"))
|
||||||
|
n = s:option(DummyValue, "name", translate("initmgr_name"))
|
||||||
|
|
||||||
|
e = s:option(Flag, "enabled", translate("initmgr_enabled"))
|
||||||
|
|
||||||
|
e.cfgvalue = function(self, section)
|
||||||
|
return inits[section].enabled and "1" or "0"
|
||||||
|
end
|
||||||
|
|
||||||
|
e.write = function(self, section, value)
|
||||||
|
if value == "1" and not inits[section].enabled then
|
||||||
|
inits[section].enabled = true
|
||||||
|
return luci.sys.init.enable(inits[section].name)
|
||||||
|
elseif value == "0" and inits[section].enabled then
|
||||||
|
inits[section].enabled = false
|
||||||
|
return luci.sys.init.disable(inits[section].name)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return m
|
|
@ -0,0 +1,19 @@
|
||||||
|
if(!window.CanvasRenderingContext2D){(function(){var I=Math,i=I.round,L=I.sin,M=I.cos,m=10,A=m/2,Q={init:function(a){var b=a||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;b.attachEvent("onreadystatechange",function(){c.r(b)})}},r:function(a){if(a.readyState=="complete"){if(!a.namespaces["s"]){a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var b=a.createStyleSheet();b.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";
|
||||||
|
var c=a.getElementsByTagName("canvas");for(var d=0;d<c.length;d++){if(!c[d].getContext){this.initElement(c[d])}}}},q:function(a){var b=a.outerHTML,c=a.ownerDocument.createElement(b);if(b.slice(-2)!="/>"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize",
|
||||||
|
W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement;
|
||||||
|
if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=
|
||||||
|
a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round";
|
||||||
|
case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML=
|
||||||
|
"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e,
|
||||||
|
g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a,
|
||||||
|
b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width=
|
||||||
|
f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" <g_vml_:group",' coordsize="',m*v,",",m*w,'"',' coordorigin="0,0"',
|
||||||
|
' style="width:',v,";height:",w,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var x=[];x.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",i(s.x/m),"',","Dy='",i(s.y/m),"'");var p=s,y=this.b(c+e,d),z=this.b(c,d+g),B=this.b(c+e,d+g);p.x=Math.max(p.x,y.x,z.x,B.x);p.y=Math.max(p.y,y.y,z.y,B.y);t.push("padding:0 ",i(p.x/m),"px ",i(p.y/m),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else{t.push("top:",
|
||||||
|
i(s.y/m),"px;left:",i(s.x/m),"px;")}t.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',m*e,";"," height:",m*g,';"',' cropleft="',h/q,'"',' croptop="',l/r,'"',' cropright="',(q-h-n)/q,'"',' cropbottom="',(r-l-o)/r,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("<g_vml_:shape",' fillcolor="',d,'"',' filled="',Boolean(a),'"',' style="position:absolute;width:',
|
||||||
|
g,";height:",h,';"',' coordorigin="0 0" coordsize="',m*g," ",m*h,'"',' stroked="',!a,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',d,'"',' path="');var l={x:null,y:null},n={x:null,y:null};for(var o=0;o<this.c.length;o++){var f=this.c[o];if(f.type=="moveTo"){b.push(" m ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="lineTo"){b.push(" l ");var k=this.b(f.x,f.y);b.push(i(k.x),",",i(k.y))}else if(f.type=="close"){b.push(" x ")}else if(f.type=="bezierCurveTo"){b.push(" c ");
|
||||||
|
var k=this.b(f.x,f.y),q=this.b(f.cp1x,f.cp1y),r=this.b(f.cp2x,f.cp2y);b.push(i(q.x),",",i(q.y),",",i(r.x),",",i(r.y),",",i(k.x),",",i(k.y))}else if(f.type=="at"||f.type=="wa"){b.push(" ",f.type," ");var k=this.b(f.x,f.y),s=this.b(f.xStart,f.yStart),t=this.b(f.xEnd,f.yEnd);b.push(i(k.x-this.d*f.radius),",",i(k.y-this.e*f.radius)," ",i(k.x+this.d*f.radius),",",i(k.y+this.e*f.radius)," ",i(s.x),",",i(s.y)," ",i(t.x),",",i(t.y))}if(k){if(l.x==null||k.x<l.x){l.x=k.x}if(n.x==null||k.x>n.x){n.x=k.x}if(l.y==
|
||||||
|
null||k.y<l.y){l.y=k.y}if(n.y==null||k.y>n.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;o<this.fillStyle.h.length;o++){var u=
|
||||||
|
this.fillStyle.h[o];y.push(u.offset*B+z,"% ",u.color,",");if(u.offset>C.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset<D.offset||D.offset==null){D.offset=u.offset;D.color=u.color}}y.pop();b.push("<g_vml_:fill",' color="',D.color,'"',' color2="',C.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',v.x,", ",v.y,'"',' colors="',y.join(""),'"',' opacity="',e,'" />')}else if(a){b.push('<g_vml_:fill color="',d,'" opacity="',e,'" />')}else{b.push("<g_vml_:stroke",' opacity="',
|
||||||
|
e,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',S(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',d,'" />')}b.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a);
|
||||||
|
this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o=
|
||||||
|
0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()};
|
|
@ -0,0 +1,204 @@
|
||||||
|
function Graph(container, id, options, transform, legend) {
|
||||||
|
if( !options ) options = { };
|
||||||
|
|
||||||
|
this.id = id;
|
||||||
|
this.cols = 100;
|
||||||
|
this.type = "line";
|
||||||
|
this.options = options;
|
||||||
|
this.transform = transform;
|
||||||
|
this.dataset = {};
|
||||||
|
this.legend = legend;
|
||||||
|
this.lastvalue = {};
|
||||||
|
|
||||||
|
var name = (options.instanceNames && options.instanceNames[id])
|
||||||
|
? options.instanceNames[id] : id;
|
||||||
|
var graph = document.createElement('div');
|
||||||
|
var label = document.createElement('h2');
|
||||||
|
label.innerHTML = options.title
|
||||||
|
? options.title.replace("%s", name) : name;
|
||||||
|
|
||||||
|
container.appendChild( label );
|
||||||
|
container.appendChild( graph );
|
||||||
|
|
||||||
|
this.canvas = document.createElement('canvas');
|
||||||
|
graph.appendChild( this.canvas );
|
||||||
|
|
||||||
|
this.canvas.id = id;
|
||||||
|
this.canvas.width = ( options.width || graph.offsetWidth - 20 );
|
||||||
|
this.canvas.height = ( options.height || 300 );
|
||||||
|
}
|
||||||
|
|
||||||
|
Graph.prototype.addDataset = function(name, ds) {
|
||||||
|
if( !this.layout ) {
|
||||||
|
this.layout = new PlotKit.Layout( this.type, this.options );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !ds ) {
|
||||||
|
ds = new Array();
|
||||||
|
for( var i = 0; i < this.cols; i++ )
|
||||||
|
ds[i] = new Array( i, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dataset[name] = ds;
|
||||||
|
this.layout.addDataset(name, ds);
|
||||||
|
}
|
||||||
|
|
||||||
|
Graph.prototype.updateDataset = function(name, value) {
|
||||||
|
if( this.dataset[name] ) {
|
||||||
|
var ds = this.dataset[name];
|
||||||
|
|
||||||
|
for( var i = 1; i < this.cols; i++ )
|
||||||
|
ds[i-1][1] = ds[i][1];
|
||||||
|
|
||||||
|
value = Math.abs( parseFloat(value) || 0 );
|
||||||
|
|
||||||
|
if( this.transform ) {
|
||||||
|
var orgvalue = value;
|
||||||
|
value = (this.lastvalue[name]) ? this.transform(value, this.lastvalue[name]) : 0;
|
||||||
|
this.lastvalue[name] = orgvalue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ds[this.cols-1][1] = value;
|
||||||
|
this.layout.addDataset(name, ds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Graph.prototype.draw = function( options ) {
|
||||||
|
if( this.layout ) {
|
||||||
|
this.plotter = new PlotKit.CanvasRenderer(
|
||||||
|
this.canvas, this.layout, this.options || options || {}
|
||||||
|
);
|
||||||
|
|
||||||
|
this.layout.evaluate();
|
||||||
|
this.plotter.render();
|
||||||
|
|
||||||
|
legend_opt = {
|
||||||
|
"legendStyle": 'li'
|
||||||
|
};
|
||||||
|
|
||||||
|
legend = new LegendRenderer(this.legend, this.layout, legend_opt);
|
||||||
|
legend.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Graph.prototype.redraw = function() {
|
||||||
|
if( this.layout && this.plotter ) {
|
||||||
|
this.layout.evaluate();
|
||||||
|
this.plotter.clear();
|
||||||
|
this.plotter.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function GraphRPC(container, uri, action, interval, datasources, options, transform, legend) {
|
||||||
|
this.ds = datasources;
|
||||||
|
this.uri = uri
|
||||||
|
this.action = action;
|
||||||
|
this.options = options || { };
|
||||||
|
this.container = container;
|
||||||
|
this.transform = transform;
|
||||||
|
this.proxy = new MochiKit.JsonRpc.JsonRpcProxy(uri, [action]);
|
||||||
|
this.graphs = new Object();
|
||||||
|
this.legend = legend;
|
||||||
|
|
||||||
|
this.requestData();
|
||||||
|
|
||||||
|
if( interval ) {
|
||||||
|
var self = this;
|
||||||
|
window.setInterval(function(){self.requestData()}, interval);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GraphRPC.prototype.requestData = function() {
|
||||||
|
var r = this.proxy[this.action](); var self = this;
|
||||||
|
r.addCallback(function(r){ self.dispatchResponse(r) });
|
||||||
|
r.addErrback(function(e){ throw('Error: ' + e) });
|
||||||
|
}
|
||||||
|
|
||||||
|
GraphRPC.prototype.dispatchResponse = function(response) {
|
||||||
|
var instances;
|
||||||
|
if( this.options.instances ) {
|
||||||
|
instances = this.options.instances;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
instances = new Array();
|
||||||
|
for( var instance in response ) {
|
||||||
|
instances[instances.length] = instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for( var j = 0; j < instances.length; j++ ) {
|
||||||
|
var instance = instances[j];
|
||||||
|
|
||||||
|
if( this.options.separateDS ) {
|
||||||
|
for( var i = 0; i < this.ds.length; i += 2 ) {
|
||||||
|
var name = this.ds[i+1] || this.ds[i];
|
||||||
|
var gid = instance + '-' + name;
|
||||||
|
var otle = this.options.title || instance;
|
||||||
|
|
||||||
|
if( !this.graphs[gid] ) {
|
||||||
|
this.options.title = otle.replace('%s', instance) + ': ' + name;
|
||||||
|
this.graphs[gid] = new Graph(
|
||||||
|
this.container, gid, this.options, this.transform, this.legend
|
||||||
|
);
|
||||||
|
|
||||||
|
this.graphs[gid].addDataset(name);
|
||||||
|
this.graphs[gid].draw();
|
||||||
|
this.options.title = otle;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var datum = null;
|
||||||
|
if (typeof (this.ds[i]) == "function") {
|
||||||
|
datum = this.ds[i](
|
||||||
|
instance ? response[instance] : response
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
datum = instance
|
||||||
|
? response[instance][this.ds[i]]
|
||||||
|
: response[this.ds[i]]
|
||||||
|
}
|
||||||
|
this.graphs[gid].updateDataset(
|
||||||
|
name, datum
|
||||||
|
);
|
||||||
|
this.graphs[gid].redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var gid = instance || 'livegraph';
|
||||||
|
if( !this.graphs[gid] ) {
|
||||||
|
this.graphs[gid] = new Graph(
|
||||||
|
this.container, gid, this.options, this.transform, this.legend
|
||||||
|
);
|
||||||
|
|
||||||
|
for( var i = 0; i < this.ds.length; i += 2 ) {
|
||||||
|
var name = this.ds[i+1] || this.ds[i];
|
||||||
|
this.graphs[gid].addDataset(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.graphs[gid].draw();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for( var i = 0; i < this.ds.length; i += 2 ) {
|
||||||
|
var name = this.ds[i+1] || this.ds[i];
|
||||||
|
var datum = null;
|
||||||
|
if (typeof (this.ds[i]) == "function") {
|
||||||
|
datum = this.ds[i](
|
||||||
|
instance ? response[instance] : response
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
datum = instance
|
||||||
|
? response[instance][this.ds[i]]
|
||||||
|
: response[this.ds[i]]
|
||||||
|
}
|
||||||
|
this.graphs[gid].updateDataset(
|
||||||
|
name, datum
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.graphs[gid].redraw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,220 @@
|
||||||
|
/* MochiKit.JsonRpc */
|
||||||
|
|
||||||
|
if (typeof(dojo) != 'undefined') {
|
||||||
|
dojo.provide("MochiKit.JsonRpc");
|
||||||
|
dojo.require("MochiKit.Base");
|
||||||
|
dojo.require("MochiKit.DOM");
|
||||||
|
dojo.require("MochiKit.Async");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof(JSAN) != 'undefined') {
|
||||||
|
JSAN.use("MochiKit.Base", []);
|
||||||
|
JSAN.use("MochiKit.DOM", []);
|
||||||
|
JSAN.use("MochiKit.Async", []);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (typeof(MochiKit.Base) == 'undefined' ||
|
||||||
|
typeof(MochiKit.DOM) == 'undefined' ||
|
||||||
|
typeof(MochiKit.Async) == 'undefined') {
|
||||||
|
throw "";
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
throw "MochiKit.JsonRpc depends on MochiKit.Base, MochiKit.DOM and MochiKit.Async";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof(MochiKit.JsonRpc) == 'undefined') {
|
||||||
|
MochiKit.JsonRpc = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.NAME = "MochiKit.JsonRpc";
|
||||||
|
MochiKit.JsonRpc.VERSION = "0.90";
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.__repr__ = function () {
|
||||||
|
return "[" + this.NAME + " " + this.VERSION + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.toString = function () {
|
||||||
|
return this.__repr__();
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.JsonRpcError = function (message) {
|
||||||
|
this.message = message;
|
||||||
|
this.name = 'JsonRpcError';
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.JsonRpcError.prototype = new Error();
|
||||||
|
MochiKit.JsonRpc.JsonRpcError.prototype.repr = function () {
|
||||||
|
return 'JsonRpcError(' + this.message + ')';
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.JsonRpcError.prototype.toString = function () {
|
||||||
|
return this.repr();
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.jsonObject = function (o) {
|
||||||
|
var attrs=[];
|
||||||
|
for(attr in o){
|
||||||
|
if(typeof o[attr] != "function"){
|
||||||
|
attrs.push('"' + attr + '": ' + json(o[attr]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "{" + attrs.join(", ") + "}";
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.isObject = function (o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.jsonArray = function (o) {
|
||||||
|
return "[" + MochiKit.Base.map(json, o).join(", ") + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
var MB = MochiKit.Base
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.jsonRegistry = new MochiKit.Base.AdapterRegistry();
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register('arrayLike',MB.isArrayLike,MochiKit.JsonRpc.jsonArray);
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register("string", MB.typeMatcher("string"), MB.reprString);
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register("numbers", MB.typeMatcher("number", "boolean"), MB.reprNumber);
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register("undefined", MB.isUndefined, MB.reprUndefined);
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register("null", MB.isNull, MB.reprNull);
|
||||||
|
MochiKit.JsonRpc.jsonRegistry.register("objectLike", MochiKit.JsonRpc.isObject, MochiKit.JsonRpc.jsonObject);
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.json = function (o) {
|
||||||
|
try {
|
||||||
|
if (typeof(o.__json__) == 'function') {
|
||||||
|
return o.__json__();
|
||||||
|
} else if (typeof(o.json) == 'function' && o.json != arguments.callee) {
|
||||||
|
return o.json();
|
||||||
|
}
|
||||||
|
return jsonRegistry.match(o);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof(o.NAME) == 'string' && (
|
||||||
|
o.toString == Function.prototype.toString ||
|
||||||
|
o.toString == Object.prototype.toString
|
||||||
|
)) {
|
||||||
|
return o.NAME;
|
||||||
|
}
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.JsonRpcCall = function (method,params) {
|
||||||
|
this.method = method;
|
||||||
|
this.params = params;
|
||||||
|
this.id = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.JsonRpcProxy = function (url,methNames) {
|
||||||
|
MochiKit.Base.bindMethods(this);
|
||||||
|
this.url = url;
|
||||||
|
if (methNames) {
|
||||||
|
MochiKit.Base.map(this._proxyMethod,methNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
update(MochiKit.JsonRpc.JsonRpcProxy.prototype, {
|
||||||
|
'call': function () {
|
||||||
|
var arglist = MochiKit.Base.map(null,arguments)
|
||||||
|
var methname = arglist.shift()
|
||||||
|
log(arglist);
|
||||||
|
var callobj = new MochiKit.JsonRpc.JsonRpcCall(methname,arglist);
|
||||||
|
var callstr = json(callobj);
|
||||||
|
var req = MochiKit.Async.getXMLHttpRequest();
|
||||||
|
req.open("POST",this.url,true);
|
||||||
|
req.setRequestHeader("Content-Type","text/plain");
|
||||||
|
req.setRequestHeader("Content-Length",callstr.length);
|
||||||
|
var d = MochiKit.Async.sendXMLHttpRequest(req,callstr);
|
||||||
|
d.addCallback(MochiKit.Async.evalJSONRequest);
|
||||||
|
d.addCallback(this._extractResult);
|
||||||
|
|
||||||
|
return d
|
||||||
|
},
|
||||||
|
'addSingleMethod': function (methName) {
|
||||||
|
if (methName) {
|
||||||
|
this._proxyMethod(methName);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'addMethods': function (methNames) {
|
||||||
|
if (methNames) {
|
||||||
|
MochiKit.Base.map(this._proxyMethod,methNames);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'_extractResult': function (resp) {
|
||||||
|
if (!resp.error){
|
||||||
|
return resp.result;
|
||||||
|
} else {
|
||||||
|
throw new MochiKit.JsonRpc.JsonRpcError(resp.error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'_proxyMethod': function (methname) {
|
||||||
|
this[methname] = MochiKit.Base.partial(this.call,methname);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.DomObjectFromJson = function (){
|
||||||
|
var retval = false;
|
||||||
|
if (arguments.length == 1) {
|
||||||
|
var arg = arguments[0];
|
||||||
|
if (typeof(arg) == 'string'){
|
||||||
|
retval = MochiKit.DOM.SPAN(null,arg);
|
||||||
|
} else {
|
||||||
|
var objrepr = arguments[0];
|
||||||
|
var elem = document.createElement(objrepr[0]);
|
||||||
|
var attrs = objrepr[1];
|
||||||
|
if (attrs) {
|
||||||
|
MochiKit.DOM.updateNodeAttributes(elem, attrs);
|
||||||
|
}
|
||||||
|
if (objrepr.length >= 3){
|
||||||
|
var extraobj = objrepr[2]
|
||||||
|
for (var i=0;i<extraobj.length;i++) {
|
||||||
|
var value = MochiKit.JsonRpc.DomObjectFromJson(extraobj[i]);
|
||||||
|
if (value) {
|
||||||
|
elem.appendChild(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
retval = elem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
};
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.EXPORT = [
|
||||||
|
"JsonRpcError",
|
||||||
|
"JsonRpcProxy",
|
||||||
|
];
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.EXPORT_OK = [
|
||||||
|
"jsonObject",
|
||||||
|
"jsonArray",
|
||||||
|
"jsonRegistry",
|
||||||
|
"json",
|
||||||
|
"JsonRpcCall",
|
||||||
|
"DomObjectFromJson",
|
||||||
|
];
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.__new__ = function () {
|
||||||
|
|
||||||
|
this.EXPORT_TAGS = {
|
||||||
|
":common": this.EXPORT,
|
||||||
|
":all": MochiKit.Base.concat(this.EXPORT, this.EXPORT_OK)
|
||||||
|
};
|
||||||
|
|
||||||
|
MochiKit.Base.nameFunctions(this);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
MochiKit.JsonRpc.__new__();
|
||||||
|
|
||||||
|
if ((typeof(JSAN) == 'undefined' && typeof(dojo) == 'undefined')
|
||||||
|
|| (typeof(MochiKit.__compat__) == 'boolean' && MochiKit.__compat__)) {
|
||||||
|
(function (self) {
|
||||||
|
var all = self.EXPORT_TAGS[":all"];
|
||||||
|
for (var i = 0; i < all.length; i++) {
|
||||||
|
this[all[i]] = self[all[i]];
|
||||||
|
}
|
||||||
|
})(MochiKit.JsonRpc);
|
||||||
|
}
|
|
@ -0,0 +1,228 @@
|
||||||
|
/*
|
||||||
|
PlotKit Legend
|
||||||
|
==============
|
||||||
|
|
||||||
|
Handles laying out legend into a DIV element.
|
||||||
|
Design taken from comments of Julien Wajsberg (http://
|
||||||
|
groups.google.com/group/plotkit/browse_thread/thread/2494bd88e6e9956d)
|
||||||
|
and Niel Domingo (http://nieldomingo.blogspot.com/2007/03/legend-
|
||||||
|
for-plotkit-bar-charts.html).
|
||||||
|
|
||||||
|
Copyright
|
||||||
|
---------
|
||||||
|
Copyright 2007 (c) Ashley Martens <ashleym_72^yahoo.com>
|
||||||
|
For use under the BSD license. <http://www.liquidx.net/plotkit>
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (typeof(MochiKit.Base) == 'undefined' ||
|
||||||
|
typeof(MochiKit.DOM) == 'undefined' ||
|
||||||
|
typeof(MochiKit.Color) == 'undefined' ||
|
||||||
|
typeof(MochiKit.Format) == 'undefined' ||
|
||||||
|
typeof(PlotKit.Layout) == 'undefined' ||
|
||||||
|
typeof(PlotKit.Base) == 'undefined')
|
||||||
|
{
|
||||||
|
throw "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof(PlotKit.LegendRenderer) == 'undefined') {
|
||||||
|
PlotKit.LegendRenderer = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer = function(element, layout, options) {
|
||||||
|
if (arguments.length > 0)
|
||||||
|
this.__init__(element, layout, options);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.NAME = "PlotKit.LegendRenderer";
|
||||||
|
PlotKit.LegendRenderer.VERSION = PlotKit.VERSION;
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.__repr__ = function() {
|
||||||
|
return "[" + this.NAME + " " + this.VERSION + "]";
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.toString = function() {
|
||||||
|
return this.__repr__();
|
||||||
|
}
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.prototype.__init__ = function(element, layout,
|
||||||
|
options) {
|
||||||
|
var isNil = MochiKit.Base.isUndefinedOrNull;
|
||||||
|
var Color = MochiKit.Color.Color;
|
||||||
|
|
||||||
|
this.options = {
|
||||||
|
"colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors()
|
||||||
|
[0]),
|
||||||
|
"legendStyle": "table",
|
||||||
|
"tableColumns": 1
|
||||||
|
};
|
||||||
|
MochiKit.Base.update(this.options, options ? options : {});
|
||||||
|
|
||||||
|
this.layout = layout;
|
||||||
|
this.element = MochiKit.DOM.getElement(element);
|
||||||
|
// --- check whether everything is ok before we return
|
||||||
|
|
||||||
|
if (isNil(this.element))
|
||||||
|
throw "CRILegend() - passed legend is not found";
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.prototype.render = function() {
|
||||||
|
var colorScheme = this.options.colorScheme;
|
||||||
|
var setNames = PlotKit.Base.keys(this.layout.datasets);
|
||||||
|
|
||||||
|
MochiKit.DOM.updateNodeAttributes(this.element,
|
||||||
|
{"style":
|
||||||
|
{"margin":"0"
|
||||||
|
,"padding":"0"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var ul = null;
|
||||||
|
if (this.options.legendStyle == "table")
|
||||||
|
ul = this._renderListTable(colorScheme, setNames);
|
||||||
|
else
|
||||||
|
ul = this._renderList(colorScheme, setNames);
|
||||||
|
MochiKit.DOM.appendChildNodes(this.element, ul);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.prototype._renderList = function(colorScheme,
|
||||||
|
setNames) {
|
||||||
|
var ul = document.createElement("ul");
|
||||||
|
ul.style.listStyle="none";
|
||||||
|
ul.style.margin="0";
|
||||||
|
ul.style.padding="0";
|
||||||
|
|
||||||
|
var colorCount = colorScheme.length;
|
||||||
|
var setCount = setNames.length;
|
||||||
|
|
||||||
|
for (var i = 0; i < setCount; i++) {
|
||||||
|
var setName = setNames[i];
|
||||||
|
var color = colorScheme[i%colorCount];
|
||||||
|
var le = this._renderElement(setName, color.toRGBString());
|
||||||
|
ul.appendChild(le);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ul;
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.prototype._renderElement = function(title,
|
||||||
|
color) {
|
||||||
|
var le = MochiKit.DOM.createDOM("li");
|
||||||
|
le.style.listStyle="none";
|
||||||
|
le.style.margin="0 0 5px 0";
|
||||||
|
le.style.padding="0";
|
||||||
|
|
||||||
|
var box = MochiKit.DOM.createDOM("div");
|
||||||
|
box.style.backgroundColor=color;
|
||||||
|
box.style.width="2em";
|
||||||
|
box.style.height=".9em";
|
||||||
|
box.style.border="1px solid black";
|
||||||
|
box.style.margin="0 5px 0 0";
|
||||||
|
box.style.padding="0";
|
||||||
|
box.style.float="left";
|
||||||
|
box.style.cssFloat="left";
|
||||||
|
box.style.clear="left";
|
||||||
|
box.style.cssClear="left";
|
||||||
|
|
||||||
|
var span = MochiKit.DOM.createDOM("span");
|
||||||
|
MochiKit.DOM.appendChildNodes(span,
|
||||||
|
document.createTextNode(title));
|
||||||
|
|
||||||
|
MochiKit.DOM.appendChildNodes(le, box, span);
|
||||||
|
|
||||||
|
return le;
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.LegendRenderer.prototype._renderListTable =
|
||||||
|
function(colorScheme, setNames) {
|
||||||
|
var tabhead = THEAD(null);
|
||||||
|
var tabfoot = TFOOT(null);
|
||||||
|
|
||||||
|
var tabbody = partial(TBODY, null);
|
||||||
|
var i = 0;
|
||||||
|
var colorcount = colorScheme.length;
|
||||||
|
var tabrow;
|
||||||
|
var columns = this.options.tableColumns;
|
||||||
|
for (var label in setNames)
|
||||||
|
{
|
||||||
|
var legendcolor = colorScheme[i%colorcount];
|
||||||
|
var legendbox = DIV({'class': 'legendbox', 'className':
|
||||||
|
'legendbox'});
|
||||||
|
legendbox.style.width = "10px";
|
||||||
|
legendbox.style.height = "10px";
|
||||||
|
legendbox.style.backgroundColor = legendcolor.toHexString();
|
||||||
|
legendbox.style.borderWidth = "1px";
|
||||||
|
legendbox.style.borderStyle = "solid";
|
||||||
|
legendbox.style.borderColor = "#000000";
|
||||||
|
var boxcell = TD(null, legendbox);
|
||||||
|
|
||||||
|
var labelcell = TD({'class': 'legendlabel', 'className':
|
||||||
|
'legendlabel'}, setNames[i]);
|
||||||
|
labelcell.style.font = 'normal 10pt arial';
|
||||||
|
|
||||||
|
if (!(i % columns))
|
||||||
|
{
|
||||||
|
tabrow = partial(TR, null);
|
||||||
|
}
|
||||||
|
tabrow = partial(tabrow, boxcell, labelcell);
|
||||||
|
if (i % columns)
|
||||||
|
{
|
||||||
|
tabrow = tabrow(null);
|
||||||
|
tabbody = partial(tabbody, tabrow);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if ((setNames % columns))
|
||||||
|
{
|
||||||
|
tabrow = tabrow(TD(null), TD(null));
|
||||||
|
tabbody = partial(tabbody, tabrow);
|
||||||
|
}
|
||||||
|
tabbody = tabbody(null);
|
||||||
|
|
||||||
|
tab = TABLE({'class': 'legendcontainer', 'className':
|
||||||
|
'legendcontainer'}, tabhead, tabfoot, tabbody);
|
||||||
|
tab.style.marginTop = '1em';
|
||||||
|
tab.style.marginLeft = '1.5em';
|
||||||
|
tab.style.marginBottom = '1em';
|
||||||
|
tab.style.borderWidth = '1px';
|
||||||
|
tab.style.borderStyle = 'solid';
|
||||||
|
tab.style.borderColor = '#000000';
|
||||||
|
|
||||||
|
return tab;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Namespace Iniitialisation
|
||||||
|
|
||||||
|
PlotKit.Legend = {}
|
||||||
|
PlotKit.Legend.LegendRenderer = PlotKit.LegendRenderer;
|
||||||
|
|
||||||
|
|
||||||
|
PlotKit.Legend.EXPORT = [
|
||||||
|
"LegendRenderer"
|
||||||
|
];
|
||||||
|
|
||||||
|
PlotKit.Legend.EXPORT_OK = [
|
||||||
|
"LegendRenderer"
|
||||||
|
];
|
||||||
|
|
||||||
|
PlotKit.Legend.__new__ = function() {
|
||||||
|
var m = MochiKit.Base;
|
||||||
|
|
||||||
|
m.nameFunctions(this);
|
||||||
|
|
||||||
|
this.EXPORT_TAGS = {
|
||||||
|
":common": this.EXPORT,
|
||||||
|
":all": m.concat(this.EXPORT, this.EXPORT_OK)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
PlotKit.Legend.__new__();
|
||||||
|
MochiKit.Base._exportSymbols(this, PlotKit.Legend);
|
4800
applications/luci-livestats/htdocs/luci-static/resources/livestats/MochiKit.js
vendored
Normal file
4800
applications/luci-livestats/htdocs/luci-static/resources/livestats/MochiKit.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
29
applications/luci-livestats/luasrc/controller/livestats.lua
Normal file
29
applications/luci-livestats/luasrc/controller/livestats.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--[[
|
||||||
|
LuCI - Lua Configuration Interface
|
||||||
|
|
||||||
|
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||||
|
Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
]]--
|
||||||
|
|
||||||
|
module("luci.controller.livestats", package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
require("luci.i18n")
|
||||||
|
luci.i18n.loadc("livestats")
|
||||||
|
|
||||||
|
entry( {"admin", "status", "wifistat"}, template("livestats/wireless"), luci.i18n.translate("livestats_stat_wireless"), 90 ).i18n = "livestats"
|
||||||
|
entry( {"admin", "status", "trafstat"}, template("livestats/traffic"), luci.i18n.translate("livestats_stat_traffic"), 91 ).i18n = "livestats"
|
||||||
|
entry( {"admin", "status", "loadavg"}, template("livestats/loadavg"), luci.i18n.translate("livestats_stat_loadavg"), 92 ).i18n = "livestats"
|
||||||
|
|
||||||
|
entry( {"mini", "network", "wifistat"}, template("livestats/wireless"), luci.i18n.translate("livestats_stat_wireless"), 90 ).i18n = "livestats"
|
||||||
|
entry( {"mini", "network", "trafstat"}, template("livestats/traffic"), luci.i18n.translate("livestats_stat_traffic"), 91 ).i18n = "livestats"
|
||||||
|
entry( {"mini", "system", "loadavg"}, template("livestats/loadavg"), luci.i18n.translate("livestats_stat_loadavg"), 92 ).i18n = "livestats"
|
||||||
|
end
|
8
applications/luci-livestats/luasrc/i18n/livestats.de.lua
Normal file
8
applications/luci-livestats/luasrc/i18n/livestats.de.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
livestats_incoming = "eingehend"
|
||||||
|
livestats_outgoing = "ausgehend"
|
||||||
|
livestats_traffic = "Netzverkehr auf"
|
||||||
|
livestats_wifi = "Signal-Rauschabstand für"
|
||||||
|
livestats_loadavg = "Durchschnittliche Systemlast"
|
||||||
|
livestats_stat_wireless = "Echtzeit-Drahtlosstatus"
|
||||||
|
livestats_stat_traffic = "Echtzeit-Netzwerkverkehr"
|
||||||
|
livestats_stat_loadavg = "Echtzeit-Systemlast"
|
8
applications/luci-livestats/luasrc/i18n/livestats.el.lua
Normal file
8
applications/luci-livestats/luasrc/i18n/livestats.el.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
livestats_incoming = "εισερχόμενα"
|
||||||
|
livestats_outgoing = "εξερχόμενα"
|
||||||
|
livestats_traffic = "κίνηση σε"
|
||||||
|
livestats_wifi = "σηματοθορυβικός λόγος για"
|
||||||
|
livestats_loadavg = "μέσος όρος φόρτου"
|
||||||
|
livestats_stat_wireless = "Στατιστικά Ασύρματου σε Πραγμ. Χρόνο"
|
||||||
|
livestats_stat_traffic = "Κίνηση Δικτύου σε Πραγμ. Χρόνο"
|
||||||
|
livestats_stat_loadavg = "Φόρτος Συστήματος σε Πραγμ. Χρόνο"
|
8
applications/luci-livestats/luasrc/i18n/livestats.en.lua
Normal file
8
applications/luci-livestats/luasrc/i18n/livestats.en.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
livestats_incoming = "incoming"
|
||||||
|
livestats_outgoing = "outgoing"
|
||||||
|
livestats_traffic = "traffic on"
|
||||||
|
livestats_wifi = "signal-to-noise ratio for"
|
||||||
|
livestats_loadavg = "load average"
|
||||||
|
livestats_stat_wireless = "Realtime Wireless Status"
|
||||||
|
livestats_stat_traffic = "Realtime Network Traffic"
|
||||||
|
livestats_stat_loadavg = "Realtime System Load"
|
|
@ -0,0 +1,33 @@
|
||||||
|
<%+header%>
|
||||||
|
|
||||||
|
<!--[if IE]><script type="text/javascript" src="<%=resource%>/livestats/ExCanvas.js"></script><![endif]-->
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/MochiKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/JsonRpc.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/PlotKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/GraphRPC.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/Legend.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function initGraphs() {
|
||||||
|
var rpc = new GraphRPC(
|
||||||
|
document.getElementById('live_graphs'),
|
||||||
|
'<%=luci.dispatcher.build_url('rpc', 'sys')%>', 'loadavg',
|
||||||
|
2000,
|
||||||
|
|
||||||
|
// Data sources
|
||||||
|
[ 0, "1 min", 1, "5 min", 2, "15 min" ],
|
||||||
|
|
||||||
|
// Graph layout options
|
||||||
|
{ title: '<%:livestats_loadavg%>', strokeWidth: 2.5, shouldFill: false, strokeColor: null,
|
||||||
|
padding: { left: 70, right: 10, top: 10, bottom: 20 },
|
||||||
|
instances: [ false ], yAxis: [ 0, 2 ], drawBackground: false },
|
||||||
|
null,
|
||||||
|
'live_graphs'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.DOM.addLoadEvent(initGraphs);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="live_graphs"></div>
|
||||||
|
<%+footer%>
|
|
@ -0,0 +1,66 @@
|
||||||
|
<%+header%>
|
||||||
|
|
||||||
|
<!--[if IE]><script type="text/javascript" src="<%=resource%>/livestats/ExCanvas.js"></script><![endif]-->
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/MochiKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/JsonRpc.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/PlotKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/GraphRPC.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/Legend.js"></script>
|
||||||
|
|
||||||
|
<%
|
||||||
|
local interfaces = { }
|
||||||
|
local ifnames = {}
|
||||||
|
local uci = luci.model.uci.cursor_state()
|
||||||
|
|
||||||
|
uci:foreach("network", "interface",
|
||||||
|
function(s)
|
||||||
|
if s.ifname ~= "lo" then
|
||||||
|
table.insert( interfaces,
|
||||||
|
"'" .. ( s.ifname or s['.name'] ) .. "'"
|
||||||
|
)
|
||||||
|
ifnames[s.ifname or s['.name']] = s['.name']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
-%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function initGraphs() {
|
||||||
|
var rpc = new GraphRPC(
|
||||||
|
document.getElementById('live_graphs'),
|
||||||
|
'<%=luci.dispatcher.build_url('rpc', 'sys')%>', 'net.deviceinfo',
|
||||||
|
2000,
|
||||||
|
|
||||||
|
// Data sources
|
||||||
|
[ "0", "<%:livestats_incoming%> (kiB/s)", "8", "<%:livestats_outgoing%> (kiB/s)" ],
|
||||||
|
|
||||||
|
// Graph layout options
|
||||||
|
{
|
||||||
|
shouldFill: false,
|
||||||
|
drawBackground: false,
|
||||||
|
strokeColor: null,
|
||||||
|
title: '<%:livestats_traffic%> %s',
|
||||||
|
strokeWidth: 2.5, height: 140,
|
||||||
|
padding: { left: 70, right: 10, top: 10, bottom: 20 },
|
||||||
|
instances: [ <%=table.concat(interfaces, ", ") %> ],
|
||||||
|
instanceNames: {
|
||||||
|
<%- for iface, network in pairs(ifnames) do %>
|
||||||
|
<%-="%q:%q," % {iface, network}-%>
|
||||||
|
<% end %>
|
||||||
|
"0": ""
|
||||||
|
}},
|
||||||
|
|
||||||
|
// transform function
|
||||||
|
function (cur, last) {
|
||||||
|
return (cur - last) / 2048;
|
||||||
|
},
|
||||||
|
'live_graphs'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.DOM.addLoadEvent(initGraphs);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="live_graphs"></div>
|
||||||
|
|
||||||
|
<%+footer%>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<%+header%>
|
||||||
|
|
||||||
|
<!--[if IE]><script type="text/javascript" src="<%=resource%>/livestats/ExCanvas.js"></script><![endif]-->
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/MochiKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/JsonRpc.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/PlotKit.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/GraphRPC.js"></script>
|
||||||
|
<script type="text/javascript" src="<%=resource%>/livestats/Legend.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function initGraphs() {
|
||||||
|
var rpc = new GraphRPC(
|
||||||
|
document.getElementById('live_graphs'),
|
||||||
|
'<%=luci.dispatcher.build_url('rpc', 'sys')%>', 'wifi.getiwconfig',
|
||||||
|
1500,
|
||||||
|
|
||||||
|
// Data sources
|
||||||
|
[ function(data) {
|
||||||
|
return parseFloat(data["Signal level"])
|
||||||
|
- parseFloat(data["Noise level"]);
|
||||||
|
}, "S/N (dBm)"],
|
||||||
|
|
||||||
|
// Graph layout options
|
||||||
|
{ drawBackground: false, yAxis: [ 0, 50 ],
|
||||||
|
title: '<%:livestats_wifi%> %s',
|
||||||
|
padding: { left: 40, right: 10, top: 10, bottom: 20 },
|
||||||
|
instanceNames: {
|
||||||
|
<%- for k,v in pairs(luci.sys.wifi.getiwconfig()) do %>
|
||||||
|
<%-="%q:%q," % {k, "%s (%s)" % {k, luci.util.pcdata(tostring(v.ESSID))}}-%>
|
||||||
|
<% end %>
|
||||||
|
"0": ""
|
||||||
|
}},
|
||||||
|
null,
|
||||||
|
'live_graphs'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
MochiKit.DOM.addLoadEvent(initGraphs);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="live_graphs"></div>
|
||||||
|
|
||||||
|
<%+footer%>
|
5
applications/luci-mmc_over_gpio/ipkg/postinst
Normal file
5
applications/luci-mmc_over_gpio/ipkg/postinst
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
[ -n "${IPKG_INSTROOT}" ] || {
|
||||||
|
( . /etc/uci-defaults/luci-mmc_over_gpio ) && rm -f /etc/uci-defaults/luci-mmc_over_gpio
|
||||||
|
/etc/init.d/mmc_over_gpio enabled || /etc/init.d/mmc_over_gpio enable
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
--[[
|
||||||
|
|
||||||
|
LuCI mmc_over_gpio
|
||||||
|
(c) 2008 Yanira <forum-2008@email.de>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
module("luci.controller.mmc_over_gpio", package.seeall)
|
||||||
|
|
||||||
|
function index()
|
||||||
|
require("luci.i18n")
|
||||||
|
luci.i18n.loadc("mmc_over_gpio")
|
||||||
|
if not luci.fs.access("/etc/config/mmc_over_gpio") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("mmc_over_gpio", "mmc_over_gpio"), 60)
|
||||||
|
page.i18n = "mmc_over_gpio"
|
||||||
|
page.dependent = true
|
||||||
|
end
|
|
@ -0,0 +1,3 @@
|
||||||
|
mmc_over_gpio = 'MMC/SD Treiberkonfiguration'
|
||||||
|
mmc_over_gpio_desc = 'Konfiguriert die Einstellungen des MMC/SD Karten Treibers'
|
||||||
|
settings = 'Einstellungen'
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio">MMC/SD Treiberkonfiguration</i18n:msg>
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio_desc">Konfiguriert die Einstellungen des MMC/SD Karten Treibers</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Einstellungen</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
|
@ -0,0 +1,3 @@
|
||||||
|
mmc_over_gpio = 'MMC/SD driver configuration'
|
||||||
|
mmc_over_gpio_desc = 'MMC/SD driver configuration'
|
||||||
|
settings = 'Settings'
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio">MMC/SD driver configuration</i18n:msg>
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio_desc">MMC/SD driver configuration</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Settings</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
|
@ -0,0 +1,3 @@
|
||||||
|
mmc_over_gpio = 'Configuração do driver MMC/SD'
|
||||||
|
mmc_over_gpio_desc = 'Configuração do driver MMC/SD'
|
||||||
|
settings = 'Configurações'
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio">Configuração do driver MMC/SD</i18n:msg>
|
||||||
|
<i18n:msg xml:id="mmc_over_gpio_desc">Configuração do driver MMC/SD</i18n:msg>
|
||||||
|
<i18n:msg xml:id="settings">Configurações</i18n:msg>
|
||||||
|
|
||||||
|
</i18n:msgs>
|
|
@ -0,0 +1,41 @@
|
||||||
|
--[[
|
||||||
|
|
||||||
|
LuCI mmc_over_gpio
|
||||||
|
(c) 2008 Yanira <forum-2008@email.de>
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
]]--
|
||||||
|
|
||||||
|
m = Map("mmc_over_gpio", translate("mmc_over_gpio"),
|
||||||
|
translate("mmc_over_gpio_desc"))
|
||||||
|
|
||||||
|
s = m:section(TypedSection, "mmc_over_gpio", translate("settings"))
|
||||||
|
s.addremove = true
|
||||||
|
s.anonymous = true
|
||||||
|
|
||||||
|
s:option(Flag, "enabled", translate("enabled", "Enable"))
|
||||||
|
|
||||||
|
s:option(Value, "name", translate("name"))
|
||||||
|
|
||||||
|
pin = s:option(Value, "DI_pin", translate("DI_pin"))
|
||||||
|
for i = 0,7 do pin:value(i) end
|
||||||
|
|
||||||
|
pin = s:option(Value, "DO_pin", translate("DO_pin"))
|
||||||
|
for i = 0,7 do pin:value(i) end
|
||||||
|
|
||||||
|
pin = s:option(Value, "CLK_pin", translate("CLK_pin"))
|
||||||
|
for i = 0,7 do pin:value(i) end
|
||||||
|
|
||||||
|
pin = s:option(Value, "CS_pin", translate("CS_pin"))
|
||||||
|
for i = 0,7 do pin:value(i) end
|
||||||
|
|
||||||
|
s:option(Value, "mode", translate("mode"))
|
||||||
|
|
||||||
|
return m
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
uci batch <<-EOF
|
||||||
|
add ucitrack mmc_over_gpio
|
||||||
|
set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio
|
||||||
|
commit ucitrack
|
||||||
|
EOF
|
|
@ -17,7 +17,7 @@ module("luci.controller.ntpc", package.seeall)
|
||||||
function index()
|
function index()
|
||||||
require("luci.i18n")
|
require("luci.i18n")
|
||||||
luci.i18n.loadc("ntpc")
|
luci.i18n.loadc("ntpc")
|
||||||
if not luci.fs.isfile("/etc/config/ntpclient") then
|
if not luci.fs.access("/etc/config/ntpclient") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function index()
|
||||||
page.dependent = true
|
page.dependent = true
|
||||||
|
|
||||||
|
|
||||||
local page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini"), luci.i18n.translate("ntpc"), 50)
|
local page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), luci.i18n.translate("ntpc"), 50)
|
||||||
page.i18n = "ntpc"
|
page.i18n = "ntpc"
|
||||||
page.dependent = true
|
page.dependent = true
|
||||||
end
|
end
|
9
applications/luci-ntpc/luasrc/i18n/ntpc.el.lua
Normal file
9
applications/luci-ntpc/luasrc/i18n/ntpc.el.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
ntpc = 'Συγχρονισμός Ώρας'
|
||||||
|
ntpc_desc = 'Συγχρονίζει την ώρα του συστήματος'
|
||||||
|
ntpc_timeserver = 'Εξυπηρετητής Ώρας'
|
||||||
|
ntpc_interval = 'Περίοδος Ενημέρωσης (σε s)'
|
||||||
|
ntpc_count = 'Αριθμός Μετρήσεων Ώρας'
|
||||||
|
ntpc_count_desc = 'άδειο = άπειρος'
|
||||||
|
ntpc_drift = 'Ρύθμιση Ρολογιού'
|
||||||
|
ntpc_drift_freq = 'Συχνότητα Μετάθεσης'
|
||||||
|
ntpc_current = 'Τρέχουσα ώρα συστήματος'
|
9
applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.lua
Normal file
9
applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
ntpc = 'Sincronização de Horário'
|
||||||
|
ntpc_desc = 'Sincroniza a hora do sistema'
|
||||||
|
ntpc_timeserver = 'Servidor de Hora'
|
||||||
|
ntpc_interval = 'Intervalo de Atualização (em s)'
|
||||||
|
ntpc_count = 'Quantas vezes irá atualizar'
|
||||||
|
ntpc_count_desc = 'vazio = infinito'
|
||||||
|
ntpc_drift = 'Ajuste do Relógio'
|
||||||
|
ntpc_drift_freq = 'Frequência do Offset'
|
||||||
|
ntpc_current = 'Hora atual do sistema'
|
14
applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.xml
Normal file
14
applications/luci-ntpc/luasrc/i18n/ntpc.pt-br.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<i18n:msgs xmlns:i18n="http://luci.freifunk-halle.net/2008/i18n#" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
<i18n:msg xml:id="ntpc">Sincronização de Horário</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_desc">Sincroniza a hora do sistema</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_timeserver">Servidor de Hora</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_interval">Intervalo de Atualização (em s)</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_count">Quantas vezes irá atualizar</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_count_desc">vazio = infinito</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_drift">Ajuste do Relógio</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_drift_freq">Frequência do Offset</i18n:msg>
|
||||||
|
<i18n:msg xml:id="ntpc_current">Hora atual do sistema</i18n:msg>
|
||||||
|
</i18n:msgs>
|
|
@ -19,13 +19,13 @@ s.anonymous = true
|
||||||
|
|
||||||
s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c")
|
s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c")
|
||||||
|
|
||||||
s:option(Value, "interval", translate("ntpc_interval"))
|
s:option(Value, "interval", translate("ntpc_interval")).rmempty = true
|
||||||
s:option(Value, "count", translate("ntpc_count"), translate("ntpc_count_desc"))
|
s:option(Value, "count", translate("ntpc_count"), translate("ntpc_count_desc")).rmempty = true
|
||||||
|
|
||||||
|
|
||||||
s2 = m:section(TypedSection, "ntpdrift", translate("ntpc_drift"))
|
s2 = m:section(TypedSection, "ntpdrift", translate("ntpc_drift"))
|
||||||
s2.anonymous = true
|
s2.anonymous = true
|
||||||
s2:option(Value, "freq", translate("ntpc_drift_freq"))
|
s2:option(Value, "freq", translate("ntpc_drift_freq")).rmempty = true
|
||||||
|
|
||||||
|
|
||||||
s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
|
s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
|
||||||
|
|
|
@ -20,7 +20,7 @@ s.anonymous = true
|
||||||
|
|
||||||
s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c")
|
s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c")
|
||||||
|
|
||||||
s:option(Value, "interval", translate("ntpc_interval"))
|
s:option(Value, "interval", translate("ntpc_interval")).rmempty = true
|
||||||
|
|
||||||
|
|
||||||
s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
|
s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver"))
|
||||||
|
|
53
applications/luci-ntpc/root/lib/uci/schema/default/ntpclient
Normal file
53
applications/luci-ntpc/root/lib/uci/schema/default/ntpclient
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
package ntpclient
|
||||||
|
|
||||||
|
config package
|
||||||
|
option title 'Time Synchronisation'
|
||||||
|
|
||||||
|
config section
|
||||||
|
option name 'ntpclient'
|
||||||
|
option package 'ntpclient'
|
||||||
|
option title 'General'
|
||||||
|
option unique true
|
||||||
|
option required true
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'interval'
|
||||||
|
option section 'ntpclient.ntpclient'
|
||||||
|
option title 'Update Interval (in s)'
|
||||||
|
option datatype uint
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'count'
|
||||||
|
option section 'ntpclient.ntpclient'
|
||||||
|
option title 'Count of Time Measurements'
|
||||||
|
option datatype uint
|
||||||
|
|
||||||
|
config section
|
||||||
|
option name 'ntpdrift'
|
||||||
|
option package 'ntpclient'
|
||||||
|
option title 'Clock Adjustment'
|
||||||
|
option unique true
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'freq'
|
||||||
|
option section 'ntpclient.ntpdrift'
|
||||||
|
option title 'Offset Frequency'
|
||||||
|
option datatype float
|
||||||
|
|
||||||
|
config section
|
||||||
|
option name 'ntpserver'
|
||||||
|
option package 'ntpclient'
|
||||||
|
option title 'Time Server'
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'hostname'
|
||||||
|
option section 'ntpclient.ntpserver'
|
||||||
|
option title 'Hostname'
|
||||||
|
option required true
|
||||||
|
option datatype host
|
||||||
|
|
||||||
|
config variable
|
||||||
|
option name 'port'
|
||||||
|
option section 'ntpclient.ntpserver'
|
||||||
|
option title 'Port'
|
||||||
|
option datatype port
|
5
applications/luci-olsr/ipkg/postinst
Executable file
5
applications/luci-olsr/ipkg/postinst
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
[ -n "${IPKG_INSTROOT}" ] || {
|
||||||
|
( . /etc/uci-defaults/luci-olsr ) && rm -f /etc/uci-defaults/luci-olsr
|
||||||
|
/etc/init.d/olsrd enabled || /etc/init.d/olsrd enable
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue