Jump to content

Master builder

50% developed
From Wikibooks, open books for an open world

Master builder project was created by Kenny Koay from Global Connect Resources Sdn Bhd from simple table to system interface to reduce the developer work load. Master builder have been using following technology to make it simple to maintain without the need of the tools after the generation.

  • Codeigniter 2.0
  • JQuery
  • Metronic design template as the base

Prerequisites

[edit | edit source]
  1. Download the source code to your local drive.
  2. Run download.sh and download.bat file
    • Make sure it points to the right project by open with notepad.
  3. Go to localhost:8080/<project schema> and log in with your company email.

Definition of the code name in the MasterBuilder

[edit | edit source]

IsUnique

[edit | edit source]
Value Expected effect
Y Will force the system to check to make sure there are no other data with the same data exist before save.

Customer_Email

[edit | edit source]
Value Expected effect
Y Will lock down the REST API to filter the data base on customer's login-email. This is only for non-admin user only. For admin, they still can see everything. In the edit form, by default...we will disable the edit and hardcode it to be customer email address

CustomerEmail_dont_lock

[edit | edit source]
Value Expected effect
Y Will not lock down as controller side as some customer email is there for reference only instead of filter

fk_view

[edit | edit source]

This key is used by button selector which will show what are the field the user can see instead of showing everything.

Value Expected effect
Y If only "Y" exist, it will only display those with "Y"
N If only "N" exist, it will only hide those with "N"

admin_only

[edit | edit source]
Value Expected effect
Y If only "Y" exist, this field will be visible to admin user only

summary_view

[edit | edit source]
Value Expected effect
Y If only "Y" exist, it will only display those with "Y" in the dashboard

custom_referenced_column_name_display

[edit | edit source]

Put the field that you wish to display instead of the ID number

hideForm

[edit | edit source]
Value Expected effect
Y will hide the value as "hidden" instead of remove it totally compare to admin (if not admin). It is useful for calculation or hiding insensitive data and not-important data for user like today exchange rate which will be use partly for calculating

hide_new

[edit | edit source]
Value Expected effect
Y will hide the field when editing to prevent confusion as some field is not required to be seen by client when created

combobox_only

[edit | edit source]
Value Expected effect
Y It will display the drop down based on the custom_referenced_column_name_display

custom_referenced_column_name_display

[edit | edit source]

Only work when comobobox_only = Y

It will display whatever field entered here instead of the default value

default_value

[edit | edit source]
Value Expected effect
Y Expected default value in the field based on the field_name value

hideTable

[edit | edit source]
Value Expected effect
Y

Source code for download.sh

[edit | edit source]
curl "https://master-builder.appspot.com/my_generate_report.php?host_name=[mysql_ip]&user_name=[mysql_user_id]&user_pwd=[mysql_password]&db_name=[mysql_dbname]&socket=null&port=3306"

success=0;

while [ $success -eq 0 ]
do
success=0;
gsutil -m cp -R gs://master-builder.appspot.com/project/[mysql_dbname]/* ./
if [ $? -eq 0 ]
then
success=1;
else
say -v "Alex" "Download fail...will retry in 5 seconds"
sleep 5
fi
done