controllers

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2016 License: GPL-2.0, GPL-2.0-or-later Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LadybugSession   = "ladybug_session"
	FlashAuthMessage = "flash_auth_msg"
)

Costant message

View Source
const (
	// BuildFlashKey is a key of flash data
	BuildFlashKey = "LADYBUG_BUILD"

	// ErrorMsg is a key of flash data
	ErrorMsg = "LADUBUG_ERROR_MSG"
)
View Source
const (
	ProjectFlashKey = "LADYBUG_PROJECT"
)

Variables

This section is empty.

Functions

func AddRequirement

func AddRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

AddRequirement renders just a page that a user can add a requirement

func AddTool

AddTool has responsibility for handling a POST request adding CI tool pages.

func BuildsAddItem

func BuildsAddItem(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsAddItem function renders build item page. This page is used for only adding manual build items.

func BuildsAddProject

func BuildsAddProject(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsAddProject is to render an Add page But rendering routine is on handleAddEditPage

func BuildsEditProject

func BuildsEditProject(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsEditProject function renders an EDIT page. But rendering routine is on handleAddEditPage

func BuildsIndex

func BuildsIndex(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsIndex is to render a Builds page

func BuildsSaveItem

func BuildsSaveItem(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsSaveItem function handles a POST save request. This handler is for creating manual build item. If you want find creating jenkins or travis build items, see .....

func BuildsSaveProject

func BuildsSaveProject(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

BuildsSaveProject handles a save request via POST

func BuildsView

BuildsView renders a page to show build detail

func CaseAdd

CaseAdd just renders a Add page. Add and Edit pages are integrated. see renderAddEdit

func CaseDelete

CaseDelete is a POST handler for DELETE request

func CaseEdit

CaseEdit just renders a EDIT page. Add and Edit pages are integrated. see renderAddEdit

func CaseSave

CaseSave handles POST request from CaseAdd. Save and Update handlers are integrated. see handleSaveUpdate

func CaseUpdate

CaseUpdate POST handler for Testcase Edit

func CaseView

CaseView renders a page to show testcase's information

func Dashboard

Dashboard renders a dashboard page

func DeleteRequirement

func DeleteRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

DeleteRequirement handles Delete request and return JSON

func DesignIndex

func DesignIndex(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

DesignIndex renders index page of /project/{projectName}/design

func EditRequirement

func EditRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

EditRequirement just renders a page that user can edit the requirement.

func ExecDeny

ExecDeny makes the test execution denied

func ExecDone

ExecDone is a POST Handler for Done button of test execution. This function ensures that all test cases are executed.

func ExecIndex

ExecIndex renders A page to show all test executions

func ExecRemove

ExecRemove is a POST handler and deletes test execution entity.

func ExecRun

ExecRun renders a test running page.

func ExecUpdateResult

func ExecUpdateResult(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

ExecUpdateResult updates the result of each test case

func GetAllTestCases

func GetAllTestCases(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

GetAllTestCases returns all testcase of the section what "id" is matching Results in JSON format

func GetBuildItems

func GetBuildItems(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

GetBuildItems returns BuildItem matched with given "id"

func GetI18nMessage

func GetI18nMessage(key string) string

GetI18nMessage returns i18n string correspond to given key

func GetProjectList

func GetProjectList(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

GetProjectList returns project list in JSON format

func Integrate

Integrate function renders only a a page helps integration with CI tools

func LoadI18nMessage

func LoadI18nMessage() *config.Config

LoadI18nMessage loads i18n resources. i18n messages is at /messages TODO support other languages

func LogAndHTTPError

func LogAndHTTPError(status int, module string, errType string, msg string) error

LogAndHTTPError makes log messages and return http error with given status http code default log level is ERROR

func LogOut

LogOut func clears login session, redirect to login page

func Login

Login checks user email, password

func LoginPage

LoginPage renders a login page

func MilestoneAdd

func MilestoneAdd(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

MilestoneAdd is a Handler for rendering add testplan page

func MilestoneDelete

func MilestoneDelete(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

MilestoneDelete is a POST handler for DELETE operation for milestone

func MilestoneIndex

func MilestoneIndex(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

MilestoneIndex renders index page of Milestone

func MilestoneSave

func MilestoneSave(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

MilestoneSave is a POST handler for save milestone

func MilestoneView

func MilestoneView(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

MilestoneView renders a milestone page for viewing

func PlanAdd

PlanAdd is a Handler for rendering add testplan page

func PlanDelete

PlanDelete is a POST handler for DELETE operation for testplan

func PlanIndex

PlanIndex renders index page of TestPlan

func PlanRun

PlanRun adds test execution with selected test plan.

func PlanSave

PlanSave is a POST handler for save testplan func (c TestPlans) Save(project string, testplan models.TestPlan, execs string) revel.Result {

func PlanView

PlanView renders a test plan page for viewing

func ProjectCreate

func ProjectCreate(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

ProjectCreate renders a page to create project

func ProjectSave

func ProjectSave(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

ProjectSave validates user input and save Project in database

func Register

Register renders just a user registration page

func Render

func Render(w http.ResponseWriter, data interface{}, templates ...string) error

Render renders templates with structure-typed interface data

func Render2

func Render2(c *interfacer.AppContext, w http.ResponseWriter, data interface{}, templates ...string) error

Render2 renders templates with map-typed interface data

func RenderJSON

func RenderJSON(w http.ResponseWriter, data interface{}) error

RenderJSON converts data interface to JSON and renders JSON format

func RenderJSONWithStatus

func RenderJSONWithStatus(w http.ResponseWriter, data interface{}, statusCode int) error

RenderJSONWithStatus renders JSON format with data with status specified

func Reports

Reports .....

func RequirementIndex

func RequirementIndex(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

RequirementIndex renders requirement index page.

func RequirementList

func RequirementList(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

RequirementList returns a list of specifications which belongs to requested section

func Save

Save is not implemented. Template first

func SaveRequirement

func SaveRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

SaveRequirement is gateway of POST Save request from ADD page

func SaveUser

SaveUser is a POST handler from Register page

func SectionAdd

SectionAdd is not implemented.

func UnlinkRequirementRelation

func UnlinkRequirementRelation(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UnlinkRequirementRelation unlinks a relationship between Test Case and Requirement

func UnlinkTestcaseRelation

func UnlinkTestcaseRelation(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UnlinkTestcaseRelation unlink a requirement and a related testcase Return in JSON

func UpdateRequirement

func UpdateRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UpdateRequirement is gateway of POST Update request from EDIT page

func UserGetNameList

func UserGetNameList(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UserGetNameList returns users' ID and name.

func UserProfile

func UserProfile(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UserProfile renders first page of user's profile

func UserUpdateProfile

func UserUpdateProfile(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

UserUpdateProfile is a POST handler for updating user's profile

func ValidateTool

func ValidateTool(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

ValidateTool function checks the given url is valid. TODO Now this checks only jenkins connection without auth, we will add more next target is travis CI

func ValidationFailAndRedirect

func ValidationFailAndRedirect(c *interfacer.AppContext, w http.ResponseWriter,
	r *http.Request, errorMap map[string]string, url string, value interface{})

ValidationFailAndRedirect store errors and redirect if there are error messages

func ViewRequirement

func ViewRequirement(c *interfacer.AppContext, w http.ResponseWriter, r *http.Request) error

ViewRequirement renders a page of information of the requirements. This page should be a detail of requested requirement and related testcases

func Welcome

Welcome renders a page to select project

Types

type Resp

type Resp struct {
	Msg string `json:"msg"`
}

Resp struct is for response form TODO will remove Status and make http header response to represent response status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL