Documentation ¶
Index ¶
- func AddIssueDetectionFeedback(dbClient *sqlx.DB, issue models.Issue, user users.User, rating int) error
- func CloseIssueWithFeedback(dbClient *sqlx.DB, issue models.Issue, ...) error
- func CloseIssueWithoutFeedback(dbClient *sqlx.DB, issue models.Issue, reason string, user users.User) error
- func CreateIssue(situationHistoryID int64, situationID int64, templateInstanceID int64, ...) (int64, error)
- func ExtractSelectedFromTree(recommendation models.FrontRecommendation) (*models.FrontRootCause, []*models.FrontAction, error)
- func GetActionStats(situationID int64) (map[int64]ActionStats, error)
- func GetFactsHistory(issue models.Issue) ([]models.FrontFactHistory, bool, error)
- func GetRecommendationTree(issue models.Issue) (*models.FrontRecommendation, error)
- func GetRootCauseStats(situationID int64) (map[int64]RootCauseStats, error)
- func IsOpenOrDraftIssue(issueKey string) (bool, error)
- func SaveIssueDraft(tx *sqlx.Tx, issue models.Issue, issueDraft models.FrontDraft, user users.User) error
- type ActionStats
- type RootCauseStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIssueDetectionFeedback ¶
func AddIssueDetectionFeedback(dbClient *sqlx.DB, issue models.Issue, user users.User, rating int) error
AddIssueDetectionFeedback add a new feedback in the detection_feedback table (or update it if the user already posted a feedback) Moreover, it updates the issue average rating for convenience
func CloseIssueWithFeedback ¶
func CloseIssueWithFeedback(dbClient *sqlx.DB, issue models.Issue, recommendation models.FrontRecommendation, user users.User) error
CloseIssueWithFeedback generate and persist an issue feedback for the rootcause/action stats and ML models
func CloseIssueWithoutFeedback ¶
func CloseIssueWithoutFeedback(dbClient *sqlx.DB, issue models.Issue, reason string, user users.User) error
CloseIssueWithoutFeedback close an issue without standard feedback on rootcause / action
func CreateIssue ¶
func CreateIssue(situationHistoryID int64, situationID int64, templateInstanceID int64, ts time.Time, rule models.RuleData, name string, level models.IssueLevel, timeout time.Duration, key string) (int64, error)
CreateIssue function used to create an issue
func ExtractSelectedFromTree ¶
func ExtractSelectedFromTree(recommendation models.FrontRecommendation) (*models.FrontRootCause, []*models.FrontAction, error)
ExtractSelectedFromTree extracts and returns selected rootcause and actions from a recommendation
func GetActionStats ¶
func GetActionStats(situationID int64) (map[int64]ActionStats, error)
GetActionStats returns all actions usage statistics on a single situation
func GetFactsHistory ¶
GetFactsHistory get the history of facts for an issue
func GetRecommendationTree ¶
func GetRecommendationTree(issue models.Issue) (*models.FrontRecommendation, error)
GetRecommendationTree build a recommendation tree based on issue resolution stats table
func GetRootCauseStats ¶
func GetRootCauseStats(situationID int64) (map[int64]RootCauseStats, error)
GetRootCauseStats returns all rootcauses usage statistics on a single situation
func IsOpenOrDraftIssue ¶ added in v5.0.14
Types ¶
type ActionStats ¶
ActionStats is a single action usage stats
func NewActionStats ¶
func NewActionStats(rootCauseID int64, actionID int64, occurrences int64, issueCount int64) ActionStats
NewActionStats returns a new ActionStats
func (*ActionStats) GetRelativeFrequency ¶
func (as *ActionStats) GetRelativeFrequency() float64
GetRelativeFrequency calculate the relative usage frequency of an action
type RootCauseStats ¶
RootCauseStats is a single rootcause usage stats
func NewRootCauseStats ¶
func NewRootCauseStats(rootCauseID int64, occurrences int64, issueCount int64) RootCauseStats
NewRootCauseStats returns a new RootCauseStats
func (*RootCauseStats) GetRelativeFrequency ¶
func (as *RootCauseStats) GetRelativeFrequency() float64
GetRelativeFrequency calculate the relative usage frequency of a rootcause