fortio: Index | Files

package ui

import ""


Package Files


func BrowseHandler Uses

func BrowseHandler(w http.ResponseWriter, r *http.Request)

BrowseHandler handles listing and rendering the JSON results.

func DataList Uses

func DataList() (dataList []string)

DataList returns the .json files/entries in data dir.

func Handler Uses

func Handler(w http.ResponseWriter, r *http.Request)

Handler is the main UI handler creating the web forms and processing them.

func LogAndAddCacheControl Uses

func LogAndAddCacheControl(h http.Handler) http.Handler

LogAndAddCacheControl logs the request and wrapps an HTTP handler to add a Cache-Control header for static files.

func LogAndFilterDataRequest Uses

func LogAndFilterDataRequest(h http.Handler) http.Handler

LogAndFilterDataRequest logs the data request.

func Report Uses

func Report(baseurl, port, staticRsrcDir string, datadir string) bool

Report starts the browsing only UI server on the given port. Similar to Serve with only the read only part.

func ResultToJsData Uses

func ResultToJsData(w io.Writer, json []byte)

ResultToJsData converts a result object to chart data arrays and title and creates a chart from the result object

func SaveJSON Uses

func SaveJSON(name string, json []byte) string

SaveJSON save Json bytes to give file name (.json) in data-path dir.

func Serve Uses

func Serve(baseurl, port, debugpath, uipath, staticRsrcDir string, datadir string, percentileList []float64) bool

Serve starts the fhttp.Serve() plus the UI server on the given port and paths (empty disables the feature). uiPath should end with / (be a 'directory' path). Returns true if server is started successfully.

func Sync Uses

func Sync(out io.Writer, u string, datadir string) bool

Sync is the non http equivalent of fortio/sync?url=u.

func SyncHandler Uses

func SyncHandler(w http.ResponseWriter, r *http.Request)

SyncHandler handles syncing/downloading from tsv url.

type ChartOptions Uses

type ChartOptions struct {
    XMin   string
    XMax   string
    XIsLog bool
    YIsLog bool

ChartOptions describes the user-configurable options for a chart

type ListBucketResult Uses

type ListBucketResult struct {
    NextMarker string   `xml:"NextMarker"`
    Names      []string `xml:"Contents>Key"`

ListBucketResult is the minimum we need out of s3 xml results. e.g.

type SelectableValue Uses

type SelectableValue struct {
    Value    string
    Selected bool

SelectableValue represets an entry in the <select> of results.

func SelectValues Uses

func SelectValues(values []string, selectedValues []string) (selectableValues []SelectableValue, numSelected int)

SelectValues maps the list of values (from DataList) to a list of SelectableValues. Each returned SelectableValue is selected if its value is contained in selectedValues. It is assumed that values does not contain duplicates.

Package ui imports 26 packages (graph) and is imported by 3 packages. Updated 2019-06-16. Refresh now. Tools for package owners.