fixed jsonFormat typo
This commit is contained in:
parent
e8da3278cd
commit
63c454d647
|
@ -99,7 +99,7 @@ A high-performance HTTP benchmarking tool with real-time web UI and terminal dis
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
plow http://127.0.0.1:8080/ -c 20 -n 100000
|
plow http://127.0.0.1:8080/ -c 20 -n 100000
|
||||||
plow https://httpbin.org/post -c 20 -d 5m --body @file.jsonFormat -T 'application/jsonFormat' -m POST
|
plow https://httpbin.org/post -c 20 -d 5m --body @file.json -T 'application/json' -m POST
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
--help Show context-sensitive help.
|
--help Show context-sensitive help.
|
||||||
|
|
|
@ -14,6 +14,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "embed"
|
_ "embed"
|
||||||
|
|
||||||
cors "github.com/AdhityaRamadhanus/fasthttpcors"
|
cors "github.com/AdhityaRamadhanus/fasthttpcors"
|
||||||
"github.com/go-echarts/go-echarts/v2/charts"
|
"github.com/go-echarts/go-echarts/v2/charts"
|
||||||
"github.com/go-echarts/go-echarts/v2/components"
|
"github.com/go-echarts/go-echarts/v2/components"
|
||||||
|
@ -42,7 +43,7 @@ function {{ .ViewID }}_sync() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "{{ .APIPath }}{{ .Route }}",
|
url: "{{ .APIPath }}{{ .Route }}",
|
||||||
dataType: "jsonFormat",
|
dataType: "json",
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
let opt = goecharts_{{ .ViewID }}.getOption();
|
let opt = goecharts_{{ .ViewID }}.getOption();
|
||||||
let x = opt.xAxis[0].data;
|
let x = opt.xAxis[0].data;
|
||||||
|
@ -141,8 +142,8 @@ func (c *Charts) newRPSView() components.Charter {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Metrics struct {
|
type Metrics struct {
|
||||||
Values []interface{} `jsonFormat:"values"`
|
Values []interface{} `json:"values"`
|
||||||
Time string `jsonFormat:"time"`
|
Time string `json:"time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Charts struct {
|
type Charts struct {
|
||||||
|
|
2
main.go
2
main.go
|
@ -83,7 +83,7 @@ var CompactUsageTemplate = `{{define "FormatCommand" -}}
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
plow http://127.0.0.1:8080/ -c 20 -n 100000
|
plow http://127.0.0.1:8080/ -c 20 -n 100000
|
||||||
plow https://httpbin.org/post -c 20 -d 5m --body @file.jsonFormat -T 'application/jsonFormat' -m POST
|
plow https://httpbin.org/post -c 20 -d 5m --body @file.json -T 'application/json' -m POST
|
||||||
|
|
||||||
{{if .Context.Flags -}}
|
{{if .Context.Flags -}}
|
||||||
{{T "Flags:"}}
|
{{T "Flags:"}}
|
||||||
|
|
Loading…
Reference in New Issue