urbanriskmap / cognicity-rem Goto Github PK
View Code? Open in Web Editor NEWCognicity REM Web Client v3
Cognicity REM Web Client v3
code here also needs changing in line with urbanriskmap/cognicity-server#74
Unhandled rejection e@https://rem.petabencana.id/scripts/vendor-bundle.js:7:17827
invoke@https://rem.petabencana.id/scripts/vendor-bundle.js:3:22805
get@https://rem.petabencana.id/scripts/vendor-bundle.js:3:16771
invoke@https://rem.petabencana.id/scripts/vendor-bundle.js:3:19458
invoke@https://rem.petabencana.id/scripts/vendor-bundle.js:3:22761
get@https://rem.petabencana.id/scripts/vendor-bundle.js:3:16771
invoke@https://rem.petabencana.id/scripts/vendor-bundle.js:3:19648
invoke@https://rem.petabencana.id/scripts/vendor-bundle.js:3:22761
get@https://rem.petabencana.id/scripts/vendor-bundle.js:3:16771
https://rem.petabencana.id/scripts/vendor-bundle.js:11:20805
i@https://rem.petabencana.id/scripts/vendor-bundle.js:2:22129
_settlePromiseFromHandler@https://rem.petabencana.id/scripts/vendor-bundle.js:2:10596
_settlePromise@https://rem.petabencana.id/scripts/vendor-bundle.js:2:11420
_settlePromise0@https://rem.petabencana.id/scripts/vendor-bundle.js:2:12110
_settlePromises@https://rem.petabencana.id/scripts/vendor-bundle.js:2:13441
_drainQueue@https://rem.petabencana.id/scripts/vendor-bundle.js:1:7981
_drainQueues@https://rem.petabencana.id/scripts/vendor-bundle.js:1:8038
drainQueues@https://rem.petabencana.id/scripts/vendor-bundle.js:1:6160
promiseReactionJob@[native code]
While using pagination fixes the issue of selected area not showing up sometimes in the first few rows, wouldn't it be more useful to sort areas based on reports?
Sorting by name could be secondary.
Sometimes this happens, sometimes not.
Canvas rendering is much faster in browser than SVG.
aurelia-testing.js:1 Uncaught SyntaxError: Unexpected token <
should we add scripts/
to .gitignore and remove?
I've tried tweaking the map extents in 6d9ba70 to better centre and focus on Semarang in initial map display. However on first load it does this two step process of using the map extents I specify (with some cut off by table), but then zooms in and cuts off the bottom of Semarang:
Then on selecting regions, sometimes these are cut off at the bottom (as shown) or entirely off the bottom of the screen. Resizing the browser window fixes this particular issue but then both issues show up on page reload.
OS: macOS 10.14.2
Browsers: Chrome beta 71.0.3578.62, Firefox Developer Edition 64.0b11 (64-bit)
_V3 CogniCity removed reports module as part of UI/UX improvements for public map, but there may be a case of integrating this back into the REM.
Currently auth0-lock is being brought in with a script tag on index.html, but this means that karma can't bring it in during testing, failing with:
Chrome 56.0.2924 (Mac OS X 10.10.5) the app says hello FAILED ReferenceError: Auth0Lock is not defined at new App (/Users/abrahamq/Documents/urop/cognicity-rem/scripts/app-bundle.js:214:23) at Object.<anonymous> (/Users/abrahamq/Documents/urop/cognicity-rem/test/unit/app.spec.js:6:14)
I think the solution is to bundle auth0-lock with our app. There's an npm module https://www.npmjs.com/package/auth0-lock, but I couldn't get it to work? There's no dist/ or build folder in the npm module and the docs seem to point at having to build the module but npm install fails.
Hi all,
We have a problem when you logged in to REM, sometimes Auth0 recognized you as basic user (View Only) although you're not.
Here's an example with BPBD account:
but then after several tries - Full Access
The same thing also happens with my own account.
Temporary solution to gain full access:
In map.js
layer._leaflet_id = feature.properties.area_id;
This breaks standard leaflet functionality like layer.clearLayers().
We'll need to refactor the REM map/table code to fix this.
Uncaught TypeError: Cannot read property '__useDefault' of undefined
at a (vendor-bundle.js:7)
at vendor-bundle.js:7
at Object.execCb (vendor-bundle.js:3)
at y.check (vendor-bundle.js:3)
at y.<anonymous> (vendor-bundle.js:3)
at vendor-bundle.js:2
at vendor-bundle.js:3
at each (vendor-bundle.js:2)
at y.emit (vendor-bundle.js:3)
at y.check (vendor-bundle.js:3)
at y.enable (vendor-bundle.js:3)
at y.init (vendor-bundle.js:3)
at f (vendor-bundle.js:2)
at Object.completeLoad (vendor-bundle.js:3)
at HTMLScriptElement.onScriptLoad (vendor-bundle.js:3)
a @ vendor-bundle.js:7
(anonymous) @ vendor-bundle.js:7
execCb @ vendor-bundle.js:3
check @ vendor-bundle.js:3
(anonymous) @ vendor-bundle.js:3
(anonymous) @ vendor-bundle.js:2
(anonymous) @ vendor-bundle.js:3
each @ vendor-bundle.js:2
emit @ vendor-bundle.js:3
check @ vendor-bundle.js:3
enable @ vendor-bundle.js:3
init @ vendor-bundle.js:3
f @ vendor-bundle.js:2
completeLoad @ vendor-bundle.js:3
onScriptLoad @ vendor-bundle.js:3
I can't load the page in IE. I am having trouble with the VM so I can't screenie or copy and paste the error but it did suggest it was having trouble with polyfill and suggested using fetch, so I will give that a shot.
Now strictly unavailable as of two days ago:
https://auth0.com/docs/migrations/guides/legacy-lock-api-deprecation
FY17Ext Dev Meeting Field Office 12 _ request to correct bug that shows a 7 hour difference between the real report time and its display in the REM.
See detailed description:
urbanriskmap/riskmap#221 (comment)
Firefox 51.0.1 (64-bit) on OSX 10.11.6
------------------------------------------------
Inner Error:
Message: Auth0Lock is not defined
Inner Error Stack:
App@https://rem-dev.petabencana.id/scripts/app-bundle.js:214:7
invoke@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12420:14
invoke@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12379:155
invoke@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12643:16
get@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12096:27
get@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12582:14
ensureViewModel/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24085:58
tryCatcher@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:3373:16
[15]</module.exports/Promise.prototype._settlePromiseFromHandler@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:2590:13
[15]</module.exports/Promise.prototype._settlePromise@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:2647:13
[15]</module.exports/Promise.prototype._settlePromise0@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:2692:5
[15]</module.exports/Promise.prototype._settlePromises@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:2771:13
[1]</Async.prototype._drainQueue@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:163:13
[1]</Async.prototype._drainQueues@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:173:5
Async/this.drainQueues@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:47:9
End Inner Error Stack
------------------------------------------------
AggregateError@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:15462:13
invoke@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12645:15
get@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12096:27
get@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:12582:14
ensureViewModel/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24085:58
From previous event:
ensureViewModel@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24078:16
createController@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24054:14
_createControllerAndSwap@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24033:14
compose@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24113:16
compose@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:24381:14
setRoot@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:13352:14
configure/<@https://rem-dev.petabencana.id/scripts/app-bundle.js:425:14
From previous event:
configure@https://rem-dev.petabencana.id/scripts/app-bundle.js:424:5
config/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11927:9
From previous event:
config@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11922:14
handleApp@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11913:12
run/</</<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11946:13
From previous event:
run/</<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11944:16
From previous event:
run/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11943:14
From previous event:
run@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11939:12
@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:11966:3
newContext/context.execCb@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5891:24
newContext/Module.prototype.check@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5079:43
newContext/Module.prototype.enable@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5371:17
newContext/context.enable@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5752:21
newContext/Module.prototype.enable/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5356:25
bind/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:4332:20
each@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:4257:31
newContext/Module.prototype.enable@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5308:17
newContext/Module.prototype.init@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:4984:21
localRequire/<@https://rem-dev.petabencana.id/scripts/vendor-bundle.js:5655:25 vendor-bundle.js:1395:13```
Hi. Just noting there's a bug in dev in which after you login (now using universal auth0 thanks to @mehrdadgit's work) it still has the pre-login menu (with option to login "Masuk", rather than options for map "Peta" and logout "Keluar"). Neither of us know our way around aurelia routing well enough (yet) in order to fix it, but in light of other discussions around a rewrite of REM (and using Cognito) it doesn't seem worth fixing this bug. Also just flagging that dev now should not be merged into master as we've gone with two different auth0 ways of doing the login and merging dev -> master would break prod without some corresponding config changes.
Details in urbanriskmap/riskmap#220
Starting 'buildJavaScript'...
[09:00:37] gulp-notify: [Error running Gulp] Error: /Users/matthew/code/cognicity-rem-v3/src/environment.js: Unexpected token, expected , (5:2)
Finished 'buildJavaScript'
Starting 'writeBundles'...
Tracing api...
commonJs.convert: COULD NOT CONVERT: /Users/matthew/code/cognicity-rem-v3/src/environment.js, so skipping it. Error was: Error: Line 1: Unexpected token
Client UI: "Unexpected error updating flood state"
Web response:
{
"status":401,
"message":"invalid signature",
"code":"invalid_token",
"name":"UnauthorizedError"
}
According to https://auth0.com/docs/errors/libraries/auth0-js/invalid-token requesting responseType parameter to token id_token
should fix it.
To recreate, occurs when:
Options:
Leaflet has internal factory functions that return an instance. This is the leaflet design pattern, and so we should refactor to avoid use of new
.
i.e.
var map = L.map();
not,
var map = new L.Map();
Trying to edit flood state returns an authentication error (403?)
npm WARN deprecated [email protected]: ๐ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: express 2.x series is deprecated
npm WARN deprecated [email protected]: connect 1.x series is deprecated
expected behavior:
current behavior:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.