From e259af5cb6746c5394bec444835dec607f86d9fa Mon Sep 17 00:00:00 2001 From: Tim Marx Date: Fri, 6 Dec 2019 17:22:11 +0100 Subject: [PATCH] update readme Signed-off-by: Tim Marx --- README.md | 66 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1f407ae..4ff871f 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,48 @@ Frontend for Proxmox Virtual Environment ## Web build infos -In most dev environments you'll want to add the ssl cert of your testing cluster -to your browsers trusted ones. If you don't do this, you'll need to visit the the -clusters current web interface first to acknowledge the not trusted cert warning. -For chrome this can be done via: -$ certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n "FILENAME" -i "PATHTOYOURCERTFILE" - -While this is not served directly from the proxmox host, you'll need to start -your browser with disabled web security option. This is only needed because of the -CORS rules enforced by your browser. Another option would be to allow this server -side. - -Cookie workaround, login manually or serve via proxy or directly. - -For chrome this can be done via: -$ google-chrome --disable-web-security --user-data-dir='/tmp/debugflutterweb' - - -Update dependencies: - -To upgrade the api client for example you'll need to execute: -$ flutter packages upgrade \ No newline at end of file +Launch App in Chrome: +$ flutter run -d chrome --web-port 42000 +You'll need some sort of reverse proxy to workaround CORS in order to serve the +flutter frontend from your local dev machine, which will enable some convenient +features, like hot reload, automatic builds on changes... + +nginx snippets: + +location / { + + if ( $query_string ~ "console" ) { + proxy_pass https://:8006; + } + proxy_pass http://127.0.0.1:42000; + proxy_read_timeout 24h; + proxy_http_version 1.1; + proxy_set_header Connection ""; + proxy_buffering off; + +} + +location /xterm { + proxy_set_header Host $host; + proxy_set_header Cookie $http_cookie; + proxy_pass https://:8006; +} + +location /api2 { + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + proxy_set_header Cookie $http_cookie; + proxy_pass https://:8006; +} + +To upgrade the proxmox_api_client dependency execute: +$ flutter packages upgrade + +To build the model classes use: +$ flutter packages pub run build_runner build + +If you want to login without typing your password for your +Test-Cluster, add this to the main function: + +var apiClient = await proxclient.authenticate("root@pam", "yourpassword"); \ No newline at end of file -- 2.39.5