<commit_before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<!-- these 4 files always have to be included -->
  <link rel="stylesheet" type="text/css" href="../../lib/css/themes/jquery-ui/redmond/jquery-ui.min.css">

  <script type="text/javascript" src="../../lib/js/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
  <script type="text/javascript" src="../../lib/js/jquery-ui-1.10.3.full.min.js"></script><!-- optional: use jqGrid <link rel="stylesheet" type="text/css" href="../../lib/css/jqGrid/ui.jqgrid-4.5.4.css"/> <script type="text/javascript" src="../../lib/js/jqGrid/jquery.jqGrid-4.5.4.min.js"></script> <script type="text/javascript" src="../../lib/js/jqGrid/i18n/grid.locale-all.js"></script> --><!-- optional: use multiselect <link rel="stylesheet" type="text/css" href="../../lib/css/jquery.multiselect-1.13.css"/> <script type="text/javascript" src="../../lib/js/jquery.multiselect-1.13.min.js"></script> --><!-- these two file always have to be included -->
  <link rel="stylesheet" type="text/css" href="../../css/adapter.css">

  <script type="text/javascript" src="../../js/translate.js"></script>
  <script type="text/javascript" src="../../js/adapter-settings.js"></script><!-- you have to define 2 functions in the global scope: -->
  <script type="text/javascript">
// Dictionary (systemDictionary is global variable from adapter-settings.js)
systemDictionary = {
"adaptersettings": {"en": "Syncthing adapter-settings", "de": "Syncthing Adapter-Einstellungen" },
"syncthingurl": {"en": "Syncthing url:", "de": "Syncthing URL:" },
"syncthingurlhint": {"en": "(e.g. http://localhost:8080)", "de": "(z.B. http://localhost:8080)" },
"syncthingapikey": {"en": "Syncthing API-key:", "de": "Syncthing API-Key:" },
"syncthingapikeyhint": {"en": "(see at Syncthing Actions/Advances menu-setting)", "de": "(siehe bei Syncthing unter Actions/Advanced Einstellungen)" },
"syncthingfolderid": {"en": "Syncthing folder-ID:", "de": "Syncthing Folder-ID:" },
"onsave": { "en": "on save adapter restarts with new config immediately.", "de": "Beim Speichern von Einstellungen wird der Adapter sofort neu gestartet." }
};
// the function loadSettings has to exist ...
function load(settings, onChange) {
// example: select elements with id=key and class=value and insert value
for (var key in settings) {
// example: select elements with id=key and class=value and insert value
if ($('#' + key + '.value').attr('type') == 'checkbox') {
$('#' + key + '.value').prop('checked', settings[key]).change(function () {
onChange();
});
} else {
$('#' + key + '.value').val(settings[key]).change(function () {
onChange();
}).keyup(function () {
$(this).trigger('change');
});
}
}
// Signal to admin, that no changes yet
onChange(false);
}
// ... and the function save has to exist.
// you have to make sure the callback is called with the settings object as first param!
function save(callback) {
// example: select elements with class=value and build settings object
var obj = {};
$('.value').each(function () {
var $this = $(this);
obj[$this.attr('id')] = $this.val();
});
callback(obj);
}
  </script><!-- you have to put your config page in a div with id adapter-container -->
</head>


<body>

<div id="adapter-container">
<table>

  <tbody>

    <tr>

      <td valign="middle"><img style="width: 220px; height: 60px;" alt="Syncthing" src="syncthing-horizontal.png"></td>

      <td valign="middle">
      <h3 class="translate">adaptersettings</h3>

      </td>

    </tr>

  </tbody>
</table>

<br>

<table>

  <tbody>

    <tr>

      <td><span class="translate">syncthingurl</span></td>

      <td><input class="value" id="syncthingurl"></td>
<commit_msg>Change<commit_after><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<!-- these 4 files always have to be included -->
  <link rel="stylesheet" type="text/css" href="../../lib/css/themes/jquery-ui/redmond/jquery-ui.min.css">

  <script type="text/javascript" src="../../lib/js/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
  <script type="text/javascript" src="../../lib/js/jquery-ui-1.10.3.full.min.js"></script><!-- optional: use jqGrid <link rel="stylesheet" type="text/css" href="../../lib/css/jqGrid/ui.jqgrid-4.5.4.css"/> <script type="text/javascript" src="../../lib/js/jqGrid/jquery.jqGrid-4.5.4.min.js"></script> <script type="text/javascript" src="../../lib/js/jqGrid/i18n/grid.locale-all.js"></script> --><!-- optional: use multiselect <link rel="stylesheet" type="text/css" href="../../lib/css/jquery.multiselect-1.13.css"/> <script type="text/javascript" src="../../lib/js/jquery.multiselect-1.13.min.js"></script> --><!-- these two file always have to be included -->
  <link rel="stylesheet" type="text/css" href="../../css/adapter.css">

  <script type="text/javascript" src="../../js/translate.js"></script>
  <script type="text/javascript" src="../../js/adapter-settings.js"></script><!-- you have to define 2 functions in the global scope: -->
  <script type="text/javascript">
// Dictionary (systemDictionary is global variable from adapter-settings.js)
systemDictionary = {
"adaptersettings": {"en": "Syncthing adapter-settings", "de": "Syncthing Adapter-Einstellungen" },
"syncthingurl": {"en": "Syncthing url:", "de": "Syncthing URL:" },
"syncthingurlhint": {"en": "(e.g. http://localhost:8080)", "de": "(z.B. http://localhost:8080)" },
"syncthingapikey": {"en": "Syncthing API-key:", "de": "Syncthing API-Key:" },
"syncthingapikeyhint": {"en": "(see at Syncthing Actions/Advances menu-setting)", "de": "(siehe bei Syncthing unter Actions/Advanced Einstellungen)" },
"syncthingfolderid": {"en": "Syncthing folder-ID:", "de": "Syncthing Folder-ID:" },
"onsave": { "en": "on save adapter restarts with new config immediately.", "de": "Beim Speichern von Einstellungen wird der Adapter sofort neu gestartet." }
};
// the function loadSettings has to exist ...
function load(settings, onChange) {
// example: select elements with id=key and class=value and insert value
for (var key in settings) {
// example: select elements with id=key and class=value and insert value
if ($('#' + key + '.value').attr('type') == 'checkbox') {
$('#' + key + '.value').prop('checked', settings[key]).change(function () {
onChange();
});
} else {
$('#' + key + '.value').val(settings[key]).change(function () {
onChange();
}).keyup(function () {
$(this).trigger('change');
});
}
}
// Signal to admin, that no changes yet
onChange(false);
}
// ... and the function save has to exist.
// you have to make sure the callback is called with the settings object as first param!
function save(callback) {
// example: select elements with class=value and build settings object
var obj = {};
$('.value').each(function () {
var $this = $(this);
obj[$this.attr('id')] = $this.val();
});
callback(obj);
}
  </script><!-- you have to put your config page in a div with id adapter-container -->
</head>


<body>

<div id="adapter-container">
<table>

  <tbody>

    <tr>

      <td><img style="margin: 0px 20px; width: 220px; height: 60px;" alt="Syncthing" src="syncthing-horizontal.png"></td>

      <td>
      <h3 class="translate">adaptersettings</h3>

      </td>

    </tr>

  </tbody>
</table>

<br>

<table>

  <tbody>

    <tr>

      <td><span class="translate">syncthingurl</span></td>

      <td><input class="value" id="syncthingurl"></td>

{'fraction_non_alphanumeric': 0.21818667378822273, 'fraction_numerical': 0.011884096675123515, 'mean_word_length': 4.102179836512262, 'pattern_counts': {'":': 42, '<': 119, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '299051', 'n_tokens_mistral': 2509, 'n_tokens_neox': 2391, 'n_words': 613}