Uploaded image for project: 'ngrinder'
  1. ngrinder
  2. NGRINDER-651

Add the test execution hook in javascript to validate the configuration by admin.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: controller
    • Labels:
      None

      Description

      Add the test execution hook in javascript to validate the configuration by admin.

      Previously ngrinder had scheduleTestHook for the admin to be able to run his own script for various purpose.

      However when the this function needs the confirmation of sth from the user, admin should use windows message box such as alert, confirm to block the script execution.

      By adding the additional hook mechanism like below.

      $("#save_schedule_btn").click(function() {
      $("#agent_count").rules("add",

      { min:1 }

      );
      if (!validateForm())

      { return false; }

      if (typeof(scheduleTestHook) != "undefined") {
      if (scheduleTestHook())

      { showScheduleModal(); }

      } else if (typeof(scheduleTestUnBlockingHook) != "undefined")

      { scheduleTestUnBlockingHook(showScheduleModal); }

      else

      { showScheduleModal(); }

      });

      admin can provide scheduleTestUnBlockingHook function to show the bootbox based dialog box, then the scheduleTestUnBlockingHook can call the passed showSchedule dialog box to continue.

        Activity

        Hide
        junoyoon JunHo Yoon added a comment -

        Fixed

        Show
        junoyoon JunHo Yoon added a comment - Fixed

          People

          • Assignee:
            junoyoon JunHo Yoon
            Reporter:
            junoyoon JunHo Yoon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: