From 227bc1cf0ca83a2158815093c485114101550c0a Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 17:31:02 -0800 Subject: Permissions on newuser.cgi for ease of testing. --- pinyweb/cgi-bin/newuser.cgi | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 pinyweb/cgi-bin/newuser.cgi diff --git a/pinyweb/cgi-bin/newuser.cgi b/pinyweb/cgi-bin/newuser.cgi old mode 100644 new mode 100755 -- cgit v1.2.3 From 9a6e827943644bd3c4b01c16beeabb65968aea9d Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 17:31:18 -0800 Subject: Add missing dependency. --- pinyweb/debian/changelog | 6 ++++++ pinyweb/debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pinyweb/debian/changelog b/pinyweb/debian/changelog index 33e7f7d..fa8b9b0 100644 --- a/pinyweb/debian/changelog +++ b/pinyweb/debian/changelog @@ -1,3 +1,9 @@ +pinyweb (0.8) unstable; urgency=low + + * Depend on pinyadmin. + + -- Julian Blake Kongslie Tue, 18 Jan 2011 17:30:20 -0800 + pinyweb (0.7) unstable; urgency=low * it turns out i'm an idiot diff --git a/pinyweb/debian/control b/pinyweb/debian/control index 1a1d795..3758c95 100644 --- a/pinyweb/debian/control +++ b/pinyweb/debian/control @@ -8,7 +8,7 @@ Standards-version: 3.9.1 Package: pinyweb Architecture: any -Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libpiny-perl (>= 0.14) +Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libpiny-perl (>= 0.14), pinyadmin (>= 0.10) Description: CGIs for managing piny repositories The CGI programs for day-to-day administrative tasks in the Piny infrastructure. -- cgit v1.2.3 From 0c395cf4516981ef0f9b56a082d700f6fc4697e9 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 17:45:58 -0800 Subject: Adding a CGI for doing AJAX-style live validation of constraints. --- pinyweb/cgi-bin/checkconstraint.cgi | 41 +++++++++++++++++++++++++++++++++++++ pinyweb/debian/control | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100755 pinyweb/cgi-bin/checkconstraint.cgi diff --git a/pinyweb/cgi-bin/checkconstraint.cgi b/pinyweb/cgi-bin/checkconstraint.cgi new file mode 100755 index 0000000..8db0903 --- /dev/null +++ b/pinyweb/cgi-bin/checkconstraint.cgi @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use CGI; +use JSON qw( encode_json ); +use Moose::Util::TypeConstraints qw( find_type_constraint ); + +use Piny; + +my $q = CGI->new( ); + +my $type = $q->param( 't' ); +my $value = $q->param( 'v' ); + +if ( not defined $type or not defined $value ) { + print "Status: 400 Bad Request\nContent-type: application/json\n\n"; + print encode_json( { "ok" => JSON::false, "msg" => "Unable to validate due to client-side error, please reload this page. Required parameter missing." } ); +} else { + + my $constraint = find_type_constraint( $type ); + + if ( not defined $constraint ) { + print "Status: 400 Bad Request\nContent-type: application/json\n\n"; + print encode_json( { "ok" => JSON::false, "msg" => "Unable to validate due to client-side error, please reload this page. Invalid constraint name." } ); + } else { + + print "Status: 200 OK\nContent-type: application/json\n\n"; + + my $error = $constraint->validate( $value ); + + if ( defined $error ) { + print encode_json( { "ok" => JSON::false, "msg" => $error } ); + } else { + print encode_json( { "ok" => JSON::true } ); + }; + + }; + +}; diff --git a/pinyweb/debian/control b/pinyweb/debian/control index 3758c95..97e5537 100644 --- a/pinyweb/debian/control +++ b/pinyweb/debian/control @@ -8,7 +8,7 @@ Standards-version: 3.9.1 Package: pinyweb Architecture: any -Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libpiny-perl (>= 0.14), pinyadmin (>= 0.10) +Depends: ${perl:Depends}, ${misc:Depends}, ${shlibs:Depends}, libjson-perl, libpiny-perl (>= 0.14), pinyadmin (>= 0.10) Description: CGIs for managing piny repositories The CGI programs for day-to-day administrative tasks in the Piny infrastructure. -- cgit v1.2.3 From 22f758a0af96b5b662b929f54a4c91f8f5d810ee Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 17:55:54 -0800 Subject: Config for AJAX validation. --- pinyconfigs/debian/changelog | 6 ++++++ pinyconfigs/debian/control | 2 +- pinyconfigs/etc/apache2/sites-available/piny | 1 + pinyweb/debian/changelog | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pinyconfigs/debian/changelog b/pinyconfigs/debian/changelog index 038fb49..c5fb6bf 100644 --- a/pinyconfigs/debian/changelog +++ b/pinyconfigs/debian/changelog @@ -1,3 +1,9 @@ +pinyconfigs (0.3) unstable; urgency=low + + * Depend on pinyweb. + + -- Julian Blake Kongslie Tue, 18 Jan 2011 17:55:46 -0800 + pinyconfigs (0.2) unstable; urgency=low * Standards version. diff --git a/pinyconfigs/debian/control b/pinyconfigs/debian/control index 1af1c86..cce693f 100644 --- a/pinyconfigs/debian/control +++ b/pinyconfigs/debian/control @@ -8,7 +8,7 @@ Standards-version: 3.9.1 Package: pinyconfigs Architecture: all -Depends: ${misc:Depends} +Depends: ${misc:Depends}, pinyweb (>= 0.8) Description: Configuration files for piny The configuration files needed for a piny configuration. . diff --git a/pinyconfigs/etc/apache2/sites-available/piny b/pinyconfigs/etc/apache2/sites-available/piny index 0904ea6..dc8b637 100644 --- a/pinyconfigs/etc/apache2/sites-available/piny +++ b/pinyconfigs/etc/apache2/sites-available/piny @@ -60,6 +60,7 @@ ScriptAlias /cgit /usr/lib/cgi-bin/cgit.cgi ScriptAlias /piny-newuser /usr/lib/cgi-bin/piny/newuser.cgi + ScriptAlias /piny-validate /usr/lib/cgi-bin/piny/checkconstraint.cgi ScriptAlias /auth/ /usr/lib/cgi-bin/piny/auth/ Include /etc/apache2/piny-enabled diff --git a/pinyweb/debian/changelog b/pinyweb/debian/changelog index fa8b9b0..18dfcf4 100644 --- a/pinyweb/debian/changelog +++ b/pinyweb/debian/changelog @@ -1,8 +1,9 @@ pinyweb (0.8) unstable; urgency=low * Depend on pinyadmin. + * Adding an AJAX CGI for live validation. - -- Julian Blake Kongslie Tue, 18 Jan 2011 17:30:20 -0800 + -- Julian Blake Kongslie Tue, 18 Jan 2011 17:52:23 -0800 pinyweb (0.7) unstable; urgency=low -- cgit v1.2.3 From 65ee46aa1b95c85688526c5ea314b0b7baee5f10 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 18:01:55 -0800 Subject: Include standard javascript directory in web config. --- pinyconfigs/etc/apache2/sites-available/piny | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinyconfigs/etc/apache2/sites-available/piny b/pinyconfigs/etc/apache2/sites-available/piny index dc8b637..0e9be04 100644 --- a/pinyconfigs/etc/apache2/sites-available/piny +++ b/pinyconfigs/etc/apache2/sites-available/piny @@ -8,6 +8,8 @@ AllowOverride None + Alias /js /usr/share/javascript + RedirectMatch 301 ^/$ http://piny.be/piny-web/ @@ -25,6 +27,8 @@ AllowOverride None + Alias /js /usr/share/javascript + RedirectMatch 301 ^/$ http://piny.be/piny-web/ SSLEngine On -- cgit v1.2.3 From 5e5c8b90363ff5460ee6eb9378a31f099d38aefe Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 18 Jan 2011 18:49:04 -0800 Subject: Adding a plugin I require. --- libpiny/share/ikiwiki.setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpiny/share/ikiwiki.setup b/libpiny/share/ikiwiki.setup index 18f8418..e6619d4 100644 --- a/libpiny/share/ikiwiki.setup +++ b/libpiny/share/ikiwiki.setup @@ -54,7 +54,7 @@ use IkiWiki::Setup::Standard { prefix_directives => 1, httpauth => 1, # To add plugins, list them here. - add_plugins => [qw{sidebar toc meta table tag graphviz httpauth img attachment rename remove map teximg version edittemplate}], + add_plugins => [qw{sidebar toc meta table tag graphviz httpauth img attachment rename remove map teximg version edittemplate rawhtml}], disable_plugins => [qw{openid passwordauth}], teximg_prefix => "\\documentclass{scrartcl} \\usepackage[version=3]{mhchem} -- cgit v1.2.3