{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments/183131600","pull_request_review_id":114077996,"id":183131600,"diff_hunk":"@@ -0,0 +1,55 @@\n+import { Injectable } from '@angular/core';\n+import { CacheService } from 'app/shared/services/cache.service';\n+import { Observable } from 'rxjs/Observable';\n+import { QuotaSettings, ComputeMode, QuotaScope } from 'app/shared/models/arm/quotaSettings';\n+\n+\n+@Injectable()\n+export class QuotaService {\n+    private readonly _site = 'site';\n+    private readonly _webSpace = 'webspace';\n+    private readonly _shared = 'shared';\n+    private readonly _dedicated = 'dedicated';\n+    private readonly _quotaSettingsResourceIdFormat = '/subscriptions/{0}/providers/Microsoft.Web/quotaSettings';\n+    private readonly _fullQuotaFormat = '{0}_{1}_{2}_{3}';\n+\n+    constructor(\n+        private _cacheService: CacheService) {\n+    }\n+\n+    getQuotaSettings(subscriptionId: string):  Observable<QuotaSettings> {\n+        const resourceId = this._quotaSettingsResourceIdFormat.format(subscriptionId);\n+        return  this._cacheService.getArm(resourceId).map(r => {\n+            const quotaSettings: QuotaSettings[] = r.json().value;\n+            const quotaSetting = quotaSettings.find(quota => quota.properties.subscriptionId === subscriptionId);","path":"client/src/app/shared/services/quota.service.ts","position":24,"original_position":24,"commit_id":"e9dbd6f01894d55dcc8f300bb875e98ad013a22d","original_commit_id":"e9dbd6f01894d55dcc8f300bb875e98ad013a22d","user":{"login":"nertim","id":493476,"avatar_url":"https://avatars2.githubusercontent.com/u/493476?v=4","gravatar_id":"","url":"https://api.github.com/users/nertim","html_url":"https://github.com/nertim","followers_url":"https://api.github.com/users/nertim/followers","following_url":"https://api.github.com/users/nertim/following{/other_user}","gists_url":"https://api.github.com/users/nertim/gists{/gist_id}","starred_url":"https://api.github.com/users/nertim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nertim/subscriptions","organizations_url":"https://api.github.com/users/nertim/orgs","repos_url":"https://api.github.com/users/nertim/repos","events_url":"https://api.github.com/users/nertim/events{/privacy}","received_events_url":"https://api.github.com/users/nertim/received_events","type":"User","site_admin":false},"body":"isn't call getting the quota settings for a given subscription?","created_at":"2018-04-20T18:16:55Z","updated_at":"2018-04-20T18:16:55Z","html_url":"https://github.com/Azure/azure-functions-ux/pull/2593#discussion_r183131600","pull_request_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments/183131600"},"html":{"href":"https://github.com/Azure/azure-functions-ux/pull/2593#discussion_r183131600"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593","id":182995886,"html_url":"https://github.com/Azure/azure-functions-ux/pull/2593","diff_url":"https://github.com/Azure/azure-functions-ux/pull/2593.diff","patch_url":"https://github.com/Azure/azure-functions-ux/pull/2593.patch","issue_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2593","number":2593,"state":"open","locked":false,"title":"Bug 11405505:[UR2] Bring Environment Switcher and QuotaSettings API to Functions Portal to support the new Websites blades based on IFrame like AppSettings","user":{"login":"exc3eed","id":20177468,"avatar_url":"https://avatars2.githubusercontent.com/u/20177468?v=4","gravatar_id":"","url":"https://api.github.com/users/exc3eed","html_url":"https://github.com/exc3eed","followers_url":"https://api.github.com/users/exc3eed/followers","following_url":"https://api.github.com/users/exc3eed/following{/other_user}","gists_url":"https://api.github.com/users/exc3eed/gists{/gist_id}","starred_url":"https://api.github.com/users/exc3eed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exc3eed/subscriptions","organizations_url":"https://api.github.com/users/exc3eed/orgs","repos_url":"https://api.github.com/users/exc3eed/repos","events_url":"https://api.github.com/users/exc3eed/events{/privacy}","received_events_url":"https://api.github.com/users/exc3eed/received_events","type":"User","site_admin":false},"body":"Bug 11405505:[UR2] Bring Environment Switcher and QuotaSettings API to Functions Portal to support the new Websites blades based on IFrame like AppSettings","created_at":"2018-04-20T08:43:05Z","updated_at":"2018-04-20T18:16:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd26777320a5a95ba81f6257c35aba28110ae3fe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2593/comments","statuses_url":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/e9dbd6f01894d55dcc8f300bb875e98ad013a22d","head":{"label":"exc3eed:asfarok-envswitcher","ref":"asfarok-envswitcher","sha":"e9dbd6f01894d55dcc8f300bb875e98ad013a22d","user":{"login":"exc3eed","id":20177468,"avatar_url":"https://avatars2.githubusercontent.com/u/20177468?v=4","gravatar_id":"","url":"https://api.github.com/users/exc3eed","html_url":"https://github.com/exc3eed","followers_url":"https://api.github.com/users/exc3eed/followers","following_url":"https://api.github.com/users/exc3eed/following{/other_user}","gists_url":"https://api.github.com/users/exc3eed/gists{/gist_id}","starred_url":"https://api.github.com/users/exc3eed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exc3eed/subscriptions","organizations_url":"https://api.github.com/users/exc3eed/orgs","repos_url":"https://api.github.com/users/exc3eed/repos","events_url":"https://api.github.com/users/exc3eed/events{/privacy}","received_events_url":"https://api.github.com/users/exc3eed/received_events","type":"User","site_admin":false},"repo":{"id":103874481,"name":"azure-functions-ux","full_name":"exc3eed/azure-functions-ux","owner":{"login":"exc3eed","id":20177468,"avatar_url":"https://avatars2.githubusercontent.com/u/20177468?v=4","gravatar_id":"","url":"https://api.github.com/users/exc3eed","html_url":"https://github.com/exc3eed","followers_url":"https://api.github.com/users/exc3eed/followers","following_url":"https://api.github.com/users/exc3eed/following{/other_user}","gists_url":"https://api.github.com/users/exc3eed/gists{/gist_id}","starred_url":"https://api.github.com/users/exc3eed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exc3eed/subscriptions","organizations_url":"https://api.github.com/users/exc3eed/orgs","repos_url":"https://api.github.com/users/exc3eed/repos","events_url":"https://api.github.com/users/exc3eed/events{/privacy}","received_events_url":"https://api.github.com/users/exc3eed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/exc3eed/azure-functions-ux","description":"Azure Functions UX","fork":true,"url":"https://api.github.com/repos/exc3eed/azure-functions-ux","forks_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/forks","keys_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/teams","hooks_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/hooks","issue_events_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/issues/events{/number}","events_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/events","assignees_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/assignees{/user}","branches_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/branches{/branch}","tags_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/tags","blobs_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/languages","stargazers_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/stargazers","contributors_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/contributors","subscribers_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/subscribers","subscription_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/subscription","commits_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/contents/{+path}","compare_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/merges","archive_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/downloads","issues_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/issues{/number}","pulls_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/labels{/name}","releases_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/releases{/id}","deployments_url":"https://api.github.com/repos/exc3eed/azure-functions-ux/deployments","created_at":"2017-09-18T00:56:58Z","updated_at":"2018-04-19T01:31:11Z","pushed_at":"2018-04-20T08:53:32Z","git_url":"git://github.com/exc3eed/azure-functions-ux.git","ssh_url":"git@github.com:exc3eed/azure-functions-ux.git","clone_url":"https://github.com/exc3eed/azure-functions-ux.git","svn_url":"https://github.com/exc3eed/azure-functions-ux","homepage":"https://functions.azure.com","size":17203,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"78d0329ab433328489c124ebd37798abb4b62fd2","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":50877831,"name":"azure-functions-ux","full_name":"Azure/azure-functions-ux","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-functions-ux","description":"Azure Functions UX","fork":false,"url":"https://api.github.com/repos/Azure/azure-functions-ux","forks_url":"https://api.github.com/repos/Azure/azure-functions-ux/forks","keys_url":"https://api.github.com/repos/Azure/azure-functions-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-functions-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-functions-ux/teams","hooks_url":"https://api.github.com/repos/Azure/azure-functions-ux/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-functions-ux/events","assignees_url":"https://api.github.com/repos/Azure/azure-functions-ux/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-functions-ux/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/tags","blobs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-functions-ux/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-functions-ux/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-functions-ux/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscription","commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-functions-ux/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-functions-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-functions-ux/merges","archive_url":"https://api.github.com/repos/Azure/azure-functions-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-functions-ux/downloads","issues_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-functions-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-functions-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-functions-ux/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-functions-ux/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-functions-ux/deployments","created_at":"2016-02-01T23:01:22Z","updated_at":"2018-04-20T18:11:24Z","pushed_at":"2018-04-20T18:11:22Z","git_url":"git://github.com/Azure/azure-functions-ux.git","ssh_url":"git@github.com:Azure/azure-functions-ux.git","clone_url":"https://github.com/Azure/azure-functions-ux.git","svn_url":"https://github.com/Azure/azure-functions-ux","homepage":"https://functions.azure.com","size":18192,"stargazers_count":149,"watchers_count":149,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":234,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":59,"open_issues":234,"watchers":149,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593"},"html":{"href":"https://github.com/Azure/azure-functions-ux/pull/2593"},"issue":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2593"},"comments":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2593/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2593/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/e9dbd6f01894d55dcc8f300bb875e98ad013a22d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"nertim"}}