-
Notifications
You must be signed in to change notification settings - Fork 702
setup for contributed models #2217
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
182fffa
setup for contributed models
vishalvivekm 2ad967b
Apply suggestions from code review
vishalvivekm a5dc223
updates
vishalvivekm 953a1e1
Apply suggestions from code review
vishalvivekm 052b059
Apply suggestions from code review
vishalvivekm ea1f8c2
Apply suggestions from code review
vishalvivekm 3685c59
Update _includes/custom-modal.html
vishalvivekm f75f2c0
Update _includes/custom-modal.html
vishalvivekm 16c4df5
Update _includes/custom-modal.html
vishalvivekm 6bf7164
Update _includes/custom-modal.html
vishalvivekm 7d75f0b
Merge branch 'master' into custommodel
vishalvivekm d958255
Update _includes/custom-modal.html
vishalvivekm 0995001
Update _custom-model-definition-template.md
vishalvivekm c04eb67
Update _includes/custom-modal.html
vishalvivekm ccc7282
Merge branch 'master' into custommodel
vishalvivekm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
<div class="card link" onclick="openCustomModal('{{ include.type }}')"> | ||
<div class="card-inner"> | ||
<div class="front"> | ||
<h4 class="pattern-name">Publish Your Own {{ include.type }}</h4> | ||
<div class="pattern-image-container"> | ||
<img | ||
class="pattern-image" | ||
style="width: 40%;" | ||
src="{{site.baseurl}}/assets/images/plus.svg" | ||
alt="Publish Your Own {{ include.type }}" | ||
loading="lazy" | ||
/> | ||
</div> | ||
</div> | ||
<div class="back"></div> | ||
</div> | ||
</div> | ||
|
||
<div id="customModal-{{ include.type }}" class="modal custom-modal"> | ||
<div class="custom-modal-content"> | ||
<span class="close-modal" onclick="closeCustomModal('{{ include.type }}')">×</span> | ||
<div> | ||
<h2>Publish Your Own {{ include.type }}</h2> | ||
{% if include.type == "Model" %} | ||
<div class="custom-modal-body"> | ||
<p> | ||
Using | ||
<a href="https://playground.meshery.io/settings?settingsCategory=Registry&tab=Models" target="_blank">Meshery's Registry</a>, | ||
you can create and import models to define the infrastructure components | ||
and their relationships in your cloud-native environments. | ||
</p> | ||
|
||
<p> | ||
Meshery offers two primary ways to bring models into your system: Create and Import. | ||
</p> | ||
|
||
<dl> | ||
<dt>Create:</dt> | ||
<dd> | ||
The recommended approach if you're starting fresh — it guides you through building a model | ||
step by step using an intuitive UI wizard. | ||
<a href="https://docs.meshery.io/guides/configuration-management/creating-models#create-models">Learn more about creating models</a> | ||
</dd> | ||
|
||
<dt>Import:</dt> | ||
<dd> | ||
Ideal when you already have a model definition file (e.g., JSON, CSV) and | ||
simply want to bring it into Meshery. | ||
</dd> | ||
<dt>Publish your model to catalog:</dt> | ||
<dd> | ||
<ul> | ||
<li>Fork the <code>meshery/meshery.io</code> repository.</li> | ||
<li>Create a new branch in your fork of the <code>meshery/meshery.io</code> repository.</li> | ||
<li> | ||
Add your model definition (see | ||
<a href="https://github.com/meshery/meshery.io/blob/master/collections/_custom-models/_custom-model-definition-template.md" target="_blank">template</a> | ||
for reference) to the <code>collections/_custom-models</code> directory. | ||
</li> | ||
<li>Add your model oci artifact file to the <code>assets/modelfiles</code> directory.</li> | ||
<li>Create a pull request to the <code>meshery/meshery.io</code> repository.</li> | ||
<li>Once your pull request is merged, your model will be available in the next Meshery release.</li> | ||
</ul> | ||
</dd> | ||
</dl> | ||
|
||
<div style="text-align: center; margin-top: 2rem;"> | ||
<a href="https://docs.meshery.io/guides/configuration-management/creating-models#create-models" class="create-button"> | ||
View Complete Tutorial | ||
</a> | ||
</div> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
function openCustomModal(type) { | ||
document.getElementById(`customModal-${type}`).style.display = "block"; | ||
document.body.classList.add("modal-open"); | ||
} | ||
|
||
function closeCustomModal(type) { | ||
document.getElementById(`customModal-${type}`).style.display = "none"; | ||
document.body.classList.remove("modal-open"); | ||
} | ||
|
||
window.onclick = function(event) { | ||
const modals = document.getElementsByClassName('modal'); | ||
for (let i = 0; i < modals.length; i++) { | ||
if (event.target === modals[i]) { | ||
modals[i].style.display = "none"; | ||
document.body.classList.remove("modal-open"); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
.modal { | ||
display: none; | ||
position: fixed; | ||
z-index: 1000; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgba(0,0,0,0.7); | ||
animation: fadeIn 0.3s; | ||
} | ||
|
||
.custom-modal-content { | ||
background-color: #1e1e1e; | ||
margin: 10% auto; | ||
padding: 2rem; | ||
border-radius: 8px; | ||
width: 80%; | ||
max-width: 700px; | ||
box-shadow: 0 0 25px rgba(0,211,169,0.3); | ||
border: 1px solid rgba(0,211,169,0.2); | ||
position: relative; | ||
animation: slideIn 0.4s; | ||
} | ||
|
||
.close-modal { | ||
color: #aaa; | ||
float: right; | ||
font-size: 28px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
transition: color 0.2s; | ||
} | ||
|
||
.close-modal:hover { | ||
color: #00d3a9; | ||
} | ||
|
||
.custom-modal-body { | ||
margin-top: 1.5rem; | ||
color: #f0f0f0; | ||
} | ||
|
||
|
||
.custom-modal-body dt { | ||
color: #00d3a9; | ||
font-weight: bold; | ||
margin-top: 1rem; | ||
} | ||
|
||
.custom-modal-body dd { | ||
margin-left: 0; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.create-button { | ||
background-color: #00d3a9; | ||
color: #1a1a1a; | ||
border: none; | ||
padding: 0.75rem 2rem; | ||
border-radius: 4px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
transition: background-color 0.2s; | ||
text-decoration: none; | ||
display: inline-block; | ||
} | ||
|
||
.create-button:hover { | ||
background-color: #00b890; | ||
vishalvivekm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
body.modal-open { | ||
overflow: hidden; | ||
} | ||
|
||
@keyframes fadeIn { | ||
from { opacity: 0; } | ||
to { opacity: 1; } | ||
} | ||
|
||
@keyframes slideIn { | ||
from { transform: translateY(-50px); opacity: 0; } | ||
to { transform: translateY(0); opacity: 1; } | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.custom-modal-content { | ||
width: 90%; | ||
padding: 1rem; | ||
margin: 20% auto; | ||
} | ||
} | ||
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions
57
collections/_custom-models/_custom-model-definition-template.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
layout: single-page-model | ||
item-type: model | ||
name: # TODO: Provide the unique name for this model | ||
subtitle: # TODO: Provide a brief subtitle for this model | ||
colorIcon: /assets/images/custom-integration/[YOUR-MODEL-NAME]/icons/color/[YOUR-MODEL-NAME]-color.svg # TODO: Replace with actual path | ||
whiteIcon: /assets/images/custom-integration/[YOUR-MODEL-NAME]/icons/white/[YOUR-MODEL-NAME]-white.svg # TODO: Replace with actual path | ||
docURL: https://docs.meshery.io/extensibility/integrations/[your-model-name] # TODO: Replace with actual documentation URL | ||
description: | ||
category: # e.g. Provisioning. TODO: Specify category for this model | ||
subcategory: # e.g. Security & Compliance. TODO: Specify subcategory for this model | ||
registrant: # TODO: Specify the registrant (e.g., Artifact Hub, Community, Meshery Catalog, etc.) | ||
components: | ||
- name: apisix-route | ||
colorIcon: assets/images/integration/apisix/components/apisix-route/icons/color/apisix-route-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-route/icons/white/apisix-route-white.svg | ||
description: | ||
- name: apisix-cluster-config | ||
colorIcon: assets/images/integration/apisix/components/apisix-cluster-config/icons/color/apisix-cluster-config-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-cluster-config/icons/white/apisix-cluster-config-white.svg | ||
description: | ||
- name: apisix-consumer | ||
colorIcon: assets/images/integration/apisix/components/apisix-consumer/icons/color/apisix-consumer-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-consumer/icons/white/apisix-consumer-white.svg | ||
description: | ||
- name: apisix-global-rule | ||
colorIcon: assets/images/integration/apisix/components/apisix-global-rule/icons/color/apisix-global-rule-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-global-rule/icons/white/apisix-global-rule-white.svg | ||
description: | ||
- name: apisix-plugin-config | ||
colorIcon: assets/images/integration/apisix/components/apisix-plugin-config/icons/color/apisix-plugin-config-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-plugin-config/icons/white/apisix-plugin-config-white.svg | ||
description: | ||
- name: apisix-tls | ||
colorIcon: assets/images/integration/apisix/components/apisix-tls/icons/color/apisix-tls-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-tls/icons/white/apisix-tls-white.svg | ||
description: | ||
- name: apisix-upstream | ||
colorIcon: assets/images/integration/apisix/components/apisix-upstream/icons/color/apisix-upstream-color.svg | ||
whiteIcon: assets/images/integration/apisix/components/apisix-upstream/icons/white/apisix-upstream-white.svg | ||
description: | ||
componentsCount: # 7 | ||
|
||
relationships: | ||
# relationshipsCount: 0 # TODO: Manually update this count if required by the layout, or remove if calculated dynamically. | ||
featureList: [ | ||
vishalvivekm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# example list of features | ||
|
||
"Dynamic routing and load balancing", | ||
"Authentication and authorization", | ||
"Observability and analytics" | ||
] | ||
howItWorks: # "Integrates APISIX configurations" | ||
|
||
howItWorksDetails: # "Streamlined API gateway management and enhanced traffic routing in Kubernetes" | ||
|
||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.