예제 #1
0
// BackendUIRendered returns a userinterface rendered to HTML
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	htmlfrag.Wb(b1, "Tpl Demo 1", "/tpl/demo1", "")
	htmlfrag.Wb(b1, "Tpl Demo 2", "/tpl/demo1", "")
	htmlfrag.Wb(b1, "Tpl Reset", "/tpl/reset", "")
	return b1
}
예제 #2
0
// BackendUIRendered returns a userinterface rendered to HTML
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	htmlfrag.Wb(b1, "BitCoin integration", uriRequestPayment, "request payment")
	htmlfrag.Wb(b1, "Confirm", uriConfirmPayment, "")

	return b1
}
예제 #3
0
// userinterface rendered to HTML - not only the strings for title and url
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)

	htmlfrag.Wb(b1, "Login GitKit", homeURL, "opposite of appengine login")
	htmlfrag.Wb(b1, "Signin", WidgetSigninAuthorizedRedirectURL+"?mode=select", "")
	htmlfrag.Wb(b1, "Success Landing", signinLandingDefaultURL, "")
	htmlfrag.Wb(b1, "Signout", signOutURL, "")
	return b1
}
예제 #4
0
// BackendUIRendered returns a userinterface rendered to HTML
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	// htmlfrag.Wb(b1, "Deduplicate", "")

	fullURL := fmt.Sprintf("%s?%s=%s&cnt=%v", routes.DedupURI, routes.URLParamKey, URLs[0], numTotal-1)
	htmlfrag.Wb(b1, "Deduplicate", fullURL)

	return b1
}
예제 #5
0
// BackendUIRendered returns a userinterface rendered to HTML
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	htmlfrag.Wb(b1, "Fetcher", "")
	htmlfrag.Wb(b1, "type", uriSetType, "storage type")

	htmlfrag.Wb(b1, "static command", "/fetch/request-static", "send direct")

	htmlfrag.Wb(b1, "send command", uriFetchCommandSender, "dynamic")

	sample := "www.economist.com/news/europe/21661810-journey-capital-hinterland-shows-how-grim-life-has-become-and-how-russians"
	htmlfrag.Wb(b1, "get similar", routes.FetchSimilarURI+"?"+routes.URLParamKey+"="+sample+"&cnt=2", "similar to url x")
	htmlfrag.Wb(b1, "  form", "/fetch/similiar/form/")

	htmlfrag.Wb(b1, "recv", uriFetchCommandReceiver, "receive fetch command, takes commands by curl")

	htmlfrag.Wb(b1, "reservoire BOTH", UriMountNameY+"?fmt=html", "browse ANY fsi.FileSystem - human readable with ?fmt=http ")

	htmlfrag.Wb(b1, "reservoire static", "/fetch/reservoire/static/", "browse - memfs only")

	return b1
}
예제 #6
0
// userinterface rendered to HTML - not only the strings for title and url
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	htmlfrag.Wb(b1, "Upload zip files into dsfs", "")
	htmlfrag.Wb(b1, "send", UrlUploadSend, "via command line or via this form")
	htmlfrag.Wb(b1, "receive", UrlUploadReceive, "receive a plain file or a zip archive")

	htmlfrag.Wb(b1, "serve file mnt00", "/mnt00/test.jpg", "")
	htmlfrag.Wb(b1, "serve file mnt01", "/mnt01/test.jpg", "")
	htmlfrag.Wb(b1, "serve file mnt02", "/mnt02/test.jpg", "")

	return b1
}
예제 #7
0
파일: user.go 프로젝트: aarzilli/tools
// userinterface rendered to HTML - not only the strings for title and url
func BackendUIRendered() *bytes.Buffer {
	var b1 = new(bytes.Buffer)
	htmlfrag.Wb(b1, "Login AppEngine", "/appengine/login", "opposite of gitkit login")
	return b1
}
예제 #8
0
파일: backend.go 프로젝트: aarzilli/tools
func backend(w http.ResponseWriter, r *http.Request, m map[string]interface{}) {

	w.Header().Set("Content-type", "text/html; charset=utf-8")
	w.WriteHeader(http.StatusOK)

	if ok, _, msg := login.CheckForAdminUser(r); !ok {
		w.Write([]byte(msg))
		return
	}

	b1 := new(bytes.Buffer)
	b1.WriteString(tplx.ExecTplHelper(tplx.Head, map[string]interface{}{"HtmlTitle": "Backend V1"}))

	htmlfrag.Wb(b1, "Debug pprof", "/debug/pprof")

	htmlfrag.Wb(b1, "Diverse", "nobr")
	htmlfrag.Wb(b1, "Schreib-Methoden", "/write-methods")
	htmlfrag.Wb(b1, "Letzte Email", "/email-view")
	htmlfrag.Wb(b1, "Blob List", "/blob2")

	htmlfrag.Wb(b1, "fetch via proxy", routes.ProxifyURI)
	htmlfrag.Wb(b1, "Instance Info", "/instance-info/view")

	htmlfrag.Wb(b1, "Fulltext put", "/fulltext-search/put")
	htmlfrag.Wb(b1, "Fulltext get", "/fulltext-search/get")

	htmlfrag.Wb(b1, "datastore object view quoted printabe", "/dsu/show")

	htmlfrag.Wb(b1, "Statistics", "/_ah/stats")

	htmlfrag.Wb(b1, "Request Images ", "")
	htmlfrag.Wb(b1, "WrapBlob from Datastore", "/image/img-from-datastore?p=chart1")
	htmlfrag.Wb(b1, "base64 from Datastore", "/image/base64-from-datastore?p=chart1")
	htmlfrag.Wb(b1, "base64 from Variable", "/image/base64-from-var?p=1")
	htmlfrag.Wb(b1, "base64 from File", "/image/base64-from-file?p=static/pberg1.png")
	htmlfrag.Wb(b1, "Drawing a static chart", "/image/draw-lines-example")

	htmlfrag.Wb(b1, "Big Query ...", "")
	htmlfrag.Wb(b1, "Get real data", "/big-query/query-into-datastore")
	htmlfrag.Wb(b1, "Get mocked data", "/big-query/mock-data-into-datastore")
	htmlfrag.Wb(b1, "        ... with Chart", "")
	htmlfrag.Wb(b1, "Process Data 1 (mock=1)", "/big-query/regroup-data-01?mock=0")
	htmlfrag.Wb(b1, "Process Data 2", "/big-query/regroup-data-02?f=table")
	htmlfrag.Wb(b1, "Show as Table", "/big-query/show-table")
	htmlfrag.Wb(b1, "Show as Chart", "/big-query/show-chart")
	htmlfrag.Wb(b1, "As HTML", "/big-query/html")

	htmlfrag.Wb(b1, "Namespaces + Task Queues", "")
	htmlfrag.Wb(b1, "Increment", "/namespaced-counters/increment")
	htmlfrag.Wb(b1, "Read", "/namespaced-counters/read")
	htmlfrag.Wb(b1, "Push to task-queue", "/namespaced-counters/queue-push")

	htmlfrag.Wb(b1, "URLs with/without ancestors", "nobr")
	htmlfrag.Wb(b1, "Backend", "/save-url/backend")

	htmlfrag.Wb(b1, "Guest Book", "")
	htmlfrag.Wb(b1, "Eintrag hinzufügen", "/guest-entry")
	htmlfrag.Wb(b1, "Einträge auflisten", "/guest-view")
	htmlfrag.Wb(b1, "Einträge auflisten - paged - serialized cursor", "/guest-view-cursor")

	b1.WriteString("<hr>\n")

	uiDsFs := webapi.BackendUIRendered()
	b1.Write(uiDsFs.Bytes())

	b1.WriteString("<hr>\n")

	b1.Write(upload.BackendUIRendered().Bytes())

	b1.Write(repo.BackendUIRendered().Bytes())

	b1.Write(dedup.BackendUIRendered().Bytes())

	b1.Write(coinbase.BackendUIRendered().Bytes())

	b1.Write(tplx.BackendUIRendered().Bytes())

	b1.Write(login.BackendUIRendered().Bytes())

	b1.WriteString("<br>\n")
	b1.WriteString("<hr>\n")

	urlLocalAdmin := fmt.Sprintf("http://localhost:%v/mail", routes.DevAdminPort())
	ancLocalAdmin := fmt.Sprintf(" &nbsp; &nbsp; <a target='_gae' href='%v' >local app console</a><br>\n", urlLocalAdmin)
	b1.WriteString(ancLocalAdmin)

	urlConsole := fmt.Sprintf("https://console.developers.google.com/project/%v", routes.AppID())
	ancConsole := fmt.Sprintf("<a target='_gae' href='%v' ><b>global</b> developer console</a>\n", urlConsole)
	b1.WriteString(ancConsole)

	urlOldAdmin := fmt.Sprintf("https://appengine.google.com/settings?&app_id=s~%v", routes.AppID())
	ancOldAdmin := fmt.Sprintf(" &nbsp; &nbsp; <a target='_gae' href='%v' >old admin UI</a><br>\n ", urlOldAdmin)
	b1.WriteString(ancOldAdmin)

	b1.WriteString(` &nbsp; &nbsp; <a target='_gae' 
			href='http://go-lint.appspot.com/github.com/pbberlin/tools/dsu' 
			>lint a package</a><br>`)

	dir := m["dir"].(string)
	base := m["base"].(string)
	b1.WriteString("<br>\n")
	b1.WriteString("Dir: --" + dir + "-- &nbsp; &nbsp; &nbsp; &nbsp;   Base: --" + base + "-- <br>\n")

	b1.WriteString("<br>\n")
	s := fmt.Sprintf("IntegerSequenes a, b: %v %v %v<br>\n", util.MyIntSeq01(), util.MyIntSeq01(), util.MyIntSeq02())
	b1.WriteString(s)

	// b1.WriteString("<br>\n")
	// b1.WriteString(fmt.Sprintf("Temp dir is %s<br>\n", os.TempDir()))

	b1.WriteString("<br>\n")

	io.WriteString(b1, "Date: "+util.TimeMarker()+"  - ")
	b1.WriteString(fmt.Sprintf("Last Month %q - 24 Months ago is %q<br>\n", util.MonthsBack(0),
		util.MonthsBack(24)))

	b1.WriteString("<br>\n")
	x1 := " z" + stringspb.IncrementString("--z")
	x2 := " Z" + stringspb.IncrementString("--Z")
	x3 := " 9" + stringspb.IncrementString("--9")
	x4 := stringspb.IncrementString(" --Peter")
	sEnc := "Łódź <  " + stringspb.IncrementString("Łódź") + x1 + x2 + x3 + x4
	b1.WriteString(fmt.Sprint(string([]byte(sEnc)), "<br>"))

	b1.WriteString(tplx.Foot)

	w.Write(b1.Bytes())

}
예제 #9
0
// userinterface rendered to HTML - not only the strings for title and url
func BackendUIRendered() *bytes.Buffer {

	var b1 = new(bytes.Buffer)

	htmlfrag.Wb(b1, "filesystem interface", "")

	htmlfrag.Wb(b1, "set type", UriSetFSType)
	htmlfrag.Wb(b1, "create", "/fsi/create-objects")

	htmlfrag.Wb(b1, "query", "/fsi/retrieve-by-query")
	htmlfrag.Wb(b1, "readdir", "/fsi/retrieve-by-read-dir")
	htmlfrag.Wb(b1, "walk", "/fsi/walk")
	htmlfrag.Wb(b1, "remove subset", "/fsi/remove")

	// htmlfrag.Wb(b1, "delete all", "/fsi/delete-all", "all fs types")
	htmlfrag.Wb(b1, "delete tree", UriDeleteSubtree, "of selected fs")

	// htmlfrag.Wb(b1, , "")
	htmlfrag.Wb(b1, "dsfs mount", "nobr")
	htmlfrag.Wb(b1, "last", "/fsi/cntr/last")
	htmlfrag.Wb(b1, "decr", "/fsi/cntr/decr")
	htmlfrag.Wb(b1, "incr", "/fsi/cntr/incr")
	htmlfrag.Wb(b1, "reset", "/fsi/cntr/reset")

	return b1

}