summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-cshark/luasrc/model/cbi
diff options
context:
space:
mode:
authordanrl <mail@danrl.com>2017-02-17 11:08:46 +0100
committerdanrl <mail@danrl.com>2017-02-17 11:08:46 +0100
commitd0cb158e34c20d0a78dc23cfd5757d10430e121f (patch)
treeeb71c074907ab759dd6c55701b5b3c4a70fe20b8 /applications/luci-app-cshark/luasrc/model/cbi
parent9726e26a7a2ea6052827472bfbec3c9914abedf8 (diff)
luci-app-cshark: initial commit
Moved over here from the packages repository. Signed-off-by: Dan Luedtke <mail@danrl.com>
Diffstat (limited to 'applications/luci-app-cshark/luasrc/model/cbi')
-rw-r--r--applications/luci-app-cshark/luasrc/model/cbi/admin_network/cshark.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/applications/luci-app-cshark/luasrc/model/cbi/admin_network/cshark.lua b/applications/luci-app-cshark/luasrc/model/cbi/admin_network/cshark.lua
new file mode 100644
index 0000000000..8db95596f8
--- /dev/null
+++ b/applications/luci-app-cshark/luasrc/model/cbi/admin_network/cshark.lua
@@ -0,0 +1,30 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright (C) 2014, QA Cafe, Inc.
+
+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$
+]]--
+
+local fs = require "nixio.fs"
+
+m = Map("cshark", translate("CloudShark"))
+
+if fs.access("/etc/config/cshark") then
+ m:section(SimpleSection).template = "cshark"
+
+ s = m:section(TypedSection, "cshark", translate("Options"))
+ s.anonymous = true
+ s.addremove = false
+
+ s:option(Value, "url", translate("CloudShark URL"))
+ s:option(Value, "token", translate("CloudShark API token"))
+end
+
+return m