Skip to content

ErinaAdmin

Animenosekai edited this page Jan 2, 2021 · 5 revisions

ErinaAdmin

This page is dedicated to ErinaAdmin, the web interface to configure and manage ErinaServer

Login

Setting your password /erina/admin/login

Wether it is the first time you are opening Erina or you want to change your password, this is the page you are looking for. ErinaAdmin — Set your password

Here you are prompted to enter a temp code, displayed on your server console.
Enter your password and submit (enter should work). The password will be hashed using SHA-512 and stored.
If you the right temp code got entered, the page should automatically log you in and you will be redirected to ErinaAdmin

Login /erina/admin/login

If you logged out or want to refresh your token, you will need to go to this page. ErinaAdmin — Login

Enter your password and submit, the page should redirect you to ErinaAdmin.

Logout /erina/admin/*

Erina — Logout

If you want to revoke the access to ErinaAdmin with the current access token, logout using the Log out option on the sidebar.
The current token will be revoked and you will be redirected to the login page.

Overview

This is the page to get a quick overview on your server activities ErinaAdmin — Overview

You get some important stats and the logs.

  • The Tweets stats here represents the number of responses made by Erina on Twitter.

  • The Logs widget is updated in real-time using WebSockets (caution: WebSockets can get disconnected after some time if you are using Heroku to host your server).

The API from which the log message comes is in bold.

Errors are marked with a little Warning sign.

ErinaAdmin — Logs Error

The sender of the reply is in bold in the Latest Twitter Responses widget and you can click on the name to get redirected to the reply on Twitter.
The value between parenthesis at the end of the response text is the response polarity (as described below in the Stats section)

Stats

The stats page comes with lots of interesting stats on the server usage. ErinaAdmin — Stats

The time span between each value is determined automatically on the server but covers the whole stats/uses all of the stats, from the beginning to the day you are looking at the stats.

While most of the numbers are the sum of all of the stats, the Stored Images stat and Cache Files Count stat are both numbers coming from closest/actual value.

Response polarity

The response polarity value is a the average response polarity, sentiment given to a reply on Twitter. For example someone who replies to Erina saying "Thank you, that is super cool!" has a greater value than someone who says "Eww that's bad, how could you be mistaken on this anime" (the range is between -1 and 1).

Erina is using the clips/pattern library to compute the polarity of each response

API

The API page lets you manage the API authorisations/keys but also have a look at the quick docs (also available at /erina/api)

ErinaAdmin — API

Authorizations

Authorizations are keys used by users who want to access the API if the Public API setting is turned OFF.

That means, users will have to pass a key argument to the API query to be able to access it.

Also, it is used to track the usage of the key and to rate-limit certain user.

You can start creating an authorisation by clicking the Add an authorization button.

You will be prompted with this dialog box: ErinaAdmin — Add an API auth

Simply put a name to the authorisation and a rate-limit (0 if you don't want any) and submit it.

The new authorisation should be added to the list with a key automatically generated.

You can check an authorisation with the auth API endpoint (/erina/api/auth) with the key argument as described on the API page of this wiki.

If the Public API configuration is turned ON in the configs, this section will appear with a reduced opacity and a message on the title saying (non-effective: Public API)

Config

The config page is one of the most important page of ErinaAdmin. It lets you configure ErinaServer but also manage it with realtime system state and different actions button at the end of the page.

ErinaAdmin — Config

To start configuring ErinaServer, click on a category to open it and edit the values.

ErinaAdmin — Config Erina Category

  • For list elements, you can delete one by clicking on the X button, or add one by going at the end of the list an typing your new element and submitting it by typing enter.
  • Boolean values are represented as ON-OFF switches that you can click.

The values will all be checked before editing the config.json file.

Environment Variables can be added with the following syntax: {{Name of the variable}}

This is very useful for example with Heroku which only accepts port numbers set with the PORT environment variable (i.e You set the Port option under the "Server" category to {{PORT}})

Actions

ErinaAdmin — Config Page Actions

For most of the action buttons you will be prompted for confirmation before doing anything.

  • Update Manami: Updates the title database (coming from the anime offline database (Manami Project)) for cosine similarity comparison by ErinaSearch.

  • Check a tweet: lets you give a tweet URL to Erina to force it analyze the tweet and reply to it.

  • Update Erina will let you update Erina from the official master repo branch (Animenosekai/Project_Erina) if a new version is available. Delay may apply before a new version is available because of the caching put to raw files on GitHub. This is the best method to update Erina without near any downtime. This will not work very well on Heroku if no backups are done of the server as they tend to restart the server with the version downloaded at first.

  • Download Backup: Will make an archive of the files defined to be transported through updates (defined in Erina/update/keep_mapping.json)

  • Import Backup: Will upload a backup archive previously downloaded and install it on the server.

  • Restart ErinaServer and Shutdown ErinaServer are the best options to respectively restart and shutdown the ErinaServer process as they make sure to do things before doing any action (like saving the current login token while restarting to keep your session active even after a restart).

ErinaConsole

ErinaConsole lets you use a console on your server (kind of like when you SSH into it). It starts a sh or bash session when you open it.

ErinaConsole

You can type any command to it like you would with any console. (*Do note that every command are logged, as you could see on the Overview page)

Like any other console, use the up and down arrow keys to navigate through the command history.
You should also be able to move the window and resize it.

ErinaAdmin — ErinaConsole History

ErinaConsole, like the sidebar, is global to ErinaAdmin which means that you can navigate through the pages while keeping them on the screen

Simply click on Close ErinaConsole to close the connection to the console and make the console window disappear.

Previous: Installation
Next: Contribute