{"action":"created","issue":{"url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/159","repository_url":"https://api.github.com/repos/infiniteautomation/ma-dashboards","labels_url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/159/comments","events_url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/159/events","html_url":"https://github.com/infiniteautomation/ma-dashboards/issues/159","id":355760703,"node_id":"MDU6SXNzdWUzNTU3NjA3MDM=","number":159,"title":"System Settings Validation Failed Messages Not Shown.","user":{"login":"terrypacker","id":3905204,"node_id":"MDQ6VXNlcjM5MDUyMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3905204?v=4","gravatar_id":"","url":"https://api.github.com/users/terrypacker","html_url":"https://github.com/terrypacker","followers_url":"https://api.github.com/users/terrypacker/followers","following_url":"https://api.github.com/users/terrypacker/following{/other_user}","gists_url":"https://api.github.com/users/terrypacker/gists{/gist_id}","starred_url":"https://api.github.com/users/terrypacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrypacker/subscriptions","organizations_url":"https://api.github.com/users/terrypacker/orgs","repos_url":"https://api.github.com/users/terrypacker/repos","events_url":"https://api.github.com/users/terrypacker/events{/privacy}","received_events_url":"https://api.github.com/users/terrypacker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-30T21:27:14Z","updated_at":"2018-08-30T21:28:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I've fixed up the Emport V2 Rest Controller to properly return validation messages when things go wrong.  The problem was that there is no 'property' in the message i.e. the context-key that would normally be used to show what input was invalid.  So the new format looks like this when you try to import a data source with an invalid value:\r\n\r\n```\r\n{\r\n  \"resourceId\" : \"IMPORT_f3001222-190f-4fd7-a222-c54fd457c03e\",\r\n  \"start\" : \"2018-08-30T11:23:50.980-10:00\",\r\n  \"finish\" : \"2018-08-30T11:23:51.263-10:00\",\r\n  \"state\" : \"COMPLETED\",\r\n  \"progress\" : 100.0,\r\n  \"owner\" : \"admin\",\r\n  \"validationMessages\" : [ {\r\n    \"level\" : \"ERROR\",\r\n    \"message\" : \"Data source 'DS_aa23d4f2-b876-42b6-b0a9-7ce982c82d2b': Invalid 'purgeType' value of 'ANNOS'. Valid values are [MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS]\",\r\n    \"property\" : null\r\n  } ],\r\n  \"genericMessages\" : [ \"Data source 'DS_997094': saved\", \"Data source 'DS_c074fb28-89ef-45a4-a5a8-43133e7ffb45': saved\", \"Data source 'internal_mango_monitoring_ds': saved\", \"Data source 'DS_9e99f60b-9b89-4470-a5f2-af330a6c0cf0': saved\", \"Data source 'DS_df1991b2-e103-406b-b5b1-23669c70526d': saved\", \"Data source 'DS_2d9d3960-f48f-4a39-8096-a3d6eb051b96': saved\", \"Data source 'DS_c1c58810-31f7-4d09-9eea-923e39bb27d7': saved\", \"Data source 'vmeters': saved\" ],\r\n  \"threadName\" : \"Temporary Resource Timeout for : IMPORT_f3001222-190f-4fd7-a222-c54fd457c03e\",\r\n  \"taskId\" : \"TR_IMPORT_f3001222-190f-4fd7-a222-c54fd457c03e\",\r\n  \"expires\" : 1535664531263,\r\n  \"queueSize\" : 0\r\n}"},"comment":{"url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/comments/417472937","html_url":"https://github.com/infiniteautomation/ma-dashboards/issues/159#issuecomment-417472937","issue_url":"https://api.github.com/repos/infiniteautomation/ma-dashboards/issues/159","id":417472937,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzQ3MjkzNw==","user":{"login":"terrypacker","id":3905204,"node_id":"MDQ6VXNlcjM5MDUyMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3905204?v=4","gravatar_id":"","url":"https://api.github.com/users/terrypacker","html_url":"https://github.com/terrypacker","followers_url":"https://api.github.com/users/terrypacker/followers","following_url":"https://api.github.com/users/terrypacker/following{/other_user}","gists_url":"https://api.github.com/users/terrypacker/gists{/gist_id}","starred_url":"https://api.github.com/users/terrypacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrypacker/subscriptions","organizations_url":"https://api.github.com/users/terrypacker/orgs","repos_url":"https://api.github.com/users/terrypacker/repos","events_url":"https://api.github.com/users/terrypacker/events{/privacy}","received_events_url":"https://api.github.com/users/terrypacker/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T21:28:07Z","updated_at":"2018-08-30T21:28:07Z","author_association":"CONTRIBUTOR","body":"Note the validationMessages has a null property field, which is how the Importer works so without changing the core this is how it will work for now."}}
{"actor":{"display_login":"terrypacker"}}