diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dcd46132..9bdd0c984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ Each month below should look like the following, using the same ordering for the - Added full Unicode support to IMS. All text fields now accept previously unsupported characters, like those from Cyrillic, Chinese, emoji, and much more ([#1353](https://github.com/burningmantech/ranger-ims-server/issues/1353)) - Started doing client-side retries on any EventSource connection failures. This should mean that an IMS web session will be better kept in sync with incident updates, in particular in the off-season, when IMS is running on AWS ([#1389](https://github.com/burningmantech/ranger-ims-server/pull/1389)) - Added a warning banner to non-production instances of the web UI, to make sure people don't accidentally put prod data into non-production IMS instances. [(#1366](https://github.com/burningmantech/ranger-ims-server/issues/1366)) +- Started showing full datetimes, including time zone, when a user hovers over a time on the incidents page. All times have always been in the user's locale, but this wasn't indicated anywhere ([#1412](https://github.com/burningmantech/ranger-ims-server/pull/1412) + +### Removed + +- Got rid of Moment.js dependency, as it's deprecated and we're able to use the newer Intl JavaScript browser construct instead ([#1412](https://github.com/burningmantech/ranger-ims-server/pull/1412) ### Fixed diff --git a/src/ims/application/_external.py b/src/ims/application/_external.py index 6368fc014..fd59f242c 100644 --- a/src/ims/application/_external.py +++ b/src/ims/application/_external.py @@ -683,13 +683,11 @@ class ExternalApplication: bootstrapVersionNumber = "3.3.7" jqueryVersionNumber = "3.1.0" dataTablesVersionNumber = "1.10.12" - momentVersionNumber = "2.22.2" lscacheVersionNumber = "1.0.5" bootstrapVersion = f"bootstrap-{bootstrapVersionNumber}-dist" jqueryVersion = f"jquery-{jqueryVersionNumber}" dataTablesVersion = f"DataTables-{dataTablesVersionNumber}" - momentVersion = f"moment-{momentVersionNumber}" lscacheVersion = f"lscache-{lscacheVersionNumber}" bootstrapSourceURL = URL.fromText( @@ -712,11 +710,6 @@ class ExternalApplication: f"DataTables-{dataTablesVersionNumber}.zip" ) - momentJSSourceURL = URL.fromText( - f"https://cdnjs.cloudflare.com/ajax/libs/moment.js/" - f"{momentVersionNumber}/moment.min.js" - ) - lscacheJSSourceURL = URL.fromText( f"https://raw.githubusercontent.com/pamelafox/lscache/" f"{lscacheVersionNumber}/lscache.min.js" @@ -802,19 +795,6 @@ async def dataTablesResource(self, request: IRequest) -> KleinRenderable: *names, ) - @router.route(_unprefix(URLs.momentJS), methods=("HEAD", "GET")) - @static - async def momentJSResource(self, request: IRequest) -> KleinRenderable: - """ - Endpoint for moment.js. - """ - request.setHeader( - HeaderName.contentType.value, ContentType.javascript.value - ) - return await self.cachedResource( - request, self.momentJSSourceURL, f"{self.momentVersion}.min.js" - ) - @router.route(_unprefix(URLs.lscacheJS), methods=("HEAD", "GET")) @static async def lscacheJSResource(self, request: IRequest) -> KleinRenderable: diff --git a/src/ims/config/_urls.py b/src/ims/config/_urls.py index 0f6a243ef..5d95f03bb 100644 --- a/src/ims/config/_urls.py +++ b/src/ims/config/_urls.py @@ -97,8 +97,6 @@ class URLs: "media", "js", "dataTables.bootstrap.min.js" ) - momentJS: ClassVar[URL] = external.child("moment.min.js") - lscacheJS: ClassVar[URL] = external.child("lscache.min.js") # Web application diff --git a/src/ims/element/page/_page.py b/src/ims/element/page/_page.py index 169214785..f41b1f311 100644 --- a/src/ims/element/page/_page.py +++ b/src/ims/element/page/_page.py @@ -66,7 +66,6 @@ def add(name: str) -> None: if name == "ims": add("jquery") - add("moment") try: result[name] = getattr(urls, f"{name}JS") diff --git a/src/ims/element/static/ims.js b/src/ims/element/static/ims.js index b4f9b8ea6..6c69ef567 100644 --- a/src/ims/element/static/ims.js +++ b/src/ims/element/static/ims.js @@ -188,11 +188,10 @@ function parseInt(stringInt) { // Create a