esri / adopta Goto Github PK
View Code? Open in Web Editor NEWDevelopment repo for the AdoptA application
License: Apache License 2.0
Development repo for the AdoptA application
License: Apache License 2.0
Line 362 of login.js
if (response[0].value.status.toLowerCase() === "success" &&
Add a check for response being an empty arrary or arrary of size 0. Error should state that the model did not return a response, please ensure there is an output parameter.
When a user logs in for the second (or any other time) the email that is generated need to include 'My Assets'.
A user can see all current assets and even update the status of those assets using the email.
For some reason, the field length check is failing (for what seem intermittently).
Commenting out the code for this resolves the issue, but a more permanent fix is needed.
table_fields = arcpy.Describe(user_table).fields
email_field = [field for field in table_fields if field.name == user_email_field][0]
if len(input_user_email) > email_field.length:
send_msg("Email address too long. Only {0} characters allowed.".format(
email_field.length), "error")
return None, None
Error thrown was an index out of range error.
I haven't had time to look into further and need to move on to other things, was able to get through it for a demo.
I'm getting an error when executing the bulk email service.
I have purposely cleaned up my User_Table to simulate new users. When doing so, I'm orphaning assets. I've since validated logins for new users (2) and adopted new assets.
The older assets are being reported as orphans - that's OK, but is failing to notify the 2 valid users with valid assets.
Asset adopted {6fd2fa79-b925-46c4-9124-fd0c0a94e6b7}, but user not found in table
Asset adopted {742b5e59-39ef-474f-8863-89482af97767}, but user not found in table
Asset adopted {85da2d8b-4547-45e9-8e03-833f539aea2f}, but user not found in table
Asset adopted {5493a1c4-fcd8-4d97-b170-205b7ed75d4f}, but user not found in table
Asset adopted {7d778953-c7c2-4d0e-abf5-11833b4f0105}, but user not found in table
Asset adopted {3ac6352a-c39d-4738-a453-bc7ac834f03a}, but user not found in table
Asset adopted {d3ab8320-7545-4a22-9c3a-3d1894dce4ac}, but user not found in table
Asset adopted {52287416-1875-45c6-97f4-68ee7baafcb0}, but user not found in table
Asset adopted {c65c0e81-77f2-4f50-ba09-8cff6530680e}, but user not found in table
Asset adopted {93c372eb-90b9-47ff-baad-608bcb0dc674}, but user not found in table
Asset adopted {f35dc899-c575-4c97-a287-a1a24efa42ec}, but user not found in table
Failed. Incorrect usertable or asset layer. None of the assets have owners.
Adoption summary statistics
Total registered users: 2
Users with adoptions: 0
Users without adoptions: 2
Orphans (adopted but owner not found): 11
0 email(s) will be sent.
Adoptions per user
Completed script Bulkemail...
Failed to execute (Bulkemail).
Failed at Tue Jun 07 15:56:01 2016 (Elapsed Time: 30.91 seconds)
@CTLocalGovTeam @MikeMillerGIS
Feedback from NOLA
We think this is going to be a common occurrence. When an existing user mistypes his email address, he is taken to the signup screen with no option to go back to login screen. The only way is to reload the app, so he can enter his correct email to login.
Should we add an option to go back to login screen for registered users on the sign up screen?
Clicking on the link will take user back to login page.
@ChrisBuscaglia
We have updated the script to support versioned tables. Including this in today's code drop.
hard to trouble shoot errors when the error message is only returned as a parameter
def send_msg(message, messagetype="message",):
""" output messages to stdout as well as arcpy """
if messagetype.lower() == "message":
arcpy.AddMessage(message)
if messagetype.lower() == "warning":
arcpy.AddWarning(message)
if messagetype.lower() == "error":
# set the result_output parameter in case of failures
out_message = {"status":"Failed", "description":message}
arcpy.AddError(message)
arcpy.SetParameterAsText(28, out_message)
if messagetype.lower() == "success":
# set the result_output parameter in case of success
out_message = {"status":"Success", "description":message}
arcpy.SetParameterAsText(28, out_message)
print message
This would provide the ability to update multiple assets and a better presentation of the "list" presented in the email.
If the GP service is slow the respond, the user could click on an asset, this would transition the page from the sign up while the cursor is spinning to the Adopt Page. From here there is no way to go back. I think it would be best to disable the selection of an asset while any call to a GP service is occuring
@ChrisBuscaglia
If the email address is the only required field, after submitting you email on the initial page, the only indication that you need to do something is the button changes from Sign Up/Login to Sign Up. If no additional fields are required, the app should call the Sign Up GP service without additional user interaction.
Has there been an update to the config.? I've been trying to get my loginHelpText to look the same as I had for the previous sprint.
I also noticed this with the deployed app...the text was all left aligned and the same size.
The attached document shows difference.
Currently apply edits is sending back everything, please limit this to only fields the app is setting
[{"geometry":{"x":-10026507.5173,"y":3496871.515199997,"spatialReference":{"wkid":102100,"latestWkid":3857}},"attributes":{"OBJECTID":36967,"TYPE":"CB","SYSTEM":"Eastbank","GIS_ID":"399-468-0670","BLOCKID":"220710059001037","Survey":0,"Surveyed":" ","RimEl_Ft":5.06588064861,"Depth_Ft":0,"Invert_Ft":0,"Northing":528798.254523,"Easting":3681031.68291,"Assetstatus":"Adopted","RelateGUID":"2979266a-d50e-425a-9b01-2ea0b077b096","Adopteddate":1464873381808,"Laststatusupdate":1464873381808,"Lastcleaneddate":null,"Nickname":"wer"}}]
Status of adopted asset set to "abopted" not "adopted"
As a returning user (verified user) I can select a previously adopted asset and adopt it again, need to disable this functionality.
Is there a way to prevent this?
@ChrisBuscaglia, @MikeMillerGIS
The logic implemented currently in the app is to use nickname, popup-title, displayField in that order to display rows in the list of adopted assets in the widget (when you click email). The same order is also used to display messages in the app when an action is performed, for e.g., Thank you for adopting {assetTitle}
However, we see that in some cases, you still end up with empty text because the concerned fields are empty. This leads to empty rows in the list of My Assets screen in the widget.
To ensure we always have something to display, we are planning to employ a fallback to use "layername: objectid" if nickame, popup-title, displayField are all empty. This will avoid displaying empty rows in My Assets screen as well as messages used in the app.
Please let us know if this is ok.
Please remove legend and layer list from application
I cannot reproduce how I did this - but there are multiple users with the same email address, some with different teams (or no team) in the user table. When this happens I receive a message that says it cannot send login emails and to try again later. Only deleting the users will allow the app to send emails again.
Have you (CT) had this issue before?
What triggers the login email failure message? Any time the request to the GP service fails?
@ChrisBuscaglia, @MikeMillerGIS
Here is the original UI as discussed.
Here is what we are proposing. Clicking on the green bar at the bottom always takes you to list of your adopted assets. Removing the next arrow beside each adopted asset frees up some space to accomodate potentially larger labels.
Please let us know if this is ok.
We need to add a max. scale range to the application so that someone cannot zoom to the entire extent of the database.
@MikeMillerGIS any other ideas here?
Please see attached .zip
"unAssign": {
"name": "Abandon",
"urlParameterLabel": "unassign",
"displayInMyAssets": false,
"buttonColor": "#FF0000",
"fieldsToUpdate": [
Any ideas?
"nickNameField": "Nickname",
Please remove this dependency from the configuration, only email is required.
I'd vote to change this array to be something different than "additionalfields" to something like "additionalloginparameters".
"additionalFields": [
{
"field": "Nickname",
"placeHolderText": "Nickname",
"isRequired": true
}
],
Strange and sort of annoying feature.
@ChrisBuscaglia
The AuthGP.py has a hard coded token expiry to 5 mins. We are pushing a code drop for the scripts today which will include a fix for this.
For the final configuration, I think that we need to have the user specify the symbol for 'my adopted assets" and not allow resizing.
I had to forcefully resize my adopted assets layer symbol back to 15 because the config. was forcing me to a 22 sized symbol.
Suggestions?
With the updated "green-check" symbol denoting a status update, please remove the message displayed in the app.
@MikeMillerGIS @ChrisBuscaglia
I am seeing issues with using the current release of ArcREST v3.5.3 with Python 3.4 in ArcGIS Pro.
Pro Python is complaining about the usage of dict.has_key()
in multiple files in this release branch which doesn't work in Python 3.
Should we get from master? The master too has one occurence of 'has_key' when you search the the repo, in deleteUser.py, but that doesn't affect us.
Thoughts so far:
Social Maintenance
Adopter
Community Adopter
Civic Adopter
This was feedback from Eric @ NOLA - need to make it more clear as to what the button/link does when I "click it".
Please see the screenshot below from the login email - please let me know what you think from these options.
Just a question, is it bad that the GP service is returning all this text? It is all the parameters being sent to gp process.
{"results":[{"paramName":"Result","dataType":"GPString","value":{'status': 'Failed', 'description': 'User does not exist'}}],"messages":[{"type":"esriJobMessageTypeInformative","description":"Executing (AuthGP): AuthGP [email protected] Login http://qadev000237.esri.com:81/ # "Catch Basin" {"actions":{"assign":{"name":"Adopt","assignLabel":"Adopt Me","assignedLabel":"Adopted","urlParameterLabel":"assign","fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Adopted"},{"field":"Adopteddate","action":"SetDate"},{"field":"Laststatusupdate","action":"SetDate"}]},"unAssign":{"name":"Abandon","urlParameterLabel":"unassign","displayInMyAssets":false,"fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Available"},{"field":"Adopteddate","action":"Clear"},{"field":"Laststatusupdate","action":"SetDate"}]},"additionalActions":[{"name":"Click if clean","urlParameterLabel":"clean","displayInMyAssets":true,"fieldsToUpdate":[{"field":"Lastcleaneddate","action":"SetDate"}]}]},"nickNameField":"Nickname","foreignKeyFieldForUserTable":"RelateGUID"} # # #"},{"type":"esriJobMessageTypeInformative","description":"Start Time: Thu Jun 02 05:47:24 2016"},{"type":"esriJobMessageTypeInformative","description":"Executing (AuthGP): AuthGP [email protected] Login http://qadev000237.esri.com:81/ # "Catch Basin" {"actions":{"assign":{"name":"Adopt","assignLabel":"Adopt Me","assignedLabel":"Adopted","urlParameterLabel":"assign","fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Adopted"},{"field":"Adopteddate","action":"SetDate"},{"field":"Laststatusupdate","action":"SetDate"}]},"unAssign":{"name":"Abandon","urlParameterLabel":"unassign","displayInMyAssets":false,"fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Available"},{"field":"Adopteddate","action":"Clear"},{"field":"Laststatusupdate","action":"SetDate"}]},"additionalActions":[{"name":"Click if clean","urlParameterLabel":"clean","displayInMyAssets":true,"fieldsToUpdate":[{"field":"Lastcleaneddate","action":"SetDate"}]}]},"nickNameField":"Nickname","foreignKeyFieldForUserTable":"RelateGUID"} # # #"},{"type":"esriJobMessageTypeInformative","description":"Start Time: Thu Jun 02 05:47:24 2016"},{"type":"esriJobMessageTypeInformative","description":"Executing (AuthGPScript): AuthGPScript [email protected] Login http://qadev000237.esri.com:81/ "C:\arcgisserver\directories\arcgissystem\arcgisinput\Adopta\AdoptaGP.GPServer\extracted\v101\Connection to QADev000237_sqlexpress.sde\Adopta.DBO.User_table" email teamname usertoken tokendate 1440 http://services.arcgis.com/b6gLrKHqgkQb393u/arcgis/rest/services/AdoptaCatchBasin_WFL/FeatureServer/0 # # http://www.arcgis.com [email protected] "Welcome to the Adopt a Catch Basin Program!" C:\arcgisserver\directories\arcgissystem\arcgisinput\Adopta\AdoptaGP.GPServer\extracted\v101..\cd\toolbox1\signup_template.html "Welcome back!" C:\arcgisserver\directories\arcgissystem\arcgisinput\Adopta\AdoptaGP.GPServer\extracted\v101..\cd\toolbox1\login_template.html smtp.esri.com:25 # # false # "Catch Basin" {"actions":{"assign":{"name":"Adopt","assignLabel":"Adopt Me","assignedLabel":"Adopted","urlParameterLabel":"assign","fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Adopted"},{"field":"Adopteddate","action":"SetDate"},{"field":"Laststatusupdate","action":"SetDate"}]},"unAssign":{"name":"Abandon","urlParameterLabel":"unassign","displayInMyAssets":false,"fieldsToUpdate":[{"field":"Assetstatus","action":"SetValue","value":"Available"},{"field":"Adopteddate","action":"Clear"},{"field":"Laststatusupdate","action":"SetDate"}]},"additionalActions":[{"name":"Click if clean","urlParameterLabel":"clean","displayInMyAssets":true,"fieldsToUpdate":[{"field":"Lastcleaneddate","action":"SetDate"}]}]},"nickNameField":"Nickname","foreignKeyFieldForUserTable":"RelateGUID"} # # #"},{"type":"esriJobMessageTypeInformative","description":"Start Time: Thu Jun 02 05:47:24 2016"},{"type":"esriJobMessageTypeInformative","description":"Running script AuthGPScript..."},{"type":"esriJobMessageTypeInformative","description":"Completed script AuthGPScript..."},{"type":"esriJobMessageTypeInformative","description":"Succeeded at Thu Jun 02 05:47:24 2016 (Elapsed Time: 0.29 seconds)"},{"type":"esriJobMessageTypeInformative","description":"Succeeded at Thu Jun 02 05:47:24 2016 (Elapsed Time: 0.34 seconds)"},{"type":"esriJobMessageTypeInformative","description":"Succeeded at Thu Jun 02 05:47:24 2016 (Elapsed Time: 0.34 seconds)"}]}
Here is the info I see being passed into the Add, I do not see the User ID that associates this asset to the user.
[{"geometry":{"x":-10025740.424416192,"y":3496863.294630979,"spatialReference":{"wkid":102100}},"attributes":{}}]
here is the update
[{"geometry":{"x":-10025884.34100853,"y":3497004.2254019,"spatialReference":{"wkid":102100}},"attributes":{"OBJECTID":45889,"RelateGUID":"2979266a-d50e-425a-9b01-2ea0b077b096","Assetstatus":"Adopted","Adopteddate":1464873995550,"Laststatusupdate":1464873995550}}]
I'm having trouble getting the returning login email working...what goes into this parameter?
I also think that I found a bug - should this be a required parameter?
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.