github.com/replicatedhq/ship@v0.55.0/pkg/lifecycle/daemon/actions.go (about)

     1  package daemon
     2  
     3  import (
     4  	"github.com/replicatedhq/ship/pkg/lifecycle/daemon/daemontypes"
     5  )
     6  
     7  func MessageActions() []daemontypes.Action {
     8  	return []daemontypes.Action{
     9  		{
    10  			ButtonType:  "primary",
    11  			Text:        "Confirm",
    12  			LoadingText: "Confirming",
    13  			OnClick: daemontypes.ActionRequest{
    14  				URI:    "/message/confirm",
    15  				Method: "POST",
    16  				Body:   `{"step_name": "message"}`,
    17  			},
    18  		},
    19  	}
    20  }
    21  
    22  func HelmIntroActions() []daemontypes.Action {
    23  	return []daemontypes.Action{
    24  		{
    25  			ButtonType:  "primary",
    26  			Text:        "Get started",
    27  			LoadingText: "Confirming",
    28  			OnClick: daemontypes.ActionRequest{
    29  				URI:    "/message/confirm",
    30  				Method: "POST",
    31  				Body:   `{"step_name": "helm.intro"}`,
    32  			},
    33  		},
    34  	}
    35  }
    36  
    37  func HelmValuesActions() []daemontypes.Action {
    38  	return []daemontypes.Action{
    39  		{
    40  			Sort:        0,
    41  			ButtonType:  "primary",
    42  			Text:        "Save values",
    43  			LoadingText: "Saving",
    44  			OnClick: daemontypes.ActionRequest{
    45  				URI:    "/helm-values",
    46  				Method: "POST",
    47  				Body:   `{"step_name": "helm.values"}`,
    48  			},
    49  		},
    50  		{
    51  			Sort:        1,
    52  			ButtonType:  "primary",
    53  			Text:        "Continue",
    54  			LoadingText: "Continuing",
    55  			OnClick: daemontypes.ActionRequest{
    56  				URI:    "/message/confirm",
    57  				Method: "POST",
    58  				Body:   `{"step_name": "helm.values"}`,
    59  			},
    60  		},
    61  	}
    62  }