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

Cleaned up and simplified the Toolbar plugin and introduced some new … #526

Merged
merged 2 commits into from
Apr 19, 2016
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"style-loader": "^0.12.4",
"url-loader": "^0.5.7",
"watchify": "^3.2.1",
"webpack": "^1.8.5",
"webpack": "1.12.15",
"webpack-dev-server": "^1.7.0"
},
"//": "replace react-sortable-items with official on npm when 0.0.10 with remove_deprecated PR in included",
Expand Down Expand Up @@ -98,7 +98,7 @@
"react-redux": "^4.1.1",
"react-sidebar": "^2.1.1",
"react-sortable-items": "0.0.11",
"react-spinkit": "^1.1.4",
"react-spinkit": "1.1.6",
"react-swipe": "^3.0.0",
"react-widgets": "3.1.7",
"redux": "3.1.3",
Expand Down
41 changes: 41 additions & 0 deletions project/web/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>__PROJECTDESCRIPTION__ - Web App</display-name>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>geostore.root</param-value>
</context-param>

<context-param>
<param-name>proxyPropPath</param-name>
<param-value>/proxy.properties</param-value>
</context-param>

<!-- spring context loader -->
<listener>
Expand All @@ -20,11 +29,43 @@
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

<!-- CXF Servlet -->
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/rest/geostore/*</url-pattern>
</servlet-mapping>

<!-- Proxy Servlet -->
<servlet>
<servlet-name>HttpProxy</servlet-name>
<servlet-class>it.geosolutions.httpproxy.HTTPProxy</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>HttpProxy</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>

<!-- pick up all spring application contexts -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

<!-- Spring Security Servlet -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>

<!-- Spring Security -->
<!-- <filter> -->
Expand Down
5 changes: 3 additions & 2 deletions web/client/actions/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ function toggleControl(control, property) {
};
}

function setControlProperty(control, property, value) {
function setControlProperty(control, property, value, toggle) {
return {
type: SET_CONTROL_PROPERTY,
control,
property,
value
value,
toggle
};
}

Expand Down
20 changes: 20 additions & 0 deletions web/client/actions/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2016, GeoSolutions Sas.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
const GO_TO_PAGE = 'GO_TO_PAGE';


function goToPage(page, router) {
if (router) {
router.push(page);
}
return {
type: GO_TO_PAGE,
page
};
}
module.exports = {GO_TO_PAGE, goToPage};
10 changes: 6 additions & 4 deletions web/client/components/help/HelpTextPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
var React = require('react');
var BootstrapReact = require('react-bootstrap');
var Panel = BootstrapReact.Panel;
const React = require('react');
const BootstrapReact = require('react-bootstrap');
const Panel = BootstrapReact.Panel;

require("./help.css");

/**
* A panel showning th current selectd help text.
Expand All @@ -18,7 +20,7 @@ var Panel = BootstrapReact.Panel;
* - isVisible: {bool} flag to steer visibility of the badge
* - title (string) header text of this panel
*/
var HelpTextPanel = React.createClass({
const HelpTextPanel = React.createClass({
propTypes: {
id: React.PropTypes.string,
helpText: React.PropTypes.string,
Expand Down
12 changes: 6 additions & 6 deletions web/client/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"map": {
"projection": "EPSG:900913",
"units": "m",
"center": {"x": -10976101, "y": 4251421, "crs": "EPSG:900913"},
"center": {"x": 1250000.000000, "y": 5370000.000000, "crs": "EPSG:900913"},
"zoom":5,
"maxExtent": [
-20037508.34, -20037508.34,
Expand Down Expand Up @@ -89,12 +89,12 @@
},
{
"type": "wms",
"url":["http://demo.geo-solutions.it/geoserver/wms", "http://188.165.246.13/geoserver/wms"],
"url":"http://demo.geo-solutions.it/geoserver/wms",
"visibility": true,
"opacity": 0.7,
"title": "USA Population",
"name": "topp:states",
"group": "Overlays",
"opacity": 0.5,
"title": "Weather data",
"name": "nurc:Arc_Sample",
"group": "Meteo",
"format": "image/png"
}
]
Expand Down
5 changes: 2 additions & 3 deletions web/client/examples/login/containers/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const React = require('react');
const Debug = require('../../../components/development/Debug');
const Localized = require('../../../components/I18N/Localized');
const {connect} = require('react-redux');
const UserMenu = require('../../../plugins/Login');
const {LoginPlugin} = require('../../../plugins/Login');
const {Jumbotron} = require('react-bootstrap');

const Login = React.createClass({
Expand All @@ -31,7 +31,7 @@ const Login = React.createClass({
render() {
return (<Localized messages={this.props.messages} locale={this.props.locale}>
<div className="fill">
<UserMenu />
<LoginPlugin />
<Jumbotron className="fill">
<h1>Hello, {this.props.userDetails && this.props.userDetails.user && this.props.userDetails.user.name || "Guest user. Please login"}</h1>
<p>This is a sample of the login functionality. In the future you will able to login to MapStore to create maps or admin a server.</p>
Expand All @@ -45,7 +45,6 @@ const Login = React.createClass({
});
module.exports = connect((state) => {
return {
enabled: state.map && state.print.capabilities,
locale: state.locale && state.locale.locale,
messages: state.locale && state.locale.messages || {},
userDetails: state.userDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var SearchTarget = React.createClass({
return {
position: null,
geosolutions: {
lng: 10.276508,
lat: 43.878160
lng: 10.298046,
lat: 43.883948
}
};
},
Expand Down
9 changes: 2 additions & 7 deletions web/client/examples/print/components/PrintPreview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
const React = require('react');
const Draggable = require('react-draggable');

const {connect} = require('react-redux');

const Print = connect((state) => ({
map: (state.map && state.map) || (state.config && state.config.map),
layers: state.config && state.config.layers || []
}))(require('../../../plugins/Print'));
const {PrintPlugin} = require('../../../plugins/Print');

const PrintPreview = React.createClass({
propTypes: {
Expand All @@ -23,7 +18,7 @@ const PrintPreview = React.createClass({
return (
<Draggable start={{x: 0, y: 0}} handle=".panel-heading, .panel-heading *">
<div>
<Print style={this.props.style}
<PrintPlugin style={this.props.style}
/>
</div>
</Draggable>
Expand Down
Loading