Skip to content

Commit

Permalink
Merge 1553499 into d606631
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodbare committed Sep 27, 2018
2 parents d606631 + 1553499 commit e49ff57
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions g-api/config-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ static:
root_user:
password: root
auth_extractors:
- guillotina_cms.extractors.CookiePolicy
- guillotina.auth.extractors.CookiePolicy
- guillotina.auth.extractors.BearerAuthPolicy
- guillotina.auth.extractors.BasicAuthPolicy
- guillotina.auth.extractors.WSTokenAuthPolicy
auth_token_validators:
- guillotina.auth.validators.SaltedHashPasswordValidator
- guillotina_cms.validator.CMSJWTValidator
- guillotina.auth.validators.JWTValidator
redis:
host: "redis"
port: 6379
Expand Down
4 changes: 2 additions & 2 deletions g-api/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ static:
root_user:
password: root
auth_extractors:
- guillotina_cms.extractors.CookiePolicy
- guillotina.auth.extractors.CookiePolicy
- guillotina.auth.extractors.BearerAuthPolicy
- guillotina.auth.extractors.BasicAuthPolicy
- guillotina.auth.extractors.WSTokenAuthPolicy
auth_token_validators:
- guillotina.auth.validators.SaltedHashPasswordValidator
- guillotina_cms.validator.CMSJWTValidator
- guillotina.auth.validators.JWTValidator
redis:
host: "redis"
port: 6380
Expand Down
12 changes: 6 additions & 6 deletions src/components/manage/Form/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ class Form extends Component {
* @returns {undefined}
*/
onChangeTile(id, value) {
const tilesFieldname = getTilesFieldname(this.state.formData);
this.setState({
formData: {
...this.state.formData,
[getTilesFieldname(this.state.formData)]: {
...this.state.formData.tiles,
...this.state.formData[tilesFieldname],
[id]: value || null,
},
},
Expand Down Expand Up @@ -237,7 +238,7 @@ class Form extends Component {
[tilesLayoutFieldname]: {
items: without(this.state.formData[tilesLayoutFieldname].items, id),
},
tiles: omit(this.state.formData[tilesFieldname], [id]),
[tilesFieldname]: omit(this.state.formData[tilesFieldname], [id]),
},
selected: selectPrev
? this.state.formData[tilesLayoutFieldname].items[
Expand All @@ -264,14 +265,14 @@ class Form extends Component {
this.setState({
formData: {
...this.state.formData,
tiles_layout: {
[tilesLayoutFieldname]: {
items: [
...this.state.formData[tilesLayoutFieldname].items.slice(0, insert),
id,
...this.state.formData[tilesLayoutFieldname].items.slice(insert),
],
},
tiles: {
[tilesFieldname]: {
...this.state.formData[tilesFieldname],
[id]: {
'@type': type,
Expand Down Expand Up @@ -350,7 +351,7 @@ class Form extends Component {
this.setState({
formData: {
...this.state.formData,
tiles_layout: {
[tilesLayoutFieldname]: {
items: move(
this.state.formData[tilesLayoutFieldname].items,
dragIndex,
Expand All @@ -373,7 +374,6 @@ class Form extends Component {
const tilesLayoutFieldname = getTilesLayoutFieldname(formData);
const renderTiles = formData[tilesLayoutFieldname].items;
const tilesDict = formData[tilesFieldname];

return this.props.visual ? (
<div className="ui wrapper">
{map(renderTiles, (tile, index) => (
Expand Down
1 change: 1 addition & 0 deletions src/components/manage/Tiles/Text/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default class Edit extends Component {
);
const blockType = currentContentBlock.getType();
if (!includes(listBlockTypes, blockType)) {
let ii = this.props.index;
this.props.onSelectTile(
this.props.onAddTile('text', this.props.index + 1),
);
Expand Down
4 changes: 2 additions & 2 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default defaults(
{
host: 'localhost',
port: '4300',
apiPath: 'http://localhost:8080/Plone', // for Plone
// apiPath: 'http://localhost:8080/Plone', // for Plone
publicUrl: '',
// apiPath: 'http://localhost:8081/db/web', // for guillotina
apiPath: 'http://localhost:8081/db/container', // for guillotina
},
);
1 change: 1 addition & 0 deletions src/server.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export default parameters => {
res.set({
'Cache-Control': 'public, max-age=60, no-transform',
});
console.log(error.stack);
res
.status(500)
.send(`<!doctype html> ${renderToStaticMarkup(errorPage)}`);
Expand Down
2 changes: 1 addition & 1 deletion tests/GuillotinaLibrary.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import logging
from time import sleep
import requests

HEADERS = {
Expand All @@ -18,7 +19,6 @@ def setup_guillotina(self, base_url):
for i in range(10):
resp = s.get(base_url)
if resp.status_code != 200:
logger.warn('Waiting')
sleep(2)
else:
break
Expand Down

0 comments on commit e49ff57

Please sign in to comment.