{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/seasponge/issues/46","labels_url":"https://api.github.com/repos/mozilla/seasponge/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/seasponge/issues/46/comments","events_url":"https://api.github.com/repos/mozilla/seasponge/issues/46/events","html_url":"https://github.com/mozilla/seasponge/pull/46","id":53964598,"number":46,"title":"feat(app): Implement configuration file. Close #44","user":{"login":"Frozenfire92","id":5893112,"avatar_url":"https://avatars.githubusercontent.com/u/5893112?v=3","gravatar_id":"","url":"https://api.github.com/users/Frozenfire92","html_url":"https://github.com/Frozenfire92","followers_url":"https://api.github.com/users/Frozenfire92/followers","following_url":"https://api.github.com/users/Frozenfire92/following{/other_user}","gists_url":"https://api.github.com/users/Frozenfire92/gists{/gist_id}","starred_url":"https://api.github.com/users/Frozenfire92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frozenfire92/subscriptions","organizations_url":"https://api.github.com/users/Frozenfire92/orgs","repos_url":"https://api.github.com/users/Frozenfire92/repos","events_url":"https://api.github.com/users/Frozenfire92/events{/privacy}","received_events_url":"https://api.github.com/users/Frozenfire92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-10T17:18:51Z","updated_at":"2015-01-10T23:48:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/seasponge/pulls/46","html_url":"https://github.com/mozilla/seasponge/pull/46","diff_url":"https://github.com/mozilla/seasponge/pull/46.diff","patch_url":"https://github.com/mozilla/seasponge/pull/46.patch"},"body":"This implements loading a configuration file at time of model creation. It also saves and loads the configuration during (de)serialization to avoid having to worry about it at load time.\r\n\r\nA sample config file (so far is)\r\n```\r\n{\r\n\t\"dataClassificationOptions\" : [\r\n        \"public\",\r\n        \"internal\",\r\n        \"restricted\",\r\n        \"secret\"\r\n    ],\r\n\r\n    \"securityControlOptions\" : [\r\n        \"confidentiality\",\r\n        \"integrity\",\r\n        \"availability\"\r\n    ]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mozilla/seasponge/issues/comments/69477134","html_url":"https://github.com/mozilla/seasponge/pull/46#issuecomment-69477134","issue_url":"https://api.github.com/repos/mozilla/seasponge/issues/46","id":69477134,"user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"created_at":"2015-01-10T23:48:27Z","updated_at":"2015-01-10T23:48:27Z","body":"TODO checklist for @Frozenfire92 :\r\n\r\n- [ ] Use `DrawController` to store all of the options. See https://github.com/mozilla/seasponge/blob/7e8be46066d2b3853313964decd4753810a5acb5/app/scripts/controllers/draw.coffee#L43-L82\r\n  - [ ] Import Options from file\r\n    - Options file could look like:\r\n\r\n```javascript\r\n{\r\noptions: {\r\n\"dataClassificationOptions\": [ ],\r\n\"securityControlOptions\": [ ]\r\n}\r\n}\r\n```\r\n    - [ ] Read file\r\n    - [ ] Import JSON (see options file example above) and merge into the options in `DrawController` \r\n- [ ] Allow `Model` to have options that `DrawController` does not currently support (requires importing)\r\n  - See `loadDiagram` function https://github.com/mozilla/seasponge/blob/7e8be46066d2b3853313964decd4753810a5acb5/app/scripts/controllers/draw.coffee#L221-L241\r\n  - [ ] On `loadDiagram` check over all of the `Diagram`'s `Element`s and verify that they are supported\r\n    - [ ] Iterate over each `Element` and check if the `DrawController`'s options contains each of those entries\r\n       - See https://lodash.com/docs#intersection \r\n     - If entries are found that do not exist in `DrawController`'s options\r\n       - [ ] Add missing options to `DrawController`'s options\r\n       - [ ] Notifying user that they should import their options, however we have successfully loaded without them and it will work fully without them\r\n\r\n"}}