diff options
| author | Alex Kost <alezost@gmail.com> | 2018-08-23 23:40:12 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2018-08-26 00:06:26 +0300 |
| commit | 1393cd0afa69f72382d447a26c482c5caf729b44 (patch) | |
| tree | 6f31a77ac305dc0c2e7e5d5c83d526fcbc34ae6c | |
| parent | project: Add a button to list jobsets (diff) | |
| download | emacs-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'.
| -rw-r--r-- | build-farm-build.el | 7 | ||||
| -rw-r--r-- | build-farm.el | 20 |
2 files changed, 22 insertions, 5 deletions
diff --git a/build-farm-build.el b/build-farm-build.el index 95f462f..6eaea15 100644 --- a/build-farm-build.el +++ b/build-farm-build.el @@ -349,8 +349,11 @@ It should be a '%s'-sequence.") (defun build-farm-build-info-insert-jobset (jobset entry) "Insert JOBSET for build ENTRY at point." - (build-farm-info-insert-hydra-jobset - (bui-entry-non-void-value entry 'project) jobset) + (if (eq 'hydra (build-farm-current-url-type)) + (build-farm-info-insert-hydra-jobset + (bui-entry-non-void-value entry 'project) + jobset) + (build-farm-info-insert-cuirass-jobset jobset)) (bui-insert-indent) (build-farm-build-info-insert-builds-button :project (bui-entry-non-void-value entry 'project) 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 |
