• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 3.9
    • None
    • None
    • None

      The purpose is to test one param or a group (asynchronously)
      The diff with validator, is that we do not want to check that the parameter respect a regexp, but that the parameter value is correct (e.g. the directory does exist, or the sql parameters are ok)

          [RUNTIME-718] Add a parameter checker

          By the way of inserting an icon and text in a button is to use "icon" and "text" : not "html" with your own hack (that is not correctly located)

          Raphaël Franchet added a comment - By the way of inserting an icon and text in a button is to use "icon" and "text" : not "html" with your own hack (that is not correctly located)

          Fixed:

          • Most checkers were hard-coding depending parameters id !
          • The url to warning icon was defined absolutely in the CSS (should be relative to webapp)

          For your problems of CSS, you did this the wrong way : there a simple way to do this "data-errorqtip" and "data-warnqtip" (for this last, a initWarnQtip is required on Labelable)

          Raphaël Franchet added a comment - Fixed: Most checkers were hard-coding depending parameters id ! The url to warning icon was defined absolutely in the CSS (should be relative to webapp) For your problems of CSS, you did this the wrong way : there a simple way to do this "data-errorqtip" and "data-warnqtip" (for this last, a initWarnQtip is required on Labelable)

          • Still some css to complete... : see the _generateStatusTip method

          Quentin Glinel-Mortreuil (Inactive) added a comment - Still some css to complete... : see the _generateStatusTip method

          moreover the send mail test should be removed for the moment

          Raphaël Franchet added a comment - moreover the send mail test should be removed for the moment

          Before applying this patch, do update.

          First of all there is still two bugs:

          • if a field that is part of a group swith is in error ; and then the group switch is unactivated ; the category stay red
          • when starting the config with empty mandatory fields ; they are not in error : normal ; when saving : this failed and the fields go in error : normal ; BUT the category does not go in error : BUG

          Now, let's be honnest, this is ugly and not usable : we will so do the following changes, that are :

          • when a test do fail, the parameters should go in warning mode (becarefull, that when the test become normal again, the parameters should go normal again only if they are not in warning due to another test!)
          • the layout of test i completely modified : there are now buttons in the form itself (one per test): the label is the one of the test, an small-icon may be required (conf of test should have 3 size of icons like any other conf in ametys) - and the test color will be reflected in the button
          • the labels have to be rewriten : let's talk about "verification" more then "test"
          • please clean useless images, css rules and js code.

          Raphaël Franchet added a comment - Before applying this patch, do update. First of all there is still two bugs: if a field that is part of a group swith is in error ; and then the group switch is unactivated ; the category stay red when starting the config with empty mandatory fields ; they are not in error : normal ; when saving : this failed and the fields go in error : normal ; BUT the category does not go in error : BUG Now, let's be honnest, this is ugly and not usable : we will so do the following changes, that are : when a test do fail, the parameters should go in warning mode (becarefull, that when the test become normal again, the parameters should go normal again only if they are not in warning due to another test!) the layout of test i completely modified : there are now buttons in the form itself (one per test): the label is the one of the test, an small-icon may be required (conf of test should have 3 size of icons like any other conf in ametys) - and the test color will be reflected in the button the labels have to be rewriten : let's talk about "verification" more then "test" please clean useless images, css rules and js code.

          Tests depending on invalid fields are now systematically disabled, unless the field is invisible.

          Quentin Glinel-Mortreuil (Inactive) added a comment - Tests depending on invalid fields are now systematically disabled, unless the field is invisible.

          A test depending on a non valid field should be disabled.
          (take care of not disabling an invalid but invisible field - invisibility due to group swith)

          e.g. remove the "sender adress" that is a mandatory field, should disable the send mail test

          Raphaël Franchet added a comment - A test depending on a non valid field should be disabled. (take care of not disabling an invalid but invisible field - invisibility due to group swith) e.g. remove the "sender adress" that is a mandatory field, should disable the send mail test

          Sorry for this overlooking. This is fixed in this version of the patch ( v9 ).

          Quentin Glinel-Mortreuil (Inactive) added a comment - Sorry for this overlooking. This is fixed in this version of the patch ( v9 ).

          I've warned you about a possible pb with this last point but you failed on it.
          if a fieldvaliditychange or a testvaliditychange just call ONE function with no parameter that will analyse ALL.

          In your case, in the last section I have 2 fields, I make both invalid and the one valid again : the general marker disappeared

          Raphaël Franchet added a comment - I've warned you about a possible pb with this last point but you failed on it. if a fieldvaliditychange or a testvaliditychange just call ONE function with no parameter that will analyse ALL. In your case, in the last section I have 2 fields, I make both invalid and the one valid again : the general marker disappeared

          • in addition to the parameter checkers, the validity/invalidity of a field is now reflected in the navigation panel

          Quentin Glinel-Mortreuil (Inactive) added a comment - - edited in addition to the parameter checkers, the validity/invalidity of a field is now reflected in the navigation panel

          Raphaël Franchet added a comment - - edited

          1) double sql test leads to java NPE
          2) when an exception occurred, the test button remains disabled and not reinitialized
          3) Failed test button should be invisible when there are no failed test
          4) invert "all tests" and "failed tests" buttons
          5) Directory test does not test the right directory (should be relative to webapp)
          6) Sent mail has to be rewrite: Subject [Ametys] Test email / Body : You are receving this email because a send mail test was launch on the Ametys server at: http://localhost:8080 ; and the following email address is set as the administrator address : admin@mail.org
          7) Test and save : we should have a global mask

          Raphaël Franchet added a comment - - edited 1) double sql test leads to java NPE 2) when an exception occurred, the test button remains disabled and not reinitialized 3) Failed test button should be invisible when there are no failed test 4) invert "all tests" and "failed tests" buttons 5) Directory test does not test the right directory (should be relative to webapp) 6) Sent mail has to be rewrite: Subject [Ametys] Test email / Body : You are receving this email because a send mail test was launch on the Ametys server at: http://localhost:8080 ; and the following email address is set as the administrator address : admin@mail.org 7) Test and save : we should have a global mask

          Parameter checker for the repository.

          Quentin Glinel-Mortreuil (Inactive) added a comment - Parameter checker for the repository.

          I just commited several icons for the checkers. Please use it

          Raphaël Franchet added a comment - I just commited several icons for the checkers. Please use it

          you should also provide another checkers in repository plugin : repository directory

          Raphaël Franchet added a comment - you should also provide another checkers in repository plugin : repository directory

          I'm affraid you did not start your last modifications based upon my patch. Can you merge those now?

          Raphaël Franchet added a comment - I'm affraid you did not start your last modifications based upon my patch. Can you merge those now?

          patch v4

          Config.i18n.js

          • the after render listener was removed, replaced by event.stopPropagation() in the button handlers to prevent the collapse/expand of the category panels.
          • 'cmp' has been replaced by 'test indicator'.

          ActionPanel.js

          • now extends the Ametys.admin.rightpanel.TextPanel instead of Ext.Panel

          ConfiManager

          • if at least one of the config parameters linked to the checker is invalid, the parameter checker is discarded.

          Quentin Glinel-Mortreuil (Inactive) added a comment - patch v4 Config.i18n.js the after render listener was removed, replaced by event.stopPropagation() in the button handlers to prevent the collapse/expand of the category panels. 'cmp' has been replaced by 'test indicator'. ActionPanel.js now extends the Ametys.admin.rightpanel.TextPanel instead of Ext.Panel ConfiManager if at least one of the config parameters linked to the checker is invalid, the parameter checker is discarded.

          Raphaël Franchet added a comment - - edited

          ConfigManager

          • A param checker referencing unused or unexisting parameters should be info-logged and discarded

          Config.i18n.js

          • can "after render listener" be removed
          • + 100, + 155 should be constants as LABELS_WIDTH
          • in tooltip template, style="XXX" should be avoided and moved to tooltip
          • in _updateParamChecker first for-loop, as soon as disableCmp is false the loop should be stoped (either with an aditionnal for condition ; or with a break command)
          • in _updateParamChecker, as soon as one paramater is ok, the test can be played... is this correct ?
            will runAll avoid a disabled test ? how ? is this coded twice ?
            is the var componentTooltip useful ?
            what "cmp.setDisabled(disableCmp);" stands for ?
          • for the btn of a paramChecker you keep on the id : good, but for a cmp you keep its instance !

          In ActionPanel

          Doc

          • Classes for existing java checker should be documented (not only those with configuration)

          Raphaël Franchet added a comment - - edited ConfigManager A param checker referencing unused or unexisting parameters should be info-logged and discarded Config.i18n.js can "after render listener" be removed + 100, + 155 should be constants as LABELS_WIDTH in tooltip template, style="XXX" should be avoided and moved to tooltip in _updateParamChecker first for-loop, as soon as disableCmp is false the loop should be stoped (either with an aditionnal for condition ; or with a break command) in _updateParamChecker, as soon as one paramater is ok, the test can be played... is this correct ? will runAll avoid a disabled test ? how ? is this coded twice ? is the var componentTooltip useful ? what "cmp.setDisabled(disableCmp);" stands for ? for the btn of a paramChecker you keep on the id : good, but for a cmp you keep its instance ! In ActionPanel Doc Classes for existing java checker should be documented (not only those with configuration)

          Temporary patch for save purposes

          Raphaël Franchet added a comment - Temporary patch for save purposes

          Inside this patch :

          • Addition of the parameter checkers functionnality.
          • Refactoring of the ConfigManager.
          • Several checkers implementations in org.ametys.runtime.util.checkers.
          • Small addition to the Ametys.admin.rightpanel.ActionPanel.js ( method addText )

          Quentin Glinel-Mortreuil (Inactive) added a comment - - edited Inside this patch : Addition of the parameter checkers functionnality. Refactoring of the ConfigManager. Several checkers implementations in org.ametys.runtime.util.checkers . Small addition to the Ametys.admin.rightpanel.ActionPanel.js ( method addText )

            quentin Quentin Glinel-Mortreuil (Inactive)
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: