Merge branch 'master' of github.com:dpavlin/angular-mojolicious
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 13 Dec 2010 22:30:39 +0000 (23:30 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 13 Dec 2010 22:30:39 +0000 (23:30 +0100)
README
common/mojo
public/app/monitor/printers.html
public/favicon.ico [new file with mode: 0644]
run.sh

diff --git a/README b/README
index b7af6eb..4dd9f76 100644 (file)
--- a/README
+++ b/README
@@ -93,7 +93,8 @@ CouchDB examples:
 
        $ ./couchdb-trigger.pl http://localhost:5984/demo trigger/shell.pm
 
-       $ curl -X PUT http://localhost:5984/demo/t1 -d '{"trigger":{"command":"notify-send CouchDB t1"}}'
+       $ curl -X POST http://localhost:5984/demo/ -H 'Content-type:application/json' -d \
+               '{"trigger":{"command":"notify-send \"CouchDB trigger notify example\""}}'
 
 
        couchdb-external-kinosearch.pl - external searcher for KinoSearch indexes
index f56f468..c6b96c8 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f56f46879ef7fc32346ca8696270c6d47cb6cc5f
+Subproject commit c6b96c83cb1904ce1894e18d3bf553df651817bd
index 9af48f4..be75fe0 100644 (file)
@@ -49,60 +49,42 @@ function Printers(xhr){
 
 <div ng:controller="Printers"> 
 
-<label>
-<input type=checkbox name=show_message>
-message
-</label>
-
-<label>
-<input type=checkbox name=show_consumable>
-consumable
-</label>
-
-<label>
-<input type=checkbox name=show_trays>
-trays
-</label>
-
-<label>
-<input type=checkbox name=show_pages>
-pages
-</label>
-
-<label>
-<input type=checkbox name=show_info>
-info
-</label>
+<label><input type=checkbox name=hostname checked>hostname</label>
+<label><input type=checkbox name=model>model</label>
+<label><input type=checkbox name=serial>serial</label>
+<label><input type=checkbox name=message checked>message</label>
+<label><input type=checkbox name=consumable>consumable</label>
+<label><input type=checkbox name=trays>trays</label>
+<label><input type=checkbox name=pages checked>pages</label>
+<label><input type=checkbox name=info>info</label>
+
+<input type=text name=search>
 
 <table>
-<tr ng:repeat="printer in data">
+<tr ng:repeat="printer in data.$filter(search)">
 <td><a href="http://{{printer._key}}" target="{{printer._key}}"><tt>{{printer._key}}</tt></a></td>
-<td>{{printer.hostname}}</td>
 
-<td><div class=message ng:show="show_message" ng:repeat="m in printer.message">{{m}}</div></td>
+<td ng:show="hostname">{{printer.hostname}}</td>
+<td ng:show="model">{{printer.model}}</td>
+<td ng:show="serial">{{printer.serial}}</td>
+
+<td><div class=message ng:show="message" ng:repeat="m in printer.message">{{m}}</div></td>
 
-<td ng:show="show_consumable">
-       <table>
-       <tr ng:repeat="c in printer.consumable">
-       <td align="right" ng:class="'p'+((c.curr * 10 + 0.0001)/ c.max).toFixed(0)">{{ ((c.curr * 100 + 0.0001)/ c.max).toFixed(1) }}%</td>
-       <td>{{c.name}}</td>
-       </tr>
-       </table>
+<td ng:show="consumable">
+<span ng:repeat="c in printer.consumable" ng:class="'p'+((c.curr * 10 + 0.0001)/ c.max).toFixed(0)" title="{{c.name}}">
+       {{ ((c.curr * 100 + 0.0001)/ c.max).toFixed(1) }}%
+</span>
 </td>
 
-<td ng:show="show_trays">
-       <table>
-       <tr ng:repeat="t in printer.tray">
-       <td align="right" ng:class="'p'+((t.capacity * 10 + 0.0001)/ t.max).toFixed(0)">{{t.capacity}}/{{t.max}}</td>
-       <td>{{t.name}}</td>
-       <td>{{t.dim_x}}*{{t.dim_y}}</td>
-       </tr>
-       </table>
+<td ng:show="trays">
+       <span ng:repeat="t in printer.tray" ng:class="'p'+((t.capacity * 10 + 0.0001)/ t.max).toFixed(0)" title="{{t.name}} {{t.dim_x}}*{{t.dim_y}}">
+       {{t.capacity}}/{{t.max}}
+       </span>
 </td>
 
-<td ng:show="show_pages">{{printer.pages}}</td>
+<td ng:show="pages" align="right">{{printer.pages}}</td>
 
-<td ng:show="show_info">{{printer.info}}</td>
+<td ng:show="info">{{printer.info}}</td>
 
 </table>
 
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644 (file)
index 0000000..f80a60d
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/run.sh b/run.sh
index 3d8c39c..f7e54c2 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -7,5 +7,5 @@ if [ ! -z "$1" ] ; then
        test -f public/angular/build/angular.js || ( cd public/angular && rake compile )
 fi
 
-./angular-server.pl daemon --reload #--listen 'http://*:3000'
+./angular-server.pl daemon --reload --listen 'http://*:3001'