Commit Graph

74 Commits

Author SHA1 Message Date
Leo-Andres Hofmann
2b5253bbbb pakfire.cgi: Cosmetic fixes
Add formatting to improve readability of dependencies list header.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
3706e0a5b3 pakfire.cgi: Discard tac stderr output
Prevents meaningless "broken pipe" messages in the httpd error log.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
85d570843e pakfire.cgi: Implement Post/Redirect/Get pattern
Refreshing the Pakfire page may cause a command to be
executed multiple times and induce odd errors.

This patch implements a HTTP 303 redirect after form processing,
which causes the browser to discard the POST form data.
Navigating backward or reloading the page now does not trigger
multiple executions anymore.

Fixes: #12781

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
3cdb83939b pakfire.cgi: Notify user if Pakfire is already performing a task
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:21 +00:00
Leo-Andres Hofmann
4b5d1f3001 pakfire.cgi: Show error and log messages earlier
The main page cannot be used while an installation is running.
Therefore it makes more sense to generate the log output first.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Leo-Andres Hofmann
0f506a130c pakfire.cgi: Fix indentation
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Leo-Andres Hofmann
cd521e78b8 pakfire.cgi: Separate command processing and HTML generation
Move most of the command execution away from the HTML output.
This makes it easier to modify or extend individual commands.

Also load Pakfire settings earlier to ensure that they are
available during command execution.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.muelle@ipfire.org>
2022-05-08 13:13:20 +00:00
Matthias Fischer
b81c77b96b pakfire.cgi: Cosmetic fix
The two text passages for 'pakfire install...' and 'pakfire uninstall...' under
'Available' and 'Installed Addons:' are so close together that the first line
appears as a single line.

This patch separates these two areas a bit from each other so that they are
better readable.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
2022-02-11 15:21:43 +00:00
Leo-Andres Hofmann
219dacef2c pakfire.cgi: Improve HTML output and layout
Add missing closing tags, indentation and CSS styling.
Add link to reboot notice, left-align info list and resize packages
lists for better readability.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:36:22 +00:00
Leo-Andres Hofmann
4d70f59173 pakfire: Implement feedback from mailing list discussion
- Improve lockfile test: Return immediately if lockfile is present,
to prevent unnecessary and expensive "pidof" calls

- Add better explanation to the log file reading command and JS

- Change user interface: If no errors occurred, the page returns to
the main screen (after a short delay). If an error occurred, the log
output remains and a message is shown.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:36:15 +00:00
Leo-Andres Hofmann
a02f132338 pakfire.cgi: Remove "sleep" after running Pakfire command
The extended lockfile test seems to be sufficient to detect
a running Pakfire process and display the logs.
"Sleep" even proved to be counterproductive, as fast processes
can finish in under a second and are then again not detected.

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:36:06 +00:00
Leo-Andres Hofmann
524bbe326d pakfire.cgi: Add new translations
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:36:02 +00:00
Leo-Andres Hofmann
db9ee62e0a pakfire.cgi: Implement JavaScript log message display
Currently the page becomes unresponsive while Pakfire is busy.
This patch implements a AJAX/JSON driven log output, to provide
continuous information to the user while Pakfire is running.

The output is updated 1x per second, if the load should be too high,
the interval can be change by writing to "pakfire.refreshInterval".

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:35:57 +00:00
Leo-Andres Hofmann
d255e2d1c2 pakfire.cgi: Extend the lockfile test
This implements a function to determine if Pakfire is already running.
It tests the PID and lockfile and can be expanded easily later.
'pidof' checks the full path to avoid confusion.

Removes the unreachable function "refreshpage".

Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
2022-01-14 14:35:52 +00:00
Stefan Schantl
b4c9d29971 pakfire.cgi: Bring back old logic for log displaying
Trying to get rid of the system backpipe check if a pakfire is running
does not work very well. It simply makes the code more complex and
only introduced some new problems.

This commit switches back to the old logic which worked well in the
past.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-01-14 14:35:46 +00:00
Stefan Schantl
7f7f546e4a pakfire.cgi: Implement logic to lock the page until pakfire has been fully launched.
When performing any action which requires pakfire, the page gets locked
with an message informing the user that pakfire is working. The page
will be reloaded when pakfire has been launched and is doing the
requested operation - showing the well known log output. This also
happens when pakfire has been launched via any kind of terminal or SSH
session and the CGI gets accessed.

Internally before pakfire gets started a variable called page_lock will
be set to lock the page. An while loop will keep the page locked until
pakfire is launched fully and has written it's lock_file.

This approach will prevent us from any kind of required time intervall
or race conditions.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 18:34:06 +00:00
Michael Tremer
6f15b0cbe0 pakfire.cgi: Sleep after running a pakfire command
This is required to have better chances in the race of showing the log
output afterwards.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:19:08 +00:00
Michael Tremer
124926ee86 pakfire.cgi: Remove confusing dots in install message
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:05:13 +00:00
Michael Tremer
75ee0279ec pakfire.cgi: Pass packages to install/uninstall as array
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-07-09 13:04:14 +00:00
Michael Tremer
bce8594348 pakfire.cgi: Use new system methods
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-10 14:30:48 +01:00
Stefan Schantl
d702bce20b pakfire.cgi: Check for locked pakfire before trying to perform operations.
Fixes #12621.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-25 09:52:05 +00:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Matthias Fischer
6666b93d11 Update (and cosmetic fixes) for 'pakfire.cgi': Added GUI entry for existing, but unused translation string
While preparing the Core153 update, I found by chance that a language string had been added from
Core152 to Core153 which I couldn't find in any CGI-file.

The translation suggested that this string ('Available Updates') could belong to 'pakfire.cgi'.

And I thought that on the pakfire GUI something was actually missing: the heading above the
box listing the 'Available Updates'. Don't know why I didn't saw this before.

So tried to add these missing heading. I hope I made it right...

Some cosmetic fixes:
I also added some space around the text for 'Available Addons' and 'Installed Addons'
because the text lines weren't separated. There is no seen wordwrapping. This required deleting
some unwanted '<br />' in the affected translation strings.

I tried this about 4 years ago, but somehow this patch got lost.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-24 12:00:12 +00:00
Matthias Fischer
c89156263a pakfire.cgi: Partially fixes Bug #12049
I added translations for package uninstallation but didn't know how to fix
the missing list of affected dependencies during uninstallation, see:

=> https://forum.ipfire.org/viewtopic.php?f=17&t=21912&p=120466#p120593

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-09-24 17:36:37 +00:00
Michael Tremer
f61be862c6 pakfire.cgi: Add UI to select repository
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:43 +00:00
Michael Tremer
131f163ce8 pakfire.cgi: Rename %pakfiresettings to %cgiparams
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:28 +00:00
Michael Tremer
e63fc18d07 pakfire.cgi: Remove some old settings
These can no longer be modified in the GUI and are used nowhere.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:08:13 +00:00
Michael Tremer
bb44410b95 pakfire: Remove option to enable/disable checks for updates
This does not change anything

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-10-24 11:21:12 +01:00
Michael Tremer
06d55142e5 pakfire: Remove any reference to counter.py
The concept has been retired a very log time ago
and the web service only responds with 200 what ever
it is being sent.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-27 07:29:19 +01:00
Michael Tremer
e32591e7bf pakfire: Remove mirror health check
This is not really necessary because pakfire will automatically
failover to the next mirror anyways and that a mirror responds
to an ICMP echo request doesn't necessarily mean that it can
deliver the requested file.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-27 07:23:03 +01:00
Alexander Marx
212fd689a3 BUG10796: Fix textoutput when doing pakfire update in WebUI 2015-04-13 07:52:25 +02:00
Alf Høgemark
f8aa06792f cgi-bin: Add title attribute to input type image where missing
Almost all of <input type="image"... has both an alt and a
title attribute, but some are missing title, and when the icon
is not very clear, it makes it harder to understand what the icon
does. By adding title, the browser displays text when mouse pointer
is over the icon.

Also add missing quotes for alt and title attributes where needed.
2014-02-19 18:31:02 +01:00
Michael Tremer
18fe7748e7 Remove unfunctional autoupgrade function. 2011-07-31 23:00:53 +02:00
Arne Fitzenreiter
324bb8881f remove more bogus logentries. 2011-01-22 18:54:31 +01:00
Arne Fitzenreiter
e528205ed8 extrahd: Add UUID to table.
Fix blkid without cache does not work as nobody.
2010-12-10 13:29:23 +01:00
Jan Paul Tuecking
1e908471f1 Fixed language string on pakfire.cgi. 2010-12-04 20:24:14 +01:00
Jan Paul Tuecking
337305ef81 Added messages into the webif to tell the user a reboot is required 2010-12-04 19:44:11 +01:00
Jan Paul Tuecking
40228ef46f Translated german header in packfire.cgi 2010-08-16 12:02:25 +02:00
Arne Fitzenreiter
25dea62ac0 Add delay to pakfire.cgi to prevent pakfire run's twice. 2010-01-29 00:09:33 +01:00
Arne Fitzenreiter
19b01b74f9 Change that iptv-mac field could also empty for save 2009-10-06 21:09:52 +02:00
Christian Schmidt
d59b02f177 Added option to disable ping check for mirrors. 2009-09-25 17:44:08 +02:00
Jan Paul Tuecking
c661488323 Corrected pakfire configuration questions on pakfire.cgi to understand what they are really doing. 2009-08-06 22:21:39 +02:00
Christian Schmidt
1dd22be219 Corrected 2 cgis not fully translated 2008-05-25 13:08:44 +02:00
Christian Schmidt
28593a79c2 Changed the behaviour of the pakfire cgi
Tried to handle some known pakfire problems (time errors and zero metas)
2008-04-19 14:49:00 +02:00
Christian Schmidt
c506cad0de Changed pakfire logging facility to syslog and added to core12 2008-04-18 15:07:45 +02:00
maniacikarus
5595bc0381 pakfire cgi not refreshes after upgrades
readded firewall options to disbale drop logging
added log option for outgoing fw mode 1
cleaned kernel log from firewall messages
change firewall init script because of changes
added samba cgi ability to change charsets
started core update number 4


git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1132 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-12-28 16:22:35 +00:00
maniacikarus
d2414ee76e corrected speed footer not working with dhcp and static
corrected pakfire ignoring update and upgrade disable when previously 
set
fixed snort rules problem when updating
updated serverall packaages
started building core 2
fixed qos multiport error


git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1125 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-12-17 21:14:28 +00:00
maniacikarus
fee5c6b77d corrected pakfire cgi displaying bash color codes
updated samba


git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1086 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-11-16 15:42:18 +00:00
maniacikarus
91a08eac19 Nochmal cgi fixes
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@948 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-10-05 13:58:50 +00:00
maniacikarus
d40aff3516 Pakfire CGI korrigiert
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@926 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-09-27 14:52:55 +00:00