rer.solrpush 1.3.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rer/solrpush/__init__.py +7 -0
- rer/solrpush/adapters/__init__.py +1 -0
- rer/solrpush/adapters/configure.zcml +13 -0
- rer/solrpush/adapters/file.py +52 -0
- rer/solrpush/adapters/rss_feed.py +28 -0
- rer/solrpush/behaviors/__init__.py +0 -0
- rer/solrpush/behaviors/configure.zcml +16 -0
- rer/solrpush/behaviors/solr_fields.py +41 -0
- rer/solrpush/browser/__init__.py +0 -0
- rer/solrpush/browser/configure.zcml +111 -0
- rer/solrpush/browser/controlpanel.py +96 -0
- rer/solrpush/browser/elevate_settings.py +35 -0
- rer/solrpush/browser/maintenance.py +476 -0
- rer/solrpush/browser/query_debug.py +12 -0
- rer/solrpush/browser/querybuilder.py +168 -0
- rer/solrpush/browser/scales.py +80 -0
- rer/solrpush/browser/static/.gitkeep +0 -0
- rer/solrpush/browser/static/dist/dev/main.js +58240 -0
- rer/solrpush/browser/static/dist/dev/main.js.map +180 -0
- rer/solrpush/browser/static/dist/prod/main.js +9604 -0
- rer/solrpush/browser/static/dist/prod/main.js.map +1 -0
- rer/solrpush/browser/static/javascripts/FacetsContainer/index.js +46 -0
- rer/solrpush/browser/static/javascripts/ProgressBar/index.js +40 -0
- rer/solrpush/browser/static/javascripts/ProgressBarContainer/index.js +66 -0
- rer/solrpush/browser/static/javascripts/index.js +14 -0
- rer/solrpush/browser/static/package.json +13 -0
- rer/solrpush/browser/static/styles.css +22 -0
- rer/solrpush/browser/static/styles.css.map +1 -0
- rer/solrpush/browser/static/styles.scss +27 -0
- rer/solrpush/browser/static/yarn.lock +1408 -0
- rer/solrpush/browser/templates/controlpanel_layout.pt +49 -0
- rer/solrpush/browser/templates/query_debug.pt +17 -0
- rer/solrpush/browser/templates/reindex_solr.pt +35 -0
- rer/solrpush/configure.zcml +81 -0
- rer/solrpush/indexer.py +120 -0
- rer/solrpush/interfaces/__init__.py +8 -0
- rer/solrpush/interfaces/adapter.py +13 -0
- rer/solrpush/interfaces/elevate.py +98 -0
- rer/solrpush/interfaces/layer.py +6 -0
- rer/solrpush/interfaces/queueprocessor.py +6 -0
- rer/solrpush/interfaces/settings.py +194 -0
- rer/solrpush/locales/README.rst +37 -0
- rer/solrpush/locales/__init__.py +0 -0
- rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.mo +0 -0
- rer/solrpush/locales/en/LC_MESSAGES/rer.solrpush.po +399 -0
- rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.mo +0 -0
- rer/solrpush/locales/it/LC_MESSAGES/rer.solrpush.po +399 -0
- rer/solrpush/locales/rer.solrpush.pot +402 -0
- rer/solrpush/locales/update.py +71 -0
- rer/solrpush/locales/update.sh +12 -0
- rer/solrpush/parser.py +211 -0
- rer/solrpush/permissions.zcml +18 -0
- rer/solrpush/profiles/default/actions.xml +21 -0
- rer/solrpush/profiles/default/browserlayer.xml +7 -0
- rer/solrpush/profiles/default/catalog.xml +4 -0
- rer/solrpush/profiles/default/controlpanel.xml +31 -0
- rer/solrpush/profiles/default/metadata.xml +8 -0
- rer/solrpush/profiles/default/registry/bundle.xml +25 -0
- rer/solrpush/profiles/default/registry/criteria.xml +55 -0
- rer/solrpush/profiles/default/registry/settings.xml +6 -0
- rer/solrpush/profiles/default/rolemap.xml +13 -0
- rer/solrpush/profiles/default/types/Document.xml +12 -0
- rer/solrpush/profiles/to_1100/componentregistry.xml +9 -0
- rer/solrpush/profiles/to_1100/metadata.xml +5 -0
- rer/solrpush/profiles/to_1300/controlpanel.xml +13 -0
- rer/solrpush/profiles/to_1300/registry.xml +5 -0
- rer/solrpush/profiles/uninstall/browserlayer.xml +7 -0
- rer/solrpush/profiles/uninstall/controlpanel.xml +21 -0
- rer/solrpush/profiles/uninstall/registry.xml +17 -0
- rer/solrpush/restapi/__init__.py +0 -0
- rer/solrpush/restapi/configure.zcml +8 -0
- rer/solrpush/restapi/services/__init__.py +0 -0
- rer/solrpush/restapi/services/configure.zcml +8 -0
- rer/solrpush/restapi/services/elevate_schema/__init__.py +0 -0
- rer/solrpush/restapi/services/elevate_schema/configure.zcml +14 -0
- rer/solrpush/restapi/services/elevate_schema/get.py +12 -0
- rer/solrpush/restapi/services/solr_search/__init__.py +0 -0
- rer/solrpush/restapi/services/solr_search/batch.py +129 -0
- rer/solrpush/restapi/services/solr_search/configure.zcml +14 -0
- rer/solrpush/restapi/services/solr_search/get.py +25 -0
- rer/solrpush/restapi/services/solr_search/solr_search_handler.py +86 -0
- rer/solrpush/setuphandlers.py +20 -0
- rer/solrpush/testing.py +161 -0
- rer/solrpush/tests/__init__.py +0 -0
- rer/solrpush/tests/docs/example.docx +0 -0
- rer/solrpush/tests/docs/example.ods +0 -0
- rer/solrpush/tests/docs/example.pdf +0 -0
- rer/solrpush/tests/docs/plone_logo.png +0 -0
- rer/solrpush/tests/test_behaviors.py +61 -0
- rer/solrpush/tests/test_elevate.py +124 -0
- rer/solrpush/tests/test_events.py +181 -0
- rer/solrpush/tests/test_image_tags.py +85 -0
- rer/solrpush/tests/test_maintenance.py +165 -0
- rer/solrpush/tests/test_querybuilder.py +272 -0
- rer/solrpush/tests/test_restapi_search.py +127 -0
- rer/solrpush/tests/test_search.py +177 -0
- rer/solrpush/tests/test_setup.py +67 -0
- rer/solrpush/tests/test_solr_interface.py +359 -0
- rer/solrpush/tests/test_tika.py +85 -0
- rer/solrpush/tests/test_vocabularies.py +113 -0
- rer/solrpush/upgrades.py +76 -0
- rer/solrpush/upgrades.zcml +86 -0
- rer/solrpush/utils/__init__.py +6 -0
- rer/solrpush/utils/solr_common.py +122 -0
- rer/solrpush/utils/solr_indexer.py +295 -0
- rer/solrpush/utils/solr_search.py +352 -0
- rer/solrpush/vocabularies.py +50 -0
- rer.solrpush-1.3.4-py3.10-nspkg.pth +1 -0
- rer.solrpush-1.3.4.dist-info/LICENSE.GPL +339 -0
- rer.solrpush-1.3.4.dist-info/LICENSE.rst +15 -0
- rer.solrpush-1.3.4.dist-info/METADATA +507 -0
- rer.solrpush-1.3.4.dist-info/RECORD +116 -0
- rer.solrpush-1.3.4.dist-info/WHEEL +5 -0
- rer.solrpush-1.3.4.dist-info/entry_points.txt +5 -0
- rer.solrpush-1.3.4.dist-info/namespace_packages.txt +1 -0
- rer.solrpush-1.3.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sources":["webpack:///main.js"],"mappings":"AAAA;;;;;AA4dA;;;;;;;;AAooBA;;;;;;;;AAmCA;;;;;;;;AAsSA;;;;;;;AAuFA","sourceRoot":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { object } from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const FacetsContainer = ({ facets }) => {
|
|
5
|
+
if (!facets) {
|
|
6
|
+
return '';
|
|
7
|
+
}
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
className="facets-container"
|
|
11
|
+
style={{ flex: '30%', marginRight: '1em' }}
|
|
12
|
+
>
|
|
13
|
+
<h3>Facets</h3>
|
|
14
|
+
{Object.keys(facets).map((id, i) => {
|
|
15
|
+
const facet_values = facets[id];
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
key={i}
|
|
19
|
+
className="facet"
|
|
20
|
+
style={{
|
|
21
|
+
backgroundColor: '#eee',
|
|
22
|
+
padding: '5px 20px',
|
|
23
|
+
margin: '10px 0',
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<strong>{id}</strong>
|
|
27
|
+
{facet_values.map((val, idx) => {
|
|
28
|
+
const key = Object.keys(val)[0];
|
|
29
|
+
return (
|
|
30
|
+
<div key={`${id}-${idx}`}>
|
|
31
|
+
{key} [{val[key]}]
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
})}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
})}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
FacetsContainer.propTypes = {
|
|
43
|
+
facets: object,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default FacetsContainer;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Line } from 'rc-progress';
|
|
3
|
+
import { number, string, bool } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
const ProgressBar = ({ tot, counter, message, error }) => {
|
|
6
|
+
if (error) {
|
|
7
|
+
return <div className="status-message">{message || 'Generic Error.'}</div>;
|
|
8
|
+
}
|
|
9
|
+
const progress = tot === 0 ? 0 : Math.floor((counter * 100) / tot);
|
|
10
|
+
return (
|
|
11
|
+
<React.Fragment>
|
|
12
|
+
{message ? <div>{message}</div> : ''}
|
|
13
|
+
<div className="status-bar">
|
|
14
|
+
<Line
|
|
15
|
+
percent={progress}
|
|
16
|
+
strokeWidth="2"
|
|
17
|
+
strokeLinecap="butt"
|
|
18
|
+
strokeColor={progress === 100 ? '#008000' : '#007bb1'}
|
|
19
|
+
/>
|
|
20
|
+
{}
|
|
21
|
+
{tot > 0 ? (
|
|
22
|
+
<div>
|
|
23
|
+
{counter}/{tot} ({progress}%)
|
|
24
|
+
</div>
|
|
25
|
+
) : (
|
|
26
|
+
''
|
|
27
|
+
)}
|
|
28
|
+
</div>
|
|
29
|
+
</React.Fragment>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
ProgressBar.propTypes = {
|
|
34
|
+
tot: number,
|
|
35
|
+
counter: number,
|
|
36
|
+
message: string,
|
|
37
|
+
error: bool,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
import { string } from 'prop-types';
|
|
4
|
+
import Spinner from 'react-svg-spinner';
|
|
5
|
+
import ProgressBar from '../ProgressBar';
|
|
6
|
+
|
|
7
|
+
const ProgressBarContainer = ({ authenticator, action }) => {
|
|
8
|
+
const defaultData = {
|
|
9
|
+
in_progress: true,
|
|
10
|
+
tot: 0,
|
|
11
|
+
counter: 0,
|
|
12
|
+
message: '',
|
|
13
|
+
error: false,
|
|
14
|
+
};
|
|
15
|
+
const [intervalId, setIntervalId] = useState();
|
|
16
|
+
const [reindexStart, setReindexStart] = useState(false);
|
|
17
|
+
const [data, setData] = useState(defaultData);
|
|
18
|
+
|
|
19
|
+
const portalUrl = document.body
|
|
20
|
+
? document.body.getAttribute('data-portal-url') || ''
|
|
21
|
+
: '';
|
|
22
|
+
|
|
23
|
+
const doCancel = () => {
|
|
24
|
+
window.location.href = `${portalUrl}/@@solrpush-settings`;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const doReindex = () => {
|
|
28
|
+
setData(defaultData);
|
|
29
|
+
setReindexStart(true);
|
|
30
|
+
axios(`${portalUrl}/${action}`, {
|
|
31
|
+
params: { _authenticator: authenticator },
|
|
32
|
+
});
|
|
33
|
+
const intervalId = setInterval(function () {
|
|
34
|
+
axios(`${portalUrl}/reindex-progress`).then((result) =>
|
|
35
|
+
setData(result.data),
|
|
36
|
+
);
|
|
37
|
+
}, 5000);
|
|
38
|
+
setIntervalId(intervalId);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const { in_progress } = data;
|
|
42
|
+
if (reindexStart && !in_progress) {
|
|
43
|
+
setReindexStart(false);
|
|
44
|
+
clearInterval(intervalId);
|
|
45
|
+
}
|
|
46
|
+
return (
|
|
47
|
+
<div className="maintenance-wrapper">
|
|
48
|
+
<div className="formControls">
|
|
49
|
+
<button onClick={doReindex} disabled={reindexStart}>
|
|
50
|
+
Start {reindexStart ? <Spinner /> : ''}
|
|
51
|
+
</button>{' '}
|
|
52
|
+
<button onClick={doCancel} disabled={reindexStart}>
|
|
53
|
+
Cancel
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
56
|
+
<ProgressBar {...data} />
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
ProgressBarContainer.propTypes = {
|
|
62
|
+
authenticator: string,
|
|
63
|
+
action: string,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default ProgressBarContainer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import ProgressBarContainer from './ProgressBarContainer';
|
|
4
|
+
|
|
5
|
+
const rootElement = document.getElementById('solr-maintenance');
|
|
6
|
+
|
|
7
|
+
if (rootElement) {
|
|
8
|
+
const authenticator = rootElement.getAttribute('data-authenticator');
|
|
9
|
+
const action = rootElement.getAttribute('data-action');
|
|
10
|
+
ReactDOM.render(
|
|
11
|
+
<ProgressBarContainer authenticator={authenticator} action={action} />,
|
|
12
|
+
rootElement,
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
body.template-elevate-settings .datagridwidget-table-view .header {
|
|
2
|
+
vertical-align: top;
|
|
3
|
+
}
|
|
4
|
+
body.template-elevate-settings .datagridwidget-cell {
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
padding: 0.5rem;
|
|
7
|
+
}
|
|
8
|
+
body.template-elevate-settings .datagridwidget-cell.cell-2 {
|
|
9
|
+
width: 40%;
|
|
10
|
+
}
|
|
11
|
+
body.template-elevate-settings .datagridwidget-cell .select2-container {
|
|
12
|
+
margin-bottom: 0.5rem;
|
|
13
|
+
}
|
|
14
|
+
body.template-elevate-settings .datagridwidget-cell input[type=text] {
|
|
15
|
+
padding: 6px 12px;
|
|
16
|
+
}
|
|
17
|
+
body.template-elevate-settings .datagridwidget-manipulator {
|
|
18
|
+
padding: 1rem 0.5rem;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/*# sourceMappingURL=styles.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AACE;EACE;;AAGF;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;EACA","file":"styles.css"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
body.template-elevate-settings {
|
|
2
|
+
.datagridwidget-table-view .header {
|
|
3
|
+
vertical-align: top;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.datagridwidget-cell {
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
padding: 0.5rem;
|
|
9
|
+
|
|
10
|
+
&.cell-2 {
|
|
11
|
+
width: 40%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.select2-container {
|
|
15
|
+
margin-bottom: 0.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input[type='text'] {
|
|
19
|
+
padding: 6px 12px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.datagridwidget-manipulator {
|
|
24
|
+
padding: 1rem 0.5rem;
|
|
25
|
+
vertical-align: middle;
|
|
26
|
+
}
|
|
27
|
+
}
|