Giter Club home page Giter Club logo

virtlyst's Introduction

Cutelyst - The Qt Web Framework Cutelyst logo

A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.

Qt's meta object system is what powers the core of Cutelyst, it allows for introspecting controller's methods signatures and generate matching actions that can be invoked later.

BENCHMARKS

Don't trust us on being fast, check out the most comprehensive web framework benchmarks by TechEmpower http://www.techempower.com/benchmarks/

FEATURES:

  • Cross-platform
  • Stable API/ABI - v3 tagged from v3.x.x, v2 tags, v1 on v1.x.x branch (unmaintained)
  • Pluggable Engines
    • Cutelyst::Server - A cross-platform and fast server engine
      • HTTP/1.1 - Pipelining and Keep-Alive
      • HTTP/2 - Upgrade to H2, ALPN negotiation on HTTPS and direct H2C
      • FastCGI - Pipelining and Keep-Alive
  • WebSockets
  • REST with ActionREST
  • Plugin based views
    • Cutelee (A Qt implementation of Django's template engine)
    • JSON
    • Email
  • Dispatcher
    • Chained
    • Path
  • Plugins
    • Session
    • Authentication (with PBKDF2)
    • Authorization with RoleACL
    • StatusMessage
    • Validator (to validate user input)
    • CSRF protection
    • Memcached
    • UserAgent
  • Asynchronous processing (just don't use local QEventLoops or it will eventually crash)
    • Async SQL with ASql
  • Upload parser
  • JSON body as QJsonDocument when uploaded data is in JSON format
  • C++20
  • Chunked reponses (via QIODevice write API)
  • Request profiling/stats
  • Unit tested
  • QtCreator integration

DOCUMENTATION

Get started with our Tutorial or check the API.

COMMUNITY

The Cutelyst project IRC channel is #cutelyst on freenode.

Or you can use the Mailing List

REQUIREMENTS

  • CMake - for the build system (>= 3.16)
  • Qt - the core library of this framework (>= 6.2)

LICENSE

The source code is available is under the 3-Clause BSD.

virtlyst's People

Contributors

dantti avatar dolohow avatar gdamjan avatar lu1as avatar misery avatar pre-commit-ci[bot] avatar renlinch avatar schnuffle avatar

Stargazers

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

Watchers

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

virtlyst's Issues

Wiki Change process

I started editing the Wiki pages when I realized that it might not be the best way to manage wiki changes directly. After a bit of research I found a interesting idea: Howto contribute to Docs

To test it I've cloned the wiki and added changes and a new pages. Will file a seperate Issue.

Regards Schnuffle

Console wont connect to VMs on external HOST

As in topic, WebConsole aquires IP address from VMS config and tries to connect to 127.0.0.1 or 0.0.0.0 on port 5900 (for the first VM). To be able to connect I was forced to manualy edit XML and set the address to some routable address.

A good starting pooint would be to take an IP from the Host's Connection details (when used as a qemu+ssh/tcp/tls)

Build a Debian package

Virtlyst is a nice tool that should be easily available to more people.
So I started fiddling around to find a option to have it easily installed on my Linux mint 19.1 aka Ubuntu 18.04 box.

I finally managed to be able to extract the build from the docker image and package it into a Debian package.

It's still a POC and with this ticket I wanted to ask if there's interest so that I invest some time in cleaning it up.

  • Pro:

    • Easy to install and use
  • Contra:

    • it packages cutelyst as well which maybe should be a extra package
    • Instead of using /usr/local as prefix an installation into /opt/virtlyst might be a better option

A working version can be found at: https://github.com/schnuffle/Virtlyst/tree/deb_package

Wiki enhancements, added Build instructions page

I've forked the Wiki pages and added my changes.
The changes can be seen at: Schnuffle Wiki Clone

Changes:

  • Added sub page links to wiki main page
  • Added Build instruction page
  • Typos

So in the end I'm interested in getting instructions on the best process to change the wiki

Regards

Schnuffle

Improperly escaped html in edit host server (ssh)

The link is escaped:

Need create ssh <a href='https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization'>authorization key</a>. If you have another SSH port on your server, you can add IP:PORT like '192.168.1.1:2222'.

Also I'm not sure about the wording

Upload ISO

The upload iso functionality already implemented in webvirtcloud is not working.

Screenshot broken

As per tinypic.com:

TinyPic Has Ceased Operations

Due to an inability to support a high-quality free digital service that derives 100% of its revenue from ever declining on-site revenues, TinyPic has shut down its operations. As previously announced on this website, September 16, 2019 was the last day for our users to access their accounts to download their images.

What Should You Do Now?

We recommend checking out our sister company, Photobucket, for image hosting. They are currently offering an unlimited image hosting and storage plan for $5 per month (regularly priced at $11.99 per month). We would like to personally thank you for choosing TinyPic as your hosting service. Many of you have been utilizing our services since we launched back in April 2004.

Documentation?

I'm interested in this, but there seems to be zero documentation regarding an actual implementation. Can you provide example documentation for how to actually get this running?

Username setting for qemu+ssh:// doesn't work

Version 1.1.0, but looking at the commits I can't see a fix

The username setting for ssh connections seems to be ignored. I set it but it uses the local username / username running Virtlyst

Missing install/build instructions

I've been using webvirtmgr and as a replacement kimchi and wanted to see how I might use Virtlyst in my setup.
But I'm a bit lost on howto setup your stuff as there's no docs about it or I'm just to dump to find them.

Container build with Dockerfile failes to open database when running on Heroku

log attached

2018-10-17T19:36:35.551711+00:00 heroku[web.1]: State changed from starting to crashed
2018-10-17T19:36:35.539885+00:00 heroku[web.1]: Process exited with status 139
2018-10-17T19:36:35.474746+00:00 app[web.1]: Installing EPoll event loop
2018-10-17T19:36:35.475415+00:00 app[web.1]: Loading INI configuration: config.ini section: wsgi
2018-10-17T19:36:35.475752+00:00 app[web.1]: Cutelyst-WSGI starting
2018-10-17T19:36:35.476073+00:00 app[web.1]: WSGI socket 0 bound to TCP address 0.0.0.0:3000 fd 8
2018-10-17T19:36:35.476103+00:00 app[web.1]: Loading application: src/libVirtlyst.so
2018-10-17T19:36:35.487374+00:00 app[web.1]: 5:5 cutelyst.core[warning] Can not load translations from not existing directory: "/usr/local/share/cutelyst2/translations"
2018-10-17T19:36:35.487422+00:00 app[web.1]: 5:5 wsgi[debug] Loaded application:  "Virtlyst"
2018-10-17T19:36:35.487424+00:00 app[web.1]: Changing directory2 to: .
2018-10-17T19:36:35.487534+00:00 app[web.1]: 5:5 cwsgi.staticmap[info] added mapping for "static" => "root/static"
2018-10-17T19:36:35.487743+00:00 app[web.1]: 5:5 virtlyst[debug] Production true
2018-10-17T19:36:35.487785+00:00 app[web.1]: 5:5 virtlyst[debug] Database "/data/virtlyst.sqlite"
2018-10-17T19:36:35.488613+00:00 app[web.1]: 5:5 virtlyst[warning] Failed to open database "out of memory"
2018-10-17T19:36:35.488634+00:00 app[web.1]: 5:5 default[debug] Failed to create database "/data/virtlyst.sqlite"
2018-10-17T19:36:35.488652+00:00 app[web.1]: 5:5 cutelyst.engine[critical] Failed to setup application
2018-10-17T19:36:35.488672+00:00 app[web.1]: Application failed to init(), cheaping core: 0
2018-10-17T19:36:35.490140+00:00 app[web.1]: Segmentation fault

QtConcurrent

Hi
I am trying to connect to remote libvirtd instances using QtConcurrent
I replaced in the updateConnections the line
server->conn = new Connection(url, name, server);
with
future[i++] = QtConcurrent::run(connect_func, server,url,name,id);
but i receive an error
QObject: Cannot create children for a parent that is in a different thread.

My question is:
How can I correct use the QtConcurrent in cutelyst?

Build error

CMake Error at src/CMakeLists.txt:9 (add_library):
  Target "Virtlyst" links to target "Cutelyst::View::Grantlee" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED

What is it?
Where to get it from?
It is not cutelyst nor cutelee thing.

qemu+ssh connection seems to connect twice

When I start Virtlyst I get the connecting/connected string twice:

2559:2559 default[debug] Connecting to "qemu+ssh://removed/system"
2559:2559 default[debug] Connected to "qemu+ssh://removed/system"
2559:2559 default[debug] Connecting to "qemu+ssh://removed/system"
2559:2559 default[debug] Connected to "qemu+ssh://removed/system"

Users menu do not works

Hi @dantti !

When i started the application and clicked the Users menu i have got 404. I have tried with example ini (TemplatePath commented) and from CLI. Did i missed something?

Thank you in advance!

guestfish / password reset support

Hi,

as far as I can see there is no way to reset the password of a guest from the virtlyst webview. Since I read in the other issues that you have no time to implement it yourself, can you give me a short hint where I can start implementing it by myself @dantti ?

Regards,
Simon

Skip authentication for use with reverse proxy

I would like to run virtlyst behind a reverse proxy, which can handle more sophisticated authentication and authorization (e.g. OpenIDC), and TLS of course.

To do this, I would like to be able to disable virtlyst's built-in authentication system completely, so that the login screen is bypassed.

Document proper reverse proxy setup

I've been reading the issues about using nginx as reverse proxy, so there're people where it seems to work.
The problem is that there isn't enough info to set it up properly.
My setup:

nginx:

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    #try_files $uri $uri/ =404;
    proxy_pass http://127.0.0.1:3000;
}

location /ws {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_connect_timeout 600;
    proxy_read_timeout 600;
    client_max_body_size 1024M; # Set higher depending on your needs
}

Virtlyst config:

[wsgi]
    master = true
    threads = auto
    http-socket = 127.0.0.1:3000
    application = /usr/local/lib/libVirtlyst.so
    chdir2 = /usr/local/var/virtlyst
    static-map = /static=/usr/local/var/virtlyst/root/static

[Cutelyst]
    production = true
    DatabasePath = /usr/local/var/virtlyst/virtlyst.sqlite
    TemplatePath = /usr/local/var/virtlyst/root/src

[Rules]
    cutelyst.* = true
    virtlyst.* = true

Everything works fine but the console. When I open a console, I can find following error in the browser debug console:

ERROR: WebSocket error: Can't connect to websocket on URL: wss://127.0.0.1:3000/ws/2/2d8a0b35-e63d-4c46-b8ad-420d3fabf271

Now I ask myself, how is the WSS URL build up?

From testing it seem it uses http-socket = 127.0.0.1:3000.

I'll write the docs howto set it up properly, but I need a working setup first :-).

Regards

Schnuffle

P.S.: The connection to libvirt is with a local socket

Dockerfile no longer works

This happens after performing the docker build steps as detailed in the wiki

[root@xxx virtlyst]# docker run -ti --init --name virtlyst -p 3000:3000 -v /run/libvirt:/run/libvirt:rw virtlyst
Installing EPoll event loop
Loading INI configuration: config.ini section: wsgi
Cutelyst-WSGI starting
WSGI socket 0 bound to TCP address 0.0.0.0:3000 fd 7
Loading application: src/libVirtlyst.so
6:6 wsgi[critical] Could not load application: "The shared library was not found."

Releases do not have a Branch or Tag

I'm back to test Virtlyst for using it on a CentOS7 box.

Now I see several Releases but there's no connection between any Tag or Branch and a Release. I would suggest that for each Release, there should be at least a Tag to be able to build from the cloned Repo.

regards

Schnuffle

csrf

I am trying to activate csrf in virtlyst following the instructions described here https://api.cutelyst.org/classCutelyst_1_1CSRFProtection.html
but I get this error

cutelyst.core[critical] "Error while rendering template: Invalid block tag on line 0: 'c_csrf_token', expected 'endblock', line 0, login.html, line 0, login.html"

cant start on arch

[root@anarchy]: ~># cutelyst-wsgi2 \

--application /usr/lib/uwsgi/libVirtlyst.so
--chdir2 /home/ralf/vrt
--static-map /static=root/static
--http-socket localhost:3000
--master
Installing EPoll event loop
Cutelyst-WSGI starting
WSGI socket 0 bound to TCP address 0.0.0.0:3000 fd 7
Loading application: /usr/lib/uwsgi/libVirtlyst.so
2106:2106 cutelyst.core[warning] Can not load translations from not existing directory: "/usr/share/cutelyst2/translations"
2106:2106 wsgi[debug] Loaded application: "cutelyst-wsgi"
Changing directory2 to: /home/ralf/vrt
Threads:0
2106:2106 cwsgi.staticmap[info] added mapping for "static" => "root/static"
2106:2106 default[debug] Production false
2106:2106 default[debug] Database "/root/virtlyst.sqlite"
2106:2106 default[debug] Creating database "/root/virtlyst.sqlite"
2106:2106 default[debug] PRAGMA journal_mode = WAL true ""
2106:2106 default[critical] Created user admin with password: "5f34c41683874bb3a75c47d9edb4f9e8"
2106:2106 cutelyst.core[warning] Can not load translations from not existing directory: "/usr/share/cutelyst2/translations"
2106:2106 cutelyst.core[info] cutelyst-wsgi powered by Cutelyst 2.1.0, Qt 5.10.1.
spawned WSGI worker 1 (pid: 2107, cores: 1)
2107:2107 default[debug] Database ready "virtlyst-0"
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
2107:2107 default[warning] Non POST method
^CSIGINT/SIGQUIT received, killing workers...
Cutelyst-WSGI terminated

User Management

We need a User management, minimum Admin / User and maybe a Viewer.

(Only opened for Tracking)

https redirects back to http

Hello.
I have configured cutelyst-wsgi2 to use https and certificates, but after logging in I get redirected back to http, and must add 'https://' manually in the URL for it to work.
Any tips on how to get redirects to use https as well?

[Request] Static linked binary to run on CentOS/RHEL

Virtlyst is exactly what I needed to manage a handful of KVM VMs on a CentOS 7 host I administer.

However, I could not figure out how to get Cutelyst and then Virtlyst installed on a CentOS 7 box. I give up now because of lack of time to spend on figuring out all the dependencies and getting it to work.

But, Just wanted to write a note that, it would be incredibly helpful for this project to be available in a "easy to install" way that is not Docker(I'm not in favour of running a daemon as root just to get some other tools from Internet).

Sorry if it sounds entitled. I honestly just wanted to state an end-user's view. Feel free to ignore this note and close the issue if you think it is not in the interest of your project.

Cheers on this project. It looks great and focused on doing one thing well. Maybe someday I will get to try it out.

Internal Servers with no external access

In the way to replace the Desktop Application virt-manager with this webinterface it would be nice to have an Option to have all libraries (Bootstrap and co.) also in a offline variant. Maybe with a parameter in Template rendering.

If i implement that would it be upstreamed ?

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.