Merge pull request #1026 from danrl/mwan
[project/luci.git] / applications / luci-app-cshark / luasrc / model / cbi / admin_network / cshark.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright (C) 2014, QA Cafe, Inc.
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 local fs = require "nixio.fs"
16
17 m = Map("cshark", translate("CloudShark"))
18
19 if fs.access("/etc/config/cshark") then
20         m:section(SimpleSection).template = "cshark"
21
22         s = m:section(TypedSection, "cshark", translate("Options"))
23         s.anonymous = true
24         s.addremove = false
25
26         s:option(Value, "url", translate("CloudShark URL"))
27         s:option(Value, "token", translate("CloudShark API token"))
28 end
29
30 return m