zhangbo 3 years ago
parent
commit
7531fddcaf

+ 5 - 0
app/goahead-3.6.5/src/action.c

@@ -28,6 +28,11 @@ static bool actionHandler(Webs *wp)
     char        *cp, *actionName;
     char        *cp, *actionName;
     WebsAction  fn;
     WebsAction  fn;
 
 
+    char *index = websGetVar(wp, "index", NULL);  
+    printf("---1111111111111111111111111111> wp.index = %s\n", index);
+    uint8_t indexInt = atoi(index);
+    wp->index = indexInt;
+
     assert(websValid(wp));
     assert(websValid(wp));
     assert(actionTable >= 0);
     assert(actionTable >= 0);
 
 

+ 2 - 0
app/goahead-3.6.5/src/web_interface/src/dashboard.c

@@ -15,6 +15,7 @@ uint8_t gIPMBAddr[BLADE_NUMBERS] = {0x82, 0x84, 0x86, 0x88, 0x8A, 0x8C, 0x8E, 0x
 uint8_t gChassisManageEn = 0;
 uint8_t gChassisManageEn = 0;
 /*获取设备信息*/
 /*获取设备信息*/
 void getDeviceInfo(Webs *wp){
 void getDeviceInfo(Webs *wp){
+    printf("--->getDeviceInfo  wp.index = %d\n", wp->index);
     uint16_t    wRet = LIBIPMI_E_SUCCESS;
     uint16_t    wRet = LIBIPMI_E_SUCCESS;
     GetDevIDRes_T   DeviceID;
     GetDevIDRes_T   DeviceID;
     struct ifreq ifreq;
     struct ifreq ifreq;
@@ -588,6 +589,7 @@ void getChassisInfo(Webs *wp){
     
     
     pStr = cJSON_PrintUnformatted(root);
     pStr = cJSON_PrintUnformatted(root);
 
 
+
 //    printf("---> cJSON Str:\n%s\n", pStr);
 //    printf("---> cJSON Str:\n%s\n", pStr);
     websSetStatus(wp, 200);
     websSetStatus(wp, 200);
     websWriteHeaders(wp, -1, 0);
     websWriteHeaders(wp, -1, 0);