From: hadaq Date: Mon, 29 Dec 2025 15:32:43 +0000 (+0100) Subject: remove hadesroot, now qaweb X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=04cecbc08765f2d6363483f7d2728d4f653b06c5;p=hadesdaq.git remove hadesroot, now qaweb --- diff --git a/hadesroot/EMC.htm b/hadesroot/EMC.htm deleted file mode 100644 index 23e2049..0000000 --- a/hadesroot/EMC.htm +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - QA - EMC - - - - - - -
-
- - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/MDC.htm b/hadesroot/MDC.htm deleted file mode 100644 index 6b0bd2e..0000000 --- a/hadesroot/MDC.htm +++ /dev/null @@ -1,657 +0,0 @@ - - - - - - - QA - MDC - - - - - - -
-
- - - - - - - - - -
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/Main.htm b/hadesroot/Main.htm deleted file mode 100644 index eda738e..0000000 --- a/hadesroot/Main.htm +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - QA - Main - - - - - - -
-
- - - -
-
- - -
-
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
- diff --git a/hadesroot/Physics.htm b/hadesroot/Physics.htm deleted file mode 100644 index 0cb82fb..0000000 --- a/hadesroot/Physics.htm +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - - QA - Physics - - - - - - -
-
- - - - - - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/RICH.htm b/hadesroot/RICH.htm deleted file mode 100644 index 3f70de1..0000000 --- a/hadesroot/RICH.htm +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - QA - RICH - - - - - - -
-
- - - - - - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/RPC.htm b/hadesroot/RPC.htm deleted file mode 100644 index f984fab..0000000 --- a/hadesroot/RPC.htm +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - QA - RPC - - - - - - -
-
- - - - - - - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/hadesroot/Start.htm b/hadesroot/Start.htm deleted file mode 100644 index 19af689..0000000 --- a/hadesroot/Start.htm +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - QA - Start - - - - - - -
-
- - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/TDC.htm b/hadesroot/TDC.htm deleted file mode 100644 index 0b33dae..0000000 --- a/hadesroot/TDC.htm +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - QA - Main - - - - - - -
-
- - - - - - - - - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - diff --git a/hadesroot/TOF.htm b/hadesroot/TOF.htm deleted file mode 100644 index cdeb578..0000000 --- a/hadesroot/TOF.htm +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - QA - TOF - - - - - - -
-
- - - - - -
-
- - -
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/WALL.htm b/hadesroot/WALL.htm deleted file mode 100644 index dfa5ecb..0000000 --- a/hadesroot/WALL.htm +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - QA - WALL - - - - - - -
-
- - - - - - - - -
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- diff --git a/hadesroot/files/TemplateTH1.json b/hadesroot/files/TemplateTH1.json deleted file mode 100644 index a9c18cd..0000000 --- a/hadesroot/files/TemplateTH1.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_typename": "TH1F", - "fUniqueID": 0, - "fBits": 520, - "fName": "REPLACEME", - "fTitle": "REPLACEME", - "fLineColor": 2, - "fLineStyle": 1, - "fLineWidth": 1, - "fFillColor": 0, - "fFillStyle": 1001, - "fMarkerColor": 1, - "fMarkerStyle": 1, - "fMarkerSize": 1, - "fNcells": -31415, - "fXaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "xaxis", - "fTitle": "REPLACEME", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.035, - "fTickLength": 0.03, - "fTitleOffset": 1, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": -31415, - "fXmin": 0, - "fXmax": -31415, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fYaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "yaxis", - "fTitle": "REPLACEME", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.035, - "fTickLength": 0.03, - "fTitleOffset": 0, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": 1, - "fXmin": 0, - "fXmax": 1, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fZaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "zaxis", - "fTitle": "", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.035, - "fTickLength": 0.03, - "fTitleOffset": 1, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": 1, - "fXmin": 0, - "fXmax": 1, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fBarOffset": 0, - "fBarWidth": 1000, - "fEntries": 0, - "fTsumw": 0, - "fTsumw2": 0, - "fTsumwx": 0, - "fTsumwx2": 0, - "fMaximum": -1111, - "fMinimum": -1111, - "fNormFactor": 0, - "fContour": [], - "fSumw2": [], - "fOption": "hist", - "fFunctions": { - "_typename": "TList", - "name": "TList", - "arr": [], - "opt": [] - }, - "fBufferSize": 0, - "fBuffer": [], - "fBinStatErrOpt": 0, - "fStatOverflows": 2, - "fArray": [] -} diff --git a/hadesroot/files/TemplateTH2.json b/hadesroot/files/TemplateTH2.json deleted file mode 100644 index 73ae6c6..0000000 --- a/hadesroot/files/TemplateTH2.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "_typename": "TH2F", - "fUniqueID": 0, - "fBits": 520, - "fName": "REPLACEME", - "fTitle": "REPLACEME", - "fLineColor": 2, - "fLineStyle": 1, - "fLineWidth": 1, - "fFillColor": 0, - "fFillStyle": 1001, - "fMarkerColor": 1, - "fMarkerStyle": 1, - "fMarkerSize": 1, - "fNcells": -31415, - "fXaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "xaxis", - "fTitle": "", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.05, - "fTickLength": 0.03, - "fTitleOffset": 1.15, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": -31415, - "fXmin": -31415, - "fXmax": -31415, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fYaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "yaxis", - "fTitle": "mbo", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.035, - "fTickLength": 0.03, - "fTitleOffset": 0, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": -31415, - "fXmin": -31415, - "fXmax": -31415, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fZaxis": { - "_typename": "TAxis", - "fUniqueID": 0, - "fBits": 0, - "fName": "zaxis", - "fTitle": "REPLACEME", - "fNdivisions": 510, - "fAxisColor": 1, - "fLabelColor": 1, - "fLabelFont": 42, - "fLabelOffset": 0.005, - "fLabelSize": 0.035, - "fTickLength": 0.03, - "fTitleOffset": 1, - "fTitleSize": 0.035, - "fTitleColor": 1, - "fTitleFont": 42, - "fNbins": 1, - "fXmin": 0, - "fXmax": 1, - "fXbins": [], - "fFirst": 0, - "fLast": 0, - "fBits2": 0, - "fTimeDisplay": false, - "fTimeFormat": "", - "fLabels": null, - "fModLabs": null - }, - "fBarOffset": 0, - "fBarWidth": 1000, - "fEntries": 0, - "fTsumw": 0, - "fTsumw2": 0, - "fTsumwx": 0, - "fTsumwx2": 0, - "fMaximum": -1111, - "fMinimum": -1111, - "fNormFactor": 0, - "fContour": [], - "fSumw2": [], - "fOption": "colz", - "fFunctions": { - "_typename": "TList", - "name": "TList", - "arr": [], - "opt": [] - }, - "fBufferSize": 0, - "fBuffer": [], - "fBinStatErrOpt": 0, - "fStatOverflows": 2, - "fScalefactor": 1, - "fTsumwy": 0, - "fTsumwy2": 0, - "fTsumwxy": 0, - "fArray": [] -} diff --git a/hadesroot/files/backupMap.json b/hadesroot/files/backupMap.json deleted file mode 100644 index 86b9a00..0000000 --- a/hadesroot/files/backupMap.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "EMC": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17" - ] - }, - "HODO": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "MDC": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "RICH": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "RPC": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "START": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "TOF": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "WALL": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - }, - "general": { - "2025_05_12": [ - "18_59_43" - ], - "2025_05_13": [ - "09_58_33", - "10_28_44", - "10_38_33", - "10_50_26", - "13_34_01", - "13_48_17", - "13_58_37" - ] - } -} diff --git a/hadesroot/files/functions.mjs b/hadesroot/files/functions.mjs deleted file mode 100644 index e029e07..0000000 --- a/hadesroot/files/functions.mjs +++ /dev/null @@ -1,206 +0,0 @@ -import * as root from '/jsroot/modules/main.mjs'; - -let first_call = {}; -export async function initUpdate(histnames, helptext, globalSettings) { - for (let t = 0; t < histnames.length; t++) { - first_call[t] = {}; - } - if (globalSettings) for (let [key, value] of Object.entries(globalSettings)) { - root.settings[key] = value; - } - // document.getElementsByClassName("tabcontent")[0].style.display = 'flex'; - // document.getElementsByClassName("tabcontent")[0].classList.add("active"); - - // Array.from(document.getElementsByClassName("tabcontent")).forEach(addhelp); - for (let tc = 0; tc < document.getElementsByClassName("tabcontent").length; tc++) { - for (let t = 0; t < document.getElementsByClassName("tabcontent")[tc].children.length; t++) { - addhelp(tc, t, helptext[tc][t]); - } - } -} - -function addhelp(tc, t, h) { - const obj = document.getElementsByClassName("tabcontent")[tc].children[t]; - const box = document.createElement("div"); - box.classList.add("help"); - box.innerHTML = h; - obj.append(box) -} - -function deepMerge(target, source) { - if (!source) - return target; - Object.entries(source).forEach(([key, value]) => { - if (value && typeof value === 'object' && !Array.isArray(value)) { - deepMerge(target[key] = target[key] || {}, value); - return; - } - target[key] = value; - }); - return target; -} - -function setPainterSettings(painter, settings) { - if (!settings) - return; - if (settings.PAINTER) - deepMerge(painter, settings.PAINTER); - if (settings.FRAME) - deepMerge(painter.getFramePainter(), settings.FRAME); - if (settings.PAD) - deepMerge(painter.getPadPainter(), settings.PAD); -} - -function createLegend(histo, histos, lbls, settings) { - let leg = root.create('TLegend'); - if (settings) Object.assign(leg, settings); - for (let [key, lbl] of Object.entries(lbls)) { - let entry = root.create('TLegendEntry'); - if (typeof lbl === 'object') { - deepMerge(entry, lbl); - entry.fObject = histos[key]; - } - else { - entry.fObject = histos[key]; - entry.fLabel = lbl; - entry.fOption = 'l'; - } - leg.fPrimitives.Add(entry); - } - if (!settings) - histo.fFunctions.Add(leg, 'autoplace'); - else - histo.fFunctions.Add(leg, ''); -} - -function createAxisLabels(lbl_names) { - const ret = root.create('THashList'); - for (let l = 0; l < lbl_names.length; l++) { - let lbl = root.create('TObjString'); - lbl.fString = lbl_names[l]; - lbl.fUniqueID = l + 1; - ret.Add(lbl, ''); - } - return ret; -} - -function AddH2(h1, h2) { - const nbinsXh1 = h1.fXaxis.fNbins; - const nbinsYh1 = h1.fYaxis.fNbins; - const nbinsXh2 = h2.fXaxis.fNbins; - const nbinsYh2 = h2.fYaxis.fNbins; - - // console.log(`In AddH2(${h1.fTitle}, ${h2.fTitle}`); - if (nbinsXh1 != nbinsXh2 || nbinsYh1 != nbinsYh2) { - console.warn('In function AddH2(h1, h2) axis dimensions not the same. Not Adding Histograms'); - return; - } - for (let iX = 0; iX <= nbinsXh1; iX++) for (let iY = 0; iY <= nbinsYh1; iY++) - h1.fArray[iX + (nbinsXh1 + 2) * iY] += h2.fArray[iX + (nbinsXh1 + 2) * iY]; -} - -async function getHisto(base, histname, filename, histoption) { - // console.log(base + histname + filename); - let histo = await root.httpRequest(base + histname + filename, 'object'); - // console.log(histo); - deepMerge(histo, histoption); - // console.log(histo); - histo.LABEL = histo?.LABEL == '' ? histo.fTitle : histo.LABEL; - if (histo.XLABEL) histo.fXaxis.fLabels = createAxisLabels(histo.XLABEL); - if (histo.YLABEL) histo.fYaxis.fLabels = createAxisLabels(histo.YLABEL); - if (histo.ZLABEL) histo.fZaxis.fLabels = createAxisLabels(histo.ZLABEL); - for (let i = 0; i < histo.CONTOURS; i++) histo.fContour[i] = -9999; - return histo; -} - -async function updateCanvas(t, i, base, histnames, filename, histoptions, first_call) { - if (!Array.isArray(histnames)) { - if (histnames === '') return false; - getHisto(base, histnames, filename, histoptions).then(async function(histo) { - let painter = await root.redraw(`t${t}d${i}`, histo, ''); - if (!first_call) { - setPainterSettings(painter, histo); - painter = await root.redraw(`t${t}d${i}`, histo, ''); - // first_call = true; - } - // console.log(histo); - // console.log(painter); - // console.log(painter.getFramePainter()); - // console.log(painter.getPadPainter()); - }); - } - else { - let promises = []; - for (let j = 0; j < histnames.length; j++) { - promises[j] = getHisto(base, histnames[j], filename, histoptions[j]); - } - Promise.all(promises).then(async function(histos) { - const label = Object.fromEntries( - histos.map((obj, index) => [index, obj.LABEL]).filter(([_, label]) => label !== undefined) - ); - const is2DStack = (histos[0]._typename.includes('TH2') && histos[0].STACK); - if (is2DStack) for (const histo of histos) AddH2(histos[0], histo); - const stack = root.createTHStack(...histos); - if (histos[0].fTitle) stack.fTitle = histos[0].fTitle; - if (label.length > 0 || histos[0].LEGENDNOAUTO) createLegend(histos[0], histos, label, histos[0].LEGENDNOAUTO); - let painter; - if (is2DStack) - painter = await root.redraw(`t${t}d${i}`, histos[0], ''); - else if (histos[0].STACK) - painter = await root.redraw(`t${t}d${i}`, stack, ''); - else - painter = await root.redraw(`t${t}d${i}`, stack, 'nostack'); - if (!first_call) { - setPainterSettings(painter, histos[0]); - if (is2DStack) - painter = await root.redraw(`t${t}d${i}`, histos[0], ''); - else if (histos[0].STACK) - painter = await root.redraw(`t${t}d${i}`, stack, ''); - else - painter = await root.redraw(`t${t}d${i}`, stack, 'nostack'); - // first_call = true; - } - // console.log(stack); - // console.log(histos[0]); - // console.log(painter); - // console.log(painter.getFramePainter()); - // console.log(painter.getPadPainter()); - }); - } - return true; -} - -function update_tab(t, histnames, histoptions, date, time) { - for (let i = 0; i < histnames[t].length; i++) { - let basename, filename; - if (date == 'LIVE' || date == '' || time == '') { - basename = '/qaweb/HadesQA/'; - filename = '/root.json.gz?compact=23'; - } - else { - basename = `downloads/backup/${date}/${time}/HadesQA/`; - filename = '.root.json.gz'; - } - first_call[t][i] = updateCanvas(t, i, basename, histnames[t][i], filename, histoptions[t][i], first_call[t][i]); - } -} - -export function update(histnames, histoptions, date, time) { - for (let t = 0; t < histnames.length; t++) { - let tablinks = document.getElementsByClassName("tablinks"); - if (!tablinks[t].className.includes("active")) - continue; - - update_tab(t, histnames, histoptions, date, time); - } -} - -export function updateOtherTabs(histnames, histoptions, date, time) { - for (let t = 0; t < histnames.length; t++) { - let tablinks = document.getElementsByClassName("tablinks"); - if (tablinks[t].className.includes("active")) - continue; - - update_tab(t, histnames, histoptions, date, time); - } -} diff --git a/hadesroot/files/functions_base.mjs b/hadesroot/files/functions_base.mjs deleted file mode 100644 index 6a0e203..0000000 --- a/hadesroot/files/functions_base.mjs +++ /dev/null @@ -1,170 +0,0 @@ -export function openTabURL() { - const params = new URL(document.location.href).searchParams; - const tab = params.get("tab"); - const tablinks = document.getElementsByClassName("tablinks"); - let index = 0; - for (let i = 0; i < tablinks.length; i++) { - if (tablinks[i].getAttribute("onclick").includes(tab)) - index = i; - } - const tabcontent = document.getElementsByClassName("tabcontent"); - for (let i = 0; i < tabcontent.length; i++) { - tabcontent[i].classList.remove("active"); - } - - for (let i = 0; i < tablinks.length; i++) { - tablinks[i].classList.remove("active"); - } - tabcontent[index].classList.add("active"); - tablinks[index].classList.add("active"); -} - -export function openTab(evt, name) { - // Get all elements with class="tabcontent" and hide them - const tabcontent = document.getElementsByClassName("tabcontent"); - for (let i = 0; i < tabcontent.length; i++) { - tabcontent[i].classList.remove("active"); - } - - // Get all elements with class="tablinks" and remove the class "active" - const tablinks = document.getElementsByClassName("tablinks"); - for (let i = 0; i < tablinks.length; i++) { - tablinks[i].classList.remove("active"); - } - - // Show the current tab, and add an "active" class to the button that opened the tab - document.getElementById(name).classList.add("active"); - evt.currentTarget.classList.add("active"); - - updateURL(); -} - -export function updateDay(name) { - fetch('files/backupMap.json') - .then(response => response.json()) - .then(timeMap => { - const daySelect = document.getElementById('daySel'); - let currVal = daySelect.value; - if (!currVal) { - let params = new URL(document.location.href).searchParams; - currVal = params.get("date"); - } - daySelect.innerHTML = ''; - if (!timeMap[name]) { - updateTime(name); - return; - } - for (let day of Object.keys(timeMap[name])) { - const option = document.createElement('option'); - option.value = day; - option.textContent = day; - daySelect.appendChild(option); - } - if (Array.from(daySelect.options).some(option => option.value === currVal)) - daySelect.value = currVal; - - updateTime(name); - }); -} - -export function updateTime(name) { - fetch('files/backupMap.json') - .then(response => response.json()) - .then(timeMap => { - const daySelect = document.getElementById('daySel'); - const timeSelect = document.getElementById('timeSel'); - const selectedDay = daySelect.value; - let currVal = timeSelect.value; - if (!currVal) { - let params = new URL(document.location.href).searchParams; - currVal = params.get("time"); - } - - while (timeSelect.firstChild) { - timeSelect.removeChild(timeSelect.lastChild); - } - if (!timeMap[name] || !timeMap[name][selectedDay]) { - updateURL(); - return; - } - - timeMap[name][selectedDay].forEach(time => { - const option = document.createElement('option'); - option.value = time; - option.textContent = time; - timeSelect.appendChild(option); - }); - if (Array.from(timeSelect.options).some(option => option.value === currVal)) - timeSelect.value = currVal; - if (!timeSelect.value) - timeSelect.value = timeSelect.firstChild.value; - - updateURL(); - }); -} - -export function updateURL() { - const url = new URL(document.location.href); - const params = url.searchParams; - const selectedDay = document.getElementById('daySel').value; - if (selectedDay && selectedDay != 'LIVE') { - params.set('date', selectedDay); - const selectedTime = document.getElementById('timeSel').value; - params.set('time', selectedTime); - } - else { - params.delete('date'); - params.delete('time'); - } - const tabcontent = document.getElementsByClassName("tabcontent"); - let selectedTab = 0; - for (let t = 0; t < tabcontent.length; t++) { - if (tabcontent[t].classList.contains("active")) - selectedTab = tabcontent[t].id; - } - params.set('tab', selectedTab); - window.history.pushState({}, '', url); -} - -export function createPalette(p, v, n = 100) { - let min = p[0]; - let max = p[p.length - 1]; - let range = max - min; - let grad = []; - p[0] = 0; - p[p.length - 1] = 1; - for (let i = 1; i < p.length - 1; i++) { - p[i] = (p[i] - min) / range; - } - let r = [], g = [], b = []; - for (let i = 0; i < v.length; i++) { - if (v[i] == 'red') { r[i] = 0xff; g[i] = 0; b[i] = 0; } - else if (v[i] == 'yellow') { r[i] = 0xff; g[i] = 0xff; b[i] = 0; } - else if (v[i] == 'violet') { r[i] = 0xff; g[i] = 0; b[i] = 0xff; } - else if (v[i] == 'orange') { r[i] = 0xff; g[i] = 0x80; b[i] = 0; } - else if (v[i] == 'black') { r[i] = 0; g[i] = 0; b[i] = 0; } - else if (v[i] == 'blue') { r[i] = 0; g[i] = 0; b[i] = 0xa0; } - else if (v[i] == 'green') { r[i] = 0; g[i] = 0xff; b[i] = 0; } - else { - r[i] = parseInt(v[i].substring(1, 3), 16); - g[i] = parseInt(v[i].substring(3, 5), 16); - b[i] = parseInt(v[i].substring(5, 7), 16); - } - } - let num = 0; - for (let i = 1; i < n; i++) { - let numg = Math.floor(n * p[i]) - Math.floor(n * p[i - 1]); - for (let c = 0; c < numg; c++) { - grad[num] = "rgb("; - grad[num] += Math.round(r[i - 1] + c * (r[i] - r[i - 1]) / numg); - grad[num] += ','; - grad[num] += Math.round(g[i - 1] + c * (g[i] - g[i - 1]) / numg); - grad[num] += ','; - grad[num] += Math.round(b[i - 1] + c * (b[i] - b[i - 1]) / numg); - grad[num] += ')'; - num++; - } - } - - return grad; -} diff --git a/hadesroot/files/tab.css b/hadesroot/files/tab.css deleted file mode 100644 index ef61729..0000000 --- a/hadesroot/files/tab.css +++ /dev/null @@ -1,188 +0,0 @@ -body { - height: calc(100vh - 30px); - margin:0; - padding:0; - margin-top:25px; - } - -.tabcontent { - visibility: hidden; /* establish flex container */ - flex-wrap: wrap; /* enable flex items to wrap */ - justify-content: space-around; -/* padding: 6px 12px; */ -/* border: 1px solid #ccc; */ - border-top: none; - width:100%; - height:calc(100vh - 30px); - position:absolute; - display: flex; -} - -.tabcontent>div>div { - width:100%; - height:100%; -} - -.tabcontent>div { -/* padding: 5px; */ -/* margin-bottom: 5px; */ - background-color: #999; - border:1px solid #aaa; - position:relative; - -} - -.tabcontent.active { - visibility:visible; - } - -.tabcontent.cell1_2x1 { - display: grid; - } - -.cell6x4>div { - flex: 1 1 16%; - height: calc(25vh - 10px); -} - -.cell3x3>div { - flex: 1 1 33%; - height: calc(33vh - 15px); -} - -.cell3x2>div { - flex: 1 1 33%; - height: calc(50vh - 15px); -} - -.cell1_2x1 { - grid-template-columns: 60% 40%; - grid-template-areas: "a b " "a c"; - } -.cell1_2x1>div:first-child { - grid-area: a; - height: calc(100vh - 30px); -} -.cell1_2x1>div:nth-child(2) { - grid-area: b; - height: calc(50vh - 15px); -} -.cell1_2x1>div:nth-child(3) { - grid-area: c; - height: calc(50vh - 15px); -} - -.cell3x1>div { - flex: 1 1 33%; - height: calc(100vh - 40px); -} - -.cell2x2>div { - flex: 1 1 49%; - height: calc(50vh - 20px); -} - -.cell2x1>div { - flex: 1 1 49%; - height: calc(100vh - 40px); -} - -.cell1x1>div { - flex: 1 1 99%; - height: calc(100vh - 40px); -} -.tab { - position:absolute; - top: 0px; - width: calc(100% - 2px); - z-index:1; - overflow: hidden; - border: 1px solid #ccc; - height: 25px; - max-height: 25px; - padding: 0; - margin: 0; - background-color: #f1f1f1; - display: flex; - justify-content: space-between; - align-items: center; - /* flex-wrap: wrap; */ - gap: 0; - -} - -.tab-buttons { - display: flex; -} - -.tab button, -.tab a button { - background-color: inherit; - float: left; - border: 1px solid #aaa; - outline: none; - cursor: pointer; - padding: 5px 20px; - transition: 0.3s; - border-radius:10px 10px 0 0; - flex-shrink: 0; -} - -.selector { - display: flex; -} - -.selector select { - background-color: inherit; - top: 5px; - float: right; - border: 1px solid #aaa; - outline: none; - cursor: pointer; - padding: 5px 20px; - transition: 0.3s; - border-radius:10px 10px 0 0; -} - -.tab button:hover { - background-color: #ddd; -} - -.tab button.active { - background-color: #fff; -} - - -.tabcontent .help { - position:absolute; - top:0; - right:0; - max-width:1em; - max-height:1.2em; - overflow:hidden; - background:#eed; - text-align:center; - z-index:2; - transition: max-width 200ms, max-height 200ms; -} - -.tabcontent .help:hover { - max-width:none; - max-height:none; - text-align:left; - background:#ddd; - overflow:auto; - width:200px; - height:200px; - font-size:80%; - margin:5px; - padding:5px; - border:1px solid black; -} - -.tabcontent .help::before{ - content:"?"; -} -.tabcontent .help:hover::before{ - content:""; -} diff --git a/hadesroot/icons/android-chrome-192x192.png b/hadesroot/icons/android-chrome-192x192.png deleted file mode 100644 index bf4c6c1..0000000 Binary files a/hadesroot/icons/android-chrome-192x192.png and /dev/null differ diff --git a/hadesroot/icons/android-chrome-512x512.png b/hadesroot/icons/android-chrome-512x512.png deleted file mode 100644 index 88a5655..0000000 Binary files a/hadesroot/icons/android-chrome-512x512.png and /dev/null differ diff --git a/hadesroot/icons/apple-touch-icon.png b/hadesroot/icons/apple-touch-icon.png deleted file mode 100644 index 1ea451e..0000000 Binary files a/hadesroot/icons/apple-touch-icon.png and /dev/null differ diff --git a/hadesroot/icons/favicon-16x16.png b/hadesroot/icons/favicon-16x16.png deleted file mode 100644 index 5c069c7..0000000 Binary files a/hadesroot/icons/favicon-16x16.png and /dev/null differ diff --git a/hadesroot/icons/favicon-32x32.png b/hadesroot/icons/favicon-32x32.png deleted file mode 100644 index 8b67c5e..0000000 Binary files a/hadesroot/icons/favicon-32x32.png and /dev/null differ diff --git a/hadesroot/icons/favicon.ico b/hadesroot/icons/favicon.ico deleted file mode 100644 index 930df26..0000000 Binary files a/hadesroot/icons/favicon.ico and /dev/null differ diff --git a/hadesroot/index.htm b/hadesroot/index.htm deleted file mode 100644 index b14a24f..0000000 --- a/hadesroot/index.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - Hades Online QA - - -
 
-

HADES Online QA

-
- - - - - - - - - -