Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 63 additions & 36 deletions admin/views/hydraulicsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
HydraulicsDataAdmin view for legacy NMA_HydraulicsData.
"""

from starlette.requests import Request

from admin.views.base import OcotilloModelView


Expand All @@ -27,44 +29,69 @@ class HydraulicsDataAdmin(OcotilloModelView):

# ========== Basic Configuration ==========

name = "Hydraulics Data"
label = "Hydraulics Data"
name = "NMA Hydraulics Data"
label = "NMA Hydraulics Data"
icon = "fa fa-tint"

can_create = False
can_edit = False
can_delete = False
def can_create(self, request: Request) -> bool:
return False

def can_edit(self, request: Request) -> bool:
return False

def can_delete(self, request: Request) -> bool:
return False

# ========== List View ==========

list_fields = [
"global_id",
"well_id",
"point_id",
"data_source",
"thing_id",
"hydraulic_unit",
"hydraulic_unit_type",
"test_top",
"test_bottom",
"object_id",
"cs_gal_d_ft",
"hd_ft2_d",
"hl_day_1",
"kh_ft_d",
"kv_ft_d",
"p_decimal_fraction",
"s_dimensionless",
"ss_ft_1",
"sy_decimalfractn",
"t_ft2_d",
"k_darcy",
"data_source",
"object_id",
"test_bottom",
"test_top",
"hydraulic_unit",
"hydraulic_unit_type",
"hydraulic_remarks",
]

sortable_fields = [
"global_id",
"well_id",
"point_id",
"data_source",
"thing_id",
"hydraulic_unit",
"hydraulic_unit_type",
"test_top",
"test_bottom",
"object_id",
"cs_gal_d_ft",
"hd_ft2_d",
"hl_day_1",
"kh_ft_d",
"kv_ft_d",
"p_decimal_fraction",
"s_dimensionless",
"ss_ft_1",
"sy_decimalfractn",
"t_ft2_d",
"k_darcy",
"data_source",
"object_id",
"test_bottom",
"test_top",
"hydraulic_unit",
"hydraulic_unit_type",
"hydraulic_remarks",
]

searchable_fields = [
Expand All @@ -84,41 +111,41 @@ class HydraulicsDataAdmin(OcotilloModelView):
"global_id",
"well_id",
"point_id",
"data_source",
"thing_id",
"hydraulic_unit",
"hydraulic_unit_type",
"hydraulic_remarks",
"test_top",
"test_bottom",
"t_ft2_d",
"s_dimensionless",
"ss_ft_1",
"sy_decimalfractn",
"object_id",
"cs_gal_d_ft",
"hd_ft2_d",
"hl_day_1",
"kh_ft_d",
"kv_ft_d",
"hl_day_1",
"hd_ft2_d",
"cs_gal_d_ft",
"p_decimal_fraction",
"s_dimensionless",
"ss_ft_1",
"sy_decimalfractn",
"t_ft2_d",
"k_darcy",
"data_source",
"object_id",
"test_bottom",
"test_top",
"hydraulic_unit",
"hydraulic_unit_type",
"hydraulic_remarks",
]

field_labels = {
"global_id": "GlobalID",
"well_id": "WellID",
"point_id": "PointID",
"thing_id": "Thing ID",
"hydraulic_unit": "HydraulicUnit",
"hydraulic_unit_type": "HydraulicUnitType",
"hydraulic_unit": "Hydraulic Unit",
"hydraulic_unit_type": "HydraulicUnit Type",
"hydraulic_remarks": "Hydraulic Remarks",
"test_top": "TestTop",
"test_bottom": "TestBottom",
"test_top": "Test Top",
"test_bottom": "Test Bottom",
"t_ft2_d": "T (ft2/d)",
"s_dimensionless": "S (dimensionless)",
"ss_ft_1": "Ss (ft-1)",
"sy_decimalfractn": "Sy (decimalfractn)",
"sy_decimalfractn": "Sy (decimal fraction)",
"kh_ft_d": "KH (ft/d)",
"kv_ft_d": "KV (ft/d)",
"hl_day_1": "HL (day-1)",
Expand Down
Loading