Adding New Items to the HEP Lab Equipment Database
In order to add items to the HEP lab equipment database inventory, the following steps are needed:
- Create a PHP file with the relevant item details in the
/unix/www/html/labequipment/equipment/
directory. - Take a square photo of the item and upload it to the corresponding sub-directory in
/unix/www/html/labequipment/photos/
. - Print off the asset tag and stick it to the item.
Creating the Item PHP Record File
The steps to create a record for a new item are as follows:
- Duplicate the template file
/unix/www/html/labequipment/equipment/equipmentItem.php.template
. - Rename it with a unique username for that new item and the extension php.
- Edit the fields within the new file to match the details of the new item.
- Ensure that the new file is owned by the group
users
and group-writeable:chgrp users newItem.php; chmod ug+w,a+rx newItem.php
- Move it to the relevant sub-directory within
/unix/www/html/labequipment/equipment/
corresponding to its category. - Take and upload a photo (see instructions below)
- Refresh the list to ensure the new item shows up in the listing.
- Click on the item to make sure the information is displayed correctly.
- Click on the “Print Asset Tag” link, check that the QR code is working properly, print the asset tag and stick it to the new item. See below for printing setup details.
There are a few prerequisites that must be followed when creating this file:
- The new item
filename
MUST be unique. Items are listed and searched by this unique item ID and if two items have identical filenames/IDs, one will not be displayed. - While the sub-category can be anything concise and descriptive, the category has to be chosen from a specific list (see below).
- Some fields are optional but the following are compulsory in order for the asset tag:
$name
— Display name of item.$contact
— Owner or person responsible: use plus1 username or “High Energy Physics” if owned by the group.$experiment
— Short name of experiment eg. ATLAS, PBT. Use “High Energy Physics” if owned by the group.$specs
— Item specification. Include size and weight (necessary for off-site storage) plus relevant spec.$cat
— Equipment category; see below webpage for options. Single word; lower case.
- For the owner, user their
plus1
username: their contact details are then pulled automatically from the group members list. - Where an item is a duplicate of something that already has a record eg. another NIM delay unit,
don't create another file but simply increment the
$numItems
value in the existing file.
Printing the Asset Tag
We have a Dymo LabelWriter 5XL label printer in D15 that is set up on the HEP laptop network. By default it is loaded with 36 mm x 89 mm labels that are used for the standard asset tags. In order to print to this printer:
- Download the appropriate LabelWriter printer driver software for your OS from the Dymo website (for Linux, the CUPS printer-driver-dymo package is available).
- Connect to the HEP wired laptop network. Note: printing does not work over WiFi.
- Search for “Dymo LabelWriter 5XL” on the network to connect to the printer.
The IP address is:
192.168.4.51
. - For the desired item, click on the “Print Standard Asset Tag” link from the item listing: this will display the asset tag to be printed.
- Print the asset tag from the web browser. The page size needs to be set to:
- No margins — this seems best done from Google Chrome or Firefox using the browser print options (Safari always add default margins through the MacOS print dialogue).
- Scale to fit.
- 36 mm x 89 mm page size (or nearest equivalent).
- Landscape.
If necessary, the printer can be disconnected from the network and plugged in directly via USB.
Adding the Photo
Alongside the new item record file, a photo of the item needs to be taken and uploaded. Please follow these steps:
- Take a square photo of the item and save it as a web-safe format eg. JPG, PNG etc. It doesn't need to be particularly high resolution: somewhere between 300x300 and 800x800 pixels is fine.
- Give it the IDENTICAL name as the item it shows eg. if the filename of the item itself is
pbt_zarges_small.php
, the photo should be saved aspbt_zarges_small.jpg
. To save having to hard-code the filename into each PHP file, the list of photos is constructed and matched automatically but the filenames need to match otherwise the photo won't be found. - Upload the photo to the matching directory in
/unix/www/html/labequipment/photos/
ie. if the PHP item file is stored inequipment/storage/
the photo needs to be uploaded tophotos/storage/
. This directory should have the same name as the item category.
Equipment Categories
These are the categories to choose from when creating the new item file:
comp
— Computing and Networkingdetector
— Detectorselec
— Electronicsnim
— NIM Modules and Cratespmt
— Photomultiplier Tubespower
— Power Suppliesscopes
— Oscilloscopes and Network Analysersstorage
— Storage and Experimental Enclosurestools
— Lab and Workshop Toolsvme
— VME Modules and Crates
Item Details
These are all the fields that can be present within an item PHP record file:
$name
— Display name of item.$contact
— Owner or person responsible: use plus1 username or “High Energy Physics” if owned by the group.$experiment
— Short name of experiment eg. ATLAS, PBT. Use “High Energy Physics” if owned by the group.$specs
— Item specification. Include size and weight (necessary for off-site storage) plus relevant spec.$cat
— Equipment category; see below webpage for options. Single word; lower case.$subcat
— Sub-category; can be anything you want but must be concise and descriptive.$make
— Make of item.$model
— Model of item.$location
— Storage location.$numItems
— Number of identical items in our labs. Only really necessary if there are multiple items covered by same listing.$year
— Year purchased. Can be approximate but useful to gauge the age of the item.$url
— Web address of item details. This can really be anything that gives the maximum information about the item but a product spec page is ideal.$notes
— Any notes relevant to the item eg. long-form spec, anticipated disposal date, usage details etc.