Projects

<% if (msg) { %>
<%= msg %>
<% } %> <% if (err) { %>
<%= err %>
<% } %> <% if (projects.length === 0) { %>
No projects yet. Create the first one.
<% } else { %> <% const sortedProjects = projects.slice().sort(function (a, b) { var ga = a.group_name || '\uffff', gb = b.group_name || '\uffff'; return ga < gb ? -1 : ga > gb ? 1 : (a.name < b.name ? -1 : 1); }); %> <% const hasGroups = sortedProjects.some(function (p) { return p.group_name; }); %> <% let prevG = null; %> <% for (const p of sortedProjects) { %> <% const g = p.group_name || ''; %> <% if (prevG === null || (hasGroups && g !== prevG)) { %> <% if (prevG !== null) { %><% } %> <% if (hasGroups) { %>

<%= g || 'Ungrouped' %>

<% } %>
<% } %> <% prevG = g; %> <% const d = latest[p.name]; %> <% const live = lastLive[p.name]; %> <% const af = accessFlags[p.name] || { enabled: true, protected: false }; %> <% const ps = !af.enabled ? 'deactivated' : (pm2[p.name] || 'unknown'); %> <% const info = infos[p.name]; %> <% const primary = info && info.DOMAINS ? String(info.DOMAINS).split(',')[0].trim() : (info && info.SYSTEM_DOMAIN ? String(info.SYSTEM_DOMAIN).trim() : ''); %> <% const commitLine = d ? (d.commit_msg || d.step || d.status) : 'no deployments yet'; %>
<% if (primary) { %> <% } %>
<%= p.name %> <% if (primary) { %> <%= primary %> <% } else { %> no domain <% } %>
<% if (typeof user !== 'undefined' && user && user.role === 'admin' && typeof owners !== 'undefined' && owners[p.owner_user_id] && owners[p.owner_user_id] !== user.username) { %> <%= owners[p.owner_user_id] %> <% } %> <% if (d) { %> <%= h.depLabel(d.status) %> <% } else { %> never <% } %>
<%= commitLine %>
๐Ÿ“ฆ <%= h.repoShort(p.repo_url) %> ยท <%= p.branch %>
<% const tt = trafficToday[p.name]; %> ๐Ÿ“ˆ <%= tt ? h.fmtInt(tt.requests) + ' req ยท ' + h.fmtBytes(tt.bytes) : 'no traffic today' %> <% if (live && live.finished_at) { %> ๐Ÿ•‘ <%= h.relTime(live.finished_at) %> <% } else { %> ๐Ÿ•‘ never deployed <% } %>
<%= ps %> <% if (af.protected) { %>๐Ÿ”’ protected<% } %>
<% } %>
<% } %>