CounterOutputHttpHandler Http Handler for output counter info
(w http.ResponseWriter, r *http.Request)
| 8 | |
| 9 | // CounterOutputHttpHandler Http Handler for output counter info |
| 10 | func (service *TaskService) CounterOutputHttpHandler(w http.ResponseWriter, r *http.Request) { |
| 11 | tableData := "" |
| 12 | for _, v := range service.GetAllTaskCountInfo() { |
| 13 | tableData += "<tr><td>" + v.TaskID + "</td><td>" + v.Lable + "</td><td>" + fmt.Sprint(v.Count) + "</td></tr>" |
| 14 | } |
| 15 | col := `<colgroup> |
| 16 | <col width="40%"> |
| 17 | <col width="30%"> |
| 18 | <col width="30%"> |
| 19 | </colgroup>` |
| 20 | header := `<tr> |
| 21 | <th>TaskID</th> |
| 22 | <th>Lable</th> |
| 23 | <th>Value</th> |
| 24 | </tr>` |
| 25 | html := createOneTableHtml(col, "TaskCounterInfo", header, tableData) |
| 26 | w.Write([]byte(html)) |
| 27 | } |
| 28 | |
| 29 | // TaskOutputHttpHandler Http Handler for output task info |
| 30 | func (service *TaskService) TaskOutputHttpHandler(w http.ResponseWriter, r *http.Request) { |
nothing calls this directly
no test coverage detected