site

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package site defines HTTP handlers.

Package site define HTTP handlers.

Index

Constants

View Source
const (
	// OpenStatsName is the name of the rule containing open items stats
	OpenStatsName = "__open__"
	// VelocityStatsName is the name of the rulee containing velocity stats
	VelocityStatsName = "__velocity__"
)
View Source
const VERSION = "v1.2.0"

VERSION is what version of Triage Party we advertise as.

Variables

View Source
var (

	// MaxPlayers is how many players to enable in the web interface.
	MaxPlayers = 20
)

Functions

This section is empty.

Types

type Choice added in v1.2.0

type Choice struct {
	Value    int
	Text     string
	Selected bool
}

Choice is a selector choice

type Config

type Config struct {
	BaseDirectory string
	Name          string
	WarnAge       time.Duration
	Updater       *updater.Updater
	Party         *triage.Party
}

Config is how external users interact with this package.

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

Handlers is a mix of config and client interfaces to connect with.

func New

func New(c *Config) *Handlers

func (*Handlers) Collection

func (h *Handlers) Collection() http.HandlerFunc

Collection shows a grouping of rules.

func (*Handlers) Healthz added in v1.2.0

func (h *Handlers) Healthz() http.HandlerFunc

Healthz returns a dummy healthz page - it's always happy here!

func (*Handlers) Kanban added in v1.2.0

func (h *Handlers) Kanban() http.HandlerFunc

Kanban shows a kanban swimlane view of a collection.

func (*Handlers) Root

func (h *Handlers) Root() http.HandlerFunc

Root redirects to leaderboard.

func (*Handlers) Threadz added in v1.2.0

func (h *Handlers) Threadz() http.HandlerFunc

Threadz returns a threadz page

type Page

type Page struct {
	Version      string
	SiteName     string
	ID           string
	Title        string
	Description  string
	Warning      template.HTML
	Notification template.HTML
	Total        int
	TotalShown   int
	Types        string
	UniqueItems  []*hubbub.Conversation
	ResultAge    time.Duration
	Stale        bool

	Player        int
	Players       int
	PlayerChoices []string
	PlayerNums    []int
	Index         int

	AverageResponseLatency time.Duration
	TotalPullRequests      int
	TotalIssues            int

	ClosedPerDay float64

	Collection  triage.Collection
	Collections []triage.Collection

	Swimlanes            []*Swimlane
	CollectionResult     *triage.CollectionResult
	SelectorVar          string
	SelectorOptions      []Choice
	Milestone            *github.Milestone
	MilestoneETA         time.Time
	MilestoneCountOffset int
	MilestoneVeryLate    bool

	OpenStats     *triage.CollectionResult
	VelocityStats *triage.CollectionResult
	GetVars       string
	Status        string
}

Page are values that are passed into the renderer

type Swimlane added in v1.2.0

type Swimlane struct {
	User    *github.User
	Columns []*triage.RuleResult
	Issues  int
}

Swimlane is a row in a Kanban display.

Jump to

Keyboard shortcuts

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