Giter Club home page Giter Club logo

acweb's People

Contributors

kugelschieber avatar macedot avatar vntw 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acweb's Issues

Errors when starting server instance

Noticed the following when starting the server:
WARNING: pitstop window needs a valid range
Trying to load DRS zones from: content/tracks/monza/data/drs_zones.ini
open content/tracks/monza/data/drs_zones.ini: no such file or directory

WARNING: Cannot open file system/data/surfaces.ini for checksum, the client check will be disabled for this file
WARNING: Cannot open file content/tracks/monza/data/surfaces.ini for checksum, the client check will be disabled for this file

Calculating checksum for folder content/cars/ferrari_458_gt2/data
Error calculating checksum: Folder not found

Reported by Bendalf: http://www.assettocorsa.net/forum/index.php?threads/ac-server-web-interface.44582/#post-898066

Missing ini entries

Can missing ini entries be added in next version?

Option to enter custom AUTH_PLUGIN_ADDRESS in [SERVER] section is missing.
Same goes with lack of BALLAST and RESTRICTOR entries for entrylist generation/importing.
This is quite crucial since without AUTH_PLUGIN_ADDRESS anybody can enter server and with being unable to set ballst a big portion of server_cfg and entrylist has to be placed in custom field of the acweb editor.

Log date not correct

The date of log files is not correct. Time is correctly displayed, but the day, month and year are 0.

Split log file

Automatically create new log files for each day. acweb creates one big log file at the moment.

Port

Hi

On version 1.3 I could add "Ports" to the "Configurations" page by changing the HTML.
Now it's much harder as you packed everything together in a javascript file.

Would it be possible for you to add the column "Ports" to "Configurations" page? I want it to show the actual UDP/TCP port used for that config.

Go Import Paths

While checking out the code I saw that you're importing your own modules like std library packages. This looks dangerous and might cause conflicts should the std lib ever introduce a package with the same name.

I'm relatively new to Go but read How to Write Go Code where this is discussed:

The packages from the standard library are given short import paths such as "fmt" and "net/http". For your own packages, you must choose a base path that is unlikely to collide with future additions to the standard library or other external libraries.

So github.com/DeKugelschieber/acweb looks like the best option

WDYT?

Import cfg

Add option to load AC cfg files to import existing configurations.

Refactor Vue UI

It's kind of messy and could be taken into smaller pieces. For example, the dialogues could be put into their own components.

typo config folder name

first is that I found my cars and tracks empty even though I configured the acServer directory correct.
then I found there's a "config" folder inside acweb root folder, and there are cars.json and tracks.json.
however after reading the log it said err reading car/track file, it's trying to read from "configs" folder and after I mv it to configs it seems working when adding configurations.

so here I am still wondering if it is standalone with the game folder, so every time I wish to add mod track/car I have to manually update the car/track files here?

Also I didn't get it work to import a server_cfg/entry_list , is it still in progress just with frontend ready?

Add support for fixed setup

Add fixed setup field for entry list.

Setup can/should match car name and be inside setup folder on ac path or at current path.

Error when starting server with postgres db: FATA[0000] Error connecting to database

The full error displayed on terminal is:

FATA[0000] Error connecting to database err="dial tcp 127.0.0.1:3306: getsockopt: connection refused"

It seems to me my ACWEB_DB_TYPE or ACWEB_DB_HOST values are not being fully used. I am running Debian 9 on a VPS. I set up postgres and confirmed the user and db exists. I am going the manual route by the way. These are my variables and I also confirmed with bash they work.

export ACWEB_HOST=localhost:8057
export ACWEB_LOGDIR=/home/user/acw/web_logs
export ACWEB_LOGLEVEL=info
export ACWEB_INSTANCE_LOGDIR=/home/user/acw/instance_logs
export ACWEB_CONFIG_DIR=/home/user/acw/config
export ACWEB_DB_TYPE=postgres
export ACWEB_DB_USER=acweb
export ACWEB_DB_PASSWORD=password
export ACWEB_DB_HOST=localhost
export ACWEB_DB=acweb
export ACWEB_DB_PORT=5432
export ACWEB_DB_SSLMODE=disable

I have also tried export ACWEB_DB_HOST="tcp(127.0.0.1:5432)" but get same error

I searched around the source code looking for a hint as to what is going wrong but ended up spending a couple of hours with no answer. Judging by the error it seems to be trying to connect to a mysql db even though I specified postgres. Any clue on what I might be doing wrong?

Docker port exposure

Just realized we need to expose a range of ports from Docker container when running multiple ac instances.

docker run -p 8000-10000:8000-10000

Should do. Will expose a given range, auto assign (AC server should care about it) and one must be aware to configure TCP/UDP/HTTP/Plugin ports inside exported range.

Strange Db issue

Hi, first of all thanks for your work :)
I trying to install this web ui but when i launch the command guide i reach an error in logs:
time="2018-08-21T01:31:15Z" level=info msg="Connecting to 'mysql' database 'acweb' at 'tcp(127.0.0.1:3306)'" time="2018-08-21T01:31:15Z" level=fatal msg="Error connecting to database" err="dial tcp 127.0.0.1:3306: getsockopt: connection refused"

the command i use is :

sudo docker run -d -p 80:8080 -p 9600:9600/tcp -p 9600:9600/udp -p 8081:8081 --name acweb \ -e ACWEB_DB_TYPE=mysql \ -e ACWEB_DB_USER=acweb \ -e ACWEB_DB_PASSWORD=password \ -e ACWEB_DB_HOST="tcp(127.0.0.1:3306)" \ -e ACWEB_DB=acweb \ -v /root/steam/assetto/uuu:/root/steam/assetto/ \ -v /log/dir/path:/logs \ kugel/acweb
i cleared user and pasword here.

user is allowed to access from anywere (%) can't understand why my sql deny the access..

ac installation path on linux server is /root/steam/assetto/

thanks for your help :) have a nice day

docker container not starting

Hi,

I'm just trying to use your docker container, but when I try and run the image is exits instantly.

I've installed mysql as a container and its up and running with port 3306 exposed. I've created an acweb database and run your db creation scripts.

I've tried the following commands:
sudo docker run -d -p 80:8080 --name acweb --link mysql:latest -e ACWEB_DB_USER=root -e ACWEB_DB_PASSWORD=******* -e ACWEB_DB_HOST="tcp(10.1.0.4:3306)" -e ACWEB_DB=acweb -v /ac/install/path:/ac -v /log/dir/path:/logs kugel/acweb

sudo docker run -d -p 80:8080 --name acweb -e ACWEB_DB_USER=root -e ACWEB_DB_PASSWORD=******* -e ACWEB_DB_HOST="tcp(127.0.0.1:3306)" -e ACWEB_DB=acweb -v /ac/install/path:/ac -v /log/dir/path:/logskugel/acweb

sudo docker run -d -p 80:8080 --name acweb -e ACWEB_DB_USER=root -e ACWEB_DB_PASSWORD=***** -e ACWEB_DB_HOST=127.0.0.1 -e ACWEB_DB_PORT=3306 -e ACWEB_DB=acweb -v /ac/install/path:/ac -v /log/dir/path:/logs kugel/acweb

ac@assetto-corsa-server:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
e140e0bff739        kugel/acweb         "/app/main"              5 seconds ago       Exited (1) 4 seconds ago                       acweb
63a025a75a74        mysql               "docker-entrypoint.s…"   About an hour ago   Up About an hour           3306/tcp            elastic_montalcini
ee1d85aff4da        mysql:latest        "docker-entrypoint.s…"   About an hour ago   Up About an hour           3306/tcp            mysql

Any ideas why it exits immediately?

Add unit tests

Add unit tests for the backend and especially for the configuration file generator.

Add possibility to execute shell script from web GUI

Could be a new tab which has a dynamic table where you can add shell script locations and run them via a button.
This is useful for example now if I restart a instance I have to login to host machine via SSH and restart stracker manually because it must be started after AC server.

And stage 2 would be so that you would have a drop down menu in configurations where you could define scripts that should be run after instance start and after instance start.

Can't "save" acweb config via web interface - "Error 1054: Unknown column 'auth_plugin_address' in 'field list'"

Hello. I am running acweb and a mysql instance in two docker containers. DB is set, connection between the two hosts is working, i can login to the web frontend, i set the settings AC server folder to /ac, i put in my linux assetto server into /ac directory on the acweb instance, i ckecked write permissions on the /ac directory.

But when I press the save button in the web frontend, nothing happens. In the logfile an error is raist telling me: time="2018-12-09T17:09:00Z" level=error msg="Error saving configuration" err="Error 1054: Unknown column 'auth_plugin_address' in 'field list'"

Any ideas?

Thanks.

Enhanced script management

Scripts should be managed by admins and not set using a simple string. Instead, a new table should be added to manage scripts, which can later be selected when starting a server instance.

can't connect to postgres db

environment variables set as:

export ACWEB_HOST=0.0.0.0:8080
export ACWEB_LOGDIR=/usr/games/acweb/log/
export ACWEB_LOGLEVEL=debug
export ACWEB_INSTANCE_LOGDIR=instance_logs
export ACWEB_CONFIG_DIR=/usr/games/acweb/config/
export ACWEB_TLS_PRIVATE_KEY=
export ACWEB_TLS_CERT=
export ACWEB_DB_TYPE=postgres
export ACWEB_DB_USER=acweb
export ACWEB_DB_PASSWORD=********
export ACWEB_DB_HOST=127.0.0.1:5432
export ACWEB_DB=acweb
export ACWEB_DB_PORT=5432
export ACWEB_DB_SSLMODE=disable
export ACWEB_DB_SSL_CERT=
export ACWEB_DB_SSL_KEY=
export ACWEB_DB_ROOT_CERT=

error in log as follows

cat 20171024_145442.log
time="2017-10-24T14:54:42+10:00" level=info msg="Connecting to database 'acweb' at '127.0.0.1:5432'"
time="2017-10-24T14:54:42+10:00" level=fatal msg="Error connecting to database" err="default addr for network '127.0.0.1:5432' unknown"

Schema loaded and can manually connect

psql -h localhost -U acweb acweb
psql (9.2.23)
Type "help" for help.
acweb=>

PostgresSQL integration

Add Postgres as database backend. To do this, a new environment variable must be added, all SQL statements must be translated to Postgres and acweb must decide which one to use.

Example:
export ACWEB_DB_TYPE=postgres
In model/user.go:

import (
	// [...]
	// import os to read the env variable
	"os"
	// [...]
)
// [...]
// add database type specific SQL statements as constants
const (
	user_mysql_delete = "DELETE FROM user WHERE id = :id"
	user_postgres_delete = "DELETE FROM \"user\" WHERE id = $1"
)
// [...]
func (m *User) Remove() error {
	if m.Id == 0 {
		return errors.New("ID must be set")
	}

	// select the query by database type
	// os.Getenv("ACWEB_DB_TYPE") should be outsourced to make sure it's in lowercase
	// and there should be a check on startup a known DB type is set
	var sql string

	if os.Getenv("ACWEB_DB_TYPE") == "mysql" {
		sql = user_mysql_delete
	} else {
		sql = user_postgres_delete
	}

	_, err := session.NamedExec(sql, m)
	return err
}

The main difference between MySQL and Postgres is that table names in Postgres must be surrounded by quotes and variables are passed by $1, $2, ... $n instead of a :name.

Migrate to npm

To make it more accessible to contributers, the frontend should be migrated to npm. This requires a refactoring of existing code and vue components.

Limit server log output length

Server logs can get quite long (easily > 30 MB), so that the site gets really slow when opening one. It would be nice if the log output is limited to a few MBs (only newest output).

Missing system and content folders for checksum calculation

Missing system and content folders for checksum calculation. Should exist at current server folder. Follow log excerpt:

WARNING: Cannot open file system/data/surfaces.ini for checksum, the client check will be disabled for this file
Initializing checksum for track config indy
WARNING: Cannot open file content/tracks/ks_brands_hatch/indy/data/surfaces.ini for checksum, the client check will be disabled for this file
Calculating checksum for folder content/cars/ks_abarth500_assetto_corse/data
Error calculating checksum: Folder not found

New Cars DLC

Add cars from new DLC. I'm not intending to buy it yet, so some help would be nice. Extracting the new DLC cars and tracks can be done using the tools/extractor.go "script". It's important to add the new cars and tracks, not to delete existing ones. So either the extracting user must have all DLCs or add the cars/tracks manully from the extracted tracks.json/cars.json to the repository.

Add CI

Add support for circleci.

Calculate sun angle

this.time = '08 =00';

configuration.js line 189. I added this issue to merge a pending pull request first.

Cant save configuration

Hey,

i cant save the configuration in the webpanel. Connection between the plugin and mysql is working. I imported the shema.sql -> mig_1.0.3_1.1.0.sql -> mig_1.1.0_1.2.0.sql -> mig_1.2.1_1.3.0.sql -> mig_1.4.0_1.4.1.sql. SSH says "Error reading all configurations" and "Error saving configuration".

These are the log errors:

level=error msg="Error reading all configurations" err="missing destination name auth_plugin_address in *[]model.Configuration"
level=error msg="Error saving configuration" err="Error 1364: Field 'auth_plugin_address' doesn't have a default value"

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.