zhangbo 5 éve
szülő
commit
6e5a73aa77

BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/libgo.a


+ 4 - 1
app/goahead-5.1.0/src/goahead.c

@@ -169,7 +169,10 @@ MAIN(goahead, int argc, char **argv, char **envp)
 #endif
 
 //add by lusa start 
-        websDefineAction("buy", buy);
+        websDefineAction("buy", buy);getCPUInfo
+
+        websDefineAction("getCPUInfo", getCPUInfo);
+         websDefineAction("getCardInfo", getCardInfo);
          websDefineAction("actionTest", actionTest);
         websDefineAction("deviceinfo", getDeviceInfo);
 

+ 3 - 1
app/goahead-5.1.0/src/route.txt

@@ -42,7 +42,9 @@ route uri=/action/login methods=POST handler=action redirect=200@/index.html red
 route uri=/action/logout methods=GET|POST handler=action redirect=200@/login.html
 route uri=/auth/form/ auth=form handler=continue abilities=manage redirect=401@/login.html
 
-route uri=/auth/deviceinfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+route uri=/action/getCardInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+route uri=/action/getCPUInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+route uri=/action/deviceinfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
 route uri=/auth/getDeviceInfoBak auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
 
 route uri=/action/person methods=GET|POST handler=action 

+ 5 - 4
app/goahead-5.1.0/src/web_interface/inc/dashboard.h

@@ -2,11 +2,12 @@
 #define __DASHBOARD_H__
 
 #include "goahead.h"
-
+/*获取设备信息*/
 void getDeviceInfo(Webs *wp);
-void getDeviceInfoBak(Webs *wp);
-
-
+/*获取cpu信息*/
+void getCPUInfo();
+/*获取刀片信息*/
+void getCardInfo()
 
 
 

+ 5 - 41
app/goahead-5.1.0/src/web_interface/src/dashboard.c

@@ -119,54 +119,18 @@ void getDeviceInfo(Webs *wp){
 }
 
 
+/*获取cpu信息*/
+void getCPUInfo(){
 
+}
 
 
-/*获取设备信息*/
-void getDeviceInfoBak(Webs *wp){
-    // logmsg(2, "--------------------ggggggggg----------------");
-
-    // uint16_t    wRet = LIBIPMI_E_SUCCESS;
-    // GetDevIDRes_T   DeviceID;
-    char BuildTime[30] = "2020-3-10";
-     char FwVersion[10] = "1.0";
-    // //Create session
-    // LIBIPMI_CreateSession(&wp->ipmi_session, 10);
-    // sprintf(BuildTime, "%s %s", __DATE__, __TIME__);
-    // wRet = IPMICMD_GetDeviceID( &wp->ipmi_session, &DeviceID, DEFAULT_TIMEOUT);
-    // if (wRet == LIBIPMI_E_SUCCESS)
-    // {
-    //     sprintf(FwVersion, "%d.%d", DeviceID.FirmwareRevision1, DeviceID.FirmwareRevision2);
-    // }
-    // printf("BuildTime: %s\n", BuildTime);
-    // printf("FwVersion: %s\n", FwVersion);
-    // //Close session
-    // LIBIPMI_CloseSession(&wp->ipmi_session );
-    // cchar *pStr;
-    // int code = 200;
-    // cJSON * root =  cJSON_CreateObject();
-    // cJSON * data =  cJSON_CreateObject();
-    // // cJSON * next =  cJSON_CreateObject();
-    // cJSON_AddItemToObject(root, "data", data);//根节点下添加
-    // cJSON_AddItemToObject(root, "msg", cJSON_CreateString(""));
-    // cJSON_AddItemToObject(root, "code", cJSON_CreateString("200"));
-    // cJSON_AddStringToObject(data, "BuildTime", BuildTime);
-    // cJSON_AddStringToObject(data, "FwVersion", FwVersion);
-
-    // pStr = cJSON_Print(root);
-
-    //printf("first json:\n%s\n", pStr);
+/*获取刀片信息*/
+void getCardInfo(){
 
-    websSetStatus(wp, 200);
-    websWriteHeaders(wp, -1, 0);
-    websWriteEndHeaders(wp); 
-    websWrite(wp, "[ {\"name\":\"kangkang\",\"age\":\"12\",\"gender\":\"male\"}, {\"name\":\"Jane\",\"age\":\"14\",\"gender\":\"female\"}]");
-    websFlush(wp, 0);
-    websDone(wp);
 }
 
 
-
 void buy(Webs *wp)
 {
     cchar    *name, *age;

+ 1 - 0
gd32450i-eval.initramfs

@@ -128,6 +128,7 @@ dir /var/www/goahead/static/img 755 0 0
 dir /var/www/goahead/static/js 755 0 0 
 file /etc/goahead/self.crt ${INSTALL_ROOT}/projects/${SAMPLE}/app/goahead-5.1.0/src/self.crt 755 0 0
 file /etc/goahead/self.key ${INSTALL_ROOT}/projects/${SAMPLE}/app/goahead-5.1.0/src/self.key 755 0 0
+dir /var/www/goahead/static/fonts 755 0 0
 file /etc/goahead/auth.txt ${INSTALL_ROOT}/projects/${SAMPLE}/app/goahead-5.1.0/src/auth.txt 755 0 0
 file /etc/goahead/route.txt ${INSTALL_ROOT}/projects/${SAMPLE}/app/goahead-5.1.0/src/route.txt 755 0 0
 

BIN
gd32450i-eval.uImage