updates
This commit is contained in:
@@ -181,7 +181,7 @@ Navigate to localhost/index.php to verify that localhost is able to serve your s
|
||||
With all these changes done, your apache server should be able to serve web resources from your new document root. You can further go ahead and configure your DNS records to point your domains to your server's IP at this step.
|
||||
|
||||
Downloading and setting up Composer
|
||||
-----------------
|
||||
------------------------------------
|
||||
|
||||
Follow the instructions provided on the official [composer website](https://getcomposer.org/download/) to download and install composer package manager. Once installed, it's advisable to move the composer executable to the /usr/local/bin/ directory so that it can be easily accessed from anywhere in your terminal. To do so, use the following commands:
|
||||
|
||||
|
||||
2
public/index.php
vendored
2
public/index.php
vendored
@@ -15,7 +15,7 @@ return function (array $context) {
|
||||
}
|
||||
|
||||
// Only attempt to set permissions if we're NOT in Docker
|
||||
if (!isRunningInDocker()) {
|
||||
if (! isRunningInDocker()) {
|
||||
$basePath = dirname(__DIR__);
|
||||
$files = [
|
||||
'env' => $basePath . '/.env',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
error500: {
|
||||
title: 'Something\'s bad happened with the server.',
|
||||
description: ' Try again by clicking the back button or launch the wizard again by refershing the webpage or clicking the cancel button.'
|
||||
description: ' Try again by clicking the back button or launch the wizard again by refreshing the web page or clicking the cancel button.'
|
||||
},
|
||||
};
|
||||
|
||||
@@ -112,10 +112,13 @@
|
||||
this.view = attributes.view;
|
||||
},
|
||||
getDefaultAttributes: function () {
|
||||
// function to fetch current saved prefixes and will update values of defaults
|
||||
// Function to fetch current saved prefixes and will update values of defaults
|
||||
return new Promise ((resolve, reject) => {
|
||||
$.get('./wizard/xhr/website-configure', (response) => {
|
||||
if (typeof response.status != 'undefined' && true === response.status) {
|
||||
if (
|
||||
typeof response.status != 'undefined'
|
||||
&& true === response.status
|
||||
) {
|
||||
this.defaults['member_panel_url'] = response.memberPrefix;
|
||||
this.defaults['customer_panel_url'] = response.knowledgebasePrefix;
|
||||
resolve();
|
||||
@@ -130,7 +133,7 @@
|
||||
},
|
||||
isProcedureCompleted: function (callback) {
|
||||
this.set('urlCollection', {
|
||||
'member-prefix': this.view.$el.find('input[name="memeberUrlPrefix"]').val(),
|
||||
'member-prefix': this.view.$el.find('input[name="memberUrlPrefix"]').val(),
|
||||
'customer-prefix': this.view.$el.find('input[name="customerUrlPrefix"]').val(),
|
||||
});
|
||||
|
||||
@@ -181,15 +184,21 @@
|
||||
event.preventDefault();
|
||||
this.$el.find('.form-content .wizard-form-notice').remove();
|
||||
|
||||
let memberPrefix = this.$el.find('input[name="memeberUrlPrefix"]').val();
|
||||
let memberPrefix = this.$el.find('input[name="memberUrlPrefix"]').val();
|
||||
let customerPrefix = this.$el.find('input[name="customerUrlPrefix"]').val();
|
||||
|
||||
if (memberPrefix == null || memberPrefix =="") {
|
||||
if (
|
||||
memberPrefix == null
|
||||
|| memberPrefix == ""
|
||||
) {
|
||||
errorFlag = true;
|
||||
this.$el.find('.form-content input[name="memeberUrlPrefix"]').after("<span class='wizard-form-notice'>This field is mandatory</span>")
|
||||
this.$el.find('.form-content input[name="memberUrlPrefix"]').after("<span class='wizard-form-notice'>This field is mandatory</span>")
|
||||
}
|
||||
|
||||
if (customerPrefix == null || customerPrefix =="") {
|
||||
if (
|
||||
customerPrefix == null
|
||||
|| customerPrefix == ""
|
||||
) {
|
||||
errorFlag = true;
|
||||
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("<span class='wizard-form-notice'>This field is mandatory</span>")
|
||||
}
|
||||
@@ -199,15 +208,15 @@
|
||||
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("<span class='wizard-form-notice'>Both prefixes can not be same.</span>")
|
||||
}
|
||||
|
||||
if (!errorFlag) {
|
||||
if (! errorFlag) {
|
||||
let prefixTestRegex = /^[a-z0-9A-Z]*$/;
|
||||
|
||||
if (!prefixTestRegex.test(memberPrefix)) {
|
||||
if (! prefixTestRegex.test(memberPrefix)) {
|
||||
errorFlag = true;
|
||||
this.$el.find('.form-content input[name="memeberUrlPrefix"]').after("<span class='wizard-form-notice'>Only letters and numbers are allowed</span>")
|
||||
this.$el.find('.form-content input[name="memberUrlPrefix"]').after("<span class='wizard-form-notice'>Only letters and numbers are allowed</span>")
|
||||
}
|
||||
|
||||
if (!prefixTestRegex.test(customerPrefix)) {
|
||||
if (! prefixTestRegex.test(customerPrefix)) {
|
||||
errorFlag = true;
|
||||
this.$el.find('.form-content input[name="customerUrlPrefix"]').after("<span class='wizard-form-notice'>Only letters and numbers are allowed</span>")
|
||||
}
|
||||
@@ -250,7 +259,10 @@
|
||||
wizard.reference_nodes.content.find('#wizardCTA-IterateInstallation').prepend('<span class="processing-request">' + wizard.wizard_icons_loader_template() + '</span>');
|
||||
|
||||
$.post('./wizard/xhr/intermediary/super-user', this.get('user'), function (response) {
|
||||
if (typeof response.status != 'undefined' && true === response.status) {
|
||||
if (
|
||||
typeof response.status != 'undefined'
|
||||
&& true === response.status
|
||||
) {
|
||||
callback(this.view);
|
||||
} else {
|
||||
wizard.disableNextStep();
|
||||
@@ -301,41 +313,66 @@
|
||||
|
||||
enteredField = event.target.name;
|
||||
enteredValue = event.target.value;
|
||||
if (enteredValue == null || enteredValue == "") {
|
||||
if (
|
||||
enteredValue == null
|
||||
|| enteredValue == ""
|
||||
) {
|
||||
errorFlag = true;
|
||||
selectedElement.find('.wizard-form-notice')
|
||||
selectedElement.append("<span class='wizard-form-notice'>This field is mandatory</span>");
|
||||
}
|
||||
|
||||
if (!errorFlag && user.name) {
|
||||
if (!nameRegex.test(user.name)) {
|
||||
if (
|
||||
! errorFlag
|
||||
&& user.name
|
||||
) {
|
||||
if (! nameRegex.test(user.name)) {
|
||||
errorFlag = true;
|
||||
this.$el.find('input[name="name"]').parent().append("<span class='wizard-form-notice'>Invalid Name</span>")
|
||||
}
|
||||
}
|
||||
|
||||
if (!errorFlag && user.email !== "") {
|
||||
if (!emailRegex.test(user.email)) {
|
||||
if (
|
||||
! errorFlag
|
||||
&& user.email !== ""
|
||||
) {
|
||||
if (! emailRegex.test(user.email)) {
|
||||
errorFlag = true;
|
||||
this.$el.find('input[name="email"]').parent().append("<span class='wizard-form-notice'>Invalid Email</span>")
|
||||
}
|
||||
}
|
||||
|
||||
if (user.password.length > 0 && (!passwordRegix.test(user.password))) {
|
||||
errorFlag = true;
|
||||
this.$el.find('input[name="password"]').parent().append("<span class='wizard-form-notice'>Password must contain minimum 8 character length, at least two letters (not case sensitive), one number, one special character(space is not allowed).</span>")
|
||||
if (
|
||||
user.password.length > 0
|
||||
&& (! passwordRegix.test(user.password))
|
||||
) {
|
||||
errorFlag = true;
|
||||
this.$el.find('input[name="password"]').parent().append("<span class='wizard-form-notice'>Password must contain minimum 8 character length, at least two letters (not case sensitive), one number, one special character(space is not allowed).</span>")
|
||||
}
|
||||
|
||||
if (user.confirmPassword.length > 0 && user.confirmPassword != user.password) {
|
||||
if (
|
||||
user.confirmPassword.length > 0
|
||||
&& user.confirmPassword != user.password
|
||||
) {
|
||||
errorFlag = true;
|
||||
this.$el.find('input[name="confirm_password"]').parent().append("<span class='wizard-form-notice'>Password does not match.</span>")
|
||||
}
|
||||
|
||||
if (!errorFlag && (user.name == null || user.name =="") || (user.email == null || user.email =="") || (user.password == null || user.password =="") || (user.confirmPassword == null || user.confirmPassword ==""))
|
||||
if (
|
||||
! errorFlag
|
||||
&& (user.name == null
|
||||
|| user.name == "")
|
||||
|| (user.email == null
|
||||
|| user.email =="")
|
||||
|| (user.password == null
|
||||
|| user.password =="")
|
||||
|| (user.confirmPassword == null
|
||||
|| user.confirmPassword == "")
|
||||
) {
|
||||
errorFlag = true;
|
||||
|
||||
|
||||
if (!errorFlag) {
|
||||
}
|
||||
|
||||
if (! errorFlag) {
|
||||
this.wizard.enableNextStep();
|
||||
|
||||
if (event.keyCode == 13) {
|
||||
@@ -345,7 +382,6 @@
|
||||
} else {
|
||||
this.wizard.disableNextStep();
|
||||
}
|
||||
|
||||
}, 400),
|
||||
});
|
||||
|
||||
@@ -631,16 +667,16 @@
|
||||
} else if (this.get('php-configfiles-permission').hasOwnProperty('configfiles')) {
|
||||
let configfiles = this.get('php-configfiles-permission').configfiles;
|
||||
|
||||
let isconfigfilesError;
|
||||
let isConfigFilesError;
|
||||
configfiles.forEach(configfiles => {
|
||||
let currentconfigfileName = Object.keys(configfiles)[0];
|
||||
if (!configfiles[currentconfigfileName]) {
|
||||
isconfigfilesError = true;
|
||||
isConfigFilesError = true;
|
||||
this.set('verified', false);
|
||||
}
|
||||
});
|
||||
|
||||
if (!isconfigfilesError) {
|
||||
if (! isConfigFilesError) {
|
||||
this.set('verified', true);
|
||||
}
|
||||
} else if (this.get('php-extensions').hasOwnProperty('extensions')) {
|
||||
@@ -655,7 +691,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
if (!isExtensionError) {
|
||||
if (! isExtensionError) {
|
||||
this.set('verified', true);
|
||||
}
|
||||
} else {
|
||||
@@ -1083,7 +1119,7 @@
|
||||
|
||||
this.renderWizard();
|
||||
} else {
|
||||
if (!this.enabled) {
|
||||
if (! this.enabled) {
|
||||
this.router.navigate('welcome', { trigger: true });
|
||||
} else {
|
||||
this.timeline.every(function (installationStep, index) {
|
||||
|
||||
@@ -447,15 +447,15 @@ class ConfigureHelpdesk extends Command
|
||||
private function refreshDatabaseConnection($host, $port, $name, $user, $password)
|
||||
{
|
||||
$response = [
|
||||
'isServerAccessible' => true,
|
||||
'isServerAccessible' => true,
|
||||
'isDatabaseAccessible' => true,
|
||||
];
|
||||
|
||||
$entityManager = EntityManager::create([
|
||||
'driver' => 'pdo_mysql',
|
||||
"host" => $host,
|
||||
"port" => $port,
|
||||
'user' => $user,
|
||||
'driver' => 'pdo_mysql',
|
||||
"host" => $host,
|
||||
"port" => $port,
|
||||
'user' => $user,
|
||||
'password' => $password,
|
||||
], Setup::createAnnotationMetadataConfiguration(['src/Entity'], false));
|
||||
|
||||
@@ -471,7 +471,7 @@ class ConfigureHelpdesk extends Command
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
|
||||
if (! in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
|
||||
$response['isDatabaseAccessible'] = false;
|
||||
}
|
||||
|
||||
@@ -492,10 +492,10 @@ class ConfigureHelpdesk extends Command
|
||||
private function createDatabase($host, $port, $name, $user, $password)
|
||||
{
|
||||
$entityManager = EntityManager::create([
|
||||
'driver' => 'pdo_mysql',
|
||||
"host" => $host,
|
||||
"port" => $port,
|
||||
'user' => $user,
|
||||
'driver' => 'pdo_mysql',
|
||||
"host" => $host,
|
||||
"port" => $port,
|
||||
'user' => $user,
|
||||
'password' => $password,
|
||||
], Setup::createAnnotationMetadataConfiguration(['src/Entity'], false));
|
||||
|
||||
@@ -509,7 +509,7 @@ class ConfigureHelpdesk extends Command
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
|
||||
if (! in_array($name, $databaseConnection->getSchemaManager()->listDatabases())) {
|
||||
try {
|
||||
// Create database
|
||||
$databaseConnection->getSchemaManager()->createDatabase($databaseConnection->getDatabasePlatform()->quoteSingleIdentifier($name));
|
||||
@@ -592,7 +592,7 @@ class ConfigureHelpdesk extends Command
|
||||
$this->consoleOutput->write(false == $flag ? [self::MCA, self::CLL] : [self::MCA, self::CLL, self::MCA, self::CLL]);
|
||||
|
||||
if (empty($input) && false == $nullable && empty($default)) {
|
||||
if (!empty($default)) {
|
||||
if (! empty($default)) {
|
||||
$input = $default;
|
||||
} else if (false == $nullable) {
|
||||
$flag = true;
|
||||
|
||||
@@ -280,7 +280,7 @@ class DefaultUser extends Command
|
||||
$output->writeln(sprintf(" <comment>Warning</comment>: %sPassword cannot be left blank", $confirmDialog ? 'Confirm ' : ''));
|
||||
} else if (false == $confirmDialog && (strlen($password) < 8 || strlen($password) > 32)) {
|
||||
$warningFlag = true;
|
||||
// Sanatize password and compare if they match
|
||||
// Sanitize password and compare if they match
|
||||
$output->writeln(" <comment>Warning</comment>: Password needs to be 8-32 characters long");
|
||||
$password = null;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,10 @@ class MigrateDatabase extends Command
|
||||
->compareMigrations($output)
|
||||
->getLatestMigrationVersion(new BufferedOutput());
|
||||
|
||||
if (('0' != $currentMigrationVersion && $currentMigrationVersion != $latestMigrationVersion) || ($currentMigrationVersion != $latestMigrationVersion)) {
|
||||
if (
|
||||
('0' != $currentMigrationVersion && $currentMigrationVersion != $latestMigrationVersion)
|
||||
|| ($currentMigrationVersion != $latestMigrationVersion)
|
||||
) {
|
||||
$this->migrateDatabaseToLatestVersion(new NullOutput());
|
||||
}
|
||||
} catch (NoChangesDetected $e) {
|
||||
@@ -80,8 +83,8 @@ class MigrateDatabase extends Command
|
||||
$command = $this->getApplication()->find('doctrine:migrations:version');
|
||||
($consoleOptions = new ConsoleOptions([
|
||||
'command' => 'migrations:version',
|
||||
'--add' => true,
|
||||
'--all' => true,
|
||||
'--add' => true,
|
||||
'--all' => true,
|
||||
'--quiet' => true
|
||||
]))->setInteractive(false);
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
<div class="form-field">
|
||||
<label class="form-label">Member Panel Prefix<span class="uv-mandatory">*</span></label>
|
||||
<div class="form-content">
|
||||
<input name="memeberUrlPrefix" type="text" value="<%- member_panel_url %>" placeholder="member" class="form-content"/>
|
||||
<input name="memberUrlPrefix" type="text" value="<%- member_panel_url %>" placeholder="member" class="form-content"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
|
||||
Reference in New Issue
Block a user