Skip to content

Commit

Permalink
feat(config): comment var in config.yml (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephKav authored Jun 15, 2022
1 parent 8606bbf commit 95c332c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion service/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ type Slice map[string]*Service
// the latest version from the URL provided.
type Service struct {
ID *string `yaml:"-"` // service_name.
Active *bool `yaml:"active,omitempty"` // Disable the service
Active *bool `yaml:"active,omitempty"` // Disable the service.
Comment *string `yaml:"comment,omitempty"` // Comment on the Service.
Type *string `yaml:"type,omitempty"` // "github"/"URL"
URL *string `yaml:"url,omitempty"` // type:URL - "https://example.com", type:github - "owner/repo" or "https://github.com/owner/repo".
AllowInvalidCerts *bool `yaml:"allow_invalid_certs,omitempty"` // default - false = Disallows invalid HTTPS certificates.
Expand Down
6 changes: 4 additions & 2 deletions web/api/types/argus.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (

// ServiceSummary is the Summary of a Service.
type ServiceSummary struct {
Active *bool `json:"active,omitempty"` // Active Service?
ID *string `json:"id"`
ID *string `json:"id,omitempty"` //
Active *bool `json:"active,omitempty"` // Active Service?
Comment *string `json:"comment,omitempty"` // Comment on the Service/
Type *string `json:"type,omitempty"` // "github"/"URL"
URL *string `json:"url,omitempty"` // type:URL - "https://example.com", type:github - "owner/repo" or "https://github.com/owner/repo".
Icon string `json:"icon,omitempty"` // Service.Icon / Service.Notify.*.Params.Icon / Service.Notify.*.Defaults.Params.Icon
Expand Down Expand Up @@ -242,6 +243,7 @@ type ServiceSlice map[string]*Service
// the latest version from the URL provided.
type Service struct {
Active *bool `json:"active,omitempty"` // Active Service?
Comment *string `json:"comment,omitempty"` // Comment on the Service/
Type *string `json:"type,omitempty"` // "github"/"URL"
URL *string `json:"url,omitempty"` // type:URL - "https://example.com", type:github - "owner/repo" or "https://github.com/owner/repo".
WebURL *string `json:"web_url,omitempty"` // URL to provide on the Web UI
Expand Down
1 change: 1 addition & 0 deletions web/api/v1/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ func (api *API) wsConfigService(client *Client) {

serviceConfig[key] = &api_types.Service{
Active: service.Active,
Comment: service.Comment,
Type: service.Type,
URL: service.URL,
WebURL: service.WebURL,
Expand Down
1 change: 1 addition & 0 deletions web/ui/react-app/src/types/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface ServiceListType {

export interface ServiceType {
active?: boolean;
comment?: string;
type: string;
url?: string;
allow_invalid_certs?: boolean;
Expand Down

0 comments on commit 95c332c

Please sign in to comment.