diff --git a/web_app/app.py b/web_app/app.py index 9d63d74..080443f 100644 --- a/web_app/app.py +++ b/web_app/app.py @@ -48,7 +48,7 @@ import settings -site_ver = "2.8.0" +site_ver = "2.8.1" site_env = settings.env site_net = settings.site_net @@ -307,9 +307,10 @@ def favicon(): @cache.memoize() +@app.route('/team//', methods=['GET', 'POST'], provide_automatic_options=False) @app.route('/team/', methods=['GET', 'POST'], provide_automatic_options=False) @app.route('/', methods=['GET', 'POST'], provide_automatic_options=False) -def homepage(team=None): +def homepage(team=None, subset=None): """Main homepage for the system""" # If API, not allowed - to improve if site_net == "api": @@ -423,6 +424,8 @@ def homepage(team=None): " (SELECT project_id FROM projects WHERE skip_project IS NOT True AND project_section = 'IS')"))[0]['total']) } + + elif team == "inf": team_heading = "Summary of Informatics Team Projects" html_title = "Summary of the Informatics Team Projects, Collections Digitization" @@ -478,6 +481,14 @@ def homepage(team=None): list_projects_is = pd.DataFrame(run_query(section_query, {'section': 'IS'})) list_projects_is = list_projects_is.drop("images_public", axis=1) + + # Filter + if subset is None: + subset = "" + else: + if subset.lower() == "sawhm": + list_projects_is = list_projects_is[list_projects_is.project_manager == 'Laura M. Whitfield'] + list_projects_is = list_projects_is.rename(columns={ "project_unit": "Unit", "project_title": "Title", @@ -488,6 +499,7 @@ def homepage(team=None): "images_taken": "Images Captured" }) + # Informatics Table inf_section_query = (" SELECT " " CONCAT('', p.project_unit, '') as project_unit, " @@ -556,7 +568,8 @@ def homepage(team=None): last_update=last_update[0]['updated_at'], kiosk=kiosk, user_address=user_address, team_heading=team_heading, html_title=html_title, analytics_code=settings.analytics_code, - app_root=settings.app_root) + app_root=settings.app_root, + subset=subset.upper()) @app.route('/team/', methods=['POST', 'GET'], provide_automatic_options=False) @@ -691,6 +704,8 @@ def dashboard_f(project_alias=None, folder_id=None, tab=None, page=None): project_manager_link = "Nathan Ian Anderson" elif project_info['project_manager'] == "Erin M. Mazzei": project_manager_link = "Erin M. Mazzei" + elif project_info['project_manager'] == "Laura M. Whitfield": + project_manager_link = "Laura M. Whitfield" projects_links = run_query("SELECT * FROM projects_links WHERE project_id = %(project_id)s ORDER BY table_id", {'project_id': project_info['project_id']}) @@ -1103,7 +1118,8 @@ def dashboard_f(project_alias=None, folder_id=None, tab=None, page=None): analytics_code=settings.analytics_code, project_stats_other=project_stats_other, files_table_sort=files_table_sort, - folder_badges=folder_badges + folder_badges=folder_badges, + no_cols=no_cols ) @@ -1313,7 +1329,7 @@ def dashboard(project_alias=None, folder_id=None): site_env=site_env, site_net=site_net, site_ver=site_ver, kiosk=kiosk, user_address=user_address, project_disk=project_disk, projects_links=projects_links, project_manager_link=project_manager_link, - analytics_code=settings.analytics_code, project_stats_other=project_stats_other) + analytics_code=settings.analytics_code, project_stats_other=project_stats_other, no_cols=None) @cache.memoize() @@ -2249,6 +2265,8 @@ def create_new_project(): " (%(project_id)s, 'project_checks', %(value)s)") fcheck_insert = query_database_insert(fcheck_query, {'project_id': project_id, 'value': 'unique_file'}) fcheck_insert = query_database_insert(fcheck_query, {'project_id': project_id, 'value': 'tifpages'}) + fcheck_insert = query_database_insert(fcheck_query, {'project_id': project_id, 'value': 'md5'}) + fcheck_insert = query_database_insert(fcheck_query, {'project_id': project_id, 'value': 'md5_raw'}) file_check = request.values.get('raw_pair') if file_check == "1": fcheck_insert = query_database_insert(fcheck_query, {'project_id': project_id, 'value': 'raw_pair'}) diff --git a/web_app/static/items/Brown_James18.jpg b/web_app/static/items/Brown_James18.jpg new file mode 100644 index 0000000..a3a1fb3 Binary files /dev/null and b/web_app/static/items/Brown_James18.jpg differ diff --git a/web_app/static/items/Hank_Aaron.jpg b/web_app/static/items/Hank_Aaron.jpg new file mode 100644 index 0000000..db51ba7 Binary files /dev/null and b/web_app/static/items/Hank_Aaron.jpg differ diff --git a/web_app/static/items/botany_accession_sample.jpg b/web_app/static/items/botany_accession_sample.jpg new file mode 100644 index 0000000..7f43f33 Binary files /dev/null and b/web_app/static/items/botany_accession_sample.jpg differ diff --git a/web_app/static/items/sawhm_1.jpg b/web_app/static/items/sawhm_1.jpg new file mode 100644 index 0000000..d5ef6ee Binary files /dev/null and b/web_app/static/items/sawhm_1.jpg differ diff --git a/web_app/static/items/unionoida.jpg b/web_app/static/items/unionoida.jpg new file mode 100644 index 0000000..692b8ce Binary files /dev/null and b/web_app/static/items/unionoida.jpg differ diff --git a/web_app/templates/about.html b/web_app/templates/about.html index f9180e7..4b42dd9 100644 --- a/web_app/templates/about.html +++ b/web_app/templates/about.html @@ -30,8 +30,6 @@ {% if site_net == "internal" %} -

Image viewer uses Openseadragon 5.0.0.

-

This is a project of the: Digitization Program Office, a division of the Smithsonian's Office of Digital Transformation (formerly a division of the Office of the Chief Information Officer).

{% else %} diff --git a/web_app/templates/dashboard.html b/web_app/templates/dashboard.html index 47e5794..1874ec8 100644 --- a/web_app/templates/dashboard.html +++ b/web_app/templates/dashboard.html @@ -441,96 +441,20 @@

Image Preview (JPG)

[25, 50, 100, 'All'], ], 'rowCallback': function(row, data, index){ - if(data[1] == 'OK'){ - $(row).find('td:eq(1)').css('background', '#198754'); - $(row).find('td:eq(1)').css('color', 'white'); - } else if(data[1] == 'Failed'){ - $(row).find('td:eq(1)').css('background', '#dc3545'); - $(row).find('td:eq(1)').css('color', 'white'); - } else if(data[1] == 'Pending'){ - $(row).find('td:eq(1)').css('background', '#e2e3e5'); - $(row).find('td:eq(1)').css('color', 'black'); - }; - if(data[3] == 'OK'){ - $(row).find('td:eq(3)').css('background', '#198754'); - $(row).find('td:eq(3)').css('color', 'white'); - } else if(data[3] == 'Failed'){ - $(row).find('td:eq(3)').css('background', '#dc3545'); - $(row).find('td:eq(3)').css('color', 'white'); - } else if(data[3] == 'Pending'){ - $(row).find('td:eq(3)').css('background', '#e2e3e5'); - $(row).find('td:eq(3)').css('color', 'black'); - }; - if(data[2] == 'OK'){ - $(row).find('td:eq(2)').css('background', '#198754'); - $(row).find('td:eq(2)').css('color', 'white'); - } else if(data[2] == 'Failed'){ - $(row).find('td:eq(2)').css('background', '#dc3545'); - $(row).find('td:eq(2)').css('color', 'white'); - } else if(data[2] == 'Pending'){ - $(row).find('td:eq(2)').css('background', '#e2e3e5'); - $(row).find('td:eq(2)').css('color', 'black'); - }; - if(data[4] == 'OK'){ - $(row).find('td:eq(4)').css('background', '#198754'); - $(row).find('td:eq(4)').css('color', 'white'); - } else if(data[4] == 'Failed'){ - $(row).find('td:eq(4)').css('background', '#dc3545'); - $(row).find('td:eq(4)').css('color', 'white'); - } else if(data[4] == 'Pending'){ - $(row).find('td:eq(4)').css('background', '#e2e3e5'); - $(row).find('td:eq(4)').css('color', 'black'); - }; - if(data[5] == 'OK'){ - $(row).find('td:eq(5)').css('background', '#198754'); - $(row).find('td:eq(5)').css('color', 'white'); - } else if(data[5] == 'Failed'){ - $(row).find('td:eq(5)').css('background', '#dc3545'); - $(row).find('td:eq(5)').css('color', 'white'); - } else if(data[5] == 'Pending'){ - $(row).find('td:eq(5)').css('background', '#e2e3e5'); - $(row).find('td:eq(5)').css('color', 'black'); - }; - if(data[6] == 'OK'){ - $(row).find('td:eq(6)').css('background', '#198754'); - $(row).find('td:eq(6)').css('color', 'white'); - } else if(data[6] == 'Failed'){ - $(row).find('td:eq(6)').css('background', '#dc3545'); - $(row).find('td:eq(6)').css('color', 'white'); - } else if(data[6] == 'Pending'){ - $(row).find('td:eq(6)').css('background', '#e2e3e5'); - $(row).find('td:eq(6)').css('color', 'black'); - }; - if(data[7] == 'OK'){ - $(row).find('td:eq(7)').css('background', '#198754'); - $(row).find('td:eq(7)').css('color', 'white'); - } else if(data[7] == 'Failed'){ - $(row).find('td:eq(7)').css('background', '#dc3545'); - $(row).find('td:eq(7)').css('color', 'white'); - } else if(data[7] == 'Pending'){ - $(row).find('td:eq(7)').css('background', '#e2e3e5'); - $(row).find('td:eq(7)').css('color', 'black'); - }; - if(data[8] == 'OK'){ - $(row).find('td:eq(8)').css('background', '#198754'); - $(row).find('td:eq(8)').css('color', 'white'); - } else if(data[8] == 'Failed'){ - $(row).find('td:eq(8)').css('background', '#dc3545'); - $(row).find('td:eq(8)').css('color', 'white'); - } else if(data[8] == 'Pending'){ - $(row).find('td:eq(8)').css('background', '#e2e3e5'); - $(row).find('td:eq(8)').css('color', 'black'); - }; - if(data[9] == 'OK'){ - $(row).find('td:eq(9)').css('background', '#198754'); - $(row).find('td:eq(9)').css('color', 'white'); - } else if(data[9] == 'Failed'){ - $(row).find('td:eq(9)').css('background', '#dc3545'); - $(row).find('td:eq(9)').css('color', 'white'); - } else if(data[9] == 'Pending'){ - $(row).find('td:eq(9)').css('background', '#e2e3e5'); - $(row).find('td:eq(9)').css('color', 'black'); - }; + + {% for i in range(1, no_cols) %} + if(data[{{ i }}] == 'OK'){ + $(row).find('td:eq({{ i }})').css('background', '#198754'); + $(row).find('td:eq({{ i }})').css('color', 'white'); + } else if(data[{{ i }}] == 'Failed'){ + $(row).find('td:eq({{ i }})').css('background', '#dc3545'); + $(row).find('td:eq({{ i }})').css('color', 'white'); + } else if(data[{{ i }}] == 'Pending'){ + $(row).find('td:eq({{ i }})').css('background', '#e2e3e5'); + $(row).find('td:eq({{ i }})').css('color', 'black'); + }; + {% endfor %} + }, }); diff --git a/web_app/templates/file.html b/web_app/templates/file.html index 74c2c23..1f39ced 100644 --- a/web_app/templates/file.html +++ b/web_app/templates/file.html @@ -390,7 +390,8 @@

Postprocessing Details

preload: true, constrainDuringPan: true, showRotationControl: true, - showNavigator: true + showNavigator: true, + maxZoomPixelRatio: 1 }); diff --git a/web_app/templates/home.html b/web_app/templates/home.html index 490b0a3..b957d8b 100644 --- a/web_app/templates/home.html +++ b/web_app/templates/home.html @@ -153,17 +153,16 @@
-

A Photoshoot with 26,000 Mussel Lots

+

Digitizing the American Women's History Museum

- Digitized specimen of freshwater mussel shells and scalebar + Logo of the SAWHM
-

We digitized over 26,000 lots, with up to three individuals per lot, - adding almost 140,000 images of freshwater mussels - otherwise known as the Mollusca order Unionoida.

- Unionoida Project Dashboard +

The Imaging Services team is digitizing collections and archives for the Smithsonian American Women's History Museum.

+ SAWHM Projects
@@ -183,25 +182,26 @@ Digitized mounted specimen from the National Herbarium Collection
-

The new Imaging Services Team continues to digitize the Herbarium of the National Museum of Natural History. The project digitizes new accessions to the collection.

+

We continue to digitize the Herbarium of the National Museum of Natural History. The project digitizes new accessions to the collection.

Botany Project Dashboard
- -
+ +
-

 

+

A Photoshoot with 26,000 Mussel Lots

-   + Digitized specimen of freshwater mussel shells and scalebar
-

 

- +

We digitized over 26,000 lots, with up to three individuals per lot, + adding almost 140,000 images of freshwater mussels - otherwise known as the Mollusca order Unionoida.

+ Unionoida Project Dashboard
@@ -222,7 +222,7 @@ {% elif team == "is" %}

Imaging Services acts as a focal point in the Smithsonian Institution for photographic support. Addressing a crucial need within the Smithsonian Institution by providing digital imaging support for annually accessioned objects (referred to as "keep-up" digitization) and for small-scale collections, particularly in smaller museums and departments lacking staff photographers. These projects may be executed by the unit under the supervision and training of Imaging Services, or directly undertaken by Imaging Services' in-house imaging staff, without the involvement of external vendors.

- +
{% for table in tables_is %} @@ -365,7 +365,12 @@

Log In to the System

$('#list_projects_md').append('

Mass Digitization Projects

'); - $('#list_projects_is').append('

Imaging Services Projects

'); + {% if subset is not none %} + $('#list_projects_is').append('

Imaging Services Projects (SAWHM projects only)

'); + {% else %} + $('#list_projects_is').append('

Imaging Services Projects

'); + {% endif %} + $('#list_projects_inf').append('

Informatics Projects (under construction)

');