Missing files from last patch, oops
parent
2cba7fd727
commit
44ffd6a707
|
@ -0,0 +1,16 @@
|
|||
USING: continuations db db.sqlite io.directories io.files.temp
|
||||
mason.server tools.test ;
|
||||
IN: mason.server.tests
|
||||
|
||||
[ "test.db" temp-file delete-file ] ignore-errors
|
||||
|
||||
[ 0 2 ] [
|
||||
"test.db" temp-file <sqlite-db> [
|
||||
init-mason-db
|
||||
|
||||
counter-value
|
||||
increment-counter-value
|
||||
increment-counter-value
|
||||
counter-value
|
||||
] with-db
|
||||
] unit-test
|
|
@ -0,0 +1,14 @@
|
|||
! Copyright (C) 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors furnace.actions http.server.responses
|
||||
mason.server math.parser ;
|
||||
IN: webapps.mason.counter
|
||||
|
||||
: <counter-action> ( -- action )
|
||||
<action>
|
||||
[
|
||||
[
|
||||
counter-value number>string
|
||||
"text/plain" <content>
|
||||
] with-mason-db
|
||||
] >>display ;
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version='1.0' ?>
|
||||
|
||||
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
|
||||
<t:title>Mason dashboard</t:title>
|
||||
|
||||
<h1>Force build now</h1>
|
||||
<t:form t:action="$mason-app/dashboard/increment-counter">
|
||||
<p><button type="submit">Increment counter</button></p>
|
||||
</t:form>
|
||||
|
||||
<h1>Crashed builders</h1>
|
||||
<t:xml t:name="crashed" />
|
||||
|
||||
<h1>Make a release</h1>
|
||||
<t:form t:action="$mason-app/dashboard/make-release">
|
||||
<table>
|
||||
<tr><td>Version:</td><td><t:field t:name="version" /></td></tr>
|
||||
<tr><td>Announcement URL:</td><td><t:field t:name="announcement-url" /></td></tr>
|
||||
</table>
|
||||
|
||||
<p><button type="submit">Go</button></p>
|
||||
</t:form>
|
||||
</t:chloe>
|
|
@ -0,0 +1,20 @@
|
|||
! Copyright (C) 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors kernel mason.server furnace.actions
|
||||
html.forms sequences xml.syntax webapps.mason.utils ;
|
||||
IN: webapps.mason.downloads
|
||||
|
||||
: crashed-builder-list ( -- xml )
|
||||
crashed-builders [
|
||||
[ package-url ] [ [ os>> ] [ cpu>> ] bi "/" glue ] bi
|
||||
[XML <li><a href=<->><-></a></li> XML]
|
||||
] map
|
||||
[XML <ul><-></ul> XML] ;
|
||||
|
||||
: <dashboard-action> ( -- action )
|
||||
<page-action>
|
||||
[
|
||||
[
|
||||
crashed-builder-list "crashed" set-value
|
||||
] with-mason-db
|
||||
] >>init ;
|
|
@ -0,0 +1,14 @@
|
|||
! Copyright (C) 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors furnace.actions math.parser
|
||||
http.server.responses mason.server ;
|
||||
IN: webapps.mason.increment-counter
|
||||
|
||||
: <increment-counter-action> ( -- action )
|
||||
<action>
|
||||
[
|
||||
[
|
||||
increment-counter-value
|
||||
number>string "text/plain" <content>
|
||||
] with-mason-db
|
||||
] >>submit ;
|
Loading…
Reference in New Issue