Commit b03d43d5 authored by Tristan A Spakes's avatar Tristan A Spakes

ver. 1.1.8 Logging improvements

parent 55e0d442
Pipeline #24636 failed with stages
in 2 seconds
......@@ -6,7 +6,7 @@ if [[ ${CI_COMMIT_REF_NAME} == 'master' ]]; then
else
BRANCH="-${CI_COMMIT_REF_NAME}"
fi
VERSION_NUMBER='1.1.7'
VERSION_NUMBER='1.1.8'
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum -y install nodejs npm ruby-devel gcc make rpm-build rubygems
......
#! /bin/bash
RECIPIENT='t0y@ornl.gov' #itsd-linux-workstations@ornl.gov
RECIPIENT='itsd-linux-workstations@ornl.gov'
SUBJECT="$1"
BODY="$2"
EMAIL="HELO ${HOSTNAME}
......
......@@ -21,6 +21,7 @@ function sendFeedback() {
case 0:
subject = ""
alert('Please choose a category')
ipcRenderer.send('log', 'ORNL Toolbox: No feedback email category selected - request aborted', 'err')
return
case 1:
subject = "Bug Report"
......@@ -48,13 +49,18 @@ function sendFeedback() {
command = `bash /opt/ornltoolbox/resources/app/feedback/feedback-emailer.sh "ORNL Toolbox Feedback: ${subject}" "${body}"`
//Send the feedback email
execSync(command, (error, stdout, stderr) => {
var result = execSync(command, (error, stdout, stderr) => {
if(stderr) {
alert(`${stderr}`)
ipcRenderer.send('log', 'ORNL Toolbox: Completed feedback email request', 'info')
return 1
}
})
if(result == 1) {
ipcRenderer.send('log', 'ORNL Toolbox: Failed to send the feedback email - request aborted', 'err')
return
}
alert('Feedback sent')
ipcRenderer.send('log', 'ORNL Toolbox: Completed feedback email request', 'info')
let feedWin = remote.getGlobal('addWindow')
......
#! /bin/bash
RECIPIENT='t0y@ornl.gov' #helpline@ornl.gov
RECIPIENT='helpline@ornl.gov'
SUBJECT="$1"
BODY="$2"
EMAIL="HELO ${HOSTNAME}
......
......@@ -51,7 +51,7 @@ longDescription="${long}"`, (err) => {
if(result == 1) {
ipcRenderer.send('log', 'ORNL Toolbox: Error creating the help email - request aborted', 'err')
} else {
ipcRenderer.send('log', 'ORNL Toolbox: Help email successfully createWindow', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Help email successfully created', 'info')
}
command = `bash /opt/ornltoolbox/resources/app/help/help-emailer.sh "${subject}" "$(cat /tmp/ToolboxEmail.txt)"`
......@@ -61,13 +61,12 @@ longDescription="${long}"`, (err) => {
result = execSync(command, (error, stdout, stderr) => {
if(stderr) {
alert(`${stderr}`)
ipcRenderer.send('log', 'ORNL Toolbox: Failed to send the help email', 'err')
return 1
}
})
if(result == 1) {
ipcRenderer.send('log', 'ORNL Toolbox: Error sending the help email - request aborted', 'err')
ipcRenderer.send('log', 'ORNL Toolbox: Failed to send the help email - request aborted', 'err')
return
}
......
......@@ -259,7 +259,7 @@ function createWindow() {
var menu = Menu.buildFromTemplate(menuTemplate);
Menu.setApplicationMenu(menu); //Sets the template as the app menu
//mainWindow.openDevTools() //Opens dev tools on start
mainWindow.openDevTools() //Opens dev tools on start
}
function addWin(file, title, width, height) {
......@@ -310,7 +310,7 @@ function addWin(file, title, width, height) {
})
addWindow.setMenu(null)
//addWindow.openDevTools()
addWindow.openDevTools()
}
}
......
......@@ -2,6 +2,7 @@ const shell = require('electron').shell
//Open the given url in the default browser
function openURL(url) {
if(!ipcRenderer) var ipcRenderer = require('electron').ipcRenderer
ipcRenderer.send('log', `ORNL Toolbox: Opened ${url}`, 'info')
shell.openExternal(`${url}`)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment