{"action":"created","comment":{"url":"https://api.github.com/repos/vatesfr/xo-web/pulls/comments/78383548","id":78383548,"diff_hunk":"@@ -77,15 +85,93 @@ class PifItem extends Component {\n   }\n }\n \n+class PifsItem extends BaseComponent {\n+  render () {\n+    const { network } = this.props\n+    const { showPifs } = this.state\n+\n+    return <div>\n+      <Tooltip content={showPifs ? _('hidePifs') : _('showPifs')}>\n+        <Button bsSize='small' bsStyle='secondary' className='m-b-1 pull-xs-right' onClick={this.toggleState('showPifs')}>\n+          <Icon icon={showPifs ? 'hidden' : 'shown'} />\n+        </Button>\n+      </Tooltip>\n+      {showPifs && <table className='table'>\n+        <thead className='thead-default'>\n+          <tr>\n+            <th>{_('pifDeviceLabel')}</th>\n+            <th>{_('homeTypeHost')}</th>\n+            <th>{_('pifVlanLabel')}</th>\n+            <th>{_('pifAddressLabel')}</th>\n+            <th>{_('pifMacLabel')}</th>\n+            <th>{_('pifStatusLabel')}</th>\n+            <th />\n+          </tr>\n+        </thead>\n+        <tbody>\n+          {map(network.PIFs, pifId => <PifItem key={pifId} id={pifId} />)}\n+        </tbody>\n+      </table>}\n+    </div>\n+  }\n+}\n+\n+const NETWORKS_COLUMNS = [\n+  {\n+    name: _('poolNetworkNameLabel'),\n+    itemRenderer: network => <Text value={network.name_label} onChange={value => editNetwork(network, { name_label: value })} />,\n+    sortCriteria: network => network.name_label\n+  },\n+  {\n+    name: _('poolNetworkDescription'),\n+    itemRenderer: network => <Text value={network.name_description} onChange={value => editNetwork(network, { name_description: value })} />,\n+    sortCriteria: network => network.name_description\n+  },\n+  {\n+    name: _('poolNetworkMTU'),\n+    itemRenderer: network => network.MTU\n+  },\n+  {\n+    name: <div className='text-xs-center'>\n+      <Tooltip content={_('defaultLockingMode')}>\n+        <Icon size='lg' icon='lock' />\n+      </Tooltip>\n+    </div>,\n+    itemRenderer: (network, vifsByNetwork) => {\n+      const networkInUse = some(vifsByNetwork[network.id], vif => vif.attached)\n+      return _toggleDefaultLockingMode(","path":"src/xo-app/pool/tab-network.js","position":88,"original_position":88,"commit_id":"f0a0ff9e17d9f1d73df9ec9c7d23a4a6b84c3f69","original_commit_id":"f0a0ff9e17d9f1d73df9ec9c7d23a4a6b84c3f69","user":{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"body":"The name of this utility function may not be clear (maybe `conditionalTooltip()`).","created_at":"2016-09-12T14:31:06Z","updated_at":"2016-09-12T14:31:06Z","html_url":"https://github.com/vatesfr/xo-web/pull/1494#discussion_r78383548","pull_request_url":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494","_links":{"self":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/comments/78383548"},"html":{"href":"https://github.com/vatesfr/xo-web/pull/1494#discussion_r78383548"},"pull_request":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494"}}},"pull_request":{"url":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494","id":84880691,"html_url":"https://github.com/vatesfr/xo-web/pull/1494","diff_url":"https://github.com/vatesfr/xo-web/pull/1494.diff","patch_url":"https://github.com/vatesfr/xo-web/pull/1494.patch","issue_url":"https://api.github.com/repos/vatesfr/xo-web/issues/1494","number":1494,"state":"open","locked":false,"title":"feat(pool/network): SortedTable and collapsable PIFs table","user":{"login":"pdonias","id":10992860,"avatar_url":"https://avatars.githubusercontent.com/u/10992860?v=3","gravatar_id":"","url":"https://api.github.com/users/pdonias","html_url":"https://github.com/pdonias","followers_url":"https://api.github.com/users/pdonias/followers","following_url":"https://api.github.com/users/pdonias/following{/other_user}","gists_url":"https://api.github.com/users/pdonias/gists{/gist_id}","starred_url":"https://api.github.com/users/pdonias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdonias/subscriptions","organizations_url":"https://api.github.com/users/pdonias/orgs","repos_url":"https://api.github.com/users/pdonias/repos","events_url":"https://api.github.com/users/pdonias/events{/privacy}","received_events_url":"https://api.github.com/users/pdonias/received_events","type":"User","site_admin":false},"body":"Fixes #1461","created_at":"2016-09-12T14:25:22Z","updated_at":"2016-09-12T14:31:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d2ce7f6be270df3e7e52f7b0fff1cc9ec4a4205","assignee":{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false},"assignees":[{"login":"julien-f","id":298721,"avatar_url":"https://avatars.githubusercontent.com/u/298721?v=3","gravatar_id":"","url":"https://api.github.com/users/julien-f","html_url":"https://github.com/julien-f","followers_url":"https://api.github.com/users/julien-f/followers","following_url":"https://api.github.com/users/julien-f/following{/other_user}","gists_url":"https://api.github.com/users/julien-f/gists{/gist_id}","starred_url":"https://api.github.com/users/julien-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julien-f/subscriptions","organizations_url":"https://api.github.com/users/julien-f/orgs","repos_url":"https://api.github.com/users/julien-f/repos","events_url":"https://api.github.com/users/julien-f/events{/privacy}","received_events_url":"https://api.github.com/users/julien-f/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494/commits","review_comments_url":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494/comments","review_comment_url":"https://api.github.com/repos/vatesfr/xo-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vatesfr/xo-web/issues/1494/comments","statuses_url":"https://api.github.com/repos/vatesfr/xo-web/statuses/f0a0ff9e17d9f1d73df9ec9c7d23a4a6b84c3f69","head":{"label":"vatesfr:pierre-pool-network-list","ref":"pierre-pool-network-list","sha":"f0a0ff9e17d9f1d73df9ec9c7d23a4a6b84c3f69","user":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"repo":{"id":8077957,"name":"xo-web","full_name":"vatesfr/xo-web","owner":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vatesfr/xo-web","description":"Interface part of Xen Orchestra.","fork":false,"url":"https://api.github.com/repos/vatesfr/xo-web","forks_url":"https://api.github.com/repos/vatesfr/xo-web/forks","keys_url":"https://api.github.com/repos/vatesfr/xo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vatesfr/xo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vatesfr/xo-web/teams","hooks_url":"https://api.github.com/repos/vatesfr/xo-web/hooks","issue_events_url":"https://api.github.com/repos/vatesfr/xo-web/issues/events{/number}","events_url":"https://api.github.com/repos/vatesfr/xo-web/events","assignees_url":"https://api.github.com/repos/vatesfr/xo-web/assignees{/user}","branches_url":"https://api.github.com/repos/vatesfr/xo-web/branches{/branch}","tags_url":"https://api.github.com/repos/vatesfr/xo-web/tags","blobs_url":"https://api.github.com/repos/vatesfr/xo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vatesfr/xo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vatesfr/xo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/vatesfr/xo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vatesfr/xo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/vatesfr/xo-web/languages","stargazers_url":"https://api.github.com/repos/vatesfr/xo-web/stargazers","contributors_url":"https://api.github.com/repos/vatesfr/xo-web/contributors","subscribers_url":"https://api.github.com/repos/vatesfr/xo-web/subscribers","subscription_url":"https://api.github.com/repos/vatesfr/xo-web/subscription","commits_url":"https://api.github.com/repos/vatesfr/xo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/vatesfr/xo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/vatesfr/xo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/vatesfr/xo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/vatesfr/xo-web/contents/{+path}","compare_url":"https://api.github.com/repos/vatesfr/xo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vatesfr/xo-web/merges","archive_url":"https://api.github.com/repos/vatesfr/xo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vatesfr/xo-web/downloads","issues_url":"https://api.github.com/repos/vatesfr/xo-web/issues{/number}","pulls_url":"https://api.github.com/repos/vatesfr/xo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/vatesfr/xo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/vatesfr/xo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vatesfr/xo-web/labels{/name}","releases_url":"https://api.github.com/repos/vatesfr/xo-web/releases{/id}","deployments_url":"https://api.github.com/repos/vatesfr/xo-web/deployments","created_at":"2013-02-07T17:43:01Z","updated_at":"2016-09-07T22:17:37Z","pushed_at":"2016-09-12T14:25:22Z","git_url":"git://github.com/vatesfr/xo-web.git","ssh_url":"git@github.com:vatesfr/xo-web.git","clone_url":"https://github.com/vatesfr/xo-web.git","svn_url":"https://github.com/vatesfr/xo-web","homepage":"","size":9553,"stargazers_count":77,"watchers_count":77,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":137,"forks":27,"open_issues":137,"watchers":77,"default_branch":"next-release"}},"base":{"label":"vatesfr:next-release","ref":"next-release","sha":"28e3a842ef5032f2f5a808c60b33e8067d199173","user":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"repo":{"id":8077957,"name":"xo-web","full_name":"vatesfr/xo-web","owner":{"login":"vatesfr","id":2064170,"avatar_url":"https://avatars.githubusercontent.com/u/2064170?v=3","gravatar_id":"","url":"https://api.github.com/users/vatesfr","html_url":"https://github.com/vatesfr","followers_url":"https://api.github.com/users/vatesfr/followers","following_url":"https://api.github.com/users/vatesfr/following{/other_user}","gists_url":"https://api.github.com/users/vatesfr/gists{/gist_id}","starred_url":"https://api.github.com/users/vatesfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatesfr/subscriptions","organizations_url":"https://api.github.com/users/vatesfr/orgs","repos_url":"https://api.github.com/users/vatesfr/repos","events_url":"https://api.github.com/users/vatesfr/events{/privacy}","received_events_url":"https://api.github.com/users/vatesfr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vatesfr/xo-web","description":"Interface part of Xen Orchestra.","fork":false,"url":"https://api.github.com/repos/vatesfr/xo-web","forks_url":"https://api.github.com/repos/vatesfr/xo-web/forks","keys_url":"https://api.github.com/repos/vatesfr/xo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vatesfr/xo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vatesfr/xo-web/teams","hooks_url":"https://api.github.com/repos/vatesfr/xo-web/hooks","issue_events_url":"https://api.github.com/repos/vatesfr/xo-web/issues/events{/number}","events_url":"https://api.github.com/repos/vatesfr/xo-web/events","assignees_url":"https://api.github.com/repos/vatesfr/xo-web/assignees{/user}","branches_url":"https://api.github.com/repos/vatesfr/xo-web/branches{/branch}","tags_url":"https://api.github.com/repos/vatesfr/xo-web/tags","blobs_url":"https://api.github.com/repos/vatesfr/xo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vatesfr/xo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vatesfr/xo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/vatesfr/xo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vatesfr/xo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/vatesfr/xo-web/languages","stargazers_url":"https://api.github.com/repos/vatesfr/xo-web/stargazers","contributors_url":"https://api.github.com/repos/vatesfr/xo-web/contributors","subscribers_url":"https://api.github.com/repos/vatesfr/xo-web/subscribers","subscription_url":"https://api.github.com/repos/vatesfr/xo-web/subscription","commits_url":"https://api.github.com/repos/vatesfr/xo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/vatesfr/xo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/vatesfr/xo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/vatesfr/xo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/vatesfr/xo-web/contents/{+path}","compare_url":"https://api.github.com/repos/vatesfr/xo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vatesfr/xo-web/merges","archive_url":"https://api.github.com/repos/vatesfr/xo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vatesfr/xo-web/downloads","issues_url":"https://api.github.com/repos/vatesfr/xo-web/issues{/number}","pulls_url":"https://api.github.com/repos/vatesfr/xo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/vatesfr/xo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/vatesfr/xo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vatesfr/xo-web/labels{/name}","releases_url":"https://api.github.com/repos/vatesfr/xo-web/releases{/id}","deployments_url":"https://api.github.com/repos/vatesfr/xo-web/deployments","created_at":"2013-02-07T17:43:01Z","updated_at":"2016-09-07T22:17:37Z","pushed_at":"2016-09-12T14:25:22Z","git_url":"git://github.com/vatesfr/xo-web.git","ssh_url":"git@github.com:vatesfr/xo-web.git","clone_url":"https://github.com/vatesfr/xo-web.git","svn_url":"https://github.com/vatesfr/xo-web","homepage":"","size":9553,"stargazers_count":77,"watchers_count":77,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":137,"forks":27,"open_issues":137,"watchers":77,"default_branch":"next-release"}},"_links":{"self":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494"},"html":{"href":"https://github.com/vatesfr/xo-web/pull/1494"},"issue":{"href":"https://api.github.com/repos/vatesfr/xo-web/issues/1494"},"comments":{"href":"https://api.github.com/repos/vatesfr/xo-web/issues/1494/comments"},"review_comments":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494/comments"},"review_comment":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vatesfr/xo-web/pulls/1494/commits"},"statuses":{"href":"https://api.github.com/repos/vatesfr/xo-web/statuses/f0a0ff9e17d9f1d73df9ec9c7d23a4a6b84c3f69"}}}}
{"actor":{"display_login":"julien-f"}}