Difference between revisions of "Luci Quick Start"

From Wiki for Dragino Project
Jump to: navigation, search
(Created page with "=Introduce= Dragino use Luci to generate its Web Interface. Luci mainly CBI models to manage the Linux Config files. Detail of the use/programm of Luci can refer below links: *[h...")
 
(More Examples)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Introduce=
+
=Introduction=
 
Dragino use Luci to generate its Web Interface. Luci mainly CBI models to manage the Linux Config files. Detail of the use/programm of Luci can refer below links:
 
Dragino use Luci to generate its Web Interface. Luci mainly CBI models to manage the Linux Config files. Detail of the use/programm of Luci can refer below links:
 
*[http://luci.subsignal.org/ Luci Official Site]
 
*[http://luci.subsignal.org/ Luci Official Site]
Line 6: Line 6:
 
<br>
 
<br>
 
<br>
 
<br>
 +
=Understand how to genetate a page=
 +
Each web page in Luci is an <span CLASS=greentext>Entry</span>. The Entry is defined in the luci controller directory: <span CLASS=greentext>/usr/lib/lua/luci/controller</span>. For example, the /usr/lib/lua/luci/controller/admin includes all the defination of the administrator Web UI.
 +
 +
When generate a Web Page, the entry may:
 +
*Call a simple action
 +
*Call a CBI model to manage Linux configuration.
 +
*Call a normal HTML template
 +
 +
A detail of how to use the Entry and some basic examples, can be found at this link:[http://luci.subsignal.org/trac/wiki/Documentation/ModulesHowTo HowTo: Write Modules]
 +
 +
Notice: After submit a change on controller files, user has to remove the luci cache files (under /var/luci-*) to take affect.
 +
 +
<br>
 +
<br>
 +
=More Examples=
 +
Dragino software includes the admin-full luci modules which includes the administrator web interface and lots of source code /examples.User can easily to test and change the Luci Web Interface by modifying these files. The main files location are:
 +
*Controller: /usr/lib/lua/luci/controller/admin
 +
*CBI module: /usr/lib/lua/luci/model/cbi
 +
*HTML-Template: /usr/lib/lua/luci/view

Latest revision as of 06:18, 13 October 2014

Introduction

Dragino use Luci to generate its Web Interface. Luci mainly CBI models to manage the Linux Config files. Detail of the use/programm of Luci can refer below links:



Understand how to genetate a page

Each web page in Luci is an Entry. The Entry is defined in the luci controller directory: /usr/lib/lua/luci/controller. For example, the /usr/lib/lua/luci/controller/admin includes all the defination of the administrator Web UI.

When generate a Web Page, the entry may:

  • Call a simple action
  • Call a CBI model to manage Linux configuration.
  • Call a normal HTML template

A detail of how to use the Entry and some basic examples, can be found at this link:HowTo: Write Modules

Notice: After submit a change on controller files, user has to remove the luci cache files (under /var/luci-*) to take affect.



More Examples

Dragino software includes the admin-full luci modules which includes the administrator web interface and lots of source code /examples.User can easily to test and change the Luci Web Interface by modifying these files. The main files location are:

  • Controller: /usr/lib/lua/luci/controller/admin
  • CBI module: /usr/lib/lua/luci/model/cbi
  • HTML-Template: /usr/lib/lua/luci/view