Randomize state timeline color by state name - grafana

I'm trying to visualize k8s pod lifetimes on their respective nodes as deployments occur. By following this answer, I've been able to get the layout I'm looking for:
However, all the pod lifetimes for one node (one entire row) are the same color, until one hovers the mouse cursor over the graph - I'd like these to be different colors, so that it's easier to see the delineations at-a-glance.
Usually this would be done with Value Mappings - but in this case, the value names are randomly generated, and I can't possibly add mappings for all of them beforehand. I'd like Grafana to hash the value (string) to dynamically map that to a color - is there any way to do something like that?

Turns out, it is possible to have Value Mappings that are regex-based - for this example, the random strings can be bucketed by a prefix, with a color assigned to each bucket. The random portion obeys the alphabet [a-z0-9], for a total of 36 characters. I created 18 regex-based Value mappings, each covering random strings that start with one of two characters (this is only slightly tedious):
This is the result:
side note: For this usecase, it was also helpful to create a Special value mapping to match Empty and color it Transparent, to draw the gaps when there was no pod on a particular node.
To create a regex value mapping, click the Add a new mapping button in the Value mappings dialog:
and then pick Regex

Related

Defining variable to be used in few places

Is there a functionality in Tabluau to create a variable that can be used in few places by referring to its name? I'm asking because I need to prepare a dashboard and the data loaded and displayed on the dashboard can contain two different variables in column called value. So I would need to define such a 'variable' that would be filled with the type of value column (ex. type 1 or type 2) and use it as a axis name, in a tooltip etc. Of course, I'm trying to avoid a necessity to change all the axis names and tooltips manually.
In Tableau, they are called parameters. Please refer to following articles to learn more about this.
Parameter basics
Swapping Measures using parameter
I believe what you are asking is covered in link 2.

Cannot Hide Data Field in Visio Org Chart

I am creating an org chart from an excel spreadsheet. Each row has Employee Name and Job Title, but also Employee ID and Supervisor Employee ID (both number data types).
I am using the Organization Chart Wizard to automatically create an org chart as a starting point (its pretty big). In doing so, I use the two numeric fields in the "name" and "reports to" fields because we have employees with the same name. However, I do not want these numerical fields displayed in the org chart shapes. You can see in the second picture I cannot remove the three default fields from the chosen "Shape Data Fields."
Here's what the shapes look like, I want to remove the number field altogether. Regardless of the shape stencil I select, I get the same behavior.
If I try to delete the shape, I get the error "shape protection, container and/or layer properties prevent complete execution." Even when I go to Developer -> Protection -> Unlock, the issue persists. Thus, it must be an issue with the container or layer properties.
Lastly, this page has a "To Delete a data field" section at the bottom. I tried exactly this, and the fields were removed from the Define Shape Data box, but the shapes remained unchanged, still showing all fields:
https://support.office.com/en-us/article/Add-data-to-shapes-09272394-5243-4e1b-bcfa-425a8b4d1ce2?ui=en-US&rs=en-US&ad=US
Tweak the master you want to use by decorticating its structure.
In the drawing explorer check whether the shape (the master) is group or a single shape. Find out where the ID (the 3rd field) is used for display, adjust accordingly by correcting the shapesheet.
Sorry for such a generic explanation. If we could exchange files, I would have had a look at your master and could have corrected it.
HTH, Y.
I had the same issue, and eventually found that I could prevent the ID field (used in Name) from displaying, using Display Options - on the Org Chart tab, using the dialog box launcher button (bottom-right) in the Shapes section.
The ID field is shown as 'Name' under Block 2 - you can use the drop-down to set this to 'None' (so that it doesn't display at all), or pick one of the other fields that you chose to display in its place.

FileMaker: Dropdown list with exact values in text

I have a drop down list of subjects. Two particular subjects are Mathematics and Additional Mathematics. When I choose Mathematics from the drop down list, records from Additional Mathematics and Mathematics are both displayed. Worse is that records from Additional Mathematics are shown first. Many colleagues made mistakes because of this.
How do I make the drop down list such that when clicked, the exact terms are used instead?
This is a problem that is not necessarily unique to FileMaker. You are searching for a name that is imprecise because it is a match for multiple names. Rather instead you might want to search for a unique key whose subject name is 'Mathematics' as displayed in your drop down. It is the use of that unique key that allows you to perform a precise search, even when the name of one subject is a partial or complete match for another.
This solution requires you to add a unique serial number which is, in your case, to alter the Subjects table and add a field called 'idnumber' or similar. The field type should be Number, and the options should include Auto-Enter-Serial number-Generate and On creation-increment by 1. The trick here lies in making sure no two subjects have the same 'idnumber' even when you aren't paying attention, so set the next value to something greater than the number of subjects that already exist. Then from another layout assign each existing subject a unique idnumber, noting that if there are a great many subjects you could script that step.
I should mention that many recommend a best practice of never changing a production layout, but rather to duplicate the layout and make the required changes to the duplicate. This minimizes the effects of testing your changes etc.
Finally, change your layout in inspector such that the drop down list shows Use values from field: 'idnumber'. Select Also display values from second field: 'Subject' and Show values only from second field. Now your drop down is the same clean selection as before. The field will not look correct yet because it will show a number. To make it look correct you can insert another field, selecting 'Subject'. Place that field over top of the 'idnumber' and send 'idnumber' to the back. Fill the 'Subject' field with the correct background solid color instead of none, and enjoy your new precision search capability! The entire process is handled server side so it should not matter that client access is IWP.
If you're using the selection to do a find, put an "==" before the text you're searching on. This will tell FileMaker to do an exact field contents search, instead of a "contains" search.

elasticsearch array field of keywords - how to index it

I've got input that is analogous to tags, where there are a couple of strings per record, and they should be thought of as keywords, not to be tokenized or broken up or analyzed in any particular way. I want it to show up in faceting "as-is", including spaces, slashes, dashes and ampersands.
I don't think I need multi_field here. There is one input value per record "keyPhrases" but the input value is a simple json array of strings.
I want elasticsearch to insert into the facets each of the values, and tag the record with all of the phrases.
Usually there are only one or two or three phrases per record, but there could be more. The set of keyPhrases is fairly small, like 30 or at most like 50. They could be thought of as "categories".
The faceting keeps breaking up the input strings and using lowercasing, even though I'm trying to specify not_analyzed, keyword tokenizer, keyword analyzer, and trying things like that.
I have other fields that keep their spacing and capitalization as I desire in the facets returned, however those fields are not_analyzed and are also store: true, but are also just exactly 1 string input per record, as opposed to many per record.
I could just take the top 1 keyPhrase per record and flatten it, but ideally all the tags would work and be available as facets.
Any ideas on how to do this?
Well, this is embarrassing.
My strict mapping wasn't actually committed to the server at the time I was trying this.
(I was dropping the index and creating the index again with each new mapping, and hadn't realized it, and this was not the final mapping, so it was getting loaded and then dropped.)

How to form an Endeca query where a field must start with certain letters

Is it possible to form an Endeca query to retrieve a field that must start with certain letters? Say like get all users who's first letter is A? I checked with Range filters but it is supporting only numerical fields as well as Wild card search. But nothing worked well so far.
Creating a dimension is one way of approaching the problem as Paul Lemke mentioned.Wildcard is not an option since the performance overhead as well as irrelevant records.
But we solved it using couple of other alternatives.
Create a new property for the Object called "StartWith", store the first letter of the Object and make it searchable. We found it easier than creating a Dimension.
There is a problem where letters like 'A' are usually stop words in Endeca. We can do you a couple of work around to solve this.
Get the ASCII value of the first letter and store the numerical value in to that property. One more advantage with this approach is that we can use Range Filters. But you can't search for 'AB' kind of requirements.
Pre-pend some characters like ^^^My name and search for ^^^M. The advantage with this approach is you can search conditions like letters starts with AB.
Endeca at it's current version (6.1) does not have a search filter that works like a "startswith" function in other programming languages.
I do have two options that might possibly get you close:
If you are truly only looking for the first letter you can setup a Dimension value for each letter of the Alphabet (A,B,C...). You can then refine on each letter and see only the values that start with letter A, B, C, etc. The only downside to this is you can only filter based on how many dimension values you setup. So if you added "A", you couldn't filter anything that started with "AB". You could go down the line and add "AB", "BA, "CA", and so on but that would get unwieldy very fast.
If you want something closer to a "startswith" function the only other option is to use a wildcard search. Basically you would do a property search like this: N=0&Ntk=Username&Ntt=ab*
The trick with wildcard searching is it will do that across multiple words in that property. So assuming you had a data set of these values:
Smithers Smith
Larry Smith
Jenna-Smith
Doing a search of sm* would actually return all 3 results because "sm" was in their last name. Even the one with the dash would return as Endeca think's that is a seperate word. (It might be possible to turn that off though, not sure).
So basically it comes down to this: Stick a one word in a property, set that property to allow wildcard search, then do a "blah*" against that property and you should have the results you're looking for.
Have you tried the First relevance rank module which is supposed to rank based on proximity to the beginning of the field?
It sounds similar to what you are looking for and together with a wild card may produce your intended results.