- AbitaregliIblei.it
- Server aggiornamenti agli script. - Editor HTML corretto un po'. - Record Mysql per server (appena iniziato)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="19"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
28
.env.test.abitaregliiblei.it
Executable file
28
.env.test.abitaregliiblei.it
Executable file
@@ -0,0 +1,28 @@
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="19"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
DIRECTORY_SERVER=test.freeplanet_serverside
|
||||
SERVERDIR_WEBSITE="/var/www/test.abitaregliiblei.it"
|
||||
SERVERPW_WEBSITE="pwdadmin@1AOK"
|
||||
APP_URL="https://test.abitaregliiblei.it"
|
||||
URL_FACEBOOK=""
|
||||
PROVA_PAOLO=""
|
||||
LANG_DEFAULT="it"
|
||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
||||
MONGODB_HOST="https://testapi.abitaregliiblei.it"
|
||||
LOGO_REG='abitaregliiblei-logo-full.png'
|
||||
TEST_NAME=""
|
||||
TEST_SURNAME=""
|
||||
TEST_EMAIL=""
|
||||
TEST_USERNAME=""
|
||||
TEST_PASSWORD=""
|
||||
TEST_APORTADOR=""
|
||||
PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs"
|
||||
IN_CONSTRUCTION="0"
|
||||
DEBUG="1"
|
||||
TELEGRAM_SUPPORT=""
|
||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
TEST_CELL=""
|
||||
ISTEST=1
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker_1.0.39.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="19"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "abitaregliiblei",
|
||||
"version": "1.0.55",
|
||||
"version": "1.0.56",
|
||||
"description": "Abitare Gli Iblei",
|
||||
"productName": "AbitareGliIblei",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="15"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="15"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fioredellavita",
|
||||
"version": "1.0.55",
|
||||
"version": "1.0.56",
|
||||
"description": "Fiore Della Vita",
|
||||
"productName": "Fiore Della Vita",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="18"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gruppomacro",
|
||||
"version": "1.0.55",
|
||||
"version": "1.0.56",
|
||||
"description": "GruppoMacro",
|
||||
"productName": "Gruppo Macro",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="17"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="1.0.55"
|
||||
APP_VERSION="1.0.56"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="16"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.0.55",
|
||||
"version": "1.0.56",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
28
deploy_on_test_abitaregliiblei.it.sh
Executable file
28
deploy_on_test_abitaregliiblei.it.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./.env.test.abitaregliiblei.it
|
||||
|
||||
msg="*** Sincronizzazione ??? $DIRECTORY_LOCAL e $SERVERDIR_WEBSITE (Y/N) ? "
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
read -p "$msg" risposta
|
||||
else
|
||||
risposta=$1
|
||||
fi
|
||||
|
||||
cp .env.production .env.prod.bak
|
||||
cp .env.test.abitaregliiblei.it .env.production
|
||||
|
||||
sleep 1
|
||||
|
||||
npm run buildpwa
|
||||
|
||||
echo "Sincronizzazione $SERVERDIR_WEBSITE in remoto..."
|
||||
rsync -e 'ssh -p 8822' -a dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
|
||||
rsync -e 'ssh -p 8822' -av --delete dist/pwa/js/ pcbuser@pcb:$SERVERDIR_WEBSITE/js
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "Finito $SERVERDIR_WEBSITE"
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "abitaregliiblei",
|
||||
"version": "1.0.55",
|
||||
"version": "1.0.56",
|
||||
"description": "Abitare Gli Iblei",
|
||||
"productName": "AbitareGliIblei",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
11
send_pwa_to_test_abitaregliiblei.it.sh
Executable file
11
send_pwa_to_test_abitaregliiblei.it.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
source .env.test.abitaregliiblei.it
|
||||
|
||||
cp .env.test.abitaregliiblei.it .env.production
|
||||
|
||||
echo "Sincronizzazione in remoto $SERVERDIR_WEBSITE ..."
|
||||
rsync -e 'ssh -p 8822' -a --exclude 'upload' dist/pwa/ pcbuser@pcb:$SERVERDIR_WEBSITE
|
||||
echo "Finito $SERVERDIR_WEBSITE"
|
||||
|
||||
cp .env.prod.bak .env.production
|
||||
@@ -34,7 +34,7 @@ self.addEventListener('activate', (event) => {
|
||||
});
|
||||
|
||||
|
||||
const VersioneApp = "1.0.55";
|
||||
const VersioneApp = "1.0.56";
|
||||
|
||||
console.log(' [ VER-' + VersioneApp + ' ] _---------________------ PAO: this is my custom service worker');
|
||||
|
||||
|
||||
@@ -652,10 +652,7 @@
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-if="myrec.coordinate_gps"
|
||||
>
|
||||
<q-item clickable v-if="myrec.coordinate_gps">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-crosshairs" />
|
||||
</q-item-section>
|
||||
@@ -673,7 +670,9 @@
|
||||
<q-btn
|
||||
:label="t('attivita.vediinmappa')"
|
||||
color="primary"
|
||||
size="sm"
|
||||
icon="fas fa-map-marker-alt"
|
||||
size="md"
|
||||
class="q-my-sm"
|
||||
@click="showInMap(myrec)"
|
||||
/>
|
||||
</q-item-label>
|
||||
|
||||
@@ -278,6 +278,20 @@ export default defineComponent({
|
||||
modifElem()
|
||||
}
|
||||
|
||||
function generateSizeOptions() {
|
||||
const options = [];
|
||||
for (let i = 0; i <= 700; i += 50) {
|
||||
options.push({ label: `${i}px`, value: `${i}px` });
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
function updateSizeWidth(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.widthimg = value; // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -318,6 +332,8 @@ export default defineComponent({
|
||||
visuadd,
|
||||
tabadd,
|
||||
Products,
|
||||
generateSizeOptions,
|
||||
updateSizeWidth,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -59,41 +59,45 @@
|
||||
>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<div class="fixed-button">
|
||||
<div class="justify-center row q-ma-xs">
|
||||
<q-btn
|
||||
dense
|
||||
v-if="enableEdit && !disableSave"
|
||||
icon="fas fa-check"
|
||||
color="positive"
|
||||
label="Applica"
|
||||
size="sm"
|
||||
label="Salva Modifiche"
|
||||
:disable="disableSave"
|
||||
@click="saveElem"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
<!--<q-btn
|
||||
dense
|
||||
v-if="enableEdit && !disableSave"
|
||||
icon="fas fa-check"
|
||||
color="positive"
|
||||
label="Salva"
|
||||
size="sm"
|
||||
:disable="disableSave"
|
||||
@click="saveElem(true)"
|
||||
>
|
||||
</q-btn>
|
||||
</q-btn>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-input
|
||||
<q-select
|
||||
label="Lunghezza:"
|
||||
@update:model-value="modifElem"
|
||||
style="width: 100px"
|
||||
v-model="myel.widthimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="modifElem"
|
||||
@new-value="updateSizeWidth"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
style="width: 150px"
|
||||
/>
|
||||
<q-input
|
||||
label="Altezza:"
|
||||
@update:model-value="modifElem"
|
||||
@@ -484,15 +488,21 @@
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<div class="row">
|
||||
<q-input
|
||||
<q-select
|
||||
label="Lunghezza Logo:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.width"
|
||||
v-model="myel.widthimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
use-input
|
||||
use-chips
|
||||
@input="saveElem"
|
||||
filled
|
||||
dense
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
@new-value="updateSizeWidth"
|
||||
style="width: 150px"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
label="Altezza Logo:"
|
||||
@update:model-value="modifElem"
|
||||
@@ -675,15 +685,20 @@
|
||||
</CMyFieldRec>
|
||||
<div class="">
|
||||
<div class="col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 col-sticky">
|
||||
<q-input
|
||||
dense
|
||||
<q-select
|
||||
label="Lunghezza:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.widthimg"
|
||||
emit-value
|
||||
map-options
|
||||
:options="generateSizeOptions()"
|
||||
@input="modifElem"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
dense
|
||||
use-input
|
||||
use-chips
|
||||
@new-value="updateSizeWidth"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
label="Altezza:"
|
||||
@@ -989,7 +1004,8 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div>Cataloghi:</div><br>
|
||||
<div>Cataloghi:</div>
|
||||
<br />
|
||||
|
||||
<!--++AddCATALOGO_FIELDS-->
|
||||
<q-select
|
||||
@@ -1011,7 +1027,9 @@
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||
v-if="
|
||||
enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes
|
||||
"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.excludeproductTypes"
|
||||
@@ -1041,15 +1059,20 @@
|
||||
map-options
|
||||
option-value="_id"
|
||||
option-label="name"
|
||||
|
||||
>
|
||||
</q-select>
|
||||
Versione PDF: <q-toggle v-model="myel.catalogo.pdf" color="positive" icon="fas fa-file-pdf"
|
||||
@update:model-value="modifElem">
|
||||
Versione PDF:
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.pdf"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br /><br /><br />
|
||||
</div>
|
||||
<div>
|
||||
<q-dialog
|
||||
|
||||
@@ -513,10 +513,10 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE">
|
||||
<div v-if="editOn" class="elemEdit">
|
||||
Bottone Chat Territoriale
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE"
|
||||
>
|
||||
<div v-if="editOn" class="elemEdit">Bottone Chat Territoriale</div>
|
||||
<div class="row justify-evenly items-center">
|
||||
<q-btn
|
||||
v-if="tools.getLinkChatTerritoriale()"
|
||||
@@ -525,7 +525,11 @@
|
||||
type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('dashboard.link_gruppo_telegram', { prov: tools.getProvincia() })"
|
||||
:label="
|
||||
$t('dashboard.link_gruppo_telegram', {
|
||||
prov: tools.getProvincia(),
|
||||
})
|
||||
"
|
||||
:href="tools.getLinkChatTerritoriale()"
|
||||
target="__blank"
|
||||
>
|
||||
@@ -559,8 +563,7 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
|
||||
<CCatalogo
|
||||
:optcatalogo="myel.catalogo"> </CCatalogo>
|
||||
<CCatalogo :optcatalogo="myel.catalogo"> </CCatalogo>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA:</div>
|
||||
@@ -570,13 +573,11 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAUTENTI">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA UTENTI:</div>
|
||||
<CMapUsers
|
||||
></CMapUsers>
|
||||
<CMapUsers></CMapUsers>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAGETCOORDINATE">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA COORDINATE:</div>
|
||||
<CMapGetCoordinates
|
||||
></CMapGetCoordinates>
|
||||
<CMapGetCoordinates></CMapGetCoordinates>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.EDITADDRESSBYCOORD">
|
||||
<div v-if="editOn" class="elemEdit">EDIT ADDRESS BY COORD:</div>
|
||||
@@ -587,8 +588,7 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPACOMUNI">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA COMUNI:</div>
|
||||
<CMapComuni
|
||||
></CMapComuni>
|
||||
<CMapComuni></CMapComuni>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.TOOLSAI">
|
||||
<div v-if="editOn" class="elemEdit">STRUMENTI AI:</div>
|
||||
|
||||
@@ -24,8 +24,8 @@ export default defineComponent({
|
||||
const mystyle = ref('')
|
||||
|
||||
function mounted() {
|
||||
console.log('mounted')
|
||||
console.log(props.src)
|
||||
|
||||
// console.log(props.src)
|
||||
|
||||
if (props.width)
|
||||
mystyle.value = 'max-width: ' + props.width + 'px; '
|
||||
|
||||
@@ -65,6 +65,8 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const $router = useRouter()
|
||||
|
||||
const mywidthEditor = ref(400)
|
||||
|
||||
const editOn = computed({
|
||||
get(): boolean {
|
||||
return !!globalStore.editOn ? globalStore.editOn : false
|
||||
@@ -141,6 +143,10 @@ export default defineComponent({
|
||||
globalStore.changeVisuDrawer(path, edit)
|
||||
}
|
||||
|
||||
function toggleSize() {
|
||||
mywidthEditor.value = mywidthEditor.value === 400 ? 1200 : 400
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -156,6 +162,8 @@ export default defineComponent({
|
||||
selElem,
|
||||
saveElem,
|
||||
changeVisuDrawer,
|
||||
mywidthEditor,
|
||||
toggleSize,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
show-if-above
|
||||
:breakpoint="800"
|
||||
side="right"
|
||||
:width="tools.isMobile() ? 350 : 400"
|
||||
:width="tools.isMobile() ? 350 : mywidthEditor"
|
||||
elevated
|
||||
style="transition: 'width 0.3s ease'"
|
||||
>
|
||||
<q-bar dense class="q-ma-xs bg-primary text-white">
|
||||
<q-toolbar-title> Editor </q-toolbar-title>
|
||||
@@ -29,10 +30,15 @@
|
||||
size="md"
|
||||
color="white"
|
||||
icon="close"
|
||||
@click="visuEditor = false; selElem = {};"
|
||||
@click="
|
||||
visuEditor = false;
|
||||
selElem = {};
|
||||
"
|
||||
></q-btn>
|
||||
</q-bar>
|
||||
|
||||
<q-btn class="q-ma-sm" @click="toggleSize" label="<" color="primary" />
|
||||
|
||||
<CMyEditElem
|
||||
:myelem="selElem"
|
||||
:editOn="true"
|
||||
@@ -42,7 +48,7 @@
|
||||
</CMyEditElem>
|
||||
</q-drawer>
|
||||
|
||||
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px;">
|
||||
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px">
|
||||
<div v-if="!!rec.img1" class="text-center">
|
||||
<q-img :src="`` + rec.img1" class="img"></q-img>
|
||||
</div>
|
||||
@@ -76,7 +82,6 @@
|
||||
|
||||
<div v-for="(myelem, ind) in myelems" :key="ind">
|
||||
<div>
|
||||
|
||||
<CMyElem
|
||||
v-if="(myelem.active || editOn) && !!rec.path"
|
||||
:myelem="myelem"
|
||||
@@ -120,9 +125,7 @@
|
||||
<CImgTitle v-if="img" :src="img" :title="title"> </CImgTitle>
|
||||
</div>
|
||||
<slot></slot>
|
||||
<div v-if="!nofooter">
|
||||
|
||||
</div>
|
||||
<div v-if="!nofooter"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -461,7 +461,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
console.log('mounted')
|
||||
|
||||
|
||||
myrow.value = props.rec && props.isrec ? { ...props.rec } : { ...props.row }
|
||||
|
||||
|
||||
@@ -2001,22 +2001,35 @@ h3 {
|
||||
}
|
||||
|
||||
.marker-shadow {
|
||||
width: 40px; /* Dimensione dell'ombra, dovrebbe corrispondere all'icona principale */
|
||||
height: 40px; /* Dimensione dell'ombra */
|
||||
position: absolute; /* Posizionamento assoluto per posizionarla correttamente */
|
||||
top: 3px; /* Allineata sopra */
|
||||
left: 8px; /* Allineata a sinistra */
|
||||
z-index: -10; /* Assicurati che l'ombra sia sotto */
|
||||
opacity: 1; /* L'opacità dell'ombra per un effetto realistico */
|
||||
width: 40px;
|
||||
/* Dimensione dell'ombra, dovrebbe corrispondere all'icona principale */
|
||||
height: 40px;
|
||||
/* Dimensione dell'ombra */
|
||||
position: absolute;
|
||||
/* Posizionamento assoluto per posizionarla correttamente */
|
||||
top: 3px;
|
||||
/* Allineata sopra */
|
||||
left: 8px;
|
||||
/* Allineata a sinistra */
|
||||
z-index: -10;
|
||||
/* Assicurati che l'ombra sia sotto */
|
||||
opacity: 1;
|
||||
/* L'opacità dell'ombra per un effetto realistico */
|
||||
}
|
||||
|
||||
.custom-icon .material-icons {
|
||||
position: absolute; /* Posizionamento assoluto per centrare */
|
||||
top: 50%; /* Posizionamento verticale */
|
||||
left: 50%; /* Posizionamento orizzontale */
|
||||
transform: translate(-50%, -50%); /* Centra l'icona */
|
||||
font-size: 40px; /* Dimensione dell'icona 20x20 */
|
||||
color: blue; /* Colore dell'icona (puoi cambiarlo) */
|
||||
position: absolute;
|
||||
/* Posizionamento assoluto per centrare */
|
||||
top: 50%;
|
||||
/* Posizionamento verticale */
|
||||
left: 50%;
|
||||
/* Posizionamento orizzontale */
|
||||
transform: translate(-50%, -50%);
|
||||
/* Centra l'icona */
|
||||
font-size: 40px;
|
||||
/* Dimensione dell'icona 20x20 */
|
||||
color: blue;
|
||||
/* Colore dell'icona (puoi cambiarlo) */
|
||||
}
|
||||
|
||||
.current-location-icon {
|
||||
@@ -2025,6 +2038,7 @@ h3 {
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 4px #4A89F3;
|
||||
}
|
||||
|
||||
.current-location-icon::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -2043,22 +2057,28 @@ h3 {
|
||||
}
|
||||
|
||||
.no-padding-dialog .q-dialog__inner {
|
||||
padding: 0 !important; /* Rimuove il padding dal dialog */
|
||||
padding: 0 !important;
|
||||
/* Rimuove il padding dal dialog */
|
||||
}
|
||||
|
||||
.custom-zoom-button {
|
||||
background-color: white;
|
||||
border: 2px solid #007bff; /* Colore del bordo */
|
||||
border: 2px solid #007bff;
|
||||
/* Colore del bordo */
|
||||
border-radius: 4px;
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
margin-top: 10px; /* Spaziatura dal bordo superiore */
|
||||
z-index: 1000; /* Assicurati che appaia sopra altri controlli */
|
||||
margin-top: 10px;
|
||||
/* Spaziatura dal bordo superiore */
|
||||
z-index: 1000;
|
||||
/* Assicurati che appaia sopra altri controlli */
|
||||
}
|
||||
|
||||
.custom-zoom-button:hover {
|
||||
background-color: #007bff; /* Colore di sfondo al passaggio del mouse */
|
||||
color: white; /* Colore del testo al passaggio del mouse */
|
||||
background-color: #007bff;
|
||||
/* Colore di sfondo al passaggio del mouse */
|
||||
color: white;
|
||||
/* Colore del testo al passaggio del mouse */
|
||||
}
|
||||
|
||||
.barretta-sep {
|
||||
@@ -2067,3 +2087,23 @@ h3 {
|
||||
height: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fixed-button {
|
||||
position: fixed;
|
||||
bottom: 16px;
|
||||
/* Distanza dal fondo */
|
||||
right: 16px;
|
||||
/* Distanza dal lato */
|
||||
z-index: 1000;
|
||||
/* Opzionale: assicura che il bottone sia sopra altri elementi */
|
||||
}
|
||||
|
||||
.fixed-button2 {
|
||||
position: fixed;
|
||||
bottom: 16px;
|
||||
/* Distanza dal fondo */
|
||||
right: 120px;
|
||||
/* Distanza dal lato */
|
||||
z-index: 1000;
|
||||
/* Opzionale: assicura che il bottone sia sopra altri elementi */
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta name="description" content="<%= productDescription %>">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="version" content="1.0.55">
|
||||
<meta name="version" content="1.0.56">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
|
||||
|
||||
|
||||
@@ -1547,6 +1547,7 @@ const msg_it = {
|
||||
myelems: {
|
||||
active: 'active',
|
||||
img: 'img',
|
||||
image: 'Immagine:',
|
||||
path: 'Path',
|
||||
order: 'Order',
|
||||
type: 'Type',
|
||||
|
||||
@@ -2151,6 +2151,35 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async saveServerMysql(paramquery: any) {
|
||||
return Api.SendReq('/admin/mysql', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
return false
|
||||
})
|
||||
},
|
||||
|
||||
async getCloudFlareTok(cmd: string, tok: string, zoneId: string, dnsRecordId: any = null, record: any = undefined) {
|
||||
|
||||
const mydata = {
|
||||
cmd,
|
||||
tokcheck: "php8.1_version_762321HSD121nJDokq@?!aFS.tar.gz",
|
||||
tok,
|
||||
zoneId,
|
||||
dnsRecordId,
|
||||
record,
|
||||
}
|
||||
|
||||
return Api.SendReq('/admin/cloudflare', 'POST', mydata)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
return false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -41,3 +41,7 @@ $button-margin: 5px;
|
||||
white-space: nowrap;
|
||||
/* Impedisce il wrapping della riga (opzionale) */
|
||||
}
|
||||
|
||||
.selected-row {
|
||||
background-color: #e3f2fd !important;
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const circuitStore = useCircuitStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
const messages = ref('')
|
||||
const input = ref('')
|
||||
@@ -57,6 +58,84 @@ export default defineComponent({
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const selectedApi = ref(<string>'');
|
||||
|
||||
const dnsPageActive = ref(false)
|
||||
|
||||
const optionsApi = ref(<any>[])
|
||||
const arrZones = ref(<any>[])
|
||||
const arrDNS = ref(<any>[])
|
||||
const optZones = ref(<any>[])
|
||||
|
||||
const selected = ref(<any>[])
|
||||
const selZoneId = ref('')
|
||||
|
||||
const columnsZones = [
|
||||
{ name: 'id', align: 'right', label: 'ID', field: 'id', visible: true },
|
||||
{ name: 'name', required: true, label: 'Nome', align: 'left', field: 'name', sortable: true, visible: true },
|
||||
{ name: 'status', align: 'center', label: 'Status', field: 'status', sortable: true, visible: true },
|
||||
{ name: 'proxied', align: 'center', label: 'Proxy', field: 'proxied', sortable: true, visible: true },
|
||||
{ name: 'type', required: true, label: 'Tipo', align: 'left', field: 'type', sortable: true, visible: true },
|
||||
];
|
||||
|
||||
const columnsDNS = [
|
||||
{ name: 'id', required: false, label: 'Id', align: 'left', field: 'id', sortable: false, visible: false },
|
||||
{ name: 'name', required: true, label: 'Nome', align: 'left', field: 'name', sortable: true, visible: true },
|
||||
{ name: 'type', required: true, label: 'Tipo', align: 'left', field: 'type', sortable: true, visible: true },
|
||||
{ name: 'proxied', required: true, align: 'center', label: 'Proxy', field: 'proxied', sortable: true, visible: true },
|
||||
{ name: 'content', required: true, label: 'Valore', align: 'left', field: 'content', sortable: true, visible: true },
|
||||
];
|
||||
|
||||
const viscolumnsDNS = [
|
||||
{ name: 'name', required: true, label: 'Nome', align: 'left', field: 'name', sortable: true, visible: true, editable: true },
|
||||
{ name: 'type', required: true, label: 'Tipo', align: 'left', field: 'type', sortable: true, visible: true, editable: true },
|
||||
{ name: 'proxied', required: true, align: 'center', label: 'Proxy', field: 'proxied', sortable: true, visible: true, editable: true },
|
||||
{ name: 'content', required: true, label: 'Valore', align: 'left', field: 'content', sortable: true, visible: true, editable: true },
|
||||
];
|
||||
|
||||
const pagination = {
|
||||
rowsPerPage: 10,
|
||||
}
|
||||
|
||||
watch(() => selectedApi.value, async (to: any, from: any) => {
|
||||
if (selectedApi.value) {
|
||||
incaricamento.value = true
|
||||
|
||||
tools.setCookie('CF_API_SEL', selectedApi.value)
|
||||
|
||||
arrZones.value = await globalStore.getCloudFlareTok("getzones", selectedApi.value, "")
|
||||
|
||||
incaricamento.value = false
|
||||
|
||||
selZoneId.value = tools.getCookie('CF_API_ZONE_ID_' + selectedApi.value, '')
|
||||
|
||||
optZones.value = []
|
||||
|
||||
for (let i = 0; i < arrZones.value.length; i++) {
|
||||
optZones.value.push({ label: arrZones.value[i].name, value: arrZones.value[i].id })
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => selZoneId.value, async (to: any, from: any) => {
|
||||
if (selZoneId.value) {
|
||||
incaricamento.value = true
|
||||
arrDNS.value = await globalStore.getCloudFlareTok("getDNS", selectedApi.value, selZoneId.value)
|
||||
|
||||
incaricamento.value = false
|
||||
|
||||
tools.setCookie('CF_API_ZONE_ID_' + selectedApi.value, selZoneId.value)
|
||||
|
||||
/*optDNS.value = []
|
||||
|
||||
for (let i = 0; i < arrZones.value.length; i++) {
|
||||
optDNS.value.push({ label: arrZones.value[i].name, value: arrZones.value[i].id })
|
||||
}*/
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => mydir.value, async (to: any, from: any) => {
|
||||
// ...
|
||||
|
||||
@@ -64,9 +143,21 @@ export default defineComponent({
|
||||
|
||||
myarrscript.value = []
|
||||
|
||||
dnsPageActive.value = (mydir.value === '2_DNS')
|
||||
|
||||
incaricamento.value = true
|
||||
|
||||
tools.setCookie('CF_API_DIR', mydir.value)
|
||||
|
||||
if (dnsPageActive.value) {
|
||||
// get the Tokens
|
||||
optionsApi.value = await globalStore.getCloudFlareTok("gettok", selectedApi.value, "")
|
||||
} else {
|
||||
if (mydir.value)
|
||||
myarrscript.value = await getArrayByScript('ls "admin_scripts/' + mydir.value + '/"', 'sh')
|
||||
}
|
||||
|
||||
incaricamento.value = false
|
||||
})
|
||||
|
||||
watch(() => messages.value, async (to: any, from: any) => {
|
||||
@@ -88,8 +179,12 @@ export default defineComponent({
|
||||
withinput
|
||||
}
|
||||
|
||||
incaricamento.value = true
|
||||
|
||||
const risfunz = await globalStore.execScript({ mydata })
|
||||
|
||||
incaricamento.value = false
|
||||
|
||||
if (ritornaout) {
|
||||
if (listafiles) {
|
||||
return risfunz.arrout
|
||||
@@ -134,6 +229,9 @@ export default defineComponent({
|
||||
|
||||
scrollToBottom()
|
||||
|
||||
mydir.value = tools.getCookie('CF_API_DIR')
|
||||
|
||||
selectedApi.value = tools.getCookie('CF_API_SEL', '')
|
||||
}
|
||||
|
||||
const scrollToBottom = () => {
|
||||
@@ -237,7 +335,7 @@ export default defineComponent({
|
||||
let timenowstr = '<br><span style="font-style: italic; color: gray;">✅ Eseguito alle ' + tools.getstrTimeAll(Date.now()) + ' -> ' + '</span><br>'
|
||||
messages.value += timenowstr
|
||||
|
||||
ws.send(JSON.stringify({ type: 'start_script', scriptName, dir: mydir.value }));
|
||||
ws.send(JSON.stringify({ user_id: userStore.my._id, type: 'start_script', scriptName, dir: mydir.value }));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -250,6 +348,75 @@ export default defineComponent({
|
||||
}
|
||||
};
|
||||
|
||||
// get the label of the selectedApi (value)
|
||||
const getLabelSelApi = () => {
|
||||
const myrec = optionsApi.value.find((opt: any) => opt.value === selectedApi.value)
|
||||
return myrec ? myrec.label : ''
|
||||
};
|
||||
const getNameBySelZoneinId = () => {
|
||||
const myrec = arrZones.value.find((zone: any) => zone.id === selZoneId.value)
|
||||
return myrec ? myrec.name : ''
|
||||
};
|
||||
|
||||
const getSelectedString = () => {
|
||||
return selected.value.length === 0 ? '' : `${selected.value[0].name} selezionata.`
|
||||
}
|
||||
|
||||
const toggleSelect = (row: any) => {
|
||||
if (selected.value.length > 0 && selected.value[0].id === row.id) {
|
||||
selected.value = [];
|
||||
} else {
|
||||
selected.value = [row];
|
||||
}
|
||||
}
|
||||
|
||||
const saveContentDNS = async (content: string, initialValue: string) => {
|
||||
console.log('record da salvare su CF:', content)
|
||||
|
||||
if (selected.value && selected.value.length > 0 && selected.value[0].id) {
|
||||
const indrec = arrDNS.value.findIndex((rec: any) => rec.id === selected.value[0].id)
|
||||
arrDNS.value[indrec].content = content
|
||||
|
||||
await saveRecordDNS(arrDNS.value[indrec])
|
||||
}
|
||||
}
|
||||
const saveNameDNS = async (name: string, initialValue: string) => {
|
||||
|
||||
if (selected.value && selected.value.length > 0 && selected.value[0].id) {
|
||||
const indrec = arrDNS.value.findIndex((rec: any) => rec.id === selected.value[0].id)
|
||||
arrDNS.value[indrec].name = name
|
||||
|
||||
await saveRecordDNS(arrDNS.value[indrec])
|
||||
}
|
||||
}
|
||||
const saveTypeDNS = async (type: string, initialValue: string) => {
|
||||
|
||||
if (selected.value && selected.value.length > 0 && selected.value[0].id) {
|
||||
const indrec = arrDNS.value.findIndex((rec: any) => rec.id === selected.value[0].id)
|
||||
arrDNS.value[indrec].type = type
|
||||
|
||||
await saveRecordDNS(arrDNS.value[indrec])
|
||||
}
|
||||
}
|
||||
|
||||
const saveRecordDNS = async (row: any) => {
|
||||
|
||||
console.log('record da salvare su CF:', row)
|
||||
|
||||
const recupdated = await globalStore.getCloudFlareTok("setRecordDNS", selectedApi.value, selZoneId.value, row.id, row)
|
||||
|
||||
if (recupdated) {
|
||||
const indrec = arrDNS.value.findIndex((rec: any) => rec.id === recupdated.id)
|
||||
// update record
|
||||
arrDNS.value[indrec] = recupdated
|
||||
|
||||
tools.showPositiveNotif($q, t('db.recupdated'))
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -281,6 +448,26 @@ export default defineComponent({
|
||||
inputPrompt,
|
||||
statusWs,
|
||||
scrollArea,
|
||||
selectedApi,
|
||||
dnsPageActive,
|
||||
optionsApi,
|
||||
arrZones,
|
||||
getLabelSelApi,
|
||||
columnsZones,
|
||||
pagination,
|
||||
selected,
|
||||
getSelectedString,
|
||||
toggleSelect,
|
||||
optZones,
|
||||
selZoneId,
|
||||
arrDNS,
|
||||
columnsDNS,
|
||||
getNameBySelZoneinId,
|
||||
viscolumnsDNS,
|
||||
saveRecordDNS,
|
||||
saveContentDNS,
|
||||
saveNameDNS,
|
||||
saveTypeDNS,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<div class="q-ma-sm button-container">
|
||||
<div class="" v-for="(script, index) in myarrscript" :key="index">
|
||||
<q-btn
|
||||
v-if="!script.sock"
|
||||
class=""
|
||||
:label="script.label"
|
||||
color="primary"
|
||||
@@ -38,6 +39,7 @@
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="script.sock"
|
||||
class=""
|
||||
:label="'SOCK: ' + script.label"
|
||||
color="positive"
|
||||
@@ -60,7 +62,132 @@
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="dnsPageActive" class="">
|
||||
<div>
|
||||
<q-select
|
||||
v-model="selectedApi"
|
||||
:options="optionsApi"
|
||||
label="Seleziona un Token"
|
||||
emit-value
|
||||
map-options
|
||||
filled
|
||||
class="q-ma-md"
|
||||
/>
|
||||
<q-select
|
||||
v-if="optZones && optZones.length > 0"
|
||||
v-model="selZoneId"
|
||||
:options="optZones"
|
||||
label="Seleziona un Dominio"
|
||||
emit-value
|
||||
map-options
|
||||
class="q-ma-md"
|
||||
/>
|
||||
|
||||
<q-table
|
||||
v-if="arrDNS && selZoneId"
|
||||
:title="`Zona di ${getNameBySelZoneinId()}`"
|
||||
:rows="arrDNS"
|
||||
:columns="columnsDNS"
|
||||
row-key="id"
|
||||
:loading="incaricamento"
|
||||
:pagination="pagination"
|
||||
:selected-rows-label="getSelectedString"
|
||||
selection="single"
|
||||
v-model:selected="selected"
|
||||
:visible-columns="viscolumnsDNS"
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<q-inner-loading showing color="primary" />
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr
|
||||
:props="props"
|
||||
:class="{ 'selected-row': props.selected }"
|
||||
@click="toggleSelect(props.row)"
|
||||
>
|
||||
<q-td auto-width class="tdclass">
|
||||
<q-checkbox
|
||||
dense
|
||||
v-model="props.selected"
|
||||
@click.stop="toggleSelect(props.row)"
|
||||
></q-checkbox>
|
||||
</q-td>
|
||||
<q-td v-for="col in viscolumnsDNS" :key="col.name" :props="props">
|
||||
<q-popup-edit
|
||||
v-if="col.name === 'content'"
|
||||
v-model="props.row.content"
|
||||
v-slot="scope"
|
||||
buttons
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
:max-width="200"
|
||||
@save="saveContentDNS"
|
||||
>
|
||||
<q-input
|
||||
type="textarea"
|
||||
v-model="scope.value"
|
||||
dense
|
||||
autofocus
|
||||
:maxlength="255"
|
||||
autogrow
|
||||
/>
|
||||
</q-popup-edit>
|
||||
<q-popup-edit
|
||||
v-if="col.name === 'name'"
|
||||
v-model="props.row.name"
|
||||
v-slot="scope"
|
||||
buttons
|
||||
@save="saveNameDNS"
|
||||
>
|
||||
<q-input
|
||||
type="textarea"
|
||||
v-model="scope.value"
|
||||
autofocus
|
||||
autogrow
|
||||
/>
|
||||
</q-popup-edit>
|
||||
|
||||
<!--<q-popup-edit
|
||||
v-if="col.name === 'type'"
|
||||
v-model="props.row.type"
|
||||
v-slot="scope"
|
||||
buttons
|
||||
@save="saveTypeDNS"
|
||||
>
|
||||
<q-input
|
||||
type="textarea"
|
||||
v-model="scope.value"
|
||||
autofocus
|
||||
autogrow
|
||||
/>
|
||||
</q-popup-edit>-->
|
||||
|
||||
<q-toggle
|
||||
v-if="col.name === 'proxied'"
|
||||
v-model="props.row.proxied"
|
||||
label="Proxy"
|
||||
:disable="props.row.proxiable !== true"
|
||||
@click.stop="
|
||||
props.row.proxiable === true
|
||||
? saveRecordDNS(props.row)
|
||||
: null
|
||||
"
|
||||
>
|
||||
</q-toggle>
|
||||
<span v-else>
|
||||
{{ props.row[col.field] }}
|
||||
</span>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
<!--<div v-if="selectedApi">Hai selezionato: {{ getLabelSelApi() }}</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!dnsPageActive">
|
||||
<div :class="statusWs === 'OPEN' ? 'bg-green' : 'bg-red'">
|
||||
STATO WS: {{ statusWs }}
|
||||
</div>
|
||||
|
||||
1
src/views/admin/servermysql/index.ts
Executable file
1
src/views/admin/servermysql/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as servermysql } from './servermysql.vue'
|
||||
47
src/views/admin/servermysql/servermysql.scss
Executable file
47
src/views/admin/servermysql/servermysql.scss
Executable file
@@ -0,0 +1,47 @@
|
||||
$button-margin: 5px;
|
||||
|
||||
.button-container {
|
||||
margin: $button-margin;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
height: 45vh;
|
||||
/* Per riempire tutto lo schermo */
|
||||
}
|
||||
|
||||
.scroll-area {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
/* Posiziona l'area di scorrimento in basso */
|
||||
left: 0;
|
||||
/* Allinea a sinistra */
|
||||
width: 100%;
|
||||
/* Larghezza al 100% */
|
||||
height: 340px;
|
||||
/* Imposta l'altezza desiderata */
|
||||
max-width: 800px;
|
||||
/* Imposta la larghezza massima desiderata */
|
||||
border: 1px solid #ccc;
|
||||
/* Opzionale: per aggiungere un bordo */
|
||||
background: #fff;
|
||||
/* Sfondo bianco */
|
||||
overflow-y: auto;
|
||||
/* Abilita lo scorrimento verticale */
|
||||
}
|
||||
|
||||
.custom-field {
|
||||
height: 35px;
|
||||
/* Imposta l'altezza fissa a 30px */
|
||||
overflow: hidden;
|
||||
/* Nasconde ciò che esce dai limiti del campo */
|
||||
text-overflow: ellipsis;
|
||||
/* Mostra i puntini di sospensione se il testo è troppo lungo (opzionale) */
|
||||
white-space: nowrap;
|
||||
/* Impedisce il wrapping della riga (opzionale) */
|
||||
}
|
||||
|
||||
.selected-row {
|
||||
background-color: #e3f2fd !important;
|
||||
}
|
||||
52
src/views/admin/servermysql/servermysql.ts
Executable file
52
src/views/admin/servermysql/servermysql.ts
Executable file
@@ -0,0 +1,52 @@
|
||||
import { defineComponent, onMounted, ref, watch, onUnmounted, nextTick } from 'vue'
|
||||
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
import { CDateTime } from '../../../components/CDateTime'
|
||||
import { CMyFieldDb } from '../../../components/CMyFieldDb'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useCircuitStore } from '@store/CircuitStore'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'servermysql',
|
||||
components: { CTitleBanner, CDateTime, CMyFieldDb },
|
||||
props: {},
|
||||
setup() {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const circuitStore = useCircuitStore()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
function mounted() {
|
||||
|
||||
}
|
||||
|
||||
const serverData = ref({
|
||||
NameServer: '',
|
||||
IPServer: '',
|
||||
Attivo: false,
|
||||
VersioneServer: '',
|
||||
LastBackupServer: ''
|
||||
});
|
||||
|
||||
async function submitForm() {
|
||||
await globalStore.saveServerMysql(serverData.value)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
tools,
|
||||
costanti,
|
||||
serverData,
|
||||
submitForm,
|
||||
}
|
||||
},
|
||||
})
|
||||
38
src/views/admin/servermysql/servermysql.vue
Executable file
38
src/views/admin/servermysql/servermysql.vue
Executable file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<CTitleBanner title="Operazioni sul Server:"></CTitleBanner>
|
||||
|
||||
<q-separator></q-separator>
|
||||
|
||||
<q-form @submit="submitForm">
|
||||
<q-input v-model="serverData.NameServer" label="Nome Server" filled />
|
||||
|
||||
<q-input v-model="serverData.IPServer" label="IP Server" filled />
|
||||
|
||||
<q-toggle v-model="serverData.Attivo" label="Attivo" />
|
||||
|
||||
<q-input
|
||||
v-model="serverData.VersioneServer"
|
||||
label="Versione Server"
|
||||
filled
|
||||
/>
|
||||
|
||||
<q-input
|
||||
v-model="serverData.LastBackupServer"
|
||||
label="Ultimo Backup"
|
||||
type="date"
|
||||
filled
|
||||
/>
|
||||
|
||||
<q-btn label="Invia" type="submit" color="primary" class="q-mt-md" />
|
||||
</q-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts" src="./servermysql.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './servermysql';
|
||||
</style>
|
||||
@@ -28,7 +28,7 @@ export default defineComponent({
|
||||
const filter = ref(costanti.FIND_PEOPLE)
|
||||
|
||||
function mounted() {
|
||||
console.log('mounted')
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
label: 'Regione',
|
||||
|
||||
Reference in New Issue
Block a user