Giter Site home page Giter Site logo

bird-house / pyramid-phoenix Goto Github PK

View Code? Open in Web Editor NEW
7.0 14.0 10.0 25.12 MB

Phoenix is a Pyramid web-application to make it easy to interact with WPS services

Home Page: http://pyramid-phoenix.readthedocs.io/en/latest/

License: Apache License 2.0

Python 12.87% JavaScript 81.00% CSS 2.66% HTML 2.70% Mako 0.34% Shell 0.09% Makefile 0.34%
python javascript pyramid wps ogc-services wms client

pyramid-phoenix's Introduction

Phoenix

Travis Build
Phoenix (the bird)
Phoenix is a long-lived bird that is cyclically regenerated or reborn. (Wikipedia). [..]

Pyramid Phoenix is a web-application build with the Python web-framework Pyramid. Phoenix has a user-interface to interact with Web Processing Services (WPS).

For installation and configuration read the documentation on ReadTheDocs.

Phoenix is part of the Birdhouse project.

pyramid-phoenix's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyramid-phoenix's Issues

add caching of wps requests

The idea is to provide the user with an option to use cached results that have already been calculated for the exact same set of input parameters. After inputting all the parameters, the backend can check to see if this set of parameters has already been run, and the user can be notified. They can then have the option of using those results or they can also redo the calculation by submitting the job.

Will be added the phoenix web client. Maybe caching could also be a layer in the wps proxy which is then used by the phoenix client.

update mongodb to 3.x

currently phoenix works with pymongo=2.8 ... but there is a new version pymongo>=3.0 which does not fit to the current mongodb=2.4 database

Schemas as POST forms

I currently merged my ldap fork with your upstream changes. First of all, phoenix looks great! Good work! :-)
I've moved my login template as a schema to phoenix/schema/__init__.py, basically just by copying ESGFLoginSchema. It works fine, but all arguments are passed as GET values. Not so great, as one of the arguments is a password.

http://localhost:8081/account/ldap?username=admin&password=supergeheim

Do you have any idea how I can change that to be a POST form? Otherwise is there any documentary you can refer me to?

Wrong redirect from http to https.

When I connect to http://phoenix:8081, I'll be getting redirected to https://localhost:8443. (The host name has been omitted and replaced by localhost.)

Plain 404 page

Unlike stated here, the 404 page currently doesn't fit into the global layout.

404page

handle literal type "AnyValue"

this is used for example on badc/cows wps. example:

<LiteralData>
   <ows:AnyValue>
      fldmin fldmax fldsum 
    </ows:AnyValue>
</LiteralData>

Render of forbidden.pt on login failure is not working

In phoenix/views/account.py the lines 142 to 144 are resulting in TypeErrors.

Easy test: http://localhost:8081/account/openid?id=example.com%2Ftest

There is a problem generating the logging string:

2015-06-01 15:07:28,414 ERROR [phoenix.views][MainThread] unknown failure
Traceback (most recent call last):
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 477, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/home/fklemme/Repositories/pyramid-phoenix/phoenix/views/account.py", line 142, in openid
    self.session.flash('Sorry, login failed: %s', queue='danger' % (result.error.message))
TypeError: not all arguments converted during string formatting

If you comment out lines 142 and 143, there is still a problem rendering forbidden.pt:

2015-06-01 15:10:12,942 ERROR [phoenix.views][MainThread] unknown failure
Traceback (most recent call last):
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/home/fklemme/Repositories/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 477, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/home/fklemme/Repositories/pyramid-phoenix/phoenix/views/account.py", line 144, in openid
    response.text = render('phoenix:templates/account/forbidden.pt', request=self.request)
TypeError: render() takes at least 2 arguments (2 given)

The message is a little bit confusing. I assume he's missing a dictionary as the second positional argument.

auto fill x509 certificate field

some processes need a x509 certificate. When running them with Processes/Execute one has to fill the url to the x509 certificate manually. This should be automized.

run process again ...

run process with same input parameters again ...

currently one can only choose a favorite.

fix timestamp render in swiftbrowser

File "/home/phoenix/birdhouse/pyramid-phoenix/phoenix/views/wizard/swiftbrowser.py", line 135, in created_td
return self.render_timestamp_td(item.get('last_modified'))
File "/home/phoenix/birdhouse/pyramid-phoenix/phoenix/grid.py", line 59, in render_timestamp_td
c=HTML.literal(mytimestamp.strftime('%Y-%m-%d %H:%M:%S')),

AttributeError: 'unicode' object has no attribute 'strftime'

IPython requires 'notebook' folder in docs/

The title says it all. After a fresh installation of malleefowl and pyramid, followed the typical make start, IPython will die a few times before Supervisor gives up on retrying to bring up the process.

The reason of the problem is shown in the log file:

[fklemme@null-080027f84ec6 ~]$ tail .conda/envs/birdhouse/var/log/supervisor/ipython-stdout---supervisor-djeztv.log 
supervisor: couldn't chdir to /home/fklemme/pyramid-phoenix/docs/notebook: ENOENT
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/fklemme/pyramid-phoenix/docs/notebook: ENOENT
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/fklemme/pyramid-phoenix/docs/notebook: ENOENT
supervisor: child process was not spawned

The workaround is quite easy:

mkdir -p ~/pyramid-phoenix/docs/notebook

Tested on CentOS 6, but likely to affect other platforms as well.

No new SSL cert with every 'make install'

It seems that every make install generates a new certificate for https.

I think it would be an improvement if make install would preserve the old certificate, if one is already there.

OpenID login failure on clean installation

Just caught this one. Quick guess: I haven't added any admin e-mails to custom.cfg. (Haven't touched anything at all, just cloned and ran phoenix.)

2015-06-19 16:18:18,349 INFO  [140319115413200][MainThread] authomatic: OpenID: Starting OpenID authentication procedure.
2015-06-19 16:18:18,418 DEBUG [140319115413200][MainThread] authomatic: OpenID: SessionOpenIDStore: Association not found.
2015-06-19 16:18:18,851 DEBUG [140319115413200][MainThread] authomatic: OpenID: SessionOpenIDStore: Storing association to session.
2015-06-19 16:18:18,852 INFO  [140319115413200][MainThread] authomatic: OpenID: Service discovery for identifier http://florianklemme.de successful.
2015-06-19 16:18:18,853 INFO  [140319115413200][MainThread] authomatic: OpenID: Writing an auto-submit HTML form to the response.
2015-06-19 16:18:21,882 INFO  [140319115123728][MainThread] authomatic: OpenID: Continuing OpenID authentication procedure after redirect.
2015-06-19 16:18:21,883 DEBUG [140319115123728][MainThread] authomatic: OpenID: SessionOpenIDStore: Association found.
2015-06-19 16:18:21,887 INFO  [140319115123728][MainThread] authomatic: OpenID: Authentication successful.
2015-06-19 16:18:21,887 INFO  [140319115123728][MainThread] authomatic: OpenID: Got AX data.
2015-06-19 16:18:21,887 INFO  [140319115123728][MainThread] authomatic: OpenID: Got SREG data.
2015-06-19 16:18:21,887 INFO  [140319115123728][MainThread] authomatic: OpenID: Procedure finished.
2015-06-19 16:18:21,887 INFO  [phoenix.views.account][MainThread] openid login successful for user [email protected]
2015-06-19 16:18:21,887 INFO  [phoenix.views.account][MainThread] openid login successful for user [email protected]
2015-06-19 16:18:21,888 WARNI [phoenix.views.account][MainThread] openid login: new user [email protected]
2015-06-19 16:18:21,888 WARNI [phoenix.views.account][MainThread] openid login: new user [email protected]
2015-06-19 16:18:22,445 ERROR [phoenix.views][MainThread] unknown failure
Traceback (most recent call last):
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 477, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 166, in openid
    self.login_success(email=result.user.email, openid=result.user.id, name=result.user.name)
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 98, in login_success
    self.send_notification(email, subject, message)
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 87, in send_notification
    mailer.send_immediately(message, fail_silently=True)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid_mailer-0.14.1-py2.7.egg/pyramid_mailer/mailer.py", line 275, in send_immediately
    return self.smtp_mailer.send(*self._message_args(message))
  File "/home/kruecke/pyramid-phoenix/eggs/repoze.sendmail-4.2-py2.7.egg/repoze/sendmail/mailer.py", line 100, in send
    connection.sendmail(fromaddr, toaddrs, message)
  File "/home/kruecke/.conda/envs/birdhouse/lib/python2.7/smtplib.py", line 742, in sendmail
    raise SMTPRecipientsRefused(senderrs)
SMTPRecipientsRefused: {'': (501, '5.1.3 Bad recipient address syntax')}
2015-06-19 16:18:22,445 ERROR [phoenix.views][MainThread] unknown failure
Traceback (most recent call last):
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/tweens.py", line 21, in excview_tween
    response = handler(request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/router.py", line 163, in handle_request
    response = view_callable(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 329, in attr_view
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 305, in predicate_wrapper
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 245, in _secured_view
    return view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 385, in viewresult_to_response
    result = view(context, request)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid-1.5.7-py2.7.egg/pyramid/config/views.py", line 477, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 166, in openid
    self.login_success(email=result.user.email, openid=result.user.id, name=result.user.name)
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 98, in login_success
    self.send_notification(email, subject, message)
  File "/home/kruecke/pyramid-phoenix/phoenix/views/account.py", line 87, in send_notification
    mailer.send_immediately(message, fail_silently=True)
  File "/home/kruecke/pyramid-phoenix/eggs/pyramid_mailer-0.14.1-py2.7.egg/pyramid_mailer/mailer.py", line 275, in send_immediately
    return self.smtp_mailer.send(*self._message_args(message))
  File "/home/kruecke/pyramid-phoenix/eggs/repoze.sendmail-4.2-py2.7.egg/repoze/sendmail/mailer.py", line 100, in send
    connection.sendmail(fromaddr, toaddrs, message)
  File "/home/kruecke/.conda/envs/birdhouse/lib/python2.7/smtplib.py", line 742, in sendmail
    raise SMTPRecipientsRefused(senderrs)
SMTPRecipientsRefused: {'': (501, '5.1.3 Bad recipient address syntax')}

wizard: solr view fails if result.abstract is not available

exception in phoenix.log:

  File "/home/pingu/.conda/envs/birdhouse/lib/python2.7/site-packages/chameleon/py26.py", line 15, in lookup_attr
    raise exc
AttributeError: 'dict' object has no attribute 'abstract'

 - Expression: "
                ${result.abstract}
                "
 - Filename:   ... id-phoenix/phoenix/wizard/templates/wizard/solrsearch.pt

mongodb: many 2GB files kombu_default.n

phoenix uses celery with mongodb as broker. There are growing number of 2GB kombu_default files in var/lib/mongodb. This consumes too much disk space especially on virtual machines ...

Probably there is a config to change this ... or use a different broker ....

Already logged in - on a fresh installation.

While testing, I experienced this strange artefact quite a few times. When I've been logged in into Phoenix and then completely purge and reinstall my Phoenix installation, I'm still logged in (as nobody?) into Phoenix.

still_logged_in

I always thought I just missed some files when I deleted the local installation, but I also experienced this behaviour with a virtual host which has been completely reinstalled (including partitions and operating system). Just the hostname remained the same after the host has been reinstalled again.

I haven't tagged this one as a bug, as it doesn't really seem to cause any problems and it's just very unlikely to be ever seen in a relevant, non-developement system. I just wanted to post this issue to have it in mind - maybe it becomes relevant sometime.

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.