mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
move clog-db-admin to run from /dbadmin and added the ability to set to a different port than 8080
This commit is contained in:
parent
58a20ed770
commit
6256d746bc
2 changed files with 11 additions and 8 deletions
|
|
@ -1520,11 +1520,11 @@ of controls and double click to select control."
|
||||||
;; return empty string to prevent nav off page
|
;; return empty string to prevent nav off page
|
||||||
""))))
|
""))))
|
||||||
|
|
||||||
(defun clog-builder (&key static-root)
|
(defun clog-builder (&key (port 8080) static-root)
|
||||||
"Start clog-builder."
|
"Start clog-builder."
|
||||||
(if static-root
|
(if static-root
|
||||||
(initialize nil :static-root static-root)
|
(initialize nil :port port :static-root static-root)
|
||||||
(initialize nil))
|
(initialize nil :port port))
|
||||||
(set-on-new-window 'on-new-builder :path "/builder")
|
(set-on-new-window 'on-new-builder :path "/builder")
|
||||||
(set-on-new-window 'on-attach-builder-page :path "/builder-page")
|
(set-on-new-window 'on-attach-builder-page :path "/builder-page")
|
||||||
(open-browser :url "http://127.0.0.1:8080/builder"))
|
(open-browser :url (format nil "http://127.0.0.1:~A/builder" port)))
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
(set-on-window-can-size about (lambda (obj)
|
(set-on-window-can-size about (lambda (obj)
|
||||||
(declare (ignore obj))()))))
|
(declare (ignore obj))()))))
|
||||||
|
|
||||||
(defun on-new-window (body)
|
(defun on-new-db-admin (body)
|
||||||
(let ((app (make-instance 'app-data)))
|
(let ((app (make-instance 'app-data)))
|
||||||
(setf (connection-data-item body "app-data") app)
|
(setf (connection-data-item body "app-data") app)
|
||||||
(setf (body app) body)
|
(setf (body app) body)
|
||||||
|
|
@ -195,7 +195,10 @@
|
||||||
(when (db-connection app)
|
(when (db-connection app)
|
||||||
(sqlite:disconnect (db-connection app)))))
|
(sqlite:disconnect (db-connection app)))))
|
||||||
|
|
||||||
(defun clog-db-admin ()
|
(defun clog-db-admin (&key (port 8080) static-root)
|
||||||
"Start clog-db-admin."
|
"Start clog-db-admin."
|
||||||
(initialize #'on-new-window)
|
(if static-root
|
||||||
(open-browser))
|
(initialize nil :port port :static-root static-root)
|
||||||
|
(initialize nil :port port))
|
||||||
|
(set-on-new-window 'on-new-db-admin :path "/dbadmin")
|
||||||
|
(open-browser :url (format nil "http://127.0.0.1:~A/dbadmin" port)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue