Ejemplo n.º 1
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'public_path':
             $schema['type'] = 'array';
             $schema['items'] = 'string';
             $schema['description'] = 'An array of paths to make public.' . ' All folders and files under these paths will be available as public but read-only via the server\'s URL.';
             break;
         case 'container':
             $values = [];
             $defaultDiskName = \Config::get('filesystems.default');
             $disks = \Config::get('filesystems.disks');
             foreach ($disks as $disk) {
                 $default = false;
                 if ($defaultDiskName === $disk['driver']) {
                     $default = true;
                 }
                 $values[] = ['name' => $disk['driver'], 'label' => $disk['driver'], 'default' => $default];
             }
             $schema['type'] = 'picklist';
             $schema['description'] = 'Select a disk configuration to use for local file service.';
             $schema['values'] = $values;
             break;
     }
 }
Ejemplo n.º 2
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     $roles = Role::whereIsActive(1)->get();
     $roleList = [];
     foreach ($roles as $role) {
         $roleList[] = ['label' => $role->name, 'name' => $role->id];
     }
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'default_role':
             $schema['type'] = 'picklist';
             $schema['values'] = $roleList;
             $schema['description'] = 'Select a default role for users logging in with this AD/LDAP service type.';
             break;
         case 'host':
             $schema['description'] = 'The host name for your AD/LDAP server.';
             break;
         case 'base_dn':
             $schema['label'] = 'Base DN';
             $schema['description'] = 'The base DN for your domain.';
             break;
         case 'account_suffix':
             $schema['description'] = 'The full account suffix for your domain.';
             break;
     }
 }
Ejemplo n.º 3
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'type':
             $schema['label'] = 'Scripting Engine Type';
             $schema['description'] = 'The Scripting Engine able to run this script.';
             $values = ScriptType::all(['name', 'label', 'sandboxed'])->toArray();
             $schema['type'] = 'picklist';
             $schema['values'] = $values;
             $schema['default'] = 'v8js';
             break;
         case 'content':
             $schema['label'] = 'Content';
             $schema['type'] = 'text';
             $schema['description'] = 'The content of the script written in the appropriate language.';
             break;
         case 'config':
             $schema['label'] = 'Additional Configuration';
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'An array of additional configuration needed for the script to run.';
             break;
     }
 }
Ejemplo n.º 4
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'username':
             $schema['description'] = 'The user name for the service connection.';
             break;
         case 'tenant_name':
             $schema['description'] = 'Normally your account number.';
             break;
         case 'api_key':
             $schema['label'] = 'API Key';
             $schema['description'] = 'The API key for the service connection.';
             break;
         case 'url':
             $schema['label'] = 'URL';
             $schema['description'] = 'The URL/endpoint for the service connection.';
             break;
         case 'region':
             $schema['type'] = 'picklist';
             $schema['values'] = [['label' => 'Chicago', 'name' => 'ORD', 'url' => 'https://identity.api.rackspacecloud.com'], ['label' => 'Dallas', 'name' => 'DFW', 'url' => 'https://identity.api.rackspacecloud.com'], ['label' => 'London', 'name' => 'LON', 'url' => 'https://lon.identity.api.rackspacecloud.com']];
             $schema['description'] = 'Select the region to be accessed by this service connection.';
             break;
     }
 }
Ejemplo n.º 5
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     $roles = Role::whereIsActive(1)->get();
     $roleList = [];
     foreach ($roles as $role) {
         $roleList[] = ['label' => $role->name, 'name' => $role->id];
     }
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'default_role':
             $schema['type'] = 'picklist';
             $schema['values'] = $roleList;
             $schema['description'] = 'Select a default role for users logging in with this OAuth service type.';
             break;
         case 'client_id':
             $schema['label'] = 'Client ID';
             $schema['description'] = 'A public string used by the service to identify your app and to build authorization URLs.';
             break;
         case 'client_secret':
             $schema['description'] = 'A private string used by the service to authenticate the identity of the application.';
             break;
         case 'redirect_url':
             $schema['label'] = 'Redirect URL';
             $schema['description'] = 'The location the user will be redirected to after a successful login.';
             break;
         case 'icon_class':
             $schema['description'] = 'The icon to display for this OAuth service.';
             break;
     }
 }
Ejemplo n.º 6
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'action':
             $schema['label'] = 'Verbs';
             $schema['type'] = 'verb_mask';
             $schema['description'] = 'Which REST verbs should this header be applied to outgoing requests.';
             break;
     }
 }
Ejemplo n.º 7
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'dsn':
             $schema['label'] = 'Connection String';
             $schema['default'] = 'http://*****:*****@localhost:5984/db';
             $schema['description'] = 'The connection string for the service. ' . 'The username, password, and db values can be added in the connection string or in the options below.';
             break;
         case 'options':
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'An array of options for the connection, like db.';
             break;
     }
 }
Ejemplo n.º 8
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'protocol':
             $schema['type'] = 'picklist';
             $schema['values'] = [['label' => 'HTTP', 'name' => 'http'], ['label' => 'HTTPS', 'name' => 'https']];
             $schema['description'] = 'Select the region to be accessed by this service connection.';
             break;
         case 'account_name':
             $schema['description'] = 'A Windows Azure storage account name.';
             break;
         case 'account_key':
             $schema['description'] = 'A Windows Azure storage account key.';
             break;
     }
 }
Ejemplo n.º 9
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     $roleList = [['label' => '', 'name' => null]];
     $emailSvcList = [['label' => '', 'name' => null]];
     $templateList = [['label' => '', 'name' => null]];
     switch ($schema['name']) {
         case 'open_reg_role_id':
             $roles = Role::whereIsActive(1)->get();
             foreach ($roles as $role) {
                 $roleList[] = ['label' => $role->name, 'name' => $role->id];
             }
             $schema['type'] = 'picklist';
             $schema['values'] = $roleList;
             $schema['label'] = 'Open Reg Role';
             $schema['description'] = 'Select a role for self registered users.';
             break;
         case 'open_reg_email_service_id':
         case 'invite_email_service_id':
         case 'password_email_service_id':
             $label = substr($schema['label'], 0, strlen($schema['label']) - 11);
             $services = Service::whereIsActive(1)->whereIn('type', ['aws_ses', 'smtp_email', 'mailgun_email', 'mandrill_email', 'local_email'])->get();
             foreach ($services as $service) {
                 $emailSvcList[] = ['label' => $service->label, 'name' => $service->id];
             }
             $schema['type'] = 'picklist';
             $schema['values'] = $emailSvcList;
             $schema['label'] = $label . ' Service';
             $schema['description'] = 'Select an Email service for sending out ' . $label . '.';
             break;
         case 'open_reg_email_template_id':
         case 'invite_email_template_id':
         case 'password_email_template_id':
             $label = substr($schema['label'], 0, strlen($schema['label']) - 11);
             $templates = EmailTemplate::get();
             foreach ($templates as $template) {
                 $templateList[] = ['label' => $template->name, 'name' => $template->id];
             }
             $schema['type'] = 'picklist';
             $schema['values'] = $templateList;
             $schema['label'] = $label . ' Template';
             $schema['description'] = 'Select an Email template to use for ' . $label . '.';
             break;
     }
 }
Ejemplo n.º 10
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'username':
             $schema['label'] = 'Username';
             $schema['description'] = 'Username required to connect to Salesforce database.';
             break;
         case 'password':
             $schema['label'] = 'Password';
             $schema['description'] = 'Password required to connect to Salesforce database.';
             break;
         case 'security_token':
             $schema['label'] = 'Security Token';
             $schema['description'] = 'Security token for your Salesforce account.';
             break;
     }
 }
Ejemplo n.º 11
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'region':
             $schema['type'] = 'picklist';
             $schema['values'] = [['label' => 'US EAST (N Virgina)', 'name' => 'us-east-1'], ['label' => 'US WEST (N California)', 'name' => 'us-west-1'], ['label' => 'US WEST (Oregon)', 'name' => 'us-west-2'], ['label' => 'EU (Ireland)', 'name' => 'eu-west-1'], ['label' => 'EU (Frankfurt)', 'name' => 'eu-central-1'], ['label' => 'Asia Pacific (Singapore)', 'name' => 'ap-southeast-1'], ['label' => 'Asia Pacific (Sydney)', 'name' => 'ap-southeast-2'], ['label' => 'Asia Pacific (Tokyo)', 'name' => 'ap-northeast-1'], ['label' => 'South America (Sao Paulo)', 'name' => 'sa-east-1']];
             $schema['description'] = 'Select the region to be accessed by this service connection.';
             break;
         case 'key':
             $schema['label'] = 'Access Key ID';
             $schema['description'] = 'An AWS account root or IAM access key.';
             break;
         case 'secret':
             $schema['label'] = 'Secret Access Key';
             $schema['description'] = 'An AWS account root or IAM secret key.';
             break;
     }
 }
Ejemplo n.º 12
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'dsn':
             $schema['label'] = 'Connection String';
             $schema['default'] = 'mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db';
             $schema['description'] = 'The connection string for the service. The username, password, and db values can be added in the connection string or in the options below.' . ' For further information, see http://php.net/manual/en/mongoclient.construct.php.';
             break;
         case 'options':
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'An array of options for the connection.' . ' For further options, see http://php.net/manual/en/mongoclient.construct.php.';
             break;
         case 'driver_options':
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'An array of options for the MongoDB driver, currently just supporting "context".' . ' For further information, see http://php.net/manual/en/mongo.connecting.ssl.php#mongo.connecting.context.ssl.';
             break;
     }
 }
Ejemplo n.º 13
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'driver':
             $values = ConnectionFactory::getAllDrivers();
             $schema['type'] = 'picklist';
             $schema['values'] = $values;
             $schema['affects'] = 'dsn';
             $schema['description'] = 'Select the driver that matches the database type for which you want to connect.' . ' For further information, see http://php.net/manual/en/pdo.drivers.php.';
             break;
         case 'dsn':
             $schema['label'] = 'Connection String (DSN)';
             $schema['description'] = 'The Data Source Name, or DSN, contains the information required to connect to the database.' . ' For further information, see http://php.net/manual/en/pdo.construct.php.';
             break;
         case 'username':
             $schema['type'] = 'string';
             $schema['description'] = 'The name of the database user. This can be a lookup key.';
             break;
         case 'password':
             $schema['type'] = 'password';
             $schema['description'] = 'The password for the database user. This can be a lookup key.';
             break;
         case 'options':
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'A key=>value array of connection options.';
             break;
         case 'attributes':
             $schema['type'] = 'object';
             $schema['object'] = ['key' => ['label' => 'Name', 'type' => 'string'], 'value' => ['label' => 'Value', 'type' => 'string']];
             $schema['description'] = 'A key=>value array of attributes to be set after connection.' . ' For further information, see http://php.net/manual/en/pdo.setattribute.php';
             break;
         case 'default_schema_only':
             $schema['description'] = 'Do not include other schemas/databases on this server ' . 'regardless of permissions given to the supplied credentials.';
             break;
     }
 }
Ejemplo n.º 14
0
 /**
  * @param array $schema
  */
 protected static function prepareConfigSchemaField(array &$schema)
 {
     parent::prepareConfigSchemaField($schema);
     switch ($schema['name']) {
         case 'base_url':
             $schema['label'] = 'Base URL';
             $schema['type'] = 'text';
             $schema['description'] = 'This is the root for the external call, additional resource path and parameters from client, ' . 'along with provisioned parameters and headers, will be added.';
             break;
     }
 }