zzz_archive:mozilla-devel:staff_client_source_code
Table of Contents
To Do
Currently, a rewrite is happening here: /ILS/Open-ILS/xul/staff_client/ (SVN).
If you have feedback, advice, code, etc., then please join our mailing lists (evergreen-ils.org)! Or alternatively, mail us at feedback@evergreen-ils.org
My current to-do list is here: staff_client_todo
Inside the staff client (for Developers and Admins)
Scratch Pad
- To build and run a versionless staff client in Linux, in /ILS/Open-ILS/xul/staff_client/:
rm -rf ~/.pines/ && make STAFF_CLIENT_BUILD_ID='' && cd build/ && /some/path/xulrunner application.ini ; cd ..
- To build and run a staff client in Linux with a specific build ID, in /ILS/Open-ILS/xul/staff_client/:
rm -rf ~/.pines/ && make STAFF_CLIENT_BUILD_ID='SOME_BUILD_ID' && cd build/ && /some/path/xulrunner application.ini ; cd ..
- To tweak a perl module, edit and copy to correct location in /openils/lib/perl5/ (or wherever, depending on install), in our case on weezie or dev:
cp -r ILS/Open-ILS/src/perlmods/OpenILS/* /openils/lib/perl5/OpenILS/
then as root, do
su - opensrf -c '/openils/bin/osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c /openils/conf/opensrf_core.xml -a restart_perl'
- To restart the C code, as root do
su - opensrf -c '/openils/bin/osrf_ctl.sh -d /tmp/ -p /openils/conf/bootstrap.conf -c /openils/conf/opensrf_core.xml -a restart_c'
- The config cgi's for dev: http://fw1/cgi-bin/config.cgi
- To invoke psql on frankenweezie1
PGUSER=postgres /opt/pg811/bin/psql -p 5433 develooper
- To invoke oilsrequestor on dev
oils_requestor -f ~/.srfsh.xml -i fm_IDL.xml -c srfsh -u staff1 -p staff1
- From generate_fines.srfsh:
open-ils.storage.action.circulation.overdue.generate_fines 1
- Listing barcodes for open copy transits via sql:
SELECT b.barcode, c.shortname, a.* FROM action.transit_copy AS a, asset.copy AS b, actor.org_unit AS c WHERE a.target_copy = b.id AND c.id = a.dest AND dest_recv_time IS NULL;
- Listing patron's and barcodes for open circulations via sql:
SELECT c.usrname, b.barcode, a.id FROM "action".circulation AS a, asset.copy AS b, actor.usr AS c WHERE a.usr = c.id AND a.target_copy = b.id AND xact_finish IS NULL;
- List holds ready for pickup:
SELECT u.usrname, c.barcode, h.id FROM action.hold_request AS h, asset.copy AS c, actor.usr AS u WHERE h.current_copy = c.id AND h.usr = u.id AND h.fulfillment_time IS NULL;
- List permission groups having a specific permission via sql:
SELECT t.name FROM permission.grp_tree AS t WHERE t.id IN ( SELECT grp FROM permission.grp_perm_map WHERE perm = (SELECT id FROM permission.perm_list WHERE code = 'COPY_IS_REFERENCE.override') );
- List permissions for a specific permission group via sql:
SELECT code, depth, grantable, a.description FROM permission.grp_perm_map AS c, permission.perm_list AS a, permission.grp_tree AS b WHERE grp = b.id AND perm = a.id AND b.name = 'Circ1';
- How to update just the xul on a brick in production:
~/evergreen.sh -a detach_brick ~/evergreen.sh -a update_cvs ~/evergreen.sh -a build_xul -x <NEW_XUL_DIR> ~/evergreen.sh -a attach_brick
- How to update the whole shebang on a brick in production:
cd /root/scripts/ ; ./evergreen_all.sh -u -x <NEW_XUL_DIR>
- New ways to update production:
Fetch a bundle as opensrf: ./evergreen.sh -u http://open-ils.org/downloads/ -f Evergreen-ILS-1.0.2.2.tar.gz -a fetch Full update as root: ./evergreen_all.sh -u http://open-ils.org/downloads/ -f Evergreen-ILS-1.0.2.2.tar.gz
- To start clark kent (reporting) on fw3 (db03):
su postgres -c 'PERL5LIB=/openils/lib/perl5/ /openils/bin/clark-kent.pl -c 4 -d'
- An example of rolling back the XUL on a brick:
su - opensrf -c 'cd /openils/var/web/xul/ ; ls -l sc_v100_rc2 ; rm sc_v100_rc2 ; ln -s sc_v100_rc2-50 sc_v100_rc2 ; ls -l sc_v100_rc2'
- Using autogen to update static files:
su opensrf -c "cd /openils/bin/ && ./autogen.sh ../conf/bootstrap.conf"
- evergreen.sh is for bricks, osrf_ctl.sh is for a single box
- in srfsh, to see applications/services registered with the router, enter:
request router opensrf.router.info.class.list
Viewing Reports via web browser
- In command line go to where you have the srf shell configured and type in srfsh.
user@computer:~$ srfsh
- Login to it:
srfsh# login admin open-ils
- If you had a successful login you will see something like this:
Received Data: { "ilsevent":0, "textcode":"SUCCESS", "desc":" ", "pid":28132, "stacktrace":"oils_auth.c:312", "payload":{ "authtoken":"4d2e586236332400795c8d26d95907fd", "authtime":420.000000 } }
- Keep the terminal open and go to a browser (with OpenSRF and Evergreen running) and go to:
localhost/reports/
- Click on the oils_report.xhtml link. You should see "You are logged in as" and "Loading…"
- In the address bar you see "https://localhost/reports/oils_rpt.xhtml" add the following onto it
?ses=
- And after the equals sign paste in the "authtoken" that you got from logging in with the srf shell (which should still be open)
https://localhost/reports/oils_rpt.xhtml?ses=4d2e586236332400795c8d26d95907fd
- You should now be able to see the reports pages and use the interface
zzz_archive/mozilla-devel/staff_client_source_code.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1