diff options
Diffstat (limited to 'lisp/service/octopus-latest-deployments-service.lisp')
| -rw-r--r-- | lisp/service/octopus-latest-deployments-service.lisp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/service/octopus-latest-deployments-service.lisp b/lisp/service/octopus-latest-deployments-service.lisp index 4b786bd..63a163d 100644 --- a/lisp/service/octopus-latest-deployments-service.lisp +++ b/lisp/service/octopus-latest-deployments-service.lisp @@ -25,6 +25,8 @@ nil t `((:name "ode_only_p" :label "ODE only?" :field-type "checkbox") + (:name "environment" :label "Environment" :field-type "text" :value ,(or (session-value :octopus-environment) "")) + (:name "project" :label "Project" :field-type "text" :value ,(or (session-value :octopus-project) "")) (: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) @@ -34,8 +36,13 @@ (location-p :initform nil)) (:documentation "")) -(defun octopus-latest-deployments-results-json (ode_only_p) +(defun octopus-latest-deployments-results-json (ode_only_p environment project) (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))))) + (let ((deployments (get-octopus-latest-deployments octopus + :ode-only-p (string= "true" ode_only_p) + :environment-filter `(,environment) + :project-filter `(,project)))) + (setf (results instance) deployments) + (setf (session-value :octopus-environment) environment) + (setf (session-value :octopus-project) project))))) |
