From 72483023391c3ee3d67625f9d50e5f58ec908aca Mon Sep 17 00:00:00 2001 From: SelfhostedPro Date: Tue, 20 Oct 2020 16:09:35 -0700 Subject: [PATCH 1/2] Added console logs --- .../applications/ApplicationDetails.vue | 2 -- .../applications/ApplicationsForm.vue | 26 +++++++++---------- .../resources/images/ImageDetails.vue | 1 - .../components/resources/images/ImageList.vue | 2 -- .../resources/volumes/VolumeList.vue | 2 -- .../src/components/serverSettings/Prune.vue | 3 --- .../serverSettings/ServerUpdate.vue | 1 - .../src/components/serverSettings/Theme.vue | 4 --- frontend/src/store/modules/apps.js | 1 - frontend/src/store/modules/auth.js | 15 ----------- frontend/src/store/modules/images.js | 3 --- frontend/src/store/modules/networks.js | 1 - frontend/src/store/modules/snackbar.js | 1 - frontend/src/store/modules/templates.js | 14 ---------- frontend/src/store/modules/volumes.js | 4 --- frontend/src/views/Home.vue | 3 --- 16 files changed, 12 insertions(+), 71 deletions(-) diff --git a/frontend/src/components/applications/ApplicationDetails.vue b/frontend/src/components/applications/ApplicationDetails.vue index c444254a..b04fe40b 100644 --- a/frontend/src/components/applications/ApplicationDetails.vue +++ b/frontend/src/components/applications/ApplicationDetails.vue @@ -133,7 +133,6 @@ export default { this.readAppStats(appName); }, readAppLogs(appName) { - console.log("Starting connection to Logs"); var proto = ""; if (location.protocol == "http:") { proto = "ws://"; @@ -160,7 +159,6 @@ export default { // this.connection.close("Leaving page or refreshing", 1001); }, readAppStats(appName) { - console.log("Starting connection to Stats"); var sproto = ""; if (location.protocol == "http:") { sproto = "ws://"; diff --git a/frontend/src/components/applications/ApplicationsForm.vue b/frontend/src/components/applications/ApplicationsForm.vue index a1836921..8e801946 100644 --- a/frontend/src/components/applications/ApplicationsForm.vue +++ b/frontend/src/components/applications/ApplicationsForm.vue @@ -259,7 +259,7 @@ Back @@ -337,7 +337,7 @@ Back @@ -423,7 +423,7 @@ Back @@ -431,13 +431,13 @@ - + Advanced - + Devices @@ -445,7 +445,7 @@ - +
- + Labels @@ -513,7 +513,7 @@ - + - + Sysctls (Kernel Options) - + - + Capabilities @@ -646,7 +646,7 @@ - + diff --git a/frontend/src/components/resources/images/ImageList.vue b/frontend/src/components/resources/images/ImageList.vue index 5dcf1dea..92863f90 100644 --- a/frontend/src/components/resources/images/ImageList.vue +++ b/frontend/src/components/resources/images/ImageList.vue @@ -237,8 +237,6 @@ export default { }, submit() { const data = this.form; - console.log("methods"); - console.log(data); this.writeImage(data); } }, diff --git a/frontend/src/components/resources/volumes/VolumeList.vue b/frontend/src/components/resources/volumes/VolumeList.vue index 0e36daf7..8f44c362 100644 --- a/frontend/src/components/resources/volumes/VolumeList.vue +++ b/frontend/src/components/resources/volumes/VolumeList.vue @@ -240,8 +240,6 @@ export default { }, submit() { const data = this.form; - console.log("methods"); - console.log(data); this.writeVolume(data); } }, diff --git a/frontend/src/components/serverSettings/Prune.vue b/frontend/src/components/serverSettings/Prune.vue index a9feff44..30daea96 100644 --- a/frontend/src/components/serverSettings/Prune.vue +++ b/frontend/src/components/serverSettings/Prune.vue @@ -100,11 +100,8 @@ export default { responseType: "text/json" }) .then(response => { - console.log(response.data); let action = Object.keys(response.data)[0]; - console.log(action); if (response.data[action] != null) { - console.log(response.data[action].length); var deletedNumber = response.data[action].length; } else { deletedNumber = "0"; diff --git a/frontend/src/components/serverSettings/ServerUpdate.vue b/frontend/src/components/serverSettings/ServerUpdate.vue index 86946f17..251ed5b7 100644 --- a/frontend/src/components/serverSettings/ServerUpdate.vue +++ b/frontend/src/components/serverSettings/ServerUpdate.vue @@ -59,7 +59,6 @@ export default { }) .then(response => { this.isLoading = false; - console.log(response); this.updatable = response.data; }) .catch(err => { diff --git a/frontend/src/components/serverSettings/Theme.vue b/frontend/src/components/serverSettings/Theme.vue index 376aaa40..5beaad8f 100644 --- a/frontend/src/components/serverSettings/Theme.vue +++ b/frontend/src/components/serverSettings/Theme.vue @@ -57,11 +57,7 @@ export default { } }, methods: { - backgroundColor(dark) { - console.log(dark); - }, setTheme(){ - console.log(this.$vuetify.theme.themes) localStorage.setItem("dark_theme", this.$vuetify.theme.dark.toString()); localStorage.setItem("theme", JSON.stringify(this.$vuetify.theme.themes)) }, diff --git a/frontend/src/store/modules/apps.js b/frontend/src/store/modules/apps.js index 24f08e6b..fe5f986b 100644 --- a/frontend/src/store/modules/apps.js +++ b/frontend/src/store/modules/apps.js @@ -84,7 +84,6 @@ const actions = { commit("setAction", ""); }); }, - readApp({ commit }, Name) { const url = `/api/apps/${Name}`; commit("setLoading", true); diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index 2204041f..77541977 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -77,21 +77,6 @@ const actions = { }); }); }, - // [AUTH_REFRESH]: ({ commit }) => { - // return new Promise((resolve) => { - // commit(AUTH_REQUEST); - // const url = "/api/auth/refresh"; - // axios - // .post(url, {}, { xsrfCookieName: "csrf_refresh_token", xsrfHeaderName: "X-CSRF-TOKEN", withCredentials: true }) - // .then((resp) => { - // resolve(resp); - // }) - // .catch((error) => { - // console.log(error); - // commit(AUTH_CLEAR); - // }); - // }); - // }, [AUTH_CHANGE_PASS]: ({ commit }, credentials) => { return new Promise((resolve, reject) => { commit(AUTH_REQUEST); diff --git a/frontend/src/store/modules/images.js b/frontend/src/store/modules/images.js index f82ad564..19bbc8bf 100644 --- a/frontend/src/store/modules/images.js +++ b/frontend/src/store/modules/images.js @@ -69,8 +69,6 @@ const actions = { writeImage({ commit }, payload) { commit("setLoading", true); const url = "/api/resources/images/"; - console.log("store"); - console.log(payload); axios .post(url, payload) .then(response => { @@ -92,7 +90,6 @@ const actions = { .get(url) .then(response => { const image = response.data; - console.log(response.data); commit("setImage", image); }) .catch(err => { diff --git a/frontend/src/store/modules/networks.js b/frontend/src/store/modules/networks.js index 0bccc72f..41b5eaf2 100644 --- a/frontend/src/store/modules/networks.js +++ b/frontend/src/store/modules/networks.js @@ -78,7 +78,6 @@ const actions = { .get(url) .then(response => { const network = response.data; - console.log(network); commit("setNetwork", network); }) .catch(err => { diff --git a/frontend/src/store/modules/snackbar.js b/frontend/src/store/modules/snackbar.js index 32136867..ce267bea 100644 --- a/frontend/src/store/modules/snackbar.js +++ b/frontend/src/store/modules/snackbar.js @@ -8,7 +8,6 @@ const state = { const mutations = { setErr(state, err) { - console.log(err); state.content = err.response.statusText + ": " + err.response.data.detail; state.bottom = true; state.btnColor = "white"; diff --git a/frontend/src/store/modules/templates.js b/frontend/src/store/modules/templates.js index bf82a1e8..d657f963 100644 --- a/frontend/src/store/modules/templates.js +++ b/frontend/src/store/modules/templates.js @@ -173,20 +173,6 @@ const actions = { }); }); }, - // readApp({ commit }, id) { - // commit("setLoading", true); - // const url = `/api/templates/app/${id}`; - // axios - // .get(url) - // .then((response) => { - // const app = response.data; - // console.log(response) - // commit("setApp", app); - // }) - // .finally(() => { - // commit("setLoading", false); - // }); - // }, readTemplateVariables({ commit }) { commit("setLoading", true); const url = "/api/settings/variables"; diff --git a/frontend/src/store/modules/volumes.js b/frontend/src/store/modules/volumes.js index 48a9a291..0ccad683 100644 --- a/frontend/src/store/modules/volumes.js +++ b/frontend/src/store/modules/volumes.js @@ -78,7 +78,6 @@ const actions = { .get(url) .then(response => { const volume = response.data; - console.log(volume); commit("setVolume", volume); }) .catch(err => { @@ -91,8 +90,6 @@ const actions = { writeVolume({ commit }, payload) { commit("setLoading", true); const url = "/api/resources/volumes/"; - console.log("store"); - console.log(payload); axios .post(url, payload) .then(response => { @@ -114,7 +111,6 @@ const actions = { .get(url) .then(response => { const volume = response.data; - console.log(response.data); commit("setVolume", volume); }) .catch(err => { diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index 2bf127a0..1136de92 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -82,7 +82,6 @@ export default { }, methods: { readAppStats() { - console.log("Starting connection to Websocket"); let url = "/api/users/me"; axios.get(url, { withCredentials: true }).catch(err => { localStorage.removeItem("username"); @@ -95,7 +94,6 @@ export default { } else { proto = "wss://"; } - console.log(location.protocol); this.statConnection = new WebSocket( `${proto}${location.hostname}:${location.port}/api/apps/stats` ); @@ -130,7 +128,6 @@ export default { }; }, refresh() { - console.log(this.stats); this.closeStats(); this.readAppStats(); }, From 78f7c32dc05355f8bcb0b1dfeaafb4e7c1f9283f Mon Sep 17 00:00:00 2001 From: SelfhostedPro Date: Tue, 20 Oct 2020 16:13:10 -0700 Subject: [PATCH 2/2] fixed ports not being added if network_mode is set --- backend/api/utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/api/utils.py b/backend/api/utils.py index a85569e3..51db8e25 100644 --- a/backend/api/utils.py +++ b/backend/api/utils.py @@ -128,8 +128,6 @@ def conv2dict(name, value): # '53/tcp': ('0.0.0.0', 53), # } def conv_ports2data(data, network, network_mode): - if network == "host" or network_mode == "host": - return None ports = {} for d in data: cport = d.cport