This app enables users to see an overview of their resources and send requests to change their details.
- Ensure Ruby (3.2.2) and Bundler are installed on your device
- Ensure SQLite is installed on your device (
sqlite3 --version
) - Run
bundle install
- Update the application's database credentials using
EDITOR=vim rails credentials:edit
(replacingvim
with the editor of your choice) and setting:slack_token
- Set this to the token for the Slack bot you are using. This token will start withxoxb-
. The bot must have permission to send messages to the desired channel, and must be invited to the channel first. Alces Flight admins should use Estate DashBot's token for this field, which is available on request.
- Run
bin/rails db:migrate
- Run the application with
rails s
- By default it will be accessible at
http://localhost:3000/
. This can be changed by adding-b
and-p
when runningbin/rails s
. For examplerails s -b 0.0.0.0 -p 4567
Admins with access to the hosting server may make use of the following Rake tasks to modify the database. The terms rails
and rake
are interchangeable in the following commands. Some of the commands involve the direct modification of several data fields simultaneously - in this case, the commands will make use of your default text editor, which may be overriden through the EDITOR
environment variable, e.g. EDITOR=vim rails orgs:create
.
rails orgs:create
- Create a new organisation.rails orgs:list
- List all organisations.rails orgs:edit[<org_name>]
- Edit the details of a given organisation.rails orgs:delete[<org_name>]
- Delete a given organisation.
rails resources:create[<org_name>]
- Create a new resource for the given organisation.rails resources:list[<org_name>]
- List all existing resources for the given organisation.rails resources:edit[<org_name>, <resource_id>]
- Edit the details of a given resource.rails resources:delete[<org_name>, <resource_id>]
- Delete a given resource.
rails requests:list
- List past change requests from users
rails changes:list
- List past changes made to resources. These logs reflect changes made using the above Rake commands - any changes made internally by the app or through use ofrails console
will not be stored here.