Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: Dump Docker Logs Functionality #1593

Merged
merged 3 commits into from
Dec 11, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.tabSize": 2,
"editor.detectIndentation": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,40 +209,8 @@ const linkPicker = async (item) => {
};

const setSelectedLinks = () => {

if (configNetwork.value.id === 1 || currentNetwork.value.id === 1) {

selectedLinks.value = installStore.mainnet;
} else if (configNetwork.value.id === 2 || currentNetwork.value.id === 2) {
selectedLinks.value = installStore.georli;
} else if (currentNetwork.value.id === 3 || currentNetwork.value.id === 3) {
selectedLinks.value = installStore.sepolia;
} else if (configNetwork.value.id === 4 || currentNetwork.value.id === 4) {
selectedLinks.value = installStore.gnosis;
} else if (configNetwork.value.id === 5 || currentNetwork.value.id === 5) {
selectedLinks.value = installStore.holesky;
}
selectedLinks.value = installStore[manageStore.currentNetwork.network];
};

// const setSelectedLinks = () => {
// switch (configNetwork.value.id) {
// case 1:
// selectedLinks.value = installStore.mainnet;
// break;

// case 2:
// selectedLinks.value = installStore.georli;
// break;
// case 3:
// selectedLinks.value = installStore.sepolia;
// break;
// case 4:
// selectedLinks.value = installStore.gnosis;
// break;
// default:
// break;
// }
// };
</script>
<style scoped>
.extentions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
</div>
</template>
<script>
import ControlService from "@/store/ControlService";
import JSZip from "jszip";
import { saveAs } from "file-saver";
export default {
emit: ["remove-items", "close-me", "back-to-login"],
data() {
Expand Down Expand Up @@ -95,11 +98,28 @@ export default {
},
methods: {
//dummy method to simulate the nuke process
dumpLogs() {
async dumpLogs() {
this.loadingDump = true;
setTimeout(() => {
this.loadingDump = false;
}, 4000);
const allLogs = await ControlService.dumpDockerLogs();
this.exportLogs(allLogs);
this.loadingDump = false;
},
exportLogs(logs) {
try {
if (logs.length > 0) {
const zip = new JSZip();

logs.forEach((item) => {
zip.file(item.containerId, item.logs.stdout);
});

zip.generateAsync({ type: "blob" }).then(function (blob) {
saveAs(blob, "stereum_logs.zip");
});
}
} catch (err) {
console.log("Failed exporting config: ", err);
}
},
//end dummy method
disableAutoScroll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<span>{{ $t("nodeSidebarVideo.rpc") }}</span>
</div>
</div>
<div v-if="currentNetwork.id !== 4" class="tutorial-btn" @click="stakeGuide = true">
<div v-if="currentNetwork.network !== 'gnosis'" class="tutorial-btn" @click="stakeGuide = true">
<div class="icon-box camera">
<img src="/img/icon/tutorial-icons/Guide-icon.png" alt="" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,7 @@ const linkPicker = (item) => {
btnActive.value = true;
};
const setSelectedLinks = () => {
switch (nodeManageStore.currentNetwork.id) {
case 1:
selectedLinks.value = clickInstallStore.mainnet;
break;
case 2:
selectedLinks.value = clickInstallStore.georli;
break;
case 3:
selectedLinks.value = clickInstallStore.sepolia;
break;
case 4:
selectedLinks.value = clickInstallStore.gnosis;
break;
default:
break;
}
selectedLinks.value = clickInstallStore[nodeManageStore.currentNetwork.network];
};
</script>

Expand Down
Loading
Loading