summaryrefslogtreecommitdiff
path: root/build-farm.el
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2018-08-23 23:40:12 +0300
committerAlex Kost <alezost@gmail.com>2018-08-26 00:06:26 +0300
commit1393cd0afa69f72382d447a26c482c5caf729b44 (patch)
tree6f31a77ac305dc0c2e7e5d5c83d526fcbc34ae6c /build-farm.el
parentproject: Add a button to list jobsets (diff)
downloademacs-build-farm-1393cd0afa69f72382d447a26c482c5caf729b44.tar.gz
Insert button for Cuirass jobset when needed
Cuirass and Hydra jobsets are different things, so make a button for Cuirass jobset specifically. * build-farm.el (build-farm-info-insert-cuirass-jobset): New procedure. * build-farm-build.el (build-farm-build-info-insert-jobset): Use it if current build farm type is 'cuirass'.
Diffstat (limited to 'build-farm.el')
-rw-r--r--build-farm.el20
1 files changed, 17 insertions, 3 deletions
diff --git a/build-farm.el b/build-farm.el
index 2c94779..c3df0a5 100644
--- a/build-farm.el
+++ b/build-farm.el
@@ -75,7 +75,7 @@
:group 'build-farm-faces)
(defface build-farm-info-jobset
- '((t :inherit link))
+ '((t :inherit button))
"Face for jobsets in 'info' buffers."
:group 'build-farm-faces)
@@ -108,11 +108,12 @@
'action 'build-farm-project-button-action)
(define-button-type 'build-farm-jobset
- :supertype 'bui-url
+ :supertype 'bui
+ 'help-echo "Display jobset info"
'face 'build-farm-info-jobset)
(defun build-farm-info-insert-hydra-jobset (project jobset)
- "Insert info about JOBSET of the PROJECT at point."
+ "Insert button for Hydra JOBSET of the PROJECT at point."
(let ((url (build-farm-jobset-url
:root-url (build-farm-current-url)
:project project
@@ -121,6 +122,19 @@
'url url
'help-echo (format "Browse %s" url))))
+(defun build-farm-info-insert-cuirass-jobset (jobset)
+ "Insert button for Cuirass JOBSET at point."
+ (bui-insert-button
+ jobset 'build-farm-jobset
+ 'action (lambda (btn)
+ (require 'build-farm-jobset)
+ (bui-get-display-entries
+ 'build-farm-cuirass-jobset 'info
+ (list (build-farm-current-url)
+ 'name
+ (button-get btn 'jobset))))
+ 'jobset jobset))
+
;;; System types