tmux: using the status options on multiple status lines - tmux

I set the 'status' option to have more than one status line visible in tmux. I then used the 'status-format' option to add different items to each status line. As an apparent consequence the other 'status' options can either no longer be applied to any of the lines, or only be applied to all lines. Is there a general syntax for users to apply the 'status' options to specific status lines?

If you want to use the other status options in your status-format members, look at how the default status-format[0] does it - you can use #{E:option-name} (or T for time formats too).

Related

Control-M How do I remove a portion of the filename during Advanced File Transfer

I am trying to figure out how I can simply remove a portion of a filename on a transfer. I need the numbers to remain unchanged with 'check-aft' buttressing up against them as a prefix.
Source: check-aft-eft-12345678-0001
Destination: check-aft12345678-0001
I cannot for the life of me figure out how to either use the Find and Replace feature which BMC mentions, but then provides zero guidance for, or how I would utilize the variables to do so. I have review all of their documentation and watched so many videos, but they do not cover this scenario.
I would appreciate any help getting '-eft-' removed from this filename.
I have tried creating variables for '-eft-' and for 'check-aft' but I am unable to figure out how i can tell it to look for 'check-aft-eft-' and remove '-eft-'
Find & Replace is used for making bulk changes to job definitions, it has no direct relation to AFT jobs (unless you are changing the AFT job defs, that is).
The AFT jobs have many useful features hidden away on the "Advanced" button. If you literally want to change the file name, click Advanced and go to "Destination Actions" on the General tab. Here select "Renamed" where it says "After the completion of a successful file transfer the destination file will be:" and enter check-aft12345678-0001.
If, however, the numbers can be any value - go to the "File Watcher" tab (still in the "Advanced" pop-up) and use "Output / Variable containing detected file name". Set it to something like found_aft_file_1.
You now have a variable that you can do SUBSTR on -
%%PARTONE = %%SUBSTR %%found_aft_file_1 1 10
%%PARTTWO = %%SUBSTR %%found_aft_file_1 15 13
Then %%PARTONE.%%PARTTWO will return the required value.

Tosca: searching / bulk renaming Test Configuration Parameters

I can't find a way to search for TCPs / search TCP usages / renaming all TCPs.
Let's assume I have a 'licensePlate' TCP set up on the highest level of the hierarchy, and that I have 2 subfolders. In one of them I use the value as it is, in the other folder I change the value. I have some libraries using 'licensePlate'.
I then proceed to rename the TCP to 'carId' on the highest level (and in the libraries). The folder which inherited it will be updated. But the other one will now have two TCPs. This is illustrated in the figure below.
So at the moment I need to manually go into all my subfolders/testcases, find all of them where 'licensePlate' was re-configured, and: (1) set the value to the new param ('carId'); (2) delete the old param ('licensePlate').
The logic behind this imho is that I may still be using that param name (e.g. if I resolved my libraries). Still, I'm guessing that there must be a way to bulk-rename or at least to search for TCP usages (?)
That is really tricky and abstruse. You can find TCP usage with following TQL (Home - Search - TQL Search tab)
=>SUBPARTS[(param_name!="")]
where "param_name" is the name of your parameter.
And it seems that only usages are being found where values has been changed and are not default values.

Cypress, page content and variables

Right or wrong: In Cypress, its impossible to read a value on page X, then keep this value and compare it to a value on page Y.
I can read a value from the page and log it:
cy.get('[data-e2e-selector=whatever]').then(elm => cy.log('Value from page X : ' + elm))
or, for instance, the number of elements with similar or partially matchin selectors:
cy.get('[data-e2e-selector=^whatever]').then(elm => cy.log('Number of elements like this on page X: ' + elm.length))
Hoever, I cannot create a variable of this, because of the asynchronous way Cypress runs. Right? Any value created to just be blank.
Nor can I pass the value read to a method, which in turn compares it to the value on the next page:
compareToValueOnNextPage(cy.get('[data-e2e-selector=^whatever]').then(elm => elm.length));
compareToValueOnNextPage(value: number) { // NB: Not sure if it's a number or string yet...
cy.get('[data-e2e-selector=^whateverNextPage]').then(elm => elm.length).should('have.length', 4)
}
Basically, if I want to compare values, the either have to be on the same page, or they need to be hard-coded. This is a huge limitation when actually end-to-end testing some applications. Very often, a value is created on page X, based on input which should in many cases ba random, thus creating a dynamic value in the test. Then, on page Y, that same value is fetch (from the backend) or shown in some other way, in a Summary etc. And, naturally, I want to compare the value shown on page X to the one shown on page Y/Summary. But this is not possible, due to the very unit-testing thinking that seems to be the foundation for Cypress.
Or am I missing something here? Are there ways around this that aren't ugly/smelly? I think it's possible to store the value on page X in a file, then read that file on page Y. However, Cypress seems to only have one option when reading the file, and that's reading the whole file and looking for a match. So that file would be a mess. Or I'd need several files.
I realize this is kind of trying to impose non-functional ways on a quite functional and asynchroeous technology. However, if it's not possible to "keep" a value and use it later, it's very limiting when it comes to end-to-end testing (even though it's not when the testing is unit-based on frontend components).
UPDATE:
As per Kerrry's suggestion in the answer below:
cy.get('[data-e2e-selector=dellan-accordion]')
.then(elm => cy.wrap(elm.length).as("myVariableName"));
-GO TO NEXT PAGE-
cy.get('[data-e2e-selector=betalingsplan-dellan]')
.then(elm => elm.length)
.should('have.length', myVariableName)
This yeilds "expected 4 to have property 'length'.
This means, obviously, that I cannot get the length of the length.
So I replace 'have.length' with 'eq':
cy.get('[data-e2e-selector=betalingsplan-dellan]')
.then(elm => elm.length)
.should('have.length', myVariableName)
And I get the following error:
expected 4 to equal 0
So, it seems that the first variable - myVariable - is gone after the first cy.get().
If I do everything inside one get (have another get inside that, where I go to the next page AND get the count of the elements), then it works. But the way Kerry shows it, it would be much more flexible. But, alas, the above error.
As jonrsharpe mentioned in the comments, please read the Cypress document on variables and aliases thoroughly. This is a core concept of Cypress, and it will give you a solid understanding of how to implement variables and carry the values between test steps.
The reader's digest example of what you how you can achieve is this:
cy.get('[data-e2e-selector=^whatever]')
.then(elm => cy.wrap(elm.length).as("myVariableName"));
What this is doing is cy.wrap will yield the value from elm.length in a Cypress command chain, which then allows you to assign it to an alias "myVariableName".
In your following test step where you want to compare the value on a separate page, you would then access the alias' value in one of two ways:
Using this.
cy.get('[data-e2e-selector=^whateverNextPage]')
.then(elm => elm.length)
.should('have.length', this.myVariableName)
OR
via cy.get()
cy.get("#myVariableName").then(function(variableValue){
cy.get('[data-e2e-selector=^whateverNextPage]')
.then(elm => elm.length)
.should('have.length', variableValue)
})

Redirect Error: No such label 'stdexten' in extension

i have install asterisk 11 on my server but when i want to redirect to extensions, i catch this error:
NOTICE[12657][C-00000043]: pbx.c:4475 pbx_extension_helper: No such label 'stdexten' in extension '305' in context 'DLPN_DialPlan'
WARNING[12657][C-00000043]: pbx.c:11825 pbx_parseable_goto: Priority 'stdexten' must be a number > 0, or valid label
ERROR[12657][C-00000043]: app_stack.c:547 gosub_exec: Gosub address is invalid: '305,stdexten(SIP/305)'
i think that this must be a bug in asterisk. anybody know about this???
I think that you are probably using a Goto with just an extension. This won't work - When using Goto, if you wish to go to a different exntension, then you must also specify the label or line number you want to go to.
Here's a useful reference on Goto in Asterisk
Here are the various combinations of parameters that work:
Goto(context,extension,priority)
Goto(extension,priority)
Goto(priority)
Goto(context,extension,label)
Goto(extension,label)
Goto(label)
Contexts are groups of extensions in extensions.conf. The start of a context looks like this: [Hello_World_Context]
Extensions are groups of commands that get executed if the call matches the number pattern. They're usually a bunch of commands which start with exten =>, such as: exten => 100,1,Answer
A priority is basically a line number. An example: exten => 100,1,Answer has a priority of 1.
A label can be used instead of a priority/line number. Example: exten => 100,n(extension_name),Answer - This has a label of exension_name
Goto([[context|]extension|]priority)
Set the priority to the specified value, optionally setting the extension and optionally the context as well. The extension BYEXTENSION is special in that it uses the current extension, thus permitting you to go to a different context, without specifying a specific extension. Please note that the LEADING arguments to Goto() are optional, not the trailing arguments.

Navigaton strategy - drilldown on children - does not retain ordering in icCube

In the icCube Web Reporting you can set a graph and chart to respond on a click row/column/cell event and inidcate what must be done when the widget receives a click.
In this particular case I have the rows ordered based on a parameter.
But when I click on the row in the graph, the children are displayed without any order.
I found the following workaround, but it helps only with a named measure not a parameter:
use navigation strategy MDX iso children and use:
ORDER ($member.children, [measures].[amount], BASC)
the following gives an MDX error:
ORDER ($member.children, #{PARAMETER}, BASC)
The cause for the error is that it does not replace the #{PARAMETER} with the actual value.
Is there any other way/workaround to get this working in icCube?
A live working example explaining the questiuon can be found here
Sorry, it's a limitation - bug - in the current version : http://issues.iccube.com/issue/ic3pub-165
Will be fixed in 5.1.2

Resources