Changeset 14

User picture

Author: pdavid

(2011/05/17 08:07) About 1 year ago


  

Affected files

Updated branches/bromine3_rc4/app/app_controller.php Download diff

1314
21
21
22
class AppController extends Controller {
22
class AppController extends Controller {
23
23
24
    public $components = array('Auth', 'RequestHandler', 'Menu', 'MyAcl', 'Session', 'DebugKit.Toolbar');
24
    public $components = array('Auth', 'RequestHandler', 'Menu', 'MyAcl', 'Session');//, 'DebugKit.Toolbar'
25
    public $helpers = array('Html', 'Ajax', 'Javascript', 'Tree', 'Session');
25
    public $helpers = array('Html', 'Ajax', 'Javascript', 'Tree', 'Session');
26
    public $layout = 'green';
26
    public $layout = 'green';
27
    public $main_menu_id = -1;
27
    public $main_menu_id = -1;

Updated branches/bromine3_rc4/app/config/core.php Download diff

1314
102
 * or in each action using $this->cacheAction = true.
102
 * or in each action using $this->cacheAction = true.
103
 *
103
 *
104
 */
104
 */
105
	Configure::write('Cache.check', true);
105
//	Configure::write('Cache.check', true);
106
106
107
/**
107
/**
108
 * Defines the default error type when using the log() function. Used for
108
 * Defines the default error type when using the log() function. Used for

Updated branches/bromine3_rc4/app/config/database.php Download diff

1314
5
    		'persistent' => false,
5
    		'persistent' => false,
6
    		'host' => 'localhost',
6
    		'host' => 'localhost',
7
    		'login' => 'root',
7
    		'login' => 'root',
8
    		'password' => '',
8
    		'password' => 'bilboquet',
9
    		'database' => 'bromine',
9
    		'database' => 'bromine',
10
    		'prefix' => '',
10
    		'prefix' => '',
11
    		'encoding' => 'utf8'
11
    		'encoding' => 'utf8'

Updated branches/bromine3_rc4/app/controllers/components/checker.php Download diff

1314
38
class CheckerComponent extends Object {
38
class CheckerComponent extends Object {
39
39
40
    var $controller = true;
40
    var $controller = true;
41
    var $components = array( 'Session', 'Script' );
41
    var $components = array('Session', 'Script');
42
    var $cacheAction = false;
42
    var $cacheAction = false;
43
    var $stateOfTheSystem = false;
43
    var $stateOfTheSystem = false;
44
    var $ignored = 0;
44
    var $ignored = 0;
...
...
48
     * Initialise some models
48
     * Initialise some models
49
     * @param <type> $controller
49
     * @param <type> $controller
50
     */
50
     */
51
    function startup( &$controller ) {
51
    function startup(&$controller) {
52
52
53
        App::import( 'Helper', 'Html' );
53
        App::import('Helper', 'Html');
54
        $this->html = new HtmlHelper();
54
        $this->html = new HtmlHelper();
55
55
56
        App::import( 'Model', 'Node' );
56
        App::import('Model', 'Node');
57
        $this->Node = new Node();
57
        $this->Node = new Node();
58
        //$this->nodes = $this->Node->find( 'all' );
58
        //$this->nodes = $this->Node->find( 'all' );
59
59
60
        App::import( 'Model', 'Requirement' );
60
        App::import('Model', 'Requirement');
61
        $this->Requirement = new Requirement();
61
        $this->Requirement = new Requirement();
62
    }
62
    }
63
63
64
    function getOnlineNodes() {
64
    function getOnlineNodes() {
65
65
66
        $nodes = $this->Node->find( 'all' );
66
        $nodes = $this->Node->find('all');
67
        $onlineNodes = array( );
67
        $onlineNodes = array();
68
        foreach ( $nodes as &$node ) {
68
        foreach ($nodes as &$node) {
69
            if ( $this->Node->checkJavaServer( $node[ 'Node' ][ 'nodepath' ] ) ) {
69
            if ($this->Node->checkJavaServer($node['Node']['nodepath'])) {
70
                $onlineNodes[ ] = $node;
70
                $onlineNodes[] = $node;
71
            }
71
            }
72
        }
72
        }
73
        return $onlineNodes;
73
        return $onlineNodes;
74
    }
74
    }
75
75
76
    function getAllNodes() {
76
    function getAllNodes() {
77
        return $this->Node->find( 'all' );
77
        return $this->Node->find('all');
78
    }
78
    }
79
79
80
    function getCombinations( $requirements, $recursive = false ) {
80
    function getCombinations($requirements, $recursive = false) {
81
        //debug( $requirements );
81
        //debug( $requirements );
82
82
83
        $site_id = $this->Session->read( 'site_id' );
83
        $site_id = $this->Session->read('site_id');
84
        if ( !$recursive ) {
84
        if (!$recursive) {
85
            foreach ( $requirements[ 'Combination' ] as &$combination ) {
85
            foreach ($requirements['Combination'] as &$combination) {
86
                foreach ( $requirements[ 'Testcase' ] as $testcase ) {
86
                foreach ($requirements['Testcase'] as $testcase) {
87
                    $combination[ 'tc' . $testcase[ 'id' ] ][ 'status' ] = $this->Requirement->Testcase->Test->getStatus( $testcase[ 'id' ], $combination[ 'Operatingsystem' ][ 'id' ], $combination[ 'Browser' ][ 'id' ], $site_id );
87
                    $combination['tc' . $testcase['id']]['status'] = $this->Requirement->Testcase->Test->getStatus($testcase['id'], $combination['Operatingsystem']['id'], $combination['Browser']['id'], $site_id);
88
                    $t = $this->Requirement->Testcase->Test->getLastInCombination( $testcase[ 'id' ], $combination[ 'Operatingsystem' ][ 'id' ], $combination[ 'Browser' ][ 'id' ], $site_id );
88
                    $t = $this->Requirement->Testcase->Test->getLastInCombination($testcase['id'], $combination['Operatingsystem']['id'], $combination['Browser']['id'], $site_id);
89
                    $combination[ 'tc' . $testcase[ 'id' ] ][ 'timestamp' ] = $t[ 'Test' ][ 'timestamp' ];
89
                    $combination['tc' . $testcase['id']]['timestamp'] = $t['Test']['timestamp'];
90
                    $combination[ 'tc' . $testcase[ 'id' ] ][ 'Test_id' ] = $t[ 'Test' ][ 'id' ];
90
                    $combination['tc' . $testcase['id']]['Test_id'] = $t['Test']['id'];
91
                }
91
                }
92
            }
92
            }
93
            return $requirements[ 'Combination' ];
93
            return $requirements['Combination'];
94
        } else {
94
        } else {
95
            foreach ( $requirements as &$requirement ) {
95
            foreach ($requirements as &$requirement) {
96
                foreach ( $requirement[ 'Combination' ] as &$combination ) {
96
                foreach ($requirement['Combination'] as &$combination) {
97
                    foreach ( $requirement[ 'Testcase' ] as $testcase ) {
97
                    foreach ($requirement['Testcase'] as $testcase) {
98
                        $combination[ 'tc' . $testcase[ 'id' ] ][ 'status' ] = $this->Requirement->Testcase->Test->getStatus( $testcase[ 'id' ], $combination[ 'Operatingsystem' ][ 'id' ], $combination[ 'Browser' ][ 'id' ], $site_id );
98
                        $combination['tc' . $testcase['id']]['status'] = $this->Requirement->Testcase->Test->getStatus($testcase['id'], $combination['Operatingsystem']['id'], $combination['Browser']['id'], $site_id);
99
                        $t = $this->Requirement->Testcase->Test->getLastInCombination( $testcase[ 'id' ], $combination[ 'Operatingsystem' ][ 'id' ], $combination[ 'Browser' ][ 'id' ], $site_id );
99
                        $t = $this->Requirement->Testcase->Test->getLastInCombination($testcase['id'], $combination['Operatingsystem']['id'], $combination['Browser']['id'], $site_id);
100
                        $combination[ 'tc' . $testcase[ 'id' ] ][ 'timestamp' ] = $t[ 'Test' ][ 'timestamp' ];
100
                        $combination['tc' . $testcase['id']]['timestamp'] = $t['Test']['timestamp'];
101
                        $combination[ 'tc' . $testcase[ 'id' ] ][ 'Test_id' ] = $t[ 'Test' ][ 'id' ];
101
                        $combination['tc' . $testcase['id']]['Test_id'] = $t['Test']['id'];
102
                    }
102
                    }
103
                }
103
                }
104
            }
104
            }
105
            $combinations = array( );
105
            $combinations = array();
106
            foreach ( $requirements as $requirement ) {
106
            foreach ($requirements as $requirement) {
107
                $combinations = array_merge( $combinations, $requirement[ 'Combination' ] );
107
                $combinations = array_merge($combinations, $requirement['Combination']);
108
            }
108
            }
109
            //debug( $combinations );
109
            //debug( $combinations );
110
            return $combinations;
110
            return $combinations;
...
...
117
     * @param <int> $projectId
117
     * @param <int> $projectId
118
     * @return <array>
118
     * @return <array>
119
     */
119
     */
120
    function getCombinations2( $projectId ) {
120
    function getCombinations2($projectId) {
121
        $requirements = $this->Requirement->find( 'all', array(
121
        $requirements = $this->Requirement->find('all', array(
122
                    'conditions' => array( 'project_id' => $projectId ),
122
                    'conditions' => array('project_id' => $projectId),
123
                    'contain' => array(
123
                    'contain' => array(
124
                        'Combination' => array(
124
                        'Combination' => array(
125
                            'Browser', 'Operatingsystem'
125
                            'Browser', 'Operatingsystem'
126
                        ) ) )
126
                    )))
127
        );
127
        );
128
        $a1 = Set::extract( $requirements, "{0}.Combination" );
128
        $a1 = Set::extract($requirements, "{0}.Combination");
129
        $a2 = Set::extract( $requirements, "{1}.Combination" );
129
        $a2 = Set::extract($requirements, "{1}.Combination");
130
        if ( !empty( $a1[ 0 ] ) && !empty( $a2[ 1 ] ) ) {
130
        if (!empty($a1[0]) && !empty($a2[1])) {
131
            return array_merge( $a1[ 0 ], $a2[ 1 ] );
131
            return array_merge($a1[0], $a2[1]);
132
        } else if ( !empty( $a1[ 0 ] ) ) {
132
        } else if (!empty($a1[0])) {
133
            return $a1[ 0 ];
133
            return $a1[0];
134
        } else if ( !empty( $a2[ 1 ] ) ) {
134
        } else if (!empty($a2[1])) {
135
            return $a2[ 1 ];
135
            return $a2[1];
136
        }
136
        }
137
        return false;
137
        return false;
138
    }
138
    }
139
139
140
    function getOnlineCombinations( $onlineNodes ) {
140
    function getOnlineCombinations($onlineNodes) {
141
        $onlineCombinations = array( );
141
        $onlineCombinations = array();
142
        foreach ( $onlineNodes as $onlineNode ) {
142
        foreach ($onlineNodes as $onlineNode) {
143
            foreach ( $onlineNode[ 'Browser' ] as $browser ) {
143
            foreach ($onlineNode['Browser'] as $browser) {
144
                $onlineCombinations[ ] = $onlineNode[ 'Operatingsystem' ][ 'id' ] . ',' . $browser[ 'id' ];
144
                $onlineCombinations[] = $onlineNode['Operatingsystem']['id'] . ',' . $browser['id'];
145
            }
145
            }
146
        }
146
        }
147
        return $onlineCombinations;
147
        return $onlineCombinations;
...
...
154
     * @param <boolean> $recursive
154
     * @param <boolean> $recursive
155
     * @return array(string) Array of os that can be used to run testcases
155
     * @return array(string) Array of os that can be used to run testcases
156
     */
156
     */
157
    function getOfflineNeeds( $onlineNodes, $combinations, $recursive = false ) {
157
    function getOfflineNeeds($onlineNodes, $combinations, $recursive = false) {
158
        $onlineCombinations = array( );
158
        $onlineCombinations = array();
159
        $offlineNeeds = array( );
159
        $offlineNeeds = array();
160
        $onlineCombinations = $this->getOnlineCombinations( $onlineNodes );
160
        $onlineCombinations = $this->getOnlineCombinations($onlineNodes);
161
        if ( $recursive ) {
161
        if ($recursive) {
162
            $requirements = $combinations;
162
            $requirements = $combinations;
163
            foreach ( $requirements as &$combinations ) {
163
            foreach ($requirements as &$combinations) {
164
                $requirementName = $combinations[ 'Requirement' ][ 'name' ];
164
                $requirementName = $combinations['Requirement']['name'];
165
                foreach ( $combinations[ 'Combination' ] as $combination ) {
165
                foreach ($combinations['Combination'] as $combination) {
166
                    $idCombination = $combination[ 'Operatingsystem' ][ 'id' ] . ',' . $combination[ 'Browser' ][ 'id' ];
166
                    $idCombination = $combination['Operatingsystem']['id'] . ',' . $combination['Browser']['id'];
167
                    if ( !in_array( $idCombination, $onlineCombinations ) ) {
167
                    if (!in_array($idCombination, $onlineCombinations)) {
168
                        $offlineNeeds[ ] = "(Req.: $requirementName): " . $combination[ 'Browser' ][ 'name' ] . ' on ' . $combination[ 'Operatingsystem' ][ 'name' ];
168
                        $offlineNeeds[] = "(Req.: $requirementName): " . $combination['Browser']['name'] . ' on ' . $combination['Operatingsystem']['name'];
169
                    }
169
                    }
170
                }
170
                }
171
            }
171
            }
172
        } else {
172
        } else {
173
            foreach ( $combinations as $combination ) {
173
            foreach ($combinations as $combination) {
174
                $idCombination = $combination[ 'Operatingsystem' ][ 'id' ] . ',' . $combination[ 'Browser' ][ 'id' ];
174
                $idCombination = $combination['Operatingsystem']['id'] . ',' . $combination['Browser']['id'];
175
                if ( !in_array( $idCombination, $onlineCombinations ) ) {
175
                if (!in_array($idCombination, $onlineCombinations)) {
176
                    $offlineNeeds[ ] = $combination[ 'Browser' ][ 'name' ] . ' on ' . $combination[ 'Operatingsystem' ][ 'name' ];
176
                    $offlineNeeds[] = $combination['Browser']['name'] . ' on ' . $combination['Operatingsystem']['name'];
177
                }
177
                }
178
            }
178
            }
179
        }
179
        }
...
...
186
     * @param boolean $recursive default false
186
     * @param boolean $recursive default false
187
     * @return string
187
     * @return string
188
     */
188
     */
189
    function getTestcasesWithNoScript( $project_id ) {
189
    function getTestcasesWithNoScript($project_id) {
190
        $noScripts = null;
190
        $noScripts = null;
191
        /* if ( !$recursive ) {
191
        /* if ( !$recursive ) {
192
          foreach ( $requirements[ 'Testcase' ] as $testcase ) {
192
          foreach ( $requirements[ 'Testcase' ] as $testcase ) {
...
...
204
          }
204
          }
205
          } */
205
          } */
206
206
207
        $noScripts = $this->Requirement->Testcase->find( 'all', array(
207
        $noScripts = $this->Requirement->Testcase->find('all', array(
208
                    'fields' => array( 'Testcase.id', 'Testcase.name' ),
208
                    'fields' => array('Testcase.id', 'Testcase.name'),
209
                    'recursive' => 0,
209
                    'recursive' => 0,
210
                    'conditions' => array(
210
                    'conditions' => array(
211
                        'Testcase.project_id' => $project_id,
211
                        'Testcase.project_id' => $project_id,
212
                        'OR' => array(
212
                        'OR' => array(
213
                            'Testcase.filepath' => null,
213
                            'Testcase.filepath' => null,
214
                            'Testcase.filepath' => '' )
214
                            'Testcase.filepath' => '')
215
                    ) )
215
                        ))
216
        );
216
        );
217
        return $noScripts;
217
        return $noScripts;
218
    }
218
    }
219
219
220
    function getStateOfTheSystem() {
220
    function getStateOfTheSystem() {
221
221
222
        //if (!empty(Cache::read('stateOfTheSystem'))){
222
        $stateOfTheSystem = Cache::read('stateOfTheSystem');
223
        $stateOfTheSystem = Cache::read( 'stateOfTheSystem' );
223
        if ($this->stateOfTheSystem !== false) {
224
        //pr ($stateOfTheSystem);
224
            $this->set('states', $this->stateOfTheSystem);
225
        if ( $this->stateOfTheSystem !== false ) {
226
            $this->set( 'states', $this->stateOfTheSystem );
227
            return $this->stateOfTheSystem;
225
            return $this->stateOfTheSystem;
228
        }
226
        }
229
        //}
227
        $states = array('Main' => array('status' => 0));
230
        $states = array( );
228
        $states['Java'] = $this->getJavaStatus();
231
        $states[ 'Java' ] = $this->getJavaStatus();
232
229
233
        $states[ 'PHP' ] = $this->getPHPstatus();
230
        $states['PHP'] = $this->getPHPstatus();
234
231
235
        $states[ 'Magic Quotes' ] = $this->getMagicQuotesStatus();
232
        $states['Magic Quotes'] = $this->getMagicQuotesStatus();
236
233
237
        $states[ 'Max execution time' ] = $this->getMaxExecTime();
234
        $states['Max execution time'] = $this->getMaxExecTime();
238
235
239
        $states[ 'Max input time' ] = $this->getMaxInputTime();
236
        $states['Max input time'] = $this->getMaxInputTime();
240
237
241
        $states[ 'Socket timeout' ] = $this->getDefaulSocketTimeout();
238
        $states['Socket timeout'] = $this->getDefaulSocketTimeout();
242
239
243
        $states[ 'Argument separator' ] = $this->getArgumentSpearator();
240
        $states['Argument separator'] = $this->getArgumentSpearator();
244
241
245
        $states[ 'Permissions' ] = $this->getFilePermission();
242
        $states['Permissions'] = $this->getFilePermission();
246
243
247
        $states[ 'Selfcontact' ] = $this->getSelfContact();
244
        $states['Selfcontact'] = $this->getSelfContact();
248
245
249
        $states[ 'Scheduler' ] = $this->getSchedulerOnline( $states[ 'Java' ][ 'status' ] );
246
        $states['Scheduler'] = $this->getSchedulerOnline($states['Java']['status']);
250
247
251
        $states[ 'JobChecker' ] = $this->getJobCheckerOnline();
248
        $states['JobChecker'] = $this->getJobCheckerOnline();
252
249
253
        $dontCache = false;
250
        $dontCache = false;
254
        foreach ( $states as $state ) {
251
        $error=false;
255
            if ( $state[ 'status' ] == 0 ) {
252
        foreach ($states as $state) {
253
            if ($state['status'] == 0) {
256
                $dontCache = true;
254
                $dontCache = true;
255
                $states['status'] = 0;
257
                break;
256
                break;
257
            } else {
258
                $error = true;
258
            }
259
            }
259
        }
260
        }
260
        //$this->set( 'states', $states );
261
        if($error){
261
        Cache::set( array( 'duration' => '1 hour' ) );
262
            $state['Main']['status'] = 1;
262
        if ( !$dontCache ) {
263
            Cache::write( 'stateOfTheSystem', $states );
264
        }
263
        }
264
265
        Cache::set(array('duration' => '1 hour'));
266
        if (!$dontCache) {
267
            Cache::write('stateOfTheSystem', $states);
268
        }
265
        return $states;
269
        return $states;
266
    }
270
    }
267
271
...
...
269
     * Gets the status of jvm
273
     * Gets the status of jvm
270
     */
274
     */
271
    function getJavaStatus() {
275
    function getJavaStatus() {
272
        exec( 'java -version', $java_output, $java_return );
276
        exec('java -version', $java_output, $java_return);
273
        $states[ 'expected' ] = 'Java enabled system';
277
        $states['expected'] = 'Java enabled system';
274
        if ( $this->ignored == 1 ) {
278
        if ($this->ignored == 1) {
275
            $states[ 'status' ] = 'ignored';
279
            $states['status'] = 'ignored';
276
            $states[ 'result' ] = ' (IGNORED!)';
280
            $states['result'] = ' (IGNORED!)';
277
        } elseif ( $java_return ) {
281
        } elseif (!$java_return) {
278
            $states[ 'status' ] = true;
282
            $states['status'] = true;
279
            $states[ 'result' ] = implode( ',', $java_output );
283
            $states['result'] = implode(',', $java_output);
280
        } else {
284
        } else {
281
            $states[ 'status' ] = false;
285
            $states['status'] = false;
282
            $states[ 'result' ] = 'Could not run java';
286
            $states['result'] = 'Could not run java';
283
        }
287
        }
284
        return $states;
288
        return $states;
285
    }
289
    }
286
290
287
    function getPHPstatus() {
291
    function getPHPstatus() {
288
        //PHP
292
        //PHP
289
        exec( 'php --version', $php_output, $php_return );
293
        exec('php --version', $php_output, $php_return);
290
        $states[ 'expected' ] = 'PHP enabled system';
294
        $states['expected'] = 'PHP enabled system';
291
        //$this->ignored = $this->Config->findByName( 'PHP' );
295
        //$this->ignored = $this->Config->findByName( 'PHP' );
292
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
296
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
293
        if ( $this->ignored == 1 ) {
297
        if ($this->ignored == 1) {
294
            $states[ 'status' ] = 'ignored';
298
            $states['status'] = 'ignored';
295
            $states[ 'result' ] = ' (IGNORED!)';
299
            $states['result'] = ' (IGNORED!)';
296
        } elseif ( $php_return == 0 ) {
300
        } elseif ($php_return == 0) {
297
            $states[ 'status' ] = true;
301
            $states['status'] = true;
298
            $states[ 'result' ] = implode( ',', $php_output );
302
            $states['result'] = implode(',', $php_output);
299
        } else {
303
        } else {
300
            $states[ 'status' ] = false;
304
            $states['status'] = false;
301
            $states[ 'result' ] = 'Could not run php try to add it to you ENV. VAR';
305
            $states['result'] = 'Could not run php try to add it to you ENV. VAR';
302
        }
306
        }
303
307
304
        return $states;
308
        return $states;
...
...
307
    function getMagicQuotesStatus() {
311
    function getMagicQuotesStatus() {
308
        //Magic Quotes
312
        //Magic Quotes
309
        $mq_return = get_magic_quotes_gpc();
313
        $mq_return = get_magic_quotes_gpc();
310
        $states[ 'expected' ] = 'Magic qoutes turned off';
314
        $states['expected'] = 'Magic qoutes turned off';
311
        //$this->ignored = $this->Config->findByName( 'Magic Quotes' );
315
        //$this->ignored = $this->Config->findByName( 'Magic Quotes' );
312
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
316
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
313
        if ( $this->ignored == 1 ) {
317
        if ($this->ignored == 1) {
314
            $states[ 'status' ] = 'ignored';
318
            $states['status'] = 'ignored';
315
            $states[ 'result' ] = ' (IGNORED!)';
319
            $states['result'] = ' (IGNORED!)';
316
        } elseif ( $mq_return == 0 ) {
320
        } elseif ($mq_return == 0) {
317
            $states[ 'status' ] = true;
321
            $states['status'] = true;
318
            $states[ 'result' ] = 'Yours is turned off';
322
            $states['result'] = 'Yours is turned off';
319
        } else {
323
        } else {
320
            $states[ 'status' ] = false;
324
            $states['status'] = false;
321
            $states[ 'result' ] = 'Yours is turned on';
325
            $states['result'] = 'Yours is turned on';
322
        }
326
        }
323
        return $states;
327
        return $states;
324
    }
328
    }
325
329
326
    function getMaxExecTime() {
330
    function getMaxExecTime() {
327
        //Max execution time
331
        //Max execution time
328
        $max_exec_time = ini_get( 'max_execution_time' );
332
        $max_exec_time = ini_get('max_execution_time');
329
        $states[ 'expected' ] = 'Max execution time greater than 60000 seconds';
333
        $states['expected'] = 'Max execution time greater than 60000 seconds';
330
        $states[ 'result' ] = "Yours is set to $max_exec_time";
334
        $states['result'] = "Yours is set to $max_exec_time";
331
        //$this->ignored = $this->Config->findByName( 'Max execution time' );
335
        //$this->ignored = $this->Config->findByName( 'Max execution time' );
332
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
336
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
333
        if ( $this->ignored == 1 ) {
337
        if ($this->ignored == 1) {
334
            $states[ 'status' ] = 'ignored';
338
            $states['status'] = 'ignored';
335
            $states[ 'result' ] = ' (IGNORED!)';
339
            $states['result'] = ' (IGNORED!)';
336
        } elseif ( $max_exec_time >= 60000 || $max_exec_time == -1 ) {
340
        } elseif ($max_exec_time >= 60000 || $max_exec_time == -1) {
337
            $states[ 'status' ] = true;
341
            $states['status'] = true;
338
        } else {
342
        } else {
339
            $states[ 'status' ] = false;
343
            $states['status'] = false;
340
        }
344
        }
341
        return $states;
345
        return $states;
342
    }
346
    }
343
347
344
    function getMaxInputTime() {
348
    function getMaxInputTime() {
345
        //Max input time
349
        //Max input time
346
        $max_input_time = ini_get( 'max_input_time' );
350
        $max_input_time = ini_get('max_input_time');
347
        $states[ 'expected' ] = 'Max input time greater than 60000 seconds';
351
        $states['expected'] = 'Max input time greater than 60000 seconds';
348
        $states[ 'result' ] = "Yours is set to $max_input_time";
352
        $states['result'] = "Yours is set to $max_input_time";
349
        //$this->ignored = $this->Config->findByName( 'Max input time' );
353
        //$this->ignored = $this->Config->findByName( 'Max input time' );
350
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
354
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
351
        if ( $this->ignored == 1 ) {
355
        if ($this->ignored == 1) {
352
            $states[ 'status' ] = 'ignored';
356
            $states['status'] = 'ignored';
353
            $states[ 'result' ] = ' (IGNORED!)';
357
            $states['result'] = ' (IGNORED!)';
354
        } elseif ( $max_input_time >= 60000 || $max_input_time == -1 ) {
358
        } elseif ($max_input_time >= 60000 || $max_input_time == -1) {
355
            $states[ 'status' ] = true;
359
            $states['status'] = true;
356
        } else {
360
        } else {
357
            $states[ 'status' ] = false;
361
            $states['status'] = false;
358
        }
362
        }
359
        return $states;
363
        return $states;
360
    }
364
    }
...
...
362
    function getDefaulSocketTimeout() {
366
    function getDefaulSocketTimeout() {
363
        //Default socket timeout
367
        //Default socket timeout
364
        $errors = null;
368
        $errors = null;
365
        $socket_timeout = ini_get( 'default_socket_timeout' );
369
        $socket_timeout = ini_get('default_socket_timeout');
366
        if ( $socket_timeout < 60 ) {
370
        if ($socket_timeout < 60) {
367
            $errors = 'Timeout is ' . $socket_timeout;
371
            $errors = 'Timeout is ' . $socket_timeout;
368
        }
372
        }
369
        $states[ 'expected' ] = 'Default socket timeout is >= 60 sec.';
373
        $states['expected'] = 'Default socket timeout is >= 60 sec.';
370
        $states[ 'result' ] = "Yours is set to " . (empty( $errors ) ? $socket_timeout . ' secs.' : '<b>< 60 sec.</b>. Please change this in your php.ini file');
374
        $states['result'] = "Yours is set to " . (empty($errors) ? $socket_timeout . ' secs.' : '<b>< 60 sec.</b>. Please change this in your php.ini file');
371
        //$this->ignored = $this->Config->findByName( 'Socket timeout' );
375
        //$this->ignored = $this->Config->findByName( 'Socket timeout' );
372
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
376
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
373
        if ( $this->ignored == 1 ) {
377
        if ($this->ignored == 1) {
374
            $states[ 'status' ] = 'ignored';
378
            $states['status'] = 'ignored';
375
            $states[ 'result' ] = ' (IGNORED!)';
379
            $states['result'] = ' (IGNORED!)';
376
        } elseif ( empty( $errors ) ) {
380
        } elseif (empty($errors)) {
377
            $states[ 'status' ] = true;
381
            $states['status'] = true;
378
        } else {
382
        } else {
379
            $states[ 'status' ] = false;
383
            $states['status'] = false;
380
        }
384
        }
381
        return $states;
385
        return $states;
382
    }
386
    }
...
...
384
    function getArgumentSpearator() {
388
    function getArgumentSpearator() {
385
        //Argument seperator
389
        //Argument seperator
386
        $errors = null;
390
        $errors = null;
387
        $arg_separator = ini_get( 'arg_separator.output' );
391
        $arg_separator = ini_get('arg_separator.output');
388
        if ( $arg_separator != '&' ) {
392
        if ($arg_separator != '&') {
389
            $errors = 'Argument seperator is ' . $arg_separator;
393
            $errors = 'Argument seperator is ' . $arg_separator;
390
        }
394
        }
391
        $states[ 'expected' ] = 'Argument seperator equals \'&\'.';
395
        $states['expected'] = 'Argument seperator equals \'&\'.';
392
        $states[ 'result' ] = "Argument seperator is " . (empty( $errors ) ? " $arg_separator." : '<b>' . htmlspecialchars( $arg_separator ) . '</b>. Please change this in your php.ini file. This is normally done by outcommenting the line >>arg_separator.output = "' . htmlspecialchars( "&amp;" ) . '<<');
396
        $states['result'] = "Argument seperator is " . (empty($errors) ? " $arg_separator." : '<b>' . htmlspecialchars($arg_separator) . '</b>. Please change this in your php.ini file. This is normally done by outcommenting the line >>arg_separator.output = "' . htmlspecialchars("&amp;") . '<<');
393
        //$this->ignored = $this->Config->findByName( 'Argument separator' );
397
        //$this->ignored = $this->Config->findByName( 'Argument separator' );
394
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
398
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
395
        if ( $this->ignored == 1 ) {
399
        if ($this->ignored == 1) {
396
            $states[ 'status' ] = 'ignored';
400
            $states['status'] = 'ignored';
397
            $states[ 'result' ] = ' (IGNORED!)';
401
            $states['result'] = ' (IGNORED!)';
398
        } elseif ( empty( $errors ) ) {
402
        } elseif (empty($errors)) {
399
            $states[ 'status' ] = true;
403
            $states['status'] = true;
400
        } else {
404
        } else {
401
            $states[ 'status' ] = false;
405
            $states['status'] = false;
402
        }
406
        }
403
        return $states;
407
        return $states;
404
    }
408
    }
405
409
406
    function getFilePermission() {
410
    function getFilePermission() {
407
        //File permissions
411
        //File permissions
408
        $dirs = array_merge( $this->directoryToArray( substr_replace( TMP, "", -1 ), true ), $this->directoryToArray( WWW_ROOT . "testscripts", true ) );
412
        $dirs = array_merge($this->directoryToArray(substr_replace(TMP, "", -1), true), $this->directoryToArray(WWW_ROOT . "testscripts", true));
409
        $states[ 'expected' ] = 'All directories writeable';
413
        $states['expected'] = 'All directories writeable';
410
        $states[ 'status' ] = true;
414
        $states['status'] = true;
411
        $states[ 'result' ] = '';
415
        $states['result'] = '';
412
//        $this->ignored = $this->Config->findByName( 'Permissions' );
416
//        $this->ignored = $this->Config->findByName( 'Permissions' );
413
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
417
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
414
        foreach ( $dirs as $dir ) {
418
        foreach ($dirs as $dir) {
415
            if ( !is_writeable( $dir ) ) {
419
            if (!is_writeable($dir)) {
416
                $states[ 'result' ] .= "<b>$dir is NOT writeable</b><br />";
420
                $states['result'] .= "<b>$dir is NOT writeable</b><br />";
417
                $states[ 'status' ] = false;
421
                $states['status'] = false;
418
            } else {
422
            } else {
419
                $states[ 'result' ] .= "$dir is writeable<br />";
423
                $states['result'] .= "$dir is writeable<br />";
420
            }
424
            }
421
        }
425
        }
422
        if ( $this->ignored == true ) {
426
        if ($this->ignored == true) {
423
            $states[ 'status' ] = 'ignored';
427
            $states['status'] = 'ignored';
424
            $states[ 'result' ] = ' (IGNORED!)';
428
            $states['result'] = ' (IGNORED!)';
425
        }
429
        }
426
        return $states;
430
        return $states;
427
    }
431
    }
...
...
429
    function getSelfContact() {
433
    function getSelfContact() {
430
        //Server can find itself
434
        //Server can find itself
431
        $success = true;
435
        $success = true;
432
        $servername = $this->Session->read( '_servername_' );
436
        $servername = $this->Session->read('_servername_');
433
        $port = $this->Session->read( '_serverport_' );
437
        $port = $this->Session->read('_serverport_');
434
        $states[ 'expected' ] = 'The server could contact itself at the servername and port specified';
438
        $states['expected'] = 'The server could contact itself at the servername and port specified';
435
439
436
//        App::import( 'Helper', 'Html' );
440
//        App::import( 'Helper', 'Html' );
437
//        $this->html = new HtmlHelper();
441
//        $this->html = new HtmlHelper();
438
        $states[ 'result' ] = "Bromine tried to contact http://$servername:$port/configs/iamhere and " . ($success ? '<b>succeded.</b>' : '<b>failed. Please ' . $this->html->link( 'correct it', array( 'controller' => 'configs', 'action' => 'server' ) ) . '</b>');
442
        $states['result'] = "Bromine tried to contact http://$servername:$port/configs/iamhere and " . ($success ? '<b>succeded.</b>' : '<b>failed. Please ' . $this->html->link('correct it', array('controller' => 'configs', 'action' => 'server')) . '</b>');
439
//        $this->ignored = $this->Config->findByName( 'Selfcontact' );
443
//        $this->ignored = $this->Config->findByName( 'Selfcontact' );
440
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
444
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
441
        if ( $this->ignored == 1 ) {
445
        if ($this->ignored == 1) {
442
            $states[ 'status' ] = 'ignored';
446
            $states['status'] = 'ignored';
443
            $states[ 'result' ] = ' (IGNORED!)';
447
            $states['result'] = ' (IGNORED!)';
444
        } elseif ( $success ) {
448
        } elseif ($success) {
445
            $states[ 'status' ] = true;
449
            $states['status'] = true;
446
        } else {
450
        } else {
447
            $states[ 'status' ] = false;
451
            $states['status'] = false;
448
        }
452
        }
449
        return $states;
453
        return $states;
450
    }
454
    }
451
455
452
    function getSchedulerOnline( $java ) {
456
    function getSchedulerOnline($java) {
453
        //Scheduler online
457
        //Scheduler online
454
        $states[ 'errors' ] = null;
458
        $states['errors'] = null;
455
        $states[ 'expected' ] = 'Scheduler is online';
459
        $states['expected'] = 'Scheduler is online';
456
        $states[ 'status' ] = false;
460
        $states['status'] = false;
457
        $states[ 'result' ] = "Java is required to run the scheduler.";
461
        $states['result'] = "Java is required to run the scheduler.";
458
462
459
        if ( $java === true ) {
463
        if ($java === true) {
460
            $states[ 'errors' ] = $this->getSchedulerStatus();
464
            $states['errors'] = $this->getSchedulerStatus();
461
            $states[ 'expected' ] = 'Scheduler is online';
465
            $states['expected'] = 'Scheduler is online';
462
            App::import( 'Helper', 'Html' );
466
            App::import('Helper', 'Html');
463
            $this->html = new HtmlHelper();
467
            $this->html = new HtmlHelper();
464
            $states[ 'result' ] = "Scheduler is " . (empty( $states[ 'Scheduler' ][ 'errors' ] ) ? 'online' : '<b>OFFLINE</b>. Please ' . $this->html->link( 'correct it', array( 'controller' => 'qrtz_job_details', 'action' => 'index' ) ));
468
            $states['result'] = "Scheduler is " . (empty($states['Scheduler']['errors']) ? 'online' : '<b>OFFLINE</b>. Please ' . $this->html->link('correct it', array('controller' => 'qrtz_job_details', 'action' => 'index')));
465
//            $this->ignored = $this->Config->findByName( 'Scheduler' );
469
//            $this->ignored = $this->Config->findByName( 'Scheduler' );
466
//            $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
470
//            $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
467
471
468
            if ( $this->ignored == 1 ) {
472
            if ($this->ignored == 1) {
469
                $states[ 'status' ] = 'ignored';
473
                $states['status'] = 'ignored';
470
                $states[ 'result' ] = ' (IGNORED!)';
474
                $states['result'] = ' (IGNORED!)';
471
            } elseif ( empty( $states[ 'Scheduler' ][ 'errors' ] ) ) {
475
            } elseif (empty($states['Scheduler']['errors'])) {
472
                $states[ 'status' ] = true;
476
                $states['status'] = true;
473
            } else {
477
            } else {
474
                $states[ 'status' ] = false;
478
                $states['status'] = false;
475
            }
479
            }
476
        } elseif ( $java === false ) {
480
        } elseif ($java === false) {
477
            $states[ 'status' ] = false;
481
            $states['status'] = false;
478
            $states[ 'result' ] = "Java is required to run the scheduler.";
482
            $states['result'] = "Java is required to run the scheduler.";
479
        } else {
483
        } else {
480
            $states[ 'status' ] = 'ignored';
484
            $states['status'] = 'ignored';
481
            $states[ 'result' ] = "Could not determine if the scheduler is running.";
485
            $states['result'] = "Could not determine if the scheduler is running.";
482
        }
486
        }
483
        return $states;
487
        return $states;
484
    }
488
    }
485
489
486
    function getJobCheckerOnline() {
490
    function getJobCheckerOnline() {
487
        //JobChecker job present
491
        //JobChecker job present
488
        App::import( 'Model', 'QrtzJobDetail' );
492
        App::import('Model', 'QrtzJobDetail');
489
        $this->QrtzJobDetail = new QrtzJobDetail();
493
        $this->QrtzJobDetail = new QrtzJobDetail();
490
        $job_name = $this->QrtzJobDetail->field( 'JOB_NAME', array( 'JOB_NAME' => 'JobsChecker' ) );
494
        $job_name = $this->QrtzJobDetail->field('JOB_NAME', array('JOB_NAME' => 'JobsChecker'));
491
        $success = empty( $job_name ) ? false : true;
495
        $success = empty($job_name) ? false : true;
492
        $states[ 'expected' ] = 'The scheduler has a JobsChecker job';
496
        $states['expected'] = 'The scheduler has a JobsChecker job';
493
//        App::import( 'Helper', 'Html' );
497
//        App::import( 'Helper', 'Html' );
494
//        $this->html = new HtmlHelper();
498
//        $this->html = new HtmlHelper();
495
        $states[ 'result' ] = "JobsChecker job is " . ($success ? '<b>present.</b>' : '<b>NOT present. Please ' . $this->html->link( 'correct it', array( 'controller' => 'qrtz_job_details', 'action' => 'index' ) ) . '</b>');
499
        $states['result'] = "JobsChecker job is " . ($success ? '<b>present.</b>' : '<b>NOT present. Please ' . $this->html->link('correct it', array('controller' => 'qrtz_job_details', 'action' => 'index')) . '</b>');
496
//        $this->ignored = $this->Config->findByName( 'JobChecker' );
500
//        $this->ignored = $this->Config->findByName( 'JobChecker' );
497
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
501
//        $this->ignored = $this->ignored[ 'Config' ][ 'value' ];
498
        if ( $this->ignored == 1 ) {
502
        if ($this->ignored == 1) {
499
            $states[ 'status' ] = 'ignored';
503
            $states['status'] = 'ignored';
500
            $states[ 'result' ] = ' (IGNORED!)';
504
            $states['result'] = ' (IGNORED!)';
501
        } elseif ( $success ) {
505
        } elseif ($success) {
502
            $states[ 'status' ] = true;
506
            $states['status'] = true;
503
        } else {
507
        } else {
504
            $states[ 'status' ] = false;
508
            $states['status'] = false;
505
        }
509
        }
506
        return $states;
510
        return $states;
507
    }
511
    }
508
512
509
    function getSchedulerStatus() {
513
    function getSchedulerStatus() {
510
        $dir = realpath( APP . '..' . DS . 'scheduler' );
514
        $dir = realpath(APP . '..' . DS . 'scheduler');
511
        chdir( $dir );
515
        chdir($dir);
512
        $exec = 'java -jar BromineSchedulerClient.jar ';
516
        $exec = 'java -jar BromineSchedulerClient.jar ';
513
        exec( $exec, $error );
517
        exec($exec, $error);
514
        return $error;
518
        return $error;
515
    }
519
    }
516
520
517
    private function directoryToArray( $directory, $recursive ) {
521
    private function directoryToArray($directory, $recursive) {
518
        $array_items = array( );
522
        $array_items = array();
519
        if ( $handle = opendir( $directory ) ) {
523
        if ($handle = opendir($directory)) {
520
            while ( false !== ($file = readdir( $handle )) ) {
524
            while (false !== ($file = readdir($handle))) {
521
                if ( $file != "." && $file != ".." && $file != '.svn' ) {
525
                if ($file != "." && $file != ".." && $file != '.svn') {
522
                    if ( is_dir( $directory . DS . $file ) ) {
526
                    if (is_dir($directory . DS . $file)) {
523
                        if ( $recursive ) {
527
                        if ($recursive) {
524
                            $array_items = array_merge( $array_items, $this->directoryToArray( $directory . DS . $file, $recursive ) );
528
                            $array_items = array_merge($array_items, $this->directoryToArray($directory . DS . $file, $recursive));
525
                        }
529
                        }
526
                        $file = $directory . DS . $file;
530
                        $file = $directory . DS . $file;
527
                        $array_items[ ] = preg_replace( "/\/\//si", DS, $file );
531
                        $array_items[] = preg_replace("/\/\//si", DS, $file);
528
                    } else {
532
                    } else {
529
                        //$file = $directory . "/" . $file;
533
                        //$file = $directory . "/" . $file;
530
                        //$array_items[] = preg_replace("/\/\//si", "/", $file);
534
                        //$array_items[] = preg_replace("/\/\//si", "/", $file);
531
                    }
535
                    }
532
                }
536
                }
533
            }
537
            }
534
            closedir( $handle );
538
            closedir($handle);
535
        }
539
        }
536
        return $array_items;
540
        return $array_items;
537
    }
541
    }

Updated branches/bromine3_rc4/app/controllers/configs_controller.php Download diff

1314
318
        $this->set('states', $this->Checker->getStateOfTheSystem());
318
        $this->set('states', $this->Checker->getStateOfTheSystem());
319
    }
319
    }
320
320
321
322
    function selfcontact() {
321
    function selfcontact() {
323
        $status = Cache::read('selfcontact');
322
        $status = Cache::read('selfcontact');
324
        if ($status !== false) return $status;
323
        if ($status !== false) return $status;
325
324
326
        $servername = $this->Config->field('value', array('name' => 'servername'));
325
        $servername = $this->Config->field('value', array('name' => 'servername'));
327
        $port = $this->Config->field('value', array('name'=> 'port'));
326
        $port = $this->Config->field('value', array('name'=> 'port'));
328
        $subfolder = $this->Config->field('value', array('name'=> 'subfolder'));
329
        if(!empty($servername) && !empty($port)) {
327
        if(!empty($servername) && !empty($port)) {
330
            App::import('Core', 'HttpSocket');
328
            App::import('Core', 'HttpSocket');
331
            $HttpSocket = new HttpSocket(array('timeout' => 10));
329
            $HttpSocket = new HttpSocket(array('timeout' => 10));
332
            $result = $HttpSocket->get("http://$servername:$port/$subfolder/configs/iamhere");
330
            $result = $HttpSocket->get("http://$servername:$port/configs/iamhere");
333
            if($result == 'success') {
331
            if($result == 'success') {
334
                Cache::write('selfcontact', true);
332
                Cache::write('selfcontact', true);
335
                return true;
333
                return true;
...
...
394
392
395
393
396
}
394
}
395
?>

Updated branches/bromine3_rc4/app/controllers/projects_controller.php Download diff

1314
24
class ProjectsController extends AppController {
24
class ProjectsController extends AppController {
25
25
26
    public $name = 'Projects';
26
    public $name = 'Projects';
27
    public $helpers = array( 'Html', 'Form', 'Cache', 'Xml' );
27
    public $helpers = array('Html', 'Form', 'Cache', 'Xml');
28
    public $main_menu_id = -2;
28
    public $main_menu_id = -2;
29
    public $components = array( 'Googlechart', 'Script', 'Checker' );
29
    public $components = array('Googlechart', 'Script', 'Checker');
30
30
31
    //var $cacheAction = array('testlabsview' => "1 day");
31
    //var $cacheAction = array('testlabsview' => "1 day");
32
32
33
    function index() {
33
    function index() {
34
        $this->Project->recursive = 2;
34
        $this->Project->recursive = 2;
35
        $this->set( 'projects', $this->paginate() );
35
        $this->set('projects', $this->paginate());
36
    }
36
    }
37
37
38
    function run() {
38
    function run() {
39
        $return = @$this->passedArgs[ 'return' ];
39
        $return = @$this->passedArgs['return'];
40
        $return == '' ? $return = 'none' : '';
40
        $return == '' ? $return = 'none' : '';
41
        $project_id = @$this->passedArgs[ 'project' ];
41
        $project_id = @$this->passedArgs['project'];
42
        // check if viewer exists
42
        // check if viewer exists
43
        if ( !file_exists( VIEWS . 'projects\\' . $return . '.ctp' ) ) {
43
        if (!file_exists(VIEWS . 'projects\\' . $return . '.ctp')) {
44
            exit( "<b>'$return'</b> return type does not have a corresponding viewer. Create $return.ctp in <b>" . VIEWS . 'projects\\' . '</b> folder' );
44
            exit("<b>'$return'</b> return type does not have a corresponding viewer. Create $return.ctp in <b>" . VIEWS . 'projects\\' . '</b> folder');
45
        }
45
        }
46
        //$this->render($return);
46
        //$this->render($return);
47
        if ( empty( $this->passedArgs[ 'project' ] ) || empty( $this->passedArgs[ 'site_id' ] ) ) {
47
        if (empty($this->passedArgs['project']) || empty($this->passedArgs['site_id'])) {
48
            echo('project and site_id parameters must be set');
48
            echo('project and site_id parameters must be set');
49
        }
49
        }
50
        // Stuff needed to ensure no debug text
50
        // Stuff needed to ensure no debug text
51
        session_write_close();
51
        session_write_close();
52
        Configure::write( 'debug', 0 );
52
        Configure::write('debug', 0);
53
53
54
        $this->layout = null;
54
        $this->layout = null;
55
        $this->loadModel( 'Job' );
55
        $this->loadModel('Job');
56
        $this->loadModel( 'Node' );
56
        $this->loadModel('Node');
57
57
58
        // get all requirements
58
        // get all requirements
59
        $requirements = $this->Project->Requirement->find( 'all', array(
59
        $requirements = $this->Project->Requirement->find('all', array(
60
                    'conditions' => array(
60
                    'conditions' => array(
61
                        'project_id' => $project_id
61
                        'project_id' => $project_id
62
                    )
62
                    )
63
                ) );
63
                        ));
64
64
65
        // Setup suite
65
        // Setup suite
66
        $suite_id = $this->requestAction( 'runrctests/setupSuite/0' );
66
        $suite_id = $this->requestAction('runrctests/setupSuite/0');
67
        // Runs each requirement      
67
        // Runs each requirement      
68
        foreach ( $requirements as $requirement ) {
68
        foreach ($requirements as $requirement) {
69
            //echo $requirement['Requirement']['id'] . "<br />";
69
            //echo $requirement['Requirement']['id'] . "<br />";
70
            $this->requestAction( 'runrctests/runRequirement/' . $requirement[ 'Requirement' ][ 'id' ] . '/' . $suite_id );
70
            $this->requestAction('runrctests/runRequirement/' . $requirement['Requirement']['id'] . '/' . $suite_id);
71
        }
71
        }
72
        // Find all job
72
        // Find all job
73
        $jobs = $this->Job->find( 'all', array( 'conditions' => array( 'suite_id' => $suite_id ) ) );
73
        $jobs = $this->Job->find('all', array('conditions' => array('suite_id' => $suite_id)));
74
        // Wait until the is no jobs with $suite_id and there is no running tests
74
        // Wait until the is no jobs with $suite_id and there is no running tests
75
        while ( !empty( $jobs ) || !empty( $running_tests ) ) {
75
        while (!empty($jobs) || !empty($running_tests)) {
76
            $jobs = $this->Job->find( 'all', array( 'conditions' => array( 'suite_id' => $suite_id ) ) );
76
            $jobs = $this->Job->find('all', array('conditions' => array('suite_id' => $suite_id)));
77
            $running_tests = $this->Node->find( 'list', array(
77
            $running_tests = $this->Node->find('list', array(
78
                        'contain' => array(
78
                        'contain' => array(
79
                            'Test' => array(
79
                            'Test' => array(
80
                                'conditions' => array(
80
                                'conditions' => array(
...
...
85
                        'fields' => array(
85
                        'fields' => array(
86
                            'Node.test_id'
86
                            'Node.test_id'
87
                        )
87
                        )
88
                    ) );
88
                            ));
89
            // Remove all empty tests
89
            // Remove all empty tests
90
            $running_tests = array_filter( $running_tests );
90
            $running_tests = array_filter($running_tests);
91
            sleep( 10 );
91
            sleep(10);
92
        }
92
        }
93
        //Get data for the viewer
93
        //Get data for the viewer
94
        $suite = $this->Project->Suite->find( 'first', array(
94
        $suite = $this->Project->Suite->find('first', array(
95
                    'contain' => array(
95
                    'contain' => array(
96
                        'Test' => array(
96
                        'Test' => array(
97
                            'Command',
97
                            'Command',
...
...
106
                    'conditions' => array(
106
                    'conditions' => array(
107
                        'Suite.id' => $suite_id
107
                        'Suite.id' => $suite_id
108
                    )
108
                    )
109
                ) );
109
                        ));
110
        //Set the data for the viewer
110
        //Set the data for the viewer
111
        $this->set( 'suite', $suite );
111
        $this->set('suite', $suite);
112
        //Use the viewer as requested
112
        //Use the viewer as requested
113
        $this->render( $return );
113
        $this->render($return);
114
    }
114
    }
115
115
116
    function view( $id = null ) {
116
    function view($id = null) {
117
        if ( !$id ) {
117
        if (!$id) {
118
            $this->Session->setFlash( __( 'Invalid Project.', true ) );
118
            $this->Session->setFlash(__('Invalid Project.', true));
119
            $this->redirect( array( 'action' => 'index' ) );
119
            $this->redirect(array('action' => 'index'));
120
        }
120
        }
121
        $this->Project->recursive = 1;
121
        $this->Project->recursive = 1;
122
        $project = $this->Project->find( 'first', array(
122
        $project = $this->Project->find('first', array(
123
                    'conditions' => array(
123
                    'conditions' => array(
124
                        'Project.id' => $id
124
                        'Project.id' => $id
125
                    ),
125
                    ),
...
...
129
                        ),
129
                        ),
130
                        'Site'
130
                        'Site'
131
                    )
131
                    )
132
                ) );
132
                        ));
133
        $this->set( 'project', $project );
133
        $this->set('project', $project);
134
    }
134
    }
135
135
136
    function add() {
136
    function add() {
137
        if ( !empty( $this->data ) ) {
137
        if (!empty($this->data)) {
138
            $this->Project->create();
138
            $this->Project->create();
139
            if ( $this->Project->save( $this->data ) ) {
139
            if ($this->Project->save($this->data)) {
140
                if ( !empty( $this->data[ 'Newsites' ] ) ) {
140
                if (!empty($this->data['Newsites'])) {
141
                    foreach ( $this->data[ 'Newsites' ] as $newsite ) {
141
                    foreach ($this->data['Newsites'] as $newsite) {
142
                        $this->Project->Site->create();
142
                        $this->Project->Site->create();
143
                        $this->Project->Site->save( array( 'Site' => array( 'name' => $newsite, 'project_id' => $this->Project->id ) ) );
143
                        $this->Project->Site->save(array('Site' => array('name' => $newsite, 'project_id' => $this->Project->id)));
144
                    }
144
                    }
145
                }
145
                }
146
146
147
                $project_path = WWW_ROOT . DS . 'testscripts' . DS . $this->data[ 'Project' ][ 'name' ];
147
                $project_path = WWW_ROOT . DS . 'testscripts' . DS . $this->data['Project']['name'];
148
                mkdir( $project_path );
148
                mkdir($project_path);
149
                mkdir( $project_path . DS . 'php' );
149
                mkdir($project_path . DS . 'php');
150
                mkdir( $project_path . DS . 'jar' );
150
                mkdir($project_path . DS . 'jar');
151
                mkdir( $project_path . DS . 'jar' . DS . 'lib' );
151
                mkdir($project_path . DS . 'jar' . DS . 'lib');
152
                $libs_path = $project_path . DS . 'jar' . DS . 'lib';
152
                $libs_path = $project_path . DS . 'jar' . DS . 'lib';
153
153
154
                if ( $this->data[ 'Project' ][ 'copyjava' ] ) {
154
                if ($this->data['Project']['copyjava']) {
155
                    $path = WWW_ROOT . 'javalibs';
155
                    $path = WWW_ROOT . 'javalibs';
156
                    if ( $handle = opendir( $path ) ) {
156
                    if ($handle = opendir($path)) {
157
                        while ( false !== ($file = readdir( $handle )) ) {
157
                        while (false !== ($file = readdir($handle))) {
158
                            if ( $file != "." && $file != ".." && $file != '.svn' ) {
158
                            if ($file != "." && $file != ".." && $file != '.svn') {
159
                                //echo "$file\n";
159
                                //echo "$file\n";
160
                                $from = $path . DS . $file;
160
                                $from = $path . DS . $file;
161
                                $to = $libs_path . DS . $file;
161
                                $to = $libs_path . DS . $file;
162
                                copy( $from, $to );
162
                                copy($from, $to);
163
                            }
163
                            }
164
                        }
164
                        }
165
                        closedir( $handle );
165
                        closedir($handle);
166
                    }
166
                    }
167
                }
167
                }
168
168
169
                $this->Session->setFlash( __( 'The Project has been saved', true ) );
169
                $this->Session->setFlash(__('The Project has been saved', true));
170
                $this->redirect( array( 'action' => 'index' ) );
170
                $this->redirect(array('action' => 'index'));
171
            } else {
171
            } else {
172
                $this->Session->setFlash( __( 'The Project could not be saved. Please, try again.', true ), true, array( 'class' => 'error_message' ) );
172
                $this->Session->setFlash(__('The Project could not be saved. Please, try again.', true), true, array('class' => 'error_message'));
173
            }
173
            }
174
        }
174
        }
175
        $users = $this->Project->User->find( 'list' );
175
        $users = $this->Project->User->find('list');
176
        $this->set( compact( 'users' ) );
176
        $this->set(compact('users'));
177
    }
177
    }
178
178
179
    function edit( $id = null ) {
179
    function edit($id = null) {
180
        if ( !$id && empty( $this->data ) ) {
180
        if (!$id && empty($this->data)) {
181
            $this->Session->setFlash( __( 'Invalid Project', true ) );
181
            $this->Session->setFlash(__('Invalid Project', true));
182
            $this->redirect( array( 'action' => 'index' ) );
182
            $this->redirect(array('action' => 'index'));
183
        }
183
        }
184
        if ( !empty( $this->data ) ) {
184
        if (!empty($this->data)) {
185
            $old = $this->Project->findById( $id );
185
            $old = $this->Project->findById($id);
186
            $oldName = $old[ 'Project' ][ 'name' ];
186
            $oldName = $old['Project']['name'];
187
            $newName = $this->data[ 'Project' ][ 'name' ];
187
            $newName = $this->data['Project']['name'];
188
            $project_path = WWW_ROOT . 'testscripts' . DS;
188
            $project_path = WWW_ROOT . 'testscripts' . DS;
189
            if ( @rename( $project_path . $oldName, $project_path . $newName ) ) {
189
            if (@rename($project_path . $oldName, $project_path . $newName)) {
190
                if ( $this->Project->save( $this->data ) ) {
190
                if ($this->Project->save($this->data)) {
191
                    if ( !empty( $this->data[ 'Sites' ] ) ) {
191
                    if (!empty($this->data['Sites'])) {
192
                        foreach ( $this->data[ 'Sites' ] as $id => $site ) {
192
                        foreach ($this->data['Sites'] as $id => $site) {
193
                            $this->Project->Site->create();
193
                            $this->Project->Site->create();
194
                            $this->Project->Site->save( array( 'Site' => array( 'id' => $id, 'name' => $site ) ) );
194
                            $this->Project->Site->save(array('Site' => array('id' => $id, 'name' => $site)));
195
                        }
195
                        }
196
                    }
196
                    }
197
                    if ( !empty( $this->data[ 'Newsites' ] ) ) {
197
                    if (!empty($this->data['Newsites'])) {
198
                        foreach ( $this->data[ 'Newsites' ] as $newsite ) {
198
                        foreach ($this->data['Newsites'] as $newsite) {
199
                            $this->Project->Site->create();
199
                            $this->Project->Site->create();
200
                            $this->Project->Site->save( array( 'Site' => array( 'name' => $newsite, 'project_id' => $this->data[ 'Project' ][ 'id' ] ) ) );
200
                            $this->Project->Site->save(array('Site' => array('name' => $newsite, 'project_id' => $this->data['Project']['id'])));
201
                        }
201
                        }
202
                    }
202
                    }
203
                    $this->Session->setFlash( __( 'The Project has been saved', true ) );
203
                    $this->Session->setFlash(__('The Project has been saved', true));
204
                    $this->redirect( array( 'action' => 'index' ) );
204
                    $this->redirect(array('action' => 'index'));
205
                } else {
205
                } else {
206
                    $this->Session->setFlash( __( 'The Project could not be saved. Please, try again.', true ), true, array( 'class' => 'error_message' ) );
206
                    $this->Session->setFlash(__('The Project could not be saved. Please, try again.', true), true, array('class' => 'error_message'));
207
                }
207
                }
208
            } else {
208
            } else {
209
                $this->Session->setFlash( 'Could not rename ' . $project_path . $oldName . ' to ' . $project_path . $newName . '. Please, try again.', true, array( 'class' => 'error_message' ) );
209
                $this->Session->setFlash('Could not rename ' . $project_path . $oldName . ' to ' . $project_path . $newName . '. Please, try again.', true, array('class' => 'error_message'));
210
            }
210
            }
211
        }
211
        }
212
212
213
        $this->Project->recursive = 1;
213
        $this->Project->recursive = 1;
214
214
215
        $this->data = $this->Project->find( 'first', array(
215
        $this->data = $this->Project->find('first', array(
216
                    'conditions' => array(
216
                    'conditions' => array(
217
                        'Project.id' => $id
217
                        'Project.id' => $id
218
                    ),
218
                    ),
...
...
222
                        ),
222
                        ),
223
                        'Site'
223
                        'Site'
224
                    )
224
                    )
225
                ) );
225
                        ));
226
226
227
        $users = $this->Project->User->find( 'list' );
227
        $users = $this->Project->User->find('list');
228
        $this->set( compact( 'users' ) );
228
        $this->set(compact('users'));
229
    }
229
    }
230
230
231
    function statistics( $send_data = false ) {
231
    function statistics($send_data = false) {
232
232
233
        //Configure::write('debug', 0);
233
        //Configure::write('debug', 0);
234
        $this->loadModel( 'Type' );
234
        $this->loadModel('Type');
235
        $this->Type->recursive = 0;
235
        $this->Type->recursive = 0;
236
        $types = $this->Type->find( 'all' );
236
        $types = $this->Type->find('all');
237
237
238
        $this->Project->recursive = 0;
238
        $this->Project->recursive = 0;
239
        $projects = $this->Project->find( 'all' );
239
        $projects = $this->Project->find('all');
240
        $result = array( );
240
        $result = array();
241
        foreach ( $projects as $project ) {
241
        foreach ($projects as $project) {
242
            $project_name = $project[ 'Project' ][ 'name' ];
242
            $project_name = $project['Project']['name'];
243
            foreach ( $types as $type ) {
243
            foreach ($types as $type) {
244
                $type_name = $type[ 'Type' ][ 'extension' ];
244
                $type_name = $type['Type']['extension'];
245
                $path = WWW_ROOT . 'testscripts' . DS . $project_name . DS . $type_name . DS;
245
                $path = WWW_ROOT . 'testscripts' . DS . $project_name . DS . $type_name . DS;
246
                if ( is_dir( $path ) ) {
246
                if (is_dir($path)) {
247
                    $dir = scandir( $path );
247
                    $dir = scandir($path);
248
                    foreach ( $dir as $file ) {
248
                    foreach ($dir as $file) {
249
                        if ( is_file( $path . $file ) ) {
249
                        if (is_file($path . $file)) {
250
                            $ext = substr( $file, strrpos( $file, '.' ) + 1 );
250
                            $ext = substr($file, strrpos($file, '.') + 1);
251
                            if ( isset( $result[ $ext ] ) ) {
251
                            if (isset($result[$ext])) {
252
                                $result[ $ext ]++;
252
                                $result[$ext]++;
253
                            } else {
253
                            } else {
254
                                $result[ $ext ] = 1;
254
                                $result[$ext] = 1;
255
                            }
255
                            }
256
                        }
256
                        }
257
                    }
257
                    }
...
...
260
        }
260
        }
261
261
262
262
263
        $this->loadModel( 'Config' );
263
        $this->loadModel('Config');
264
264
265
        //Create unique bromine key
265
        //Create unique bromine key
266
        $key = $this->Config->findByName( 'brkey' );
266
        $key = $this->Config->findByName('brkey');
267
        if ( empty( $key ) ) {
267
        if (empty($key)) {
268
            $data[ 'Config' ] = array( 'name' => 'brkey', 'value' => md5( microtime() . rand( 0, 1000000 ) ) );
268
            $data['Config'] = array('name' => 'brkey', 'value' => md5(microtime() . rand(0, 1000000)));
269
            $this->Config->save( $data );
269
            $this->Config->save($data);
270
            $this->Config->create();
270
            $this->Config->create();
271
            $data[ 'Config' ] = array( 'name' => 'last_statistics', 'value' => 0 );
271
            $data['Config'] = array('name' => 'last_statistics', 'value' => 0);
272
            $this->Config->save( $data );
272
            $this->Config->save($data);
273
            $key = $this->Config->findByName( 'brkey' );
273
            $key = $this->Config->findByName('brkey');
274
        }
274
        }
275
        $key = $key[ 'Config' ][ 'value' ];
275
        $key = $key['Config']['value'];
276
276
277
        $enableGA = $this->Config->findByName( 'enableGA' );
277
        $enableGA = $this->Config->findByName('enableGA');
278
        $enableGA = $enableGA[ 'Config' ][ 'value' ];
278
        $enableGA = $enableGA['Config']['value'];
279
279
280
        $last_statistics = $this->Config->findByName( 'last_statistics' );
280
        $last_statistics = $this->Config->findByName('last_statistics');
281
        $last_statistics = $last_statistics[ 'Config' ][ 'value' ];
281
        $last_statistics = $last_statistics['Config']['value'];
282
        if ( ($enableGA == 1 && $last_statistics < strtotime( '-1 week' )) || $send_data == false ) {
282
        if (($enableGA == 1 && $last_statistics < strtotime('-1 week')) || $send_data == false) {
283
            //do statistics
283
            //do statistics
284
284
285
            $this->loadModel( 'Requirement' );
285
            $this->loadModel('Requirement');
286
            $this->loadModel( 'Testcase' );
286
            $this->loadModel('Testcase');
287
            $this->loadModel( 'Project' );
287
            $this->loadModel('Project');
288
            $this->loadModel( 'Site' );
288
            $this->loadModel('Site');
289
            $this->loadModel( 'User' );
289
            $this->loadModel('User');
290
            $this->loadModel( 'Node' );
290
            $this->loadModel('Node');
291
            $this->loadModel( 'Plugin' );
291
            $this->loadModel('Plugin');
292
            $this->loadModel( 'Test' );
292
            $this->loadModel('Test');
293
            $this->loadModel( 'Group' );
293
            $this->loadModel('Group');
294
            $this->loadModel( 'Testcasestep' );
294
            $this->loadModel('Testcasestep');
295
            $this->loadModel( 'Myaros_myaco' );
295
            $this->loadModel('Myaros_myaco');
296
            $this->loadModel( 'Combinations_requirement' );
296
            $this->loadModel('Combinations_requirement');
297
297
298
            $params = array( 'brkey', 'OS', 'requirements', 'testcases', 'projects', 'sites', 'users', 'nodes', 'sauce_enabled', 'plugins', 'tests', 'testcasesteps', 'groups', 'myaros_myacos', 'combinations_requirements', 'version', 'php', 'java' );
298
            $params = array('brkey', 'OS', 'requirements', 'testcases', 'projects', 'sites', 'users', 'nodes', 'sauce_enabled', 'plugins', 'tests', 'testcasesteps', 'groups', 'myaros_myacos', 'combinations_requirements', 'version', 'php', 'java');
299
299
300
            $brkey = $key;
300
            $brkey = $key;
301
            $OS = PHP_OS;
301
            $OS = PHP_OS;
302
            $requirements = $this->Requirement->find( 'count' );
302
            $requirements = $this->Requirement->find('count');
303
            $testcases = $this->Testcase->find( 'count' );
303
            $testcases = $this->Testcase->find('count');
304
            $projects = $this->Project->find( 'count' );
304
            $projects = $this->Project->find('count');
305
            $sites = $this->Site->find( 'count' );
305
            $sites = $this->Site->find('count');
306
            $users = $this->User->find( 'count' );
306
            $users = $this->User->find('count');
307
            $nodes = $this->Node->find( 'count' );
307
            $nodes = $this->Node->find('count');
308
            $sauce_enabled = $this->Config->findByName( 'sauce_enabled' );
308
            $sauce_enabled = $this->Config->findByName('sauce_enabled');
309
            $sauce_enabled = $sauce_enabled[ 'Config' ][ 'value' ];
309
            $sauce_enabled = $sauce_enabled['Config']['value'];
310
            $plugins = $this->Plugin->find( 'list' );
310
            $plugins = $this->Plugin->find('list');
311
            $plugins = implode( ',', $plugins );
311
            $plugins = implode(',', $plugins);
312
            $tests = $this->Test->find( 'count', array(
312
            $tests = $this->Test->find('count', array(
313
                        'conditions' => array(
313
                        'conditions' => array(
314
                            'timestamp >' => date( 'Y-m-d H:i:s', $last_statistics )
314
                            'timestamp >' => date('Y-m-d H:i:s', $last_statistics)
315
                        )
315
                        )
316
                    ) );
316
                            ));
317
            $testcasesteps = $this->Testcasestep->find( 'count' );
317
            $testcasesteps = $this->Testcasestep->find('count');
318
            $groups = $this->Group->find( 'count' );
318
            $groups = $this->Group->find('count');
319
            $myaros_myacos = $this->Myaros_myaco->find( 'count' );
319
            $myaros_myacos = $this->Myaros_myaco->find('count');
320
            $combinations_requirements = $this->Combinations_requirement->find( 'count' );
320
            $combinations_requirements = $this->Combinations_requirement->find('count');
321
            $version = $this->Config->findByName( 'version' );
321
            $version = $this->Config->findByName('version');
322
            $version = $version[ 'Config' ][ 'value' ];
322
            $version = $version['Config']['value'];
323
            $php = $result[ 'php' ];
323
            $php = $result['php'];
324
            $java = $result[ 'jar' ];
324
            $java = $result['jar'];
325
325
326
326
327
            $url = 'http://brominefoundation.org/statistics/track/';
327
            $url = 'http://brominefoundation.org/statistics/track/';
328
            foreach ( $params as $param ) {
328
            foreach ($params as $param) {
329
329
330
                //echo "$param: ".$$param."<br />";
330
                //echo "$param: ".$$param."<br />";
331
                $url .= $param . ':' . $$param . '/';
331
                $url .= $param . ':' . $$param . '/';
332
                $user_data[ $param ] = $$param;
332
                $user_data[$param] = $$param;
333
            }
333
            }
334
            if ( $send_data == true ) {
334
            if ($send_data == true) {
335
                @fopen( $url, 'r' );
335
                @fopen($url, 'r');
336
                //Update last statistic time            
336
                //Update last statistic time            
337
                $data = $this->Config->findByName( 'last_statistics' );
337
                $data = $this->Config->findByName('last_statistics');
338
                $data[ 'Config' ][ 'name' ] = 'last_statistics';
338
                $data['Config']['name'] = 'last_statistics';
339
                $data[ 'Config' ][ 'value' ] = strtotime( 'now' );
339
                $data['Config']['value'] = strtotime('now');
340
                $this->Config->save( $data );
340
                $this->Config->save($data);
341
            } else {
341
            } else {
342
                $this->set( 'user_data', $user_data );
342
                $this->set('user_data', $user_data);
343
            }
343
            }
344
        }
344
        }
345
    }
345
    }
346
346
347
    function delete( $id = null ) {
347
    function delete($id = null) {
348
        if ( !$id ) {
348
        if (!$id) {
349
            $this->Session->setFlash( __( 'Invalid id for Project', true ), true, array( 'class' => 'error_message' ) );
349
            $this->Session->setFlash(__('Invalid id for Project', true), true, array('class' => 'error_message'));
350
            $this->redirect( array( 'action' => 'index' ) );
350
            $this->redirect(array('action' => 'index'));
351
        }
351
        }
352
        $project = $this->Project->read( null, $id );
352
        $project = $this->Project->read(null, $id);
353
        if ( $this->Project->del( $id ) ) {
353
        if ($this->Project->del($id)) {
354
            //find the path
354
            //find the path
355
            $dir = WWW_ROOT . 'testscripts' . DS . $project[ 'Project' ][ 'name' ];
355
            $dir = WWW_ROOT . 'testscripts' . DS . $project['Project']['name'];
356
            $files = $this->directoryToArray( $dir, true );
356
            $files = $this->directoryToArray($dir, true);
357
            // deletes files, incl. testscripts
357
            // deletes files, incl. testscripts
358
            foreach ( $files as $file ) {
358
            foreach ($files as $file) {
359
                unlink( $file );
359
                unlink($file);
360
            }
360
            }
361
            // Removes dirs
361
            // Removes dirs
362
            rmdir( $dir . DS . 'jar' . DS . 'lib' );
362
            rmdir($dir . DS . 'jar' . DS . 'lib');
363
            rmdir( $dir . DS . 'jar' );
363
            rmdir($dir . DS . 'jar');
364
            rmdir( $dir . DS . 'php' );
364
            rmdir($dir . DS . 'php');
365
            rmdir( $dir );
365
            rmdir($dir);
366
366
367
            //Delete the session if this is the selected project
367
            //Delete the session if this is the selected project
368
            if ( $this->Session->read( 'project_id' ) == $id ) {
368
            if ($this->Session->read('project_id') == $id) {
369
                $this->Session->delete( 'project_id' );
369
                $this->Session->delete('project_id');
370
                $this->Session->delete( 'project_name' );
370
                $this->Session->delete('project_name');
371
            }
371
            }
372
            $this->Session->setFlash( __( 'Project deleted', true ) );
372
            $this->Session->setFlash(__('Project deleted', true));
373
            $this->redirect( array( 'action' => 'index' ) );
373
            $this->redirect(array('action' => 'index'));
374
        }
374
        }
375
    }
375
    }
376
376
377
    private function directoryToArray( $directory, $recursive ) {
377
    private function directoryToArray($directory, $recursive) {
378
        $array_items = array( );
378
        $array_items = array();
379
        if ( $handle = opendir( $directory ) ) {
379
        if ($handle = opendir($directory)) {
380
            while ( false !== ($file = readdir( $handle )) ) {
380
            while (false !== ($file = readdir($handle))) {
381
                if ( $file != "." && $file != ".." && $file != '.svn' ) {
381
                if ($file != "." && $file != ".." && $file != '.svn') {
382
                    if ( is_dir( $directory . "/" . $file ) ) {
382
                    if (is_dir($directory . "/" . $file)) {
383
                        if ( $recursive ) {
383
                        if ($recursive) {
384
                            $array_items = array_merge( $array_items, $this->directoryToArray( $directory . "\\" . $file, $recursive ) );
384
                            $array_items = array_merge($array_items, $this->directoryToArray($directory . "\\" . $file, $recursive));
385
                        }
385
                        }
386
                        //$file = $directory . "/" . $file;
386
                        //$file = $directory . "/" . $file;
387
                        //$array_items[] = preg_replace("/\/\//si", "/", $file);
387
                        //$array_items[] = preg_replace("/\/\//si", "/", $file);
...
...
390
                        $file = $directory . DS . $file;
390
                        $file = $directory . DS . $file;
391
                        //$array_items[] = preg_replace("/\/\//si", "", $file);
391
                        //$array_items[] = preg_replace("/\/\//si", "", $file);
392
392
393
                        $array_items[ ] = $file;
393
                        $array_items[] = $file;
394
                    }
394
                    }
395
                }
395
                }
396
            }
396
            }
397
            closedir( $handle );
397
            closedir($handle);
398
        }
398
        }
399
        return $array_items;
399
        return $array_items;
400
    }
400
    }
401
401
402
    function testlabview( $id = null ) {
402
    function testlabview($id = null) {
403
        //echo date('H:i:s');
403
        //echo date('H:i:s');
404
        $this->main_menu_id = -2;
404
        $this->main_menu_id = -2;
405
        if ( $id == null && $this->Session->check( 'project_id' ) ) {
405
        if ($id == null && $this->Session->check('project_id')) {
406
            $id = $this->Session->read( 'project_id' );
406
            $id = $this->Session->read('project_id');
407
        }
407
        }
408
        $project = $this->Project->read( null, $id );
408
        $project = $this->Project->read(null, $id);
409
        $this->set( 'project', $project );
409
        $this->set('project', $project);
410
410
411
        $requirements = $this->Project->Requirement->find( 'all', array(
411
        $requirements = $this->Project->Requirement->find('all', array(
412
                    'conditions' => array(
412
                    'conditions' => array(
413
                        'project_id' => $id
413
                        'project_id' => $id
414
                    ),
414
                    ),
415
                    'contain' => array(
415
                    'contain' => array(
416
                        'Testcase'
416
                        'Testcase'
417
                    )
417
                    )
418
                ) );
418
                        ));
419
419
420
        // Pie chart
420
        // Pie chart
421
        $passed = 0;
421
        $passed = 0;
422
        $failed = 0;
422
        $failed = 0;
423
        $notdone = 0;
423
        $notdone = 0;
424
        foreach ( $requirements as $requirement ) {
424
        foreach ($requirements as $requirement) {
425
            foreach ( $requirement[ 'Testcase' ] as $testcase ) {
425
            foreach ($requirement['Testcase'] as $testcase) {
426
                $status = $this->Project->Testcase->getStatus( $testcase[ 'id' ], $requirement[ 'Requirement' ][ 'id' ], $this->Session->read( 'site_id' ) );
426
                $status = $this->Project->Testcase->getStatus($testcase['id'], $requirement['Requirement']['id'], $this->Session->read('site_id'));
427
                switch ( $status ) {
427
                switch ($status) {
428
                    case 'passed':
428
                    case 'passed':
429
                        $passed++;
429
                        $passed++;
430
                        break;
430
                        break;
...
...
437
                }
437
                }
438
            }
438
            }
439
        }
439
        }
440
        $this->set( 'chart1', $this->Googlechart->pie( $failed, $passed, $notdone ) );
440
        $this->set('chart1', $this->Googlechart->pie($failed, $passed, $notdone));
441
441
442
        //Percent test run chart
442
        //Percent test run chart
443
        //$dates = $this->Googlechart->getAllDates(7);
443
        //$dates = $this->Googlechart->getAllDates(7);
...
...
481
          $days['360'] = "12 months";
481
          $days['360'] = "12 months";
482
          $this->set(compact('testcases','browsers','operatingsystems','days'));
482
          $this->set(compact('testcases','browsers','operatingsystems','days'));
483
         */
483
         */
484
        $this->loadModel( 'Requirement' );
484
        $this->loadModel('Requirement');
485
        $this->loadModel( 'Testcase' );
485
        $this->loadModel('Testcase');
486
        $nestedTestcases = $this->Testcase->find( 'count', array(
486
        $nestedTestcases = $this->Testcase->find('count', array(
487
                    'conditions' => array(
487
                    'conditions' => array(
488
                        'Testcase.project_id' => $project[ 'Project' ][ 'id' ]
488
                        'Testcase.project_id' => $project['Project']['id']
489
                        ) )
489
                    ))
490
        );
490
        );
491
491
492
        $this->loadModel( 'Requirement' );
492
        $this->loadModel('Requirement');
493
        $nestedRequirements = $this->Requirement->find( 'all', array(
493
        $nestedRequirements = $this->Requirement->find('all', array(
494
                    'conditions' => array(
494
                    'conditions' => array(
495
                        'Requirement.project_id' => $id
495
                        'Requirement.project_id' => $id
496
                    ),
496
                    ),
...
...
498
                        'Combination' => array(
498
                        'Combination' => array(
499
                            'Browser', 'Operatingsystem'
499
                            'Browser', 'Operatingsystem'
500
                        ), 'Testcase'
500
                        ), 'Testcase'
501
                        ) )
501
                    ))
502
        );
502
        );
503
503
504
        $nestedCombinations = $this->Checker->getCombinations2( $id );
504
        $nestedCombinations = $this->Checker->getCombinations2($id);
505
        $onlineNodes = $this->Checker->getOnlineNodes();
505
        $onlineNodes = $this->Checker->getOnlineNodes();
506
        $nestedOfflineNeeds = $this->Checker->getOfflineNeeds( $onlineNodes, $nestedRequirements, true );
506
        $nestedOfflineNeeds = $this->Checker->getOfflineNeeds($onlineNodes, $nestedRequirements, true);
507
        $nestedNoScripts = $this->Checker->getTestcasesWithNoScript( $id );
507
        $nestedNoScripts = $this->Checker->getTestcasesWithNoScript($id);
508
        $nestedOfflineNeeds = $this->Checker->getOfflineNeeds( $onlineNodes, $nestedRequirements, true );
508
        $nestedOfflineNeeds = $this->Checker->getOfflineNeeds($onlineNodes, $nestedRequirements, true);
509
509
510
510
511
        $this->set( 'noScriptsAll', (count( $nestedNoScripts ) == count( $nestedTestcases ) ) );
511
        $this->set('noScriptsAll', (count($nestedNoScripts) == count($nestedTestcases)));
512
        $this->set( 'nestedCombinations', $nestedCombinations );
512
        $this->set('nestedCombinations', $nestedCombinations);
513
        $this->set( 'nestedTestcases', $nestedTestcases );
513
        $this->set('nestedTestcases', $nestedTestcases);
514
        $this->set( 'nestedOfflineNeeds', $nestedOfflineNeeds );
514
        $this->set('nestedOfflineNeeds', $nestedOfflineNeeds);
515
        $this->set( 'nestedNoScripts', $nestedNoScripts );
515
        $this->set('nestedNoScripts', $nestedNoScripts);
516
        $this->set( 'nestedOfflineNeeds', $nestedOfflineNeeds );
516
        $this->set('nestedOfflineNeeds', $nestedOfflineNeeds);
517
        $this->set( 'onlineNodes', $onlineNodes );
517
        $this->set('onlineNodes', $onlineNodes);
518
        $this->set( 'nodes', $this->Checker->getAllNodes() );
518
        $this->set('nodes', $this->Checker->getAllNodes());
519
519
520
        $this->loadModel( 'Config' );
520
        $this->loadModel('Config');
521
        $this->set( 'servername', $this->Config->field( 'value', array( 'name' => 'servername' ) ) );
521
        $this->set('servername', $this->Config->field('value', array('name' => 'servername')));
522
        $this->set( 'port', $this->Config->field( 'value', array( 'name' => 'port' ) ) );
522
        $this->set('port', $this->Config->field('value', array('name' => 'port')));
523
    }
523
    }
524
524
525
    function select( $project_id = null, $noredirect = false ) {
525
    function select($project_id = null, $noredirect = false) {
526
        $this->statistics( true );
526
        $this->statistics(true);
527
        $this->layout = "green_blank";
527
        $this->layout = "green_blank";
528
        if ( empty( $project_id ) ) {
528
        if (empty($project_id)) {
529
            $project_id = $this->data[ 'Project' ][ 'project_id' ];
529
            $project_id = $this->data['Project']['project_id'];
530
        }
530
        }
531
531
532
        if ( $project_id ) {
532
        if ($project_id) {
533
            foreach ( $this->userprojects as $userproject ) {
533
            foreach ($this->userprojects as $userproject) {
534
                $userprojects_list[ ] = $userproject[ 'id' ];
534
                $userprojects_list[] = $userproject['id'];
535
            }
535
            }
536
            if ( in_array( $project_id, $userprojects_list ) ) {
536
            if (in_array($project_id, $userprojects_list)) {
537
                $project = $this->Project->findById( $project_id );
537
                $project = $this->Project->findById($project_id);
538
                if ( $this->Session->write( 'project_id', $project_id ) && $this->Session->write( 'project_name', $project[ 'Project' ][ 'name' ] ) ) {
538
                if ($this->Session->write('project_id', $project_id) && $this->Session->write('project_name', $project['Project']['name'])) {
539
                    if ( $noredirect === false ) {
539
//                    if ($noredirect === false) {
540
                        if ( $this->referer() == '/projects/select' ) {
540
                            $this->redirect('/testlabs#/projects/testlabview');
541
                            $this->redirect( '/testlabs#/projects/testlabview' );
541
//                    }
542
                        } else {
543
                            $this->redirect( $this->referer() );
544
                        }
545
                    }
546
                } else {
542
                } else {
547
                    $this->Session->setFlash( __( 'The project session could not be set. Please, try again.', true ), true, array( 'class' => 'error_message' ) );
543
                    $this->Session->setFlash(__('The project session could not be set. Please, try again.', true), true, array('class' => 'error_message'));
548
                }
544
                }
549
            } else {
545
            } else {
550
                $this->Session->setFlash( __( 'You do not have access to this project.', true ), true, array( 'class' => 'error_message' ) );
546
                $this->Session->setFlash(__('You do not have access to this project.', true), true, array('class' => 'error_message'));
551
            }
547
            }
552
        }
548
        }
553
549
554
        if ( !empty( $this->data ) ) {
550
        if (!empty($this->data)) {
555
            $this->Session->setFlash( __( 'No project selected. Please, try again.', true ), true, array( 'class' => 'error_message' ) );
551
            $this->Session->setFlash(__('No project selected. Please, try again.', true), true, array('class' => 'error_message'));
556
        }
552
        }
557
    }
553
    }
558
554
559
    function clearHistory( $id ) {
555
    function clearHistory($id) {
560
        $this->loadModel( 'Requirement' );
556
        $this->loadModel('Requirement');
561
        $reqs = $this->Requirement->find( 'all', array(
557
        $reqs = $this->Requirement->find('all', array(
562
                    'contain' => array( 'Testcase' )
558
                    'contain' => array('Testcase')
563
                ) );
559
                        ));
564
    }
560
    }
565
561
566
}
562
}

Updated branches/bromine3_rc4/app/controllers/qrtz_job_details_controller.php Download diff

1314
3
class QrtzJobDetailsController extends AppController {
3
class QrtzJobDetailsController extends AppController {
4
4
5
    public $name = 'QrtzJobDetails';
5
    public $name = 'QrtzJobDetails';
6
    public $helpers = array( 'Html', 'Form' );
6
    public $helpers = array( 'Html', 'Form', 'Paginator' );
7
    public $components = array( 'Checker' );
7
    public $components = array( 'Checker' );
8
    public $main_menu_id = -2;
8
    public $main_menu_id = -2;
9
9
...
...
52
        $state = $this->Checker->getJavaStatus();
52
        $state = $this->Checker->getJavaStatus();
53
        $selfContact = $this->Checker->getSelfContact();
53
        $selfContact = $this->Checker->getSelfContact();
54
        $sheduler = $this->Checker->getSchedulerOnline( $state[ 'status' ] );
54
        $sheduler = $this->Checker->getSchedulerOnline( $state[ 'status' ] );
55
        debug($state[ 'status' ]);
55
56
        if ( $state[ 'status' ] === true ) {
56
        if ( $state[ 'status' ] === true ) {
57
            if ( $selfContact[ 'status' ] === true ) {
57
            if ( $selfContact[ 'status' ] === true ) {
58
                if ( $sheduler[ 'status' ] !== "ignored" ) {
58
                if ( $sheduler[ 'status' ] !== "ignored" ) {

Updated branches/bromine3_rc4/app/controllers/requirements_controller.php Download diff

1314
158
    }
158
    }
159
159
160
    function index() {
160
    function index() {
161
161
    }
162
    }
162
163
163
    function view($id = null) {
164
    function view($id = null) {
...
...
260
        $this->set('nestedRequirements', $nestedRequirements);
261
        $this->set('nestedRequirements', $nestedRequirements);
261
        //pr($nestedOfflineNeeds);
262
        //pr($nestedOfflineNeeds);
262
        //$noScripts=array_merge($noScripts, $nestedNoScripts);
263
        //$noScripts=array_merge($noScripts, $nestedNoScripts);
263
        $this->set('noScripts', $noScripts);
264
        if (!empty($noScripts)) {
265
            $this->set('noScripts', $noScripts);
266
        }
264
267
268
265
        if (count($requirements['Testcase']) == count($noScripts)) {
269
        if (count($requirements['Testcase']) == count($noScripts)) {
266
            $this->set('noScriptsAll', true);
270
            $this->set('noScriptsAll', true);
267
        }
271
        }
...
...
441
        $this->render('schedule');
445
        $this->render('schedule');
442
    }
446
    }
443
447
444
    function treeView(){
448
    function treeView() {
445
                //$this->Requirement->recursive = 1;
449
        //$this->Requirement->recursive = 1;
446
        $this->set('data', $this->Requirement->find('threaded',
450
        $this->set('data', $this->Requirement->find('threaded',
447
                        array(
451
                        array(
448
                            'conditions' => array(
452
                            'conditions' => array(
...
...
457
                        )
461
                        )
458
        ));
462
        ));
459
    }
463
    }
464
460
}
465
}
461
466
462
?>
467
?>

Updated branches/bromine3_rc4/app/controllers/testlabs_controller.php Download diff

1314
24
class TestlabsController extends AppController {
24
class TestlabsController extends AppController {
25
25
26
    public $name = 'Testlabs';
26
    public $name = 'Testlabs';
27
    public $helpers = array('Html', 'Form', 'Tree', 'Cache');
27
    public $helpers = array('Html', 'Form', 'Tree');
28
    public $needsproject = true;
28
    public $needsproject = true;
29
    public $uses = array('Command');
29
    public $uses = array('Command');
30
    public $pageTitle = 'Test Lab';
30
    public $pageTitle = 'Test Lab';
...
...
60
        $this->loadModel('Testcase');
60
        $this->loadModel('Testcase');
61
61
62
        //prevents unwanted debug output
62
        //prevents unwanted debug output
63
        Configure::write('debug',0);
63
        //Configure::write('debug', 0);
64
        $this->set('testcases', $this->Testcase->find('all', array(
64
        $this->set('testcases', $this->Testcase->find('all', array(
65
                    'conditions' => array(
65
                    'conditions' => array(
66
                        'Testcase.name LIKE' => $this->data['Testcase']['name'] . '%'
66
                        'Testcase.name LIKE' => $this->data['Testcase']['name'] . '%'
67
                    ),
67
                    ),
68
                    'fields' => array('name')
68
                    'fields' => array('name')
69
                )));
69
                )));
70
        debug($this->data['Testcase']['name']);
70
    }
71
    }
71
72
72
    public function treeView() {
73
    public function treeView() {
...
...
76
                    'recursive' => 1,
77
                    'recursive' => 1,
77
                    'conditions' => array(
78
                    'conditions' => array(
78
                        'project_id' => $this->Session->read('project_id')
79
                        'project_id' => $this->Session->read('project_id')
79
                    ))
80
                        ))
80
        );
81
        );
81
        $this->set('sites', $sites);
82
        $this->set('sites', $sites);
82
83
...
...
104
                            'order' => 'Testcase.name'
105
                            'order' => 'Testcase.name'
105
                        ),
106
                        ),
106
                        'Project'
107
                        'Project'
107
                    ))
108
                        ))
108
        );
109
        );
109
        $this->array_search_recursive('children', $requirements);
110
        $this->array_search_recursive('children', $requirements);
110
        $this->set('data', $requirements);
111
        $this->set('data', $requirements);
111
    }
112
    }
112
113
113
}
114
}
115
116
?>

Updated branches/bromine3_rc4/app/controllers/types_controller.php Download diff

1314
2
class TypesController extends AppController {
2
class TypesController extends AppController {
3
3
4
	public $name = 'Types';
4
	public $name = 'Types';
5
5
        public $main_menu_id = -2;
6
	function index() {
6
	function index() {
7
		$this->Type->recursive = 0;
7
		$this->Type->recursive = 0;
8
		$this->set('types', $this->paginate());
8
		$this->set('types', $this->paginate());

Updated branches/bromine3_rc4/app/tmp/logs/debug.log Download diff

1314
190
2011-03-27 19:11:23 Debug: Notice (8): Undefined variable: nested_consolePath in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line
153]
190
2011-03-27 19:11:23 Debug: Notice (8): Undefined variable: nested_consolePath in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line
153]
191
2011-03-27 19:32:09 Debug: Notice (8): Undefined variable: nested_path in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
191
2011-03-27 19:32:09 Debug: Notice (8): Undefined variable: nested_path in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
192
2011-03-27 19:32:09 Debug: Notice (8): Undefined variable: nested_consolePath in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line
153]
192
2011-03-27 19:32:09 Debug: Notice (8): Undefined variable: nested_consolePath in [D:\dev\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line
153]
193
2011-04-06 03:53:18 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
194
2011-04-06 03:53:18 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
195
2011-04-06 03:53:32 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
196
2011-04-06 03:53:32 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
197
2011-04-06 04:19:42 Debug: Notice (8): Undefined variable: states in [C:\xampp\htdocs\bromine3_rc4\app\controllers\components\checker.php, line 273]
198
2011-04-12 05:03:42 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
199
2011-04-12 05:03:42 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
200
2011-04-12 05:10:52 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
201
2011-04-12 05:10:52 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
202
2011-04-12 05:20:26 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
203
2011-04-12 05:20:26 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
204
2011-04-12 05:20:48 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
205
2011-04-12 05:20:48 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
206
2011-04-12 05:21:04 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
207
2011-04-12 05:21:04 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
208
2011-04-12 05:21:44 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
209
2011-04-12 05:21:44 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
210
2011-04-12 05:23:30 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
211
2011-04-12 05:23:30 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
212
2011-04-12 05:27:37 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
213
2011-04-12 05:27:37 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
214
2011-04-12 05:29:08 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
215
2011-04-12 05:29:08 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
216
2011-04-12 05:29:36 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
217
2011-04-12 05:29:36 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
218
2011-04-12 05:30:00 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
219
2011-04-12 05:30:00 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
220
2011-04-12 05:30:24 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
221
2011-04-12 05:30:24 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
222
2011-04-12 05:30:46 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
223
2011-04-12 05:30:46 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
224
2011-04-12 05:31:00 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
225
2011-04-12 05:31:00 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
226
2011-04-12 05:31:34 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
227
2011-04-12 05:31:34 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
228
2011-04-12 05:32:02 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
229
2011-04-12 05:32:02 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
230
2011-05-03 20:49:00 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
231
2011-05-03 20:49:00 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
232
2011-05-03 20:58:07 Debug: Notice (8): Undefined variable: paginator in [C:\xampp\htdocs\bromine3_rc4\app\views\qrtz_job_details\index.ctp, line 31]
233
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 542]
234
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: options in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 545]
235
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 546]
236
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 547]
237
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: page in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 563]
238
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: current in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 565]
239
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 566]
240
2011-05-03 20:59:37 Debug: Notice (8): Undefined variable: qrtzJobDetails in [C:\xampp\htdocs\bromine3_rc4\app\views\qrtz_job_details\index.ctp, line 45]
241
2011-05-03 20:59:37 Debug: Notice (8): Undefined index: pageCount in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 618]
242
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 542]
243
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: options in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 545]
244
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 546]
245
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 547]
246
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: page in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 563]
247
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: current in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 565]
248
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: count in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 566]
249
2011-05-03 21:01:22 Debug: Notice (8): Undefined variable: qrtzJobDetails in [C:\xampp\htdocs\bromine3_rc4\app\views\qrtz_job_details\index.ctp, line 45]
250
2011-05-03 21:01:22 Debug: Notice (8): Undefined index: pageCount in [C:\xampp\htdocs\bromine3_rc4\cake\libs\view\helpers\paginator.php, line 618]
251
2011-05-03 21:08:29 Debug: Notice (8): Undefined index: limit in [C:\xampp\htdocs\bromine3_rc4\app\views\nodes\index.ctp, line 95]
252
2011-05-03 21:09:43 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
253
2011-05-03 21:09:43 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
254
2011-05-03 21:10:02 Debug: Notice (8): Undefined index: limit in [C:\xampp\htdocs\bromine3_rc4\app\views\nodes\index.ctp, line 95]
255
2011-05-03 21:23:14 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
256
2011-05-03 21:23:14 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 153]
257
2011-05-03 21:25:25 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 154]
258
2011-05-03 21:25:25 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 154]
259
2011-05-03 21:26:03 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
260
2011-05-03 21:26:03 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
261
2011-05-03 21:26:11 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
262
2011-05-03 21:26:11 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
263
2011-05-04 02:40:54 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 41]
264
2011-05-04 02:40:54 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
265
2011-05-04 02:40:54 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
266
2011-05-04 02:41:06 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 70]
267
2011-05-17 02:11:59 Debug: Notice (8): Undefined index: expected in [C:\xampp\htdocs\bromine3_rc4\app\views\configs\state_of_the_system.ctp, line 52]
268
2011-05-17 02:11:59 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\configs\state_of_the_system.ctp, line 53]
269
2011-05-17 02:14:00 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 41]
270
2011-05-17 02:14:00 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
271
2011-05-17 02:14:00 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
272
2011-05-17 02:15:04 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 42]
273
2011-05-17 02:15:04 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
274
2011-05-17 02:15:04 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
275
2011-05-17 02:15:55 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 41]
276
2011-05-17 02:15:55 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
277
2011-05-17 02:15:55 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
278
2011-05-17 02:16:36 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
279
2011-05-17 02:16:36 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
280
2011-05-17 02:16:51 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
281
2011-05-17 02:16:51 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
282
2011-05-17 02:17:23 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
283
2011-05-17 02:17:23 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
284
2011-05-17 02:17:39 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
285
2011-05-17 02:17:39 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
286
2011-05-17 02:17:52 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
287
2011-05-17 02:17:52 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 157]
288
2011-05-17 02:18:10 Debug: Notice (8): Undefined variable: nested_path in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
289
2011-05-17 02:18:10 Debug: Notice (8): Undefined variable: nested_consolePath in [C:\xampp\htdocs\bromine3_rc4\app\views\requirements\testlabview.ctp, line 156]
290
2011-05-17 02:18:32 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 70]
291
2011-05-17 02:20:26 Debug: Notice (8): Undefined index: Main in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 65]
292
2011-05-17 02:20:54 Debug: Notice (8): Undefined index: Main in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 65]
293
2011-05-17 02:21:26 Debug: Notice (8): Undefined index: Main in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 65]
294
2011-05-17 02:23:45 Debug: Notice (8): Undefined index: Main in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 66]
295
2011-05-17 02:24:53 Debug: Notice (8): Undefined index: result in [C:\xampp\htdocs\bromine3_rc4\app\views\testcases\testlabview.ctp, line 70]

Updated branches/bromine3_rc4/app/tmp/logs/error.log Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/configs/server.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/configs/state_of_the_system.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/nodes/index.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/pages/about.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/qrtz_job_details/index.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/requirements/add.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/requirements/testlabview.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/testcases/add.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/testcases/testlabview.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/views/testlabs/auto_complete.ctp Download diff

File was changed - ok, show the diff

Updated branches/bromine3_rc4/app/webroot/css/green/style.css Download diff

File was changed - ok, show the diff