Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit dac0b60

Browse files
authored
Merge pull request #143 from dexhorthy/dynamic-ui-2
dynamic UI thing
2 parents d42dcd3 + 530e3c6 commit dac0b60

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ _mockgen:
118118
mockgen: _mockgen fmt
119119

120120
deps:
121-
dep ensure -v; dep prune -v
121+
dep ensure -v
122122

123123

124124
fmt:

pkg/lifecycle/render/config/daemon.go

+18
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,24 @@ func (d *ShipDaemon) getCurrentStep(c *gin.Context) {
231231
"currentStep": d.currentStep,
232232
"phase": d.currentStepName,
233233
}
234+
235+
// a bit of a hack, we're migrating UI to
236+
// render dynamic buttons
237+
if d.currentStepName == "message" {
238+
result["actions"] = []map[string]interface{}{
239+
{
240+
"buttonType": "primary",
241+
"text": "Confirm",
242+
"loadingText": "Confirming",
243+
"onclick": map[string]string{
244+
"uri": "/message/confirm",
245+
"method": "POST",
246+
"body": `{"step_name": "message"}`,
247+
},
248+
},
249+
}
250+
}
251+
234252
if d.stepProgress != nil {
235253
result["progress"] = d.stepProgress
236254
}

0 commit comments

Comments
 (0)