Code Monkey home page Code Monkey logo

hagstofa_oskari's Introduction

oskari-server-extension for Iceland

This is a template for extending oskari-server functionality using Maven.

Modify oskari-ext.properties:

# replace 'sample' with 'myapp'
db.additional.modules=myplaces, analysis, userlayer, myapp

# default view is the first appsetup
view.default=1

# publish template is the second appsetup
view.template.publish=2

# make myplaces etc baselayers have the correct projection for initial setup:
oskari.native.srs=EPSG:3067

To enable end-user registration configure these (more information at http://oskari.org/documentation/features/usermanagement):

allow.registration=true
oskari.email.sender=<[email protected]>
oskari.email.host=<smtp.domain.com>

Modifying the initial application setup:

  1. You will need a Java migration to run your setup file like this:

    app-resources/src/main/java/flyway/myapp/V1_0_0__initial_db_content.java

Or you can run these as individual flyway migrations.

Note! All database tables are created with the core migration.

  1. Your setup should add application specific content like layers, users, appsetups.

You can reference sql files under oskari-server/content-resources like adding inspire-themes:

app-resources/src/main/resources/setup/myapp.json

You can modify dataproviders and users as this is just another example overriding the sample setup:

app-resources/src/main/resources/sql

For example if you would like to have a non-admin user you can add these lines to app-resources/src/main/resources/sql/initial-users.sql:

-- add user;
INSERT INTO oskari_users(user_name, first_name, last_name, uuid) VALUES('user', 'Oskari', 'Olematon', 'fdsa-fdsa-fdsa-fdsa-fdsa');

-- add role to user;
INSERT INTO oskari_role_oskari_user(user_id, role_id) VALUES((SELECT id FROM oskari_users WHERE user_name = 'user'), (SELECT id FROM oskari_roles WHERE name = 'User'));

-- add credentials user/user for non-admin user;
INSERT INTO oskari_jaas_users(login, password) VALUES('user', 'MD5:ee11cbb19052e40b07aac0ca060c23ee');

Layers can be configured in json:

app-resources/src/main/resources/json/layers

And referenced in appsetups like this:

app-resources/src/main/resources/json/views/myapp-geoportal.json#L12

Compile with:

mvn clean install

Replace oskari-map.war under {jetty.home}/webapps/ with the one created under webapp-map/target

Reporting issues

All Oskari-related issues should be reported here: https://github.com/oskariorg/oskari-docs/issues

hagstofa_oskari's People

Contributors

gislipals avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.