Files
nextcloud-nodered-ocs-api/nodes/nextcloud-ocs/tables.html
T

48 lines
5.7 KiB
HTML
Raw Normal View History

<script type="text/javascript">
RED.nodes.registerType('tables', {
category: 'nextcloud', color: '#3399FF',
defaults: {
name: { value: "" }, nextcloud: { type: "nextcloud-config", required: true },
operation: { value: "table:list" },
tableId: { value: "" }, viewId: { value: "" }, rowId: { value: "" }, shareId: { value: "" },
nodeId: { value: "" }, nodeType: { value: "table" }, nodeCollection: { value: "tables" },
token: { value: "" }, contextId: { value: "" },
bodyTitle: { value: "" }, bodyEmoji: { value: "" }, bodyData: { value: "" },
bodyName: { value: "" }, bodyReceiver: { value: "" }, bodyReceiverType: { value: "" },
bodyBaseNodeId: { value: "" }, bodyBaseNodeType: { value: "table" }, bodyPassword: { value: "" },
bodyDescription: { value: "" }, bodyTemplate: { value: "" }, bodyNewOwnerId: { value: "" },
bodyLimit: { value: "" }, bodyOffset: { value: "" }
},
inputs: 1, outputs: 1, icon: "table.svg",
label: function() { return this.name || "Tables"; }
});
</script>
<script type="text/html" data-template-name="tables">
<div class="form-row"><label for="node-input-name"><i class="fa fa-tag"></i> Name</label><input type="text" id="node-input-name" placeholder="Tables"></div>
<div class="form-row"><label for="node-input-nextcloud"><i class="fa fa-cloud"></i> Config</label><input type="text" id="node-input-nextcloud" placeholder="Select config node"></div>
<div class="form-row"><label for="node-input-operation"><i class="fa fa-cog"></i> Operation</label>
<select id="node-input-operation" style="width:100%;">
<optgroup label="Tables"><option value="table:list">List Tables</option><option value="table:get">Get Table</option><option value="table:create">Create Table</option><option value="table:update">Update Table</option><option value="table:delete">Delete Table</option><option value="table:scheme">Get Scheme</option><option value="table:transfer">Transfer Ownership</option></optgroup>
<optgroup label="Init"><option value="init:index">Get Index</option></optgroup>
<optgroup label="Columns"><option value="column:list">List Columns</option><option value="column:get">Get Column</option><option value="column:text">Create Text Column</option><option value="column:number">Create Number Column</option><option value="column:selection">Create Selection Column</option><option value="column:datetime">Create Datetime Column</option><option value="column:usergroup">Create Usergroup Column</option></optgroup>
<optgroup label="Rows"><option value="row:list">List Rows</option><option value="row:create">Create Row</option><option value="row:get">Get Row</option><option value="row:update">Update Row</option><option value="row:delete">Delete Row</option></optgroup>
<optgroup label="Views"><option value="view:list">List Views</option><option value="view:get">Get View</option><option value="view:create">Create View</option><option value="view:update">Update View</option><option value="view:delete">Delete View</option></optgroup>
<optgroup label="Shares"><option value="share:listTable">List Table Shares</option><option value="share:listView">List View Shares</option><option value="share:create">Create Share</option><option value="share:update">Update Share</option><option value="share:delete">Delete Share</option><option value="share:linkCreate">Create Link Share</option></optgroup>
<optgroup label="Contexts"><option value="context:list">List Contexts</option><option value="context:get">Get Context</option><option value="context:create">Create Context</option><option value="context:update">Update Context</option><option value="context:delete">Delete Context</option></optgroup>
<optgroup label="Favorites"><option value="favorite:add">Add Favorite</option><option value="favorite:remove">Remove Favorite</option></optgroup>
<optgroup label="Import"><option value="import:table">Import Data</option></optgroup>
<optgroup label="Public Links"><option value="public:rows">Get Public Rows</option><option value="public:columns">Get Public Columns</option></optgroup>
</select>
</div>
<hr><div style="font-weight:bold;margin-bottom:6px;">Path Parameters</div>
<div class="form-row"><label>Table ID</label><input type="text" id="node-input-tableId" placeholder="msg.tableId"></div>
<div class="form-row"><label>View ID</label><input type="text" id="node-input-viewId" placeholder="msg.viewId"></div>
<div class="form-row"><label>Row ID</label><input type="text" id="node-input-rowId" placeholder="msg.rowId"></div>
<div class="form-row"><label>Share ID</label><input type="text" id="node-input-shareId" placeholder="msg.shareId"></div>
<div class="form-row"><label>Node ID</label><input type="text" id="node-input-nodeId" placeholder="msg.nodeId"></div>
<div class="form-row"><label>Node Type</label><select id="node-input-nodeType"><option value="table">table</option><option value="view">view</option></select></div>
<div class="form-row"><label>Node Collection</label><select id="node-input-nodeCollection"><option value="tables">tables</option><option value="views">views</option></select></div>
<div class="form-row"><label>Token (public)</label><input type="text" id="node-input-token" placeholder="msg.token"></div>
<div class="form-row"><label>Context ID</label><input type="text" id="node-input-contextId" placeholder="msg.contextId"></div>
<div class="form-tips"><p>All params overridable via <code>msg.*</code>. Row data: pass in <code>msg.data</code> as object keyed by column ID.</p></div>
</script>