Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.js #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,16 @@ function showDirectoryTable(dir) {
});

_.each(dir, function(entry, i) {
// Create new row for entry
var tr = $("<tr>");

// Assuming layout is in such order:
// ID, Title, DateCreation, DateLastRun, TotalRunsAmount, ComponentsAmount, ShareLink, ScheduleInfo, Actions

// #1: ID
tr.append( $("<td>").text( (i + 1) ));

// #2: Title
if (entry.uri) {
tr.append(
$("<td>").append(
Expand All @@ -184,9 +191,20 @@ function showDirectoryTable(dir) {
} else {
tr.append( $("<td>").text( entry.name ));
}

// #3: Date of creation
tr.append( $("<td>").text( fmtDate(entry.creation_date) ));

// #4: Last run
tr.append( $("<td>").text( fmtDate(entry.last_run) ));

// #5: Total runs
tr.append( $("<td>").text( entry.runs ));

// #6: Amount of components
tr.append( $("<td>").text( entry.ncomponents ));

// #7: Share link
if (entry.shared) {
var anchor = $("<a>")
.text('shareable link')
Expand All @@ -196,6 +214,7 @@ function showDirectoryTable(dir) {
tr.append( $("<td>").text(''));
}

// #8: Schedule info
// show schedule status
{
var status = '';
Expand All @@ -209,6 +228,8 @@ function showDirectoryTable(dir) {
}
tr.append( $("<td>").text(status));
}

// #9: Actions
if (true) {
var controls = $("<td>");

Expand Down