Project

General

Profile

Actions

Bug #13469

closed

JS error when loading Rules pages

Added by Nicolas CHARLES over 6 years ago. Updated about 6 years ago.

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

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

Actions #1

Updated by Raphael GAUTHIER over 6 years ago

  • Status changed from New to In progress
Actions #2

Updated by Raphael GAUTHIER over 6 years 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
Actions #3

Updated by Raphael GAUTHIER over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Vincent MEMBRÉ about 6 years ago

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

Also available in: Atom PDF