Opened 15 years ago
Closed 13 years ago
#89 closed enhancement (fixed)
Database config
Reported by: | adube | Owned by: | adube |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | server | Version: | |
Keywords: | Cc: |
Description
The xml files in production environment are becoming very bigs and hard to maintain.
A new 'database' config with a GUI to administrate it could be a nice enhancement.
Change History (32)
comment:1 by , 15 years ago
comment:3 by , 14 years ago
commit r812, featuring :
- widget_options new 'order' field
- widgets in toolbars now supported
- single 'control' and 'widget' node now supported in geoexttoolbar
- widget clones management (addCloneName & getCloneNames methods)
- widget clones now supported in geoexttoolbar widget (adjustToolbarWidgets method)
- measuretool widget added
- cleaner record multi-option management (with setOptionValue method)
comment:5 by , 14 years ago
r814, widgets added to pgsqlconfig sample (proof of support by new config) :
- zoomslider
- getmouseposition
- scale
- mouseposition
comment:6 by , 14 years ago
r815, featuring :
- new 'linkResource' method that can be defined in .php file of widgets(in ./src/client/widgets/sample/sample.php). Used to link widgets to resources when some options are too complicated to create using the existing hash in 'mandatory options' and 'optional options', such as the mapfishlayertree options (that need a complex way to dynamically create nodes per resource, etc.)
- the <layername> node in the mapfishlayertree widget is now deprecated by a new <servicetype> node. Using the layername outside the <map> widget is a conceptual error. We should always use the combinaison of servicetype + resourcename to find the according layer object.
- Resources now have a new property : 'title'.
- 'layertreepath' is the mandatory option of resources that want to have layertree widgets linked to them (and create the according node(s)). All layers (regardless of the service type) will be created inside the layertreepath defined. The syntax is :
path/to/my/node container : text separated by '/', each text being a node and a '/' meaning we enter the child nodes.
If we want to have layers seperated by service types, we still need to define a layertreepath (to 'foo', the value doesn't matter) and specify the location of each service type by using 'layertreepath' + servicetype, for example : layertreepathwms, layertreepathtilecache, etc...
Here is a list of remaining 'todos' for the mapfishlayertree widget :
- i18n support (have a way to define 'domain' and 'key' instead of plain 'textkey' for nodes)
- add 'checked', 'minScale' and 'maxScale' options (currently unsupported)
- find a way to define the 'type' of the folders we want to create (by 'type', I mean 'checked' true, false or undefined) They are currently all set to 'undefined'.
comment:7 by , 14 years ago
I forgot to mention that the pgsqlconfig sample was also updated with the lastest changes (and the according .sql sample files as well).
comment:8 by , 14 years ago
r820, featuring :
- 'visibility', 'minscaledenom' and 'maxscaledenom' resource options supported by mapfishlayertree (for the new pgsqlconfig, of course). Added to samples (.sql files).
- 'getOptionalResourceOptionList' should only be populated when used automatically, else it should contain (in comments) the list of readable options usable by the widget. What do others think ? See in ./src/client/widgets/mapfishlayertree/mapfishlayertree.php for an example.
- The only mandatory resource option required by the mapfishlayertree is : layertreepath. Others (visibility, minscaledenom and maxscaledenom) are optionals. These (including 'layertreepath') are the default values used for all servicetypes. You can define a unique option to a service type by adding the type to the option, for example : visibilitywms set to false will affect all wms layers of the resource visibility to false.
More to come :
- use of these resource options by the layers created from the resources
comment:9 by , 14 years ago
r821, featuring :
- 'minresolution', 'minscale' and 'maxscale' options added to map widget. Doc updated as well.
- 'visibility', 'minscaledenom' and 'maxscaledenom' resource options now supported by layers created from resources as well.
comment:10 by , 14 years ago
r822, featuring :
- 'resourceHasRequiredWidgetOptions' method in Widget (core)
- queryonclick single 'result' now supported (doc updated)
- resultextgrid 'delegatecontext' now optional (was mandatory even if set to 'disabled', doc updated)
- new 'getMandatoryResourceOptionValueList' method for widget.php files. See an example in ./src/client/widgets/resultextgrid/resultextgrid.php
- queryonclick and resultextgrid widgets added to pgconfig sample (.sql)
- multiple 'foreignTables' support in getRecords method
- new 'fields', 'field_options' and 'resource_fields' tables
- fields core file added and are now optionally addable to resource objects
- resource fields sortable by order
comment:11 by , 14 years ago
more details about last commit :
- queryonclick 'markerstyle' option not yet supported in new config
- resultextgrid 'delegatefeature' option not yet supported in new config
comment:12 by , 14 years ago
r824, featuring :
- resource 'title' now in config_secur.xml
- resource 'title' used by queryonclick in dropDown menu (next to 'i' button).
comment:13 by , 14 years ago
r826, featuring :
- featurepanel_selector added, currently replaces the resultextgrid widget in sample (.sql)
- the sample widget doesn't do anything in particular since you need to define your own .php template file.
- queryonclick now supports single <featurepanel> option in addition of <featurepanel> inside <featurepanels> options.
comment:15 by , 14 years ago
r828, featuring :
- mapfishrecenter widget now supported (added in sample). Uses the same option as the shortcut widget : zoomField.
- mapfishrecenter "defaultZoom" option now optional (was mandatory in code, but not in doc)
- multiple resource options are now accepted as 'mandatory' options, even if the final option name is different that the option in the widget. For example :
normal case of 1 option :
zoomField: name
in case there are 2 options of the same name, they are put in an array with the same name but with an extra 's' :
zoomFields: array( "name", "code" )
In the widget, you'll find (in the mandatory options array) 'zoomField' only and not zoomFields, but in the code it checks if the option + the extra 's' exists too.
- mapfishrecenter was tested with multiple 'zoomField' options and it worked (not shown in sample).
remaining todo / issues :
- 'displayfield' option currently can't be set to anything else but the 'zoomField' option (so it's currently not possible to have a 'displayfield' option different of the 'queryparam' option)
- multiple 'zoomField' resource options is currently not supported by the shortcut widget
comment:16 by , 14 years ago
r829 : initialview added. Resources options are : initViewUrlField (mandatory), initViewField (optional)
comment:17 by , 14 years ago
r831, featuring :
- pdfprint widget added :
- The 'templates' option must be defined in json.
- The 'templates' option is decoded in the .php file of the widget by the 'linkResource' method
- widget not linked to resources now also call the 'linkResource' method as a way to customize
todo :
- since widgets that are not linked to resources now call the 'linkResource' method as well, the method name has become irrelevant. We should change it.
- 'json' is a quick workaround for the 'complex options' of widgets but should be replaced by a better solution in the future.
comment:18 by , 14 years ago
r832, featuring :
- getAuthorizedResourcesCount method (used to count the total number of resources in a mapcontext and the number of resources the current logged role has access to)
- common-with-acl.php file (to test the above method). 'geoprismademo' database is required (no included in svn).
comment:19 by , 14 years ago
r833, featuring :
- new SettingImpl methods to set and get SessionId, MapContextId and ApplicationId (replaces the hardcoded values)
- sample & driver now adjusted to use these methods
comment:20 by , 14 years ago
- set and get 'current' Session, MapContext and Application ids from SettingImpl to the config driver file.
- new 'getResourceNamesFromRequest' method used to check if the config is requested via a proxy (using 'osmresource' parameter(s)) in order to load just the resources requested instead of the whole config. This is the first thing checked by the config driver.
comment:21 by , 14 years ago
r836, featuring :
- new methods for widgets (in .php file on ./client/widgets side) :
- getServiceType : returns the service type string. Mandatory (original method is abstract)
- needLayer : boolean, wether the widget needs to interact with specified service type layer in order to work (for example, editing widgets need the featureserver layer (vector), but the shortcut doesn't (even if it uses the featureserver service type as well)
- new 'removeLeaf' method for MapFishLayerTree in core to remove specific a specific leaf by using the resource name and service type. The leaf doesn't necessary have 'no rights' that's why this method was added. It's used by the new config.
- here are the new default behavior of "OpenLayers.Layer" object creation (depending on the service type) :
- GYMO : always added
- TileCache : always added
- WMS : only added if there is no TileCache layer already added (of the same resource)
- FeatureServer : only added if a widget (using the 'featureserver' servicetype) needs it OR if it's the only DataStore available, i.e. if no widget need a featureserver layer but it's the only DataStore available for the resource, a layer will be created.
todo :
- adjust the 'removeNodesWithNoRights' in MapFishLayerTree core file to use 'references' to the nodes instead of returning them.
- it was never mentioned anywhere in the ticket, but the vector layers created with the new config currently don't support any kind of 'styling'.
comment:22 by , 14 years ago
r838, featuring:
- domain & key new fields for resources in pgsqlconfig schema. Used by config as title if set, else use 'name'.
- new 'sample_gmap' language files used for sample demos using gmap data
- queryonclick now supports i18n "resource titles" using gettext calls
- MapFishLayerTree layer nodes (leaves) now support i18n textkey (domain & key)
- MapFishLayerTree paths nodes support i18n as well by new config. The syntax to use is the following :
- for a non i18n textkey, use : myTextKey
- for i18n textkey, use : @mydomain:mykey@ (a string between '@' and separated by ':', on the left is the domain, on the right is the key)
Example with multiple paths :
@mydomain:mykey@/myTextKey/@mydomain:mykey2@
comment:24 by , 14 years ago
todo :
- have a new Resource options documentation page listing all possible resource options, which widget(s) use them, their syntax, etc.
comment:25 by , 14 years ago
Summary: | Config in a database → Database config |
---|
comment:26 by , 14 years ago
The remaining work to do has been separated in multiple tickets listed below.
DOCUMENTATION
- Documentation of the new config driver, see #92
- Documentation of some widget options that are different with the new config driver, see #93
WIDGETS
Here's the list of all widgets grouped by their "integration to the new config" status :
- Fully supported widgets :
- Map (automatically generated from mapcontext options and resource options)
- MeasureTool
- InitialView
- ZoomSlider
- MousePosition
- GetMousePosition
- Scale
- FeaturePanelSelector
- GeoExtToolbar
- PDFPrint
- Partially supported widgets (they have enough features to be considered done but have remaining minor issues/enhancements to be dealt with) :
- Currently not supported widgets :
- Deprecated widgets (won't be added at all) :
- QuickZoom
- Toolbar
- Popup
- DelegateFeature ?
OTHERS
Here are some remaining tasks to do :
comment:27 by , 14 years ago
The GeoPrisma Config Administration Interface is an other task needed to be done, see #117
comment:29 by , 14 years ago
An potential enhancement : allow resource option overwriting inside a mapcontext, see #121.
comment:30 by , 14 years ago
We could want to be able to select MapContext, Application and Session using their names instead of their ids, see #126
comment:31 by , 14 years ago
comment:32 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
That task is completed and all "external" tasks have their own independent tickets, so I'm setting this one as "fixed".
why
sample
major bug fix
technical details
upcoming phases