Compare commits
31 Commits
71011fcafd
...
0.0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dade195a5 | ||
|
|
b61c45b5f4 | ||
|
|
007a959274 | ||
|
|
d0ab6f9803 | ||
|
|
bc0d6b1803 | ||
|
|
4b6b6282e1 | ||
|
|
1b990becc3 | ||
|
|
2c6c0675a2 | ||
|
|
d7b0491fdf | ||
|
|
1dc9a1c734 | ||
|
|
4c234d76fb | ||
|
|
12c1963d67 | ||
|
|
68667f2d86 | ||
|
|
d076c3c3e7 | ||
|
|
29120ab016 | ||
|
|
f9057f2e1e | ||
|
|
38b6dc6a88 | ||
|
|
63f71adf34 | ||
|
|
46fd5c1505 | ||
|
|
9b4239ca1c | ||
|
|
e788ab5d43 | ||
|
|
42d35d6052 | ||
|
|
716f7e8773 | ||
|
|
132efcec34 | ||
|
|
66a24ea889 | ||
|
|
cb914ee60a | ||
|
|
2ff0bb04bd | ||
|
|
4bc89c5d2b | ||
|
|
a61cc67a34 | ||
|
|
6a5905374d | ||
|
|
6a2dfbbde5 |
340
LICENCE
Normal file
@@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
46
README.md
@@ -1,6 +1,46 @@
|
||||
Dependencies
|
||||

|
||||
|
||||
# Welcome
|
||||
|
||||
Welcome to System Installer, a powerful toolkit for setting up an installer for operating systems.
|
||||
|
||||

|
||||
|
||||
Dependencies:
|
||||
- flask
|
||||
- pytest
|
||||
- coverage
|
||||
- libjs-htmx
|
||||
- libjs-material-design-lite
|
||||
- libxapp-gtk3-module
|
||||
- gettext
|
||||
|
||||
Recommended:
|
||||
- libjs-htmx (needed if the web front-end is to be used)
|
||||
- sass-stylesheets-bulma (needed if the web front-end is to be used)
|
||||
|
||||
## Development
|
||||
|
||||
**Please Note:** This project is in early development, and if you have stumbled across this page, please note that it is nowhere near ready for production use yet. Hopefully that changes over the next few months!
|
||||
|
||||
### Translations
|
||||
|
||||
This project uses gettext for translations. More instruction to follow...
|
||||
|
||||
|
||||
### Modules
|
||||
|
||||
Back-end modules:
|
||||
|
||||
* TODO: Explain DMM modules
|
||||
|
||||
Front-end modules:
|
||||
|
||||
* TODO: Explain Flask blueprint files
|
||||
|
||||
API:
|
||||
|
||||
A stable API doesn't exist yet, but it's planned!
|
||||
|
||||
## License
|
||||
|
||||
This software is released under the GPL-2 license or later. See the LICENSE
|
||||
file for additional details.
|
||||
|
||||
BIN
docs/hex-sticker.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docs/screenshots/users.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/screenshots/welcome.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
src/applets/disks/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/disks/__pycache__/routes.cpython-312.pyc
Normal file
@@ -1,51 +1,41 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<h1 class="is-size-3"> Disks and Partitions </h1>
|
||||
<div style="">
|
||||
|
||||
<br>
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="/welcome">Welcome</a></li>
|
||||
<li><a href="/users">Users</a></li>
|
||||
<li class="is-active"><a href="/disks">Disks</a></li>
|
||||
<li><a href="/software">Software</a></li>
|
||||
<li><a href="/summary">Summary</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<p> How would you like to install Debian?</p>
|
||||
<p><b>How would you like to install Debian?</b></p>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="radios">
|
||||
<label class="radio">
|
||||
<input type="radio" name="rsvp" />
|
||||
Preconfigured partitioning
|
||||
<label class="radio">
|
||||
<input type="radio" name="rsvp" disabled />
|
||||
Erase entire disk
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="rsvp" />
|
||||
<input type="radio" name="rsvp" disabled />
|
||||
Install alongside another operating system
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="rsvp" disabled />
|
||||
Define your own disk and partitioning setup
|
||||
Edit existing partitions
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="columns" width="100%">
|
||||
<div class="column"><p> <br>Proposed layout: </p></div>
|
||||
</div>
|
||||
|
||||
<p> Proposed layout: </p>
|
||||
<br>
|
||||
|
||||
<div style="background-color: gray; padding: 15px; border-radius: 15px;">
|
||||
<p> <span style="width: 100%;" class="tag is-black">Physical disk: TOSHIBA HDWD120 (2000 GB)<span class="tag is-primary">Healthy</span></span> </p>
|
||||
<!--
|
||||
<div style="">
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">Physical disk: TOSHIBA HDWD120 (2000 GB) <br>
|
||||
<div class="columns">
|
||||
<div class="column is-narrow is-primary">
|
||||
<div class="box" style="width: 220px;">
|
||||
<div class="box" style="min-width: 220px; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px;">
|
||||
<p class="is-tiny">/dev/sda1</p>
|
||||
<p class="title is-5"><span class="tag is-black">/boot/efi</span>
|
||||
<span class="tag is-dark">200 MB</span>
|
||||
@@ -55,7 +45,7 @@
|
||||
</div>
|
||||
<a hx-get="/disks/partition/sda" hx-swap="outerHTML"/>
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<div class="box" style="border-radius: 0 0 5px 0px; height: 60px; padding-top: 5px;">
|
||||
<p class="is-tiny">/dev/sda2</p>
|
||||
<p class="title is-5"><span class="tag is-black">/</span> <span class="tag is-dark">18 GB</span> <span class="tag is-link">btrfs</span></p>
|
||||
</div>
|
||||
@@ -63,45 +53,102 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<br><br>
|
||||
<!--
|
||||
<p> There are {{ blockdevs["blockdevices"]|count }} block devices detected. </p>
|
||||
<p> They are </p>
|
||||
<br>
|
||||
-->
|
||||
|
||||
<div style="background-color: gray; padding: 15px; border-radius: 15px;">
|
||||
<p> <span style="width: 100%;" class="tag is-black">Physical disk: TOSHIBA HDWD120 (2000 GB)<span class="tag is-primary">Healthy</span></span> </p>
|
||||
|
||||
<!-- {% for disk in blockdevs["blockdevices"] if disk["name"] != "zram0"%} -->
|
||||
|
||||
<!--
|
||||
|
||||
<h1> Raw data </h1>
|
||||
{{ disk }}
|
||||
|
||||
<h1> Children </h1>
|
||||
|
||||
{% for child in disk['children'] %}
|
||||
|
||||
<h2> <big><b> Child </b></big> </h2>
|
||||
Path: {{ child['path'] }}
|
||||
fstype: {{ child['fstype'] }}
|
||||
fssize: {{ child['fssize'] }}
|
||||
{{ child }}
|
||||
{% endfor %}
|
||||
|
||||
-->
|
||||
|
||||
<div style=""> <!-- partition bars -->
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
<small><small>{{ disk['name'] }} ({{(disk['size']/1024000000)|round(0)|int }} GB) - Serial: {{ disk['serial'] }}</small></small>
|
||||
<div class="columns">
|
||||
{% for child in disk['children'] %}
|
||||
<a hx-get="/disks/partition/{{ child['name'] }}" hx-swap="outerHTML"/>
|
||||
<div class="column is-narrow is-primary">
|
||||
<div class="box" style="width: 220px;">
|
||||
<p class="is-tiny">/dev/sda1</p>
|
||||
<p class="title is-5"><span class="tag is-black">/boot/efi</span>
|
||||
<span class="tag is-dark">200 MB</span>
|
||||
<span class="tag is-link">vfat</span>
|
||||
<div class="box" style="min-width: 220px; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px;">
|
||||
<p class="is-tiny">{{ child['name'] }} ({{ (child['size']/1024000000)|round(2) }} GiB) </p>
|
||||
<p class="title is-5"><span class="tag is-black">{{ child['mountpoint'] }}</span>
|
||||
<span class="tag is-link">{{ child['fstype'] }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<a hx-get="/disks/partition/sda" hx-swap="outerHTML"/>
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<p class="is-tiny">/dev/sda2</p>
|
||||
<p class="title is-5"><span class="tag is-black">/</span> <span class="tag is-dark">18 GB</span> <span class="tag is-link">btrfs</span></p>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if disk['maj:min'] == "252:0" %}
|
||||
<div class="column is-narrow is-primary">
|
||||
<div class="box" style="width: 100%; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px; right: 0px;">
|
||||
<p class="is-tiny"> {{ disk['name'] }} ({{ (disk['size']/1024000000)|round(2) }} GiB) </p>
|
||||
<p class="title is-5"><span class="tag is-black">/dev/{{ disk['name'] }}</span>
|
||||
<span class="tag is-link">swap</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"><button class="button is-light">Cancel</button></div>
|
||||
<a href="/software"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<p> Diskname: {{ disk['name'] }} </p>
|
||||
<p> Model: {{ disk['model'] }} </p>
|
||||
<p> Serial: {{ disk['serial'] }} </p>
|
||||
<p> Removable: {{ disk['rm'] }} </p>
|
||||
<p> Size: {{ disk['size'] | int / 1024000000 | round(2) }} GiB </p>
|
||||
<p> ID: {{disk['id'] }} </p>
|
||||
<p> pttype: {{disk['pttype'] }} </p>
|
||||
<p> Maj:min: {{disk['maj:min']}} </p>
|
||||
<p> phy-sec: {{ disk['phy-sec'] }}. log-sec: {{ disk['log-sec'] }} </p>
|
||||
<p> There are {{ disk['children']|count }} Children </p>
|
||||
-->
|
||||
|
||||
<br><br>
|
||||
<!--
|
||||
{% for child in disk['children'] %}
|
||||
<br>
|
||||
<p> Name: {{ child['name'] }}. Path: {{ child['path'] }}. {{ child['size'] }}. Block: {{ child['subsystems'] }} {{ child['maj:min'] }} {{ child['type'] }} </p>
|
||||
<p> Fstype: {{ child['fstype'] }}. Label: {{ child['label'] }}. Rota: {{ child['rota'] }}</p>
|
||||
<p> Parttypename: {{ child['parttypename'] }}
|
||||
<br>
|
||||
{% endfor %}
|
||||
-->
|
||||
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Add Undetected Disk
|
||||
Add Virtual Filesystem
|
||||
Add Network Filesystem -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="modal-content">
|
||||
|
||||
<div style="background-color: #424242; padding: 15px; border-radius: 15px; boders: none; color: white;">
|
||||
<h1 class="is-size-4"> Edit partition: /dev/sda2 </h1>
|
||||
<h1 class="is-size-4"> Edit partition: {{ partition }} </h1>
|
||||
<p class="title is-6"><span class="tag is-black">Primary Partition</span>
|
||||
|
||||
<span>
|
||||
|
||||
@@ -2,13 +2,33 @@ from applets.disks import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
import dmm.lsblk as lsblk
|
||||
from flask import current_app
|
||||
|
||||
@bp.route('/disks/')
|
||||
@bp.route('/disks')
|
||||
def disks():
|
||||
"""
|
||||
Disks screen for the webui.
|
||||
"""
|
||||
return render_template('disks.html')
|
||||
blockdevs = lsblk.list_block_devices()
|
||||
print(lsblk.list_block_devices())
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
next_step_url = menu[menu.index("disks")+1]
|
||||
if menu[menu.index("disks")] == 1:
|
||||
previous_step_url = False
|
||||
else:
|
||||
previous_step_url = menu[menu.index("disks")-1]
|
||||
|
||||
add_disks_button = ' <button class="button iis-info"> <i class="fa fa-hdd-o" aria-hidden="true"></i> Add Disk or Filesystem </button>'
|
||||
add_swap_button = ' <button class="button iis-info"> <i class="fa fa-object-group" aria-hidden="true"></i> Swap Configuration </button>'
|
||||
bottom_menu = add_disks_button + add_swap_button
|
||||
build_summary()
|
||||
|
||||
return render_template('disks.html', blockdevs=blockdevs,
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(),
|
||||
previous_step = previous_step_url,
|
||||
next_step = next_step_url,
|
||||
bottom_menu = bottom_menu)
|
||||
|
||||
|
||||
@bp.route('/disks/partition/<part>')
|
||||
@@ -16,6 +36,30 @@ def disks_partition(part):
|
||||
"""
|
||||
Partition modal for the webui partition screen.
|
||||
"""
|
||||
return render_template('disks_partition.html')
|
||||
print("Partition is: " + part)
|
||||
partition = part
|
||||
return render_template('disks_partition.html',
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
partition=partition)
|
||||
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
# proper one once translations are done:
|
||||
#current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
|
||||
current_app.config['CONFIG']['settings']['menu']['disks'] = ("Disks", "/disks", 30)
|
||||
|
||||
|
||||
def build_summary():
|
||||
"""
|
||||
Write up a summary of what this module will do.
|
||||
"""
|
||||
current_app.config['CONFIG']['Summary']['disks'] = {}
|
||||
current_app.config['CONFIG']['Summary']['disks']['heading'] = "Disks and Partitions"
|
||||
current_app.config['CONFIG']['Summary']['disks']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']
|
||||
current_app.config['CONFIG']['Summary']['disks']['text'] = "Pre-configured disk layout."
|
||||
return("ok?")
|
||||
|
||||
build_menu()
|
||||
|
||||
7
src/applets/install/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint('install', __name__,
|
||||
template_folder='')
|
||||
|
||||
from applets.install import routes
|
||||
|
||||
BIN
src/applets/install/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/install/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
src/applets/install/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/applets/install/__pycache__/routes.cpython-313.pyc
Normal file
18
src/applets/install/install.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<center>
|
||||
<p style="position: absolute: left: 45px; top: 10px;"> <big><big> Installing...</big></big></p> <br />
|
||||
<img style="width: 400px; padding: 20px;" src="/static/slide1.png" /> <br />
|
||||
<p> Installing system, the rest of the process is automated. </p>
|
||||
<p style="margin: 20px;"> <input style="background-color: #777777;" type="checkbox" id="reboot" name="reboot" value="reboot" checked>
|
||||
<label for="reboot"> Reboot automatically when ready </label></p><br>
|
||||
</center>
|
||||
|
||||
<div style="position: absolute; padding: 10px; background-color: #26495e; left: 40px; right: 40px; bottom: 40px; height: text-align: middle;"> <center> Initializing... </center> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
37
src/applets/install/routes.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from applets.install import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
from flask import current_app
|
||||
|
||||
@bp.route('/install',methods=['GET', 'POST', 'PUT'])
|
||||
def install_index():
|
||||
"""
|
||||
The page you'd get if you access the root of
|
||||
this app in a browser.
|
||||
"""
|
||||
install_start()
|
||||
return render_template('install.html')
|
||||
|
||||
|
||||
@bp.route('/install-start',methods=['GET', 'POST', 'PUT'])
|
||||
def install_start():
|
||||
"""
|
||||
Trigger the installation process
|
||||
"""
|
||||
print("The installation process is starting!... in theory at least")
|
||||
|
||||
|
||||
@bp.route('/install-status',methods=['GET', 'POST', 'PUT'])
|
||||
def install_status():
|
||||
"""
|
||||
Update on the status of the installation process.
|
||||
"""
|
||||
print("installation en coers")
|
||||
|
||||
|
||||
@bp.route('/settings',methods=['GET', 'POST', 'PUT'])
|
||||
def settings():
|
||||
"""
|
||||
Manage settings for the installation module.
|
||||
"""
|
||||
print("Settings")
|
||||
BIN
src/applets/main/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/main/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/applets/software/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/software/__pycache__/routes.cpython-312.pyc
Normal file
@@ -1,11 +1,65 @@
|
||||
from applets.software import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@bp.route('/software')
|
||||
def webui_software():
|
||||
"""
|
||||
Software screen for the webui.
|
||||
"""
|
||||
return render_template('software.html')
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
next_step_url = menu[menu.index("software")+1]
|
||||
if menu[menu.index("software")] == 1:
|
||||
previous_step_url = False
|
||||
else:
|
||||
previous_step_url = menu[menu.index("software")-1]
|
||||
|
||||
sources_button = ' <button class="button iis-info"> <i class="fa fa-cloud-download" aria-hidden="true"></i> Edit Sources </button>'
|
||||
blends_button = ' <button class="button iis-info"> <i class="fa fa-download" aria-hidden="true"></i> Install a Blend </button>'
|
||||
bottom_menu = sources_button + blends_button
|
||||
build_summary()
|
||||
|
||||
return render_template('software.html',
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(),
|
||||
previous_step = previous_step_url,
|
||||
next_step = next_step_url,
|
||||
bottom_menu = bottom_menu,
|
||||
popcon=current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'])
|
||||
|
||||
|
||||
@bp.route('/software/settings', methods=['GET', 'POST'])
|
||||
def software_settings():
|
||||
"""
|
||||
Receive settings for the software applet.
|
||||
"""
|
||||
if request.method == 'POST':
|
||||
popcon = "popcon" in request.form
|
||||
current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] = popcon
|
||||
print(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'])
|
||||
build_summary()
|
||||
return ('', 204)
|
||||
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
# proper one once translations are done:
|
||||
#current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
|
||||
current_app.config['CONFIG']['settings']['menu']['software'] = ("Software", "/software", 40)
|
||||
|
||||
|
||||
def build_summary():
|
||||
"""
|
||||
Write up a summary of what this module will do.
|
||||
"""
|
||||
current_app.config['CONFIG']['Summary']['software'] = {}
|
||||
current_app.config['CONFIG']['Summary']['software']['heading'] = "Software"
|
||||
current_app.config['CONFIG']['Summary']['software']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']
|
||||
current_app.config['CONFIG']['Summary']['software']['text'] = "Participate in Popularity Contest: " + str(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) + "<br/>No desktop environment selected."
|
||||
return("ok?")
|
||||
|
||||
|
||||
build_menu()
|
||||
|
||||
@@ -1,38 +1,59 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<h1 class="is-size-3"> Select Software </h1>
|
||||
<p> <b> Would you like fries with that? </b></p>
|
||||
|
||||
<br>
|
||||
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px;
|
||||
border-radius: 10px; margin-bottom: 20px;">
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="/welcome">Welcome</a></li>
|
||||
<li><a href="/users">Users</a></li>
|
||||
<li><a href="/disks">Disks</a></li>
|
||||
<li class="is-active"><a href="/software">Software</a></li>
|
||||
<li><a href="/summary">Summary</a></li>
|
||||
</ul>
|
||||
<span style="width: 100%; border-radius: 8px 8px 0 0;"
|
||||
class="tag is-black">
|
||||
Popularity Contest
|
||||
</span>
|
||||
|
||||
<div style="padding-left: 15px; padding-right: 15px; background-color: #fff;
|
||||
color: #000;">
|
||||
|
||||
<p>The Popularity Contest (popcon) is a programme where anonymous data is sent back to Debian, tracking the number of packages installed. More information can be obtained at https://popcon.debian.org.</p> <br>
|
||||
|
||||
<input style="background-color: #777777;" type="checkbox" id="popcon"
|
||||
name="popcon" hx-post="/software/settings" hx-trigger="change"
|
||||
{% if popcon %} checked {% endif %}>
|
||||
<label for="popcon"> Participate in PopCon </label><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<p> Would you like fries with that?</p>
|
||||
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<li>Desktop environment</li>
|
||||
<li>Server software</li>
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"><button class="button is-light">Back</button></div>
|
||||
<a href="./summary"><div class="column"><button class="button is-link">Next</button></div></a>
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
Desktop Environment</span>
|
||||
<div style="padding: 15px; padding-top: 10px; padding-bottom: 5px; background-color: #fff; color: #000;">
|
||||
<p>
|
||||
<img src="/static/icons/console.png" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/gnome.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/kde.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/xfce.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/mate.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/lxde.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px; margin-bottom: 20px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
Select software from Debian archives</span>
|
||||
<div style="padding-left: 15px; padding-right: 15px; padding-bottom: 5px; background-color: #fff; color: #000;">
|
||||
<p><b>Select packages or selections of packages from the Debian archives.</b></p>
|
||||
<button class="button is-dark">Games</button>
|
||||
<button class="button is-dark">Productivity</button>
|
||||
<button class="button is-dark">Creativity</button>
|
||||
<button class="button is-dark">Server</button>
|
||||
<button class="button is-dark">Development</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
BIN
src/applets/summary/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/summary/__pycache__/routes.cpython-312.pyc
Normal file
@@ -1,6 +1,7 @@
|
||||
from applets.summary import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
from flask import current_app
|
||||
|
||||
@bp.route('/summary',methods=['GET', 'POST', 'PUT'])
|
||||
def summary_index():
|
||||
@@ -8,6 +9,34 @@ def summary_index():
|
||||
The page you'd get if you access the root of
|
||||
this app in a browser.
|
||||
"""
|
||||
return render_template('summary.html')
|
||||
build_menu()
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
previous_step_url = menu[menu.index("summary")-1]
|
||||
next_step_url = "install"
|
||||
|
||||
config = current_app.config['CONFIG']
|
||||
print (current_app.config['CONFIG']['Summary'])
|
||||
html = (str(current_app.config['CONFIG']['Summary']['welcome']) + "<br>" + str(current_app.config['CONFIG']['Summary']['software']))
|
||||
summary = config['Summary']
|
||||
|
||||
return render_template('summary.html',
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(),
|
||||
previous_step=previous_step_url,
|
||||
next_step=next_step_url,
|
||||
config=config,
|
||||
html=html,
|
||||
summary=summary)
|
||||
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
# proper one once translations are done:
|
||||
#current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
|
||||
current_app.config['CONFIG']['settings']['menu']['summary'] = ("Summary", "/summary", 60)
|
||||
|
||||
|
||||
build_menu()
|
||||
|
||||
|
||||
@@ -1,48 +1,30 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/bulma.css" rel="stylesheet">
|
||||
<link href="/static/welcome.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<div class="bg"></div>
|
||||
<p><b> Ready to install! Please review all changes.</b></p>
|
||||
|
||||
<div style="min-height: 80%; left: 22%; right: 22%; top: 50px; bottom: 50px; position: absolute; width:1000px;" class="container">
|
||||
<div class="notification is-dark">
|
||||
|
||||
<h1 class="is-size-3"> Summary </h1>
|
||||
<p> This is the last chance to back out before committing to install, please ensure all the details are correct. </p>
|
||||
|
||||
<br>
|
||||
|
||||
{% for module in summary %}
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="./welcome">Welcome</a></li>
|
||||
<li><a href="./users">Users</a></li>
|
||||
<li><a href="./disks">Disks</a></li>
|
||||
<li><a href="./software">Software</a></li>
|
||||
<li class="is-active"><a href="./summary">Summary</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3> <big> {{ summary[module]['heading'] }} </big> </h3>
|
||||
|
||||
<br>
|
||||
<!-- {{ summary[module]['bleh'] }}
|
||||
{{ summary[module]['settings'] }} -->
|
||||
{{ summary[module]['text']|safe }}
|
||||
|
||||
<p> Ready to install.</p>
|
||||
<br /><br />
|
||||
|
||||
<br>
|
||||
{% endfor %}
|
||||
|
||||
<br><br>
|
||||
<br><br/>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"><button class="button is-light">Back</button></div>
|
||||
<a href="./install"><div class="column"><button class="button is-link">Start Install</button></div></a>
|
||||
</div>
|
||||
<!-- <p>Config is: <code> {{ config }} </code></p> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
BIN
src/applets/users/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/users/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/applets/users/locales/af/LC_MESSAGES/users.mo
Normal file
65
src/applets/users/locales/af/LC_MESSAGES/users.po
Normal file
@@ -0,0 +1,65 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-06-20 15:48+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: routes.py:33
|
||||
msgid "Let's set up an initial user."
|
||||
msgstr "Kom on stel 'n gebruiker op."
|
||||
|
||||
msgid "Users"
|
||||
msgstr "Gebruikers"
|
||||
|
||||
#: routes.py:34
|
||||
msgid "Full Name"
|
||||
msgstr "Volle Naam"
|
||||
|
||||
#: routes.py:35
|
||||
msgid "Username"
|
||||
msgstr "Gebruikersnaam"
|
||||
|
||||
#: routes.py:36
|
||||
msgid "This username is available"
|
||||
msgstr "Hierdie gebruikersnaam is nie beskikbaar nie."
|
||||
|
||||
#: routes.py:37
|
||||
msgid "This username is not available"
|
||||
msgstr "Hierdie gebruikersnaam is nie beskikbaar nie."
|
||||
|
||||
#: routes.py:38
|
||||
msgid "This username is reserved by the system"
|
||||
msgstr "Hierdie gebruikersnaam is reserveerd deur vir die sisteem."
|
||||
|
||||
#: routes.py:39
|
||||
msgid "The username must be one word, lowercase, with no special characters"
|
||||
msgstr "Die gebruikersnaam moet een woord wees, kleinletters, met geen spesiale karakters."
|
||||
|
||||
#: routes.py:40
|
||||
msgid "Password"
|
||||
msgstr "Wagwoord"
|
||||
|
||||
#: routes.py:41
|
||||
msgid "Password (confirm)"
|
||||
msgstr "Wagwoord (bevestig)"
|
||||
|
||||
#: routes.py:42
|
||||
msgid "These passwords do now match"
|
||||
msgstr "Hierdie wagwoorde is nie dieselfde nie"
|
||||
|
||||
#: routes.py:43
|
||||
msgid "This password is too short"
|
||||
msgstr "Hierdie wagwoord is te kort"
|
||||
62
src/applets/users/locales/users.pot
Normal file
@@ -0,0 +1,62 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-06-20 15:48+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: routes.py:33
|
||||
msgid "Let's set up an initial user."
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:34
|
||||
msgid "Full Name"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:35
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:36
|
||||
msgid "This username is available"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:37
|
||||
msgid "This username is not available"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:38
|
||||
msgid "This username is reserved by the system"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:39
|
||||
msgid "The username must be one word, lowercase, with no special characters"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:40
|
||||
msgid "Password"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:41
|
||||
msgid "Password (confirm)"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:42
|
||||
msgid "These passwords do now match"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:43
|
||||
msgid "This password is too short"
|
||||
msgstr ""
|
||||
@@ -1,6 +1,21 @@
|
||||
from applets.software import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
import gettext
|
||||
# we use this neat little trick to get config data from the main app
|
||||
from flask import current_app
|
||||
|
||||
# Set up Gettext
|
||||
def set_language(LANG):
|
||||
"""
|
||||
Sets language for this applet
|
||||
"""
|
||||
translations = gettext.translation("users", './applets/users/locales',
|
||||
fallback=True, languages=[LANG])
|
||||
translations.install()
|
||||
_ = translations.gettext
|
||||
|
||||
set_language('')
|
||||
|
||||
|
||||
@bp.route('/users')
|
||||
@@ -8,4 +23,99 @@ def users_root():
|
||||
"""
|
||||
Users screen for the webui.
|
||||
"""
|
||||
return render_template('users.html')
|
||||
set_language(current_app.config['CONFIG']['settings']['language'])
|
||||
string_dict = build_stringlist()
|
||||
build_menu()
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
next_step_url = menu[menu.index("users")+1]
|
||||
if menu[menu.index("users")] == 1:
|
||||
previous_step_url = False
|
||||
else:
|
||||
previous_step_url = menu[menu.index("users")-1]
|
||||
|
||||
root_button = ' <button class="button is-light"> <i class="fa fa-user" aria-hidden="true"></i> Setup root user </button>'
|
||||
ldap_button = ' <button class="button is-light"> <i class="fa fa-address-card" aria-hidden="true"></i> Connect LDAP </button>'
|
||||
ad_button = ' <button class="button is-light"> <i class="fa fa-address-card" aria-hidden="true"></i> Connect AD </button>'
|
||||
csv_button = ' <button class="button is-light"> <i class="fa fa-users" aria-hidden="true"></i> Import CSV </button>'
|
||||
bottom_menu = root_button + ldap_button + ad_button + csv_button
|
||||
|
||||
initial_user = current_app.config['CONFIG']['recipe']['users']['users'][0]
|
||||
|
||||
build_summary()
|
||||
|
||||
return render_template('users.html', string_dict=string_dict,
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(),
|
||||
previous_step=previous_step_url,
|
||||
next_step=next_step_url,
|
||||
bottom_menu=bottom_menu,
|
||||
initial_user=initial_user)
|
||||
|
||||
|
||||
@bp.route('/users/user-check/', methods=['GET', 'POST', 'PUT'])
|
||||
def check_user():
|
||||
if request.method == 'POST':
|
||||
print("Ok, so method is POST")
|
||||
print("keys are: ", request.form.keys())
|
||||
username = request.form["username"]
|
||||
fullname = request.form["fullname"]
|
||||
password = request.form["password"]
|
||||
password_confirm = request.form["password_confirm"]
|
||||
print(current_app.config['CONFIG']['recipe']['users']['users'][0])
|
||||
print("fullname is: " + fullname)
|
||||
print("password is: " + password)
|
||||
print("password_confirm is: " + password_confirm)
|
||||
current_app.config['CONFIG']['recipe']['users']['users'][0]['username'] = username
|
||||
current_app.config['CONFIG']['recipe']['users']['users'][0]['fullname'] = fullname
|
||||
current_app.config['CONFIG']['recipe']['users']['users'][0]['password'] = password
|
||||
current_app.config['CONFIG']['recipe']['users']['users'][0]['password_confirm'] = password_confirm
|
||||
if username in ["root", "games"]:
|
||||
return('<p class="has-text-danger"><b>That username is not available</b> </p>')
|
||||
else:
|
||||
return('<p class="has-text-success"><b>That username is available</b> </p>')
|
||||
build_summary()
|
||||
return("bleh")
|
||||
|
||||
|
||||
|
||||
def build_stringlist():
|
||||
"""
|
||||
Return all the strings that is used in this applet.
|
||||
"""
|
||||
string_dict = {}
|
||||
string_dict['menu_item'] = _("Users")
|
||||
string_dict['initial_user_text'] = _("Let's set up an initial user.")
|
||||
string_dict['full_name'] = _("Full Name")
|
||||
string_dict['user_name'] = _("Username")
|
||||
string_dict['user_name_hint'] = _("One word, all lowercase")
|
||||
string_dict['user_name_available'] = _("This username is available")
|
||||
string_dict['user_name_not_available'] = _("This username is not available")
|
||||
string_dict['user_name_reserved'] = _("This username is reserved by the system")
|
||||
string_dict['user_name_characters'] = _("The username must be one word, lowercase, with no special characters")
|
||||
string_dict['password'] = _("Password")
|
||||
string_dict['password_confirm'] = _("Password (confirm)")
|
||||
string_dict['password_nomatch'] = _("These passwords do now match")
|
||||
string_dict['password_tooshort'] = _("This password is too short")
|
||||
return string_dict
|
||||
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
current_app.config['CONFIG']['settings']['menu']['users'] = (build_stringlist()['menu_item'], "/users", 20)
|
||||
print(current_app.config['CONFIG']['settings']['menu'])
|
||||
|
||||
|
||||
def build_summary():
|
||||
"""
|
||||
Write up a summary of what this module will do.
|
||||
"""
|
||||
current_app.config['CONFIG']['Summary']['users'] = {}
|
||||
current_app.config['CONFIG']['Summary']['users']['heading'] = "Users and Identity"
|
||||
current_app.config['CONFIG']['Summary']['users']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']
|
||||
current_app.config['CONFIG']['Summary']['users']['settings'] = current_app.config['CONFIG']['recipe']['users']['users']
|
||||
current_app.config['CONFIG']['Summary']['users']['text'] = "Add primary user with the username: " + str(current_app.config['CONFIG']['recipe']['users']['users'][0]['username'])
|
||||
return("ok?")
|
||||
|
||||
build_menu()
|
||||
|
||||
@@ -1,83 +1,64 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/bulma.css" rel="stylesheet">
|
||||
<link href="/static/welcome.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<div class="bg"></div>
|
||||
|
||||
<div style="min-height: 80%; left: 22%; right: 22%; top: 50px; bottom: 50px; position: absolute; width:1000px;" class="container">
|
||||
<div class="notification is-dark">
|
||||
|
||||
<h1 class="is-size-3"> Configure User </h1>
|
||||
<p><b> {{ string_dict['initial_user_text'] }} </b></p>
|
||||
|
||||
<br>
|
||||
|
||||
<form action="/users" method="POST">
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="./welcome">Welcome</a></li>
|
||||
<li class="is-active"><a href="./users">Users</a></li>
|
||||
<li><a href="./disks">Disks</a></li>
|
||||
<li><a href="./software">Software</a></li>
|
||||
<li><a href="./summary">Summary</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<img src="/static/icons/avatar-default.svg" width="160px" style="float: left; position: absolute;" />
|
||||
|
||||
<br>
|
||||
|
||||
<p> Let's set up an initial user.</p>
|
||||
|
||||
<br>
|
||||
<div style="margin-left: 180px;">
|
||||
|
||||
<div class="field">
|
||||
<label>Full Name</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Text input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label>Username</label>
|
||||
<label>{{ string_dict['full_name'] }}</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input class="input is-success" type="text" placeholder="Text input" value="user">
|
||||
<input class="input" name="fullname" type="text" placeholder="Full Name" value="{% if initial_user['fullname'] %}{{ initial_user['fullname'] }}{% endif %}" hx-post="/users/user-check" hx-trigger="keyup changed delay:500ms" hx-target="#username-name">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-user"></i>
|
||||
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="icon is-small is-right">
|
||||
<i class="fas fa-check"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help is-success">This username is available</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="password">Password</label>
|
||||
<div class="control">
|
||||
<input class="input" type="password" placeholder="Enter password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="password">Password (confirm)</label>
|
||||
<div class="control">
|
||||
<input class="input" type="password" placeholder="Enter password (confirm)">
|
||||
<label>{{ string_dict['user_name'] }}</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input class="input is-success" type="text" placeholder="{{ string_dict['user_name'] }}" value="{% if initial_user['username'] %}{{ initial_user['username'] }}{% endif %}" name="username" hx-post="/users/user-check" hx-trigger="keyup changed delay:200ms" hx-trigger="load" hx-target="#username-status">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-user-circle-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div id="username-status">
|
||||
<p> {{ string_dict['user_name_hint'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"><button class="button is-light">Back</button> <button class="button is-light">Connect Active Directory</button> <button class="button is-light">Connect LDAP</button></div>
|
||||
<a href="./disks"><div class="column"><button class="button is-link">Next</button></div></a>
|
||||
<div class="field">
|
||||
<label class="password">{{ string_dict['password'] }}</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input class="input" name="password" type="password" placeholder="{{ string_dict['password'] }}" value="{% if initial_user['password'] %}{{ initial_user['password'] }}{% endif %}" hx-post="/users/user-check" hx-trigger="keyup changed delay:200ms" hx-target="#username-status">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-address-card" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="password">{{ string_dict['password_confirm'] }}</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input class="input" name="password_confirm" type="password" placeholder="{{ string_dict['password_confirm'] }}" value="{% if initial_user['password_confirm'] %}{{ initial_user['password_confirm'] }}{% endif %}" hx-post="/users/user-check" hx-trigger="keyup changed delay:200ms" hx-target="#password-status">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fa fa-address-card" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div> <!-- style 180 -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,4 +4,3 @@ bp = Blueprint('welcome', __name__,
|
||||
template_folder='')
|
||||
|
||||
from applets.welcome import routes
|
||||
|
||||
|
||||
BIN
src/applets/welcome/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/welcome/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/applets/welcome/img/banner.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/applets/welcome/img/banner.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
src/applets/welcome/locales/af/LC_MESSAGES/welcome.mo
Normal file
33
src/applets/welcome/locales/af/LC_MESSAGES/welcome.po
Normal file
@@ -0,0 +1,33 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-15 21:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: UTF-8\n"
|
||||
|
||||
#: routes.py:27
|
||||
msgid "Welcome! This setup program will install Debian on to your system."
|
||||
msgstr "Welkom! Hierdie program sal jou deur die proses lei om Debian te installeer na jou sisteem."
|
||||
|
||||
#: routes.py:28
|
||||
msgid "Please confirm the following details:"
|
||||
msgstr "Bevestig asseblief die volgende:"
|
||||
|
||||
#: routes.py:29
|
||||
msgid "Language:"
|
||||
msgstr "Taal:"
|
||||
|
||||
#: routes.py:30
|
||||
msgid "Keyboard Layout:"
|
||||
msgstr "Knoppies Uitleg:"
|
||||
|
||||
#: routes.py:31
|
||||
msgid "Time Zone:"
|
||||
msgstr "Tyd Zone:"
|
||||
BIN
src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.mo
Normal file
33
src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.po
Normal file
@@ -0,0 +1,33 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-15 21:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: en-za\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: UTF-8\n"
|
||||
|
||||
#: routes.py:27
|
||||
msgid "Welcome! This setup program will install Debian on to your system."
|
||||
msgstr "Howzit! This setup program will install Debian on to your system."
|
||||
|
||||
#: routes.py:28
|
||||
msgid "Please confirm the following details:"
|
||||
msgstr "Please confirm the following details:"
|
||||
|
||||
#: routes.py:29
|
||||
msgid "Language:"
|
||||
msgstr "Language:"
|
||||
|
||||
#: routes.py:30
|
||||
msgid "Keyboard Layout:"
|
||||
msgstr "Keyboard Layout:"
|
||||
|
||||
#: routes.py:31
|
||||
msgid "Time Zone:"
|
||||
msgstr "Time Zone:"
|
||||
BIN
src/applets/welcome/locales/en/LC_MESSAGES/welcome.mo
Normal file
33
src/applets/welcome/locales/en/LC_MESSAGES/welcome.po
Normal file
@@ -0,0 +1,33 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-15 21:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: UTF-8\n"
|
||||
|
||||
#: routes.py:27
|
||||
msgid "Welcome! This setup program will install Debian on to your system."
|
||||
msgstr "Welcomen! This setup program will install Debian on to your system."
|
||||
|
||||
#: routes.py:28
|
||||
msgid "Please confirm the following details:"
|
||||
msgstr "Please confirmen the following details:"
|
||||
|
||||
#: routes.py:29
|
||||
msgid "Language:"
|
||||
msgstr "Language:"
|
||||
|
||||
#: routes.py:30
|
||||
msgid "Keyboard Layout:"
|
||||
msgstr "Keyboard Layout:"
|
||||
|
||||
#: routes.py:31
|
||||
msgid "Time Zone:"
|
||||
msgstr "Time Zone:"
|
||||
BIN
src/applets/welcome/locales/fr/LC_MESSAGES/welcome.mo
Normal file
33
src/applets/welcome/locales/fr/LC_MESSAGES/welcome.po
Normal file
@@ -0,0 +1,33 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-15 21:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: UTF-8\n"
|
||||
|
||||
#: routes.py:27
|
||||
msgid "Welcome! This setup program will install Debian on to your system."
|
||||
msgstr "Bienvienue! This setup program will install Debian on to your system."
|
||||
|
||||
#: routes.py:28
|
||||
msgid "Please confirm the following details:"
|
||||
msgstr "Please confirmen the following details:"
|
||||
|
||||
#: routes.py:29
|
||||
msgid "Language:"
|
||||
msgstr "Language:"
|
||||
|
||||
#: routes.py:30
|
||||
msgid "Keyboard Layout:"
|
||||
msgstr "Keyboard Layout:"
|
||||
|
||||
#: routes.py:31
|
||||
msgid "Time Zone:"
|
||||
msgstr "Time Zone:"
|
||||
38
src/applets/welcome/locales/welcome.pot
Normal file
@@ -0,0 +1,38 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-15 21:52+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: routes.py:27
|
||||
msgid "Welcome! This setup program will install Debian on to your system."
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:28
|
||||
msgid "Please confirm the following details:"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:29
|
||||
msgid "Language:"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:30
|
||||
msgid "Keyboard Layout:"
|
||||
msgstr ""
|
||||
|
||||
#: routes.py:31
|
||||
msgid "Time Zone:"
|
||||
msgstr ""
|
||||
@@ -1,8 +1,21 @@
|
||||
from applets.welcome import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
# we use this neat little trick to get config data from the main app
|
||||
from flask import current_app
|
||||
import gettext
|
||||
import dmm.lsblk as lsblk
|
||||
|
||||
# Set up Gettext
|
||||
def set_language(LANG):
|
||||
"""
|
||||
Sets language for this applet
|
||||
"""
|
||||
translations = gettext.translation("welcome", './applets/welcome/locales',
|
||||
fallback=True, languages=[LANG])
|
||||
translations.install()
|
||||
_ = translations.gettext
|
||||
|
||||
|
||||
@bp.route('/welcome',methods=['GET', 'POST', 'PUT'])
|
||||
def welcome_index():
|
||||
@@ -10,14 +23,90 @@ def welcome_index():
|
||||
The page you'd get if you access the root of
|
||||
this app in a browser.
|
||||
"""
|
||||
set_language(current_app.config['CONFIG']['settings']['language'])
|
||||
if request.method == 'POST':
|
||||
if "lang" in request.form.keys():
|
||||
current_app.config['CONFIG']['settings']['language'] = request.form["lang"]
|
||||
LANG = current_app.config['CONFIG']['settings']['language']
|
||||
set_language(LANG)
|
||||
FORMLANG = request.form["lang"]
|
||||
if "keyboard" in request.form.keys():
|
||||
print(request.form["keyboard"])
|
||||
if "timezone" in request.form.keys():
|
||||
print(request.form["timezone"])
|
||||
global lang
|
||||
lang = current_app.config['CONFIG']['settings']['language']
|
||||
blkid = lsblk.list_scsi_devices()
|
||||
return render_template('welcome.html', blkid=blkid)
|
||||
#return ("Welcome to System Installer Daemon POC <br />"
|
||||
# "This is the Welcome Index")
|
||||
string_dict = build_stringlist()
|
||||
build_menu()
|
||||
build_summary()
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
next_step_url = menu[menu.index("welcome")+1]
|
||||
previous_step_url = menu[menu.index("welcome")-1]
|
||||
|
||||
print("index is: " , menu.index("welcome"))
|
||||
if menu.index("welcome") == 0:
|
||||
previous_step_url = False
|
||||
else:
|
||||
previous_step_url = menu[menu.index("users")-1]
|
||||
|
||||
print("next is: " + next_step_url)
|
||||
print("previous is: " , previous_step_url)
|
||||
power_button = '<button class="button is-dark"> <img width="16px;" src="/static/icons/greencheck.png"> Power: AC </button>'
|
||||
internet_button = ' <button class="button is-dark"> <img width="16px;" src="/static/icons/greencheck.png"> Internet </button>'
|
||||
bottom_menu = power_button + internet_button
|
||||
|
||||
return render_template('welcome.html',
|
||||
string_dict=string_dict, selected_lang=lang,
|
||||
menu=current_app.config['CONFIG']['settings']['menu'],
|
||||
menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(),
|
||||
previous_step=previous_step_url,
|
||||
next_step=next_step_url,
|
||||
bottom_menu=bottom_menu)
|
||||
|
||||
|
||||
@bp.route('/welcome2')
|
||||
def welcome2_index():
|
||||
return ("Changins some text in our htmx front-end")
|
||||
def build_stringlist():
|
||||
"""
|
||||
Return all the strings that is used in this applet."
|
||||
"""
|
||||
string_dict = {}
|
||||
string_dict['menu_item'] = _("Welcome")
|
||||
string_dict['welcome_text'] = _("Welcome! This setup program will install Debian on to your system.")
|
||||
string_dict['confirm_text'] = _("Please confirm the following details:")
|
||||
string_dict['language_text'] = _("Language:")
|
||||
string_dict['keylayout_text'] = _("Keyboard Layout:")
|
||||
string_dict['timezone_text'] = _("Time Zone:")
|
||||
string_dict['basicsettings_text'] = _("Basic Settings:")
|
||||
lang_dict = {}
|
||||
lang_dict['af'] = _("Afrikaans")
|
||||
lang_dict['en'] = _("English (International)")
|
||||
lang_dict['en-us'] = _("English (United States)")
|
||||
lang_dict['en-uk'] = _("English (United Kingdom)")
|
||||
lang_dict['en-za'] = _("English (South Africa)")
|
||||
string_dict['lang_list'] = lang_dict
|
||||
return string_dict
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
|
||||
|
||||
|
||||
def build_summary():
|
||||
"""
|
||||
Write up a summary of what this module will do.
|
||||
"""
|
||||
html = ("<b><big>Basic settings</big></b><p> Language: " + lang + "</p>")
|
||||
if not 'Summary' in current_app.config['CONFIG']:
|
||||
current_app.config['CONFIG']['Summary'] = {}
|
||||
current_app.config['CONFIG']['Summary']['welcome'] = {}
|
||||
current_app.config['CONFIG']['Summary']['welcome']['heading'] = "Basic Settings"
|
||||
print(current_app.config['CONFIG']['Summary']['welcome'])
|
||||
text = "Language: " + str(current_app.config['CONFIG']['settings']['language'])
|
||||
current_app.config['CONFIG']['Summary']['welcome']['text'] = text
|
||||
return(html)
|
||||
|
||||
|
||||
set_language(current_app.config['CONFIG']['settings']['language'])
|
||||
build_menu
|
||||
|
||||
@@ -1,93 +1,57 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/bulma.css" rel="stylesheet">
|
||||
<link href="/static/welcome.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<div class="bg"></div>
|
||||
<img style="width: 100%; border-radius: 8px;"
|
||||
src="/static/applets/welcome/img/banner.png"
|
||||
alt="Debian Image banner" />
|
||||
|
||||
<p><b> {{ string_dict['welcome_text'] }} </b></p>
|
||||
<p>{{ string_dict['confirm_text'] }} </p> <br />
|
||||
|
||||
<div style="min-height: 80%; left: 22%; right: 22%; top: 50px; bottom: 50px; position: absolute; width:1000px;" class="container">
|
||||
<div class="notification is-dark">
|
||||
<div style="padding-left: 15px;">
|
||||
|
||||
<h1 class="is-size-3"> Welcome to System Installer </h1>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li class="is-active"><a href="./welcome">Welcome</a></li>
|
||||
<li><a href="./users">Users</a></li>
|
||||
<li><a href="./disks">Disks</a></li>
|
||||
<li><a href="./software">Software</a></li>
|
||||
<li><a href="./summary">Summary</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<p> Welcome! This setup program will install Debian on to your system.</p>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="columns">
|
||||
|
||||
<div class="column">
|
||||
<img src="/static/icons/keyboard.svg" width="180px" />
|
||||
<div class="control is-link">
|
||||
<form action="/welcome" method="POST">
|
||||
<i class="fa fa-language" aria-hidden="true"></i> {{ string_dict['language_text'] }}
|
||||
<div class="control is-link" width="180px">
|
||||
<div class="select">
|
||||
<select>
|
||||
<option>English</option>
|
||||
<option>Afrikaans</option>
|
||||
<select hx-post="/welcome" hx-target="body" name="lang" style="width: 220px">
|
||||
{% for lang in string_dict['lang_list'] %}
|
||||
<option value="{{lang}}" {% if lang == selected_lang %} selected=selected {% endif %}>{{ string_dict['lang_list'][lang] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div
|
||||
|
||||
</form>
|
||||
<br>
|
||||
|
||||
<div class="column">
|
||||
<img src="/static/icons/keyboard.svg" width="180px" />
|
||||
<form>
|
||||
<i class="fa fa-keyboard-o" aria-hidden="true"></i> {{ string_dict['keylayout_text'] }}
|
||||
<div class="control is-link">
|
||||
<div class="select">
|
||||
<select>
|
||||
<select hx-post="/welcome" hx-target="body" name="keyboard" style="width: 220px">
|
||||
<option>en-us</option>
|
||||
<option>en-uk</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
|
||||
<br>
|
||||
|
||||
<div class="column">
|
||||
<img src="/static/icons/keyboard.svg" width="180px" />
|
||||
<form>
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> {{ string_dict['timezone_text'] }}
|
||||
<div class="control is-link">
|
||||
<div class="select">
|
||||
<select>
|
||||
<select hx-post="/welcome" hx-target="body" name="timezone" style="width: 220px">
|
||||
<option>Africa/Johannesburg</option>
|
||||
<option>UTC</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div> <!-- end columns -->
|
||||
|
||||
<br><br><br><br><br><br>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column"><button class="button is-light">Quit</button></div>
|
||||
<a href="./users"><div class="column"><button class="button is-link">Next</button></div></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
1
src/static/applets/welcome/img
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../applets/welcome/img
|
||||
22
src/static/icons/avatar-default.svg
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="16.98286657496" x2="113.51232281881" y1="91.79046347784" y2="91.79046347784">
|
||||
<stop offset="0" stop-color="#e6f0fc"/>
|
||||
<stop offset="0.0383542" stop-color="#cadff8" stop-opacity="0.996078"/>
|
||||
<stop offset="0.124655" stop-color="#d4e5f9" stop-opacity="0.992157"/>
|
||||
<stop offset="0.901364" stop-color="#b2d0f4" stop-opacity="0.964706"/>
|
||||
<stop offset="0.9589" stop-color="#d0e3f9" stop-opacity="0.964706"/>
|
||||
<stop offset="1" stop-color="#98c1f1" stop-opacity="0.964706"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="35.05556157496" x2="88.56691281881" y1="91.79046347784" y2="91.79046347784">
|
||||
<stop offset="0" stop-color="#e6f0fc"/>
|
||||
<stop offset="0.230125" stop-color="#cadff8" stop-opacity="0.996078"/>
|
||||
<stop offset="0.383542" stop-color="#d4e5f9" stop-opacity="0.992157"/>
|
||||
<stop offset="0.588996" stop-color="#b2d0f4" stop-opacity="0.964706"/>
|
||||
<stop offset="0.753397" stop-color="#d0e3f9" stop-opacity="0.964706"/>
|
||||
<stop offset="1" stop-color="#98c1f1" stop-opacity="0.964706"/>
|
||||
</linearGradient>
|
||||
<path d="m 65.007812 67.363281 c -24.257812 0.027344 -44.703124 16.957031 -49.898437 39.847657 c -1.597656 5.96875 1.65625 9.007812 5.269531 9.007812 h 88.402344 c 4.75 0 7.4375 -4.191406 6.222656 -8.734375 c -5.097656 -23.042969 -25.625 -40.109375 -49.996094 -40.121094 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 89.351562 33.375 c 0 14.257812 -11.554687 25.8125 -25.8125 25.8125 c -14.257812 0 -25.816406 -11.554688 -25.816406 -25.8125 s 11.558594 -25.816406 25.816406 -25.816406 c 14.257813 0 25.8125 11.558594 25.8125 25.816406 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 65.007812 64.082031 c -24.257812 0.03125 -44.703124 16.074219 -49.898437 38.96875 c -1.597656 5.96875 1.65625 9.007813 5.269531 9.007813 h 88.402344 c 4.75 0 7.4375 -4.191406 6.222656 -8.734375 c -5.097656 -23.042969 -25.625 -39.226563 -49.996094 -39.242188 z m 24.34375 -34.046875 c 0 14.257813 -11.554687 25.8125 -25.8125 25.8125 c -14.257812 0 -25.816406 -11.554687 -25.816406 -25.8125 c 0 -14.257812 11.558594 -25.816406 25.816406 -25.816406 c 14.257813 0 25.8125 11.558594 25.8125 25.816406 z m 0 0" fill="#f6f9fe" fill-opacity="0.996078"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/static/icons/blippie.png
Normal file
|
After Width: | Height: | Size: 304 KiB |
BIN
src/static/icons/console.jpeg
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
src/static/icons/console.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/static/icons/debian.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
4
src/static/icons/emblem-default-symbolic.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 8 0 c -4.40625 0 -8 3.59375 -8 8 s 3.59375 8 8 8 s 8 -3.59375 8 -8 s -3.59375 -8 -8 -8 z m 3.398438 4.507812 c 0.265624 -0.027343 0.527343 0.050782 0.734374 0.21875 c 0.425782 0.351563 0.488282 0.980469 0.140626 1.40625 l -4.5 5.5 c -0.179688 0.21875 -0.441407 0.351563 -0.722657 0.367188 c -0.28125 0.011719 -0.558593 -0.09375 -0.757812 -0.292969 l -2.5 -2.5 c -0.390625 -0.390625 -0.390625 -1.023437 0 -1.414062 s 1.023437 -0.390625 1.414062 0 l 1.71875 1.71875 l 3.800781 -4.644531 c 0.167969 -0.203126 0.410157 -0.335938 0.671876 -0.363282 z m 0 0" fill="#2e3436"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 719 B |
BIN
src/static/icons/gnome.jpeg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/static/icons/greencheck.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
src/static/icons/kde.jpeg
Normal file
|
After Width: | Height: | Size: 24 KiB |
@@ -1 +1,53 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g font-weight="400" fill="#474747"><path d="M3.702 1C2.17 1 .984 2.32.984 3.844v8.344c0 1.524 1.185 2.843 2.718 2.843h8.58c1.532 0 2.75-1.32 2.75-2.844V3.845c0-1.525-1.218-2.844-2.75-2.844zm.782 1.031c3.526.256 5.317.134 7.047 0 .754-.058 1.532.616 1.532 1.438v7.375c0 .665-.532 1.095-1.188 1.187-2.836.397-4.753.44-7.673 0-.655-.099-1.187-.522-1.187-1.187V3.5c0-.822.714-1.524 1.469-1.469z" style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none" color="#bebebe" font-family="Bitstream Vera Sans" overflow="visible"/><path d="M10.564 5.977l-2.939.044.016 1 2.879-.043c.2.018.33.076.396.135.067.06.105.121.105.293l-.008.604H8.517l.037.002a1.457 1.457 0 00-1.164.43 1.558 1.558 0 00-.416 1.023c-.013.367.092.75.352 1.053.26.303.687.496 1.162.482h3.482l.051-3.59v-.004c0-.402-.16-.786-.435-1.035-.276-.249-.63-.364-.998-.393zM8.48 9.01h2.519l-.014.99H8.457c-.22.007-.302-.051-.371-.133a.553.553 0 01-.112-.367.587.587 0 01.141-.371c.079-.083.163-.134.363-.12zm2.862-5.985l-3 1 .316.95 3-1z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" color="#000" font-family="sans-serif" overflow="visible"/></g></svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="16"
|
||||
height="16"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:docname="keyboard.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="namedview2"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="52.375"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-width="1236"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="662"
|
||||
inkscape:window-y="199"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<g
|
||||
font-weight="400"
|
||||
fill="#474747"
|
||||
id="g2"
|
||||
style="fill:#c0bfbc">
|
||||
<path
|
||||
d="M3.702 1C2.17 1 .984 2.32.984 3.844v8.344c0 1.524 1.185 2.843 2.718 2.843h8.58c1.532 0 2.75-1.32 2.75-2.844V3.845c0-1.525-1.218-2.844-2.75-2.844zm.782 1.031c3.526.256 5.317.134 7.047 0 .754-.058 1.532.616 1.532 1.438v7.375c0 .665-.532 1.095-1.188 1.187-2.836.397-4.753.44-7.673 0-.655-.099-1.187-.522-1.187-1.187V3.5c0-.822.714-1.524 1.469-1.469z"
|
||||
style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none;fill:#c0bfbc"
|
||||
color="#bebebe"
|
||||
font-family="Bitstream Vera Sans"
|
||||
overflow="visible"
|
||||
id="path1" />
|
||||
<path
|
||||
d="M10.564 5.977l-2.939.044.016 1 2.879-.043c.2.018.33.076.396.135.067.06.105.121.105.293l-.008.604H8.517l.037.002a1.457 1.457 0 00-1.164.43 1.558 1.558 0 00-.416 1.023c-.013.367.092.75.352 1.053.26.303.687.496 1.162.482h3.482l.051-3.59v-.004c0-.402-.16-.786-.435-1.035-.276-.249-.63-.364-.998-.393zM8.48 9.01h2.519l-.014.99H8.457c-.22.007-.302-.051-.371-.133a.553.553 0 01-.112-.367.587.587 0 01.141-.371c.079-.083.163-.134.363-.12zm2.862-5.985l-3 1 .316.95 3-1z"
|
||||
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none;fill:#c0bfbc"
|
||||
color="#000"
|
||||
font-family="sans-serif"
|
||||
overflow="visible"
|
||||
id="path2" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
src/static/icons/lxde.jpeg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
src/static/icons/mate.jpeg
Normal file
|
After Width: | Height: | Size: 21 KiB |
8
src/static/icons/tab-new-symbolic.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#2e3436">
|
||||
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 10 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -10 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.570312 0 1 0.429688 1 1 v 10 c 0 0.570312 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -10 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
<path d="m 4 7 h 8 v 2 h -8 z m 0 0"/>
|
||||
<path d="m 9 4 v 8 h -2 v -8 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 585 B |
4
src/static/icons/user-available-symbolic.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 6 c 0 1.644531 1.355469 3 3 3 h 1 v 3 l 3 -3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 0" fill="#2e3436"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 329 B |
4
src/static/icons/user-invisible-symbolic.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 6 c 0 1.644531 1.355469 3 3 3 h 1 v 3 l 3 -3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.554688 0 1 0.445312 1 1 v 6 c 0 0.554688 -0.445312 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -6 c 0 -0.554688 0.445312 -1 1 -1 z m 0 0" fill="#2e3436" fill-opacity="0.34902"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 502 B |
BIN
src/static/icons/xfce.jpeg
Normal file
|
After Width: | Height: | Size: 20 KiB |
37
src/static/system-installer-blippie.css
Normal file
@@ -0,0 +1,37 @@
|
||||
html {
|
||||
/* Overwrite the white that is set by bulma.css */
|
||||
body {
|
||||
display: flex;
|
||||
font-family: Noto Sans;
|
||||
color: white;
|
||||
overflow: hidden;
|
||||
min-width: 1050px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
.frame {
|
||||
border-radius: 10px;
|
||||
background-color: #0f1933;
|
||||
padding: 15px 15px 15px 15px;
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.applet a:link a:hover a:active {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.applet {
|
||||
width: 100%;
|
||||
height: 470px;
|
||||
bottom: 0px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.radio:hover {
|
||||
color: #f1f1f1;
|
||||
}
|
||||
41
src/static/system-installer-dark.css
Normal file
@@ -0,0 +1,41 @@
|
||||
html {
|
||||
/* Overwrite the white that is set by bulma.css */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
font-family: Sans; Roboto; Lato; Noto Sans;
|
||||
color: white;
|
||||
overflow: hidden;
|
||||
min-width: 1050px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
html, body {margin: 0; height: 100%; overflow: hidden;}
|
||||
|
||||
.frame {
|
||||
border-radius: 10px;
|
||||
background-color: #404040;
|
||||
padding: 15px 15px 15px 15px;
|
||||
width: 100%;
|
||||
min-height: 600px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.applet a:link a:hover a:active {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.applet {
|
||||
width: 100%;
|
||||
height: 442px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.radio:hover {
|
||||
color: #f1f1f1;
|
||||
}
|
||||
37
src/static/system-installer-light.css
Normal file
@@ -0,0 +1,37 @@
|
||||
html {
|
||||
/* Overwrite the white that is set by bulma.css */
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
font-family: Noto Sans;
|
||||
color: white;
|
||||
overflow: hidden;
|
||||
min-width: 1050px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
.frame {
|
||||
border-radius: 10px;
|
||||
background-color: #e9e8e4;
|
||||
padding: 15px;
|
||||
max-width: 1050px;
|
||||
}
|
||||
|
||||
.applet a:link a:hover a:active {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.applet {
|
||||
color: #383838;
|
||||
width: 1040px;
|
||||
height: 470px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.radio:hover {
|
||||
color: #404040;
|
||||
}
|
||||
1
src/static/system-installer.css
Symbolic link
@@ -0,0 +1 @@
|
||||
system-installer-dark.css
|
||||
@@ -1,20 +0,0 @@
|
||||
@mixin glassmorphism() {
|
||||
background: rgba(255,255,255,0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
z-index:-1;
|
||||
top:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
left:0;
|
||||
|
||||
background-image: radial-gradient(circle at 30% 86%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 8%,transparent 8%, transparent 92%),radial-gradient(circle at 55% 100%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 8%,transparent 8%, transparent 92%),radial-gradient(circle at 40% 75%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 6%,transparent 6%, transparent 94%),radial-gradient(circle at 7% 99%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 6%,transparent 6%, transparent 94%),radial-gradient(circle at 69% 76%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 6%,transparent 6%, transparent 94%),radial-gradient(circle at 2% 35%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 6%,transparent 6%, transparent 94%),radial-gradient(circle at 14% 48%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 6%,transparent 6%, transparent 94%),radial-gradient(circle at 28% 87%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 4%,transparent 4%, transparent 96%),radial-gradient(circle at 65% 14%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 4%,transparent 4%, transparent 96%),radial-gradient(circle at 51% 36%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 4%,transparent 4%, transparent 96%),radial-gradient(circle at 6% 93%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.04) 4%,transparent 4%, transparent 96%),linear-gradient(135deg, rgb(23, 233, 173),rgb(29, 24, 208));
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -1,47 +1,48 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Welcome to SID - The System Installer Daemon!
|
||||
"""
|
||||
|
||||
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
from waitress import serve
|
||||
import logging
|
||||
import dmm.lsblk as lsblk
|
||||
import importlib
|
||||
import yaml
|
||||
|
||||
# configuration
|
||||
VERSION = "0.00"
|
||||
SECRET_KEY = "exampls"
|
||||
DEV_MODE = 1
|
||||
APPS = "main welcome users disks software summary"
|
||||
|
||||
if DEV_MODE == 1:
|
||||
print("Note: Starting in devmode!")
|
||||
DEBUG = True
|
||||
CONFIGFILE="templates/dmm-installer-template.yaml"
|
||||
|
||||
# import config
|
||||
global config
|
||||
config_contents = open(CONFIGFILE, "r")
|
||||
config = yaml.safe_load(config_contents)
|
||||
APPS = config['settings']['apps']
|
||||
DEV_MODE = config['settings']['devmode']
|
||||
|
||||
# create our application in flask
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(__name__)
|
||||
app.config['CONFIG'] = config
|
||||
app.app_context().push()
|
||||
config['settings']['menu'] = {}
|
||||
|
||||
if DEV_MODE:
|
||||
print("Note: Starting in devmode!")
|
||||
DEBUG = True
|
||||
tracebacks = True
|
||||
|
||||
# Register blueprints here
|
||||
for APP in APPS.split(" "):
|
||||
print(f"Loading applet: {APP} ")
|
||||
|
||||
# Dynamically import the blueprint module
|
||||
module = importlib.import_module(f"applets.{APP}")
|
||||
|
||||
# Get the blueprint (bp) from the imported module
|
||||
bp = getattr(module, "bp")
|
||||
|
||||
# Register the blueprint with the app
|
||||
app.register_blueprint(bp)
|
||||
|
||||
|
||||
# configure logs
|
||||
# logging.basicConfig()
|
||||
logger = logging.getLogger('waitress')
|
||||
@@ -49,22 +50,10 @@ if DEV_MODE == "1":
|
||||
logger.setLevel(logging.DEBUG)
|
||||
logger.debug("logger set to DEBUG")
|
||||
|
||||
|
||||
# Justtry doing something with dmm
|
||||
lsblk.list_scsi_devices()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if DEV_MODE:
|
||||
serve(app,
|
||||
host='0.0.0.0',
|
||||
port=8080,
|
||||
url_scheme='http',
|
||||
expose_tracebacks=True)
|
||||
else:
|
||||
serve(app,
|
||||
host='0.0.0.0',
|
||||
port=8080,
|
||||
url_scheme='https',
|
||||
expose_tracebacks=False)
|
||||
expose_tracebacks=DEV_MODE)
|
||||
|
||||
20
src/system-installer-web-client
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import webview
|
||||
|
||||
LOCATION = "http://localhost:8080/welcome"
|
||||
|
||||
def on_closed():
|
||||
"""
|
||||
Actions to take when System Installer is closed.
|
||||
"""
|
||||
print('pywebview window is closed')
|
||||
|
||||
|
||||
window = webview.create_window('System Installer', LOCATION,
|
||||
transparent=True, easy_drag=False, frameless=True,
|
||||
width=1050, focus=True, zoomable=True,
|
||||
confirm_close=True, resizable=True)
|
||||
|
||||
window.events.closed += on_closed
|
||||
webview.start()
|
||||
32
src/templates/dmm-installer-template.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env dmm-perform-recipe
|
||||
|
||||
module_path:
|
||||
- local
|
||||
|
||||
settings:
|
||||
language: en
|
||||
devmode: True
|
||||
apt_depends: util-linux adduser parted e2fsprogs debootstrap
|
||||
apps: main welcome users disks software summary install
|
||||
menu_order: welcome users disks software summary
|
||||
|
||||
recipe:
|
||||
installer_dependencies:
|
||||
description: Installing Dependencies
|
||||
module: aptpkg
|
||||
function: install
|
||||
packagooes: apt
|
||||
chrooti: /tmp
|
||||
users:
|
||||
module: users
|
||||
function: add
|
||||
users:
|
||||
- username:
|
||||
password:
|
||||
fullname:
|
||||
sudo: True
|
||||
popcon:
|
||||
module: software
|
||||
function: popcon
|
||||
enable_popcon: False
|
||||
|
||||
24
src/templates/footer.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- Buttons on the left -->
|
||||
<div style="position: absolute; bottom: 15px; left: 15px;">
|
||||
|
||||
{% if previous_step %}
|
||||
<a href="/{{ previous_step }}"><button class="button is-light">Back</button></a>
|
||||
{% endif %}
|
||||
|
||||
{% if bottom_menu %}
|
||||
{{ bottom_menu | safe }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Buttons on the right -->
|
||||
<div style="position: absolute; bottom: 15px; right: 15px;">
|
||||
{% if next_step %}
|
||||
{% if next_step == "install" %}
|
||||
<a href="/{{ next_step }}"><button hx-trigger="click, keyup[shiftKey&&key=='I'] from:body" class="button is-link">Install</button></a>
|
||||
{% else %}
|
||||
<a href="/{{ next_step }}"><button hx-trigger="click, keyup[shiftKey&&key=='N'] from:body" hx-target="/{{ next_step }}" class="button is-link">Next</button></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
20
src/templates/header.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!-- Header -->
|
||||
<div id="titlebar" style="padding: 15px; margin: -15px; padding-bottom: 30px;">
|
||||
|
||||
<!-- drag region class: -->
|
||||
<!-- <div id="titlebar" class="pywebview-drag-region" style="padding: 15px; margin: -15px; padding-bottom: 30px;"> -->
|
||||
|
||||
<button class="button is-link"> ☰ </button>
|
||||
|
||||
{% for item in menu_order %}
|
||||
<a href="{{ menu[item][1]}}"> <button class="button is-{% if request.path == menu[item][1] %}info{% else %}dark{% endif %}"> {{ menu[item][0]}} </button></a>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<div style="position: absolute; top: 15px; right: 15px;">
|
||||
<a href="/help"> <button class="button is-light"> <b> ? </b> </button></a>
|
||||
<button onclick="closeApp()" class="button is-danger" > 🗙 </button>
|
||||
</div>
|
||||
|
||||
</div> <!-- end pywebview-drag-region -->
|
||||
<!-- End Header -->
|
||||
@@ -4,18 +4,25 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="/static/bulma.css" rel="stylesheet">
|
||||
<link href="/static/welcome.css" rel="stylesheet">
|
||||
<link href="/static/system-installer.css" rel="stylesheet">
|
||||
<link rel="shortcut icon" href="/static/icons/blippie.png" type="image/x-icon">
|
||||
<link rel="stylesheet" href="/usr/share/fonts-fork-awesome/css/fork-awesome.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
<script src="/static/htmx.min.js" crossorigin="anonymous"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="bg"></div>
|
||||
|
||||
<div style="min-height: 80%; left: 22%; right: 22%; top: 50px; bottom: 50px; position: absolute; width:1000px; height:800;" class="container">
|
||||
<div class="notification is-dark">
|
||||
<div class="frame">
|
||||
{% include "header.html" %}
|
||||
|
||||
<div class="applet">
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include "footer.html" %}
|
||||
|
||||
</div> <!-- class "frame" -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||