Skip to content

Latest commit

 

History

History
2772 lines (2007 loc) · 68.6 KB

File metadata and controls

2772 lines (2007 loc) · 68.6 KB

System Reference

In this section, we will cover the features of each following systems in-depth listed below:

AB Test

Back To Top

AB Test is a system in uAdmin that is used to compare two or more values and checks which one has the best impressions, clicks and click through rate.

Here are the following fields and their definitions:

  • Name - The name of the A/B Test
  • Type - A list of test types from a dropdown menu
  • StaticPath - The path assigned in the static
  • ModelName - A list of registered models
  • Field - A list of fields from schema for a registered model
  • PrimaryKey - Used to uniquely identify each row in the table
  • Active - Checks whether the A/B Test is Active
  • Group - The name of the group

Prerequisites:

For Example #1: Static

For Example #2: Model

Examples:

Example #1: Static

First of all, login your admin account.

api/assets/loginformadmin.png


From uAdmin dashboard, click "AB Tests".

api/assets/abtestshighlighted.png


Click "Add New ABTest" button on the upper right corner.

assets/addnewabtest.png


Create a new record named "Photo Test" with the following information below.

assets/phototestnewrecord.png


Result. Now click the Photo Test record that you have created.

api/assets/phototestrecord.png


From here, click "ABTEST VALUE" inline.

api/assets/abtestvalueinlinephototest.png


Let's create two records for Donate and Contribute. Click "Add New AB Test Value" button on the upper right corner.

assets/addnewabtestvalue.png


First Record

assets/donatephototestnewrecord.png


Second Record

assets/contributephototestnewrecord.png


Result

api/assets/phototestvalues.png


Now go to /campaign/ path in the address bar (e.g. http://0.0.0.0:8080/campaign/).

api/assets/campaigndonate.png


Right click your mouse then select Inspect or just press Ctrl + Shift + I on your keyboard to open the inspect element tab.

api/assets/inspecthighlighted.png


From here, click Application tab.

api/assets/applicationinspectelement.png


In Storage, click on Cookies on the left side then select http://localhost:8080. You will see that there is an abt cookie in the table list. In A/B test, we will focus on the value. It is randomly generated. If the value is an even number, we are getting the original image that is the path of the A/B test value is equal to the A/B test static path. Otherwise, we are getting the different image. In addition to this, abt cookie will expire every midnight.

api/assets/abtcookieinfo.png


Now let's delete the abt cookie.

api/assets/abtcookiedeleted.png


Refresh the webpage and see what happens.

api/assets/abtcookieoddvalue.png


The image displays differently because the abt cookie value is an odd number. Repeat the same process until you get an even number.

api/assets/abtcookieevennumber.png


It displays an original image once again because the abt cookie value is an even number.

Now go back to A/B Test Value in the Photo Test record. You will see the impression count in each record. This is the number of your visits.

api/assets/phototestvalueresult.png


Based on the result, the contribute image has higher impressions than donate ones.

Example #2: Model

First of all, login your admin account.

api/assets/loginformadmin.png


From uAdmin dashboard, click on "CAMPAIGN INFOS".

api/assets/campaigninfohighlighted.png


Click "Add New Campaign Info".

api/assets/addnewcampaigninfo.png


Create a Donate record for Name and Button.

api/assets/campaigninfodonate.png


Result

api/assets/campaigninfodonateresult.png


Now go back to the uAdmin dashboard then click on "AB Tests".

api/assets/abtestshighlighted.png


Let's create two tests for Name and Button. Click "Add New ABTest" button on the upper right corner.

assets/addnewabtestmodel.png


First Record

assets/buttontestnewrecord.png


Second Record

assets/nametestnewrecord.png


Result

assets/namebuttontestcreatedsystem.png


Let's create two A/B Test Values for Name and Button tests. The values to be compared are Donate and Contribute. In order to do that, first, click the Name Test record.

assets/nametesthighlightedsystem.png


Click "ABTEST VALUE" inline.

api/assets/abtestvalueinlinenametest.png


Click "Add New AB Test Value" button in the upper right corner.

assets/addnewabtestvaluename.png


First Record

assets/abtestvaluenamedonate.png


Second Record

assets/abtestvaluenamecontribute.png


Result

api/assets/nametestvalues.png


Similarly, they also go with the Button Test record.

api/assets/buttontestvalues.png


Now go to /campaign/ path in the address bar (e.g. http://0.0.0.0:8080/campaign/).

api/assets/campaigndonatemodel.png


Let's click the Donate button and see what happens.

api/assets/alertboxmessageuserclick.png


The alert box message appears on your screen. If you go to A/B Test Value inline in the Button Test record, you will see that the number of clicks in Donate record is 1 and the Click Through Rate is 100% because the number of impressions and clicks are equal.

api/assets/donate1click.png


Right click your mouse then select Inspect or just press Ctrl + Shift + I on your keyboard to open the inspect element tab.

api/assets/inspecthighlighted.png


From here, click Application tab.

api/assets/applicationinspectelement2.png


In Storage, click on Cookies on the left side then select http://localhost:8080. You will see that there is an abt cookie in the table list. In A/B test, we will focus on the value. It is randomly generated. If the value is an even number, we are getting the original value from Campaign Info model in the Name and Button. Otherwise, we are getting the different results. In addition to this, abt cookie will expire every midnight.

api/assets/abtcookieinfo.png


Now let's delete the abt cookie.

api/assets/abtcookiedeleted.png


Refresh the webpage and see what happens.

api/assets/abtcookieoddvaluemodel.png


We get a different result because the abt cookie value is an odd number. Repeat the same process until you get an even number.

api/assets/abtcookieevennumbermodel.png


They display original values once again because the abt cookie value is an even number.

Now go back to A/B Test Value in the Name and Button Test records. You will see the impression count, click count, and Click Through Rate in each record.

Name Test Result

api/assets/nametestvalueresult.png


Button Test Result

api/assets/buttontestvalueresult.png


Based on the results, the contribute record has higher impressions than donate ones while the donate ones has higher clicks and click through rate than contribute ones for both Name Test and Button Test records.

Approval

Back To Top

Approval is a system in uAdmin that is used to set an approval permission in the field.

Here are the following fields and their definitions:

  • ModelName - The name of the Model in small letters
  • ModelPK - Used to uniquely identify each row in the table
  • ColumnName - The name of the column in the model
  • OldValue - A value that was assigned before
  • NewValue - A value that you want to replace from the old value
  • NewValueDescription - A value that was stored from the new value after saving
  • ChangedBy - Returns the username who changed the value of the field record
  • ChangedDate - The date when the value of the field record was changed
  • ApprovalAction - A selection of approval actions. There are two selections: Approved and Declined.
  • ApprovalBy - Returns the username who approved the value of the field record
  • ApprovalDate - The date when the value of the field record was approved
  • ViewRecord - A link to view the information of the actual record
  • UpdatedBy - Returns the username who updated the record

Suppose there is a record created by "johndoe" that needs an approval for the Name.

api/assets/johndoenameempty.png


Login your admin account.

api/assets/loginformadmin.png


From uAdmin dashboard, go to the Friends model, click the record that you have created, and in the input box of the Name field, there is a yellow warning sign on the left side that means it needs an approval to someone who has approval access. Now click the highlighted area below.

api/assets/johndoeapprovalbutton.png


The admin will review the record that was created by a "johndoe" user. If you think his record is satisfactory, choose Approved in Approval Action then click Save and Continue on the bottom right corner of the screen.

api/assets/johndoeapprovalreview.png


It is shown that the one who approved the record is an admin with an approved date. Now click View Record button to see the result.

api/assets/johndoeviewrecord.png


The input Name field has a checkmark sign that means the record created by "johndoe" was approved.

api/assets/johndoeapprovedrecord.png

Dashboard Menu

Back To Top

Dashboard Menu is a system in uAdmin that is used to add, modify, and delete the elements of a model. Making it look good and customizing it to meet your customers requirements is important to the success of your app.

assets/dashboardmenu.png

Here are the following fields in this system:

  • Dashboard Menu - The name of the model
  • URL - The path where the model can be accessed
  • Tool Tip - A message that appears when a cursor is positioned over an icon, image, hyperlink, or other element in a graphical user interface
  • Icon - A picture, image, or other representation to display in the dashboard
  • Cat - Used to set a highlight label for a model
  • Hidden - A feature to make the model invisible in the dashboard

Let's create a new dashboard menu called "Expressions" with a URL of "expression".

assets/expressionaddsystem.png


Once you are done, go back to your dashboard to see if the Expression model was created.

assets/expressionaddsystemoutput.png


Nice! Now let's go back to the dashboard menu. Upload the image file in the Icon field. If you don't have any pictures or icons in your computer, I would recommend you to go over flaticon.com, but you can browse anywhere online. Once you search for an icon, download the PNG version and choose the size 128 pixels.

assets/expressionicon.png


Once you are done, go back to your dashboard to see if your image file was uploaded.

assets/expressioniconoutput.png


That's cool man! Now let's make it more realistic. Go back to the dashboard menu again. This time let's input the value of the Tool Tip to "Hello everyone! Welcome to uAdmin, the Golang Web Framework.".

assets/expressiontooltip.png


Once you are done, go back to your dashboard to see if the Tool Tip is functional.

assets/expressiontooltipoutput.png


Great! Now let's go back to the dashboard menu again and set the value of the Cat to "Meow!".

assets/expressioncat.png


Once you are done, go back to your dashboard to see if the Cat is functional.

assets/expressioncatoutput.png


Well done! Okay let's go back to the dashboard menu. This time toggle the Hidden field of the Expression model to true.

assets/expressionhidden.png


Once you are done, go back to your dashboard to see if the Expression model is hidden.

tutorial/assets/uadmindashboard.png


And it's gone. Now go to the dashboard menu. Finally, delete the Expression model in the list.

assets/expressiondelete.png

Well done! Now you know how to configure your dashboard menu by adding, updating, customizing and deleting a model.

Export to Excel

Back To Top

Export is one of the features of uAdmin that can replicate the data inside the model to the Excel file.

First of all, open any models in the dashboard (e.g. TODOS).

tutorial/assets/todoshighlightedlog.png


In this example, create at least 10 records in the Todo model. Once you are done, click Export button located at the bottom right corner of the screen.

assets/exporttoexcel.png


You will get the encrypted filename in the Excel file for security purposes.

assets/encryptedfilenameexcel.png


Open that file. The data that you have created in the uAdmin model will be replicated to the Excel file.

assets/todosexceldata.png

Well done! Now you know how to export a model to Excel file in uAdmin.

Group Permission

Back To Top

Group Permission sets the permission of a user group handled by an administrator.

assets/grouppermissioncreated.png

Here are the following fields in this system:

  • Group Permission - Returns the ID number of itself
  • Dashboard Menu - Fetches the name of the model
  • User Group - Fetches the name of the group
  • Read - Sets the Read access to the user
  • Add - Sets the Add access to the user
  • Edit - Sets the Edit access to the user
  • Delete - Sets the Delete access to the user
  • Approval - Sets the Approval access to the user

First of all, make it sure that your existing account is not an Admin (example below is Even Demata) and it is part of the User Group (example below is Front Desk).

assets/adminusergrouphighlighted.png

Click the Front Desk highlighted below.

assets/frontdeskhighlighted.png


Go to the Group Permission tab. Afterwards, click Add New Group Permission button at the right side.

assets/addnewgrouppermission.png


Set the Dashboard Menu to "Todos" model, User linked to "Even Demata", and activate the "Read" only. It means Front Desk User Group has restricted access to adding, editing, deleting and approving a record in the Todos model.

assets/grouppermissionadd.png


Result

assets/grouppermissionaddoutput.png


Log out your System Admin account. This time login your username and password using the user account that has group permission. Now click on TODOS model.

assets/userpermissiondashboard.png


As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

assets/useraddeditdeleterestricted.png


To remove these restrictions, login your System Admin account, go to Group Permission and activate "Add", "Edit", and "Delete" access to Front Desk group.

assets/groupaddeditdelete.png


Login your Even Demata account and see what happens.

assets/useraccessadddelete.png


Let's open the "Read a book" record to see if the user can have access to edit.

assets/useraccessedit.png


Nice! You have full access to everything in the TODOS model. What if the user group has no access to "Read" but can add, edit, or delete a record? Login your System account and remove "Read" access to Front Desk.

assets/groupnoaccessread.png


Login your Even Demata account and see what happens.

assets/dashboardmenuempty.png

TODOS model does not show up in the dashboard. Even if you remove access to "Add", "Edit" and "Delete" to Front Desk group, it will display the same output.

Login your System Admin account. Finally, delete the Group Permission in the Front Desk User Group.

assets/grouppermissiondelete.png

Well done! Now you know how to set the group permission to the user group, changing the access in the model and deleting the group permission.

Language

Back To Top

Language is a system in uAdmin that is used to add, modify, and delete the elements of a language. There are a total of 184 languages.

LIST OF AVAILABLE LANGUAGES
English Name   Name   Tag
Abkhaz   аҧсуа бызшәа, аҧсшәа   ab
Afar   Afaraf   aa
Afrikaans   Afrikaans   af
Akan   Akan   ak
Albanian   Shqip   sq
Arabic   العربية   ar
Aragonese   aragonés   an
Armenian   Հայերեն   hy
Assamese   অসমীয়া   as
Avaric   авар мацӀ, магӀарул мацӀ   av
Avestan   avesta   ae
Aymara   aymar aru   ay
Azerbaijani   azərbaycan dili   az
Bambara   bamanankan   bm
Bashkir   башҡорт теле   ba
Basque   euskara, euskera   eu
Belarusian   беларуская мова   be
Bengali, Bangla   বাংলা   bn
Bihari   भोजपुरी   bh
Bislama   Bislama   bi
Bosnian   bosanski jezik   bs
Breton   brezhoneg   br
Bulgarian   български език   bg
Burmese   ဗမာစာ   my
Catalan   català   ca
Chamorro   Chamoru   ch
Chechen   нохчийн мотт   ce
Chichewa, Chewa, Nyanja   chiCheŵa, chinyanja   ny
Chinese   中文 (Zhōngwén), 汉语, 漢語   zh
Chuvash   чӑваш чӗлхи   cv
Cornish   Kernewek   kw
Corsican   corsu, lingua corsa   co
Cree   ᓀᐦᐃᔭᐍᐏᐣ   cr
Croatian   hrvatski jezik   hr
Czech   čeština, český jazyk   cs
Danish   dansk   da
Divehi, Dhivehi, Maldivian   ދިވެހި   dv
Dutch   Nederlands, Vlaams   nl
Dzongkha   རྫོང་ཁ   dz
English   English   en
Esperanto   Esperanto   eo
Estonian   eesti, eesti keel   et
Ewe   Eʋegbe   ee
Faroese   føroyskt   fo
Fijian   vosa Vakaviti   fj
Filipino   Filipino   fl
Finnish   suomi, suomen kieli   fi
French   français, langue française   fr
Fula, Fulah, Pulaar, Pular   Fulfulde, Pulaar, Pular   ff
Galician   galego   gl
Ganda   Luganda   lg
Georgian   ქართული   ka
German   Deutsch   de
Greek (modern)   ελληνικά   el
Guaraní   Avañe'ẽ   gn
Gujarati   ગુજરાતી   gu
Haitian, Haitian Creole   Kreyòl ayisyen   ht
Hausa   (Hausa) هَوُسَ   ha
Hebrew (modern)   עברית   he
Herero   Otjiherero   hz
Hindi   हिन्दी, हिंदी   hi
Hiri Motu   Hiri Motu   ho
Hungarian   magyar   hu
Icelandic   Íslenska   is
Ido   Ido   io
Igbo   Asụsụ Igbo   ig
Indonesian   Bahasa Indonesia   id
Interlingua   Interlingua   ia
Interlingue   Originally called Occidental; then Interlingue after WWII   ie
Inuktitut   ᐃᓄᒃᑎᑐᑦ   iu
Inupiaq   Iñupiaq, Iñupiatun   ik
Irish   Gaeilge   ga
Italian   Italiano   it
Japanese   日本語 (にほんご)   ja
Javanese   ꦧꦱꦗꦮ, Basa Jawa   jv
Kalaallisut, Greenlandic   kalaallisut, kalaallit oqaasii   kl
Kannada   ಕನ್ನಡ   kn
Kanuri   Kanuri   kr
Kashmiri   कश्मीरी, كشميري‎   ks
Kazakh   қазақ тілі   kk
Khmer   ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ   km
Kikuyu, Gikuyu   Gĩkũyũ   ki
Kinyarwanda   Ikinyarwanda   rw
Kirundi   Ikirundi   rn
Komi   коми кыв   kv
Kongo   Kikongo   kg
Korean   한국어   ko
Kurdish   Kurdî, كوردی‎   ku
Kwanyama, Kuanyama   Kuanyama   kj
Kyrgyz   Кыргызча, Кыргыз тили   ky
Lao   ພາສາລາວ   lo
Latin   latine, lingua latina   la
Latvian   latviešu valoda   lv
Limburgish, Limburgan, Limburger   Limburgs   li
Lingala   Lingála   ln
Lithuanian   lietuvių kalba   lt
Luba-Katanga   Tshiluba   lu
Luxembourgish, Letzeburgesch   Lëtzebuergesch   lb
Macedonian   македонски јазик   mk
Malagasy   fiteny malagasy   mg
Malay   bahasa Melayu, بهاس ملايو‎"   ms
Malayalam   മലയാളം   ml
Maltese   Malti   mt
Manx   Gaelg, Gailck   gv
Māori   te reo Māori   mi
Marathi (Marāṭhī)   मराठी   mr
Marshallese   Kajin M̧ajeļ   mh
Mongolian   Монгол хэл   mn
Nauruan   Dorerin Naoero   na
Navajo, Navaho   Diné bizaad   nv
Ndonga   Owambo   ng
Nepali   नेपाली   ne
Northern Ndebele   isiNdebele   nd
Northern Sami   Davvisámegiella   se
Norwegian   Norsk   no
Norwegian Bokmål   Norsk bokmål   nb
Norwegian Nynorsk   Norsk nynorsk   nn
Nuosu   ꆈꌠ꒿ Nuosuhxop   ii
Occitan   occitan, lenga d'òc   oc
Ojibwe, Ojibwa   ᐊᓂᔑᓈᐯᒧᐎᓐ   oj
Old Church Slavonic, Church Slavonic, Old Bulgarian   ѩзыкъ словѣньскъ   cu
Oriya   ଓଡ଼ିଆ   or
Oromo   Afaan Oromoo   om
Ossetian, Ossetic   ирон æвзаг   os
(Eastern) Punjabi   ਪੰਜਾਬੀ   pa
Pāli   पाऴि   pi
Pashto, Pushto   پښتو   ps
Persian (Farsi)   فارسی   fa
Polish   język polski, polszczyzna   pl
Portuguese   Português   pt
Quechua   Runa Simi, Kichwa   qu
Romanian   Română   ro
Romansh   rumantsch grischun   rm
Russian   Русский   ru
Samoan   gagana fa'a Samoa   sm
Sango   yângâ tî sängö   sg
Sanskrit (Saṁskṛta)   संस्कृतम्   sa
Sardinian   sardu   sc
Scottish Gaelic, Gaelic   Gàidhlig   gd
Serbian   српски језик   sr
Shona   chiShona   sn
Sindhi   सिन्धी, سنڌي، سندھی‎   sd
Sinhalese, Sinhala   සිංහල   si
Slovak   slovenčina, slovenský jazyk   sk
Slovene   slovenski jezik, slovenščina   sl
Somali   Soomaaliga, af Soomaali   so
Southern Ndebele   isiNdebele   nr
Southern Sotho   Sesotho   st
Spanish   Español   es
Sundanese   Basa Sunda   su
Swahili   Kiswahili   sw
Swati   SiSwati   ss
Swedish   svenska   sv
Tagalog   Wikang Tagalog   tl
Tahitian   Reo Tahiti   ty
Tajik   тоҷикӣ, toçikī, تاجیکی‎   tg
Tamil   தமிழ்   ta
Tatar   татар теле, tatar tele   tt
Telugu   తెలుగు   te
Thai   ไทย   th
Tibetan Standard, Tibetan, Central   བོད་ཡིག   bo
Tigrinya   ትግርኛ   ti
Tonga (Tonga Islands)   faka Tonga   to
Tsonga   Xitsonga   ts
Tswana   Setswana   tn
Turkish   Türkçe   tr
Turkmen   Türkmen, Түркмен   tk
Twi   Twi   tw
Uyghur   ئۇيغۇرچە‎, Uyghurche   ug
Ukrainian   Українська   uk
Urdu   اردو   ur
Uzbek   Oʻzbek, Ўзбек, أۇزبېك‎   uz
Venda   Tshivenḓa   ve
Vietnamese   Tiếng Việt   vi
Volapük   Volapük   vo
Walloon   walon   wa
Welsh   Cymraeg   cy
Western Frisian   Frysk   fy
Wolof   Wollof   wo
Xhosa   isiXhosa   xh
Yiddish   ייִדיש   yi
Yoruba   Yorùbá   yo
Zhuang, Chuang   Saɯ cueŋƅ, Saw cuengh   za
Zulu   isiZulu   zu

assets/language.png


Here are the following fields in this system:

  • Language - Tag for a specific language
  • English Name - International name
  • Name - Local name
  • Active - If you want to activate the language in your application
  • Available in GUI - If you want to make the language available in the GUI

First of all, go to the Dashboard Menus.

tutorial/assets/dashboardmenuhighlighted.png


Select Todos model in the list.

assets/todoshighlighted.png


As you notice, English (en) is the only language available in the field.

assets/menunamelanguage.png


If you want to add more languages to show in the Dashboard Menu, go to the Languages in the uAdmin dashboard.

tutorial/assets/languageshighlighted.png


Let's say I want to add Chinese and Tagalog in the menu name of the Todo model. In order to do that, set the Active as enabled.

tutorial/assets/activehighlighted.png


Now go back to the Dashboard Menus, select Todos model in the list and you will notice that Chinese (zh) and Tagalog (tl) are added in the Menu Name field. Put your translated text into the related language manually.

assets/chinesetagalogdashboardmenu.png


Once you are done, log out your account then login. Set your language to 中文 (Zhōngwén), 汉语, 漢語 (Chinese).

assets/loginformchinese.png


When you notice, the Todos model is now translated to Chinese. That's cool!

assets/todoschinese.png


Now log out your account then login again. This time set your language to Wikang Tagalog (Tagalog) and let's see what happens.

assets/loginformtagalog.png


Result

assets/todostagalog.png


Nice! The Todos model is successfully translated to Tagalog.

Now let's try something more. Go to the Languages, search for Vietnamese, and set it as Default and Active.

assets/vietnamesedefaultactive.png


Inside the Language model, search for English then click that record.

api/assets/searchenglish.png


Disable the active status then click Save.

api/assets/englishnotactive.png


On the top right corner, click the blue button then select Logout.

api/assets/logouthighlighted.png


Log out your account and see what happens.

api/assets/vietnameseassigned.png

It automatically sets the value of the Language field to Tiếng Việt (Vietnamese).

Login your account again, go to the Languages, search for Arabic, and activate RTL (Right-to-left) and Active.

assets/arabicrtl.png


Log out your account then login again. Set your language to (Arabic) العربية and let's see what happens.

api/assets/loginformarabic.png


The login page has aligned from right to left.

If you go to any models in the dashboard (example below is Dashboard Menus), it aligns the form automatically from right to left.

api/assets/dashboardmenurighttoleft.png

Well done! Now you know how to activate your languages, set it to default, and using RTL (Right-to-left).

Log

Back To Top

Log is a system in uAdmin that is used to add, modify, and delete the status of the user activities. It keeps track of many things by default.

assets/log.png


Here are the following fields in this system:

  • Log - Returns the ID number of itself
  • Username - An identification used by a person
  • Action - See uadmin.Action for more details.
  • Table Name - The name of the model
  • Table - ID number of the table
  • Activity - This shows you what are the fields that you put in your record. It also adds one field for the IP "_IP" the user was using for security.
  • Roll Back - Undo the changes for edit and delete logs
  • Created At - Displays the date where the log was created

Let’s open our app to see how these things work. Login your account using "admin” as username and password.

api/assets/loginformadmin.png


Go to "LOGS” model in your dashboard.

assets/logshighlighted.png


You will notice that you have logs for the action "Login Successful" that you have taken in your app which is what we have done a while ago. Log is served as the history of all your activities in your app.

assets/loginsuccessful.png


If you open any of these logs, you will see all the details of that log:

assets/logdetails.png


The activity is the main part of your log. This shows you what are the fields that you put in your record. It also adds one field for the IP "IP" the user was using for security.

Let's go back to the previous page, refresh your browser and see what happens.

assets/goback.png


Result

assets/read.png


You will notice that there is another type of action called "Read" using the admin account because we opened a record in the log table.

Go back to the uAdmin Dashboard and open "TODOS" model.

tutorial/assets/todoshighlightedlog.png


Click Add New TODO.

tutorial/assets/todomodel.png


Fill up the fields like in the example below:

tutorial/assets/todomodelcreate.png


Save it and new data will be added to your model.

tutorial/assets/todomodeloutput.png


Open your created record in Todo model. Notice that you have a "History” button when you open any record:

assets/history.png


This "History” button will give you logs related to this record:

assets/readadded.png


As you notice, the logs keep track of what we have added in the Todo model as well as we have opened a while ago.

Open "TODOS" model and let's change the record from "Read a book" to "Read a magazine".

assets/readamagazine.png


Now if I go to "LOGS", you will notice that the action says we "Modified" a record in the todo table. There's also a Rollback button which means we can undo any changes.

assets/modifiedrollback.png


Click on "Roll Back" and see what happens.

assets/reverthandler.png


You will not see anything in the screen except the white background. To fix this, type 0.0.0.0:8000 in the address bar. Once you are done, you will see the uAdmin dashboard again. Open "TODOS" model.

tutorial/assets/todoshighlightedlog.png


You will notice that the name field has reverted from "Read a magazine" to "Read a book".

tutorial/assets/todomodeloutput.png


Let's delete a record in the Todo model.

assets/deleterecord.png


Now if I go to "LOGS", you will notice that the action says we "Deleted" a record in the todo table. There's also a Rollback button which means we can undo any changes. This is a good feature for the user who accidentally delete their records in the model.

assets/logdeleted.png


Click on "Roll Back" and see what happens.

assets/reverthandlerlog7.png


You will not see anything in the screen except the white background. To fix this, type 0.0.0.0:8000 in the address bar. Once you are done, you will see the uAdmin dashboard again. Open "TODOS" model.

tutorial/assets/todoshighlightedlog.png


As expected, we recovered a record in the Todo model.

tutorial/assets/todomodeloutput.png


Now click the profile icon on the top right corner then choose "Logout".

assets/logoutfromtodo.png


Input your username and password that is not existing in the User System Model then click Login.

assets/loginformnonexistent.png


You will see an error that says "Invalid Username". Now login using "admin as username and password.

assets/loginforminvaliduser.png


Now go to "LOGS" again. If you scroll it down, you will notice that your logout and login denied actions were recorded in the list.

assets/logindeniedlogout.png


Go back to the uAdmin Dashboard then select "USERS".

tutorial/assets/usershighlighted.png


Choose System Admin account then input your email. Email is necessary for exchanging messages between people or for password recovery.

assets/systemadminemail.png


Make it sure that you have a ready-made email configurations in main.go.

func main(){
    uadmin.EmailFrom = "myemail@integritynet.biz"
    uadmin.EmailUsername = "myemail@integritynet.biz"
    uadmin.EmailPassword = "abc123"
    uadmin.EmailSMTPServer = "smtp.integritynet.biz"
    uadmin.EmailSMTPServerPort = 587
    // Some codes
}

Once you are done, rebuild your application first (if you haven't set the email configurations yet) before you 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.

tutorial/assets/forgotpasswordhighlighted.png


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

tutorial/assets/forgotpasswordinputemail.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.

tutorial/assets/passwordresetnotification.png


You will be greeted by the reset password form. For now, try not to match the new and confirm reset password and see what happens.

assets/newconfirmresetnotmatch.png


Result

assets/passwordresetforminvalid.png


In uAdmin, you can only use one reset password per key. In this case, go back to the login form, select Forget Password, type your email to resend the request. This time input the following information that does match in order to create a new password for you.

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

Go to "LOGS" again, scroll it down and you will see that our password reset is denied on the first attempt then we reset the password successfully on our last attempt. That's how powerful the uAdmin log is, the way it keeps track of many things.

assets/passwordresetactions.png


Logs can accumulate so fast and it will get harder to find specific actions when you need to like when conducting an audit and investigating something in your system. Use "Filter” to narrow down what you are looking for:

assets/filterlog.png

Congrats, now you know how to understand records you have in your app and how to audit them and revert back actions when you need to.

Profile

Back To Top

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 highlighted below.

tutorial/assets/adminhighlighted.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.

tutorial/assets/choosefilephotohighlighted.png


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

assets/profilepicadded.png

No matter what small or large the pixels you upload in your profile, it will automatically resize the photo to static format.

You can also enable two factor authentication in your profile. In uAdmin, it uses QR code which is typically used for storing URLs or other information for reading by the camera on a smartphone. In order to do that, you can use Google Authenticator (Android, iOS). It is a software-based authenticator that implements two-step verification services using the Time-based One-time Password Algorithm and HMAC-based One-time Password algorithm, for authenticating users of mobile applications by Google. [2]

assets/enable2fa.png

If there is a problem, you may go to your terminal and check the OTP verification code for login.

Session

Back To Top

Session is an activity that a user with a unique IP address spends on a Web site during a specified period of time. [1]

assets/sessioninterface.png


Here are the following fields in this system:

  • Key - Displays a random string
  • User - Returns the first and last name
  • Login Time - This is when the user logins to the dashboard.
  • Last Login - This is when the user has last access to the account.
  • Active - If it is not checked, you will not be able to login with that user.
  • IP - Numerical label assigned to the session from the address bar that user connects to
  • Pending OTP - If the user has not verifying the OTP in the login
  • Expires On - This is when the cookie will expire.

Let’s open our app to see how these things work. Login your account using "admin” as username and password.

api/assets/loginformadmin.png


The Session model is hidden in the uAdmin Dashboard by default. In order to show it, go to "DASHBOARD MENUS" first.

tutorial/assets/dashboardmenuhighlighted.png


Select Sessions model in the list.

assets/sessionshighlighted.png


Turn off the Hidden field so that the Session model will become visible in the uAdmin Dashboard.

assets/sessionshiddenturnoff.png


Go back to the uAdmin Dashboard and open "SESSIONS".

assets/sessionshighlighteddashboard.png


If this is your first time to run an application, you will see only one session in the list as shown below.

assets/sessionlist.png


If you open the record, you will see all the details of that session. Let's turn off the Active, save it and see what happens.

assets/activeturnoff.png


It will automatically redirect you to the login page which means your session has been deactivated. Login your account again using "admin” as username and password.

assets/logoutfromsession.png


Your session automatically generates a new key for you.

assets/sessionautomaticcreate.png


Before we proceed to Pending OTP, go to the uAdmin Dashboard and select "USERS".

tutorial/assets/usershighlighted.png


Choose System Admin and activate the OTP required.

assets/otprequired.png


Now go back to Sessions model then click the previous record.

assets/firstsession.png


Enable the "Active" and "Pending OTP" then click Save.

assets/activepending.png


Now log out your account. Login again using "admin" as username and password then see what happens.

You will be asked to input a verification code in the login form. Check your terminal to see the OTP code.

[  INFO  ]   User: admin OTP: 245421

assets/loginformotp.png


Open "SESSIONS" model. You will notice that the second session is no longer active after you logout. The last login has changed because you reuse that session. It was reused because you set that session as Active before you logout. Lastly, the Pending OTP is no longer checked because you already verified OTP code given by your terminal.

assets/sessionchanges.png


Finally, set the Expires On value to now.

Warning

Use it at your own risk. Once the session expires, your account will be permanently deactivated. In this case, you must have an extra user account in the User database.

assets/sessionexpireson.png


Save it and see what happens.

assets/sessionloginform.png


It will automatically redirect you to the login page which means your session has expired. In this case, you must login using another account that has no expiry date in the session.

Well done! Now you know how to configure your sessions by using Active, Pending OTP, and Expires On.

Setting

Back To Top

Setting is a system in uAdmin that is used to display information for an application as a whole.

api/assets/defaultsettingrecords.png

Here are the following fields in this system:

  • Name - The name of the setting that you want to assign
  • Default Value - The value that will be assigned in the header inside the square brackets
  • Data Type - The data type that you want to select in the drop down list
  • Value - The value that will be assigned in the text box
  • Help - A feature that gives solution(s) to solve advanced tasks
  • Category - Used for classifying settings
  • Code - A read only field that is used to get a setting

Data Type has 7 choices:

  • Boolean - A data type that has one of two possible values (usually denoted true and false), intended to represent the two truth values of logic and Boolean algebra
  • DateTime - Provides functionality for measuring and displaying time
  • File - A data type used in order to upload a file in the database
  • Float - Used in various programming languages to define a variable with a fractional value
  • Image - Used to upload and crop an image in the database
  • Integer - Used to represent a whole number that ranges from -2147483647 to 2147483647 for 9 or 10 digits of precision
  • String - Used to represent text rather than numbers

First of all, go to uAdmin dashboard and click on "SETTINGS".

api/assets/settingshighlighted.png


Click "Add New Setting".

assets/addnewsetting.png


Let's input two records: A Water Daily Intake for Men and Women.

First record

assets/waterdailyintakeformen.png


Second record

assets/waterdailyintakeforwomen.png


Result

assets/settingdataresult.png


Now go to Settings page by clicking on the wrench icon on the top right part to see the result.

assets/wrenchiconfromsetting.png


Result

assets/settingresult.png


You can also modify the values in the built-in uAdmin functions. For this example, let's edit the SiteName. In order to do that, click the record highlighted below.

assets/sitenamesettinghighlighted.png


Change the value from "uAdmin" to "System Tutorial".

assets/systemtutorialvalue.png


Result

assets/systemtutorialsaved.png


Now go to the dashboard. As expected, the name of the website that shows on title and dashboard is "System Tutorial Dashboard".

assets/systemtutorialdashboard.png

Congrats! Now you know how to create a setting by assigning the name, default value, data type, value, help, category, displaying the results in the Settings page, and modifying the built-in uAdmin functions.

More examples:

uAdmin

Back To Top (Setting)

Page:

.. toctree::
   :maxdepth: 1

   system-reference/setting

Setting Category

Back To Top

Setting Category is a system in uAdmin that is used for classifying settings and its records.

Here are the following fields in this system:

  • Name - The name of the setting category that you want to assign
  • Icon - A small picture or symbol for setting category

First of all, go to uAdmin dashboard and click on "SETTING CATEGORIES".

assets/settingcategoryshighlighted.png


Click "Add New Setting Category".

assets/addnewsettingcategory.png


Fill up the following data to create a new setting category (e.g. Health).

assets/settingcategoryhealth.png


Result

api/assets/settingcategoryhealthresult.png


Now go to Settings page by clicking on the wrench icon on the top right part to see the result.

assets/wrenchiconfromsettingcategory.png


Result

assets/settingcategoryresult.png


Congrats! Now you know how to create a setting category by assigning the name and icon, and displaying the result in the Settings page.

User

Back To Top

User is a system in uAdmin that is used to add, modify and delete the elements of the user. By default, the system creates one user which is the admin user who has full permission to read, add edit and delete data from every model.

assets/user.png

Here are the following fields in this system:

  • User - Returns the first and last name
  • Username - An identification used by a person
  • First Name - Given name
  • Last Name - Surname
  • Email - An electronic mail address used for exchanging messages between people or for password recovery
  • Active - If it is not checked, you will not be able to login with that user.
  • Admin - Allows full access to everything where you can set permissions to the user
  • Remote Access - If it is not checked, you will only be able to login if you are connected to the server using a private IP e.g. (10.x.x.x,192.168.x.x, 127.x.x.x or ::1).
  • User Group - To belong a specific user to the group. If the user group has permissions, the user can access to something with some restrictions.
  • Photo - This is where you can upload your profile picture in your account.
  • Last Login - This is when the user has last access to the account.
  • Expires On - This is when the cookie will expire.
  • OTP Required - Adds an extra layer of security by sending the verification code

Let's create a new user account called "even" with the First Name "Even" and the Last Name "Demata". Set the Active, Admin, and Remote Access fields to true.

assets/useraddsystem.png


Result

assets/useraddsystemoutput.png


Now log out your account and login again using the name "even".

assets/loginformeven.png


As expected, you will see the same dashboard like using your System Admin account. It's because you are an admin and has full permissions to everything. For now, let's set an email address to "myemail@integritynet.biz".

tutorial/assets/useremailhighlighted.png


Make it sure that you have set an email configurations in main.go.

func main(){
    uadmin.EmailFrom = "myemail@integritynet.biz"
    uadmin.EmailUsername = "myemail@integritynet.biz"
    uadmin.EmailPassword = "abc123"
    uadmin.EmailSMTPServer = "smtp.integritynet.biz"
    uadmin.EmailSMTPServerPort = 587
    // Some codes
}

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.

tutorial/assets/forgotpasswordhighlighted.png


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

tutorial/assets/forgotpasswordinputemail.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.

tutorial/assets/passwordresetnotification.png


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

tutorial/assets/resetpasswordform.png

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

Login your System Admin account. Turn off the Admin and Remote Access fields in Even Demata account.

assets/adminremoteturnedoff.png


Logout your System Admin account and login the Even Demata account. Let's see what happens.

assets/dashboardmenuempty.png


The dashboard menu is empty. How can we get access to it at least some of them? We need to set the user permission to Even Demata account so login your System account, go to Users model, select Even Demata account then go to the User Permission tab. Afterwards, click Add New User Permission button at the right side.

assets/addnewuserpermission.png


Set the Dashboard Menu to "Todos" model, User linked to "Even Demata", and activate the "Read" only. It means Even Demata user account has restricted access to adding, editing, deleting, and approving a record in the Todos model.

assets/userpermissionevendemata.png


Result

assets/userpermissionevendemataoutput.png


Log out your System Admin account. This time login your username and password using the user account that has user permission. Afterwards, you will see that only the Todos model is shown in the dashboard because your user account is not an admin and has no remote access to it. Now click on TODOS model.

assets/userpermissiondashboard.png


As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

assets/useraddeditdeleterestricted.png


Login your System Admin account again, go to the User Group and create a group named "Front Desk".

assets/usergroupcreated.png


Link your created user group to Even Demata account.

assets/useraccountfrontdesklinked.png


Afterwards, click the Front Desk highlighted below.

assets/frontdeskhighlighted.png


Go to the Group Permission tab. Afterwards, click Add New Group Permission button at the right side.

assets/addnewgrouppermission.png


Set the Dashboard Menu to "Todos" model, User linked to "Even Demata", and activate the "Add" only. It means Even Demata user account has restricted access to reading, editing and deleting a record in the Todos model.

assets/grouppermissionevendemata.png


Result

assets/grouppermissionevendemataoutput.png


Log out your System Admin account. This time login your username and password using the user account that has group permission. Now click on TODOS model.

assets/userpermissiondashboard.png


As you will see, your user account is still restricted to add, edit, or delete a record in the Todo model even if your group permission has access to "Read" only. It's because the user permission has no access to "Read" even if Even Demata is part of the Front Desk group. In other words, user permission prioritizes more than group permission.

assets/useraddeditdeleterestricted.png


Login your System Admin account again. Go back to the Users model, select Even Demata account, and let's upload a profile picture. If you don't have any pictures or icons in your computer, I would recommend you to go over flaticon.com, but you can browse anywhere online. Once you search for an icon, download the PNG version and choose the size 128 pixels.

assets/userphotohighlighted.png


Logout your System Admin account. Login your Even Demata account, click on profile icon then select "even" highlighted below.

assets/evenhighlighted.png


You will notice that your profile picture has been uploaded in your user account.

assets/profileeven.png


Login your System Admin account again. Go back to the Users model, select Even Demata account, and activate the OTP Required.

assets/otprequiredeven.png


Logout your System Admin account then Login Even Demata account. Afterwards, you will see the second form as shown below. It requires you to input a Verification Code given by your terminal.

Terminal

[  INFO  ]   User: even OTP: 812567

assets/loginformwithotp.png


Once you are done, it will redirect you to the uAdmin dashboard. Login your System Admin account again, go back to the Users model, select Even Demata account, and set the Expires On to now.

assets/expiresoneven.png


Log out your System Admin account, login Even Demata account and see what happens.

assets/logoutredirect.png


It will log you out automatically because Even Demata account has already expired.

Login your System Admin account. Go to Users model and finally, delete the Even Demata account.

assets/deleteuser.png

Well done! Now you know how to configure your user by adding, updating, customizing and deleting a user account.

User Group

Back To Top

User Group is a system in uAdmin used to add, modify, and delete the group name, the only field in this system. It has only one field: Group Name. It is useful if you want to belong a specific user to the group. If the user group has permissions, the user can access to something with some restrictions.

Let's create a new user group named "Front Desk".

assets/usergroupcreated.png


Afterwards, link it to any of your existing user accounts.

assets/useraccountfrontdesklinked.png


Result

assets/frontdeskhighlighted.png


Finally, delete the Front Desk User Group.

assets/usergroupdelete.png

Well done! Now you know how to add a user group, link it to your existing user accounts, and deleting the user group.

User Permission

Back To Top

User Permission sets the permission of a user handled by an administrator.

assets/userpermissioncreated.png

Here are the following fields in this system:

  • User Permission - Returns the ID number of itself
  • Dashboard Menu - Fetches the name of the model
  • User - Fetches the first and last name of the user
  • Read - Sets the Read access to the user
  • Add - Sets the Add access to the user
  • Edit - Sets the Edit access to the user
  • Delete - Sets the Delete access to the user
  • Approval - Sets the Approval access to the user

First of all, make it sure that your existing account is not an Admin (example below is Even Demata).

assets/adminhighlighted.png

Set the Dashboard Menu to any of your existing models (example below is Todos), link it to any of your existing accounts, and activate the "Read" only. It means Even Demata account has restricted access to adding, editing, deleting, and approving a record in the Todos model.

assets/userpermissionevendemata.png


Result

assets/userpermissionevendemataoutput.png


Log out your System Admin account. This time login your username and password using the user account that has user permission. Afterwards, you will see that only the Todos model is shown in the dashboard because your user account is not an admin and has no remote access to it. Now click on TODOS model.

assets/userpermissiondashboard.png


As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

assets/useraddeditdeleterestricted.png


To remove those restrictions, login your System Admin account, go to User Permission and activate "Add", "Edit", and "Delete" access to Even Demata account.

assets/useraddeditdelete.png


Login your Even Demata account and see what happens.

assets/useraccessadddelete.png


Let's open the "Read a book" record to see if the user can have access to edit.

assets/useraccessedit.png


Nice! You have full access to everything in the TODOS model. What if the user has no access to "Read" but can add, edit, or delete a record? Login your System account and remove "Read" access to Even Demata.

assets/usernoaccessread.png


Login your Even Demata account and see what happens.

assets/dashboardmenuempty.png

TODOS model does not show up in the dashboard. Even if you remove access to "Add", "Edit" and "Delete" to Even Demata account, it will display the same output.

Login your System Admin account. Finally, delete the User Permission in Even Demata account.

assets/userpermissiondelete.png

Well done! Now you know how to set the user permission to the user account, changing the access in the model and deleting the user permission.

Reference

[1]QuinStreet Inc. (2018). User Session. Retrieved from https://www.webopedia.com/TERM/U/user_session.html
[2]No author (28 May 2019). Google Authenticator. Retrieved from https://en.wikipedia.org/wiki/Google_Authenticator