From 50273c110856e18e3ba563b0f62b7273a4dc022b Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Tue, 7 Oct 2025 06:53:09 -0600 Subject: initial commit --- .../octopus-latest-deployments-service.lisp | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lisp/service/octopus-latest-deployments-service.lisp (limited to 'lisp/service/octopus-latest-deployments-service.lisp') 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))))) -- cgit v1.3