-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add new list data in instances * update jobs page adding history modal * avoid objet key access on Title and Subtitle * update gitignore to add logs build
- Loading branch information
Showing
21 changed files
with
2,266 additions
and
2,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<script setup> | ||
import { reactive, onBeforeMount, onMounted } from "vue"; | ||
import DashboardLayout from "@components/Dashboard/Layout.vue"; | ||
import BuilderLogs from "@components/Builder/Logs.vue"; | ||
import { useGlobal } from "@utils/global"; | ||
/** | ||
* @name Page/Logs.vue | ||
* @description This component is the logd page. | ||
This page allow to choose log files and view the logs. | ||
*/ | ||
const logs = reactive({ | ||
builder: "", | ||
}); | ||
onBeforeMount(() => { | ||
// Get builder data | ||
const dataAtt = "data-server-builder"; | ||
const dataEl = document.querySelector(`[${dataAtt}]`); | ||
const data = | ||
dataEl && !dataEl.getAttribute(dataAtt).includes(dataAtt) | ||
? JSON.parse(atob(dataEl.getAttribute(dataAtt))) | ||
: {}; | ||
logs.builder = data; | ||
}); | ||
/** | ||
* @name getLogContent | ||
* @description Redirect to the same page but with log name as query parameter to get the content of the log. | ||
* @returns {void} | ||
*/ | ||
function getLogContent() { | ||
window.addEventListener( | ||
"click", | ||
(e) => { | ||
// Case not wanted element | ||
if (!e.target.hasAttribute("data-setting-value")) return; | ||
if ( | ||
!e.target.closest("[data-field-container]").querySelector("[data-log]") | ||
) | ||
return; | ||
const value = e.target.getAttribute("data-setting-value"); | ||
const url = `${location.href}/logs?file=${value}`; | ||
// go to url | ||
location.href = url; | ||
}, | ||
true | ||
); | ||
} | ||
onMounted(() => { | ||
// Set the page title | ||
useGlobal(); | ||
getLogContent(); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<DashboardLayout> | ||
<div class="col-span-12 grid grid-cols-12 card"> | ||
<BuilderLogs v-if="logs.builder" :builder="logs.builder" /> | ||
</div> | ||
</DashboardLayout> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/x-icon" href="/img/favicon.ico" /> | ||
<link rel="stylesheet" href="/css/style.css" /> | ||
<link rel="stylesheet" href="/css/flag-icons.min.css" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>BunkerWeb | Logs</title> | ||
</head> | ||
<body> | ||
<div class="hidden" data-server-global='{"username" : "admin"}'></div> | ||
<div | ||
class="hidden" | ||
data-server-flash='[{"type" : "success", "title" : "title", "message" : "Success feedback"}, {"type" : "error", "title" : "title", "message" : "Error feedback"}, {"type" : "warning", "title" : "title", "message" : "Warning feedback"}, {"type" : "info", "title" : "title", "message" : "Info feedback"}]' | ||
></div> | ||
<div | ||
class="hidden" | ||
data-server-builder="W3sidHlwZSI6ICJjYXJkIiwgImNvbnRhaW5lckNvbHVtbnMiOiB7InBjIjogMTIsICJ0YWJsZXQiOiAxMiwgIm1vYmlsZSI6IDEyfSwgIndpZGdldHMiOiBbeyJ0eXBlIjogIlRpdGxlIiwgImRhdGEiOiB7InRpdGxlIjogImxvZ3NfdGl0bGUifX0sIHsidHlwZSI6ICJGaWVsZHMiLCAiZGF0YSI6IHsic2V0dGluZyI6IHsiaWQiOiAibG9ncy1zZWxlY3QtZmlsZSIsICJsYWJlbCI6ICJsb2dzX3NlbGVjdF9maWxlIiwgImlucFR5cGUiOiAic2VsZWN0IiwgIm5hbWUiOiAibG9ncy1zZWxlY3QtZmlsZSIsICJvbmx5RG93biI6IHRydWUsICJ2YWx1ZSI6ICIiLCAidmFsdWVzIjogWyJmaWxlMSIsICJmaWxlMiJdLCAiY29sdW1ucyI6IHsicGMiOiA0LCAidGFibGV0IjogNiwgIm1vYmlsZSI6IDEyfSwgIm1heEJ0bkNoYXJzIjogMjAsICJhdHRycyI6IHsiZGF0YS1sb2ciOiAidHJ1ZSJ9LCAicG9wb3ZlcnMiOiBbeyJpY29uTmFtZSI6ICJpbmZvIiwgInRleHQiOiAibG9nc19zZWxlY3RfZmlsZV9pbmZvIn1dfX19LCB7InR5cGUiOiAiRmllbGRzIiwgImRhdGEiOiB7InNldHRpbmciOiB7ImNvbnRhaW5lckNsYXNzIjogIm10LTQiLCAiaWQiOiAibG9ncy1maWxlLWNvbnRlbnQiLCAibGFiZWwiOiAibG9nc19maWxlX2NvbnRlbnQiLCAiaW5wVHlwZSI6ICJlZGl0b3IiLCAibmFtZSI6ICJsb2dzLWZpbGUtY29udGVudCIsICJ2YWx1ZSI6ICJnZWZlc2Zlc2ZzZWZlcyIsICJjb2x1bW5zIjogeyJwYyI6IDEyLCAidGFibGV0IjogMTIsICJtb2JpbGUiOiAxMn19fX1dfV0" | ||
></div> | ||
<div id="app"></div> | ||
<script type="module" src="logs.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createApp } from "vue"; | ||
import { createPinia } from "pinia"; | ||
import { getI18n } from "@utils/lang.js"; | ||
import Logs from "./Logs.vue"; | ||
|
||
const pinia = createPinia(); | ||
|
||
createApp(Logs) | ||
.use(pinia) | ||
.use(getI18n(["dashboard", "action", "inp", "icons", "logs"])) | ||
.mount("#app"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.