Welcome to mirror list, hosted at ThFree Co, Russian Federation.

settings.admin.php « templates - github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bcea9be617ecc9c31192df17c64dd32177dded02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<?php
/**
 * Nextcloud - nextant
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Maxence Lange <maxence@pontapreta.net>
 * @copyright Maxence Lange 2016
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
script('nextant', 'settings.admin');
style('nextant', 'admin');

?>
<div class="section" id="nextant">
	<h2><?php p($l->t('Nextant (Full-Text Search)')) ?></h2>

	<table>
		<tr>
			<td colspan="2"><em><?php p($l->t('Specify the URL of your Solr servlet, and the name of the core to use.')); ?>
			<br />If you do not have a Solr servlet running, you can <a
					href="https://github.com/daita/nextant/wiki" target="_blank">find
						few guides on how to install one on the Wiki</a></em></td>
		</tr>
		<tr>
			<td>
				<table>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td style="text-align: right;"><label>
	    <?php p($l->t('Address of your Solr Servlet :')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><input type="text" name="solr_url" id="solr_url"
							value="<?php p($_['solr_url'])?>" style="width: 250px;"></td>
					</tr>

					<tr>
						<td style="text-align: right;"><label><?php p($l->t('Core :')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><input type="text" id="solr_core"
							value="<?php p($_['solr_core'])?>" style="width: 250px;"></td>
					</tr>

					<tr>
						<td></td>
						<td>
							<button type="button" id="nextant_apply" style="width: 270px"><?php p($l->t('Test and Save')) ?></button>
						</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<!--  					<tr style="height: 40px;">
						<td colspan="2" style="text-align: center; width: 300px;"><span
							id="nextant-admin-msg" class="msg"></span></td>
					</tr>
							-->
		<?php

if ($_['configured'] == '1') {
    ?>
		
					<tr style="height: 30px;">
						<td style="text-align: right;"><label>
	    <?php p($l->t('Live Extract :')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><input type="checkbox" name="solr_live_extract"
							id="solr_live_extract" value="1"
							<?php if ($_['live_extract'] == '1') { p('CHECKED'); } ?>
							style="margin: 10px;"> (<a
							href="https://github.com/daita/nextant/wiki/Extracting-&-Live-Update"
							target="_blank">help</a>)</td>
					</tr>

					<tr style="height: 30px;">
						<td style="text-align: right;"><label>
	    <?php p($l->t('Live Document Update :')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><input type="checkbox" name="solr_live_docupdate"
							id="solr_live_docupdate" value="1"
							<?php if ($_['live_docupdate'] == '1') { p('CHECKED'); } ?>
							style="margin: 10px;"></td>
					</tr>
					<tr style="height: 20px;">
						<td style="width: 250px; text-align: right;"><label>
	    <?php p($l->t('Last index:')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><?php
    
    if ($_['last_index'] > 0) {
        p(date('r', $_['last_index']));
        ?></td>

					</tr>
					<tr style="height: 20px;">
						<td style="width: 250px; text-align: right;"><label>
	    <?php p($l->t('Number of documents :')) ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td><?php ($_['current_docs'] === false) ? p('Solr Servlet is down') : p($_['current_docs']); ?></td>
					</tr>

					<tr>
						<td></td>

						<td><?php
        if ($_['needed_index'] == 0) {
            ?>
			          <button type="button" id="nextant_force_index"
								style="width: 270px"><?php p($l->t('Force re-index')) ?></button>
			          <?php
        } else 
            if ($_['needed_index'] == 2) {
                ?>            <b>execute <i>./occ nextant:index</i></b> <?php
            } else
                p('index scheduled');
    } else
        p('never');
    ?></td>
					</tr>
						<?php } ?>
					
				</table>
			</td>
			<td style="padding-left: 40px;">
				<div id="nextant-display">
					<div id="ping" class="nextant-display-line">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="schema" class="nextant-display-line" style="top: 30px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="extract" class="nextant-display-line" style="top: 60px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="update" class="nextant-display-line" style="top: 90px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="search" class="nextant-display-line" style="top: 120px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="delete" class="nextant-display-line" style="top: 150px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

					<div id="save" class="nextant-display-line" style="top: 190px;">
						<img id="icon_check" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'check.png')); ?>" />
						<img id="icon_fail" class="nextant_display_icon"
							src="<?php print_unescaped(OCP\image_path('nextant', 'fail.png')); ?>" />
						<div id="text" class="nextant_display_text"></div>
					</div>

				</div>
			</td>
		</tr>

	</table>
</div>