HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
main.php
Go to the documentation of this file.
1 <?php
2 // uncomment the following to define a path alias
3 // Yii::setPathOfAlias('local','path/to/local-folder');
4 
5 // This is the main Web application configuration. Any writable
6 // CWebApplication properties can be configured here.
7 $ini = parse_ini_file('protected/config/config.ini');
8 require_once 'const.php';
9 
10 return array(
11  'sourceLanguage' => 'en',
12  'language' => 'en',
13  'basePath'=>dirname(dirname(__FILE__)),
14  'runtimePath'=>dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'runtime',
15  'name'=>'DC service Web UI',
16  'defaultController'=>'SitesView',
17  'theme' => 'default',
18 
19  // preloading 'log' component
20  'preload'=>array('log','booster', 'debug'),
21 
22  // autoloading model and component classes
23  'import'=>array(
24  'application.models.*',
25  'application.models.behaviors.*',
26  'application.models.behaviors.Serialize.*',
27  'application.components.*',
28  'application.helpers.*',
29  'application.vendors.*',
30  'application.modules.user.*',
31  'application.modules.user.models.*',
32  'application.modules.user.components.*',
33  'application.modules.rights.models.*',
34  'application.modules.rights.components.*',
35  'application.modules.account.*',
36  'application.modules.account.models.*',
37  'application.models.AccountSite.*',
38  'application.modules.TagsReaperUI.components.*'
39  ),
40 
41  'modules'=>array(
42  // uncomment the following to enable the Gii tool
43  'gii'=>array(
44  'class'=>'system.gii.GiiModule',
45  'password'=>'hce12345'),
46  /*
47  // If removed, Gii defaults to localhost only. Edit carefully to taste.
48  'ipFilters'=>array('127.0.0.1','::1'),
49  ),
50  */
51  'user'=>array(
52  'tableUsers' => 'users',
53  'tableProfiles' => 'profiles',
54  'tableProfileFields' => 'profiles_fields',
55  'hash' => 'md5', // encrypting method (php hash function)
56  'sendActivationMail' => false, // send activation email
57  'loginNotActiv' => false, // allow access for non-activated users
58  'activeAfterRegister' => true, // activate user on registration (only sendActivationMail = false)
59  'autoLogin' => true, // automatically login from registration
60  'registrationUrl' => array('/user/registration'), // registration path
61  'recoveryUrl' => array('/user/recovery'), // recovery password path
62  'loginUrl' => array('/user/login'), // login form path
63  'returnUrl' => array('/user/profile'), // page after login
64  'returnLogoutUrl' => array('/user/login'), // page after logout
65  ),
66  'rights'=>array(
67  'superuserName'=>'Admin', // Name of the role with super user privileges.
68  'authenticatedName'=>'Authenticated', // Name of the authenticated user role.
69  'userIdColumn'=>'id', // Name of the user id column in the database.
70  'userNameColumn'=>'username', // Name of the user name column in the database.
71  'enableBizRule'=>true, // Whether to enable authorization item business rules.
72  'enableBizRuleData'=>true, // Whether to enable data for business rules.
73  'displayDescription'=>true, // Whether to use item description instead of name.
74  'flashSuccessKey'=>'RightsSuccess', // Key to use for setting success flash messages.
75  'flashErrorKey'=>'RightsError', // Key to use for setting error flash messages.
76  'baseUrl'=>'/rights', // Base URL for Rights. Change if module is nested.
77  'layout'=>'rights.views.layouts.main', // Layout to use for displaying Rights.
78  'appLayout'=>'application.views.layouts.main', // Application layout.
79  'cssFile'=>'rights.css', // Style sheet file to use for Rights.
80  'install'=>false, // Whether to enable installer.
81  'debug'=>true,
82  ),
83  'account' => array(),
84  'job' => array(),
85  'TagsReaperUI' => array(),
86  ),
87 
88  // application components
89  'components'=>array(
90 
91  'user'=>array(
92  'class'=>'RWebUser',
93  // enable cookie-based authentication
94  'allowAutoLogin'=>true,
95  'loginUrl'=>array('/user/login'),
96  ),
97  'authManager'=>array(
98  'class'=>'RDbAuthManager',
99  'connectionID'=>'db',
100  'defaultRoles'=>array(),
101  ),
102  /*'request'=>array(
103  'enableCsrfValidation'=>true,
104  ),*/
105  'debug' => array(
106  'class' => 'application.extensions.yii2-debug.Yii2Debug',
107  ),
108  'cache' => array(
109  'class' => 'system.caching.CDummyCache'
110  ),
111  'booster' => array(
112  'class' => 'application.extensions.booster.components.Booster',
113  ),
114  'format'=>array(
115  'class'=>'application.components.YFormatter',
116  ),
117  'session' => array(
118  'autoStart' => true,
119  ),
120  // uncomment the following to enable URLs in path-format
121  'urlManager'=>array(
122  'showScriptName' => false,
123  'urlFormat'=>'path',
124  'rules'=>array(
125  '<controller:TagsReaperUI>/<action:tryIt>'=>'TagsReaperUI/TagsReaperUI/tryIt',
126  '<controller:TagsReaperUI>/<action:createSession>'=>'TagsReaperUI/TagsReaperUI/createSession',
127  '<controller:TagsReaperUI>/<action:content>'=>'TagsReaperUI/TagsReaperUI/content',
128  '<controller:TagsReaperUI>/<action:toggleUserInfoForm>'=>'TagsReaperUI/TagsReaperUI/toggleUserInfoForm',
129  '<controller:TagsReaperUI>/<action:validationDynamicFields>'=>'TagsReaperUI/TagsReaperUI/validationDynamicFields',
130  '<controller:\w+>/<id:\d+>'=>'<controller>/view',
131  '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
132  '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
133  ),
134  ),
135  /*
136  'db'=>array(
137  'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
138  ),
139  */
140  // uncomment the following to use a MySQL database
141  'db'=>array(
142  'connectionString' => 'mysql:host='.MAIN_MYSQL_HOST.';dbname=dc_management',
143  'tablePrefix' => '',
144  'emulatePrepare' => true,
145  'username' => MAIN_MYSQL_USER,
146  'password' => MAIN_MYSQL_PASSWORD,
147  'charset' => 'utf8',
148  'enableProfiling' => true,
149  'enableParamLogging' => true,
150  ),
151  /*'errorHandler'=>array(
152  // use 'site/error' action to display errors
153  'errorAction'=>'site/error',
154  ),*/
155  'log'=>array(
156  'class'=>'CLogRouter',
157  'routes'=>array(
158  array(
159  'class'=>'CFileLogRoute',
160  'levels'=>'error, warning',
161  ),
162  // uncomment the following to show log messages on web pages
163 
164 // array(
165 // 'class'=>'CWebLogRoute',
166 // ),
167 
168  ),
169  ),
170  'securityManager'=>array(
171  'cryptAlgorithm' => 'blowfish',
172  ),
173  ),
174 
175  // application-level parameters that can be accessed
176  // using Yii::app()->params['paramName']
177  'params'=>array(
178  'api'=>PATH_TO_API,
179  'apiDir'=>PATH_TO_API_DIR,
180  'tmpDir'=>PATH_TO_TMP_DIR,
181  'bashScrFolder'=>dirname(dirname(dirname(__FILE__))).'/shell/',
182  'webRoot'=>dirname(dirname(dirname(__FILE__))),
183  ),
184 );