Commit Graph

12987 Commits

Author SHA1 Message Date
reger
8e2cef5f07 allow protocol navigator to be unselected if only one button is shown
after activating navi/facetfilter
2016-12-15 00:45:08 +01:00
luccioman
437e535e5c Fixed admin navbar rendering at various screen sizes.
Fix mantis 443 (http://mantis.tokeek.de/view.php?id=443).

Tested on :
 - Debian jessie : Firefox ESR 45.5.1
 - MS Windows 10 : Firefox 50.1.0, Chrome 55 and Edge
 - Emulated devices/adaptative views embedded in the previously
mentionned browsers
2016-12-14 12:49:41 +01:00
reger
0758c868c9 add HostNavigator plugin 2016-12-13 22:14:16 +01:00
reger
a3d38032cb translate languages in ConfigBasic.html 2016-12-13 22:12:11 +01:00
luccioman
b90730f956 Fixed locations search navbar overlapping issues.
This is similar to the main yacysearch navbar issues described in mantis
708 (http://mantis.tokeek.de/view.php?id=708)
2016-12-13 16:50:24 +01:00
luccioman
0714b06038 Fixed resource switch button overlapping at various screen sizes.
Fixes second part of mantis 708
(http://mantis.tokeek.de/view.php?id=708)

The bootstrap-switch component has some sizing issues with long labels,
which are not likely to be solved soon due to a lack of resources on
that project (see issue
https://github.com/nostalgiaz/bootstrap-switch/issues/419 )

This fix works by applying the following ideas :
 - labels are long, so font-size and padding are reduced on small screen
sizes using a media query
 - use relative percent width values on the component wrappers to
prevent overlapping on the neighbour content
 - disable animation because it relies on absolute pixels width values
2016-12-13 15:33:18 +01:00
luccioman
848bfc240c Fixed YaCy logo (no external mark) for the refactored navbar search.
Thanks to reger24 feedback.
2016-12-12 12:55:20 +01:00
reger
8acdc5443b prepare ConfigSearchPage servlet to append and remove navigator plugins,
keeping order of added nav's.
The search page preview template displays active navs. Therefore a select
and add button has been added below the preview (to keep it close to actual).
This should in future likely be done by drag&drop (html5 feature).
2016-12-12 02:29:15 +01:00
reger
60160877f5 bundle initialization of search navigation plugins in separate handler
class to allow to use navigator map in config servlets 
(without need to create a search event)
2016-12-11 21:46:29 +01:00
reger
3151cda3a5 catch ip-format exception on wrong server access setting ip filter
as reported in http://mantis.tokeek.de/view.php?id=713
to prevent abort of initialization.
This jetty/whitelist ipaccesshandler accepts currently only ipv4
2016-12-11 04:43:36 +01:00
reger
b32bcdf344 list entries in outgoing cookie monitor one per line
for easier readability.
For this adjust outgoingCookies entry to use Cookie[] instead of String[]
2016-12-10 22:08:09 +01:00
luccioman
f37a86e1c6 Fixed yacy search navabar header overlapping at various screen sizes.
- using a icon-only admin button at small and medium screen size
- using a icon-only "Search Interfaces" button at small screen size
- hiding the YaCy brand at extra-small screen size

Fixes the header part of mantis 708
(http://mantis.tokeek.de/view.php?id=708).

Navigator button overlapping is still to fix.
2016-12-09 11:25:09 +01:00
reger
3f32262654 enable getCookies for HeaderFramework reusing Jetty CookieCutter 2016-12-09 00:33:20 +01:00
reger
4186ee6fc0 add other custom response header entries set by servlets to the response
to the client (not cookies only). This is used by some servlets to mainly 
set "Access-Control-Allow-Origin" header. Added a contains check to be
sure no header set by Defaultservlet is overwritten.
2016-12-07 00:51:07 +01:00
reger
77e65016c0 use more availabe SwitchboardConstans in ProxyIndexingMonitor_p
(to easily find usage)
2016-12-07 00:39:53 +01:00
luccioman
d27adc2b92 Fixed language detector initialization and NullPointerException cases.
NullPointerException occurred when using and Identificator instance
which encountered and error in its constructor.
This error could be caused by a missing "langdetect" folder in the
current folder of the main process, or by simultaneous first calls to
the constructor, initializing concurrently the DetectorFactory.langlist.

Fixes the mantis 714 (http://mantis.tokeek.de/view.php?id=714)
2016-12-05 18:12:21 +01:00
luccioman
8146b97e9b Added a unit after the vocabulary size value for easier understanding. 2016-12-05 10:58:23 +01:00
luccioman
a1f922b34a Reduced locations vocabulary memory footprint.
Reduced this vocabulary memory usage :
 - by using only one map term2entries instead of two maps having the
same key set
 - by generating the location object links on the fly using the
GeoLocation data instead of storing many duplicates of string prefix
"http://www.openstreetmap.org/?lat="
 
Measurements with VisualVM and GeoNames 0 enabled (cities with a
population > 1000) :
 - AutotaggingLibrary retained size :
  - initial : 309 718 763 bytes
  - after refactoring : 159 224 641 bytes
2016-12-05 10:57:37 +01:00
reger
9c06e752e4 allow request.setAttribute w/o "not implemented" exception by default
skip unused CONNECTION_PROP_ARGS check in getQueryString
2016-12-05 03:15:24 +01:00
reger
de33c7e765 replace one more arbitrary CONNECTION_PROP_CLIENTIP header with std.
getRemoteAddr()
2016-12-05 00:11:03 +01:00
reger
14e73f5b9b use bootstrap button style in MessageSend_p.html
and align buttons with form
2016-12-04 22:26:02 +01:00
reger
65871d28b2 skip comparing "xxxxx" on missing authorization header in Blog servlet 2016-12-04 22:11:22 +01:00
reger
59ab42e7d6 add UserDB lastaccess update calls on login 2016-12-04 00:58:45 +01:00
luccioman
bf8a6d9848 Reduced GeoNames locations memory footprint.
Using String instead of StringBuilder instances in GeonamesLocation
allows to reuse the same immutable objects in the Tagging class.

Measurements with VisualVM and GeoNames 0 enabled (cities with a
population > 1000) :
 - OverArchingLocation retained size :
  - initial : 164 666 830 bytes
  - after refactoring : 97 736 804 bytes
 - AutotaggingLibrary retained size :
  - initial : 354 713 633 bytes
   - after refactoring : 309 718 763 bytes
2016-12-03 09:05:19 +01:00
reger
82512613f5 fix unresolved pattern in ConfiLanguage drop down list 2016-12-03 01:13:47 +01:00
luccioman
3f561c1635 Fixed a NullPointerException case.
Could occur when a search request was performed just after peer startup,
and the Switchboard Thread "LibraryProvider.initialize" had completed,
thus requesting a ProbabilisticClassifier not completely initialized
(and having a null contexts property).
2016-12-02 13:45:45 +01:00
luccioman
6bc2bf1aa4 Small memory footprint reduction for GeonamesLocation.
Reusing the same geonameid Integer instance between `id2loc` and
`name2ids` maps reduces (a little) memory footprint.
Measured OverarchigLocation class retained memory with VisualVM on
openJDK 8 :
 - initial : 183 439 490 bytes
 - after refactoring : 164 666 830 bytes
2016-12-02 13:12:47 +01:00
luccioman
7f846ef674 Small complementary memory footprint improvement for synonyms.
Memory footprint measured with VisualVM and all synonyms enabled :
 - before : 195 015 914 bytes
 - after : 192 548 826 bytes
2016-11-30 17:49:51 +01:00
luccioman
568e3dde6a Improved synonyms memory footprint.
The idea is to avoid unnecessary String objects duplication for the same
words. Particularly efficient with the large moby thesaurus.

Memory footprint measurements with VisualVM :
 - openthesaurus_de_yacy :
 	- initial : 19 443 796 bytes
 	- after refactoring : 18 012 606 bytes

 - mobythesaurus_en_yacy :
 	- initial : 343 453 904 bytes
 	- after refactoring : 173 843 780 bytes

 - thesaurus_ru_yacy :
 	- initial : 3 800 706 bytes
 	- after refactoring : 3 466 612 bytes

 - de + en + ru : 
 	- initial : 366 603 450 bytes
 	- after refactoring : 195 015 914 bytes
2016-11-30 16:50:25 +01:00
reger
60b3adfb43 fix ext2mime to return given default on input=null 2016-11-29 23:32:20 +01:00
reger
f7e9f9be5f move Digest auth checks from DefaultServlet to adminAuthenticated,
eliminating the need to modify http header on Servlet container handled 
Digest authentication, to simulate Basic auth for YaCy servlets.
2016-11-29 03:20:33 +01:00
luccioman
0b4e7795df Fixed JavaScript error "hs.htmlExpand is not a function".
This error occurs on /ConfigSearchPage_p.html and on search results page
when Metadata links are enabled.

The fix was to remove unnecessary use of hs.htmlExpand() which is now
part of highslide-full.js library file, currently not distributed with
YaCy (only includes highslide.js). The Metadata links work correctly and
the initial dynamic expansion offered by htmlExpand() did not bring much
usability.
2016-11-29 02:56:43 +01:00
luccioman
1f4f0eacc2 Fixed a JS undefined error case, occurring when search field is empty. 2016-11-29 02:11:44 +01:00
luccioman
ceb7588880 Converted "clone" URL links in Table_API_p.html to purely relative ones.
Again for easier YaCy integration when running behind a reverse proxy
subfolder.
2016-11-29 01:34:33 +01:00
luccioman
cca3417b87 Fixed image and favicon viewing for unauthenticated local requests.
As reported by @reger24, image and favicon viewing was broken with
unauthenticated requests on peers configured to require authentication
even from localhost.

So I unified viewing rights check in a single new function on
ImageViewer class.
2016-11-28 22:10:05 +01:00
reger
02092de3d8 remove login cookie generation for static admin ind User servlet
cookieAuth is never successful for static admin, leaving the creation and
handling for login cookies for static admin obsolete.
2016-11-26 23:28:30 +01:00
reger
49f19aff75 exclude external link icon in Collage servlet
(icons display not close to image in IE)
2016-11-26 19:53:00 +01:00
reger
a0705c049d include check to prevent adding username identical with static admin
in ConfigAccounts_p
2016-11-26 18:26:14 +01:00
luccioman
89017e17e4 Converted ajax URL to relative and added a check on the response status.
This makes YaCy easier to configure when running behind a reverse Proxy.

The check on status avoids trying to update the page with error text
content when the server returned a 404 or 500 error message for example.
2016-11-25 11:13:16 +01:00
luccioman
fc575fc760 Fixed a NullPointerException case. 2016-11-25 11:07:50 +01:00
reger
9a8691129f fix typing error from commit 60ba5c117c 2016-11-25 04:18:36 +01:00
reger
f9328f07e2 completing the usage of CONNECTION_PROP_CLIENT_HTTPSERVLETREQUEST in
HTTPDProxyHandlers logging facility.
2016-11-25 03:05:53 +01:00
reger
8e3e3ed191 update the older ResponseHeader patch to handle cookies,
to work directly with javax.servlet.http.Cookie (rename headerProps to
cookieStore as is only used for this).
(Re)implement set-cookie in DefaultServlet to make cookieAuthentication
work as designed.
2016-11-25 02:00:20 +01:00
reger
866d3a1960 make RequestHeader login succeed (without throwing exception by default)
correct getAuthType to return Auth Scheme only after authentication
2016-11-25 01:09:42 +01:00
reger
44a6a4e795 fix authentication by hit in userdb (wrong parameter) 2016-11-24 00:16:22 +01:00
luccioman
aa9ddf3c23 Added control over Robots.txt active threads maximum number.
When starting a crawl from a file containing thousands of links,
configuration setting "crawler.MaxActiveThreads" is effective to prevent
saturating the system with too many outgoing HTTP connections threads
launched by the crawler.
But robots.txt was not affected by this setting and was indefinitely
increasing the number of concurrently loading threads until most ot the
connections timed out.

To improve performance control, added a pool of threads for Robots.txt,
consistently used in its ensureExist() and massCrawlCheck() methods.
The Robots.txt threads pool max size can now be configured in the
/PerformanceQueus_p.html page, or with the new
"robots.txt.MaxActiveThreads" setting, initialized with the same default
value as the crawler.
2016-11-23 18:13:05 +01:00
luccioman
3092a8ced5 Fixed thread name consistency for improved monitoring.
Some tasks were modifying the current thread name without restoring it
once finished as it is effectively done elsewhere.
2016-11-23 17:59:52 +01:00
luccioman
eec5779889 Added a name prefix to pooled threads for easier monitoring.
Using JVM monitoring tools, it is then easier to identify tasks running
inside thread pool with a custom prefix rather than the generic one :
"pool-".
2016-11-23 11:21:14 +01:00
reger
baf6d21cfe ConfigSearchPage, move protocol navi up to better simulate actual design.
Because here btn-group-justified screws up table column width (Explorer
and Firefox) bootstrap btn-group is used.
2016-11-23 01:33:01 +01:00
luccioman
176f7c2aab RWI Ranking Configuration page : fixed missing required dependencies.
Fix for mantis 707 (http://mantis.tokeek.de/view.php?id=707)
2016-11-22 09:40:22 +01:00