Skip to content

Commit

Permalink
[BUGFIXED]- CRM Tickets fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ndasanayaka committed Jun 5, 2024
1 parent b92b0c5 commit dda1dbd
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/api/DeconvolutionAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
// get files info
async get_files_info(filespath) {
let fileslist = filespath.map( file => {
console.log(btoa(file))
return btoa(file);
});
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/filesinfobase64`, {
Expand All @@ -35,13 +36,12 @@ export default {
return data
},

async validate_devices(jobs,mem,gpus,deconinfo){
async validate_devices(jobs,mem,gpus){
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/validateDevices`, {
params: {
jobs: jobs,
mem: mem,
gpus: gpus,
deconinfo: btoa(JSON.stringify(deconinfo))
gpus: gpus
}
})
return data
Expand Down
38 changes: 34 additions & 4 deletions src/components/DesktopManagerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@
Selected files
</v-card-title>
</template>
<div align="center" justify="center" style="overflow: auto; height:300px;">
<v-list-item v-for="(afile,index) in files" :key="index">
<v-list-item-title>{{ afile }}</v-list-item-title>
<v-list-item-action>
<v-btn icon @click="removeItem(index)">
<v-icon>mdi-close</v-icon>
</v-btn>
</v-list-item-action>
</v-list-item>
</div>

<v-list-item v-for="afile in files" :key="afile">
<v-list-item-title>{{ afile }}</v-list-item-title>
</v-list-item>
</v-list-group>
</div>

Expand Down Expand Up @@ -263,6 +270,12 @@
title: this.selectedApp,
text: filesList + ' are being loaded to ' + this.selectedApp
})
console.log("parameters for launch app")
console.log(this.currentDesktop.node)
console.log(this.selectedApp)
console.log(displayNumber)
console.log(btoa(filesList))
console.log(this.copyFilesToScratch)
await DesktopAPI.launchapp(this.currentDesktop.node, this.selectedApp, displayNumber, filesList, this.copyFilesToScratch)
this.loading = false
},
Expand All @@ -280,7 +293,24 @@
// set files
setFiles(filelist) {
this.files = filelist
console.log("setFiles ")
console.log(filelist)
if(filelist.length>0){
filelist.map(item => {
if(!item.endsWith("/") && !this.files.includes(item)){
this.files.push(item)
console.log("a file")
} else {
console.log("a folder")
}
})
}
//this.files = filelist
},
removeItem(index) {
this.files.splice(index,1)
},
// start timer
Expand Down
3 changes: 2 additions & 1 deletion src/components/DesktopManagerDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
this.dialog = true
let count = 0
while(!this.$refs.desktopmanager && count < 10){
console.log("inside")
await new Promise(r => setTimeout(r, 5000))
count = count + 1
}
if(this.$refs.desktopmanager) {
this.$refs.desktopmanager.setFiles(files)
// start timer
this.$refs.desktopmanager.startTimer(15000)
//this.$refs.desktopmanager.startTimer(15000)
}
},
agree() {
Expand Down
17 changes: 15 additions & 2 deletions src/components/deconvolution/PSF.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
regular
label="Sample medium refractive index"
type="number"
step="0.1"
min="1.33"
:rules="[rules.positive]">
</v-text-field>
</v-col>
Expand All @@ -52,12 +54,12 @@
</v-row>
<v-row>
<v-col cols="10" sm="3" md="4">
<v-text-field regular label="Objective NA" type="number"
<v-text-field regular label="Objective NA" type="number" step="0.1" min="0.1"
:rules="[rules.positive, rules.na_NARI]" v-model="serie.NA">
</v-text-field>
</v-col>
<v-col cols="10" sm="3" md="4" v-if="serie.psfType === 3">
<v-text-field regular label="Light sheet illumination NA" type="number"
<v-text-field regular label="Light sheet illumination NA" type="number" step="0.1" min="0.1"
:rules="[rules.positive]" v-model="serie.lightSheetIlluminationNA">
</v-text-field>
</v-col>
Expand All @@ -69,6 +71,8 @@
regular
label="Objective immersion refractive index"
:rules="[rules.positive, rules.ri_NARI]"
step="0.1"
min="0.1"
type="number">
</v-text-field>
</v-col>
Expand Down Expand Up @@ -302,6 +306,13 @@
this.psfSerie = {}
}
if (this.serie.psfType === 3) {
this.serie.NA = 1.1
this.serie.RI = 1.33
this.serie.objectiveRIOption = 1.33
}
console.log(this.serie)
},
// psfModelChanged
psfModelChanged() {
Expand Down Expand Up @@ -395,6 +406,8 @@
/* valueChange(){
PreferenceAPI.update_setting(this.serie.id, this.serie)
} */
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/series.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var series = {
series['slitDirection'] = 1

if (!series['generatePsf'])
series['generatePsf'] = false
series['generatePsf'] = true
if (!series['readSpacing'])
series['readSpacing'] = true
if (!series['psfModel'])
Expand Down
15 changes: 10 additions & 5 deletions src/views/Deconvolution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -786,15 +786,20 @@
} else {
Vue.$log.debug("Not found in database- a new decon and path")
let response = null
console.log(btoa(pathToBeLoaded))
console.log(pathToBeLoaded)
if (isfolder)
response = await DeconvolutionAPI.get_folder_info(pathToBeLoaded)
else
response = await DeconvolutionAPI.get_file_info(pathToBeLoaded)
console.log("after response call")
console.log(response)
console.log(JSON.parse(JSON.stringify(response)))
Vue.$log.debug("Response :")
Vue.$log.debug(response)
Vue.$log.debug(JSON.parse(JSON.stringify(response)))
// add to database
for(let _index = 0; _index < response.commandResult.length; _index++){
console.log("adding new docn to db")
Expand Down Expand Up @@ -1542,8 +1547,8 @@
}
}
}
if(this.workingItem.step === 7) { /* validate devices in device tab */
/* validate devices in device tab */
if(this.workingItem.step === 7) {
let msg
let jobs = this.workingItem.setting.instances
let mem = this.workingItem.setting.mem
Expand All @@ -1554,7 +1559,7 @@
this.overlay =true
let response = await DeconvolutionAPI.validate_devices(jobs,mem,gpus,this.workingItem.setting)
let response = await DeconvolutionAPI.validate_devices(jobs,mem,gpus)
this.overlay =false
let output = response.commandResult
console.log(output)
Expand All @@ -1578,7 +1583,7 @@
return
}
}
}
}
if(this.workingItem.step === 8)
return
//even if current step is invalid, next will allow it to go if it has been visited
Expand Down

0 comments on commit dda1dbd

Please sign in to comment.