mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-06 21:24:10 +00:00
fix: add component includes and fix API paths in nodes page
This commit is contained in:
parent
2721dd0f13
commit
07fecdbf86
1 changed files with 6 additions and 3 deletions
|
|
@ -147,12 +147,15 @@
|
||||||
</a-layout>
|
</a-layout>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
{{template "page/body_scripts" .}}
|
{{template "page/body_scripts" .}}
|
||||||
|
{{template "component/aSidebar" .}}
|
||||||
|
{{template "component/aThemeSwitch" .}}
|
||||||
<script>
|
<script>
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
delimiters: ['[[', ']]'],
|
delimiters: ['[[', ']]'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
themeSwitcher,
|
||||||
loading: false,
|
loading: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
nodeRole: '',
|
nodeRole: '',
|
||||||
|
|
@ -189,7 +192,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
async loadNodes() {
|
async loadNodes() {
|
||||||
try {
|
try {
|
||||||
const res = await axios.get('api/nodes/list');
|
const res = await axios.get('/panel/api/nodes/list');
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.nodes = res.data.obj;
|
this.nodes = res.data.obj;
|
||||||
}
|
}
|
||||||
|
|
@ -199,7 +202,7 @@
|
||||||
},
|
},
|
||||||
async loadConfig() {
|
async loadConfig() {
|
||||||
try {
|
try {
|
||||||
const res = await axios.get('api/nodes/config');
|
const res = await axios.get('/panel/api/nodes/config');
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
Object.assign(this.nodeConfig, res.data.obj);
|
Object.assign(this.nodeConfig, res.data.obj);
|
||||||
this.nodeRole = res.data.obj.role;
|
this.nodeRole = res.data.obj.role;
|
||||||
|
|
@ -211,7 +214,7 @@
|
||||||
async saveConfig() {
|
async saveConfig() {
|
||||||
this.saving = true;
|
this.saving = true;
|
||||||
try {
|
try {
|
||||||
const res = await axios.post('api/nodes/config', {
|
const res = await axios.post('/panel/api/nodes/config', {
|
||||||
syncInterval: this.nodeConfig.syncInterval,
|
syncInterval: this.nodeConfig.syncInterval,
|
||||||
trafficFlushInterval: this.nodeConfig.trafficFlushInterval,
|
trafficFlushInterval: this.nodeConfig.trafficFlushInterval,
|
||||||
dbType: this.nodeConfig.dbType,
|
dbType: this.nodeConfig.dbType,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue