update editor
This commit is contained in:
		
							parent
							
								
									a057120d7a
								
							
						
					
					
						commit
						e62253858e
					
				@ -442,6 +442,10 @@
 | 
				
			|||||||
                        <div class="stat-number" id="selfHostedCount">0</div>
 | 
					                        <div class="stat-number" id="selfHostedCount">0</div>
 | 
				
			||||||
                        <div class="stat-label">Self-Hosted</div>
 | 
					                        <div class="stat-label">Self-Hosted</div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 | 
					                    <div class="stat-card">
 | 
				
			||||||
 | 
					                        <div class="stat-number" id="knowledgebaseCount">0</div>
 | 
				
			||||||
 | 
					                        <div class="stat-label">Knowledgebase</div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <div class="form-section">
 | 
					                <div class="form-section">
 | 
				
			||||||
@ -460,7 +464,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <!-- Tools Tab -->
 | 
					        <!-- Tools Tab -->
 | 
				
			||||||
        <div id="tools" class="tab-content">
 | 
					        <div id="tools" class="tab-content">
 | 
				
			||||||
            <input type="text" class="search-bar" id="searchBar" placeholder="🔍 Search tools by name, description, tags, or domains..." onkeyup="filterTools()" />
 | 
					            <input type="text" class="search-bar" id="searchBar" placeholder="🔍 Search tools by name, description, tags, domains, or 'knowledgebase'..." onkeyup="filterTools()" />
 | 
				
			||||||
            <div class="tools-grid" id="toolsGrid"></div>
 | 
					            <div class="tools-grid" id="toolsGrid"></div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -521,6 +525,13 @@
 | 
				
			|||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                    <div class="form-group">
 | 
				
			||||||
 | 
					                        <div class="checkbox-item">
 | 
				
			||||||
 | 
					                            <input type="checkbox" id="knowledgebase" />
 | 
				
			||||||
 | 
					                            <label for="knowledgebase">📚 Knowledgebase Tool</label>
 | 
				
			||||||
 | 
					                        </div>
 | 
				
			||||||
 | 
					                    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    <div class="form-group">
 | 
					                    <div class="form-group">
 | 
				
			||||||
                        <label>Platforms</label>
 | 
					                        <label>Platforms</label>
 | 
				
			||||||
                        <div class="checkbox-group" id="platformsCheckbox">
 | 
					                        <div class="checkbox-group" id="platformsCheckbox">
 | 
				
			||||||
@ -589,15 +600,20 @@
 | 
				
			|||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px;">
 | 
					                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px;">
 | 
				
			||||||
 | 
					                    <button class="btn" onclick="bulkSetKnowledgebase(true)">📚 Set as Knowledgebase</button>
 | 
				
			||||||
 | 
					                    <button class="btn" onclick="bulkSetKnowledgebase(false)">📖 Remove Knowledgebase</button>
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('tags')">🗑️ Clear All Tags</button>
 | 
					                    <button class="btn" onclick="bulkClearField('tags')">🗑️ Clear All Tags</button>
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('domains')">🗑️ Clear All Domains</button>
 | 
					                    <button class="btn" onclick="bulkClearField('domains')">🗑️ Clear All Domains</button>
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('phases')">🗑️ Clear All Phases</button>
 | 
					 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('platforms')">🗑️ Clear All Platforms</button>
 | 
					 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px;">
 | 
					                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px;">
 | 
				
			||||||
 | 
					                    <button class="btn" onclick="bulkClearField('phases')">🗑️ Clear All Phases</button>
 | 
				
			||||||
 | 
					                    <button class="btn" onclick="bulkClearField('platforms')">🗑️ Clear All Platforms</button>
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('url')">🗑️ Clear All URLs</button>
 | 
					                    <button class="btn" onclick="bulkClearField('url')">🗑️ Clear All URLs</button>
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('projectUrl')">🗑️ Clear Project URLs</button>
 | 
					                    <button class="btn" onclick="bulkClearField('projectUrl')">🗑️ Clear Project URLs</button>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px;">
 | 
				
			||||||
                    <button class="btn" onclick="bulkClearField('statusUrl')">🗑️ Clear Status URLs</button>
 | 
					                    <button class="btn" onclick="bulkClearField('statusUrl')">🗑️ Clear Status URLs</button>
 | 
				
			||||||
                    <button class="btn btn-danger" onclick="bulkDelete()">🗑️ Delete Selected</button>
 | 
					                    <button class="btn btn-danger" onclick="bulkDelete()">🗑️ Delete Selected</button>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
@ -777,6 +793,9 @@ phases:
 | 
				
			|||||||
            const selfHosted = tools.filter(tool => tool.accessType === 'self-hosted').length;
 | 
					            const selfHosted = tools.filter(tool => tool.accessType === 'self-hosted').length;
 | 
				
			||||||
            document.getElementById('selfHostedCount').textContent = selfHosted;
 | 
					            document.getElementById('selfHostedCount').textContent = selfHosted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const knowledgebaseTools = tools.filter(tool => tool.knowledgebase === true).length;
 | 
				
			||||||
 | 
					            document.getElementById('knowledgebaseCount').textContent = knowledgebaseTools;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Update tag analytics
 | 
					            // Update tag analytics
 | 
				
			||||||
            updateTagAnalytics();
 | 
					            updateTagAnalytics();
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
@ -923,10 +942,14 @@ phases:
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
					            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
				
			||||||
            const tags = (tool.tags || []).map(tag => `<span class="tag">${tag}</span>`).join('');
 | 
					            const tags = (tool.tags || []).map(tag => `<span class="tag">${tag}</span>`).join('');
 | 
				
			||||||
 | 
					            const knowledgebaseIndicator = tool.knowledgebase ? '<span class="tag" style="background: #e8f5e8; color: #27ae60; font-weight: bold;">📚 Knowledgebase</span>' : '';
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            card.innerHTML = `
 | 
					            card.innerHTML = `
 | 
				
			||||||
                <h3>${tool.name}</h3>
 | 
					                <h3>${tool.name}</h3>
 | 
				
			||||||
                <div class="skill-badge ${skillClass}">${tool.skillLevel || 'intermediate'}</div>
 | 
					                <div style="margin: 5px 0;">
 | 
				
			||||||
 | 
					                    <div class="skill-badge ${skillClass}">${tool.skillLevel || 'intermediate'}</div>
 | 
				
			||||||
 | 
					                    ${knowledgebaseIndicator}
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
                <p>${tool.description}</p>
 | 
					                <p>${tool.description}</p>
 | 
				
			||||||
                <div style="margin: 10px 0;">${tags}</div>
 | 
					                <div style="margin: 10px 0;">${tags}</div>
 | 
				
			||||||
                <div style="margin-top: 15px;">
 | 
					                <div style="margin-top: 15px;">
 | 
				
			||||||
@ -944,11 +967,13 @@ phases:
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
					            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
				
			||||||
            const isSelected = selectedTools.has(index);
 | 
					            const isSelected = selectedTools.has(index);
 | 
				
			||||||
 | 
					            const knowledgebaseIndicator = tool.knowledgebase ? '<span class="tag" style="background: #e8f5e8; color: #27ae60; font-weight: bold; margin-left: 10px;">📚 KB</span>' : '';
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            card.innerHTML = `
 | 
					            card.innerHTML = `
 | 
				
			||||||
                <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 10px;">
 | 
					                <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 10px;">
 | 
				
			||||||
                    <input type="checkbox" ${isSelected ? 'checked' : ''} onchange="toggleToolSelection(${index})" />
 | 
					                    <input type="checkbox" ${isSelected ? 'checked' : ''} onchange="toggleToolSelection(${index})" />
 | 
				
			||||||
                    <h3 style="margin: 0;">${tool.name}</h3>
 | 
					                    <h3 style="margin: 0;">${tool.name}</h3>
 | 
				
			||||||
 | 
					                    ${knowledgebaseIndicator}
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="skill-badge ${skillClass}">${tool.skillLevel || 'intermediate'}</div>
 | 
					                <div class="skill-badge ${skillClass}">${tool.skillLevel || 'intermediate'}</div>
 | 
				
			||||||
                <p>${tool.description}</p>
 | 
					                <p>${tool.description}</p>
 | 
				
			||||||
@ -981,7 +1006,8 @@ phases:
 | 
				
			|||||||
                    ...(tool.platforms || []),
 | 
					                    ...(tool.platforms || []),
 | 
				
			||||||
                    tool.skillLevel || '',
 | 
					                    tool.skillLevel || '',
 | 
				
			||||||
                    tool.license || '',
 | 
					                    tool.license || '',
 | 
				
			||||||
                    tool.accessType || ''
 | 
					                    tool.accessType || '',
 | 
				
			||||||
 | 
					                    tool.knowledgebase ? 'knowledgebase' : ''
 | 
				
			||||||
                ].join(' ').toLowerCase();
 | 
					                ].join(' ').toLowerCase();
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if (searchableText.includes(searchTerm)) {
 | 
					                if (searchableText.includes(searchTerm)) {
 | 
				
			||||||
@ -1013,6 +1039,7 @@ phases:
 | 
				
			|||||||
            document.getElementById('license').value = tool.license || '';
 | 
					            document.getElementById('license').value = tool.license || '';
 | 
				
			||||||
            document.getElementById('accessType').value = tool.accessType || '';
 | 
					            document.getElementById('accessType').value = tool.accessType || '';
 | 
				
			||||||
            document.getElementById('statusUrl').value = tool.statusUrl || '';
 | 
					            document.getElementById('statusUrl').value = tool.statusUrl || '';
 | 
				
			||||||
 | 
					            document.getElementById('knowledgebase').checked = tool.knowledgebase || false;
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            // Set platforms
 | 
					            // Set platforms
 | 
				
			||||||
            const platforms = tool.platforms || [];
 | 
					            const platforms = tool.platforms || [];
 | 
				
			||||||
@ -1095,6 +1122,7 @@ phases:
 | 
				
			|||||||
                url: document.getElementById('url').value,
 | 
					                url: document.getElementById('url').value,
 | 
				
			||||||
                projectUrl: document.getElementById('projectUrl').value,
 | 
					                projectUrl: document.getElementById('projectUrl').value,
 | 
				
			||||||
                license: document.getElementById('license').value,
 | 
					                license: document.getElementById('license').value,
 | 
				
			||||||
 | 
					                knowledgebase: document.getElementById('knowledgebase').checked,
 | 
				
			||||||
                tags: getTags()
 | 
					                tags: getTags()
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1253,6 +1281,30 @@ phases:
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        function bulkSetKnowledgebase(value) {
 | 
				
			||||||
 | 
					            if (selectedTools.size === 0) {
 | 
				
			||||||
 | 
					                alert('No tools selected');
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const action = value ? 'set as knowledgebase' : 'remove knowledgebase flag from';
 | 
				
			||||||
 | 
					            if (!confirm(`Are you sure you want to ${action} ${selectedTools.size} selected tools?`)) {
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            selectedTools.forEach(index => {
 | 
				
			||||||
 | 
					                if (yamlData.tools[index]) {
 | 
				
			||||||
 | 
					                    yamlData.tools[index].knowledgebase = value;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const actionCompleted = value ? 'marked as knowledgebase' : 'removed knowledgebase flag from';
 | 
				
			||||||
 | 
					            alert(`Successfully ${actionCompleted} ${selectedTools.size} tools`);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            updateStats(); // Refresh knowledgebase count
 | 
				
			||||||
 | 
					            renderBulkGrid();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        function bulkClearField(fieldName) {
 | 
					        function bulkClearField(fieldName) {
 | 
				
			||||||
            if (selectedTools.size === 0) {
 | 
					            if (selectedTools.size === 0) {
 | 
				
			||||||
                alert('No tools selected');
 | 
					                alert('No tools selected');
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user