Commit 0b09fe34 authored by Tristan A Spakes's avatar Tristan A Spakes

Adding click logging for all 5 of the currently available front page buttons

parent 9291bde1
Pipeline #23214 failed with stages
in 3 seconds
//Loads the badgeManagement major page and closes minor windows
function badgeManWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"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')
//Destroying any minor windows that were opened from the main window
ipcRenderer.send('close minor window')
// Change main window to file system management window
......
//Change to IT Support and Services page after closing the minor window
function itsWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"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,10 +370,11 @@ ipcMain.on('close minor window', () => {
ipcMain.on('log', (event, message, level) => {
try {
execSync(`ls`)
//execSync(`echo "${message}" | logger -p local0.${level}`)
console.log("got here")
execSync(`echo '${message}' | logger -p local0.${level}`)
console.log("got here 2")
} catch(error) {
alert(error)
console.log("got here 3")
console.error(error)
return
}
......
//Loads the software major page and closes minor windows
function softManWin() {
ipcRenderer.send('log', 'ORNL-Toolbox: Clicked \"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: Clicked \"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