Skip to content

Commit 8b79f4c

Browse files
committed
[UPDATED]- Estimate button updated for the env, code clean up
1 parent 39087b7 commit 8b79f4c

9 files changed

Lines changed: 38 additions & 78 deletions

File tree

src/api/DeconvolutionAPI.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ export default {
110110
let endpoint = `${Vue.prototype.$Config.endpoints.pref}`
111111
// let apihost = /^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(endpoint)[1]
112112
let apihost = /^(?:\w+:\/\/)?([^/]+)(.*)$/.exec(endpoint)[1]
113-
console.log("----run estimate api API call---")
114-
let today = new Date();
115-
let date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
116-
let time = today.getHours() + "-" + today.getMinutes() + "-" + today.getSeconds();
117-
console.log(date+'_'+time)
118113
const { data } = await request.get(_requestUrl, {
119114
params: {
120115
output: output,

src/api/MacroAPI.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export default {
66
// execute
77
async execute_macro_script(output, instances, mem, devices,macroinfo ) {
88
let _requestUrl =`${Vue.prototype.$Config.endpoints.bunya}/api/execute/executeMacroBase64`
9-
console.log(_requestUrl)
109
let arrayMax = parseInt(instances) - 1
1110
let endpoint = `${Vue.prototype.$Config.endpoints.pref}`
1211

src/components/DesktopManagerComponent.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
this.apps.push(element)
265265
this.selectedApp = this.apps[0].id
266266
});
267-
console.log( this.apps)
267+
268268
},
269269
async getFlavours(){
270270
let response = await DesktopAPI.listdesktopflavours()
@@ -347,8 +347,7 @@
347347
},
348348
349349
async launchDesktop(){
350-
console.log("selectedDesktop")
351-
console.log(this.selectedDesktop.value)
350+
352351
if (this.selectedDesktop.value === 'ipp_desktop') {
353352
await DesktopAPI.launchfile()
354353
}
@@ -364,14 +363,13 @@
364363
365364
// set files
366365
setFiles(filelist) {
367-
console.log("setFiles ")
368-
console.log(filelist)
366+
369367
370368
if(filelist.length>0){
371369
filelist.map(item => {
372370
if(!item.endsWith("/") && !this.files.includes(item)){
373371
this.files.push(item)
374-
console.log("a file")
372+
375373
} else {
376374
console.log("a folder")
377375
}
@@ -418,8 +416,7 @@
418416
//this.getFlavours()
419417
//this.startTimer(20000)
420418
this.loading = false
421-
console.log("this.desktopManagerOnly")
422-
console.log(this.desktopManagerOnly)
419+
423420
},
424421
425422
destroyed() {

src/components/deconvolution/Devices.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</v-col> -->
3939
<v-col align="center" justify="center">
4040

41-
<v-col v-if="api=='Microvolution'" >
41+
<v-col v-if="api=='Microvolution' && env!=='prod'" >
4242

4343

4444
<v-tooltip bottom >
@@ -138,7 +138,7 @@
138138
</template>
139139

140140
<script>
141-
// import Vue from 'vue';
141+
import Vue from 'vue';
142142
import series from '@/utils/series.js'
143143
// api
144144
import DeconvolutionAPI from "@/api/DeconvolutionAPI.js"
@@ -174,6 +174,7 @@
174174
api:"",
175175
selectedtag: null,
176176
queueTime:"",
177+
env:null,
177178
/* positiveInteger: [
178179
value => value && value > 0 && Number.isInteger(parseFloat(value)) || 'Must be a positive integer'
179180
],
@@ -195,6 +196,7 @@
195196
let _current_api = await PreferenceAPI.get_config()
196197
this.api=_current_api.apiname
197198
this.selectedtag = _current_api.metadatatag
199+
this.env = Vue.prototype.$Config.env
198200
this.getQueueTime()
199201
this.getUserLimits()
200202
@@ -278,14 +280,11 @@
278280
let response = await DeconvolutionAPI.execute_microvolution(this.serie.outputPath, parseInt(this.serie.instances),
279281
this.serie.mem, this.serie.gpus, this.serie, jobs, false, true, false)
280282
281-
console.log("Estimate response")
282-
console.log(response)
283-
284283
this.overlay =false
285284
this.loading=false
286285
this.message = ' Estimate complete'
287286
let output = response.commandResult
288-
console.log(output)
287+
289288
290289
if (output.length > 0) {
291290
for (let i=0; i < output.length ; i++) {

src/components/vuetify-file-browser/List.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ export default {
477477
this.total_files = 0
478478
this.total_folders = 0
479479
this.items = response.commandResult.map(responseItem => {
480-
//console.log(responseItem.name)
481480
responseItem.type = "file"
482481
responseItem.basename = responseItem.name
483482
responseItem.extension = ""
@@ -691,7 +690,7 @@ export default {
691690
692691
this.displayItems = this.filteredItems.slice((this.pageindex - 1) * this.itemsperpage,
693692
this.pageindex * this.itemsperpage)
694-
console.log(this.displayItems)
693+
695694
},
696695
canView(item){
697696
let extension = item.basename.split(".").pop()
@@ -740,7 +739,7 @@ export default {
740739
}
741740
},
742741
async viewItem(item){
743-
console.log("reading:" + item.path)
742+
744743
console.log("reading:" + item.path)
745744
try{
746745
let _readFileResponse = await FilesAPI.readTextFile(item.path)

src/components/vuetify-file-browser/Toolbar.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -261,21 +261,16 @@ export default {
261261
262262
let destination = options.path
263263
let copy = false
264-
console.log("Destination outside if")
265-
console.log(destination)
266264
267265
if ( options.selectedItems.length > 0 ) {
268266
destination = destination + options.selectedItems[0].name
269-
console.log("Destination in if")
270-
console.log(destination)
271267
}
272268
if(_copiedItems.length > 0) {
273269
_copiedItems.forEach((item) => {
274270
let lastindex = item.lastIndexOf('/');
275-
console.log("index ", lastindex)
276-
console.log("current item ", item)
271+
277272
let directoryPath2 = item.substring(0, (lastindex + 1));
278-
console.log("directoryPath2 ", directoryPath2)
273+
279274
if (directoryPath2 === destination ) {
280275
/* let dotindex = item.indexOf('.')
281276
let pathtoextenstion = item.substring(0,dotindex)
@@ -290,10 +285,7 @@ export default {
290285
})
291286
}
292287
//let index = _copiedItems[0].lastIndexOf('/');
293-
console.log(_copiedItems)
294-
console.log(btoa(_copiedItems.join(";")))
295-
console.log(btoa(destination))
296-
console.log(copy)
288+
297289
Vue.$log.info("Copying " + _copiedItems + " to "+ destination)
298290
let confirmOptions = await this.$refs.copyconfirm.open(_copiedItems, destination)
299291
if (!confirmOptions.cancelled) {

src/components/vuetify-file-browser/Tree.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,13 @@ export default {
170170
}
171171
},
172172
findItem(path) {
173-
// console.log("[findItem@Tree] path=" + path)
173+
174174
let stack = [];
175175
stack.push(this.items[0]);
176-
// console.log(stack)
176+
177177
while (stack.length > 0) {
178178
let node = stack.pop();
179-
// console.log("[findItem@Tree] node= ")
180-
// console.log(node)
179+
181180
if(!node)
182181
break;
183182
if (node.path == path) {
@@ -191,11 +190,10 @@ export default {
191190
return null;
192191
},
193192
async openPath(path) {
194-
// console.log("[openPath@Tree] path = " + path)
195-
// console.log("[openPath@Tree] item0 = " + this.items[0])
193+
196194
this.$emit("loading", true);
197195
let pathsegments = path.replace(/^\//, "").replace(/\/$/, "").split("/");
198-
console.log(pathsegments)
196+
199197
// now we have pathSegments = ["a", "b", "c"] root folder is ignored
200198
let stack = [];
201199
stack.push(this.items[0]);

src/views/Jobshistory.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@
113113
this.loading = true
114114
// only list running and submitted jobs
115115
this.jobs = await PreferenceAPI.list_jobs(false)
116-
console.log("this.jobs")
117-
console.log(this.jobs)
116+
118117
/* const options = {
119118
timeZone: 'Australia/Brisbane',
120119
year: 'numeric',
@@ -129,9 +128,6 @@
129128
for(let i=0; i<this.jobs.length; i++) {
130129
let job = this.jobs[i]
131130
if(job.submitted) {
132-
console.log("submitted time")
133-
console.log(job.submitted)
134-
135131
let ms = Date.parse(job.submitted)
136132
let utcdate = new Date()
137133
utcdate.setTime(ms)
@@ -140,20 +136,20 @@
140136
//let localtime = new Date(utcdate.getTime() - offsetMinutes * 60 * 1000)
141137
let localTimeString = utcdate.toLocaleString()
142138
this.jobs[i].submitted = localTimeString
143-
console.log("job submitted "+ this.jobs[i].submitted)
139+
144140
145141
}
146142
if(job.start) {
147143
let utcdate = new Date(job.start);
148144
let localTimeString = utcdate.toLocaleString();
149145
this.jobs[i].start = localTimeString
150-
console.log(localTimeString);
146+
151147
}
152148
if(job.end) {
153149
let utcdate = new Date(job.end);
154150
let localTimeString = utcdate.toLocaleString();
155151
this.jobs[i].end = localTimeString
156-
console.log(localTimeString);
152+
157153
}
158154
159155

0 commit comments

Comments
 (0)