本文整理匯總了Golang中github.com/outbrain/orchestrator/Godeps/_workspace/src/github.com/martini-contrib/render.Render.HTML方法的典型用法代碼示例。如果您正苦於以下問題:Golang Render.HTML方法的具體用法?Golang Render.HTML怎麽用?Golang Render.HTML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/outbrain/orchestrator/Godeps/_workspace/src/github.com/martini-contrib/render.Render
的用法示例。
在下文中一共展示了Render.HTML方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Seeds
func (this *HttpWeb) Seeds(params martini.Params, r render.Render, req *http.Request, user auth.User) {
r.HTML(200, "templates/seeds", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "seeds",
"activePage": "agents",
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"autoshow_problems": false,
})
}
示例2: ClustersAnalysis
func (this *HttpWeb) ClustersAnalysis(params martini.Params, r render.Render, req *http.Request, user auth.User) {
r.HTML(200, "templates/clusters_analysis", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "clusters",
"activePage": "cluster",
"autoshow_problems": false,
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"removeTextFromHostnameDisplay": config.Config.RemoveTextFromHostnameDisplay,
})
}
示例3: Cluster
func (this *HttpWeb) Cluster(params martini.Params, r render.Render, req *http.Request, user auth.User) {
r.HTML(200, "templates/cluster", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "cluster",
"activePage": "cluster",
"clusterName": params["clusterName"],
"autoshow_problems": true,
"contextMenuVisible": true,
"pseudoGTIDModeEnabled": (config.Config.PseudoGTIDPattern != ""),
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"removeTextFromHostnameDisplay": config.Config.RemoveTextFromHostnameDisplay,
"compactDisplay": req.URL.Query().Get("compact"),
})
}
示例4: Search
func (this *HttpWeb) Search(params martini.Params, r render.Render, req *http.Request, user auth.User) {
searchString := params["searchString"]
if searchString == "" {
searchString = req.URL.Query().Get("s")
}
r.HTML(200, "templates/search", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "search",
"activePage": "search",
"searchString": searchString,
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"autoshow_problems": false,
})
}
示例5: LongQueries
func (this *HttpWeb) LongQueries(params martini.Params, r render.Render, req *http.Request, user auth.User) {
filter := params["filter"]
if filter == "" {
filter = req.URL.Query().Get("filter")
}
r.HTML(200, "templates/long_queries", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "long queries",
"activePage": "queries",
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"autoshow_problems": false,
"filter": filter,
})
}
示例6: Audit
func (this *HttpWeb) Audit(params martini.Params, r render.Render, req *http.Request, user auth.User) {
page, err := strconv.Atoi(params["page"])
if err != nil {
page = 0
}
r.HTML(200, "templates/audit", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "audit",
"activePage": "audit",
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"autoshow_problems": false,
"page": page,
"auditHostname": params["host"],
"auditPort": params["port"],
})
}
示例7: AuditFailureDetection
func (this *HttpWeb) AuditFailureDetection(params martini.Params, r render.Render, req *http.Request, user auth.User) {
page, err := strconv.Atoi(params["page"])
if err != nil {
page = 0
}
detectionId, err := strconv.ParseInt(params["id"], 10, 0)
if err != nil {
detectionId = 0
}
r.HTML(200, "templates/audit_failure_detection", map[string]interface{}{
"agentsHttpActive": config.Config.ServeAgentsHttp,
"title": "audit-failure-detection",
"activePage": "audit",
"authorizedForAction": isAuthorizedForAction(req, user),
"userId": getUserId(req, user),
"autoshow_problems": false,
"page": page,
"detectionId": detectionId,
})
}