Added JSDoc for src/

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson 2023-01-05 22:55:51 +00:00
parent caff9ca736
commit dc8289df12
No known key found for this signature in database
GPG key ID: BF229DCFD4748E05
10 changed files with 119 additions and 1 deletions

View file

@ -91,11 +91,16 @@ export default {
},
methods: {
/** Confirm deletion of docker host */
deleteConfirm() {
this.modal.hide();
this.$refs.confirmDelete.show();
},
/**
* Show specified docker host
* @param {number} dockerHostID
*/
show(dockerHostID) {
if (dockerHostID) {
let found = false;
@ -126,6 +131,7 @@ export default {
this.modal.show();
},
/** Add docker host */
submit() {
this.processing = true;
this.$root.getSocket().emit("addDockerHost", this.dockerHost, this.id, (res) => {
@ -144,6 +150,7 @@ export default {
});
},
/** Test the docker host */
test() {
this.processing = true;
this.$root.getSocket().emit("testDockerHost", this.dockerHost, (res) => {
@ -152,6 +159,7 @@ export default {
});
},
/** Delete this docker host */
deleteDockerHost() {
this.processing = true;
this.$root.getSocket().emit("deleteDockerHost", this.id, (res) => {

View file

@ -42,6 +42,11 @@ export default {
HiddenInput,
},
methods: {
/**
* Get the URL for telegram updates
* @param {string} [mode=masked] Should the token be masked?
* @returns {string} formatted URL
*/
telegramGetUpdatesURL(mode = "masked") {
let token = `<${this.$t("YOUR BOT TOKEN HERE")}>`;
@ -55,6 +60,8 @@ export default {
return `https://api.telegram.org/bot${token}/getUpdates`;
},
/** Get the telegram chat ID */
async autoGetTelegramChatID() {
try {
let res = await axios.get(this.telegramGetUpdatesURL("withToken"));

View file

@ -191,6 +191,7 @@ export default {
location.reload();
},
/** Show confirmation dialog for disable auth */
confirmDisableAuth() {
this.$refs.confirmDisableAuth.show();
},