Hello, reader!

My name is Eugene Lazutkin.

I'm a software developer based in the Dallas-Fort Worth metroplex. Lazutkin.com is my professional blog, which contains short writeups and presentations regarding modern web applications. All articles here are written by myself, unless stated otherwise.

OpenWrt GUI: preview is released

Update: this document is officially obsolete — alpha is released!

Finally I released a preview: /webui-0.1-pre-alpha.ipk!

I included two information applets and a simple network configuration applet. I think it would be enough for a proof of concept. I borrowed heavily from nbd’s webif. So if it works for you, it is due to his OpenWrt expertise. If it doesn’t, it is my fault.

Both webif and webui can be installed side by side:

  • For webif use http://your_openwrt_device/
  • For webui use http://your_openwrt_device/webui.html

Be forewarned:

  • It is extremely raw! Don’t try it on production units. I didn’t test all possible configuration modes.
  • It uses Dojo — arguably the best AJAX library around. In practice it means that some browsers are unsupported. It was tested with FireFox 1.5Beta2 & 1.0.4 (works), IE6 (works, there are some visual glitches, which will be addressed by Dojo team), Opera 8.50 (doesn’t work yet, I’ll investigate the problem later), and Konqueror 3.3.2 (works). You can see that you need a recent browser with relatively high level of JavaScript support.
  • Mac-heads, I don’t know, if it works with Safari. I couldn’t test it because I don’t have access to Mac. But I feel your pain! Eventually it will be supported.

The preview weighs about 50K. The good thing is when unpacked it is still 50-55K. Dojo library takes the most of it (~48K). When I add more applets to default distro, I don’t expect it to grow in size significantly. Applets can be added independently of webui as separate packages. They don’t need to include Dojo nor webui library.

Some notes on my code:

  • My code is included in uncompressed form. Later on it is going to be preprocessed to save some space. I encourage you to take a look at it. It’s not a marvel of software design being hacked up quickly, but it shows the framework
  • All applets use different rendering techniques:
    • "About" uses straight HTML without any JavaScript.
    • "Info" uses straight JavaScript generating all HTML on the fly.
    • "Network Configurator" uses combined approach using HTML as a boiler plate.
  • The idea was to evaluate different rendering approaches.
  • "Network Configurator" doesn’t go beyond NVRAM tweaking. Later on I’ll add DHCP and DNS control. Splitting of LAN and WLAN is another potential addition.
  • Two more applets are planned: IPKG and Firewall generator. If you have better ideas, please tell us.