Skip to content

Commit

Permalink
Merge pull request #38 from RIKEN-RCCS/bugfix
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
so5 authored Feb 29, 2024
2 parents bf9d55c + 416007c commit 8225118
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 15 deletions.
26 changes: 22 additions & 4 deletions client/src/components/componentGraph/textBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>
<script>
"use strict";
import { textHeight,boxWidth, textLengthLimit, textOffset, maxTextChar} from "@/lib/constants.json"
import { textLengthLimit, textOffset, maxTextChar} from "@/lib/constants.json"
export default {
name: "TextBox",
Expand All @@ -29,15 +29,32 @@ export default {
return {
width: textLengthLimit,
xoffset: textOffset,
yoffset: null
yoffset: 0
}
},
mounted(){
const bbox=this.$el.getBBox()
this.yoffset=this.center.y - (bbox.y + bbox.height/2)
this.calcYOffset()
},
methods:{
calcYOffset(){
//never re-calcuate y offset
if(this.yoffset >0){
return
}
if(! this.$el){
return;
}
const {y, height} = this.$el.getBBox()
if(typeof y !== "number" || typeof height !== "number" || y <= 0 || height <= 0){
return
}
this.yoffset = this.center.y - (y + height/2)
}
},
computed:{
trancatedText(){
this.calcYOffset();
if(this.text.length <= maxTextChar){
return this.text
}
Expand All @@ -53,6 +70,7 @@ export default {
return this.center.x
},
y(){
this.calcYOffset();
return this.center.y + this.yoffset
}
},
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/fileBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ export default {
return _getActiveItem(this.items,key);
},
getComponentDirRootFiles(){
if(! this.selectedComponent){
return
}
const cb= (fileList)=>{
if(fileList === null){
return;
Expand Down
17 changes: 9 additions & 8 deletions server/app/core/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Dispatcher extends EventEmitter {
this.currentSearchList = childComponents.filter((component)=>{
return isInitialComponent(component);
});
this.logger.debug("initial tasks : ", this.currentSearchList.map((e)=>{
this.logger.debug("initial components: ", this.currentSearchList.map((e)=>{
return e.name;
}));
this.firstCall = false;
Expand All @@ -188,24 +188,19 @@ class Dispatcher extends EventEmitter {
}));

const promises = [];
while (this.currentSearchList.length > 0) {
const target = this.currentSearchList.shift();

for(const target of this.currentSearchList){
if (target.disable) {
this.logger.info(`disabled component: ${target.name}(${target.ID})`);
continue;
}

if (!await this._isReady(target)) {
this.pendingComponents.push(target);
continue;
}

await this._getInputFiles(target);
await this._setComponentState(target, "running");
promises.push(this._dispatchOneComponent(target));
}//end of while loop

}
if (promises.length > 0) {
await Promise.all(promises);
}
Expand Down Expand Up @@ -403,6 +398,12 @@ class Dispatcher extends EventEmitter {
Array.prototype.push.apply(nextComponentIDs, tmp);
});
}
nextComponentIDs = Array.from(new Set(nextComponentIDs ))
.filter((id)=>{
return ! this.currentSearchList.some((e)=>{
return e.ID === id
});
});
const nextComponents = await Promise.all(nextComponentIDs.map((id)=>{
return this._getComponent(id);
}));
Expand Down
3 changes: 1 addition & 2 deletions server/app/core/projectFilesOperator.js
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,7 @@ async function setUploadOndemandOutputFile(projectRootDir, ID) {
componentJson.outputFiles.splice(1, componentJson.outputFiles.length - 1);
}

componentJson.outputFiles[0].name = "UPLOAD_ONDEMAND";
return writeComponentJson(projectRootDir, componentDir, componentJson);
return renameOutputFile(projectRootDir, ID, 0, "UPLOAD_ONDEMAND");
}
async function removeInputFile(projectRootDir, ID, name) {
const counterparts = new Set();
Expand Down
2 changes: 1 addition & 1 deletion server/app/db/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "2024-0229-105541" }
{"version": "2024-0229-221635" }

0 comments on commit 8225118

Please sign in to comment.