diff options
| author | ckonstanski <carlos.konstanski@olo.com> | 2025-10-07 06:53:09 -0600 |
|---|---|---|
| committer | ckonstanski <carlos.konstanski@olo.com> | 2025-10-07 06:53:09 -0600 |
| commit | 50273c110856e18e3ba563b0f62b7273a4dc022b (patch) | |
| tree | cc58541bb299c659c5fd98774d3693aa99ff092a /lisp/service/octopus-latest-deployments-service.lisp | |
| parent | 9adba239b937df2830a5110adaa1dae17b7dd7d7 (diff) | |
initial commit
Diffstat (limited to 'lisp/service/octopus-latest-deployments-service.lisp')
| -rw-r--r-- | lisp/service/octopus-latest-deployments-service.lisp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lisp/service/octopus-latest-deployments-service.lisp b/lisp/service/octopus-latest-deployments-service.lisp new file mode 100644 index 0000000..4b786bd --- /dev/null +++ b/lisp/service/octopus-latest-deployments-service.lisp @@ -0,0 +1,41 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(declaim (optimize (speed 0) (safety 3) (debug 3))) + +(in-package :snow) + +(defclass octopus-latest-deployments-service (rest-service) + () + (:documentation "")) + +(defun octopus-latest-deployments-json () + (with-noauth (instance octopus-latest-deployments-service) + t)) + +(defclass octopus-latest-deployments/view-service (octopus-latest-deployments-service) + ((form :initarg :form + :initform nil + :accessor form) + (location-p :initform nil)) + (:documentation "")) + +(defun octopus-latest-deployments-view-json () + (with-noauth (instance octopus-latest-deployments/view-service) + (setf (form instance) + (make-form "octopus-latest-deployments-form" + nil + t + `((:name "ode_only_p" :label "ODE only?" :field-type "checkbox") + (:label "Find Latest Deployments" :field-type "button" :onclick "on_octopus_latest_deployments_results_clicked()")))))) + +(defclass octopus-latest-deployments/results-service (octopus-latest-deployments/view-service) + ((results :initarg :results + :initform nil + :accessor results) + (location-p :initform nil)) + (:documentation "")) + +(defun octopus-latest-deployments-results-json (ode_only_p) + (with-noauth (instance octopus-latest-deployments/results-service) + (with-octopus (octopus) + (let ((deployments (get-octopus-latest-deployments octopus :ode-only-p (string= "true" ode_only_p)))) + (setf (results instance) deployments))))) |
