feat: rename 3Nodes to Mycelium Nodes across codebase and documentation
This commit is contained in:
@@ -57,13 +57,13 @@ impl DocsController {
|
||||
render_template(&tmpl, "docs/getting_started.html", &ctx)
|
||||
}
|
||||
|
||||
/// Renders the 3Nodes documentation page
|
||||
pub async fn three_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
|
||||
/// Renders the Mycelium Nodes documentation page
|
||||
pub async fn mycelium_nodes(tmpl: web::Data<Tera>, session: Session) -> Result<impl Responder> {
|
||||
let mut ctx = crate::models::builders::ContextBuilder::new()
|
||||
.active_page("docs")
|
||||
.build();
|
||||
ctx.insert("active_section", "3nodes");
|
||||
|
||||
ctx.insert("active_section", "mycelium_nodes");
|
||||
|
||||
let config = get_app_config();
|
||||
ctx.insert("gitea_enabled", &config.is_gitea_enabled());
|
||||
|
||||
@@ -75,7 +75,7 @@ impl DocsController {
|
||||
}
|
||||
}
|
||||
|
||||
render_template(&tmpl, "docs/3nodes.html", &ctx)
|
||||
render_template(&tmpl, "docs/mycelium_nodes.html", &ctx)
|
||||
}
|
||||
|
||||
/// Renders the compute resources documentation page
|
||||
|
@@ -377,8 +377,8 @@ impl MarketplaceController {
|
||||
render_template(&tmpl, "marketplace/compute_resources.html", &ctx)
|
||||
}
|
||||
|
||||
/// Renders the 3Nodes marketplace page with REAL farmer nodes from database
|
||||
pub async fn three_nodes(tmpl: web::Data<Tera>, session: Session, query: web::Query<std::collections::HashMap<String, String>>) -> Result<impl Responder> {
|
||||
/// Renders the Mycelium Nodes marketplace page with REAL farmer nodes from database
|
||||
pub async fn mycelium_nodes(tmpl: web::Data<Tera>, session: Session, query: web::Query<std::collections::HashMap<String, String>>) -> Result<impl Responder> {
|
||||
// Build services using established builder pattern
|
||||
let currency_service = CurrencyService::builder()
|
||||
.build()
|
||||
@@ -395,7 +395,7 @@ impl MarketplaceController {
|
||||
// Build context using ContextBuilder pattern
|
||||
let mut ctx = crate::models::builders::ContextBuilder::new()
|
||||
.active_page("marketplace")
|
||||
.active_section("three_nodes")
|
||||
.active_section("mycelium_nodes")
|
||||
.user_if_available(&session)
|
||||
.build();
|
||||
|
||||
@@ -484,7 +484,7 @@ impl MarketplaceController {
|
||||
ctx.insert("node_statistics", &node_marketplace_service.get_capacity_statistics());
|
||||
ctx.insert("available_regions", &node_marketplace_service.get_available_regions());
|
||||
|
||||
render_template(&tmpl, "marketplace/three_nodes.html", &ctx)
|
||||
render_template(&tmpl, "marketplace/mycelium_nodes.html", &ctx)
|
||||
}
|
||||
|
||||
/// Renders the gateways marketplace page
|
||||
|
@@ -454,7 +454,7 @@ impl Product {
|
||||
let mut product = Product {
|
||||
id: format!("fullnode_{}", node.id),
|
||||
name: format!("Full Node: {}", node.name),
|
||||
category_id: "3nodes".to_string(),
|
||||
category_id: "mycelium_nodes".to_string(),
|
||||
description: format!(
|
||||
"Exclusive access to {} with {} CPU cores, {}GB RAM, {}GB storage in {}",
|
||||
node.name, node.capacity.cpu_cores, node.capacity.memory_gb,
|
||||
|
@@ -46,7 +46,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
||||
// Marketplace routes
|
||||
.route("/marketplace", web::get().to(MarketplaceController::dashboard))
|
||||
.route("/marketplace/compute", web::get().to(MarketplaceController::compute_resources))
|
||||
.route("/marketplace/3nodes", web::get().to(MarketplaceController::three_nodes))
|
||||
.route("/marketplace/mycelium_nodes", web::get().to(MarketplaceController::mycelium_nodes))
|
||||
.route("/marketplace/gateways", web::get().to(MarketplaceController::gateways))
|
||||
.route("/marketplace/applications", web::get().to(MarketplaceController::applications))
|
||||
.route("/marketplace/services", web::get().to(MarketplaceController::services))
|
||||
@@ -245,7 +245,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
||||
// Documentation routes
|
||||
.route("/docs", web::get().to(DocsController::index))
|
||||
.route("/docs/getting-started", web::get().to(DocsController::getting_started))
|
||||
.route("/docs/3nodes", web::get().to(DocsController::three_nodes))
|
||||
.route("/docs/mycelium_nodes", web::get().to(DocsController::mycelium_nodes))
|
||||
.route("/docs/compute", web::get().to(DocsController::compute))
|
||||
.route("/docs/gateways", web::get().to(DocsController::gateways))
|
||||
.route("/docs/applications", web::get().to(DocsController::applications))
|
||||
|
@@ -110,7 +110,7 @@ impl NodeMarketplaceService {
|
||||
|
||||
for node in nodes {
|
||||
// Filter by node type and status
|
||||
if node.node_type == "3Node" && (self.include_offline_nodes || self.is_node_online(&node)) {
|
||||
if node.node_type == "MyceliumNode" && (self.include_offline_nodes || self.is_node_online(&node)) {
|
||||
if let Ok(product) = self.convert_node_to_product(&node, &user_email) {
|
||||
all_products.push(product);
|
||||
}
|
||||
@@ -205,7 +205,7 @@ impl NodeMarketplaceService {
|
||||
|
||||
// Create metadata with location
|
||||
let metadata = crate::models::product::ProductMetadata {
|
||||
tags: vec!["3node".to_string(), "hardware".to_string(), node.region.clone()],
|
||||
tags: vec!["mycelium_node".to_string(), "hardware".to_string(), node.region.clone()],
|
||||
location: Some(node.location.clone()),
|
||||
rating: Some(node.health_score / 20.0), // Convert health score to 5-star rating
|
||||
review_count: 0,
|
||||
@@ -216,7 +216,7 @@ impl NodeMarketplaceService {
|
||||
let mut builder = crate::models::product::Product::builder()
|
||||
.id(format!("node_{}", node.id))
|
||||
.name(format!("{} - {}", node.name, farmer_display_name))
|
||||
.description(format!("3Node with {} CPU cores, {} GB RAM, {} GB storage in {}. Uptime: {:.1}%, Health Score: {:.1}",
|
||||
.description(format!("Mycelium Node with {} CPU cores, {} GB RAM, {} GB storage in {}. Uptime: {:.1}%, Health Score: {:.1}",
|
||||
node.capacity.cpu_cores,
|
||||
node.capacity.memory_gb,
|
||||
node.capacity.storage_gb,
|
||||
|
@@ -49,7 +49,7 @@
|
||||
<td><strong>3Nodes</strong></td>
|
||||
<td>Physical computing hardware marketplace</td>
|
||||
<td>Credits transferred based on hardware value</td>
|
||||
<td><a href="/docs/3nodes" class="btn btn-sm btn-outline-primary">Learn More</a></td>
|
||||
<td><a href="/docs/mycelium_nodes" class="btn btn-sm btn-outline-primary">Learn More</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Mycelium Gateways</strong></td>
|
||||
|
@@ -40,7 +40,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if active_section == '3nodes' %}active{% endif %}" href="/docs/3nodes">
|
||||
<a class="nav-link {% if active_section == '3nodes' %}active{% endif %}" href="/docs/mycelium_nodes">
|
||||
<i class="bi bi-hdd-rack me-1"></i>
|
||||
3Nodes
|
||||
</a>
|
||||
|
@@ -353,7 +353,7 @@
|
||||
<h2><i class="bi bi-question-circle me-2"></i>Ready to Buy or Sell 3Nodes?</h2>
|
||||
<p class="lead">Visit the Project Mycelium 3Nodes section to start exploring options.</p>
|
||||
<div class="mt-3">
|
||||
<a href="/marketplace/3nodes" class="btn btn-primary me-2">Explore 3Nodes Marketplace</a>
|
||||
<a href="/marketplace/mycelium_nodes" class="btn btn-primary me-2">Explore Mycelium Nodes Marketplace</a>
|
||||
<a href="/docs" class="btn btn-outline-secondary">Back to Documentation</a>
|
||||
</div>
|
||||
</div>
|
@@ -49,7 +49,7 @@
|
||||
<i class="bi bi-hdd-rack text-primary display-4 mb-3"></i>
|
||||
<h3>3Nodes</h3>
|
||||
<p>Buy and sell physical computing hardware to support the Grid.</p>
|
||||
<a href="/marketplace/3nodes" class="btn btn-sm btn-outline-primary">Explore</a>
|
||||
<a href="/marketplace/mycelium_nodes" class="btn btn-sm btn-outline-primary">Explore</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -23,7 +23,7 @@
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">3Nodes</h5>
|
||||
<p class="card-text">120+ certified nodes</p>
|
||||
<a href="/marketplace/3nodes" class="text-white">Browse 3Nodes →</a>
|
||||
<a href="/marketplace/mycelium_nodes" class="text-white">Browse Mycelium Nodes →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -34,7 +34,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if active_section == 'three_nodes' %}active{% endif %}" href="/marketplace/3nodes">
|
||||
<a class="nav-link {% if active_section == 'three_nodes' %}active{% endif %}" href="/marketplace/mycelium_nodes">
|
||||
<i class="bi bi-hdd-rack me-1"></i>
|
||||
3Nodes
|
||||
</a>
|
||||
|
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="col-md-3 d-flex align-items-end">
|
||||
<button type="submit" class="btn btn-primary me-2">Apply Filters</button>
|
||||
<a href="/marketplace/3nodes" class="btn btn-outline-secondary">Clear</a>
|
||||
<a href="/marketplace/mycelium_nodes" class="btn btn-outline-secondary">Clear</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -184,7 +184,7 @@
|
||||
data-product-name="{{ product_data.product.name }}"
|
||||
data-unit-price="{{ product_data.price.display_amount }}"
|
||||
data-currency="{{ product_data.price.display_currency }}"
|
||||
data-category="3nodes">
|
||||
data-category="mycelium_nodes">
|
||||
<i class="bi bi-lightning-charge me-1"></i>Buy Now
|
||||
</button>
|
||||
<button class="btn btn-primary btn-sm add-to-cart-btn"
|
Reference in New Issue
Block a user