cshark.lua 695 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. LuCI - Lua Configuration Interface
  3. Copyright (C) 2014, QA Cafe, Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. $Id$
  9. ]]--
  10. local fs = require "nixio.fs"
  11. m = Map("cshark", translate("CloudShark"))
  12. if fs.access("/etc/config/cshark") then
  13. m:section(SimpleSection).template = "cshark"
  14. s = m:section(TypedSection, "cshark", translate("Options"))
  15. s.anonymous = true
  16. s.addremove = false
  17. s:option(Value, "url", translate("CloudShark URL"))
  18. s:option(Value, "token", translate("CloudShark API token"))
  19. end
  20. return m