Skip to content

Commit

Permalink
confort
Browse files Browse the repository at this point in the history
  • Loading branch information
simon louvet committed Mar 19, 2024
1 parent 02f237c commit e182a8e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<label class="labelFormStandard">Content-type:</label>
<div class="cardInput">
<select class="inputComponents" name="contentTypeInput" ref="contentTypeInput" onchange={contentTypeInputChanged}>
<option value="application/json" selected={data.specificData.contentType==='application/json' || data.specificData.contentType===undefined}>application/json</option>
<option value="application/json" selected={data.specificData.contentType==='application/json'}>application/json</option>
<option value="application/ld+json" selected={data.specificData.contentType==='application/ld+json'}>application/ld+json</option>
<option value="application/xml" selected={data.specificData.contentType==='application/xml'}>application/xml</option>
<option value="application/x-yaml" selected={data.specificData.contentType==='application/x-yaml'}>application/x-yaml</option>
Expand All @@ -45,9 +45,6 @@
<script>

this.data = {};
this.test = function () {
consol.log('test');
}

// Object.defineProperty(this, 'data', { set: function (data) { this.data=data; this.update(); }.bind(this), get: function () { return this.data; }, configurable: true });

Expand All @@ -69,6 +66,12 @@
}
this.updateData = function (dataToUpdate) {
this.data = dataToUpdate;
if (this.data.specificData.contentType==undefined){
this.data.specificData.contentType='application/json';
}
if (this.data.specificData.url==undefined){
this.data.specificData.url=this.data._id+'-'
}
this.update();
}.bind(this);
$
Expand All @@ -87,7 +90,6 @@

});
this.on('unmount', function () {
RiotControl.off('item_current_changed', this.updateData);
RiotControl.off('item_current_changed', this.updateData);
RiotControl.off('workspace_current_changed', this.updateWorkspace);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
this.data = dataToUpdate;
this.update();
}.bind(this);
$

this.updateWorkspace = (workspace) =>{
this.components = workspace.components;
}
Expand All @@ -88,7 +88,6 @@

});
this.on('unmount', function () {
RiotControl.off('item_current_changed', this.updateData);
RiotControl.off('item_current_changed', this.updateData);
RiotControl.off('workspace_current_changed', this.updateWorkspace);

Expand Down
4 changes: 2 additions & 2 deletions main/client/static/tag/workspaceEditor.tag
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@
<div class="cardParameter">
<input defaultValue={1} class="inputStandard" type="number" readonly={innerData.mode=="read"} ref="workspaceLimitHistoricnput" id="workspaceLimitHistoricInput" placeholder="1" value="{innerData.limitHistoric}" onkeyup="{limitHistoricFieldChange}"></input>
</div>
<label class="labelFormStandard">Version du moteur de calcul</label>
<!-- <label class="labelFormStandard">Version du moteur de calcul</label>
<div class="cardParameter">
<select name="version" ref="versionInput" onchange={versionChange}>
<option value="default" selected={innerData.engineVersion==='default' || innerData.engineVersion===undefined}>default</option>
<option value="v1" selected={innerData.engineVersion==='v1'}>V1</option>
<option value="v2" selected={innerData.engineVersion==='v2'}>V2</option>
</select>
</div>
</div> -->
<label if={innerData._id} class="labelFormStandard">Importer au format JSON<</label>
<div if={innerData._id} class="cardParameter">
<div onclick={importClick} class="btnFil commandButtonImage">
Expand Down
4 changes: 3 additions & 1 deletion main/server/workspaceComponentInitialize/httpConsumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ class HttpConsumer {
this.editor = 'http-consumer-editor'
this.graphIcon = 'Post_consumer.svg'
this.tags = [
'http://semantic-bus.org/data/tags/inComponents'
'http://semantic-bus.org/data/tags/inComponents',
'http://semantic-bus.org/data/tags/outComponents',
'http://semantic-bus.org/data/tags/APIComponents'
]
}
}
Expand Down
1 change: 1 addition & 0 deletions main/server/workspaceComponentInitialize/httpProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class HttpProvider {
this.editor = 'http-provider-editor'
this.graphIcon = 'Post_provider.svg'
this.tags = [
'http://semantic-bus.org/data/tags/inComponents',
'http://semantic-bus.org/data/tags/outComponents',
'http://semantic-bus.org/data/tags/APIComponents'
],
Expand Down

0 comments on commit e182a8e

Please sign in to comment.