Project

General

Profile

Bug #13469

JS error when loading Rules pages

Added by Nicolas CHARLES 3 months ago. Updated 3 months ago.

Status:
Released
Priority:
N/A
Category:
Web - UI & UX
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

If i load the rules page with details (url like https://192.168.41.2/rudder/secure/configurationManager/ruleManagement#%7B%22ruleId%22:%22f3d7c01c-624a-4716-8d85-67df12febfd1%22%7D , I get the following error:

SyntaxError: missing } after function body[En savoir plus] ruleManagement:159 note: { opened at line 137, column 47

indeed, the method checkLength is missing a closing }


$.fn.dataTableExt.oStdClasses.sPageButtonStaticDisabled="paginate_button_disabled";
        function updateTips( t ) {
          tips
            .text( t )
            .addClass( "ui-state-highlight" );
          setTimeout(function() {
            tips.removeClass( "ui-state-highlight", 1500 );
          }, 500 );
        }
        function checkLength( o, n, min, max ) {
          if ( o.val().length > max || o.val().length < min ) {
            o.addClass( "ui-state-error" );
            updateTips( "Length of " + n + " must be between " +
              min + " and " + max + "." );
            return false;
          } else {
            return true;
          }
        ;
jQuery(document).ready(function() {
        var ruleData = null;
        try {
          ruleData = decodeURI(window.location.hash.substring(1)) ;
        } catch(e) {
          ruleData = null
        }
        if( ruleData != null && ruleData.length > 0) {
          lift.ajax('F5965381864232ZCNWM=' + encodeURIComponent(ruleData), null, null, null)
        }
    ;});
// ]]>

happens on 5.0

Associated revisions

Revision fe064b20 (diff)
Added by Raphael GAUTHIER 3 months ago

Fixes #13469: JS error when loading Rules pages

History

#1 Updated by Raphael GAUTHIER 3 months ago

  • Status changed from New to In progress

#2 Updated by Raphael GAUTHIER 3 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/2033

#3 Updated by Raphael GAUTHIER 3 months ago

  • Status changed from Pending technical review to Pending release

#4 Updated by Vincent MEMBRÉ 3 months ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.0 which was released today.
Changelog

Also available in: Atom PDF