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-label">Self-Hosted</div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="stat-card">
 | 
			
		||||
                        <div class="stat-number" id="knowledgebaseCount">0</div>
 | 
			
		||||
                        <div class="stat-label">Knowledgebase</div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="form-section">
 | 
			
		||||
@ -460,7 +464,7 @@
 | 
			
		||||
 | 
			
		||||
        <!-- Tools Tab -->
 | 
			
		||||
        <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>
 | 
			
		||||
 | 
			
		||||
@ -521,6 +525,13 @@
 | 
			
		||||
                        </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">
 | 
			
		||||
                        <label>Platforms</label>
 | 
			
		||||
                        <div class="checkbox-group" id="platformsCheckbox">
 | 
			
		||||
@ -589,15 +600,20 @@
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <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('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 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('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 btn-danger" onclick="bulkDelete()">🗑️ Delete Selected</button>
 | 
			
		||||
                </div>
 | 
			
		||||
@ -777,6 +793,9 @@ phases:
 | 
			
		||||
            const selfHosted = tools.filter(tool => tool.accessType === 'self-hosted').length;
 | 
			
		||||
            document.getElementById('selfHostedCount').textContent = selfHosted;
 | 
			
		||||
 | 
			
		||||
            const knowledgebaseTools = tools.filter(tool => tool.knowledgebase === true).length;
 | 
			
		||||
            document.getElementById('knowledgebaseCount').textContent = knowledgebaseTools;
 | 
			
		||||
 | 
			
		||||
            // Update tag analytics
 | 
			
		||||
            updateTagAnalytics();
 | 
			
		||||
            
 | 
			
		||||
@ -923,10 +942,14 @@ phases:
 | 
			
		||||
            
 | 
			
		||||
            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
			
		||||
            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 = `
 | 
			
		||||
                <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>
 | 
			
		||||
                <div style="margin: 10px 0;">${tags}</div>
 | 
			
		||||
                <div style="margin-top: 15px;">
 | 
			
		||||
@ -944,11 +967,13 @@ phases:
 | 
			
		||||
            
 | 
			
		||||
            const skillClass = `skill-${tool.skillLevel || 'intermediate'}`;
 | 
			
		||||
            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 = `
 | 
			
		||||
                <div style="display: flex; align-items: center; gap: 10px; margin-bottom: 10px;">
 | 
			
		||||
                    <input type="checkbox" ${isSelected ? 'checked' : ''} onchange="toggleToolSelection(${index})" />
 | 
			
		||||
                    <h3 style="margin: 0;">${tool.name}</h3>
 | 
			
		||||
                    ${knowledgebaseIndicator}
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="skill-badge ${skillClass}">${tool.skillLevel || 'intermediate'}</div>
 | 
			
		||||
                <p>${tool.description}</p>
 | 
			
		||||
@ -981,7 +1006,8 @@ phases:
 | 
			
		||||
                    ...(tool.platforms || []),
 | 
			
		||||
                    tool.skillLevel || '',
 | 
			
		||||
                    tool.license || '',
 | 
			
		||||
                    tool.accessType || ''
 | 
			
		||||
                    tool.accessType || '',
 | 
			
		||||
                    tool.knowledgebase ? 'knowledgebase' : ''
 | 
			
		||||
                ].join(' ').toLowerCase();
 | 
			
		||||
                
 | 
			
		||||
                if (searchableText.includes(searchTerm)) {
 | 
			
		||||
@ -1013,6 +1039,7 @@ phases:
 | 
			
		||||
            document.getElementById('license').value = tool.license || '';
 | 
			
		||||
            document.getElementById('accessType').value = tool.accessType || '';
 | 
			
		||||
            document.getElementById('statusUrl').value = tool.statusUrl || '';
 | 
			
		||||
            document.getElementById('knowledgebase').checked = tool.knowledgebase || false;
 | 
			
		||||
            
 | 
			
		||||
            // Set platforms
 | 
			
		||||
            const platforms = tool.platforms || [];
 | 
			
		||||
@ -1095,6 +1122,7 @@ phases:
 | 
			
		||||
                url: document.getElementById('url').value,
 | 
			
		||||
                projectUrl: document.getElementById('projectUrl').value,
 | 
			
		||||
                license: document.getElementById('license').value,
 | 
			
		||||
                knowledgebase: document.getElementById('knowledgebase').checked,
 | 
			
		||||
                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) {
 | 
			
		||||
            if (selectedTools.size === 0) {
 | 
			
		||||
                alert('No tools selected');
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user