Skip to content

Instantly share code, notes, and snippets.

View anithegregorian's full-sized avatar
🏠
Working from home

Anirudh K Mahant anithegregorian

🏠
Working from home
View GitHub Profile
{#
/**
* @file
* Default theme implementation for a menu block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
uuid: 55bbeb97-0c89-4434-b325-08dae6f0c191
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- node.type.product
module:
- node
- user
/**
* Adds the label menu items to the given menu and parent.
*/
NodePropertiesPanel.prototype.addProperties = function () {
var ui = this.editorUi;
var editor = ui.editor;
var graph = editor.graph;
var self = this;
var cellLabel = null;
var propertiesAPI = null;
function CustomData(value) {
this.value = value;
}
var codec = new mxObjectCodec(new CustomData());
codec.encode = function (enc, obj) {
var node = enc.document.createElement('CustomData');
mxUtils.setTextContent(node, JSON.stringify(obj));
@anithegregorian
anithegregorian / mxGraphLayout.html
Last active November 22, 2021 08:51
mxGraph Layout
<main id="main">
<!-- Placeholder for sidebar contents (Stencils) -->
<aside id="geSidebarStencils" v-on:click.ctrl.alt="doGraphAction('showjsonsource')" v-on:click.ctrl.shift="doGraphAction('showxmlsource')"></aside>
<!-- Placeholder for diagram -->
<section id="geDiagramContainer"></section>
<!-- Placeholder for sidebar contents (Properties) -->
<aside id="geSidebarProperties"
CTAPI.defaultStencilsJSON = {"vendor_objects": {"title": "Vendor Objects","stencilXML": "PHNoYXBlcyBuYW1lPSJteEdyYXBoLnZvYmplY3RzIj4NCg0KCTxzaGFwZSBuYW1lPSJ2RWRnZSIgaD0iNTYiIHc9IjU2IiBhc3BlY3Q9InZhcmlhYmxlIiBzdHJva2V3aWR0aD0iaW5oZXJpdCIgbm9kZWlkPSJ2ZWRnZSIgZ3JvdXA9IlZlbmRvciBPYmplY3RzIiBncm91cGlkPSJ2ZW5kb3Jfb2JqZWN0cyI+DQoJCTxjb25uZWN0aW9ucz4NCgkJCTxjb25zdHJhaW50IHg9IjAuNSIgeT0iMCIgcGVyaW1ldGVyPSIwIiBuYW1lPSJOIi8+DQoJCQk8Y29uc3RyYWludCB4PSIwLjUiIHk9IjEiIHBlcmltZXRlcj0iMCIgbmFtZT0iUyIvPg0KCQk8L2Nvbm5lY3Rpb25zPg0KCQk8YmFja2dyb3VuZD4NCgkJCTxwYXRoPg0KCQkJCTxpbWFnZSBzcmM9InJlc291cmNlcy9zdGVuY2lscy9jcml0ZXJpb24vdmVkZ2Uuc3ZnIiB4PSIwIiB5PSIwIiB3PSI1NiIgaD0iNTYiLz4NCgkJCTwvcGF0aD4NCgkJPC9iYWNrZ3JvdW5kPg0KCQk8Zm9yZWdyb3VuZD4NCgkJCTxmaWxsc3Ryb2tlLz4NCgkJPC9mb3JlZ3JvdW5kPg0KCTwvc2hhcGU+DQoNCgk8c2hhcGUgbmFtZT0idkJvbmQiIGg9IjU2IiB3PSI1NiIgYXNwZWN0PSJ2YXJpYWJsZSIgc3Ryb2tld2lkdGg9ImluaGVyaXQiIG5vZGVpZD0idmJvbmQiIGdyb3VwPSJWZW5kb3IgT2JqZWN0cyIgZ3JvdXBpZD0idmVuZG9yX29iamVjdHMiPg0KCQk8Y29ubmVjdGlvbnM+DQoJCQk8Y29uc3RyYWludCB4PSI
CTAPI.defaultPropertiesJSON = {"vedge":[{"name":"property-select","key":"vcpu","label":"vcpu","value":2,"options":[{"text":1,"value":1},{"text":2,"value":2},{"text":3,"value":3},{"text":4,"value":4}]},{"name":"property-select","key":"memory","label":"memory","value":1024,"options":[{"text":512,"value":512},{"text":1024,"value":1024},{"text":2048,"value":2048},{"text":4096,"value":4096}]},{"name":"property-text","key":"image_src","label":"image_src","value":"https://147.75.97.143/viptela-17-2/sandbox/viptela_large2/vedge5.img"},{"name":"property-text","key":"image_dest","label":"image_dest","value":"/var/lib/libvirt/images/r1.img"},{"name":"property-parent-label","parentLabel":"vm_info"},{"name":"property-text","key":"type","label":"type","child_of":"vm_info.type","value":"viptelabatc"},{"name":"property-text","key":"hostname","label":"hostname","child_of":"vm_info.hostname","value":"vm10"},{"name":"property-text","key":"username","label":"username","child_of":"vm_info.username","value":"admin"},{"name":"prope
<script type="text/x-template" id="xtemplateMultiSelectTextControl">
<div class="form-group-parent">
<div class="form-group-children form-inline form-multi-text-select" v-for="(row_array, rindex) in property.rows">
<a class="btn btn-remove" href="javascript:void(0)" v-on:click="removeMultiSelectTextElement(rindex);">X</a>
<div class="group-children" v-for="(row, index) in row_array">
<label class="prop-label" v-if="row.label !== ''" v-text="row.label"></label>
<select
v-bind:id="row.key + index"
<!-- VueJS Plugins -->
<script type="text/javascript" src="js/vendor/libs/vue-toastr.min.js"></script>
<script type="text/javascript" src="js/vendor/deflate/pako.min.js"></script>
<script type="text/javascript" src="js/vendor/deflate/base64.js"></script>
<script type="text/javascript" src="js/vendor/jscolor/jscolor.js"></script>
<script type="text/javascript" src="js/vendor/sanitizer/sanitizer.min.js"></script>
<!-- mxGraph library extensions -->
<script type="text/javascript" src="js/vendor/extend/CTAPI.js"></script>
/**
* Creates the required containers.
*/
EditorUi.prototype.createUi = function () {
// Creates menubar
// this.menubar = (this.editor.chromeless) ? null : this.menus.createMenubar(this.createDiv('geMenubar'));
//
// if (this.menubar != null)
// {
// this.menubarContainer.appendChild(this.menubar.container);