From f05eff0ec314012e667b413d0299068c6ebea4c8 Mon Sep 17 00:00:00 2001 From: DhirajM09 Date: Tue, 25 Nov 2025 21:35:37 +0530 Subject: [PATCH 1/6] ngfw-15453 Added Google.vue component with get settings api integration --- .../settings/administration/Google.vue | 164 ++++++++++++++++++ .../source/src/layouts/AppDrawer.vue | 2 +- untangle-vue-ui/source/src/router/setting.js | 9 + untangle-vue-ui/source/src/store/settings.js | 35 ++++ 4 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 untangle-vue-ui/source/src/components/settings/administration/Google.vue diff --git a/untangle-vue-ui/source/src/components/settings/administration/Google.vue b/untangle-vue-ui/source/src/components/settings/administration/Google.vue new file mode 100644 index 000000000..69c515a17 --- /dev/null +++ b/untangle-vue-ui/source/src/components/settings/administration/Google.vue @@ -0,0 +1,164 @@ + + + diff --git a/untangle-vue-ui/source/src/layouts/AppDrawer.vue b/untangle-vue-ui/source/src/layouts/AppDrawer.vue index a3d297ae8..740450ba6 100644 --- a/untangle-vue-ui/source/src/layouts/AppDrawer.vue +++ b/untangle-vue-ui/source/src/layouts/AppDrawer.vue @@ -138,7 +138,7 @@ { name: 'admin', to: '/settings/administration/admin' }, { name: 'certificates', to: '' }, { name: 'snmp', to: '' }, - { name: 'google', to: '' }, + { name: 'google', to: '/settings/administration/google' }, ], }, { diff --git a/untangle-vue-ui/source/src/router/setting.js b/untangle-vue-ui/source/src/router/setting.js index 578ca932a..df27ae3c9 100644 --- a/untangle-vue-ui/source/src/router/setting.js +++ b/untangle-vue-ui/source/src/router/setting.js @@ -26,6 +26,7 @@ import DenialOfService from '@/components/settings/firewall/DenialOfService.vue' // Administration import Admin from '@/components/settings/administration/Admin.vue' import Logging from '@/components/settings/system/Logging.vue' +import Google from '@/components/settings/administration/Google.vue' export default [ { name: 'settings', @@ -36,6 +37,10 @@ export default [ path: 'network', redirect: 'network/interfaces', }, + { + path: 'administration', + redirect: 'administration/admin', + }, { path: 'system', redirect: 'system/settings', @@ -116,6 +121,10 @@ export default [ component: Admin, meta: { helpContext: 'administration' }, }, + { + path: 'administration/google', + component: Google, + }, { path: 'system/upgrade', component: Upgrade, diff --git a/untangle-vue-ui/source/src/store/settings.js b/untangle-vue-ui/source/src/store/settings.js index 127eaeb62..c255ca53a 100644 --- a/untangle-vue-ui/source/src/store/settings.js +++ b/untangle-vue-ui/source/src/store/settings.js @@ -2,6 +2,7 @@ import { set } from 'vue' import { cloneDeep } from 'lodash' import Util from '@/util/setupUtil' import util from '@/util/util' +import Rpc from '@/util/Rpc' const getDefaultState = () => ({ editCallback: null, @@ -15,6 +16,8 @@ const getDefaultState = () => ({ languageSettings: null, accessRuleSshEnabled: false, adminSetting: null, + googleSettings: null, + isGoogleDriveConnected: false, systemLogs: {}, // system logs stored by logName }) @@ -41,6 +44,8 @@ const getters = { shieldSettings: state => state?.shieldSettings || {}, accessRuleSshEnabled: state => state.accessRuleSshEnabled, adminSetting: state => state.adminSetting || {}, + googleSettings: state => state.googleSettings || {}, + isGoogleDriveConnected: state => state.isGoogleDriveConnected || false, /** * Get logs for a given log. * Usage: getters.getLogs('uvm') @@ -63,6 +68,8 @@ const mutations = { SET_LANGUAGE_SETTINGS: (state, value) => set(state, 'languageSettings', value), SET_ACCESS_RULE_SSH_ENABLED: (state, value) => set(state, 'accessRuleSshEnabled', value), SET_ADMIN_SETTINGS: (state, value) => set(state, 'adminSetting', value), + SET_GOOGLE_SETTINGS: (state, value) => set(state, 'googleSettings', value), + SET_IS_GOOGLE_DRIVE_CONNECTED: (state, value) => set(state, 'isGoogleDriveConnected', value), /** * Dynamically set logs for an app * Usage: commit('SET_LOGS', { logName: 'uvm', value: data }) @@ -198,6 +205,34 @@ const actions = { } }, + /* get Google Settings configuration */ + async getGoogleSettings({ state, commit }, refetch) { + try { + console.log(state, refetch) + if (state.googleSettings && !refetch) { + return + } + const result = Rpc.asyncPromise('rpc.UvmContext.googleManager.getSettings') + const data = await result() + commit('SET_GOOGLE_SETTINGS', data) + return { success: true, message: null, data } + } catch (err) { + Util.handleException(err) + } + }, + + /* check google drive connection status */ + async getIsGoogleDriveConnected({ commit }) { + try { + const result = Rpc.asyncPromise('rpc.UvmContext.googleManager.isGoogleDriveConnected') + const isConnected = await result() + commit('SET_IS_GOOGLE_DRIVE_CONNECTED', isConnected) + return { success: true, message: null, isConnected } + } catch (err) { + Util.handleException(err) + } + }, + /* setSystemSettings will update system regarding configurations */ setSystemSettings({ dispatch }, systemSettings) { try { From 6a76bdf0fb5e824b90e15bb863975a1064e53158 Mon Sep 17 00:00:00 2001 From: ShubhamJambhale-arista Date: Thu, 27 Nov 2025 11:09:15 +0530 Subject: [PATCH 2/6] ngfw-15426 upgrade yarn.lock with 1.60.13 (#292) --- untangle-vue-ui/source/yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/untangle-vue-ui/source/yarn.lock b/untangle-vue-ui/source/yarn.lock index 1571a6d3a..9467a286a 100644 --- a/untangle-vue-ui/source/yarn.lock +++ b/untangle-vue-ui/source/yarn.lock @@ -7996,8 +7996,8 @@ vuex@^3.6.2: integrity sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw== vuntangle@untangle/vuntangle: - version "1.60.10" - resolved "git+ssh://git@github.com/untangle/vuntangle.git#2108d2b8e83949cf05f1f2ac2c7b41648fd694e1" + version "1.60.13" + resolved "git+ssh://git@github.com/untangle/vuntangle.git#f4d777c62108d010135063773f0d12cf81cfec93" dependencies: "@ag-grid-community/client-side-row-model" "^25.3.0" "@ag-grid-community/core" "^25.3.0" From 35ad9be2d03116eb451fa0e89147b63501281259 Mon Sep 17 00:00:00 2001 From: DhirajM09 Date: Thu, 27 Nov 2025 19:30:17 +0530 Subject: [PATCH 3/6] ngfw-15453 setSettings and Google Picker Integration --- .../settings/administration/Google.vue | 59 +++++++++++-------- .../source/src/layouts/AppDrawer.vue | 24 ++++---- untangle-vue-ui/source/src/store/settings.js | 25 +++++++- 3 files changed, 71 insertions(+), 37 deletions(-) diff --git a/untangle-vue-ui/source/src/components/settings/administration/Google.vue b/untangle-vue-ui/source/src/components/settings/administration/Google.vue index 69c515a17..e3ceaa116 100644 --- a/untangle-vue-ui/source/src/components/settings/administration/Google.vue +++ b/untangle-vue-ui/source/src/components/settings/administration/Google.vue @@ -3,11 +3,10 @@ :settings="settings" @google-drive-configure="googleDriveConfigure" @google-drive-disconnect="googleDriveDisconnect" + @select-directory="selectRootDirectory" > - @@ -15,6 +14,7 @@ diff --git a/untangle-vue-ui/source/src/layouts/AppDrawer.vue b/untangle-vue-ui/source/src/layouts/AppDrawer.vue index 740450ba6..f1d1f2ccb 100644 --- a/untangle-vue-ui/source/src/layouts/AppDrawer.vue +++ b/untangle-vue-ui/source/src/layouts/AppDrawer.vue @@ -129,18 +129,6 @@ { name: 'troubleshooting', to: '/settings/network/troubleshooting' }, ], }, - { - name: 'administration', - icon: 'mdi-account-cog', - active: false, - match: '/settings/administration', - items: [ - { name: 'admin', to: '/settings/administration/admin' }, - { name: 'certificates', to: '' }, - { name: 'snmp', to: '' }, - { name: 'google', to: '/settings/administration/google' }, - ], - }, { name: 'routing', icon: 'mdi-call-split', @@ -162,6 +150,18 @@ { name: 'denial_of_service', to: '/settings/firewall/denial-of-service' }, ], }, + { + name: 'administration', + icon: 'mdi-account-cog', + active: false, + match: '/settings/administration', + items: [ + { name: 'admin', to: '/settings/administration/admin' }, + { name: 'certificates', to: '' }, + { name: 'snmp', to: '' }, + { name: 'google', to: '/settings/administration/google' }, + ], + }, { name: 'system', icon: 'mdi-cog', diff --git a/untangle-vue-ui/source/src/store/settings.js b/untangle-vue-ui/source/src/store/settings.js index c255ca53a..947647495 100644 --- a/untangle-vue-ui/source/src/store/settings.js +++ b/untangle-vue-ui/source/src/store/settings.js @@ -208,7 +208,6 @@ const actions = { /* get Google Settings configuration */ async getGoogleSettings({ state, commit }, refetch) { try { - console.log(state, refetch) if (state.googleSettings && !refetch) { return } @@ -325,6 +324,30 @@ const actions = { } }, + /** + * Dispatches google settings to the backend via RPC. + * @param {object} { dispatch } - Vuex action context for dispatching other actions. + * @param {object} googleSettings - The googleSettings settings object to be saved. + * @returns {object} An object indicating success status with message + */ + async setGoogleSettings({ dispatch }, googleSettings) { + try { + const apiMethod = Rpc.asyncPromise('rpc.UvmContext.googleManager.setSettings', googleSettings) + const result = await apiMethod() + if (result?.code && result?.message) { + Util.handleException(result.message) + return { success: false, message: result.message.slice(0, 100) } + } + // fetch updated settings after successful save + await dispatch('getGoogleSettings', true) + await dispatch('getIsGoogleDriveConnected') + return { success: true } + } catch (err) { + Util.handleException(err) + return { success: false, message: err?.toString()?.slice(0, 100) || 'Unknown error' } + } + }, + /** * Synchronize the system time using the NTP (Network Time Protocol) service */ From 99185d7afd377ba9e310aa5a9699b7683d029538 Mon Sep 17 00:00:00 2001 From: ShubhamJambhale-arista Date: Fri, 28 Nov 2025 17:07:20 +0530 Subject: [PATCH 4/6] ngfw-15448 ui implemmentation for authority management (#294) * ngfw-15448 ui implemmentation for authority management * ngfw-15448 settings mixin import changes * rename settings with commansettings and upgrade with yarn.lock with 1.60.16 --- .../settings/administration/Admin.vue | 6 ++- .../settings/administration/Certificates.vue | 39 +++++++++++++++++++ .../source/src/layouts/AppDrawer.vue | 2 +- untangle-vue-ui/source/src/router/setting.js | 9 ++++- untangle-vue-ui/source/src/store/settings.js | 21 ++++++++++ untangle-vue-ui/source/yarn.lock | 10 ++--- 6 files changed, 78 insertions(+), 9 deletions(-) create mode 100644 untangle-vue-ui/source/src/components/settings/administration/Certificates.vue diff --git a/untangle-vue-ui/source/src/components/settings/administration/Admin.vue b/untangle-vue-ui/source/src/components/settings/administration/Admin.vue index 0f5b88d0d..4fab25ccb 100644 --- a/untangle-vue-ui/source/src/components/settings/administration/Admin.vue +++ b/untangle-vue-ui/source/src/components/settings/administration/Admin.vue @@ -1,6 +1,6 @@