- Mail in a Box: comandi per aggiungere/modificare/rimuovere le caselle di posta

- aggiunto idMyGroup: ospiti siti di gruppi (AbitareGliIblei)
This commit is contained in:
Surya Paolo
2024-09-12 14:49:30 +02:00
parent 16ddb8095e
commit 791e18f167
39 changed files with 647 additions and 88 deletions

View File

@@ -357,7 +357,8 @@ export const costanti = {
FILTER_NESSUNO: 0,
FILTER_TUTTI: -100,
TABLES_ARRAY: ['mygroups', 'circuits'],
// TABLES_ARRAY: ['mygroups', 'circuits'],
TABLES_ARRAY: ['circuits'],
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
FILTER_SEP: '_',

View File

@@ -1882,6 +1882,8 @@ export const colTableSites = [
AddCol({ name: 'host_testapi_ip', label_trans: 'sites.host_testapi_ip', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'cf_token', label_trans: 'sites.cf_token', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'cf_zoneId', label_trans: 'sites.cf_zoneId', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'servermail', label_trans: 'sites.servermail', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'enable_servermail', label_trans: 'sites.enable_servermail', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'portapp', label_trans: 'sites.portapp', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'dir', label_trans: 'sites.dir' }),
AddCol({ name: 'dir_test', label_trans: 'sites.dir_test', fieldtype: costanti.FieldType.string }),
@@ -3141,6 +3143,11 @@ export const colTableUsersISP = [
label_trans: 'reg.verified_by_aportador',
fieldtype: costanti.FieldType.boolean
}),
AddCol({
name: 'idMyGroup',
label_trans: 'reg.idMyGroup',
fieldtype: costanti.FieldType.string
}),
AddCol({
name: 'notask_verif',
label_trans: 'reg.notAsk_ToVerify',

View File

@@ -8747,22 +8747,29 @@ export const tools = {
}
},
getHostPuntamento(arrDNS: any, tofind: string, paramsulServer: string): any {
getHostPuntamento(arrDNS: any, tofind: string, paramsulServer: string, type: string): any {
let checkDomain = ''
let indrec = arrDNS.findIndex((rec: any) => rec.name === tofind && rec.type === 'A')
let color = 'red'
let ok = false
if (indrec >= 0) {
checkDomain = tofind + ' -> ' + arrDNS[indrec].content
let giusto = (paramsulServer === arrDNS[indrec].content)
color = giusto ? 'green' : 'red'
if (!giusto) {
checkDomain += ' (<strong>al posto di -> ' + paramsulServer + '</strong>)'
} else {
ok = true
try {
if (arrDNS) {
let indrec = arrDNS.findIndex((rec: any) => rec.name === tofind && rec.type === type)
if (indrec >= 0) {
checkDomain = tofind + ' -> ' + arrDNS[indrec].content
let giusto = (paramsulServer === arrDNS[indrec].content)
color = giusto ? 'green' : 'red'
if (!giusto) {
checkDomain += ' (<strong>al posto di -> ' + paramsulServer + '</strong>)'
} else {
ok = true
}
} else {
checkDomain = tofind + ' N/A'
}
}
} else {
checkDomain = tofind + ' N/A'
} catch (e) {
console.log('Error: ', e)
}
return { text: '<span style="color: ' + color + ';">' + checkDomain + '</span><br>', ok }

View File

@@ -362,8 +362,10 @@ export const useGlobalStore = defineStore('GlobalStore', {
return userStore.my.profile.friends
else if (table === 'friendsandme')
return [{ username: userStore.my.username }, ...userStore.my.profile.friends]
// else if (table === 'mygroups')
// return userStore.groups
else if (table === 'mygroups')
return userStore.groups
return state.mygroups
else if (table === 'sendmsgs')
return messageStore.last_msgs
else if (table === 'sendnotifs')
@@ -1923,12 +1925,16 @@ export const useGlobalStore = defineStore('GlobalStore', {
const newarr = []
for (const value of myarr) {
let label = value
if (table === 'mygroups')
label = value.descr
else if (table === 'circuits')
let valout = value
// if (table === 'mygroups') {
// label = value.descr
// valout = value.groupname
if (table === 'circuits') {
label = value.name
}
newarr.push({ value, label })
// console.log('value', value, 'label', label)
newarr.push({ value: valout, label })
}
myarr = newarr
@@ -2192,6 +2198,22 @@ export const useGlobalStore = defineStore('GlobalStore', {
})
},
async getMailInABox(cmd: string, record: any = undefined) {
const mydata = {
cmd,
tokcheck: "php8.1_version_762321HSD121nJDokq@?!aFS.tar.gz",
record,
}
return Api.SendReq('/admin/miab', 'POST', mydata)
.then((res) => {
return res.data
}).catch((error) => {
return false
})
},
}