- return m('container', [
- m('table.table.table-condensed.table-hover', m('tbody', [
- Object.keys(sessions).map(function(uuidPrefix) {
- var session = sessions[uuidPrefix]
- return m('tr', [
- session.token && session.user ? [
- m('td', m('a.btn.btn-xs.btn-default', {
+ return m('.container', [
+ m('p', [
+ 'You can log in to multiple Arvados sites here, then use the ',
+ m('a[href="/search"]', 'multi-site search'),
+ ' page to search collections and projects on all sites at once.',
+ ]),
+ m('table.table.table-condensed.table-hover', [
+ m('thead', m('tr', [
+ m('th', 'status'),
+ m('th', 'cluster ID'),
+ m('th', 'username'),
+ m('th', 'email'),
+ m('th', 'actions'),
+ m('th'),
+ ])),
+ m('tbody', [
+ Object.keys(sessions).map(function(uuidPrefix) {
+ var session = sessions[uuidPrefix]
+ return m('tr', [
+ session.token && session.user ? [
+ m('td', m('span.label.label-success', 'logged in')),
+ m('td', {title: session.baseURL}, uuidPrefix),
+ m('td', session.user.username),
+ m('td', session.user.email),
+ m('td', session.isFromRails ? null : m('button.btn.btn-xs.btn-default', {
+ uuidPrefix: uuidPrefix,
+ onclick: m.withAttr('uuidPrefix', db.logout),
+ }, 'Log out ', m('span.glyphicon.glyphicon-log-out'))),
+ ] : [
+ m('td', m('span.label.label-default', 'logged out')),
+ m('td', {title: session.baseURL}, uuidPrefix),
+ m('td'),
+ m('td'),
+ m('td', m('a.btn.btn-xs.btn-primary', {
+ uuidPrefix: uuidPrefix,
+ onclick: db.login.bind(db, session.baseURL),
+ }, 'Log in ', m('span.glyphicon.glyphicon-log-in'))),
+ ],
+ m('td', session.isFromRails ? null : m('button.btn.btn-xs.btn-default', {