Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Merge of Branch master into Branch dev #5

Merged
merged 7 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .vs/CompuTrack/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .vs/CompuTrack/v17/.futdcache.v2
Binary file not shown.
Binary file added .vs/CompuTrack/v17/.suo
Binary file not shown.
Binary file added .vs/CompuTrack/v17/.wsuo
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
9 changes: 9 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ExpandedNodes": [
"",
"\\Neo",
"\\Neo\\WinFormsApp1"
],
"SelectedNode": "\\Neo\\WinFormsApp1\\Form1.cs",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
13 changes: 13 additions & 0 deletions CompuTrack.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"workbench.colorCustomizations": {
"minimap.background": "#00000000",
"scrollbar.shadow": "#00000000"
}
}
}
13 changes: 13 additions & 0 deletions CompuTrack.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E582CE53-7F70-4373-9C4D-58024322F8C7}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions Legacy/client/js/assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
fetch(new Request("/request?q=reqassets")).then(a => {a.text().then(b=>{
data = JSON.parse(b);
data.reqassets.forEach(element => {
document.getElementById("assetlist").innerHTML = document.getElementById("assetlist").innerHTML
+ `<tr class="Assets-Asset" id="${element["JCPS Tag"]}" onclick="selectIssue(${element['JCPS Tag']})"><td>${element['JCPS Tag']}</td><td>${element['Type']}</td><td>${element['Date Added']}</td><td>${element['Computer Model/Brand/Description']}</td><td>${element['Item Location']}</td></tr>`
});
})})


function selectIssue(elementid) {
Array.from(document.getElementsByClassName("Selected")).forEach(element => {element.className = "Issues-Issue"});
document.getElementById(elementid).className="Issues-Issue Selected"
}
19 changes: 19 additions & 0 deletions Legacy/client/js/comman.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class COMman {
constructor() {

this.components = {
/**
* @param {String} file
* @returns {HTMLElement} Output Element Cluster
*/
fetch: async function(file) {
return await fetch(new Request(file)).then(async(a)=>{return await a.text().then(content => {
var parser = new DOMParser();
const result = parser.parseFromString(content, "text/html");
return result;
})})
}
}
}
}
const ComponentManager = new COMman();
148 changes: 148 additions & 0 deletions Legacy/client/js/components/explorer/controls.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
class Controls {
static vars = {
selectmode:0,
selected:[]
}
static methods = {
toggleselectmode: function() {
if (Controls.vars.selectmode == 0) {
Controls.vars.selectmode = 1;
//document.getElementById("control-modeselector").innerHTML = "Select Mode (1)"
} else {
Controls.vars.selectmode = 0
//document.getElementById("control-modeselector").innerHTML = "Select Mode (0)"
}
}
}
static def = {
global: {
help: {
text: "Help",
icon: "help.svg",
click: openhelp("global")
}
},
devices: {
create: {
text: "Create New Record",
icon: "new.svg",
click: createRecord("devices")
},
properties: {
text: "Device Properties",
icon: "help.svg",
click: openhelp("devices"),
startoff: true,
customid: "control-properties"

},
newissue: {
text: "Create Issue",
icon: "help.svg",
click: openhelp("devices")

},
selectmode: {
text: "Select Mode (0)",
icon: "mode.svg",
click: this.methods.toggleselectmode(),
customid: "control-modeselector"
},
help: {
text: "Help",
icon: "help.svg",
click: openhelp("devices")
}
},
issues: {
create: {
text: "New Issue",
icon: "new.svg",
click: openhelp("issues")
},
properties: {
text: "Issue Properties",
icon: "help.svg",
click: openhelp("issues"),
startoff: true,
customid: "control-properties"
},
selectmode: {
text: "Select Mode (0)",
icon: "mode.svg",
click: this.methods.toggleselectmode(),
customid: "control-modeselector"
},
help: {
text: "Help",
icon: "help.svg",
click: openhelp("issues")
}
},
users: {
help: {
text: "help",
icon: "help.svg",
click: openhelp("users")
},
properties: {

}
},
hw: {
create: {
text: "New Record",
icon: "new.svg",
click: openhelp("issues")
},
properties: {
text: "Properties",
icon: "help.svg",
click: openhelp("issues"),
startoff: true,
customid: "control-properties"
},
selectmode: {
text: "Select Mode (0)",
icon: "mode.svg",
click: this.methods.toggleselectmode(),
customid: "control-modeselector"
},
help: {
text: "Help",
icon: "help.svg",
click: openhelp("issues")
}
}
}

// This defines what buttons, and in what order, appear on which panel.
static Layout = {
Global: [
this.def.global.help
],
Devices: [
this.def.devices.create,
this.def.devices.properties,
this.def.devices.newissue,
this.def.devices.selectmode,
this.def.devices.help
],
Issues: [
this.def.issues.create,
this.def.issues.properties,
this.def.issues.selectmode,
this.def.issues.help
],
Users: [
this.def.users.properties,
this.def.users.help
],
HW: [
this.def.hw.create,
this.def.hw.properties,
this.def.hw.selectmode,
this.def.hw.help
]
}
}
92 changes: 92 additions & 0 deletions Legacy/client/js/components/explorer/explorer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
class Explorer {
static sidebar = {
defs: {
// Template for Future Navigation Options
/*
internalid: {
text: "Display Text",
id: "HTML-ELement-ID",
type: [PAGE/TABLE/PANEL]
}
*/
$SEPERATOR$: {},
help: {
text: "Help",
id: "explorer-help",
type: "PAGE",
click: function() {alert("Not Implemented")}

},
devices: {
text: "Devices",
id: "explorer-table-computers",
type: "TABLE",
},
issues: {
text: "Issues",
id: "explorer-table-issues",
type: "TABLE"
},
users: {
text: "Users",
id: "explorer-table-users",
type: "TABLE"
},
hw: {
text: "Hardware",
id: "explorer-table-hw",
type: "TABLE"
},
createRecord: {
text: "Create Record...",
id: "explorer-crecord",
type: "PANEL",
click: function() {Panels.LoadPanel("CreateRecord")}
},
advancedSettings: {
text: "Advanced Settings",
id: "explorer-advset",
type: "PANEL",
click: function() {alert("Not Implemented")}
},
securityPermissions: {
text: "Security & Permissions",
id: "explorer-securitypanel",
type: "PANEL",
click: function() {alert("Not Implemented")}
}


}
}


// Occam's Razor.
static Layout = [
this.sidebar.defs.createRecord,


this.sidebar.defs.$SEPERATOR$,


this.sidebar.defs.devices,
this.sidebar.defs.issues,
this.sidebar.defs.hw,
this.sidebar.defs.users,


this.sidebar.defs.$SEPERATOR$,


this.sidebar.defs.advancedSettings,
this.sidebar.defs.securityPermissions,
this.sidebar.defs.help
]




static goto(loc) {
explorerGOTO(document.getElementById(loc))
}
}
43 changes: 43 additions & 0 deletions Legacy/client/js/components/explorer/objects.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class Objects {
static Panels = {
home : {
href:"/client/html/components/explorer/explorer-home.html",
id: "home"
},
recordCreate: {
href:"/client/html/components/explorer/explorer-recordcreator.html",
id: "CreateRecord"
},
properties: {
href:"/client/html/components/explorer/explorer-recordproperties.html",
id: "RecordProperties"
},
advancedSettings: {
href:"/client/html/components/explorer-home.html"
},
securityPermissions: {
href:"/client/html/components/explorer-home.html"
},
help: {
href:"/client/html/components/explorer-home.html"
}
}
static Layouts = {
Panels: [

]
}
/**
* @returns {(Object|Boolean)} Object requested, or False.
* @param {String} query
*/
static Fetch(query) {
for (const i in this.Panels) {
if (query == this.Panels[i].id) {
return this.Panels[i]
}
}
console.warn("Attempted fetch of unknown object ID!")
return false
}
}
11 changes: 11 additions & 0 deletions Legacy/client/js/components/explorer/panels.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Panels {
static LoadPanel(panel) {
const content = document.getElementById("explorer-table");
const panelOBJ = Objects.Fetch(panel);
if (panelOBJ == false) return panelOBJ;
const newpanel = document.createElement("iframe");
newpanel.id = "panel"
newpanel.src = panelOBJ.href;
content.appendChild(newpanel)
}
}
Loading