Commit 38ec2920 authored by Tristan A Spakes's avatar Tristan A Spakes

Changing log message from 'clicked' to 'opened'. Added logging for the opening of secondary windows

parent 0b09fe34
Pipeline #23225 passed with stages
in 1 minute and 11 seconds
//Loads the badgeManagement major page and closes minor windows
function badgeManWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"Badge Management\"', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Opened \"Badge Management\"', 'info')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to badge management window
......
//Change to file system management page after closing the minor window
function fileSysWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"File System Management\"', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Opened \"File System Management\"', 'info')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to file system management window
......
......@@ -27,7 +27,7 @@ function help() {
var subject = "Help Request from ORNL Toolbox"
//William Key's email receiver requires two newlines to process a ticket correctly
//This strangeness is to allow users to type ' " and ` freely
//This strangeness is to allow users to type ', ", and ` freely
fs.writeFileSync("/tmp/ToolboxEmail.txt", String.raw`uid="${replyTo}"
deviceName="${hostname}"
......
......@@ -71,15 +71,15 @@
<div id="ButtonSecurity" onclick="openSoftware(1)">0</div>
</span>
<span title="Opens an application page for submitting feedback regarding ORNL Toolbox.">
<div class="feedbackContainer" onclick="addWinMain('./feedback/feedback.html', 'Give Feedback', 500, 300)">
<div class="feedbackContainer" onclick="addWinMain('./feedback/feedback.html', 'Feedback', 500, 300)">
<div class="feedbackImage">
<img src="./images/comment-white-oval-bubble-shape.png" alt="White Chat Bubble">
</div>
<div class="feedbackText"><font color="white"><font color="white">Feedback</font></div>
</div>
</span>
<span title="Opens an application page for seeking help regarding an issue you are experiencing." onload="loadBadges()">
<div class="helpContainer" onclick="addWinMain('./help/help.html', 'Email to Support', 500, 400)">
<span title="Opens an application page for seeking help regarding an issue being experienced." onload="loadBadges()">
<div class="helpContainer" onclick="addWinMain('./help/help.html', 'Help', 500, 400)">
<div class="helpImage">
<img src="./images/help-web-button-white.png" alt="Question Mark">
</div>
......
//Change to IT Support and Services page after closing the minor window
function itsWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"IT Services & Support\"', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Opened \"IT Services & Support\"', 'info')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to IT Services and Support window
......
......@@ -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) {
......@@ -370,11 +370,8 @@ ipcMain.on('close minor window', () => {
ipcMain.on('log', (event, message, level) => {
try {
console.log("got here")
execSync(`echo '${message}' | logger -p local0.${level}`)
console.log("got here 2")
} catch(error) {
console.log("got here 3")
console.error(error)
return
}
......
......@@ -4,5 +4,6 @@ const ipcRenderer = require('electron').ipcRenderer
//Sends a signal to the main process to open a new window
function addWinMain(file, title, width, height) {
ipcRenderer.send('log', `ORNL Toolbox: Opened \"${title}\"`, 'info')
ipcRenderer.send('new window', file, title, width, height)
}
//Loads the software major page and closes minor windows
function softManWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"Software Management\"', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Opened \"Software Management\"', 'info')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to software management window
......
......@@ -2,7 +2,7 @@ let addWin = remote.getGlobal('addWindow')
//Change to User Management page after closing the minor window
function userManWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"User & Group Management\"', 'info')
ipcRenderer.send('log', 'ORNL Toolbox: Opened \"User & Group Management\"', 'info')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to user management window
......
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