Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Displaying HTML and confirm after build trigger. #4268

abhay.sharma ·

Hi,

I need to display some html message (After doing some calculation) with 2 buttons (Continue and Cancel) in popup when user triggers the build.
The build should start only after the user clicks "Continue".
Please help me in achieving this.

Thanks.

  • replies 13
  • views 196
  • stars 0
robinshen ADMIN ·

Unfortunately this is not possible. Alternatively you may configure a variable prompting for some value, and display the html message as description of the variable. This way when user triggers the build, and variable filling screen will appear and you have the chance to display that message to user before triggering the build.

nini10 ·

Hi,

Is there any future plan to support such feature? It will be very helpful.
Currently, to achieve such functionality we need to develop additional GUI application that trigger QB, but it will be better to do it in one place.

Thanks!

robinshen ADMIN ·
absalom1 ·

Let me describe more detail of the request.
We want to display some html content with two buttons when user clicks "Ok" button, after filling all prompt variables.
The html content will be made with a rest API return message.
The rest API will be requested with some variables inserted by user on trigger page.

The actual build will be started if user clicks "Confirm" button on the html page or pop-up.

Also this process should be executed under specific condition like the configuration is under a specific configuration.

robinshen ADMIN ·

Do you mean that you first want to display variables collecting user input, and then based on the user input, retrieve and display appropriate html content and wait for user to confirm before actually triggering the build?

absalom1 ·

Yes that is what I wanted

robinshen ADMIN ·

Thanks for the confirmation. Will take this into account when we start to implement this feature.

absalom1 ·

Actually, I was thinking that I can implement this by using "<script>" tag but I couldn't find how.
Because I'm not an expert of javascript, I'm asking your advice how to get value from those variables, have random id, by javascript

robinshen ADMIN ·

Doing this via javascript should not work, as no custom javascript can be injected, and also it does not play well with QB's build triggering logic.

absalom1 ·

Instead of injecting custom javascript to "Ok" button, please check the possibility of below.

  1. There are several prompt variables like AAA, BBB and CCC.
  2. Description of a variable has some text or a button.
  3. While inserting values to prompt variables, clicking the text or button will open a new window.
  4. The window will has an URL with parameters like "http://support.pmease.com?AAA=111&BBB=222"
  5. Values of those parameters are from prompt variables
  6. Clicking the text or button after changing prompt variables will open a new window with different URL like "http://support.pmease.com?AAA=333&BBB=444"

Id of each input field is changing whenever I open new prompt input page and I don't know how to find id of specific variable's input field.

robinshen ADMIN ·

This seems quite a complex and very user-specific case, and I think currently the general variable prompting mechanism can not satisfy this use case.

absalom1 ·

Yes this is very user-specific case.
However, I would like to know how QuickBuild identify which inut field is mapping to which variable when user clicks "Ok" button.
Also how can I find input field of specific variable like "AAA" or "BBB" on above example?
As I've seen, QuickBuild generate random ID to each input field and I can not use static ID to fetch the value in it.

robinshen ADMIN ·

Currently ids are generated automatically and are not assumed to be accessed/used by user code. So there is no mapping between variable name and id. Also it might not be safe to allow to run arbitrary javascript code via variable description as it can result in XSS attach.