Skip to content

Commit

Permalink
Installer Overhaul (#1698)
Browse files Browse the repository at this point in the history
* #1583 initial workflow update using debug reference in config for install dir bypass

* #1583 add missed files

* #1583 improve config generation

* #1583 clean up docblock (issue feedback)

* fix https detection, corrected pull from upstream

* #1583 improve docker build config

* #1583 remove docker configs from repo, they have been moved to dev workflow documentation

* #1683 replace installer template assets

* #1683 initial UI layout overhaul, still need to port in some original UI logic

* #1683 initial backend overhaul, also still needs work

* #1683 misc cleanup, move license placement

* #1683 rename installer result template

* improve layout and content, fix variable naming #1683

* small fixes, readability improvement #1683

* stop passing references everywhere... use class variable instead #1683

* refactor unnecessary methods, improve more class variable references, optimize exception flow, remove duplicated method calls, verbose commenting/method renaming/code flow adjustment for readability #1683

* rename installer class (I think we deserve it at this point...) #1683

* improve form submission UX #1683

* block install if subfolder is detected #1683

* add validation for checking if we are already installed, secure against tampered requests #1683

* touch up install result for better onboarding #1683

* conver theme to jsdelivr, delete local picocss assets #1683

* fix typos #1683

* Use a local CSS file, other minor improvements

* Implemented new functionality on the install page

* Bug fix, make it more space efficient

* Minor fix

* Casing and minor JavaScript changes

* Adjusted the buttons

* Fix the blank screen issue

* window -> tab

* match other link tooltip adjustments

* update subfolder installations documentation link

* add Database prefix to db field labels

* Sentence case

* agreement checkbox

---------

Co-authored-by: Belle Aerni <[email protected]>
Co-authored-by: Yağızhan <[email protected]>
  • Loading branch information
3 people authored Oct 12, 2023
1 parent f5b779c commit e0d412a
Show file tree
Hide file tree
Showing 40 changed files with 603 additions and 2,178 deletions.
1,112 changes: 0 additions & 1,112 deletions src/install/assets/css/main.css

This file was deleted.

5 changes: 5 additions & 0 deletions src/install/assets/css/pico.min.css

Large diffs are not rendered by default.

Binary file removed src/install/assets/images/adminUser.png
Binary file not shown.
Binary file removed src/install/assets/images/alert2.png
Binary file not shown.
Binary file removed src/install/assets/images/bodyBg.jpg
Binary file not shown.
Binary file removed src/install/assets/images/book.png
Binary file not shown.
Binary file removed src/install/assets/images/bubbles2.png
Binary file not shown.
Binary file removed src/install/assets/images/cog4.png
Binary file not shown.
Binary file removed src/install/assets/images/doc.png
Binary file not shown.
Binary file removed src/install/assets/images/flag.png
Binary file not shown.
Binary file removed src/install/assets/images/leftNavBg.png
Binary file not shown.
Binary file removed src/install/assets/images/loader.gif
Binary file not shown.
Binary file removed src/install/assets/images/middlebg.png
Binary file not shown.
Binary file removed src/install/assets/images/topNav.jpg
Binary file not shown.
Binary file removed src/install/assets/images/ui/basicBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/blackBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/blueBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/greenBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/greyishBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/handle.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/numDataBg.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/pagination.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/progress.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/progressOverlay.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/redBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/seaBtn.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/sliderBg.png
Binary file not shown.
Binary file removed src/install/assets/images/ui/sliderBgVert.png
Diff not rendered.
Binary file removed src/install/assets/images/ui/sliderOverlay.png
Diff not rendered.
Binary file removed src/install/assets/images/ui/sliderOverlayVert.png
Diff not rendered.
Binary file removed src/install/assets/images/ui/spinnerUpDown.png
Diff not rendered.
Binary file removed src/install/assets/images/ui/uploadDisabled.png
Diff not rendered.
Binary file removed src/install/assets/images/user.png
Diff not rendered.
Binary file removed src/install/assets/images/vault.png
Diff not rendered.
663 changes: 281 additions & 382 deletions src/install/assets/install.html.twig

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/install/assets/js/jquery.min.js

This file was deleted.

420 changes: 0 additions & 420 deletions src/install/assets/js/jquery.smartWizard.js

This file was deleted.

99 changes: 58 additions & 41 deletions src/install/assets/layout.html.twig
Original file line number Diff line number Diff line change
@@ -1,42 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FOSSBilling setup</title>
<base href="{{ constant('BB_URL_INSTALL') }}"/>
<link href="./assets/css/main.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="header" class="wrapper">
<div class="logo"><a href="{{ constant('BB_URL_INSTALL') }}" title="FOSSBilling"><img src="../themes/huraga/assets/img/logo.svg" alt="FOSSBilling logo" height="50px" width="238"/></a></div>
<div class="middleNav">
<ul>
<li class="iForum"><a href="https://github.com/FOSSBilling/FOSSBilling/issues" target="_blank" title="Report a bug on GitHub"><span>Report a bug</span></a></li>
<li class="iDocs"><a href="https://fossbilling.org/docs" target="_blank" title="FOSSBilling documentation"><span>Documentation</span></a></li>
</ul>
</div>
<div class="fix"></div>
</div>

<div class="wrapper">
<div class="leftNav">
{% block left %}{% endblock %}
</div>

<div class="content" id="container">
{% block content %}{% endblock %}
</div>
<div class="fix"></div>
</div>

<div id="footer">
<div class="wrapper">
<span>&copy; Copyright {{ now|date('Y') }}. All rights reserved. Powered by <a href="https://fossbilling.org" title="FOSSBilling" target="_blank">FOSSBilling {{version}}</a></span>
</div>
</div>


{% block js %}{% endblock %}
</body>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="./assets/css/pico.min.css" rel="stylesheet">
<title>FOSSBilling Installation</title>
<base href="{{ constant('BB_URL_INSTALL') }}"/>
<style type="text/css">
.green {
color: green;
font-weight: bold;
}
.red {
color: red;
font-weight: bold;
}
.orange {
color: orange;
font-weight: bold;
}
hr {
margin-bottom: 3em;
}
.button-inline {
display: inline;
width: 25%;
}
.float-right-margin {
float: right;
margin-right: 1.5em;
}
.float-left-margin {
float: left;
margin-left: 1.5em;
}
</style>
</head>
<body>
<main class="container">
<nav style='padding-bottom: 1em;'>
<ul>
<li><a href="{{ constant('BB_URL_INSTALL') }}" title="FOSSBilling"><img src="../themes/huraga/assets/img/logo_white.svg" alt="FOSSBilling Logo" height="50px" width="238"/></a></li>
</ul>
<ul>
<li><a href="https://fossbilling.org/docs" target="_blank" data-tooltip="Opens in a new window.">Documentation</a></li>
<li><a href="https://github.com/FOSSBilling/FOSSBilling/issues" target="_blank" data-tooltip="Opens in a new window.">Bug Reports</a></li>
</ul>
</nav>
{% block page %}{% endblock %}
</main>
<footer class="container">
<small>
<span>&copy; Copyright {{ now|date('Y') }}. All rights reserved. Powered by <a href="https://fossbilling.org" title="FOSSBilling" target="_blank" data-tooltip="Opens in a new tab.">FOSSBilling {{version}}</a></span>
</small>
</footer>
{% block javascript %}{% endblock %}
</body>
</html>
41 changes: 41 additions & 0 deletions src/install/assets/result.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends "./assets/layout.html.twig" %}

{% block page %}
{% if success != true %}
<h1 class="red">Installation Failure</h1>

<p>{{ message }}</p>

<hr/>

<a role="button" href='javascript:history.back()'>Go Back</a>
{% else %}
<h1 class="green">Installation Completed</h1>

<p>Congratulations! FOSSBilling was successfully installed.</p>

<p>There are a few more actions you need to take to configure your environment.</p>

<h3>1) Remove Installer</h3>
<p>The <b>./install/</b> folder is normally deleted automatically. Check to make sure it was fully deleted.</p>
<pre>rm -rfv {{ install_module_path }}</pre>

<h3>2) Configuration Permission</h3>
<p>Change the <b>config.php</b> file permissions to read-only.</p>
<pre>chmod 644 {{ config_file_path }}</pre>

<h3>3) Setup Cron Job</h3>
<p>Add the following command into your crontab. <a href='https://fossbilling.org/docs/getting-started/apache#setting-up-the-cron-jobs' data-tooltip="Opens in a new tab." target='_blank'>Click here</a> for help.</p>
<pre>*/5 * * * * php {{ cron_path }}</pre>

<hr/>

<div style='text-align:center;'>
<p style='margin-bottom:3em;'>All done? Welcome to FOSSBilling!</p>
<div class="grid">
<div><a href='{{ url_customer }}' role="button" target='_blank' data-tooltip="Opens in a new tab.">Customer Area</a></div>
<div><a href='{{ url_admin }}' role="button" target='_blank' data-tooltip="Opens in a new tab.">Staff Dashboard</a></div>
</div>
</div>
{% endif %}
{% endblock %}
Loading

0 comments on commit e0d412a

Please sign in to comment.