1<%-- 2CDDL HEADER START 3 4The contents of this file are subject to the terms of the 5Common Development and Distribution License (the "License"). 6You may not use this file except in compliance with the License. 7 8See LICENSE.txt included in this distribution for the specific 9language governing permissions and limitations under the License. 10 11When distributing Covered Code, include this CDDL HEADER in each 12file and include the License file at LICENSE.txt. 13If applicable, add the following below this CDDL HEADER, with the 14fields enclosed by brackets "[]" replaced with your own identifying 15information: Portions Copyright [yyyy] [name of copyright owner] 16 17CDDL HEADER END 18 19Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 20--%> 21<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 22<%@page session="false" errorPage="error.jsp" import="org.opengrok.web.PageConfig" %> 23<%@ page import="org.opengrok.indexer.configuration.RuntimeEnvironment" %> 24<% 25 { 26 PageConfig cfg = PageConfig.get(request); 27 cfg.setTitle("OpenGrok Settings"); 28 } 29%> 30<%@ include file="httpheader.jspf" %> 31<body> 32<div id="page"> 33 <header id="whole_header"> 34 <%@include file="pageheader.jspf" %> 35 <div id="Masthead"> 36 <a href="<%= request.getContextPath() %>/"><span id="home"></span>Home</a> 37 </div> 38 </header> 39 <div id="sbar"></div> 40 <div style="padding-left: 1rem;"> 41 <h1>Settings</h1> 42 <h3 class="header-half-bottom-margin">Suggester</h3> 43 <% 44 boolean suggesterEnabled = RuntimeEnvironment.getInstance().getSuggesterConfig().isEnabled(); 45 %> 46 <label>Enabled 47 <input class="local-setting" name="suggester-enabled" type="checkbox" data-checked-value="true" 48 data-unchecked-value="false" data-default-value="<%= suggesterEnabled ? "true" : "false" %>" 49 <%= suggesterEnabled ? "" : "disabled" %> 50 onchange="onSettingsValueChange(this)"> 51 </label> 52 <br> 53 <br> 54 <input class="submit btn no-margin-left" onclick="resetAllSettings()" type="button" value="Reset to defaults"/> 55 </div> 56</div> 57<script type="text/javascript"> 58 /* <![CDATA[ */ 59 document.pageReady.push(() => initSettings()); 60 /* ]]> */ 61</script> 62<%@include file="foot.jspf" %> 63