Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageLevelError = tensorleapapi.MESSAGELEVEL_ERROR MessageLevelWarning = tensorleapapi.MESSAGELEVEL_WARNING MessageLevelInfo = tensorleapapi.MESSAGELEVEL_INFO MessageLevelVerbose = tensorleapapi.MESSAGELEVEL_VERBOSE )
MessageLevel constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobFailureNotificationReport ¶
type JobFailureNotificationReport struct {
JobId string
Notifications []NotificationReport
}
func GetJobFailureNotifications ¶
func GetJobFailureNotifications(ctx context.Context, jobId string, since time.Time) (*JobFailureNotificationReport, error)
GetJobFailureNotifications fetches and prints error and warning notifications for a specific job since the given start time
func (*JobFailureNotificationReport) View ¶
func (r *JobFailureNotificationReport) View() string
type MessageLevel ¶
type MessageLevel = tensorleapapi.MessageLevel
type Notification ¶
type Notification = tensorleapapi.Notification
Type aliases for convenience
func FilterJobStatusNotifications ¶
func FilterJobStatusNotifications(notifications []Notification) []Notification
func GetNotifications ¶
func GetNotifications(ctx context.Context) ([]Notification, error)
GetNotifications fetches all notifications for the current user
func GetNotificationsByFilter ¶
func GetNotificationsByFilter(ctx context.Context, filter NotificationFilter) ([]Notification, error)
GetNotificationsByFilter fetches notifications with optional filters
type NotificationFilter ¶
type NotificationFilter struct {
JobId *string
FromDate *time.Time
NotificationTypes []MessageLevel
}
NotificationFilter holds filter options for fetching notifications
type NotificationReport ¶
type NotificationReport struct {
Level MessageLevel
Title string
Message string
ExtraMessage string
}
func ToNotificationReport ¶
func ToNotificationReport(notification Notification) NotificationReport
func (NotificationReport) View ¶
func (report NotificationReport) View() string
type NotificationsPageContent ¶
type NotificationsPageContent struct {
Notifications *JobFailureNotificationReport
}
--------------------------- Notifications Page Content ---------------------------
func (*NotificationsPageContent) Init ¶
func (n *NotificationsPageContent) Init() tea.Cmd
func (*NotificationsPageContent) View ¶
func (n *NotificationsPageContent) View() string
Click to show internal directories.
Click to hide internal directories.