* limitations under the License. */ use DreamFactory\Yii\Utility\Pii; use DreamFactory\Yii\Utility\Validate; use Kisma\Core\Utility\Log; /** * @var WebController $this * @var LoginForm $model * @var bool $redirected * @var CActiveForm $form * @var array $loginProviders * @var bool $allowRegistration */ $_html = null; Validate::register('form#login-form', array('ignoreTitle' => true, 'errorClass' => 'error', 'errorPlacement' => 'function(error,element){error.appendTo(element.closest("div.form-group"));}', 'rules' => array('LoginForm[username]' => 'required email', 'LoginForm[password]' => array('minlength' => 3)), 'messages' => array('LoginForm[username]' => 'Please enter an actual email address', 'LoginForm[password]' => array('required' => 'You must enter a password to continue', 'minlength' => 'Your password must be at least 3 characters long')))); $_rememberMeCopy = Pii::getParam('login.remember_me_copy', 'Remember Me'); //************************************************************************* // Build the remote login provider icon list.. //************************************************************************* $_providerHtml = null; $_providerHider = 'hide'; if (!empty($loginProviders)) { // Log::debug( 'login providers: ' . print_r( $loginProviders, true ) ); foreach ($loginProviders as $_provider) { if (!$_provider['is_active'] || !$_provider['is_login_provider']) { continue; } $_icon = $_providerType = strtolower($_provider['provider_name']); // Google icon has a different name if ('google' == $_icon) { $_icon = 'google-plus';
protected function _checkSystemState() { $_error = false; $_state = SystemManager::getSystemState(); if (!$this->_activated && $_state != PlatformStates::INIT_REQUIRED) { $_state = PlatformStates::ADMIN_REQUIRED; } if (!empty($this->_remoteError)) { $_error = 'error=' . urlencode($this->_remoteError); } if (PlatformStates::READY == $_state) { $_defaultApp = Pii::getParam('dsp.default_app', static::DEFAULT_STARTUP_APP); // Try local launchpad if (is_file(\Kisma::get('app.app_path') . $_defaultApp)) { $_defaultApp = rtrim($_defaultApp . Curl::urlSeparator($_defaultApp) . $_error, '?'); $this->redirect($_defaultApp); } // Log::notice( // 'No default application defined/found. Running launchpad...' . // PHP_EOL . // '==============================' . // PHP_EOL . // 'Config dump:' . // PHP_EOL . // print_r( \Kisma::get( null ), true ) . // '==============================' . // PHP_EOL . // '==============================' . // PHP_EOL . // 'Params dump:' . // PHP_EOL . // print_r( Pii::params(), true ) . // '==============================' . // PHP_EOL // ); // If we have no app, run the launchpad $this->redirect(static::DEFAULT_STARTUP_APP); } else { if (!$this->_handleAction($_state)) { Log::error('Invalid state "' . $_state . '" or no handler configured.'); } } }
<?php use DreamFactory\Yii\Utility\Pii; use Kisma\Core\Utility\Option; /** * supplies info for the roll your own list */ if (false !== ($_options = Pii::getParam('dashboard.rackspace', false))) { $_featureEnabled = Option::get($_options, 'enabled', false); if ($_featureEnabled) { $_body = <<<HTML <p>Rackspace has no specific image. Instead, install one of our pre-built packages! For Redhat or CentOS flavors, \t\t\t\tsee our <a href="http://wiki.dreamfactory.com/wiki/Packages/Rpm" target="_blank">installation guide</a>. We also have one for Debian/Ubuntu systems <a \t\thref="http://wiki.dreamfactory.com/wiki/Packages/Deb" target="_blank">here</a>.</p> HTML; } else { $_body = <<<HTML <p><strong>This feature is coming soon! Stay tuned!</strong></p> HTML; } return array('id' => 'rackspace', 'title' => 'Rackspace', 'body' => $_body); } return array();
<?php use DreamFactory\Yii\Utility\Pii; use Kisma\Core\Utility\Option; /** * supplies info for the roll your own list */ if (false !== ($_options = Pii::getParam('dashboard.bitnami', false))) { $_featureEnabled = Option::get($_options, 'enabled', false); $_url = Option::get($_options, 'url'); $_wikiUrl = Option::get($_options, 'wiki_url'); if ($_featureEnabled) { $_body = <<<HTML <p>Click the link to launch a DSP using a BitNami stack:<br/> <a target="_blank" href="{$_url}">{$_url}</a></p> <p>More information may be found in the README: <br/> <a target="_blank" href="{$_wikiUrl}">{$_wikiUrl}</a></p> HTML; } else { $_body = <<<HTML <p><strong>This feature is coming soon! Stay tuned!</strong></p> HTML; } return array('id' => 'bitnami', 'title' => 'BitNami', 'body' => $_body); } return array();
<?php use DreamFactory\Yii\Utility\Pii; use Kisma\Core\Utility\Option; /** * supplies info for the roll your own list */ if (false !== ($_options = Pii::getParam('dashboard.vmware', false))) { $_featureEnabled = Option::get($_options, 'enabled', false); $_wikiUrl = Option::get($_options, 'wiki_url'); $_launchUrl = Option::get($_options, 'launch_url'); if ($_featureEnabled) { $_body = <<<HTML <p>Our VMWare appliance is available at <a target="_blank" href="{$_launchUrl}">{$_launchUrl}</a>.</p> <p>More information is available here:<br/> <a target="_blank" href="{$_wikiUrl}">{$_wikiUrl}</a></p> HTML; } else { $_body = <<<HTML <p><strong>This feature is coming soon! Stay tuned!</strong></p> HTML; } return array('id' => 'vmware', 'title' => 'VMWare Appliance', 'body' => $_body); } return array();
/** * @covers DreamFactory\Platform\Utility\Platform::getStoragePath() */ public function testGetLibraryPath() { $_control = Pii::getParam(LocalStorageTypes::LIBRARY_PATH); $this->assertEquals($_control, Platform::getLibraryPath()); }
<?php use DreamFactory\Yii\Utility\Pii; use Kisma\Core\Utility\Option; /** * supplies info for the roll your own list */ if (false !== ($_options = Pii::getParam('dashboard.amazon_ec2', false))) { $_featureEnabled = Option::get($_options, 'enabled', false); $_ami = Option::get($_options, 'ami'); $_wikiUrl = Option::get($_options, 'wiki_url'); $_launchUrl = str_replace('{{ami}}', $_ami, Option::get($_options, 'launch_url')); if ($_featureEnabled) { $_body = <<<HTML <p>Click the link to launch a DSP using our AMI:<br/><a target="_blank" href="{$_launchUrl}">{$_launchUrl}</a></p> <p>A complete step-by-step tutorial is available in the wiki:<br/> <a target="_blank" href="{$_wikiUrl}">{$_wikiUrl}</a></p> HTML; } else { $_body = <<<HTML <p><strong>This feature is coming soon! Stay tuned!</strong></p> HTML; } return array('id' => 'amazon-ec2', 'title' => 'Amazon EC2', 'body' => $_body); } return array();