Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Support sorting by column #11

Closed
mathstuf opened this issue Dec 23, 2019 · 7 comments
Closed

Support sorting by column #11

mathstuf opened this issue Dec 23, 2019 · 7 comments
Labels
enhancement New feature or request implemented
Milestone

Comments

@mathstuf
Copy link

The default view shows older pipelines first. We have schedules that trigger builds nightly on our CI, so newer builds end up at the bottom of the view right now.

@nbedos
Copy link
Owner

nbedos commented Dec 24, 2019

Yes, this is planned too.

@nbedos nbedos added the enhancement New feature or request label Dec 24, 2019
@nbedos nbedos added this to the Next version milestone Dec 26, 2019
nbedos added a commit that referenced this issue Jan 8, 2020
* Column visibility, column order, sort order and all style attributes
  can now be set in the configuration file
* Add new columns: created, finished, xfail and url
* Support horizontal scrolling of table rows
* Support sorting pipelines by any column (#11)
* Refactor table widget
@nbedos
Copy link
Owner

nbedos commented Jan 8, 2020

@mathstuf Would you mind giving a try to https://github.com/nbedos/cistern/releases/tag/0.2.0dev5 please ?
It contains a fix for this issue as well as a couple of other changes.

@mathstuf
Copy link
Author

mathstuf commented Jan 8, 2020

Thanks! It works for top-level items, but I'm not seeing sorting applied to children. Example snippet:

REF     PIPELINE  TYPE  STATE    STARTED▼     DURATION  NAME                                 URL 
…
master   #156560  S     passed   Jan 8 00:06   528m10s   └── test                            https://gitlab.kitware.com/utils/rust-ghostflow/pipelines/156560  
master   #156560  J     passed   Jan 8 00:16     2m06s       ├── test:cargo-minimum          https://gitlab.kitware.com/utils/rust-ghostflow/-/jobs/4755936    
master   #156560  J     passed   Jan 8 00:19     1m59s       ├── test:cargo-stable           https://gitlab.kitware.com/utils/rust-ghostflow/-/jobs/4755937    
master   #156560  J     passed   Jan 8 00:06     4m11s       ├── test:cargo-tarpaulin        https://gitlab.kitware.com/utils/rust-ghostflow/-/jobs/4755938    
master   #156560  J     passed   Jan 8 00:21     1m44s       ├── test:cargo-nightly          https://gitlab.kitware.com/utils/rust-ghostflow/-/jobs/4755939    
master   #156560  J     passed   Jan 8 08:52     2m32s       └── test:git-master             https://gitlab.kitware.com/utils/rust-ghostflow/-/jobs/4755940  

@nbedos
Copy link
Owner

nbedos commented Jan 8, 2020

You're right, it should also work on children. I'll look into it.

@nbedos
Copy link
Owner

nbedos commented Jan 9, 2020

Here is a new pre-release with recursive sorting of stages, jobs and tasks: https://github.com/nbedos/cistern/releases/tag/0.2.0dev6

It was a bit tricky to get right for columns that may contains null values but I think it turned out ok. Let me know what you think.

@mathstuf
Copy link
Author

That looks to be working well. Thanks!

@nbedos
Copy link
Owner

nbedos commented Jan 10, 2020

Great! I've merged the changes into master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request implemented
Projects
None yet
Development

No branches or pull requests

2 participants