all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package
@ 2021-05-28 12:13 Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 1/3] Toolkit: move defaultDownloadServerUrl override to panel/RRDChart Dominik Csapak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dominik Csapak @ 2021-05-28 12:13 UTC (permalink / raw)
  To: pve-devel

intended as build-dependency
contains the apiviewer (will be used for all -docs packages),
and Toolkit.js which will be used for the prune-simulator and
lto-barcode-generator

Dominik Csapak (3):
  Toolkit: move defaultDownloadServerUrl override to panel/RRDChart
  add api-viewer source
  add proxmox-widget-toolkit-dev package

 Makefile                                      |  19 +-
 debian/control                                |   7 +
 .../{docs => proxmox-widget-toolkit-dev.docs} |   0
 debian/proxmox-widget-toolkit-dev.install     |   2 +
 debian/proxmox-widget-toolkit.docs            |   1 +
 debian/proxmox-widget-toolkit.install         |   1 +
 src/Toolkit.js                                |   3 -
 src/api-viewer/APIVIEWER.js                   | 529 ++++++++++++++++++
 src/panel/RRDChart.js                         |   3 +
 9 files changed, 554 insertions(+), 11 deletions(-)
 rename debian/{docs => proxmox-widget-toolkit-dev.docs} (100%)
 create mode 100644 debian/proxmox-widget-toolkit-dev.install
 create mode 100644 debian/proxmox-widget-toolkit.docs
 create mode 100644 debian/proxmox-widget-toolkit.install
 create mode 100644 src/api-viewer/APIVIEWER.js

-- 
2.20.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH widget-toolkit 1/3] Toolkit: move defaultDownloadServerUrl override to panel/RRDChart
  2021-05-28 12:13 [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package Dominik Csapak
@ 2021-05-28 12:13 ` Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 2/3] add api-viewer source Dominik Csapak
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2021-05-28 12:13 UTC (permalink / raw)
  To: pve-devel

not all users of Toolkit.js have the charts lib loaded, which means
the class does not exist then.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/Toolkit.js        | 3 ---
 src/panel/RRDChart.js | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6f1aee9..a08af4e 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -664,9 +664,6 @@ Ext.define('Proxmox.selection.CheckboxModel', {
     },
 });
 
-// override the download server url globally, for privacy reasons
-Ext.draw.Container.prototype.defaultDownloadServerUrl = "-";
-
 // stop nulling of properties
 Ext.define('Proxmox.Component', {
     override: 'Ext.Component',
diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
index 517c45d..d63170e 100644
--- a/src/panel/RRDChart.js
+++ b/src/panel/RRDChart.js
@@ -1,3 +1,6 @@
+// override the download server url globally, for privacy reasons
+Ext.draw.Container.prototype.defaultDownloadServerUrl = "-";
+
 Ext.define('Proxmox.chart.axis.segmenter.NumericBase2', {
     extend: 'Ext.chart.axis.segmenter.Numeric',
     alias: 'segmenter.numericBase2',
-- 
2.20.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH widget-toolkit 2/3] add api-viewer source
  2021-05-28 12:13 [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 1/3] Toolkit: move defaultDownloadServerUrl override to panel/RRDChart Dominik Csapak
@ 2021-05-28 12:13 ` Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 3/3] add proxmox-widget-toolkit-dev package Dominik Csapak
  2021-06-02 14:13 ` [pve-devel] applied-series: [PATCH widget-toolkit 0/3] " Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2021-05-28 12:13 UTC (permalink / raw)
  To: pve-devel

so that we can reuse it across products
source was 'pbs' since that had the most features (http upgrade check)

a few changes to combine pve/pbs/pmg:
* use an optional 'cliusage' function it it exists to determine CLI usage
* check allowtoken for undefined to see if it is allowed or not
* use 'pmxapi' instead of pbs/pmg/pveapi
* rename all occurrences of 'pve' to 'pmx'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/api-viewer/APIVIEWER.js | 529 ++++++++++++++++++++++++++++++++++++
 1 file changed, 529 insertions(+)
 create mode 100644 src/api-viewer/APIVIEWER.js

diff --git a/src/api-viewer/APIVIEWER.js b/src/api-viewer/APIVIEWER.js
new file mode 100644
index 0000000..c2864ed
--- /dev/null
+++ b/src/api-viewer/APIVIEWER.js
@@ -0,0 +1,529 @@
+// avoid errors when running without development tools
+if (!Ext.isDefined(Ext.global.console)) {
+    var console = {
+        dir: function() {},
+        log: function() {}
+    };
+}
+
+Ext.onReady(function() {
+
+    Ext.define('pmx-param-schema', {
+        extend: 'Ext.data.Model',
+        fields:  [
+	    'name', 'type', 'typetext', 'description', 'verbose_description',
+	    'enum', 'minimum', 'maximum', 'minLength', 'maxLength',
+	    'pattern', 'title', 'requires', 'format', 'default',
+	    'disallow', 'extends', 'links',
+	    {
+		name: 'optional',
+		type: 'boolean'
+	    }
+	]
+    });
+
+    var store = Ext.define('pmx-updated-treestore', {
+	extend: 'Ext.data.TreeStore',
+	model: Ext.define('pmx-api-doc', {
+            extend: 'Ext.data.Model',
+            fields:  [
+		'path', 'info', 'text',
+	    ]
+	}),
+        proxy: {
+            type: 'memory',
+            data: pmxapi
+        },
+        sorters: [{
+            property: 'leaf',
+            direction: 'ASC'
+        }, {
+            property: 'text',
+            direction: 'ASC'
+	}],
+	filterer: 'bottomup',
+	doFilter: function(node) {
+	    this.filterNodes(node, this.getFilters().getFilterFn(), true);
+	},
+
+	filterNodes: function(node, filterFn, parentVisible) {
+	    var me = this,
+		bottomUpFiltering = me.filterer === 'bottomup',
+		match = filterFn(node) && parentVisible || (node.isRoot() && !me.getRootVisible()),
+		childNodes = node.childNodes,
+		len = childNodes && childNodes.length, i, matchingChildren;
+
+	    if (len) {
+		for (i = 0; i < len; ++i) {
+		    matchingChildren = me.filterNodes(childNodes[i], filterFn, match || bottomUpFiltering) || matchingChildren;
+		}
+		if (bottomUpFiltering) {
+		    match = matchingChildren || match;
+		}
+	    }
+
+	    node.set("visible", match, me._silentOptions);
+	    return match;
+	},
+
+    }).create();
+
+    var render_description = function(value, metaData, record) {
+	var pdef = record.data;
+
+	value = pdef.verbose_description || value;
+
+	// TODO: try to render asciidoc correctly
+
+	metaData.style = 'white-space:pre-wrap;'
+
+	return Ext.htmlEncode(value);
+    };
+
+    var render_type = function(value, metaData, record) {
+	var pdef = record.data;
+
+	return pdef['enum'] ? 'enum' : (pdef.type || 'string');
+    };
+
+    let render_simple_format = function(pdef, type_fallback) {
+	if (pdef.typetext)
+	    return pdef.typetext;
+
+	if (pdef['enum'])
+	    return pdef['enum'].join(' | ');
+
+	if (pdef.format)
+	    return pdef.format;
+
+	if (pdef.pattern)
+	    return pdef.pattern;
+
+	if (pdef.type === 'boolean')
+	    return `<true|false>`;
+
+	if (type_fallback && pdef.type)
+	    return `<${pdef.type}>`;
+
+	return;
+    };
+
+    let render_format = function(value, metaData, record) {
+	let pdef = record.data;
+
+	metaData.style = 'white-space:normal;'
+
+	if (pdef.type === 'array' && pdef.items) {
+	    let format = render_simple_format(pdef.items, true);
+	    return `[${Ext.htmlEncode(format)}, ...]`;
+	}
+
+	return Ext.htmlEncode(render_simple_format(pdef) || '');
+    };
+
+    var real_path = function(path) {
+	return path.replace(/^.*\/_upgrade_(\/)?/, "/");
+    };
+
+    var permission_text = function(permission) {
+	let permhtml = "";
+
+	if (permission.user) {
+	    if (!permission.description) {
+		if (permission.user === 'world') {
+		    permhtml += "Accessible without any authentication.";
+		} else if (permission.user === 'all') {
+		    permhtml += "Accessible by all authenticated users.";
+		} else {
+		    permhtml += 'Onyl accessible by user "' +
+			permission.user + '"';
+		}
+	    }
+	} else if (permission.check) {
+	    permhtml += "<pre>Check: " +
+		Ext.htmlEncode(Ext.JSON.encode(permission.check))  + "</pre>";
+	} else if (permission.userParam) {
+	    permhtml += `<div>Check if user matches parameter '${permission.userParam}'`;
+	} else if (permission.or) {
+	    permhtml += "<div>Or<div style='padding-left: 10px;'>";
+	    Ext.Array.each(permission.or, function(sub_permission) {
+		permhtml += permission_text(sub_permission);
+	    })
+	    permhtml += "</div></div>";
+	} else if (permission.and) {
+	    permhtml += "<div>And<div style='padding-left: 10px;'>";
+	    Ext.Array.each(permission.and, function(sub_permission) {
+		permhtml += permission_text(sub_permission);
+	    })
+	    permhtml += "</div></div>";
+	} else {
+	    //console.log(permission);
+	    permhtml += "Unknown syntax!";
+	}
+
+	return permhtml;
+    };
+
+    var render_docu = function(data) {
+	var md = data.info;
+
+	// console.dir(data);
+
+	var items = [];
+
+	var clicmdhash = {
+	    GET: 'get',
+	    POST: 'create',
+	    PUT: 'set',
+	    DELETE: 'delete'
+	};
+
+	Ext.Array.each(['GET', 'POST', 'PUT', 'DELETE'], function(method) {
+	    var info = md[method];
+	    if (info) {
+
+		var usage = "";
+
+		usage += "<table><tr><td>HTTP:&nbsp;&nbsp;&nbsp;</td><td>"
+		    + method + " " + real_path("/api2/json" + data.path) + "</td></tr>";
+
+		if (typeof cliusage === 'function') {
+		    usage += cliusage(method, real_path(data.path));
+		}
+
+		var sections = [
+		    {
+			title: 'Description',
+			html: Ext.htmlEncode(info.description),
+			bodyPadding: 10
+		    },
+		    {
+			title: 'Usage',
+			html: usage,
+			bodyPadding: 10
+		    }
+		];
+
+		if (info.parameters && info.parameters.properties) {
+
+		    var pstore = Ext.create('Ext.data.Store', {
+			model: 'pmx-param-schema',
+			proxy: {
+			    type: 'memory'
+			},
+			groupField: 'optional',
+			sorters: [
+			    {
+				property: 'name',
+				direction: 'ASC'
+			    }
+			]
+		    });
+
+		    Ext.Object.each(info.parameters.properties, function(name, pdef) {
+			pdef.name = name;
+			pstore.add(pdef);
+		    });
+
+		    pstore.sort();
+
+		    var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
+			enableGroupingMenu: false,
+			groupHeaderTpl: '<tpl if="groupValue">Optional</tpl><tpl if="!groupValue">Required</tpl>'
+		    });
+
+		    sections.push({
+			xtype: 'gridpanel',
+			title: 'Parameters',
+			features: [groupingFeature],
+			store: pstore,
+			viewConfig: {
+			    trackOver: false,
+			    stripeRows: true
+			},
+			columns: [
+			    {
+				header: 'Name',
+				dataIndex: 'name',
+				flex: 1
+			    },
+			    {
+				header: 'Type',
+				dataIndex: 'type',
+				renderer: render_type,
+				flex: 1
+			    },
+			    {
+				header: 'Default',
+				dataIndex: 'default',
+				flex: 1
+			    },
+			    {
+				header: 'Format',
+				dataIndex: 'type',
+				renderer: render_format,
+				flex: 2
+			    },
+			    {
+				header: 'Description',
+				dataIndex: 'description',
+				renderer: render_description,
+				flex: 6
+			    }
+			]
+		    });
+
+		}
+
+		if (info.returns) {
+
+		    var retinf = info.returns;
+		    var rtype = retinf.type;
+		    if (!rtype && retinf.items)
+			rtype = 'array';
+		    if (!rtype)
+			rtype = 'object';
+
+		    var rpstore = Ext.create('Ext.data.Store', {
+			model: 'pmx-param-schema',
+			proxy: {
+			    type: 'memory'
+			},
+			groupField: 'optional',
+			sorters: [
+			    {
+				property: 'name',
+				direction: 'ASC'
+			   }
+			]
+		    });
+
+		    var properties;
+		    if (rtype === 'array' && retinf.items.properties) {
+			properties = retinf.items.properties;
+		    }
+
+		    if (rtype === 'object' && retinf.properties) {
+			properties = retinf.properties;
+		    }
+
+		    Ext.Object.each(properties, function(name, pdef) {
+			pdef.name = name;
+			rpstore.add(pdef);
+		    });
+
+		    rpstore.sort();
+
+		    var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
+			enableGroupingMenu: false,
+			groupHeaderTpl: '<tpl if="groupValue">Optional</tpl><tpl if="!groupValue">Obligatory</tpl>'
+		    });
+		    var returnhtml;
+		    if (retinf.items) {
+			returnhtml = '<pre>items: ' + Ext.htmlEncode(JSON.stringify(retinf.items, null, 4)) + '</pre>';
+		    }
+
+		    if (retinf.properties) {
+			returnhtml = returnhtml || '';
+			returnhtml += '<pre>properties:' + Ext.htmlEncode(JSON.stringify(retinf.properties, null, 4)) + '</pre>';
+		    }
+
+		    var rawSection = Ext.create('Ext.panel.Panel', {
+			bodyPadding: '0px 10px 10px 10px',
+			html: returnhtml,
+			hidden: true
+		    });
+
+		    sections.push({
+			xtype: 'gridpanel',
+			title: 'Returns: ' + rtype,
+			features: [groupingFeature],
+			store: rpstore,
+			viewConfig: {
+			    trackOver: false,
+			    stripeRows: true
+			},
+		    columns: [
+			{
+			    header: 'Name',
+			    dataIndex: 'name',
+			    flex: 1
+			},
+			{
+			    header: 'Type',
+			    dataIndex: 'type',
+			    renderer: render_type,
+			    flex: 1
+			},
+			{
+			    header: 'Default',
+			    dataIndex: 'default',
+			    flex: 1
+			},
+			{
+			    header: 'Format',
+			    dataIndex: 'type',
+			    renderer: render_format,
+			    flex: 2
+			},
+			{
+			    header: 'Description',
+			    dataIndex: 'description',
+			    renderer: render_description,
+			    flex: 6
+			}
+		    ],
+		    bbar: [
+			{
+			    xtype: 'button',
+			    text: 'Show RAW',
+			    handler: function(btn) {
+				rawSection.setVisible(!rawSection.isVisible());
+				btn.setText(rawSection.isVisible() ? 'Hide RAW' : 'Show RAW');
+			    }}
+		    ]
+		});
+
+		sections.push(rawSection);
+
+
+		}
+
+		if (!data.path.match(/\/_upgrade_/)) {
+		    var permhtml = '';
+
+		    if (!info.permissions) {
+			permhtml = "Root only.";
+		    } else {
+			if (info.permissions.description) {
+			    permhtml += "<div style='white-space:pre-wrap;padding-bottom:10px;'>" +
+				Ext.htmlEncode(info.permissions.description) + "</div>";
+			}
+			permhtml += permission_text(info.permissions);
+		    }
+
+		    if (info.allowtoken !== undefined && !info.allowtoken) {
+		        permhtml += "<br />This API endpoint is not available for API tokens."
+		    }
+
+		    sections.push({
+			title: 'Required permissions',
+			bodyPadding: 10,
+			html: permhtml
+		    });
+		}
+
+		items.push({
+		    title: method,
+		    autoScroll: true,
+		    defaults: {
+			border: false
+		    },
+		    items: sections
+		});
+	    }
+	});
+
+	var ct = Ext.getCmp('docview');
+	ct.setTitle("Path: " +  real_path(data.path));
+	ct.removeAll(true);
+	ct.add(items);
+	ct.setActiveTab(0);
+    };
+
+    Ext.define('Ext.form.SearchField', {
+	extend: 'Ext.form.field.Text',
+	alias: 'widget.searchfield',
+
+	emptyText: 'Search...',
+
+	flex: 1,
+
+	inputType: 'search',
+	listeners: {
+	    'change': function(){
+
+		var value = this.getValue();
+		if (!Ext.isEmpty(value)) {
+		    store.filter({
+			property: 'path',
+			value: value,
+			anyMatch: true
+		    });
+		} else {
+		    store.clearFilter();
+		}
+	    }
+	}
+    });
+
+    var tree = Ext.create('Ext.tree.Panel', {
+	title: 'Resource Tree',
+	tbar: [
+	    {
+		xtype: 'searchfield',
+	    }
+	],
+	tools: [
+	    {
+		type: 'expand',
+		tooltip: 'Expand all',
+		tooltipType: 'title',
+		callback: (tree) => tree.expandAll(),
+	    },
+	    {
+		type: 'collapse',
+		tooltip: 'Collapse all',
+		tooltipType: 'title',
+		callback: (tree) => tree.collapseAll(),
+	    },
+	],
+        store: store,
+	width: 200,
+        region: 'west',
+        split: true,
+        margins: '5 0 5 5',
+        rootVisible: false,
+	listeners: {
+	    selectionchange: function(v, selections) {
+		if (!selections[0])
+		    return;
+		var rec = selections[0];
+		render_docu(rec.data);
+		location.hash = '#' + rec.data.path;
+	    }
+	}
+    });
+
+    Ext.create('Ext.container.Viewport', {
+	layout: 'border',
+	renderTo: Ext.getBody(),
+	items: [
+	    tree,
+	    {
+		xtype: 'tabpanel',
+		title: 'Documentation',
+		id: 'docview',
+		region: 'center',
+		margins: '5 5 5 0',
+		layout: 'fit',
+		items: []
+	    }
+	]
+    });
+
+    var deepLink = function() {
+	var path = window.location.hash.substring(1).replace(/\/\s*$/, '')
+	var endpoint = store.findNode('path', path);
+
+	if (endpoint) {
+	    tree.getSelectionModel().select(endpoint);
+	    tree.expandPath(endpoint.getPath());
+	    render_docu(endpoint.data);
+	}
+    }
+    window.onhashchange = deepLink;
+
+    deepLink();
+
+});
-- 
2.20.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH widget-toolkit 3/3] add proxmox-widget-toolkit-dev package
  2021-05-28 12:13 [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 1/3] Toolkit: move defaultDownloadServerUrl override to panel/RRDChart Dominik Csapak
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 2/3] add api-viewer source Dominik Csapak
@ 2021-05-28 12:13 ` Dominik Csapak
  2021-06-02 14:13 ` [pve-devel] applied-series: [PATCH widget-toolkit 0/3] " Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Dominik Csapak @ 2021-05-28 12:13 UTC (permalink / raw)
  To: pve-devel

used for various other packages to dev-depend on (e.g. pve-docs)
which only contains the Toolkit.js for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 Makefile                                      | 19 +++++++++++--------
 debian/control                                |  7 +++++++
 .../{docs => proxmox-widget-toolkit-dev.docs} |  0
 debian/proxmox-widget-toolkit-dev.install     |  2 ++
 debian/proxmox-widget-toolkit.docs            |  1 +
 debian/proxmox-widget-toolkit.install         |  1 +
 6 files changed, 22 insertions(+), 8 deletions(-)
 rename debian/{docs => proxmox-widget-toolkit-dev.docs} (100%)
 create mode 100644 debian/proxmox-widget-toolkit-dev.install
 create mode 100644 debian/proxmox-widget-toolkit.docs
 create mode 100644 debian/proxmox-widget-toolkit.install

diff --git a/Makefile b/Makefile
index c0fe06d..0060296 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,9 @@ export DEB_VERSION_UPSTREAM_REVISION
 
 export PACKAGE=proxmox-widget-toolkit
 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
-DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+WT_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+WT_DEV_DEB=${PACKAGE}-dev_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DEBS=${WT_DEB} ${WT_DEV_DEB}
 DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
 
 GITVERSION:=$(shell git rev-parse HEAD)
@@ -16,10 +18,10 @@ ${BUILDDIR}:
 	mv ${BUILDDIR}.tmp/ ${BUILDDIR}
 
 .PHONY: deb
-deb: ${DEB}
-${DEB}: ${BUILDDIR}
+deb: ${DEBS}
+${DEBS}: ${BUILDDIR}
 	cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
-	lintian ${DEB}
+	lintian ${DEBS}
 
 .PHONY: dsc
 dsc: ${DSC}
@@ -32,8 +34,9 @@ lint: ${JSSRC}
 	${MAKE} -C src lint
 
 .PHONY: upload
-upload: ${DEB}
-	tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
+upload: ${DEBS}
+	tar cf - ${WT_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist buster
+	tar cf - ${WT_DEV_DEB} | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist buster
 
 distclean: clean
 clean:
@@ -42,5 +45,5 @@ clean:
 	find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall
-dinstall: ${DEB}
-	dpkg -i ${DEB}
+dinstall: ${DEBS}
+	dpkg -i ${DEBS}
diff --git a/debian/control b/debian/control
index 45ca9b4..ad88929 100644
--- a/debian/control
+++ b/debian/control
@@ -12,3 +12,10 @@ Architecture: all
 Depends: ${misc:Depends}
 Description: ExtJS Helper Classes for Proxmox 
  ExtJS Helper Classes to easy access to Proxmox APIs.
+
+Package: proxmox-widget-toolkit-dev
+Architecture: all
+Depends: ${misc:Depends}
+Description: Development dependencies for Proxmox Projects
+ Contains some common javascript code that are dev-dependencies,
+ for various Proxmox projects.
diff --git a/debian/docs b/debian/proxmox-widget-toolkit-dev.docs
similarity index 100%
rename from debian/docs
rename to debian/proxmox-widget-toolkit-dev.docs
diff --git a/debian/proxmox-widget-toolkit-dev.install b/debian/proxmox-widget-toolkit-dev.install
new file mode 100644
index 0000000..514d1d0
--- /dev/null
+++ b/debian/proxmox-widget-toolkit-dev.install
@@ -0,0 +1,2 @@
+Toolkit.js /usr/share/javascript/proxmox-widget-toolkit-dev/
+api-viewer/APIVIEWER.js /usr/share/javascript/proxmox-widget-toolkit-dev/
diff --git a/debian/proxmox-widget-toolkit.docs b/debian/proxmox-widget-toolkit.docs
new file mode 100644
index 0000000..8696672
--- /dev/null
+++ b/debian/proxmox-widget-toolkit.docs
@@ -0,0 +1 @@
+debian/SOURCE
diff --git a/debian/proxmox-widget-toolkit.install b/debian/proxmox-widget-toolkit.install
new file mode 100644
index 0000000..3c85d66
--- /dev/null
+++ b/debian/proxmox-widget-toolkit.install
@@ -0,0 +1 @@
+/usr/share/javascript/proxmox-widget-toolkit
-- 
2.20.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied-series: [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package
  2021-05-28 12:13 [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package Dominik Csapak
                   ` (2 preceding siblings ...)
  2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 3/3] add proxmox-widget-toolkit-dev package Dominik Csapak
@ 2021-06-02 14:13 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2021-06-02 14:13 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 28.05.21 14:13, Dominik Csapak wrote:
> intended as build-dependency
> contains the apiviewer (will be used for all -docs packages),
> and Toolkit.js which will be used for the prune-simulator and
> lto-barcode-generator
> 
> Dominik Csapak (3):
>   Toolkit: move defaultDownloadServerUrl override to panel/RRDChart
>   add api-viewer source
>   add proxmox-widget-toolkit-dev package
> 
>  Makefile                                      |  19 +-
>  debian/control                                |   7 +
>  .../{docs => proxmox-widget-toolkit-dev.docs} |   0
>  debian/proxmox-widget-toolkit-dev.install     |   2 +
>  debian/proxmox-widget-toolkit.docs            |   1 +
>  debian/proxmox-widget-toolkit.install         |   1 +
>  src/Toolkit.js                                |   3 -
>  src/api-viewer/APIVIEWER.js                   | 529 ++++++++++++++++++
>  src/panel/RRDChart.js                         |   3 +
>  9 files changed, 554 insertions(+), 11 deletions(-)
>  rename debian/{docs => proxmox-widget-toolkit-dev.docs} (100%)
>  create mode 100644 debian/proxmox-widget-toolkit-dev.install
>  create mode 100644 debian/proxmox-widget-toolkit.docs
>  create mode 100644 debian/proxmox-widget-toolkit.install
>  create mode 100644 src/api-viewer/APIVIEWER.js
> 


applied series, thanks!

eslint wasn't really happy though, so I added a few followups to ensure it is (and check
on package build).

The external "interface" got also a bit adapted, it's now `apiSchema` and optionally
`cliUsageRenderer`




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-02 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 12:13 [pve-devel] [PATCH widget-toolkit 0/3] add proxmox-widget-toolkit-dev package Dominik Csapak
2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 1/3] Toolkit: move defaultDownloadServerUrl override to panel/RRDChart Dominik Csapak
2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 2/3] add api-viewer source Dominik Csapak
2021-05-28 12:13 ` [pve-devel] [PATCH widget-toolkit 3/3] add proxmox-widget-toolkit-dev package Dominik Csapak
2021-06-02 14:13 ` [pve-devel] applied-series: [PATCH widget-toolkit 0/3] " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal