mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 09:16:55 +00:00
This commit is contained in:
parent
8d4784052a
commit
66f4507dee
@ -2304,14 +2304,14 @@ def API_createWireguardConfigurationBackup():
|
|||||||
@app.post(f'{APP_PREFIX}/api/deleteWireguardConfigurationBackup')
|
@app.post(f'{APP_PREFIX}/api/deleteWireguardConfigurationBackup')
|
||||||
def API_deleteWireguardConfigurationBackup():
|
def API_deleteWireguardConfigurationBackup():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
if ("configurationName" not in data.keys() or
|
if ("ConfigurationName" not in data.keys() or
|
||||||
"backupFileName" not in data.keys() or
|
"BackupFileName" not in data.keys() or
|
||||||
len(data['configurationName']) == 0 or
|
len(data['ConfigurationName']) == 0 or
|
||||||
len(data['backupFileName']) == 0):
|
len(data['BackupFileName']) == 0):
|
||||||
return ResponseObject(False,
|
return ResponseObject(False,
|
||||||
"Please provide configurationName and backupFileName in body")
|
"Please provide configurationName and backupFileName in body")
|
||||||
configurationName = data['configurationName']
|
configurationName = data['ConfigurationName']
|
||||||
backupFileName = data['backupFileName']
|
backupFileName = data['BackupFileName']
|
||||||
if configurationName not in WireguardConfigurations.keys():
|
if configurationName not in WireguardConfigurations.keys():
|
||||||
return ResponseObject(False, "Configuration does not exist")
|
return ResponseObject(False, "Configuration does not exist")
|
||||||
|
|
||||||
@ -2329,14 +2329,14 @@ def API_downloadWireguardConfigurationBackup():
|
|||||||
@app.post(f'{APP_PREFIX}/api/restoreWireguardConfigurationBackup')
|
@app.post(f'{APP_PREFIX}/api/restoreWireguardConfigurationBackup')
|
||||||
def API_restoreWireguardConfigurationBackup():
|
def API_restoreWireguardConfigurationBackup():
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
if ("configurationName" not in data.keys() or
|
if ("ConfigurationName" not in data.keys() or
|
||||||
"backupFileName" not in data.keys() or
|
"BackupFileName" not in data.keys() or
|
||||||
len(data['configurationName']) == 0 or
|
len(data['ConfigurationName']) == 0 or
|
||||||
len(data['backupFileName']) == 0):
|
len(data['BackupFileName']) == 0):
|
||||||
return ResponseObject(False,
|
return ResponseObject(False,
|
||||||
"Please provide configurationName and backupFileName in body")
|
"Please provide configurationName and backupFileName in body")
|
||||||
configurationName = data['configurationName']
|
configurationName = data['ConfigurationName']
|
||||||
backupFileName = data['backupFileName']
|
backupFileName = data['BackupFileName']
|
||||||
if configurationName not in WireguardConfigurations.keys():
|
if configurationName not in WireguardConfigurations.keys():
|
||||||
return ResponseObject(False, "Configuration does not exist")
|
return ResponseObject(False, "Configuration does not exist")
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ const loading = ref(false);
|
|||||||
const deleteBackup = () => {
|
const deleteBackup = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
fetchPost("/api/deleteWireguardConfigurationBackup", {
|
fetchPost("/api/deleteWireguardConfigurationBackup", {
|
||||||
configurationName: route.params.id,
|
ConfigurationName: route.params.id,
|
||||||
backupFileName: props.b.filename
|
BackupFileName: props.b.filename
|
||||||
}, (res) => {
|
}, (res) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (res.status){
|
if (res.status){
|
||||||
@ -31,8 +31,8 @@ const deleteBackup = () => {
|
|||||||
const restoreBackup = () => {
|
const restoreBackup = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
fetchPost("/api/restoreWireguardConfigurationBackup", {
|
fetchPost("/api/restoreWireguardConfigurationBackup", {
|
||||||
configurationName: route.params.id,
|
ConfigurationName: route.params.id,
|
||||||
backupFileName: props.b.filename
|
BackupFileName: props.b.filename
|
||||||
}, (res) => {
|
}, (res) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
restoreConfirmation.value = false;
|
restoreConfirmation.value = false;
|
||||||
|
@ -41,26 +41,26 @@ const store = DashboardConfigurationStore()
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-column p-3 gap-2">
|
<!-- <div class="d-flex flex-column p-3 gap-2">-->
|
||||||
<div class="d-flex w-100">
|
<!-- <div class="d-flex w-100">-->
|
||||||
<h5 class="mb-0">
|
<!-- <h5 class="mb-0">-->
|
||||||
<LocaleText t="WGDashboard Help Bot"></LocaleText>
|
<!-- <LocaleText t="WGDashboard Help Bot"></LocaleText>-->
|
||||||
</h5>
|
<!-- </h5>-->
|
||||||
<div class="form-check form-switch ms-auto mb-0">
|
<!-- <div class="form-check form-switch ms-auto mb-0">-->
|
||||||
<input class="form-check-input"
|
<!-- <input class="form-check-input"-->
|
||||||
v-model="store.HelpAgent.Enable"
|
<!-- v-model="store.HelpAgent.Enable"-->
|
||||||
type="checkbox" role="switch" id="enableHelpAgent">
|
<!-- type="checkbox" role="switch" id="enableHelpAgent">-->
|
||||||
<label class="form-check-label fw-bold" for="enableHelpAgent">
|
<!-- <label class="form-check-label fw-bold" for="enableHelpAgent">-->
|
||||||
<LocaleText :t="store.HelpAgent.Enable ? 'Enabled':'Disabled'"></LocaleText>
|
<!-- <LocaleText :t="store.HelpAgent.Enable ? 'Enabled':'Disabled'"></LocaleText>-->
|
||||||
</label>
|
<!-- </label>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<small class="text-muted" v-if="!store.HelpAgent.Enable">
|
<!-- <small class="text-muted" v-if="!store.HelpAgent.Enable">-->
|
||||||
By using this service, you're agreed to send your messages to a Large Language Model (LLM) hosted on DigitalOcean. Your messages will not store on the server in any type of form, you can verify it on <a href="https://github.com/donaldzou/WGDashboard-Bot-Middleware" target="_blank">here</a>. For more information, please contact me through GitHub or email.
|
<!-- By using this service, you're agreed to send your messages to a Large Language Model (LLM) hosted on DigitalOcean. Your messages will not store on the server in any type of form, you can verify it on <a href="https://github.com/donaldzou/WGDashboard-Bot-Middleware" target="_blank">here</a>. For more information, please contact me through GitHub or email.-->
|
||||||
</small>
|
<!-- </small>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<AgentContainer key="agentContainer" v-if="store.HelpAgent.Enable"></AgentContainer>
|
<!-- <AgentContainer key="agentContainer" v-if="store.HelpAgent.Enable"></AgentContainer>-->
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user