Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
827a086
upload coverage score as JSON artifact
rhodges Jan 29, 2024
23ff77d
update github actions to v4 to support Node 16 deprecation
rhodges Jan 29, 2024
c7bccb0
attempting to get around node.js 16 deprecation
rhodges Jan 29, 2024
e3450ba
update setup-python action to use modern Node.js
rhodges Jan 29, 2024
66742b2
correct spelling of 'coverage' for testing requirements
rhodges Jan 29, 2024
8b52712
test artifacts get named with python version to prevent dupes
rhodges Jan 29, 2024
be4e503
adding testing badge to project
rhodges Feb 1, 2024
35ff7ad
adding custom gist-driven dynamic coverage badge
rhodges Feb 1, 2024
46f4e3d
adding todo to change coverage color based on coverage percentage
rhodges Feb 1, 2024
aaaca91
remove layer admin from admin.py
bwithchewoo Feb 12, 2024
4ff5e53
Merge remote-tracking branch 'origin/ci_testing' into Vanilla_layers
bwithchewoo Feb 12, 2024
e0243b8
added vanilla_layers branch
bwithchewoo Feb 12, 2024
c0cb2a5
added inlines to admin.py
bwithchewoo Feb 14, 2024
3b36295
customized admin form for layer and theme and fixed tests to match ne…
bwithchewoo Feb 21, 2024
86b7f97
imported settings to admin
bwithchewoo Feb 21, 2024
20b6e94
Added urls and views
bwithchewoo Feb 28, 2024
2e42c95
nesting logic for themes and css
bwithchewoo Mar 11, 2024
3faf01f
fixed theme selector in theme admin
bwithchewoo Mar 17, 2024
f973d6e
Added a view for the react
bwithchewoo Mar 21, 2024
c859648
change index.html so that we can put react into django template
bwithchewoo Mar 25, 2024
22d01df
django serving react static files
bwithchewoo Mar 29, 2024
3b6d6d3
removed old_uuid
bwithchewoo Apr 2, 2024
37979f9
fixed migration script
bwithchewoo Apr 9, 2024
e07ddbc
fixed admin
bwithchewoo Apr 10, 2024
8cdcffe
changed view for theme to objects not all_objects
bwithchewoo Apr 10, 2024
e7d785c
no hashing
bwithchewoo Apr 11, 2024
3d964f2
adding react
bwithchewoo Apr 11, 2024
df89540
updated build
bwithchewoo Apr 11, 2024
23d3794
updated get_layer_details to handle subthemes
bwithchewoo Apr 17, 2024
dadde60
changed logic for Theme and Layer component to point to Knockout
bwithchewoo Apr 19, 2024
00282d8
adding LIVE API tests
rhodges Apr 30, 2024
206d162
fixing API test to be more lenient, migration script to correctly ide…
rhodges May 1, 2024
74629a7
fixing data catalog link creation logic
rhodges May 2, 2024
e9864db
finishing theme-level API v1 testing, beginning layer-level
rhodges May 2, 2024
9193322
models: initial opacity for all layers, sliders are now Layers
rhodges May 3, 2024
178aeb9
major strides toward comprehensive API testing
rhodges May 8, 2024
1140e9b
test has_companion w/ no companion, ignore opacity override for themes
rhodges May 8, 2024
b896cea
Full API old vs new test minus sliders
rhodges May 10, 2024
9d2c91a
setting default layer/theme order values
rhodges May 20, 2024
ad6ea55
updating Layer model and admin so that 'arcFeatureServer' layers' fie…
rhodges May 20, 2024
3c55070
make Themes list searchable
rhodges May 23, 2024
a7dbd83
fixing API requests for parent themes to respect sites and orders
rhodges May 23, 2024
dfcc610
ACTUALLY updating Layer model and admin so that 'arcFeatureServer' la…
rhodges May 24, 2024
b231387
moving lookups fields to vector-specific layer models; moving 'specif…
rhodges May 24, 2024
5d23b80
add Lookup Infos to admin; remove 'stroke opacity' field from Vector …
rhodges May 24, 2024
e67affa
small change to finish XYZ fields
rhodges May 24, 2024
5f59f02
Basic WMS layer form input
rhodges May 24, 2024
967f9cb
basic WMS help working on 'change_form'
rhodges May 24, 2024
76a2b39
connect react with url changes
bwithchewoo May 28, 2024
e335b07
fix duplicating 'specific' layers; fix zombie ChildOrders; fix WMS he…
rhodges Jun 4, 2024
ad4bb80
changed how react gets data from knockout
bwithchewoo Jun 5, 2024
7b95714
Merge remote-tracking branch 'origin/reactui' into dj_admin_work
rhodges Jun 5, 2024
003f488
added Loading when children themes is being populated async
bwithchewoo Jun 12, 2024
0653ab8
updated children api to include minzoom and maxzoom and make react ha…
bwithchewoo Jun 12, 2024
f019920
layer active status not tied to dls visibility in url
bwithchewoo Jun 13, 2024
03a5df7
changed api for top_level_themes so that order is maintained, exclude…
bwithchewoo Jun 24, 2024
54fd2f1
Fixed styling to prevent overflow-x and weird behavior of displayed l…
bwithchewoo Jun 26, 2024
626822d
changed migration handling of dimension value creation to bypass cust…
bwithchewoo Jul 11, 2024
40d1da8
cleaned up console.logs
bwithchewoo Jul 17, 2024
521becc
handled logic for theme layer relationship switching to top down
bwithchewoo Jul 22, 2024
a46313f
changed admin logic for defining relationship between layer and theme…
bwithchewoo Jul 30, 2024
239bafa
changed the background color of the indentation to properly show hier…
bwithchewoo Jul 30, 2024
f62bb07
support migrating incomplete slider settings
Jul 30, 2024
4cba7be
Merge branch 'reactui' of https://github.com/Ecotrust/mp-layers into …
Jul 30, 2024
78780e8
changed axios url to not include localhost explicitly
bwithchewoo Jul 30, 2024
7e854f7
Test url field for dynamic themes (formerly MDAT/C@S layers)
rhodges Aug 5, 2024
06bec9f
loop through slider multilayers when testing migration
rhodges Aug 5, 2024
efea005
remove crufty debugging messages
rhodges Aug 5, 2024
216d41f
be sure to create child_order records for ALL sites
rhodges Aug 6, 2024
2607800
filter out children that don't belong to current site when 'get_layer…
rhodges Aug 6, 2024
e1b3702
removed theme from Layer form, list of themes includes all non-ancest…
bwithchewoo Aug 21, 2024
0156954
relative os-agnostic paths to Theme/Layer change_form templates
rhodges Aug 22, 2024
e1d9f7b
prime themes defined by never being cotent in ChildOrder
rhodges Aug 22, 2024
d365cc7
top_level_themes defined by never being cotent in ChildOrder
rhodges Aug 22, 2024
828e705
added logic for dynamic layer handling in react
bwithchewoo Aug 26, 2024
f6c5194
fixed handshake between react and knockout for dynamic layers
bwithchewoo Sep 6, 2024
73aa6ac
Merge branch 'reactui' of https://github.com/Ecotrust/mp-layers into …
bwithchewoo Sep 6, 2024
0efc386
don't make placeholder text and default keyword required
bwithchewoo Sep 6, 2024
0f5b455
sort children with themes before layers and hide 'placeholders'
rhodges Sep 13, 2024
82ad02f
show display name in Viz for layers
rhodges Sep 13, 2024
1465448
commented out RDH network config in views.py
rhodges Sep 13, 2024
b5b8aa6
fixed a bug where deleting a layer from active tab does not reflect i…
bwithchewoo Sep 19, 2024
e2b8179
changed how id is set by react to make it easier to parse for mdat an…
bwithchewoo Sep 22, 2024
ff3a474
early work to support data catalog
rhodges Sep 25, 2024
b11bb8c
changing order for themes, if its a subtheme edits the child order re…
bwithchewoo Sep 25, 2024
47cbd15
Merge remote-tracking branch 'origin/reactui' into layer-catalog
rhodges Sep 25, 2024
87a254f
fix bug preventing some layers from showing links in data catalog
rhodges Sep 27, 2024
75120dd
changed default keyword handling and added linkbar to theme
bwithchewoo Sep 30, 2024
e66da4f
Merge pull request #2 from Ecotrust/layer-catalog
bwithchewoo Sep 30, 2024
cf604ea
Added Read More with link to data_url
bwithchewoo Oct 1, 2024
7d666c4
fix data catalog links for deeply embedded themes/layers
rhodges Oct 1, 2024
b99e9fd
removed background color of the indentation and show info button for …
bwithchewoo Oct 29, 2024
72e7a36
made all styling the same for icons and move info circle for themes t…
bwithchewoo Oct 30, 2024
8ed96af
added hierarchy lines
bwithchewoo Oct 31, 2024
b796df9
made main content full width of container
bwithchewoo Oct 31, 2024
6c1ce84
needed to npm run build to include last commit
bwithchewoo Oct 31, 2024
8f9833c
fixed styling for linkbar
bwithchewoo Oct 31, 2024
ff91a5c
fixed more styling issues with linkbar, show hierarchy line past link…
bwithchewoo Oct 31, 2024
90cbf2a
added bulk import and export for layer and theme
bwithchewoo Nov 14, 2024
6f98755
fixing issues preventing creating slider layers
rhodges Nov 23, 2024
ac518e1
changed get_layers_for_theme for backwards compatibility
bwithchewoo Dec 10, 2024
0c834bf
Merge branch 'reactui' of https://github.com/Ecotrust/mp-layers into …
bwithchewoo Dec 10, 2024
4880d9e
added layerName to get_layers_for_theme so that in visualize it can f…
bwithchewoo Dec 19, 2024
28f9f71
add missing fields from get_layers_for_theme (V1)
rhodges Dec 20, 2024
5d8bd55
removing objects from wrong site for get_layers_for_theme
rhodges Dec 20, 2024
a51a573
bug fix for shallow 'is_sublayer'
rhodges Dec 20, 2024
288cdb3
changed layer ordering to order, alphabetical then type and changed f…
bwithchewoo Dec 23, 2024
95bb24f
Merge remote-tracking branch 'origin/reactui' into mida
rhodges Dec 23, 2024
14ff66c
fixed indentation for layer to match theme
bwithchewoo Dec 24, 2024
8480078
Merge remote-tracking branch 'origin/reactui' into mida
rhodges Dec 25, 2024
386abda
HACK: use old get_json from old tables to support OceanStories until …
rhodges Jan 13, 2025
e052c18
fix issue where (child) Theme order is getting overwritten when assoc…
rhodges Jan 14, 2025
bcbf346
enabling new combined childOrder admin form with DAL
rhodges Jan 16, 2025
edcc7bc
collapsing Theme admin forms, fixing labels, removing cruft
rhodges Jan 18, 2025
a5c7af8
handle id collisions from sequencer gracefully
rhodges Jan 18, 2025
91e18bb
restoring old 'child theme organization' widget due to bad bugs
rhodges Jan 23, 2025
b5882ca
Layer/Theme names indicate IDs, too
rhodges Jan 23, 2025
710c764
remove error preventing child layers from saving on Themes -- cannot …
rhodges Jan 24, 2025
0b3c9d7
switch back to form children inline -- broken: deletes prior inline e…
rhodges Jan 24, 2025
bb1abe8
removing old logic for Theme children on save - fixes bugs with child…
rhodges Jan 24, 2025
523e604
allowing Theme children inlines to show all options regardless of Sit…
rhodges Jan 24, 2025
6b1bab6
allow new layers to get correct 'Read More' link in picker description
rhodges Jan 28, 2025
046cdbd
fix slug name for layers in data catalog
rhodges Jan 28, 2025
42ad9b1
add 'parent' inline form for Layer and Theme admins
rhodges Jan 29, 2025
bf6014c
removing one dependency on a data_manager template
rhodges Jan 29, 2025
27b5aa7
last commit missed this crucial file: LayerFieldset.html
rhodges Jan 29, 2025
1ba6178
remove XYZ inline from LayerAdmin -- it doesn't do anything for now
rhodges Jan 29, 2025
c9b3330
prevent Themes from assigning themselves as parents
rhodges Jan 30, 2025
4ef1c13
support add new theme with parent form
rhodges Jan 30, 2025
29476be
minor code cleanp
rhodges Jan 31, 2025
54d8d62
adding 'is_top_theme' boolean field to Theme model
rhodges Jan 31, 2025
4335053
switch to using Theme 'is_top_theme' for display logic
rhodges Jan 31, 2025
825bfb6
Merge pull request #4 from Ecotrust/top_themes
rhodges Jan 31, 2025
c00b09b
remove crufty Theme order override logic
rhodges Jan 31, 2025
c02f09a
missed migration for small changes to Theme field verbose names and h…
rhodges Jan 31, 2025
f06d049
updating Theme form field order, help, and context to better fit upda…
rhodges Jan 31, 2025
61505a7
update top_level_themes API to match needs of old DM 'get_themes' API
rhodges Jan 31, 2025
c1b76cc
replacing erroneous references to 'Theme.children'
rhodges Feb 5, 2025
32f2ae4
fileter children for current site
rhodges Feb 7, 2025
2a555ca
commented out solution for updated get_json, if needed
rhodges Feb 7, 2025
45f42e0
add indexes to Themes, Layers, and ChildOrders
rhodges Feb 7, 2025
3f75bc3
caching implemented for /children/{parent_pk} API calls
rhodges Feb 8, 2025
afd142e
get_layer_details caching
rhodges Feb 8, 2025
3c04ac7
Theme.layer_count returns number, .badge_text option, too
rhodges Feb 11, 2025
4f1074a
get meaningful layer count for dynamic layers
rhodges Feb 11, 2025
c89ab00
fixing shortDict to correctly interpret subtheme's children
rhodges Feb 11, 2025
f35f277
numerous fixes and caching related to Theme.shortDict and Layer.short…
rhodges Feb 11, 2025
c7da9ff
admin Theme form existing children get a less-expensive inline
rhodges Feb 12, 2025
971b0ac
showing 'content_type' in 'Current Children' inline form for Themes i…
rhodges Feb 12, 2025
b1dc398
adding 'date_modified' to Admin list of themes
rhodges Feb 12, 2025
13e2243
rearranging layers admin list columns
rhodges Feb 12, 2025
2cf79e1
allow Layers admin list view to show all parent themes for each layer
rhodges Feb 12, 2025
4c2b400
consider all themes for Layer.parents, regardless of site
rhodges Feb 19, 2025
4185d93
fix broken code in models.Layer.shortDict
rhodges Feb 19, 2025
21908d1
adding slug_name property to Layers
rhodges Feb 19, 2025
0d90766
layer.themes includes all parents, not just those on the primary site
rhodges Feb 19, 2025
fe79af2
Layer has slug_name field, does NOT need slug_name property
rhodges Feb 19, 2025
61b0073
Ignore Mac files
pollardld Feb 19, 2025
4d442ed
organized import/export Layer fields, also export support for ChildOr…
rhodges Mar 4, 2025
67041a5
can import layers and create/update necessary ChildOrders on the fly
rhodges Mar 4, 2025
25b9142
prevent errors when requesting a layer's 'specific instance' when it …
rhodges Mar 5, 2025
f228e6f
export specific layer fields for ArcRest layer_type
rhodges Mar 5, 2025
d09fe53
can import ArcREST layers with specific data, bugs in parsing floats,…
rhodges Mar 5, 2025
7b6efc3
fixing broken order data exporting
rhodges Mar 5, 2025
2eae210
Merge pull request #5 from Ecotrust/import_export
rhodges Mar 5, 2025
02666cb
fix layer id formatting for import
rhodges Mar 5, 2025
b9dda68
using comma separator for parent_themes to match other fields
rhodges Mar 5, 2025
7e4af55
use new DB notify ability in madrona to clear cache for all applicati…
rhodges Mar 12, 2025
2c3b98e
set theme slug_name on save if null
rhodges Mar 20, 2025
753fd41
theme cleans own shortdict cache on save, not just related
rhodges Mar 20, 2025
5f8260c
get_layers_for_theme API returns layers ordered by order
rhodges Mar 21, 2025
0ee53f0
fixing importing new layers and ArcFeatureService layers
rhodges Mar 26, 2025
1220556
support import/export of WMS-specific layer fields
rhodges Mar 26, 2025
c05ec61
checkbox/radio icons work for top-level themes
rhodges Mar 26, 2025
14574f6
layer UI icon defaults to checkbox, not radio
rhodges Mar 26, 2025
cc79c68
cleaning up layer toggle logic
rhodges Mar 28, 2025
758afbd
Merge branch 'mida' of https://github.com/Ecotrust/mp-layers into mida
pollardld Mar 28, 2025
da2fbe2
Add layer status checker
pollardld Mar 28, 2025
2459ddf
Merge pull request #6 from Ecotrust/main
pollardld Mar 28, 2025
f77ed39
Merge branch 'main' into mida
pollardld Mar 28, 2025
144fbbc
Merge branch 'mida' of https://github.com/Ecotrust/mp-layers into mida
pollardld Mar 28, 2025
530cc97
Merge branch 'mida' into layerstatuschecker
pollardld Mar 28, 2025
e8d5b6a
Refactor get_catalog_records function to use mp layers instead of dat…
pollardld Apr 2, 2025
8fde495
Add GeoPortal.js to mp-layers
pollardld Apr 2, 2025
34b56a3
Add GeoPortal.js to mp-layers Layers change-form
pollardld Apr 2, 2025
13cebfc
Layer type opens associate fields within Django admin when each type …
pollardld Apr 2, 2025
dbd0659
Add test data for catalog records
pollardld Apr 2, 2025
781809a
Remove duplicate commented code
pollardld Apr 2, 2025
448b15a
Encapsulate admin_layer_form
pollardld Apr 4, 2025
455eada
fixing layer toggle logic, but dynamic themes are broken
rhodges Apr 4, 2025
21c714b
enabling dynamic theme support for folders like services
rhodges Apr 4, 2025
45a940f
Add script to update least recently checked Layer HTTP status
pollardld Apr 5, 2025
935ea57
Document the functions in layer_http_status.js
pollardld Apr 5, 2025
5c6c3fe
selection logic restored for static and dynamic layers
rhodges Apr 5, 2025
bbb09dd
delay react activation event dispatch until visualize is ready
rhodges Apr 7, 2025
a7bdd7a
Merge remote-tracking branch 'origin/activate_logic_update' into merg…
rhodges Apr 8, 2025
5020baf
merging models between mida layers and layerstatuschecker
rhodges Apr 8, 2025
6fb8cae
adding dal and sequencequery to requirements
rhodges Apr 8, 2025
2ceab4f
including both 'specific layers' and 'layer status' static content fo…
rhodges Apr 9, 2025
6c5a96d
Apply suggestions from code review
pollardld Apr 10, 2025
40919f8
Update Django version to 3.10.12 for Github workflow
pollardld Apr 10, 2025
138b26f
Refactor GitHub workflows and settings: remove outdated files and rei…
pollardld Apr 11, 2025
a841be2
Add missing django-import-export requirement
pollardld Apr 11, 2025
e5282fa
Add django-nested-admin to requirements.txt to fixed CI/CD checks
pollardld Apr 11, 2025
5b4c18b
Update .github/workflows/django.yml
pollardld Apr 11, 2025
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
28 changes: 28 additions & 0 deletions .github/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
INSTALLED_APPS = [

# ...

'corsheaders',

# ...

]


MIDDLEWARE = [

# ...

'corsheaders.middleware.CorsMiddleware',

# ...

]

CORS_ALLOWED_ORIGINS = [
"http://localhost:3000", # Add the port your React app runs on
]

CORS_ORIGIN_WHITELIST = [
'http://localhost:3000', # The default port for create-react-app
]
42 changes: 35 additions & 7 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Django CI
name: Tests

on:
push:
branches: [ "main", "ci_testing" ]
branches: [ "main", "ci_testing", "Vanilla_layers" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "Vanilla_layers" ]

jobs:
build:
Expand All @@ -13,12 +13,12 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.10.12]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
Expand All @@ -28,4 +28,32 @@ jobs:
pip install -r requirements.txt
- name: Run Tests
run: |
python ci_testing/mp_layers_testing/manage.py test layers.tests.test_models
coverage run --source='.' ci_testing/mp_layers_testing/manage.py test layers.tests.test_models
- name: Set Coverage
id: set_coverage
run: |
COV=`coverage report --format=total`
echo "coverage=$COV" >> $GITHUB_OUTPUT
# echo "$COV%"
# echo "{'coverage':$COV}" > /tmp/coverage_badge.json
# - name: Archive test coverage results
# uses: actions/upload-artifact@v4
# with:
# name: test-coverage-report_py-${{ matrix.python-version }}
# path: /tmp/coverage_badge.json
- name: Create Coverage Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.COVERAGE_GIST_SECRET }}
gistID: 20cd92a8df1c63f3e6447540e67cddfd
filename: mpl_coverage.json
label: Coverage
message: "${{ steps.set_coverage.outputs.coverage }}%"
color: green
# TODO: Set IF sections to change colors:
# >= 95: 'green'
# >= 90: 'yellow'
# >= 80: 'orange'
# <80: 'red'


3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# mp_layers
Madrona Portal's Layer Manager

[![Test Build](https://github.com/Ecotrust/mp-layers/actions/workflows/django.yml/badge.svg?branch=main)](https://github.com/Ecotrust/mp-layers/actions/workflows/django.yml)
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/rhodges/20cd92a8df1c63f3e6447540e67cddfd/raw/mpl_coverage.json)
1 change: 1 addition & 0 deletions ci_testing/test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
django<4.0
coverage
-e ./
Loading
Loading