Order of tabs on home page - jenkins

Is there a way (or plugin) to order tabs on Jenkins home page? By default, they are sorted in alphabetical order.
Only info I've found is 'no', but it is quite old.

I was looking for a plugin that lets me sort tabs manually a couple of weeks ago. I didn't find anything. So I'm almost sure the answer is still no.
As a workaround we use a prefix like "(0) Viewname A", "(1) Viewname B" etc. in order to have the most important views accessible by one click.

You can add a script to Jenkins, this way it will load each time the view is up.
Go to:
Manage Jenkins->Configure System-> URL of theme JS and add the script.
I used the following script:
sessionStorage["ts_direction::" + window.location.toString() +"::0"] = "type=string&value=3%3Aup"
This order the columns by the 4th column (remember this will affect all of the views!).
example:

You can try Nested View Plugin (a functional plugin based on the hudson.model.TreeView class) which allows grouping job views into multiple levels instead of one big list of tabs.
Alternatively prefix the names with numbers (e.g. 1-Foo, 2-Bar, 3-Baz, etc.).

Prefix the view name with a soft hyphen ­ to make them appear at the end or with a space to make them appear infront ­
shy = String.fromCharCode(173);
chars = ['A','B','Z', shy + 'Z','a',' a','b','z',];
document.body.innerHTML = chars.toString() + '<br/>' + chars.sort().toString()
<html><head></head><body></body></html>

Related

Dependent <material-dropdown-select>

I want to link multiple <material-dropdown-select>, using [(ngModel)] + (ngModelChange), making them dependent. (So not by using *ngFor + <material-select-item>.)
But I do not find how to make these <material-dropdown-select> dependent, such that when the "parent" is updated, the "first child" is updated/reset, and then when the first child is selected, the second is reset/updated, and so on.
I tried with querySelector() but obviously, this is not the good way.
Maybe with ViewChild/ViewChildren but the options list is not updated???
Well I finally get what I needed.
I used #ViewChild to target the element in the page.
But changing the options "was tricky", as I had to first :
MaterialDropdownSelectComponent.options.dispose();
then
add the new list…
without the first step, the SelectionOptions<dynamic> is not updated…

Xcode - search scope to exclude files or path

If your project is big and has many localizations, sometimes you find view controllers by searching for text displayed on that view controller's view. But in doing so you get a lot of search results you don't need that can make finding the file you're searching for cumbersome:
If you're like me and do this a hundred times a day, you want to have a way to omit Localizable files from your searches, for example. How?
In the Find Navigator tab, click the current search scope directly underneath the search bar:
Click "New Scope..." and give it a name. I picked 'Workspace W/O Localizable":
Add a Path condition that 'matches regex'. You can use a negative regex to exclude paths with "Localizable" in it. The regex to use is this: ^((?!Localizable).)*$
That's it! Just click the new search scope under "SEARCH SCOPES" and it will be the new default.
Quick tip which is a solution for some. You can easily change this by clicking on a result and hitting "delete." This will remove the result or group of results from the list. It will not affect your code ;)
Quick tip for xCode 9.4. Create a search scope of this to search just the swift files in your project.

XPath: select node that contains ONLY a certain string

I'm making a parser in rails for a website and I'm having trouble selecting only the stuff I want.
I want to select the following sibling to a td-tag that contains ONLY "World:", but there's another td-tag containing "Former World:" that I get too, and I don't want to select that one.
Here's my XPath selection:
//td[contains(text(), 'World:')]/following-sibling::td
So I want the tag containing ONLY "World:" and not the other one containing "Former World:"
Any ideas? Spent hours searching for a solution, but now I ended up here.
Does it work if you change it to
//td[text()='World:']/following-sibling::td
Have you tried testing the text with equals?
//td[text() = 'World:']/following-sibling::td
or
//td[. = 'World:']/following-sibling::td

incorporating all views into one view

Just wondering what the shorthand would be in Rails to do this (if any):
I have views/pages/ containing 5 html.erb files and they all use the same default layout.html.erb, with one yield statement in the middle of it (the standard setup).
Now I want one view that incorporates all 5 of those erb files above contiguously, one after the other, in place of the one existing yield statement in that same layout.html.erb.
What minimal changes would I make to the layout.html.erb to accomplish this.
(Rails Newbie - like it more than Django now).
Ah,
I see what you're saying. Try this. Have your file structure such that all the views for said controller are in one folder...
#controllers_views = Dir.glob("your/controllers/views/*.erb")
#controllers_views.each { |cv| puts cv }
Seems like that would work, I'm away from my dev box or I'd test it for you.
Hope that helps.
Good luck!
You could always have a javascript that requests the sequential yields at a time interval as an ajax request. Then just your target element change to reflect the updated information.
Alternatively load all 5 into different divisions, and have them revolve visibility, like a picture gallery. CSS3 could pull this off.
http://speckyboy.com/2010/06/09/10-pure-css3-image-galleries-and-sliders/

auto_complete_for: prevent the first item from being auto-selected

The auto_complete_for dealio from script.aculo.us is great an all, but is there a way for me to selectively disable the fact that it always auto-selects the first item in the list?
The problem is that, if I want to type my own entry that is new, and novel, I don't want the first item in the list to be auto-selected. The reason is because when I TAB out of the field, it selects, and fills the text box with that first item.
I got around that, somewhat, by making the first item in the list the same as what I'm typing, but that's not perfect either, because the auto_complete list doesn't always update with every keystroke, depending on how fast I type. I've tried setting the list refresh rate to the lowest value (1 millisecond) but no go.
What I really want is an option in "auto_complete_for" that doesn't select that first item at all - the same way that Google Instant doesn't automatically select the first suggested search phrase - you have to arrow-down to select one.
Maybe I can do this via an HTML option that I'm missing?
Looking at the source, there doesn't appear to be an option for that, but I bet if you changed line 284 of controls.js to this.index = -1; it would do what you want.
Otherwise, it might be time to look for a different autocomplete widget.
If your requirements are too far away from the available plugin, then I guess there is no point in tinkering around. Its best to write your own JS code.
You might want to consider this: https://github.com/laktek/jQuery-Smart-Auto-Complete
or this : https://github.com/reinh/jquery-autocomplete
I'll add another alternative that works great with Rails 3:
http://github.com/crowdint/rails3-jquery-autocomplete
I recently implemented auto complete for more than a field for Rails 2.0.2.
The plugin I used is:- https://github.com/david-kerins/auto_complete . Not sure if it supports Rails 3.
I have also encountered issues on implementing the above scenario and have posted questions( Implementing auto complete for more than one field in Rails ; Implementing a OnClick kind of functionality and formatting wrt Rails Partial-Views ) on stackoverflow for the same, I have been lucky on getting things working for me based on my requirement.
Kindly refer to these questions, they might have relevance to your requirement.

Resources