Skip to content

Commit f89497b

Browse files
committed
Merge branch 'u/jin456/ngc': add NGC and ROCm container catalogs
2 parents 4e3de79 + 6e81ac1 commit f89497b

115 files changed

Lines changed: 8569 additions & 186 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/assets/images/nvidia_logo.png

17.5 KB
Loading

docs/assets/images/rocm_logo.png

33.3 KB
Loading

docs/assets/js/init-tablefilter.js

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@ document.addEventListener("DOMContentLoaded", function () {
33
// Determine which table we're dealing with
44
const appTable = document.getElementById('appTable');
55
const datasetTable = document.getElementById('datasetTable');
6-
const tableId = appTable ? 'appTable' : (datasetTable ? 'datasetTable' : null);
7-
6+
const ngcTable = document.getElementById('ngcTable');
7+
const rocmTable = document.getElementById('rocmTable');
8+
const tableId = appTable ? 'appTable'
9+
: (datasetTable ? 'datasetTable'
10+
: (ngcTable ? 'ngcTable'
11+
: (rocmTable ? 'rocmTable' : null)));
12+
813
if (!tableId) return; // No table found on this page
9-
14+
1015
const isDatasetTable = tableId === 'datasetTable';
16+
const isContainerTable = tableId === 'ngcTable' || tableId === 'rocmTable';
17+
const isNgcTable = tableId === 'ngcTable'; // kept for compatibility
1118

1219
// Count visible tbody rows directly from the DOM (reliable after any filter)
1320
function updateCounter() {
@@ -19,30 +26,39 @@ document.addEventListener("DOMContentLoaded", function () {
1926
table.querySelectorAll('tbody tr').forEach(function (row) {
2027
if (row.style.display !== 'none') count++;
2128
});
22-
span.textContent = isDatasetTable ? 'Dataset(s): ' + count : 'Application(s): ' + count;
29+
const label = isDatasetTable ? 'Dataset(s): '
30+
: (isContainerTable ? 'Container(s): ' : 'Application(s): ');
31+
span.textContent = label + count;
2332
}
2433

25-
var tf = new TableFilter(tableId, {
34+
// Container catalog tables (NGC, ROCm) have only 2 columns; the others have 3.
35+
var tfConfig = {
2636
base_path: '/assets/js/tablefilter/',
2737
paging: false,
2838
rows_counter: false,
2939
btn_reset: false,
3040
mark_active_columns: true,
3141
highlight_keywords: true,
32-
col_0: 'input', // Application/Dataset → text input
33-
col_1: 'input', // Topic/Category → text input
34-
col_2: 'input', // Available at/Discipline → text input
42+
col_0: 'input', // Application/Dataset/Container → text input
43+
col_1: 'input', // Topic/Category/Available at → text input
3544
alternate_rows: false,
3645
themes: [{ name: 'transparent'}],
3746
extensions: [],
38-
watermark: isDatasetTable
39-
? ['Start typing...', 'Category...', 'Discipline...']
40-
: ['Start typing...', 'Topic...', 'Avalable cluster...'],
4147
auto_filter: { delay: 100 },
4248
msg_filter: 'Filtering...',
4349
help_instructions: false,
4450
on_after_filter: updateCounter // fires after every filter operation
45-
});
51+
};
52+
if (isContainerTable) {
53+
tfConfig.watermark = ['Start typing...', 'Avalable cluster...'];
54+
} else {
55+
tfConfig.col_2 = 'input'; // Available at/Discipline → text input
56+
tfConfig.watermark = isDatasetTable
57+
? ['Start typing...', 'Category...', 'Discipline...']
58+
: ['Start typing...', 'Topic...', 'Avalable cluster...'];
59+
}
60+
61+
var tf = new TableFilter(tableId, tfConfig);
4662

4763
tf.init();
4864

@@ -106,10 +122,12 @@ document.addEventListener("DOMContentLoaded", function () {
106122
});
107123
}
108124

109-
// Show dropdowns for both tables - different columns for each
125+
// Show dropdowns - different columns for each table
110126
if (isDatasetTable) {
111127
buildTokensDropdown(1, 'Any Category');
112128
buildTokensDropdown(2, 'Any Discipline');
129+
} else if (isContainerTable) {
130+
buildTokensDropdown(1, 'Any Cluster');
113131
} else {
114132
buildTokensDropdown(1, 'Any Topic');
115133
buildTokensDropdown(2, 'Any Cluster');

0 commit comments

Comments
 (0)