uAdmin Settings

Back to Settings in System Reference

Here are all build-in uAdmin Settings, their format, and how to use them in the project.

Allowed Hosts

Back To Top

Allowed Hosts is a comma separated list of allowed hosts for the server to work. The default value if only for development and production domain should be added before deployment.

Allowed IPs

Back To Top

Allowed IPs is a list of allowed IPs to access uAdmin interface in one of the following formats:

  • “*” = Allow all
  • “” = Allow none
  • “192.168.1.1” = Only allow this IP
  • “192.168.1.0/24” = Allow all IPs from 192.168.1.1 to 192.168.1.254

You can also create a list of the above formats using comma to separate them.

For example: “192.168.1.1, 192.168.1.2, 192.168.0.0/24”

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign your IP address connected on your PC in the AllowedIPs function.

../_images/allowedipssetting.png

Now link the host to your IP and see what happens.

../_images/allowedipsresult1.png

API Disabled Add

Back To Top

API Disabled Add controls the data API’s disabled for add commands.

API Disabled Delete

Back To Top

API Disabled Delete controls the data API’s disabled for delete commands.

API Disabled Edit

Back To Top

API Disabled Edit controls the data API’s disabled for edit commands.

API Disabled Read

Back To Top

API Disabled Read controls the data API’s disabled for read commands.

API Disabled Schema

Back To Top

API Disabled Schema controls the data API’s disabled for schema commands.

API Log Add

Back To Top

API Log Add controls the data API’s logging for add commands.

Prerequisites:

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the APILogAdd then click Save button on the bottom right corner.

../_images/apilogaddsettingenabled.png

Now let’s call this URL in the address bar to add multiple records in the Document model with the following information below:

First Record

  • Name: Golang
  • Author: John

Second Record

  • Name: uAdmin
  • Author: Adam
# document is a model name
# name and author are field names
# __0 is the first index
# __1 is the second index
http://api.example.com/api/d/document/add/?_name__0=Golang&_author__0=John&_name__1=uAdmin&_author__1=Adam

Result:

{
    "id": [
        1,
        2
    ],
    "rows_count": 2,
    "status": "ok"
}

It returns an array with a list of IDs for the newly created records.

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

As expected, the user’s action in adding records through HTTP API was recorded in the Log model.

../_images/apilogaddenabled1.png

Now let’s try disabling the API Log Add in the Settings.

../_images/apilogaddsettingdisabled.png

Let’s call this URL to add a new record in the Document model with the following information below:

  • Name: Programming
  • Author: Admin
# document is a model name
# name and author are field names
http://api.example.com/api/d/document/add/?_name=Programming&_author=Admin

Result:

{
    "id": 3,
    "rows_count": 1,
    "status": "ok"
}

It returns the ID of the newly created record.

Check the “LOGS” to see the result.

../_images/apilogadddisabled1.png

As expected, the user’s action in adding a record through HTTP API was not recorded in the Log model.

API Log Delete

Back To Top

API Log Delete controls the data API’s logging for delete commands.

Prerequisites:

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the APILogDelete then click Save button on the bottom right corner.

../_images/apilogdeletesettingenabled.png

Suppose you have five records in the Item model.

../_images/itemfiverecords1.png

Call this URL in the address bar to delete records where the name of an item contains “iPad”.

# item is a model name
# name is a field name
# __contains is an operator that will search for string values that contract
http://api.example.com/api/d/item/delete/?name__contains=iPad

Result:

{
    "rows_count": 2,
    "status": "ok",
}

It returns the status and the rows affected by your query.

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

As expected, the user’s action in deleting records through HTTP API that contains “iPad” in the item name was recorded in the Log model.

../_images/apilogdeleteenabled1.png

Now let’s try disabling the API Log Delete in the Settings.

../_images/apilogdeletesettingdisabled.png

Let’s call this URL in the address bar to delete the fourth record in the database.

# item is a model name
# 4 is an ID number
http://api.example.com/api/d/item/delete/4/

Result:

{
    "rows_count": 1,
    "status": "ok"
}

It returns the status and the rows affected by your query.

Check the “LOGS” to see the result.

../_images/apilogdeletedisabled1.png

As expected, the user’s action in deleting the fourth record through HTTP API was not recorded in the Log model.

API Log Edit

Back To Top

API Log Edit controls the data API’s logging for edit commands.

Prerequisites:

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the APILogEdit then click Save button on the bottom right corner.

../_images/apilogeditsettingenabled.png

Suppose you have five records in the Item model where all iPad items have a rating of 4.

../_images/itemipadoldrating1.png

Call this URL to edit the rating of all iPad items to a value of 5.

# item is a model name
# name is a field name
# __contains is an operator that will search for string values that contract
# rating=4&_rating=5 means that where rating is equal to 4, change the
# rating value to 5
http://api.example.com/api/d/item/edit/?rating=4&_rating=5

Result:

{
    "rows_count": 2,
    "status": "ok"
}

It returns the status and the rows affected by your query.

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

As expected, the user’s action in editing records through HTTP API was recorded in the Log model.

../_images/apilogeditenabled1.png

Now let’s try disabling the API Log Edit in the Settings.

../_images/apilogeditsettingdisabled.png

Suppose the first record in the Item model is named as “Robot”.

../_images/itemfirstrecordrobot1.png

Call this URL to edit the name of the first record in the database from “Robot” to “Supercomputer”.

# item is a model name
# 1 is an ID number
# name is a field name
http://api.example.com/api/d/item/edit/1/?_name=Supercomputer

Result:

{
    "rows_count": 1,
    "status": "ok"
}

It returns the status and the rows affected by your query.

Check the “LOGS” to see the result.

../_images/apilogeditdisabled1.png

As expected, the user’s action in editing the first record through HTTP API was not recorded in the Log model.

API Log Read

Back To Top

API Log Read controls the data API’s logging for read commands.

Prerequisites:

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the APILogRead then click Save button on the bottom right corner.

../_images/apilogreadsettingenabled.png

Suppose you have five records in the Item model.

../_images/itemfiverecords1.png

Call this URL to read record(s) where rating is equal to 3.

# item is a model name
# rating is a field name
http://api.example.com/api/d/item/read/?rating=3

Result:

../_images/readmultipleresult1.png

It returns a list of records where rating is equal to 3.

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

As expected, the user’s action in reading records through HTTP API was recorded in the Log model.

../_images/apilogreadenabled1.png

Now let’s try disabling the API Log Read in the Settings.

../_images/apilogreadsettingdisabled.png

Call this URL to read the second record in the Item model.

# item is a model name
# 2 is an ID number
http://api.example.com/api/d/item/read/2/

Result:

../_images/readoneresult1.png

It returns a JSON object representing an item where ID=2.

Check the “LOGS” to see the result.

../_images/apilogreaddisabled1.png

As expected, the user’s action in reading the second record through HTTP API was not recorded in the Log model.

API Log Schema

Back To Top

API Log Schema controls the data API’s logging for schema commands.

Prerequisite:

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the APILogSchema then click Save button on the bottom right corner.

../_images/apilogschemasettingenabled.png

Suppose you have five records in the Item model.

../_images/itemfiverecords1.png

Call this URL to read the full schema of the Item model.

# item is a model name
http://api.example.com/api/d/item/schema/

Result:

../_images/schemaresult1.png

It returns a JSON object representing uAdmin’s ModelSchema of the Item model.

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

As expected, the user’s action in getting the schema of the Item model through HTTP API was recorded in the Log model.

../_images/apilogschemaenabled1.png

Now let’s try disabling the API Log Schema in the Settings.

../_images/apilogschemasettingdisabled.png

Recall this URL to read the full schema of the Item model.

# item is a model name
http://api.example.com/api/d/item/schema/

Check the “LOGS” to see the result.

../_images/apilogschemadisabled1.png

As expected, the user’s action in getting the schema of the Item model through HTTP API was not recorded in the Log model.

Blocked IPs

Back To Top

BlockedIPs is a list of blocked IPs from accessing uAdmin interface in one of the following formats:

  • “*” = Block all
  • “” = Block none
  • “192.168.1.1” = Only block this IP
  • “192.168.1.0/24” = Block all IPs from 192.168.1.1 to 192.168.1.254

You can also create a list of the above formats using comma to separate them.

For example: “192.168.1.1, 192.168.1.2, 192.168.0.0/24”

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign your IP address connected on your PC in the BlockedIPs function.

../_images/blockedipssetting.png

Now link the host to your IP and see what happens.

../_images/blockedipsresult1.png

Quiz:

Cache Permissions

Back To Top

Cache Permissions allows uAdmin to store permissions data in memory.

Cache Sessions

Back To Top

Cache Sessions allows uAdmin to store sessions data in memory.

Cache Translation

Back To Top

Cache Translation allows a translation to store data in a cache memory.

Enable

../_images/cachetranslationsettingenabled.png

Disable

../_images/cachetranslationsettingdisabled.png

DebugDB

Back To Top

Debug DB prints all SQL statements going to DB.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Debug DB then click Save button on the bottom right corner.

../_images/debugdbsettingenabled.png

Check your terminal to see the result.

(/home/dev1/go/src/github.com/uadmin/uadmin/db.go:246)
[2019-11-05 15:44:45]  [0.51ms]  SELECT * FROM "languages"  WHERE "languages"."deleted_at" IS NULL AND ((code='en')) ORDER BY "languages"."id" ASC LIMIT 1
[1 rows affected or returned ]

(/home/dev1/go/src/github.com/uadmin/uadmin/db.go:158)
[2019-11-05 15:44:45]  [0.20ms]  SELECT * FROM "setting_categories"  WHERE "setting_categories"."deleted_at" IS NULL
[1 rows affected or returned ]

(/home/dev1/go/src/github.com/uadmin/uadmin/db.go:436)
[2019-11-05 15:44:45]  [1.56ms]  SELECT * FROM "settings"  WHERE "settings"."deleted_at" IS NULL AND ((category_id = 1))
[38 rows affected or returned ]

(/home/dev1/go/src/github.com/uadmin/uadmin/db.go:436)
[2019-11-05 15:44:55]  [0.35ms]  SELECT * FROM "ab_tests"  WHERE "ab_tests"."deleted_at" IS NULL AND ((active = true))
[0 rows affected or returned ]

Quiz:

Email From

Back To Top

Email From identifies where the email is coming from.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the following email configurations.

../_images/emailconfigurationsetting.png

Let’s go back to the uAdmin dashboard, go to Users model, create your own user account and set the email address based on your assigned EmailFrom in the code above.

../_images/useremailhighlighted1.png

Log out your account. At the moment, you suddenly forgot your password. How can we retrieve our account? Click Forgot Password at the bottom of the login form.

../_images/forgotpasswordhighlighted1.png

Input your email address based on the user account you wish to retrieve it back.

../_images/forgotpasswordinputemail1.png

Once you are done, open your email account. You will receive a password reset notification from the Todo List support. To reset your password, click the link highlighted below.

../_images/passwordresetnotification1.png

You will be greeted by the reset password form. Input the following information in order to create a new password for you.

../_images/resetpasswordform1.png

Once you are done, you can now access your account using your new password.

Quiz:

Email Password

Back To Top

Email Password sets the password of an email.

See Email From for the example.

Email SMTP Server

Back To Top

Email SMTP Server sets the name of the SMTP Server in an email.

See Email From for the example.

Email SMTP Server Port

Back To Top

Email SMTP Server Port sets the port number of an SMTP Server in an email.

See Email From for the example.

Email Username

Back To Top

Email Username sets the username of an email.

See Email From for the example.

Fav Icon

Back To Top

Fav Icon is the fav icon that shows on uAdmin UI.

  • Default Value: “/static/uadmin/favicon.ico”
  • Data Type: File
  • Code: uAdmin.FavIcon

Suppose you have favicon.ico file in your custom folder.

../_images/favicon_highlighted1.png

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, click the Browse button in the FavIcon field.

../_images/favicon_browse.png

Go to the path where your favicon.ico file is located. Click Save button afterwards and see the results below.

../_images/favicon_result1.png

HTTP Log Format

Back To Top

HTTP Log Format is the format used to log HTTP access.

Format:

%a: Client IP address
%{remote}p: Client port
%A: Server hostname/IP
%{local}p: Server port
%U: Path
%c: All coockies
%{NAME}c: Cookie named 'NAME'
%{GET}f: GET request parameters
%{POST}f: POST request parameters
%B: Response length
%>s: Response code
%D: Time taken in microseconds
%T: Time taken in seconds
%I: Request length

Log Add

Back To Top

Log Add adds a log when a record is added.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Log Add then click Save button on the bottom right corner.

../_images/logaddsettingenabled.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

Suppose that you have this record in your logs as shown below:

../_images/loginitialrecord2.png

Go back to uAdmin dashboard then select “TODOS”.

../_images/todoshighlightedlog1.png

Click “Add New Todo”.

../_images/addnewtodo1.png

Input the name value in the text box (e.g. Read a book). Click Save button afterwards.

../_images/readabook1.png

Result

../_images/readabookoutput1.png

Now go back to the “LOGS” to see the result.

../_images/logaddtrueresult1.png

Now let’s try disabling the Log Add in the Settings.

../_images/logaddsettingdisabled.png

Go back to the uAdmin dashboard. Click on “TODOS” model and add another data inside it.

../_images/buildarobot1.png

Result

../_images/buildarobotoutput1.png

Now go back to the “LOGS” to see the result.

../_images/logaddfalseresult1.png

As you can see, the log content remains the same. Well done!

See Log Read for the continuation.

Log Delete

Back To Top

Log Delete adds a log when a record is deleted.

Before you proceed to this example, see Log Edit.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Log Delete then click Save button on the bottom right corner.

../_images/logdeletesettingenabled.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

Suppose that you have this record in your logs as shown below:

../_images/logeditfalseresult1.png

Go back to uAdmin dashboard then select “TODOS”.

../_images/todoshighlightedlog1.png

Select any of your existing data that you wish to delete (e.g. Washing the dishes)

../_images/washingthedishesdelete1.png

Now go back to the “LOGS” to see the result.

../_images/logdeletetrueresult1.png

Now let’s try disabling the Log Delete in the Settings.

../_images/logdeletesettingdisabled.png

Go back to the uAdmin dashboard. Click on “TODOS” model and delete the remaining data (e.g. Read a book).

../_images/readabookdelete1.png

Now go back to the “LOGS” to see the result.

../_images/logdeletefalseresult1.png

As you can see, the log content remains the same. Well done!

Quiz:

Log Edit

Back To Top

Log Edit adds a log when a record is edited.

Before you proceed to this example, see Log Read.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Log Edit then click Save button on the bottom right corner.

../_images/logeditsettingenabled.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

Suppose that you have this record in your logs as shown below:

../_images/logreadfalseresult1.png

Go back to uAdmin dashboard then select “TODOS”.

../_images/todoshighlightedlog1.png

Select any of your existing data (e.g. Build a robot)

../_images/todoexistingdata1.png

Change it to “Assembling the CPU” for instance.

../_images/assemblingthecpu1.png

Result

../_images/assemblingthecpuoutput1.png

Now go back to the “LOGS” to see the result.

../_images/logedittrueresult1.png

Now let’s try disabling the Log Edit in the Settings.

../_images/logeditsettingdisabled.png

Go back to the uAdmin dashboard. Click on “TODOS” model and modify any of your existing data (e.g. Assembling the CPU).

../_images/buildarobot1.png

Change it to “Washing the dishes” for instance.

../_images/washingthedishes1.png

Result

../_images/washingthedishesresult1.png

Now go back to the “LOGS” to see the result.

../_images/logeditfalseresult1.png

As you can see, the log content remains the same. Well done!

See Log Delete for the continuation.

Log HTTP Requests

Back To Top

Logs http requests to syslog

Log Read

Back To Top

Log Read adds a log when a record is read.

Before you proceed to this example, see Log Add.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Log Read then click Save button on the bottom right corner.

../_images/logreadsettingenabled.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, click on “LOGS”.

../_images/logshighlighted3.png

Suppose that you have this record in your logs as shown below:

../_images/logaddfalseresult1.png

Go back to uAdmin dashboard then select “TODOS”.

../_images/todoshighlightedlog1.png

Select any of your existing data.

../_images/todoexistingdata1.png

Result

../_images/readabook1.png

Now go back to the “LOGS” to see the result.

../_images/logreadtrueresult1.png

Now let’s try disabling the Log Read in the Settings.

../_images/logreadsettingdisabled.png

Go back to the uAdmin dashboard. Click on “TODOS” model and add select any of your existing data.

../_images/todoexistingdata1.png

Result

../_images/readabook1.png

Now go back to the “LOGS” to see the result.

../_images/logreadfalseresult1.png

As you can see, the log content remains the same. Well done!

See Log Edit for the continuation.

Log Trail

Back To Top

Log Trail stores Trail logs to syslog.

Max Image Width

Back To Top

Max Image Width sets the maximum width of an image.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the Max Image Width to 360 pixels and the Max Image Height to 240 pixels. Click Save on the bottom right corner afterwards.

../_images/maximagewidthheightsetting.png

uAdmin has a feature that allows you to customize your own profile. In order to do that, click the profile icon on the top right corner then select admin as highlighted below.

../_images/adminhighlighted1.png

By default, there is no profile photo inserted on the top left corner. If you want to add it in your profile, click the Choose File button to browse the image on your computer.

../_images/choosefilephotohighlighted1.png

Let’s pick a photo that surpasses the MaxImageWidth and MaxImageHeight values.

../_images/widthheightbackground1.png

Once you are done, click Save Changes on the left corner and refresh the webpage to see the output.

../_images/profilepicadded1.png

As expected, the profile pic will be uploaded to the user profile that automatically resizes to 360x240 pixels.

Quiz:

Max Image Height

Back To Top

Max Image Height sets the maximum height of an image.

See Max Image Width for the example.

Max Upload File Size

Back To Top

Max Upload File Size is the maximum upload file size in bytes.

1MB = 1024 * 1024

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the Max Upload File Size value to 1 MB. It is 1 multiplied by 1024 (Kilobytes) multiplied by 1024 (Bytes) = 1048576 Bytes.

../_images/maxuploadfilesizesetting.png

Now go to your profile and upload an image that exceeds the Max Upload File Size limit. If you click Save changes…

../_images/noprofilepic1.png

The profile picture has failed to upload in the user profile because the file size is larger than the limit.

Quiz:

Optimize SQL Query

Back To Top

Optimize SQL Query selects columns during rendering a form a list to visible fields.

Enable

../_images/optimizesqlquerysettingenabled.png

Disable

../_images/optimizesqlquerysettingdisabled.png

OTP Algorithm

Back To Top

OTP Algorithm is the hashing algorithm of OTP. Other options are sha256 and sha512.

You can apply any of these in Settings.

../_images/otpalgorithmsetting.png

OTP Digits

Back To Top

OTP Digits is the number of digits for the OTP.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the OTP Digits value to 8. Click Save button on the bottom right corner afterwards.

../_images/otpdigitssetting.png

Make sure that OTP Required on the account you are using is enabled in the User model.

../_images/otprequiredenabled.png

Logout your account, relogin your account, and check your terminal afterwards to see the OTP verification code assigned by your system.

[  INFO  ]   User: admin OTP: 90401068

As shown above, it has 8 OTP digits.

Quiz:

OTP Period

Back To Top

OTP Period is the number of seconds for the OTP to change.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the OTP Period to 10 seconds. Click Save button on the bottom right corner afterwards.

../_images/otpperiodsetting.png

Make sure that OTP Required on the account you are using is enabled in the User model.

../_images/otprequiredenabled.png

Logout your account, relogin your account, and check your terminal afterwards to see how the OTP code changes every 10 seconds by refreshing your browser.

// Before refreshing your browser
[  INFO  ]   User: admin OTP: 433452

// After refreshing your browser in more than 10 seconds
[  INFO  ]   User: admin OTP: 185157

Quiz:

OTP Skew

Back To Top

OTP Skew is the number of minutes to search around the OTP.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the OTP Skew value to 2 minutes. Click Save button on the bottom right corner afterwards.

../_images/otpskewsetting.png

Make sure that OTP Required on the account you are using is enabled in the User model.

../_images/otprequiredenabled.png

Logout your account, relogin your account, and check your terminal afterwards to see the OTP verification code assigned by your system. Wait for more than two minutes and check if the OTP code is still valid.

After waiting for more than two minutes,

../_images/loginformwithotp1.png

It redirects to the same webpage which means your OTP code is no longer valid.

Quiz:

Page Length

Back To Top

Page Length is the list view max number of records.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the Page Length value to 4.

../_images/pagelengthsettingenabled.png

Go to the Item model. Inside it you have 6 total elements. The elements in the item model will display 4 elements per page.

../_images/pagelength1.png

Quiz:

Password Attempts

Back To Top

Password Attempts is the maximum number of invalid password attempts before the IP address is blocked for some time from using the system.

Password Timeout

Back To Top

Password Attempts is the maximum number of invalid password attempts before the IP address is blocked for some time from using the system.

Port

Back To Top

Port is the port used for http or https server.

  • Default Value: 8080
  • Data Type: Integer
  • Code: uAdmin.Port

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, apply 8000 as a port number. Click Save button on the bottom right corner afterwards.

../_images/portsetting.png

Rebuild your application. Check your terminal to see the result.

[   OK   ]   Initializing DB: [13/13]
[   OK   ]   Synching System Settings: [51/51]
[   OK   ]   Server Started: http://0.0.0.0:8000
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

In the Server Started, it will redirect you to port number 8000.

Quiz:

Public Media

Back To Top

Public Media allows public access to media handler without authentication.

For instance, my account was not signed in.

../_images/loginform4.png

And you want to access travel.png inside your media folder.

../_images/mediapath1.png

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Public Media then click Save button on the bottom right corner.

../_images/publicmediasettingenabled.png

Logout your account. Access the image path in the URL to see the result.

../_images/publicmediaimage1.png

Quiz:

Rate Limit

Back To Top

Rate Limit is the maximum number of requests/second for any unique IP.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the rate limit to 1. Click Save button on the bottom right corner afterwards.

../_images/ratelimitsetting.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, hold the Ctrl Key on your keyboard then click any dashboard menu in the form really fast to add in a new tab and see what happens.

../_images/ratelimithighlighttab1.png

The title bar name looks different in the last two tabs. Click any of them to see the result.

../_images/ratelimitresult1.png

The website is crashed as expected. In fact that our rate limit is 1, it might take a long time to bring the website back to normal. To increase the recovery rate, adjust the rate limit to a higher value (e.g. 100) in the Settings.

../_images/ratelimit100setting.png

Do the same process as shown above. Afterwards, click any button in the form and you will see that the website is back to normal much faster.

../_images/websitebacktonormal1.png

Quiz:

Rate Limit Burst

Back To Top

Rate Limit Burst is the maximum number of requests for an idle user.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the rate limit burst to 3. Click Save button on the bottom right corner afterwards.

../_images/ratelimitburstsetting.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, hold the Ctrl Key on your keyboard then click any dashboard menu in the form really fast to add in a new tab and see what happens.

../_images/ratelimithighlighttab1.png

The title bar name looks different in the last two tabs. Click any of them to see the result.

../_images/ratelimitresult1.png

The website is crashed because our request exceeds the limit that we have assigned.

Quiz:

Report Time Stamp

Back To Top

Report Time Stamp set this to true to have a time stamp in your logs.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, enable the Report Time Stamp then click Save button on the bottom right corner.

../_images/reporttimestampsettingenabled.png

Rebuild your application. Check your terminal to see the result.

[   OK   ]   Initializing DB: [13/13]
[   OK   ]   Synching System Settings: [51/51]
2018/11/07 08:52:14 [   OK   ]   Server Started: http://0.0.0.0:8080
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

Quiz:

Reporting Level

Back To Top

ReportingLevel is the standard reporting level.

There are 9 different levels:

  • DEBUG = 0
  • WORKING = 1
  • INFO = 2
  • OK = 3
  • WARNING = 4
  • ERROR = 5
  • CRITICAL = 6
  • ALERT = 7
  • EMERGENCY = 8

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, set the Reporting Level to 1 to show that the debugging process is working. Click Save button on the bottom right corner afterwards.

../_images/reportinglevel1settingenabled.png

Rebuild your application. Check your terminal to see the result.

[   OK   ]   Initializing DB: [13/13]
[   OK   ]   Synching System Settings: [51/51]
[   OK   ]   Server Started: http://0.0.0.0:8080
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

What if I set the value to 5?

../_images/reportinglevel5settingenabled.png

Result

[   OK   ]   Initializing DB: [13/13]
[   OK   ]   Synching System Settings: [51/51]
         ___       __          _
  __  __/   | ____/ /___ ___  (_)___
 / / / / /| |/ __  / __  __ \/ / __ \
/ /_/ / ___ / /_/ / / / / / / / / / /
\__,_/_/  |_\__,_/_/ /_/ /_/_/_/ /_/

The database was initialized. The server has started. However the error message did not show up because the reporting level is assigned to 5 which is ERROR.

Quiz:

Restrict Session IP

Back To Top

Restrict Session IP is to block access of a user if their IP changes from their original IP during login.

Enable

../_images/restrictsessionipsettingenabled.png

Disable

../_images/restrictsessionipsettingdisabled.png

Retain Media Versions

Back To Top

Retain Media Versions is to allow the system to keep files uploaded even after they are changed. This allows the system to “Roll Back” to an older version of the file.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, disable the Retain Media Versions then click Save button on the bottom right corner.

../_images/retainmediaversionssettingdisabled.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

From here, go to the Category model then click Add New Category button on the top right corner of the screen. Let’s add a new record that includes the uploaded file from your computer (e.g. Windows Installation.pdf).

../_images/categoryinstallationrecord2.png

Result:

../_images/categoryinstallationrecordresult2.png

From your project folder, go to /media/files/(generated_folder_name)/. As expected, the “Windows Installation.pdf” file was saved on that path.

../_images/categoryinstallationsaved1.png

Go back to your application and click the existing record that you have (e.g. Installation).

../_images/categoryinstallationrecordresult2.png

Now update the file on that record (e.g. PDF file to ODT file).

../_images/categoryinstallationupdateodt1.png

Result:

../_images/categoryinstallationresultodt1.png

From your project folder, go to /media/files/(generated_folder_name)/. As expected, the “Windows Installation.pdf” file was updated from “Windows Installation.pdf” to “Windows Installation.odt” on the same folder.

../_images/categoryinstallationsavedodt1.png

Now let’s try enabling the Retain Media Versions in the Settings.

../_images/retainmediaversionssettingenabled.png

Go back to the uAdmin dashboard then go to the Category model. Update the file of the Installation record back to PDF.

../_images/categoryinstallationrecord2.png

Result:

../_images/categoryinstallationrecordresult2.png

From your project folder, go to /media/files/ path. Inside it, there are two generated folders that means the old version of the file is kept and the new version was saved in the different folder.

../_images/categoryinstallationtwofolders1.png

Quiz:

Root URL

Back To Top

Root URL is where the listener is mapped to.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the RootURL value as /admin/. Click Save button on the bottom right corner afterwards.

../_images/rooturlsetting.png

Rebuild your application and go to the home page with the RootURL in the address bar to see the result.

../_images/rooturladmin1.png

Quiz:

Site Name

Back To Top

Site Name is the name of the website that shows on title and dashboard.

Run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assign the SiteName value as Todo List. Click Save button on the bottom right corner afterwards.

../_images/sitenamesetting.png

Now go back to the uAdmin dashboard.

../_images/dashboardfromsettings.png

Result

../_images/todolisttitle1.png

Quiz:

System Metrics

Back To Top

System Metrics enables uAdmin system metrics to be recorded.

Theme

Back To Top

Theme is the name of the theme used in uAdmin.

  • Default Value: default
  • Data Type: String
  • Code: uAdmin.Theme

From your project folder, click on “templates”.

../_images/templatesfolderhighlighted2.png

Inside templates, click on “uadmin”.

../_images/uadminfolder1.png

Create a new folder named “custom”.

../_images/customfolderhighlighted1.png

Inside custom folder, create a new file named “home.html”.

../_images/homehtml1.png

Inside home.html file, apply the following codes below to display a header that shows “Welcome to Home Page”.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Home Page</title>
</head>
<body>
    <h1>Welcome to Home Page</h1>
</body>
</html>

Now run your application and login your account. From uAdmin dashboard, click the wrench icon located on the top right.

../_images/wrenchiconfromdashboard.png

In the Settings, assigns the theme name as “custom”. “custom” is the name of the folder inside the templates/uadmin path that uAdmin will run when the user starts the server. Click Save button on the bottom right corner afterwards.

../_images/themesetting.png

Rebuild your application to see the result.

../_images/welcometohomepage1.png

Quiz:

Trail Logging Level

Back To Top

Trail Logging Level is the minimum level to be logged into syslog.

User Metrics

Back To Top

User Metrics enables the user metrics to be recorded.