mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 01:06:58 +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')
|
||||
def API_deleteWireguardConfigurationBackup():
|
||||
data = request.get_json()
|
||||
if ("configurationName" not in data.keys() or
|
||||
"backupFileName" not in data.keys() or
|
||||
len(data['configurationName']) == 0 or
|
||||
len(data['backupFileName']) == 0):
|
||||
if ("ConfigurationName" not in data.keys() or
|
||||
"BackupFileName" not in data.keys() or
|
||||
len(data['ConfigurationName']) == 0 or
|
||||
len(data['BackupFileName']) == 0):
|
||||
return ResponseObject(False,
|
||||
"Please provide configurationName and backupFileName in body")
|
||||
configurationName = data['configurationName']
|
||||
backupFileName = data['backupFileName']
|
||||
configurationName = data['ConfigurationName']
|
||||
backupFileName = data['BackupFileName']
|
||||
if configurationName not in WireguardConfigurations.keys():
|
||||
return ResponseObject(False, "Configuration does not exist")
|
||||
|
||||
@ -2329,14 +2329,14 @@ def API_downloadWireguardConfigurationBackup():
|
||||
@app.post(f'{APP_PREFIX}/api/restoreWireguardConfigurationBackup')
|
||||
def API_restoreWireguardConfigurationBackup():
|
||||
data = request.get_json()
|
||||
if ("configurationName" not in data.keys() or
|
||||
"backupFileName" not in data.keys() or
|
||||
len(data['configurationName']) == 0 or
|
||||
len(data['backupFileName']) == 0):
|
||||
if ("ConfigurationName" not in data.keys() or
|
||||
"BackupFileName" not in data.keys() or
|
||||
len(data['ConfigurationName']) == 0 or
|
||||
len(data['BackupFileName']) == 0):
|
||||
return ResponseObject(False,
|
||||
"Please provide configurationName and backupFileName in body")
|
||||
configurationName = data['configurationName']
|
||||
backupFileName = data['backupFileName']
|
||||
configurationName = data['ConfigurationName']
|
||||
backupFileName = data['BackupFileName']
|
||||
if configurationName not in WireguardConfigurations.keys():
|
||||
return ResponseObject(False, "Configuration does not exist")
|
||||
|
||||
|
@ -15,8 +15,8 @@ const loading = ref(false);
|
||||
const deleteBackup = () => {
|
||||
loading.value = true;
|
||||
fetchPost("/api/deleteWireguardConfigurationBackup", {
|
||||
configurationName: route.params.id,
|
||||
backupFileName: props.b.filename
|
||||
ConfigurationName: route.params.id,
|
||||
BackupFileName: props.b.filename
|
||||
}, (res) => {
|
||||
loading.value = false;
|
||||
if (res.status){
|
||||
@ -31,8 +31,8 @@ const deleteBackup = () => {
|
||||
const restoreBackup = () => {
|
||||
loading.value = true;
|
||||
fetchPost("/api/restoreWireguardConfigurationBackup", {
|
||||
configurationName: route.params.id,
|
||||
backupFileName: props.b.filename
|
||||
ConfigurationName: route.params.id,
|
||||
BackupFileName: props.b.filename
|
||||
}, (res) => {
|
||||
loading.value = false;
|
||||
restoreConfirmation.value = false;
|
||||
|
@ -41,26 +41,26 @@ const store = DashboardConfigurationStore()
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column p-3 gap-2">
|
||||
<div class="d-flex w-100">
|
||||
<h5 class="mb-0">
|
||||
<LocaleText t="WGDashboard Help Bot"></LocaleText>
|
||||
</h5>
|
||||
<div class="form-check form-switch ms-auto mb-0">
|
||||
<input class="form-check-input"
|
||||
v-model="store.HelpAgent.Enable"
|
||||
type="checkbox" role="switch" id="enableHelpAgent">
|
||||
<label class="form-check-label fw-bold" for="enableHelpAgent">
|
||||
<LocaleText :t="store.HelpAgent.Enable ? 'Enabled':'Disabled'"></LocaleText>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<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.
|
||||
</small>
|
||||
</div>
|
||||
<!-- <div class="d-flex flex-column p-3 gap-2">-->
|
||||
<!-- <div class="d-flex w-100">-->
|
||||
<!-- <h5 class="mb-0">-->
|
||||
<!-- <LocaleText t="WGDashboard Help Bot"></LocaleText>-->
|
||||
<!-- </h5>-->
|
||||
<!-- <div class="form-check form-switch ms-auto mb-0">-->
|
||||
<!-- <input class="form-check-input"-->
|
||||
<!-- v-model="store.HelpAgent.Enable"-->
|
||||
<!-- type="checkbox" role="switch" id="enableHelpAgent">-->
|
||||
<!-- <label class="form-check-label fw-bold" for="enableHelpAgent">-->
|
||||
<!-- <LocaleText :t="store.HelpAgent.Enable ? 'Enabled':'Disabled'"></LocaleText>-->
|
||||
<!-- </label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <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.-->
|
||||
<!-- </small>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<AgentContainer key="agentContainer" v-if="store.HelpAgent.Enable"></AgentContainer>
|
||||
<!-- <AgentContainer key="agentContainer" v-if="store.HelpAgent.Enable"></AgentContainer>-->
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user