Fossil SCM
added the behavior section to the admin page. It allows the user to enter fossil settings via the web ui
Commit
92e85dc68e519db94683f8868f3f17d774a92fd0
Parent
d21b90e365b5eb9…
1 file changed
+83
+83
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -64,10 +64,12 @@ | ||
| 64 | 64 | "Grant privileges to individual users."); |
| 65 | 65 | setup_menu_entry("Access", "setup_access", |
| 66 | 66 | "Control access settings."); |
| 67 | 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | 68 | "Configure the WWW components of the repository"); |
| 69 | + setup_menu_entry("Behavior", "setup_behavior", | |
| 70 | + "Configure the SCM behavior of the repository"); | |
| 69 | 71 | setup_menu_entry("Timeline", "setup_timeline", |
| 70 | 72 | "Timeline display preferences"); |
| 71 | 73 | setup_menu_entry("Tickets", "tktsetup", |
| 72 | 74 | "Configure the trouble-ticketing system for this repository"); |
| 73 | 75 | setup_menu_entry("CSS", "setup_editcss", |
| @@ -779,10 +781,91 @@ | ||
| 779 | 781 | entry_attribute("Max timeline comment length", 6, |
| 780 | 782 | "timeline-max-comment", "tmc", "0"); |
| 781 | 783 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 782 | 784 | @ "0" there is no length limit.</p> |
| 783 | 785 | |
| 786 | + @ <hr> | |
| 787 | + @ <p><input type="submit" name="submit" value="Apply Changes"></p> | |
| 788 | + @ </form> | |
| 789 | + db_end_transaction(0); | |
| 790 | + style_footer(); | |
| 791 | +} | |
| 792 | + | |
| 793 | +/* | |
| 794 | +** WEBPAGE: setup_behavior | |
| 795 | +*/ | |
| 796 | +void setup_behavior(void){ | |
| 797 | + login_check_credentials(); | |
| 798 | + if( !g.okSetup ){ | |
| 799 | + login_needed(); | |
| 800 | + } | |
| 801 | + | |
| 802 | + style_header("Fossil SCM behavior"); | |
| 803 | + db_begin_transaction(); | |
| 804 | + @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST"> | |
| 805 | + login_insert_csrf_secret(); | |
| 806 | + | |
| 807 | + @ <hr> | |
| 808 | + onoff_attribute("Automatically synchronize with repository", | |
| 809 | + "autosync", "autosync", 0); | |
| 810 | + @ <p>Automatically keeps your work in sync with a centralized server.</p> | |
| 811 | + | |
| 812 | + @ <hr> | |
| 813 | + onoff_attribute("Sign all commits with gpg", | |
| 814 | + "clearsign", "clearsign", 0); | |
| 815 | + @ <p>When enabled (the default), fossil will attempt to | |
| 816 | + @ sign all commits with gpg. When disabled, commits will | |
| 817 | + @ be unsigned.</p> | |
| 818 | + | |
| 819 | + @ <hr> | |
| 820 | + onoff_attribute("Require local authentication", | |
| 821 | + "localauth", "localauth", 0); | |
| 822 | + @ <p>If enabled, require that HTTP connections from | |
| 823 | + @ 127.0.0.1 be authenticated by password. If | |
| 824 | + @ false, all HTTP requests from localhost have | |
| 825 | + @ unrestricted access to the repository.</p> | |
| 826 | + | |
| 827 | + @ <hr> | |
| 828 | + onoff_attribute("Modification times used to detect changes", | |
| 829 | + "mtime-changes", "mtime-changes", 0); | |
| 830 | + @ <p>Use file modification times (mtimes) to detect when files have been modified.</p> | |
| 831 | + | |
| 832 | + @ <hr> | |
| 833 | + entry_attribute("Diff Command", 16, | |
| 834 | + "diff-command", "diff-command", "diff"); | |
| 835 | + @ <p>External command used to generate a textual diff</p> | |
| 836 | + | |
| 837 | + @ <hr> | |
| 838 | + entry_attribute("Gdiff Command", 16, | |
| 839 | + "gdiff-command", "gdiff-command", "gdiff"); | |
| 840 | + @ <p>External command to run when performing a graphical diff. If undefined, text diff will be used.</p> | |
| 841 | + | |
| 842 | + @ <hr> | |
| 843 | + entry_attribute("Editor", 16, | |
| 844 | + "editor", "editor", ""); | |
| 845 | + @ <p>Text editor command used for check-in comments.</p> | |
| 846 | + | |
| 847 | + @ <hr> | |
| 848 | + entry_attribute("HTTP port", 16, | |
| 849 | + "http-port", "http-port", "8080"); | |
| 850 | + @ <p>The TCP/IP port number to use by the "server" and "ui" commands. Default: 8080</p> | |
| 851 | + | |
| 852 | + @ <hr> | |
| 853 | + entry_attribute("PGP Command", 32, | |
| 854 | + "pgp-command", "pgp-command", "gpg --clearsign -o "); | |
| 855 | + @ <p>Command used to clear-sign manifests at check-in.The default is "gpg --clearsign -o ".</p> | |
| 856 | + | |
| 857 | + @ <hr> | |
| 858 | + entry_attribute("Proxy", 32, | |
| 859 | + "proxy", "proxy", "off"); | |
| 860 | + @ <p>URL of the HTTP proxy.</p> | |
| 861 | + | |
| 862 | + @ <hr> | |
| 863 | + entry_attribute("Web browser", 32, | |
| 864 | + "web-browser", "web-browser", ""); | |
| 865 | + @ <p>Default web browser for "fossil ui".</p> | |
| 866 | + | |
| 784 | 867 | @ <hr> |
| 785 | 868 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 786 | 869 | @ </form> |
| 787 | 870 | db_end_transaction(0); |
| 788 | 871 | style_footer(); |
| 789 | 872 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -64,10 +64,12 @@ | |
| 64 | "Grant privileges to individual users."); |
| 65 | setup_menu_entry("Access", "setup_access", |
| 66 | "Control access settings."); |
| 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | "Configure the WWW components of the repository"); |
| 69 | setup_menu_entry("Timeline", "setup_timeline", |
| 70 | "Timeline display preferences"); |
| 71 | setup_menu_entry("Tickets", "tktsetup", |
| 72 | "Configure the trouble-ticketing system for this repository"); |
| 73 | setup_menu_entry("CSS", "setup_editcss", |
| @@ -779,10 +781,91 @@ | |
| 779 | entry_attribute("Max timeline comment length", 6, |
| 780 | "timeline-max-comment", "tmc", "0"); |
| 781 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 782 | @ "0" there is no length limit.</p> |
| 783 | |
| 784 | @ <hr> |
| 785 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 786 | @ </form> |
| 787 | db_end_transaction(0); |
| 788 | style_footer(); |
| 789 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -64,10 +64,12 @@ | |
| 64 | "Grant privileges to individual users."); |
| 65 | setup_menu_entry("Access", "setup_access", |
| 66 | "Control access settings."); |
| 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | "Configure the WWW components of the repository"); |
| 69 | setup_menu_entry("Behavior", "setup_behavior", |
| 70 | "Configure the SCM behavior of the repository"); |
| 71 | setup_menu_entry("Timeline", "setup_timeline", |
| 72 | "Timeline display preferences"); |
| 73 | setup_menu_entry("Tickets", "tktsetup", |
| 74 | "Configure the trouble-ticketing system for this repository"); |
| 75 | setup_menu_entry("CSS", "setup_editcss", |
| @@ -779,10 +781,91 @@ | |
| 781 | entry_attribute("Max timeline comment length", 6, |
| 782 | "timeline-max-comment", "tmc", "0"); |
| 783 | @ <p>The maximum length of a comment to be displayed in a timeline. |
| 784 | @ "0" there is no length limit.</p> |
| 785 | |
| 786 | @ <hr> |
| 787 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 788 | @ </form> |
| 789 | db_end_transaction(0); |
| 790 | style_footer(); |
| 791 | } |
| 792 | |
| 793 | /* |
| 794 | ** WEBPAGE: setup_behavior |
| 795 | */ |
| 796 | void setup_behavior(void){ |
| 797 | login_check_credentials(); |
| 798 | if( !g.okSetup ){ |
| 799 | login_needed(); |
| 800 | } |
| 801 | |
| 802 | style_header("Fossil SCM behavior"); |
| 803 | db_begin_transaction(); |
| 804 | @ <form action="%s(g.zBaseURL)/setup_behavior" method="POST"> |
| 805 | login_insert_csrf_secret(); |
| 806 | |
| 807 | @ <hr> |
| 808 | onoff_attribute("Automatically synchronize with repository", |
| 809 | "autosync", "autosync", 0); |
| 810 | @ <p>Automatically keeps your work in sync with a centralized server.</p> |
| 811 | |
| 812 | @ <hr> |
| 813 | onoff_attribute("Sign all commits with gpg", |
| 814 | "clearsign", "clearsign", 0); |
| 815 | @ <p>When enabled (the default), fossil will attempt to |
| 816 | @ sign all commits with gpg. When disabled, commits will |
| 817 | @ be unsigned.</p> |
| 818 | |
| 819 | @ <hr> |
| 820 | onoff_attribute("Require local authentication", |
| 821 | "localauth", "localauth", 0); |
| 822 | @ <p>If enabled, require that HTTP connections from |
| 823 | @ 127.0.0.1 be authenticated by password. If |
| 824 | @ false, all HTTP requests from localhost have |
| 825 | @ unrestricted access to the repository.</p> |
| 826 | |
| 827 | @ <hr> |
| 828 | onoff_attribute("Modification times used to detect changes", |
| 829 | "mtime-changes", "mtime-changes", 0); |
| 830 | @ <p>Use file modification times (mtimes) to detect when files have been modified.</p> |
| 831 | |
| 832 | @ <hr> |
| 833 | entry_attribute("Diff Command", 16, |
| 834 | "diff-command", "diff-command", "diff"); |
| 835 | @ <p>External command used to generate a textual diff</p> |
| 836 | |
| 837 | @ <hr> |
| 838 | entry_attribute("Gdiff Command", 16, |
| 839 | "gdiff-command", "gdiff-command", "gdiff"); |
| 840 | @ <p>External command to run when performing a graphical diff. If undefined, text diff will be used.</p> |
| 841 | |
| 842 | @ <hr> |
| 843 | entry_attribute("Editor", 16, |
| 844 | "editor", "editor", ""); |
| 845 | @ <p>Text editor command used for check-in comments.</p> |
| 846 | |
| 847 | @ <hr> |
| 848 | entry_attribute("HTTP port", 16, |
| 849 | "http-port", "http-port", "8080"); |
| 850 | @ <p>The TCP/IP port number to use by the "server" and "ui" commands. Default: 8080</p> |
| 851 | |
| 852 | @ <hr> |
| 853 | entry_attribute("PGP Command", 32, |
| 854 | "pgp-command", "pgp-command", "gpg --clearsign -o "); |
| 855 | @ <p>Command used to clear-sign manifests at check-in.The default is "gpg --clearsign -o ".</p> |
| 856 | |
| 857 | @ <hr> |
| 858 | entry_attribute("Proxy", 32, |
| 859 | "proxy", "proxy", "off"); |
| 860 | @ <p>URL of the HTTP proxy.</p> |
| 861 | |
| 862 | @ <hr> |
| 863 | entry_attribute("Web browser", 32, |
| 864 | "web-browser", "web-browser", ""); |
| 865 | @ <p>Default web browser for "fossil ui".</p> |
| 866 | |
| 867 | @ <hr> |
| 868 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 869 | @ </form> |
| 870 | db_end_transaction(0); |
| 871 | style_footer(); |
| 872 |