third_party/mapreduce/mapreduce/static/status.js
function addParameters(params, prefix) {
      if (!params) {
        return;
      }

      var sortedParams = getSortedKeys(params);
      $.each(sortedParams, function(index, key) {
        var value = params[key];
        var paramId = 'job-' + prefix + key + '-param';
        var paramP = $('<p class="editable-input">');

        // Deal with the case in which the value is an object rather than
        // just the default value string.
        var prettyKey = key;
        if (value && value['human_name']) {
          prettyKey = value['human_name'];
        }

        if (value && value['default_value']) {
          value = value['default_value'];
        }

        $('<label>')
          .attr('for', paramId)
          .text(prettyKey)
          .appendTo(paramP);
        $('<span>').text(': ').appendTo(paramP);
        $('<input type="text">')
          .attr('id', paramId)
          .attr('name', prefix + key)
          .attr('value', value)
          .appendTo(paramP);
        paramP.appendTo(jobForm);
      });
    }
function addParameters(params, prefix) {
      if (!params) {
        return;
      }

      var sortedParams = getSortedKeys(params);
      $.each(sortedParams, function(index, key) {
        var value = params[key];
        var paramId = 'job-' + prefix + key + '-param';
        var paramP = $('<p class="editable-input">');

        // Deal with the case in which the value is an object rather than
        // just the default value string.
        var prettyKey = key;
        if (value && value['human_name']) {
          prettyKey = value['human_name'];
        }

        if (value && value['default_value']) {
          value = value['default_value'];
        }

        $('<label>')
          .attr('for', paramId)
          .text(prettyKey)
          .appendTo(paramP);
        $('<span>').text(': ').appendTo(paramP);
        $('<input type="text">')
          .attr('id', paramId)
          .attr('name', prefix + key)
          .attr('value', value)
          .appendTo(paramP);
        paramP.appendTo(jobForm);
      });
    }
function addParameters ( params , prefix ) { if ( ! params ) { return ; } var sortedParams = getSortedKeys ( params ) ; $ . each ( sortedParams , function ( index , key ) { var value = params [ key ] ; var paramId = 'job-' + prefix + key + '-param' ; var paramP = $ ( '<p class="editable-input">' ) ; // Deal with the case in which the value is an object rather than // just the default value string. var prettyKey = key ; if ( value && value [ 'human_name' ] ) { prettyKey = value [ 'human_name' ] ; } if ( value && value [ 'default_value' ] ) { value = value [ 'default_value' ] ; } $ ( '<label>' ) . attr ( 'for' , paramId ) . text ( prettyKey ) . appendTo ( paramP ) ; $ ( '<span>' ) . text ( ': ' ) . appendTo ( paramP ) ; $ ( '<input type="text">' ) . attr ( 'id' , paramId ) . attr ( 'name' , prefix + key ) . attr ( 'value' , value ) . appendTo ( paramP ) ; paramP . appendTo ( jobForm ) ; } ) ; }
Add parameter values to the job form.
Add parameter values to the job form .