Skip to content

Commit

Permalink
updates for tethys-4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeymac committed Aug 16, 2024
1 parent d28c787 commit 229bac4
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 44 deletions.
11 changes: 0 additions & 11 deletions .gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions install.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tethysapp/map_layout_tutorial/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tethys_sdk.base import TethysAppBase


class MapLayoutTutorial(TethysAppBase):
class App(TethysAppBase):
"""
Tethys app class for Map Layout Tutorial.
"""
Expand Down
12 changes: 6 additions & 6 deletions tethysapp/map_layout_tutorial/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import pandas as pd
from tethys_sdk.layouts import MapLayout
from tethys_sdk.routing import controller
from .app import MapLayoutTutorial as app
from .app import App


MODEL_OUTPUT_FOLDER_NAME = 'sample_nextgen_data'

@controller(name="home", app_workspace=True)
class MapLayoutTutorialMap(MapLayout):
app = app
base_template = 'map_layout_tutorial/base.html'
app = App
base_template = f'{App.package}/base.html'
map_title = 'Map Layout Tutorial'
map_subtitle = 'NOAA-OWP NextGen Model Outputs'
default_map_extent = [-87.83371926334216, 33.73443611122197, -86.20833410475134, 34.456557011634175]
Expand Down Expand Up @@ -71,7 +71,7 @@ def compose_layers(self, request, map_view, app_workspace, *args, **kwargs):
]

return layer_groups

@classmethod
def get_vector_style_map(cls):
return {
Expand Down Expand Up @@ -99,7 +99,7 @@ def get_vector_style_map(cls):
}

def get_plot_for_layer_feature(self, request, layer_name, feature_id, layer_data, feature_props, app_workspace,
*args, **kwargs):
*args, **kwargs):
"""
Retrieves plot data for given feature on given layer.
Expand Down Expand Up @@ -178,4 +178,4 @@ def get_plot_for_layer_feature(self, request, layer_name, feature_id, layer_data
},
]

return f'Evapotranspiration at Catchment "{id}"', data, layout
return f'Evapotranspiration at Catchment "{id}"', data, layout
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "tethys_apps/app_base.html" %}

{% load static %}
{% load static tethys %}

{% block title %}{{ tethys_app.name }}{% endblock %}

Expand Down Expand Up @@ -33,10 +33,10 @@

{% block content_dependent_styles %}
{{ block.super }}
<link href="{% static 'map_layout_tutorial/css/main.css' %}" rel="stylesheet"/>
<link href="{% static tethys_app|public:'css/main.css' %}" rel="stylesheet"/>
{% endblock %}

{% block scripts %}
{{ block.super }}
<script src="{% static 'map_layout_tutorial/js/main.js' %}" type="text/javascript"></script>
<script src="{% static tethys_app|public:'js/main.js' %}" type="text/javascript"></script>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "map_layout_tutorial/base.html" %}
{% load tethys_gizmos %}
{% extends tethys_app.package|add:"/base.html" %}
{% load tethys %}

{% block header_buttons %}
<div class="header-button glyphicon-button" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Help">
Expand Down
Empty file.

0 comments on commit 229bac4

Please sign in to comment.