{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenAF/nAttrMon/issues/85","repository_url":"https://api.github.com/repos/OpenAF/nAttrMon","labels_url":"https://api.github.com/repos/OpenAF/nAttrMon/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/OpenAF/nAttrMon/issues/85/comments","events_url":"https://api.github.com/repos/OpenAF/nAttrMon/issues/85/events","html_url":"https://github.com/OpenAF/nAttrMon/issues/85","id":351630876,"node_id":"MDU6SXNzdWUzNTE2MzA4NzY=","number":85,"title":"Input plug: option to convert result to a single array attribute","user":{"login":"nmaguiar","id":11761746,"node_id":"MDQ6VXNlcjExNzYxNzQ2","avatar_url":"https://avatars2.githubusercontent.com/u/11761746?v=4","gravatar_id":"","url":"https://api.github.com/users/nmaguiar","html_url":"https://github.com/nmaguiar","followers_url":"https://api.github.com/users/nmaguiar/followers","following_url":"https://api.github.com/users/nmaguiar/following{/other_user}","gists_url":"https://api.github.com/users/nmaguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/nmaguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmaguiar/subscriptions","organizations_url":"https://api.github.com/users/nmaguiar/orgs","repos_url":"https://api.github.com/users/nmaguiar/repos","events_url":"https://api.github.com/users/nmaguiar/events{/privacy}","received_events_url":"https://api.github.com/users/nmaguiar/received_events","type":"User","site_admin":false},"labels":[{"id":670041405,"node_id":"MDU6TGFiZWw2NzAwNDE0MDU=","url":"https://api.github.com/repos/OpenAF/nAttrMon/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-17T15:06:10Z","updated_at":"2018-08-17T15:06:10Z","closed_at":null,"author_association":"COLLABORATOR","body":"To decrease the number of attributes in some nAttrMon configurations it would be helpful to convert an input plug result consisting of a set of attributes (e.g. endpoints) into a single attribute where the previous attribute names become a key:\r\n\r\nInput plug result example:\r\n````javascript\r\nattributes: {\r\n   attr1: {\r\n      result: true,\r\n      errorMessage: \"n/a\"\r\n   },\r\n   attr2: {\r\n      result: false,\r\n      errorMessage: \"some error\"\r\n   }\r\n}\r\n```` \r\n\r\nNew plug result example after applying the new parameter:\r\n````javascript\r\nattributes: {\r\n   newAttr1: [\r\n      { key: \"attr1\", result: true, errorMessage: \"n/a\" },\r\n      { key: \"attr2\", result: false, errorMessage: \"some error\" }\r\n   ]\r\n}\r\n````\r\n\r\nNote: this should be done before the merge plug option so it can also be later merged into a single attribute from other plug inputs."}}
{"actor":{"display_login":"nmaguiar"}}