Skip to content

Commit

Permalink
[UPDATED]- Updated URLs to bunya,fixed macro and timezone issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ndasanayaka committed Nov 18, 2024
1 parent f881c43 commit 66750d2
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/api/CollectionsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Vue from 'vue'

export default {
async list() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/collections`)
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/collections`)
return data
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/ConfigurationAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Vue from 'vue'

export default {
async execute_metedata_script(fileslist, confid, validate, savecsv, savefolder) {
let _requestUrl =`${Vue.prototype.$Config.endpoints.wiener}/api/execute/imageMetadataBase64`
let _requestUrl =`${Vue.prototype.$Config.endpoints.bunya}/api/execute/imageMetadataBase64`
const { data } = await request.get(_requestUrl, {
params: {
fileslist : fileslist,
Expand Down
2 changes: 1 addition & 1 deletion src/api/ConvertAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
if(mem > 384)
mem = 384
convertinfo.mem = mem
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/convertfilebase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/convertfilebase64`, {
params: {
output: convertinfo.output,
convertinfo: btoa(JSON.stringify(convertinfo)),
Expand Down
22 changes: 11 additions & 11 deletions src/api/DeconvolutionAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vue from 'vue'
export default {
// get folder info
async get_folder_info(path) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/folderinfobase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/folderinfobase64`, {
params: {
folderpath: btoa(path)
}
Expand All @@ -18,7 +18,7 @@ export default {
console.log(btoa(file))
return btoa(file);
});
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/filesinfobase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/filesinfobase64`, {
params: {
fileslist: fileslist
}
Expand All @@ -28,7 +28,7 @@ export default {

// get file info
async get_file_info(filepath) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/fileinfobase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/fileinfobase64`, {
params: {
filepath: btoa(filepath)
}
Expand All @@ -37,7 +37,7 @@ export default {
},

async validate_devices(jobs,mem,gpus){
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/validateDevices`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/validateDevices`, {
params: {
jobs: jobs,
mem: mem,
Expand All @@ -49,12 +49,12 @@ export default {
},

async cancel_estimate() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/estimateCancel`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/estimateCancel`);
return data
},

async queue_time(nodes, mem, gpus, partition, qos) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/queueTime`,{
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/queueTime`,{
params: {
nodes: nodes,
mem: mem,
Expand All @@ -67,21 +67,21 @@ export default {
},

async user_limits() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/userLimits`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/userLimits`);
return data
},

// execute
async execute_microvolution(output, instances, mem, devices, executioninfo, jobs, is_test=false, is_estimate, is_cudaDecon) {
let _requestUrl = ""
if (is_test && !is_estimate && !is_cudaDecon) {
_requestUrl = `${Vue.prototype.$Config.endpoints.wiener}/api/execute/testexecutebase64`
_requestUrl = `${Vue.prototype.$Config.endpoints.bunya}/api/execute/testexecutebase64`
} else if(is_estimate && !is_test && !is_cudaDecon){
_requestUrl = `${Vue.prototype.$Config.endpoints.wiener}/api/execute/estimateDevices`
_requestUrl = `${Vue.prototype.$Config.endpoints.bunya}/api/execute/estimateDevices`
} else if (is_cudaDecon && !is_test && !is_estimate){
_requestUrl = `${Vue.prototype.$Config.endpoints.wiener}/api/execute/CudaDeconbase64`
_requestUrl = `${Vue.prototype.$Config.endpoints.bunya}/api/execute/CudaDeconbase64`
} else if ((!is_cudaDecon && !is_test && !is_estimate)) {
_requestUrl = `${Vue.prototype.$Config.endpoints.wiener}/api/execute/executemicrovolutionbase64`
_requestUrl = `${Vue.prototype.$Config.endpoints.bunya}/api/execute/executemicrovolutionbase64`
}
let arrayMax = parseInt(instances) - 1
// modify executioninfo
Expand Down
26 changes: 13 additions & 13 deletions src/api/DesktopAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Vue from 'vue'
export default {
// list desktop
async list_desktop() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/listdesktop`)
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/listdesktop`)
return data
},
// start desktop
async start_desktop(mem, ppn, hours) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/startdesktop`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/startdesktop`, {
params: {
mem: mem,
ppn: ppn,
Expand All @@ -20,35 +20,35 @@ export default {
},
// stop desktop
async stop_desktop(jobid) {
await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/stopdesktop`, {
await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/stopdesktop`, {
params: {
jobidNumber: jobid
}
});
},
// vnc display
async vncdisplay() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/vncdisplay`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/vncdisplay`);
return data
},
// otp
async otp() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/otp`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/otp`);
return data
},
//list apps
async listapps() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/listapps`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/listapps`);
return data
},
//list flavours
async listdesktopflavours() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/listflavours`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/listflavours`);
return data
},
// launch app
async launchapp(appid, filespath, copytoscratch) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/launchapp`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/launchapp`, {
params: {
appid: appid,
filespath: btoa(filespath),
Expand All @@ -59,7 +59,7 @@ export default {
},

async launchfile() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/launchfile`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/launchfile`);
return data

},
Expand All @@ -68,16 +68,16 @@ export default {
// the results here are different as it is not using remote job execution
// configurations
async listconfigurations() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/configurations`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/configurations`);
return data
},
// tunnels
async listvnctunnels() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/listvnctunnels`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/listvnctunnels`);
return data
},
async startvnctunnel(desktopname, vncpassword, remotehost, display, via_gateway, configuration) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/startvnctunnel`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/startvnctunnel`, {
params: {
desktopname: desktopname,
vncpassword: vncpassword,
Expand All @@ -90,7 +90,7 @@ export default {
return data
},
async stopvnctunnel(id) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/stopvnctunnel`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/stopvnctunnel`, {
params: {
id: id
}
Expand Down
14 changes: 7 additions & 7 deletions src/api/FilesAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vue from 'vue'
export default {
// list path
async list(path) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/listfolderbase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/listfolderbase64`, {
params: {
folderpath: btoa(path)
}
Expand All @@ -14,7 +14,7 @@ export default {

// make dir
async mkdir(path) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/makedirbase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/makedirbase64`, {
params: {
folderpath: btoa(path)
}
Expand All @@ -24,7 +24,7 @@ export default {

// use this one for files/folder in the same place
async simplemove(source, dest) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/simplemovebase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/simplemovebase64`, {
params: {
source: btoa(source),
dest: btoa(dest)
Expand All @@ -35,7 +35,7 @@ export default {

//delete a path
async delete(path) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/deletebase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/deletebase64`, {
params: {
fileslist: btoa(path)
}
Expand All @@ -45,7 +45,7 @@ export default {

// copy folder
async copy(usermail, sources, dest, parallel, deleteSource, copy) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/copybase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/copybase64`, {
params: {
usermail: usermail,
sources: btoa(sources),
Expand All @@ -59,15 +59,15 @@ export default {
},
//read text file
async readTextFile(filepath) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/readtextfile`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/readtextfile`, {
params: {
filepath: filepath
}
})
return data
},
async createActionFile(){
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/createactionfile`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/createactionfile`);
return data
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/api/MacroAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {

// execute
async execute_macro_script(output, instances, mem, devices,macroinfo ) {
let _requestUrl =`${Vue.prototype.$Config.endpoints.wiener}/api/execute/executeMacroBase64`
let _requestUrl =`${Vue.prototype.$Config.endpoints.bunya}/api/execute/executeMacroBase64`
console.log(_requestUrl)
let arrayMax = parseInt(instances) - 1
let endpoint = `${Vue.prototype.$Config.endpoints.pref}`
Expand All @@ -28,9 +28,9 @@ export default {
},


async saveFile(filename, folder, commitId, islocal) {
async saveFile(filename, folder, commitId, gituser, gitpat, islocal) {
if(islocal) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/copymacrobase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/copymacrobase64`, {
params: {
folder: folder,
filename : filename
Expand All @@ -40,11 +40,13 @@ export default {

}else {

const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/savemacrobase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/savemacrobase64`, {
params: {
folder: folder,
filename : filename,
commitId : commitId
commitId : commitId,
gituser: gituser,
gitpat: gitpat

}
})
Expand All @@ -54,7 +56,7 @@ export default {

//read text file
async readMacroFile(filepath) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/readTextFile`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/readTextFile`, {
params: {
filepath: filepath
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/ParticleCountingAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
if(mem > 384)
mem = 384
pcinfo.mem = mem
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/particlecountingbase64`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/particlecountingbase64`, {
params: {
output: pcinfo.output,
pcinfo: btoa(JSON.stringify(pcinfo)),
Expand Down
2 changes: 1 addition & 1 deletion src/api/PreprocessAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
let endpoint = `${Vue.prototype.$Config.endpoints.pref}`
// let apihost = /^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(endpoint)[1]
let apihost = /^(?:\w+:\/\/)?([^/]+)(.*)$/.exec(endpoint)[1]
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/preprocessing`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/preprocessing`, {
params: {
output: preprocessingjobinfo.outputPath,
prepinfo: btoa(JSON.stringify(preprocessingjobinfo)),
Expand Down
6 changes: 3 additions & 3 deletions src/api/RemoteJobAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import Vue from 'vue'
export default {
// list jobs
async list_jobs() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/listall`)
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/listall`)
return data
},
// stop job
async stop_job(jobid) {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/stop`, {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/stop`, {
params: {
jobidNumber: jobid
}
Expand All @@ -18,7 +18,7 @@ export default {
},

async scratch_quota() {
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.wiener}/api/execute/quota`);
const { data } = await request.get(`${Vue.prototype.$Config.endpoints.bunya}/api/execute/quota`);
return data
},

Expand Down
3 changes: 2 additions & 1 deletion src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Vue from 'vue'
const service = axios.create({
// baseURL: '', // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
timeout: 300000 // request timeout
timeout: 600000 // request timeout
})

// request interceptor
Expand Down Expand Up @@ -100,6 +100,7 @@ service.interceptors.response.use(
// If no response was received, it could be a network error
Vue.$log.error("No response received from server.");
Vue.$log.error("Error Message:", error.message);
Vue.$log.error("Error Message:", error);
}
return Promise.reject(error)
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p/>

The Portal is designed around the needs of optical microscopists to manage, convert,
pre-process and deconvolve datasets on the <a href="https://rcc.uq.edu.au/wiener">Wiener High Performance Cluster</a>.
pre-process and deconvolve datasets on the <a href="https://rcc.uq.edu.au/bunya">Bunya High Performance Cluster</a>.
<p/>

<!-- <h3>Notices</h3>
Expand Down
5 changes: 3 additions & 2 deletions src/views/Jobshistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@
console.log("submitted time")
console.log(job.submitted)
let utcdate = new Date(job.submitted)
let utcdate = new Date(Date.parse(job.submitted))
//const localTime = utcdate.toLocaleString()
const offsetMinutes = utcdate.getTimezoneOffset();
let localtime = new Date(utcdate.getTime() - offsetMinutes * 60 * 1000)
const localTimeString = localtime.toLocaleString()
let localTimeString = localtime.toLocaleString()
this.jobs[i].submitted = localTimeString
console.log("job submitted "+ this.jobs[i].submitted)
Expand Down
Loading

0 comments on commit 66750d2

Please sign in to comment.