This lesson is being piloted (Beta version)

Data Management using WEB UI

Overview

Teaching: 60 min
Exercises: 0 min
Questions
  • Active user privilage is required.

  • How do I enter and retrieve Items with the WEB UI?

  • How do I perform searches over Items/Tests with the WEB UI?

Objectives
  • To understand how one can POST and GET information of Item(s).

  • To understand how sub-component links could be made.

  • To understand how one can POST and GET information of Tests and images.

  • To be able to perform searches over Items and Tests.

Contents

  Description
Component Types  
Items  
Preparing Items to be Added  
Adding Item(s)  
  Adding Single Item  
  Bulk Adding Items  
  Adding Subcomponents  
  Adding Tests  
  Adding Images  
More Item Operations  
Item Filtering Searching for Items based on chosen Filters
Syntax Syntax in Filter fields
Filtering with Specifications Filtering via the Specifications field
Filtering with Test Data Filtering via the Test Data field









This tutorial will walk you through using the Web UI for the Hardware Database.

The development version of the HWDB can be accessed via http://dbweb0.fnal.gov:8443/cdbdev/login.

The production version of the HWDB can be accessed via http://dbweb0.fnal.gov:8443/cdbdev/login.

Accessing Component Types

Note: Adding component types requires the user to have “Architect” priveleges for the HWDB. This is covered by the previous tutorial, “Setting up Component Types and Test Types.” This tutorial assumes that component types being managed already exist in the HWDB, and the user has been added to the appropriate Roles defined for that component type.

Let’s try accessing a component type from the previous tutorial: “Z.Sandbox.Tutorials.Front Axle”:

component-type-filtering

The component types are displayed in list view. This provides a variety of options as seen below. In particular you may access the Component Type definition, the Test Types, and the list of Items of that component type.

Click on the red boxes in the image below for more information.

component-type-list

Let’s take a look at “Front Axle.”

We can see in the image below that the Specifications Datasheet contains two fields: “Last Name” and “First Name”. These have been given default values of “Muramatsu” and “Hajime”. (If you wish to have no default values, you may use the value “null”.

We also see that the component type has two subcomponents (“connectors”): “My L Wheel” and “My R Wheel”, each of which has been assigned a Part Type ID.

prep-add-items

back to top



Adding Item(s)

Now that we’ve examined the component type, let’s add some items!

view-items-list

back to top



Adding Single Item

To add a single item:

add-item

back to top



Bulk Adding Items

Bulk Adding allows you to add a number of items simultaneously. This is handy if you have a number of Items you wish to reserve Part IDs for, but you’re not ready to enter all the information for those Items yet.

To bulk add items:

bulk-add

back to top



Adding Subcomponents

Suppose we wish to add subcomponents to the previously added item Z00100400005-00030. Since this item has component type “Front Axle”, the component type definition requires that the subcomponents be of component type “Left Wheel” and “Right Wheel”. Suppose we have added items for both of these types, and their Part IDs are Z00100400007-00013 and Z00100400008-00014. Both of these items must have their status set to “Available.”

To add these subcomponents:

add-subcomp

back to top



Adding Test Types & Tests

Suppose we want to add a new test type for “Front Axle” named “Bounce Test.” To do this, perform the following steps:

view-test-types

You may now add test instances for your new test:

avail-test

add-test
submit-test

back to top



Adding Images

In order to add an image to a selected item, click on “Images” on the top item menu (see More Item Operations for more) which will present you with something that looks like the following.

add-image

You can also add images to specific tests associated with items. Suppose we wish to add an image to the bounce test we added to Z00100400005-00030. Then navigate to the particular item and go to its “Test Log” which produces the following which allows you to add an image in the same way as shown above.

test-history

You can also add an image immediately after the additon of a new test, as it gives you the option to do so.

Images are attached to that test result record ONLY. If you “edit” a test, the images you have attached will not carry forward. You will need to decide whether you should re-attach all images every time you update a test record, or regard all images in the historical sequence to be “current.” The author of this presentation has no strong opinion at the time this was written.

back to top



More Item Operations

Once an Item has been created, you are provided with more operations as shown below.

edit-item

back to top

Item Filtering

You can search for Items (Components) based on the usual fields such as Component_type, Part_id, Serial_number, and Creator. In addition, you can filter by the fields as shown below.

You can filter by status: any, available, temporarily not available, permanantly not available. status filter

You can also filter by Location, Manufacturer, and Country of Origin. Each of which are case insensitive and need not be completely spelled out. location,Manufac,Country filter

A more advanced discussion of filtering requires use of specific syntax.

Syntax

There is certain syntax that can be used when you are refining your search using filter fields. The following symbols can be utilized with numbers in filter fields.

symbol definition
== equal to
!= not equal to
< less than
<= less than or equal to
> greater than
>= greater than or equal to

The following symbols can be utilized with strings and substrings in filter fields.

symbol definition
== equal to
!= not equal to
~ case sensitive regex search
~* case insensitive regex search

back to top

Filtering with Specifications

You can also filter based on item Specifications. Suppose there exists an item with the following specifictations:

"specifications":[
  {
    "Documentation": "https://something.com/something"
    "SiPM_Strip_ID": 4548
    "Test_Box_ID": "Mib3"
    "Tray_Number": 20
    "Vendor_box_Number": 14,
    "Vendor_Delivery_ID": "HPK_Ciemat_03"
    "_meta":{
      "_column_order:[
        "Vendor_Delivery_ID",
        "Vendor_box_Number",
        "SiPM_Strip_ID",
        "Test_Box_ID",
        "Documentation"
      ]
    }
  }
]

Then you can apply the following filters to search the item. The syntax used in the filtering field is explained in depth in the following section. Spec filter



Consider an item with the following Specifications.

"specifications":[
  {
    "Vendor_Delivery_ID": "HPK_Ciemat_03"
    "DATA": {
      "Drawing Number": "DFD-21-2101",
      "Label Code": "12345",
      "Name": "Main I-Beam"
    }
  }
]

Then,

all return this item (as well as others if possible). However,

would not return any item as ~ is case sensitive.

back to top



Filtering with Test Data

You can also filter using Test_data in the same way as Specifications. Suppose you have an item with the following test data:

"test_data":{
  "Test Results": [
    {
      "Location": "Minnesota",
      "Operator": "Scientist Red"; "Scientist Blue",
      "SiPM":[
        {
          "Comment":"",
          "List1":[
            1.77734e-06
            6.90008e-07
            -2.44907e-06
            5.33429e-06
          ]
          "List2":[
            "H_RED"
            "Z_yellow"
            "U_green"
            "J_BLUE"
          ]
        }
      ]
    }
  ]
}

Then,

all return the intended item.

back to top

Key Points

  • Subcomponent links can only be made with Items, whose status = “available”.