Skip to content

Commit

Permalink
add product type to info list
Browse files Browse the repository at this point in the history
  • Loading branch information
lstillwe committed Jun 29, 2023
1 parent 213b131 commit c705c13
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions terria_catalogV8DB.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ class TerriaCatalogDB:
'"name": "Storm Name",' \
'"content": "Content",' \
'"show": false' \
'},' \
'{' \
'"name": "Product Type",' \
'"content": "Content",' \
'"show": false' \
'}' \
']' \
'}'
Expand Down Expand Up @@ -470,7 +475,7 @@ def get_wms_style(self, layername):
# return info

# populate the info section for this group item
def update_item_info(self, info, layer_info):
def update_item_info(self, info, layer_info, product_type):
self.logger.info(f'info: {info}')

# update info content
Expand All @@ -497,6 +502,7 @@ def update_item_info(self, info, layer_info):
info[7]["content"] = layer_info["location"]
# storm name
info[9]["content"] = layer_info["stormname"]
info[10]["product_type"] = product_type

return info

Expand Down Expand Up @@ -656,7 +662,7 @@ def add_wms_item(self,
style = self.get_wms_style(layers)

wms_item = self.create_wms_data_item(item_id, show, name, style, layers, url, legend_url)
info = self.update_item_info(wms_item["info"], wms_info)
info = self.update_item_info(wms_item["info"], wms_info, product_type)
wms_item["info"] = info

# now add this member item to the catalog group
Expand Down Expand Up @@ -708,7 +714,7 @@ def add_wfs_item(self,
self.create_cat_group(date_str)

wfs_item = self.create_wfs_data_item(item_id, show, name, typeNames, url, legend_url)
info = self.update_item_info(wfs_item["info"], wfs_info)
info = self.update_item_info(wfs_item["info"], wfs_info, product_type)
wfs_item["info"] = info

# now add this member item to the catalog group
Expand Down

0 comments on commit c705c13

Please sign in to comment.