Can I create a link into rundeck that goes straight to the execution of the job? - rundeck

I have a job without parameters that I would like to give my users to start from a HTML page outside of rundeck.
I'd prefer to not go through additional clicks with the output selection and debug options, but go straight to e.g. https://host/rundeck/project/myproject/execution/show/35#output
But of course the 35 would need to be replaced with $new or something similar, and know that I want to trigger a certain job. Is there a way? Something like https://host/rundeck/project/myproject/execution/show/$new&jobuuid=cce4b26b-8e8a-4920-bd99-4fa3092a3a02 ?

The closest approach is to use this ULR http://localhost:4440/project/ProjectEXAMPLE/job/show/030801bc-6933-472f-ae61-cae11121ca6e (it needs only a click on the "History" tab).

Related

What can I use to paste a list of URLs into a single field one entry at a time?

I need to paste a list of 50 URLs into the URL field on Amazon's infringement form (https://www.amazon.com/report/infringement), but the form only takes one URL at a time. Is there some program, macro, or programming tool that I could use to paste the list in automatically one by one with a short delay or by pressing a hotkey?
If you just want a tool some options are Selenium or borchief but if you are willing to develop then Cron + Python is another alternative. Cron would be used to schedule the script that you want to repetitively repeat. Using the mechanize module on python you can make a script that fills in a form on a website. Here are useful tutorial links for cron and mechanize on python. You could also just make another script that sleeps for some time before calling the mechanize script. There's also HTMLunit for Java
Sounds like something you could do with Selenium IDE https://www.seleniumhq.org/projects/ide/
Maybe start with something like this: https://nadimsaker.blogspot.com/2015/01/how-to-use-array-in-selenium-ide.html

Calling pop up from different pages .jsf

Does anyone know how I can get the same pop up via a button located on different pages (.JSF)?
That is, there is a button "add file" which then opens a pop up with a form where the user adds information about the file. As the pop up is always the same I was thinking of using declarative components. However, I do not understand how.
You can create a taskflow which will contain your page with upload form, and then reuse it on other pages as af:region. Check out this great post with an example how to do it.
I might think about three different ways to achieve this:
1) As #Pregrad said, you can create a Bounded Task Flow and expose this BTF as region (or dynamic region) in every page you need it as a popUp window (recommended if you are using transactions)
2) You can create page templates, put the af:popUp in them and apply the template for each page (recommended if you already have templates, and you need the popUp for each page on your application)
3) You can put the af:popUp component on each page you need it, and then call it programmatically. This approach may be would give you more control on the popUp behaviour but would require you to handle it manually.
The approach you should use does really depend on your needs.

How can I display another form in a z3c.form button handler?

I have a form with a single text field.
On submit I would like to display another form.
I can use RESPONSE.redirect() and pass it in the query string but I would rather not.
I don't want to use a SESSION variable.
I would like to display a second form which can read this value from the request variable.
I have looked at collective.z3cform.wizard but it is not obvious how to do this.
Trying to call the view() from the button handler does not seem to have any effect.
I fall in the same lack of functionality.
For what I know, z3c.form does not support this kind of traversing.
You may remember that this functionality worked well with CMFFormController.
Actually to do this, cmfformcontroller used session machinery.
So, you don't want to use session but that's the way. At least I do so, and I'm happy.
In this way there's no need of a wrapping tool like z3c.form.wizard.
hth,
alessandro.
collective.singing has a non-session based wizard which uses hidden fields to store results of intermediate steps.

Intercepting form submission and displaying results in cakephp without JS

In my Manager controller's add action I want to intercept the form submission, perform a search using the submitted data, and (if the query returns any results) display a list of results to the user.
My question is: what is the best way to display the results to the user? Should I just redirect to a different action (say search), or is there a nice way to display the data while remaining in the add action (session flash maybe)?
I know this can easily be done with the ajaxHelper and I am approaching this from that angle too, but I also need this functionality for my non-javascript users.
Any ideas appreciated!
badp,
you could just have a look at one of the generated (by cake bake controller ..., resp. cake bake view) controller methods named edit and look at the dataflow there.
It should be easy to adept it to your needs from there, as you can compare the dataflow and its outcome visually.

I want to be able to search an html page that is refreshing every 10 seconds for the word "stat"

I want to be able to search an html page that is refreshing every 10 seconds for the word "stat". If the word is found I then want to alert the user through a pop up dialog and possibly a repeating sound until the user acknowledges it.
UPDATE:
Sorry the question was a bit ambiguous. I do not know a great deal about this stuff I just do it as a hobby.
OK so here is the deal. I work as Biomedical Electronics Technician for a hospital. We have a work order system that is web based. Nurses can enter a work order into this system. I have a browser window open at all times that refreshes periodically through an add-on for IE so I can always be up to date on the status of the work orders coming in. When a nurse the enters enters a work order they have the option of choosing Stat, High, Medium, or Low for the priority. When a stat work order is placed our response time should be within five minutes theoretically. I want some way to alert myself when a stat work order has been placed so I can respond accordingly. And I know a repeating sound would be annoying, but that might be the best way to get my attention.
Another caveat to this is the work order status can be changed by me, the tech. So when a work order is initially placed the status is Not assigned or something like that. Once I go start on a work order I change the status to In Progress. If I have to order a part I change the status to Hold for Parts, etc. So basically, what I am saying is I don't want to alerted if the status is anything but "Not assigned". If it will help I will get a copy of the source of the page when I get to work tomorrow.
Our IT department seems unwilling to help and the company that made the product is so busy chasing the daily bugs that show up to add new features such as this at this time. If I knew more a Google search might help, but alas I am a bit noobish in the programming realm, however I am 2 years from a C.S. degree so I am not a complete novice.
To answer another question, I do not have access to the page I am just viewing it so any sort of script would need to run on my client machine.
Thanks
I found this, try it https://addons.mozilla.org/en-US/firefox/addon/3028/
Maybe it can search for STAT on the entire page?
Based off your description, it doesn't sound like you have access to the server to change the code of the page itself, correct?
If that's the case, spend some time learning how to use Greasemonkey (or rather Greasemonkey for IE). It allows you to add functionality to a web page from the client (browser) side, regardless of what's on the server.
You'll need to find the elements that hold the "stat" term your after, and have it check periodically those elements periodically. Look into the setTimeout method for that periodicity. The rest you'll have to work out specific to that page.
What you're looking for, since you have python available, is to build a simple, easy to use webscraper.
First link is how i would do it quick and dirty.
http://www.ehow.com/how_4436125_read-web-page-using-python.html
Second link is a bit more robust and nifty with BeautifulSoup
http://www.builderau.com.au/program/python/soa/Build-a-basic-Web-scraper-in-Python/0,2000064084,339281476,00.htm
Basically, read the page (even set the whole loop on a 10 second refresh timer).
Go line by line with a while readline loop.
See if one of your magic words exists with a regular expression
...
profit?
(... meaning do your alert song and dance)
(profit being rejoice!)