Sisyphus
: 7 2023 | : 18459 | : 27964493
en ru br
ALT
S:0.9.2-alt1
5.1: 0.8-alt2.M51.1
4.1: 0.4-alt2.M41.3
4.0: 0.1-alt2.M40.1
www.altlinux.org/Changes

:: //
: alterator-logs

                   Gear   Bugs and FR  Repocop 

alterator-logs-0.1/000075500000000000000000000000001101303406200142755ustar00rootroot00000000000000alterator-logs-0.1/Makefile000064400000000000000000000007411101303406200157370ustar00rootroot00000000000000NAME=logs
DESCRIPTION="System logs"

INSTALL=/usr/bin/install

AWK_TRANSLATE = $(shell [ -d backend3 ] && for i in backend3/*; do file $$i | fgrep -qs 'awk script text' && echo $$i; done)

all:
clean:
install: install-backend install-po install-html

include /usr/share/alterator/build/po.mak
include /usr/share/alterator/build/ui2.mak
include /usr/share/alterator/build/backend.mak
include /usr/share/alterator/build/fbi.mak
include /usr/share/alterator/build/html-messages.mak
alterator-logs-0.1/applications/000075500000000000000000000000001101303406200167635ustar00rootroot00000000000000alterator-logs-0.1/applications/logs.desktop000064400000000000000000000004021101303406200213160ustar00rootroot00000000000000[Desktop Entry]
Encoding=UTF-8
Type=Application
Categories=X-Alterator-Statistics
Icon=logs
Terminal=false
Name=System logs
Name[ru_RU]=Системные журналы
Name[uk_UA]=Системные журналы
X-Alterator-URI=/logs
X-Alterator-UI=html
alterator-logs-0.1/backend3/000075500000000000000000000000001101303406200157475ustar00rootroot00000000000000alterator-logs-0.1/backend3/logs000075500000000000000000000047161101303406200166510ustar00rootroot00000000000000#!/bin/bash -f

_()
{
LANG=${in_language%%;*}.utf8 gettext "alterator-logs" "$1"
}

. /usr/share/alterator/build/backend3.sh

log=(
"alterator"
"messages"
"maillog"
"secure"
"daemons"
"access"
"error"
"nmbd"
"smbd"
)
file=(
"/var/log/configd.log"
"/var/log/messages"
"/var/log/maillog"
"/var/log/secure"
"/var/log/daemons/info"
"/var/log/httpd2/access_log"
"/var/log/httpd2/error_log"
"/var/log/samba/log.nmbd"
"/var/log/samba/log.smbd"
)
desc=(
"Alterator log"
"Common messages"
"Mail log"
"Security log"
"Daemons log"
"Web-server access log"
"Web-server error log"
"Samba NetBIOS log"
"Samba SMB/CIFS log"
)

on_message()
{
case "$in_action" in
write)
echo '()'
;;
read)
local object lines begin i path count
echo '('
object="${in__objects%%/*}"

lines="${in__objects#$object/}"
if [ "$lines" != "${in__objects}" ]; then
lines="${lines%%/*}"
else
lines=20
fi
printf 'lines "%d"' "$lines"

begin="${in__objects#$object/$lines/}"
if [ "$begin" != "${in__objects}" ]; then
begin="${begin%%/*}"
else
let begin=-lines
fi

i=0
while [ $i -lt ${#log[@]} ]; do
[ "${log[$i]}" = "$object" ] && break
let i=++i
done
if [ $i -lt ${#log[@]} ]; then
path="${file[$i]}"
if [ "$begin" -lt 0 ]; then
let count=-begin
else
let count=`cat $path | wc -l`-begin
fi

echo -n 'content "'
tail -n "$count" "$path" | head -n "$lines" | sed 's,",\\",g'
echo '"'
fi
echo ')'
;;
list)
local i
echo '('
i=0
while [ $i -lt ${#log[@]} ]; do
printf '("%s" path "%s" desc "%s")' \
"${log[$i]}" "${file[$i]}" "`_ "${desc[$i]}"`"
let i=++i
done
echo ')'
;;
constraints)
local i
echo '('
if [ "${in__objects}" = "/" ]; then
printf ' path (label "%s")' "`_ "Path"`"
printf ' desc (label "%s")' "`_ "Description"`"
else

path="${in__objects%%/*}"
i=0
while [ $i -lt ${#log[@]} ]; do
[ "${log[$i]}" = "$path" ] && break
let i=++i
done
if [ $i -lt ${#log[@]} ]; then
printf ' path (label "%s")' "${file[$i]}"
printf ' desc (label "%s")' "`_ "${desc[$i]}"`"
else
printf ' path (label "unknown")'
fi

fi
echo ')'
;;
*)
echo '#f'
;;
esac
}

message_loop
alterator-logs-0.1/backend3/template-logs000075500000000000000000000031641101303406200204560ustar00rootroot00000000000000#!/bin/bash

_()
{
LANG=${in_language%%;*}.utf8 gettext "alterator-logs" "$1"
}

#turn of auto expansion
set -f

. /usr/share/alterator/build/backend3.sh

on_message()
{
case "$in_action" in
#information for renderer
template)
echo '('
echo ' help "logs.html"'
echo ' template "form"'
echo ' translate "alterator-logs"'

if [ $in__objects = "/" ];
then
echo ' url "logs.html"'
else
local object lines begin
echo ' url "logs-cat.html"'

object="${in__objects%%/*}"

lines="${in__objects#$object/}"
if [ "$lines" != "${in__objects}" ]; then
let lines="${lines%%/*}"
else
let lines=20
fi

begin="${in__objects#$object/$lines/}"
[ -n "$in_lines" ] && let lines="$in_lines"
if [ "$begin" != "${in__objects}" ]; then
let begin="${begin%%/*}"
else
let begin=-lines
fi

[ -n "$in_first" ] && let begin=0
[ -n "$in_last" ] && let begin=-lines
if [ -n "$in_prev" ]; then
if [ $begin -ge 0 -a $begin -lt $lines ]; then
let begin=0
else
let begin=begin-lines
fi
fi
if [ -n "$in_next" ]; then
if [ $begin -lt 0 -a $((begin+lines)) -ge 0 ]; then
let begin=-lines
else
let begin=begin+lines
fi
fi
printf 'redirect "/logs/%s/%d/%d"' "$object" $lines $begin
fi
echo ')'
;;
info)
echo '('
printf ' title "%s"' "`_ "System logs"`"
printf ' description "%s"' "`_ "Show system logs"`"
printf ' group "%s"' "`_ "Statistics"`"
echo ')'
;;
*)
echo '#f'
;;
esac
}

message_loop
alterator-logs-0.1/html/000075500000000000000000000000001101303406200152415ustar00rootroot00000000000000alterator-logs-0.1/html/extra-messages.html000064400000000000000000000007111101303406200210560ustar00rootroot00000000000000<html>
<body>
<span translate="_">Alterator log</span>
<span translate="_">Common messages</span>
<span translate="_">Mail log</span>
<span translate="_">Security log</span>
<span translate="_">Daemons log</span>
<span translate="_">Web-server access log</span>
<span translate="_">Web-server error log</span>
<span translate="_">Samba NetBIOS log</span>
<span translate="_">Samba SMB/CIFS log</span>
</body>
</html>
alterator-logs-0.1/html/fbi/000075500000000000000000000000001101303406200160015ustar00rootroot00000000000000alterator-logs-0.1/html/fbi/logs-cat.html000064400000000000000000000020171101303406200204000ustar00rootroot00000000000000<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<!-- logs administration module -->
<html>
<head>
<title>System logs - ALT Linux Console</title>
<link type="text/css" rel="stylesheet" href="/fbi/styles/logs.css"/>
</head>
<body>
<h1><span translate="_">System logs</span></h1>
<local:a href="/logs"><span translate="_">Back to the list</span></local:a>
<h2><label for="desc"/></h2>
<h3><span translate="_">Path</span>: <label for="path"/></h3>
<form method="POST">
<textarea name="content" cols="100" rows="30" readonly="yes"></textarea>
<br/>
<input type="submit" value="First" class="btn" name="first"/>
<input type="submit" value="Previous" class="btn" name="prev"/>
<input type="text" name="lines" align="right" size="3"/>
<span translate="_">lines</span>
<input type="submit" value="Next" class="btn" name="next"/>
<input type="submit" value="Last" class="btn" name="last"/>
</form>
</body>
</html>
alterator-logs-0.1/html/fbi/logs.html000064400000000000000000000017441101303406200176410ustar00rootroot00000000000000<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<!-- logs administration module -->
<html>
<head>
<title>System logs - ALT Linux Console</title>
<link type="text/css" rel="stylesheet" href="/fbi/styles/logs.css"/>
</head>
<body>
<h1><span translate="_">System logs</span></h1>
<form method="POST" highlight-required="no">
<h2><span translate="_">Available logs</span></h2>
<table class="log-list">
<thead>
<tr>
<th><label for="path">Path</label></th>
<th><label for="desc">Description</label></th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody class="alterator-list">
<tr>
<td nowrap="yes"><span class="alterator-label" name="path"></span></td>
<td><span class="alterator-label" name="desc"></span></td>
<td nowrap="yes">
<a href="" class="alterator-ref">
<span translate="_">view</span></a>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
alterator-logs-0.1/html/fbi/styles/000075500000000000000000000000001101303406200173245ustar00rootroot00000000000000alterator-logs-0.1/html/fbi/styles/logs.css000064400000000000000000000002211101303406200207750ustar00rootroot00000000000000.log-list {
border-style:none;
}
.log-list td,th {
border-style:none;
text-align:left;
padding-left:3px;
padding-right:3px;
}
alterator-logs-0.1/po/000075500000000000000000000000001101303406200147135ustar00rootroot00000000000000alterator-logs-0.1/po/alterator-logs.pot000064400000000000000000000036771101303406200204130ustar00rootroot00000000000000# 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: 2008-03-03 15:59+0300\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: ui/html-messages.scm:1 ui/html-messages.scm:9 backend3/template-logs:69
msgid "System logs"
msgstr ""

#: ui/html-messages.scm:2
msgid "Back to the list"
msgstr ""

#: ui/html-messages.scm:3 backend3/logs:104
msgid "Path"
msgstr ""

#: ui/html-messages.scm:4
msgid "First"
msgstr ""

#: ui/html-messages.scm:5
msgid "Previous"
msgstr ""

#: ui/html-messages.scm:6
msgid "lines"
msgstr ""

#: ui/html-messages.scm:7
msgid "Next"
msgstr ""

#: ui/html-messages.scm:8
msgid "Last"
msgstr ""

#: ui/html-messages.scm:10
msgid "Available logs"
msgstr ""

#: ui/html-messages.scm:11
msgid "view"
msgstr ""

#: ui/html-messages.scm:12
msgid "Alterator log"
msgstr ""

#: ui/html-messages.scm:13
msgid "Common messages"
msgstr ""

#: ui/html-messages.scm:14
msgid "Mail log"
msgstr ""

#: ui/html-messages.scm:15
msgid "Security log"
msgstr ""

#: ui/html-messages.scm:16
msgid "Daemons log"
msgstr ""

#: ui/html-messages.scm:17
msgid "Web-server access log"
msgstr ""

#: ui/html-messages.scm:18
msgid "Web-server error log"
msgstr ""

#: ui/html-messages.scm:19
msgid "Samba NetBIOS log"
msgstr ""

#: ui/html-messages.scm:20
msgid "Samba SMB/CIFS log"
msgstr ""

#: backend3/logs:5 backend3/template-logs:5
msgid "alterator-logs"
msgstr ""

#: backend3/logs:105
msgid "Description"
msgstr ""

#: backend3/template-logs:70
msgid "Show system logs"
msgstr ""

#: backend3/template-logs:71
msgid "Statistics"
msgstr ""
alterator-logs-0.1/po/ru.po000064400000000000000000000047671101303406200157170ustar00rootroot00000000000000# Alterator logs module Russian translation.
# Copyright (C) 2007 Grigory Batalov <bga@altlinux.org>
# This file is distributed under the same license
# as the alterator-logs package.
#
msgid ""
msgstr ""
"Project-Id-Version: alterator-logs 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-03-03 15:59+0300\n"
"PO-Revision-Date: 2007-08-09 20:48+0400\n"
"Last-Translator: Grigory Batalov <bga@altlinux.org>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ui/html-messages.scm:1 ui/html-messages.scm:9 backend3/template-logs:69
msgid "System logs"
msgstr "Системные журналы"

#: ui/html-messages.scm:2
msgid "Back to the list"
msgstr "Назад к списку"

#: ui/html-messages.scm:3 backend3/logs:104
msgid "Path"
msgstr "Путь"

#: ui/html-messages.scm:4
msgid "First"
msgstr "Первые"

#: ui/html-messages.scm:5
msgid "Previous"
msgstr "Предыдущие"

#: ui/html-messages.scm:6
msgid "lines"
msgstr "строк"

#: ui/html-messages.scm:7
msgid "Next"
msgstr "Следующие"

#: ui/html-messages.scm:8
msgid "Last"
msgstr "Последние"

#: ui/html-messages.scm:10
msgid "Available logs"
msgstr "Доступные журналы"

#: ui/html-messages.scm:11
msgid "view"
msgstr "посмотреть"

#: ui/html-messages.scm:12
msgid "Alterator log"
msgstr "Журнал конфигуратора"

#: ui/html-messages.scm:13
msgid "Common messages"
msgstr "Общие сообщения"

#: ui/html-messages.scm:14
msgid "Mail log"
msgstr "Почтовый журнал"

#: ui/html-messages.scm:15
msgid "Security log"
msgstr "Журнал безопасности"

#: ui/html-messages.scm:16
msgid "Daemons log"
msgstr "Журнал демонов"

#: ui/html-messages.scm:17
msgid "Web-server access log"
msgstr "Посещения веб-сервера"

#: ui/html-messages.scm:18
msgid "Web-server error log"
msgstr "Ошибки веб-сервера"

#: ui/html-messages.scm:19
msgid "Samba NetBIOS log"
msgstr "Журнал Samba NetBIOS"

#: ui/html-messages.scm:20
msgid "Samba SMB/CIFS log"
msgstr "Журнал Samba SMB/CIFS"

#: backend3/logs:5 backend3/template-logs:5
msgid "alterator-logs"
msgstr ""

#: backend3/logs:105
msgid "Description"
msgstr "Описание"

#: backend3/template-logs:70
msgid "Show system logs"
msgstr "Просмотр системных журналов"

#: backend3/template-logs:71
msgid "Statistics"
msgstr "Статистика"
alterator-logs-0.1/ui/000075500000000000000000000000001101303406200147125ustar00rootroot00000000000000alterator-logs-0.1/ui/html-messages.scm000064400000000000000000000005511101303406200201700ustar00rootroot00000000000000(_ "System logs")
(_ "Back to the list")
(_ "Path")
(_ "First")
(_ "Previous")
(_ "lines")
(_ "Next")
(_ "Last")
(_ "System logs")
(_ "Available logs")
(_ "view")
(_ "Alterator log")
(_ "Common messages")
(_ "Mail log")
(_ "Security log")
(_ "Daemons log")
(_ "Web-server access log")
(_ "Web-server error log")
(_ "Samba NetBIOS log")
(_ "Samba SMB/CIFS log")
 
: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
: Michael Shigorin