summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_update_settings.php
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-09-29 20:53:38 -0700
committerNOYB <Al_Stu@Frontier.com>2017-01-22 15:54:12 -0800
commit625dc2170db28e5db48d3dd2633f8e845db6b8cd (patch)
tree690b730967b3f0a1735cdfb2c3489acda1e49e05 /src/usr/local/www/system_update_settings.php
parentd22617f313da52a9fc14d6f4bfb72784b4fe6004 (diff)
downloadpfsense-625dc2170db28e5db48d3dd2633f8e845db6b8cd.zip
pfsense-625dc2170db28e5db48d3dd2633f8e845db6b8cd.tar.gz
System Update Settings - GitSync Options
Add GitSync options selectors to post update GitSync. Minimal, Diff, Verbose, Dry Run The GitSync options have utility for post update sync also.
Diffstat (limited to 'src/usr/local/www/system_update_settings.php')
-rw-r--r--src/usr/local/www/system_update_settings.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php
index 9411cff..cca7860 100644
--- a/src/usr/local/www/system_update_settings.php
+++ b/src/usr/local/www/system_update_settings.php
@@ -98,6 +98,36 @@ if ($_POST) {
}
}
+ if ($_POST['minimal'] == "yes") {
+ $config['system']['gitsync']['minimal'] = true;
+ } else {
+ unset($config['system']['gitsync']['minimal']);
+ }
+
+ if ($_POST['diff'] == "yes") {
+ $config['system']['gitsync']['diff'] = true;
+ } else {
+ unset($config['system']['gitsync']['diff']);
+ }
+
+ if ($_POST['show_files'] == "yes") {
+ $config['system']['gitsync']['show_files'] = true;
+ } else {
+ unset($config['system']['gitsync']['show_files']);
+ }
+
+ if ($_POST['show_command'] == "yes") {
+ $config['system']['gitsync']['show_command'] = true;
+ } else {
+ unset($config['system']['gitsync']['show_command']);
+ }
+
+ if ($_POST['dryrun'] == "yes") {
+ $config['system']['gitsync']['dryrun'] = true;
+ } else {
+ unset($config['system']['gitsync']['dryrun']);
+ }
+
write_config();
$savemsg = gettext("Changes have been saved successfully");
@@ -226,6 +256,46 @@ if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) {
))->setHelp('The most recently used branch was "%s". (Usually the branch name is RELENG_2_3)' .
'<br />Note: Sync will not be performed if a branch is not specified.', [$lastbranch]);
+ $group = new Form_Group('Sync options');
+
+ $group->add(new Form_Checkbox(
+ 'minimal',
+ null,
+ 'Minimal',
+ isset($gitcfg['minimal'])
+ ))->setHelp('Copy of only the updated files.');
+
+ $group->add(new Form_Checkbox(
+ 'diff',
+ null,
+ 'Diff',
+ isset($gitcfg['diff'])
+ ))->setHelp('Copy of only the different or missing files.');
+
+ $group->add(new Form_Checkbox(
+ 'show_files',
+ null,
+ 'Show Files',
+ isset($gitcfg['show_files'])
+ ))->setHelp('Show different and missing files.<br />With \'Diff/Minimal\' option..');
+
+ $group->add(new Form_Checkbox(
+ 'show_command',
+ null,
+ 'Show Command',
+ isset($gitcfg['show_command'])
+ ))->setHelp('Show constructed command.<br />With \'Diff/Minimal\' option.');
+
+ $group->add(new Form_Checkbox(
+ 'dryrun',
+ null,
+ 'Dry Run',
+ isset($gitcfg['dryrun'])
+ ))->setHelp('Dry-run only.<br />No files copied.');
+
+ $group->setHelp('See "playback gitsync --help" in console "PHP Shell + pfSense tools" for additional information.');
+ $section->add($group);
+
$form->add($section);
} // e-o-if (file_exists())
OpenPOWER on IntegriCloud