20160829_jeffrey - silenceuncrio/diary GitHub Wiki

Index

0930

review

1100

再度 commit

Revision: 444
Author: jeffrey
Date: 2016年8月29日 上午 10:58:36
Message:
Add lanst.cgi
- CGI for MODULE_LANST
- act=get done
- act=apply wait for implementing

Refactoring wanst.cgi

Refactoring iweb API

Refactoring CGI Class 101
- login to the M300 web, ex: http://192.168.1.1
- use the following path to see the result of each class
  - http://192.168.1.1/cgi-bin/class_101.cgi
  - http://192.168.1.1/cgi-bin/class_102.cgi
  - http://192.168.1.1/cgi-bin/class_103.cgi
  - http://192.168.1.1/cgi-bin/class_104.cgi

----
Modified : /fsl-release-bsp/proscend/prosrc/webcgi/Makefile
Modified : /fsl-release-bsp/proscend/prosrc/webcgi/iweb.c
Modified : /fsl-release-bsp/proscend/prosrc/webcgi/iweb.h
Added : /fsl-release-bsp/proscend/prosrc/webcgi/lanst.c
Modified : /fsl-release-bsp/proscend/prosrc/webcgi/wanst.c

覺得可以先利用 lanst.cgi 來琢磨一下 web

因為 http://192.168.1.1/cgi-bin/lanst.cgi?act=get 的回應非常簡單

{ "config": { "addr": "192.168.1.1", "mask": "255.255.255.0" }, "ok": true }

我可以使用最簡單的 html 搭配 jquery 作為最簡單的第一步

1130

思考 AngularJS AJAX - $http 當第一步的可能

1435

注意 AngularJs $http.post() does not send data 這個 issue

1635

繼續 commit

Revision: 447
Author: jeffrey
Date: 2016年8月29日 下午 04:25:30
Message:
Modify lanst.cgi
- act=apply - inform the _apply() be invoked only

----
Modified : /fsl-release-bsp/proscend/prosrc/webcgi/lanst.c

apply 第一步

Revision: 448
Author: jeffrey
Date: 2016年8月29日 下午 04:31:27
Message:
Add lanst.html
- CGI for MODULE_LANST
- act=get done
- act=apply wait for implementing

Add assets
- angular.min.js - 1.4.8
- bootstrap.min.css - 3.3.7
- myApp.js
  - fix issue: AngularJs $http.post() does not send data

----
Added : /fsl-release-bsp/proscend/prosrc/www/assets
Added : /fsl-release-bsp/proscend/prosrc/www/assets/angular.min.js
Added : /fsl-release-bsp/proscend/prosrc/www/assets/bootstrap.min.css
Added : /fsl-release-bsp/proscend/prosrc/www/assets/myApp.js
Added : /fsl-release-bsp/proscend/prosrc/www/lanst.html

可以說是今天的成果

包含解決 AngularJs $http.post() does not send data 這個 issue

而且也實作出傳統的 html form reset 行為