Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New security #431

Merged
merged 5 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const REQUEST_NOTIFICATIONS = 'REQUEST_NOTIFICATIONS'
export const RECEIVE_NOTIFICATIONS = 'RECEIVE_NOTIFICATIONS'
export const REQUEST_NEW_NOTIFICATIONS = 'REQUEST_NEW_NOTIFICATIONS'
export const RECEIVE_NEW_NOTIFICATIONS = 'RECEIVE_NEW_NOTIFICATIONS'
export const RESET_QUERY_RESULT = 'RESET_QUERY_RESULT'
export const REQUEST_QUERY_RESULT = 'REQUEST_QUERY_RESULT'
export const RECEIVE_QUERY_RESULT = 'RECEIVE_QUERY_RESULT'

Expand Down Expand Up @@ -1822,6 +1823,16 @@ function fetchDatasetDetail(datasetname, query, isPublic) {


/* Actions for Query Reducer */
export function resetQueryResult(){
return{
type: RESET_QUERY_RESULT,
result: [],
receivedAt: Date.now(),
ope: 'REQUEST_QUERY_RESULT'

}
}

export function receiveQueryResult(json, query){
console.log('receiveQueryResult');
return {
Expand Down
19 changes: 2 additions & 17 deletions src/components/Footer/Public/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ class Footer extends Component {
</div>
</div>

{/* <div className="col-12 col-sm-12" >
<ul>

<li className="bg-footer mb-3"><Link to={'/policy'}>Privacy policy</Link></li>
<li className="bg-footer mb-3"><Link to={'/termini'}>Termini e condizioni</Link></li>

</ul>
</div> */}

<div className="row">
{/* <div className="col-12 col-sm-3">
<h4 className="text-white font-weight-bold mb-3">Open data in Italia</h4>
Expand All @@ -82,16 +73,10 @@ class Footer extends Component {
</div> */}

</div>
<div className="row b-t-1 p-3">
{/* <ul>

<li className="bg-footer mb-3"><Link to={'/policy'}>Privacy policy</Link></li>
<li className="bg-footer mb-3"><Link to={'/termini'}>Termini e condizioni</Link></li>

</ul> */}
{/* <div className="row b-t-1 p-3">
<Link className="mr-3 text-accento" to={'/policy'}>Privacy policy</Link>
<Link className="mr-3 text-accento" to={'/termini'}>Termini e condizioni</Link>
</div>
</div> */}
</footer>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Home/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ return (
<div className={"app-header"}>
<div className="upper-header">
<div className="container">
<h6 className="mx-5 px-1 mb-0">Agid + Team Digitale</h6>
<h6 className="mx-5 px-1 mb-0 text-white font-weight-bold">Agid + Team Digitale</h6>
</div>
</div>
<div className="main-header container">
Expand Down
5 changes: 4 additions & 1 deletion src/components/Widgets/QueryBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ModalFooter
} from 'react-modal-bootstrap';
import { toastr } from 'react-redux-toastr'
import { querySearch, search, launchQueryOnStorage, getDatasetCatalog, receiveQueryResult, translateQueryToSQL } from '../../actions'
import { querySearch, search, launchQueryOnStorage, getDatasetCatalog, receiveQueryResult, translateQueryToSQL, resetQueryResult } from '../../actions'
import { rulesConverter, jsonToCSV } from '../../utility'
import ReactTable from "react-table"
import Select from 'react-select'
Expand Down Expand Up @@ -49,6 +49,9 @@ class QueryBuild extends Component {
datasetFrom: undefined,
datasetJoin: undefined
}

props.dispatch(resetQueryResult())

this.onChangeOrg = this.onChangeOrg.bind(this)
this.onChangePvt = this.onChangePvt.bind(this)
this.getDatasetDetail = this.getDatasetDetail.bind(this)
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/TrasformForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function createDataschema (values, data) {
},
//INFORMAZIONI OPERAZIONALI
"key": item.chiave,
"required": item.obbligatorio,
"required": item.obbligatorio?1:0,
"is_createdate": item.datacreazione,
"is_updatedate": item.dataaggiornamento,
"field_profile": {
Expand Down
3 changes: 3 additions & 0 deletions src/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
REQUEST_SEARCH,
RECEIVE_SEARCH,
RECEIVE_METADATA,
RESET_QUERY_RESULT,
REQUEST_QUERY_RESULT,
RECEIVE_QUERY_RESULT
} from './actions'
Expand Down Expand Up @@ -260,6 +261,8 @@ function userReducer(state = {}, action) {

function queryReducer(state = {}, action){
switch(action.type) {
case RESET_QUERY_RESULT:
return Object.assign({}, state, {'query':{ 'queryLoading': false, 'queryResult': action.result, 'query': undefined }})
case REQUEST_QUERY_RESULT:
return Object.assign({}, state, {'query': { 'queryLoading': action.queryLoading, 'queryResult': action.result, 'query': action.query }})
case RECEIVE_QUERY_RESULT:
Expand Down
12 changes: 9 additions & 3 deletions src/views/DashboardManager/components/widgets/TextWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class TextWidget extends Component {
this.state = {
text: props.text
};

this.save = this.save.bind(this)
this.close = this.close.bind(this)
this.onEditorStateChange = this.onEditorStateChange.bind(this)
}

onEditorStateChange = (text) => {
const { identifier, onChange } = this.props

onChange(identifier)

this.setState({
text: text
});
Expand All @@ -47,7 +53,7 @@ class TextWidget extends Component {
text: this.state.text
})

this.props.onSave(this.props.wid_key, this.state.text);
this.props.onSave(this.props.identifier, this.state.text);
}

edit() {
Expand All @@ -67,7 +73,7 @@ class TextWidget extends Component {
render() {
const { editorState } = this.state;
return (
<div>
<div id={this.props.identifier}>
{!this.state.edit &&
<div>
<div dangerouslySetInnerHTML={{__html: this.state.text}}></div>
Expand Down
Loading