This is a experiment in using vue.js.
- - vuetifyjs
+ - vuetifyjs
- vue-multiselect
vue-select
- js-beautify
@@ -546,21 +599,64 @@ const Home=Vue.extend({template:`
add
- REPLACED
+ REPLACED
`,
}
+);
+const Job=Vue.extend({template:`
+
+ JOBS
+
+
+ `,
+
+ data: function(){
+ return {
+ message: 'Hello Vue.js!',
+ q:this.$route.query.q,
+ items:[
+ {href: '/',text: 'Home', icon: 'home' },
+
+ {href: 'files', text: 'File system',icon: 'folder' },
+ {href: 'edit',text: 'edit',icon: 'mode_edit'},
+ {href: 'history',text: 'history',icon: 'history'},
+
+ {href: 'eval',text: 'Evaluate',icon: 'cake'},
+ {href: 'tasks',text: 'Tasks',icon: 'build'},
+ {href: 'jobs',text: 'Jobs',icon: 'print'},
+
+ {href: 'logs',text: 'Server logs',icon: 'dns'},
+ {href: 'people',text: 'People',icon: 'person'},
+ {href: 'select',text: 'select',icon: 'extension'},
+ {href: 'puzzle',text: 'Puzzle',icon: 'extension'},
+ {href: 'options',text: 'options',icon: 'domain'},
+ {href: 'tabs',text: 'tabs',icon: 'switch_camera'},
+ {href: 'ping',text: 'ping',icon: 'update'},
+ {href: 'thumbnail',text: 'thumbnail',icon: 'touch_app'},
+ {href: 'settings',text: 'settings',icon: 'settings' }
+ ]
+ }
+ },
+ created:function(){
+ console.log("Serch",this.$route.query.q)
+ }
+}
+
);
const Login=Vue.extend({template:`
+
Login
-
+
+ {{message}}
+
@@ -581,33 +677,57 @@ const Login=Vue.extend({template:`
return {
hidepass: true,
name:'',
- password: ''
+ password: '',
+ redirect: this.$route.query.redirect,
+ message:"",
+ showMessage:false
}
},
methods:{
go () {
this.hidepass=true
+ this.showMessage=false
var data=Qs.stringify(
{
username: this.name, //gave the values directly for testing
password: this.password,
- client_id: 'user-client'
+ redirect: this.redirect
})
- HTTP.post("login-check", data,
- {
- headers: {
- "Content-Type": "application/x-www-form-urlencoded"
- }})
+ HTTP.post("login-check", data)
.then(r=>{
- console.log(r)
- alert("loh")
+ console.log("login",r.data)
+ if(r.data.status){
+ this.$auth.role="admin"
+ this.$router.replace(this.redirect)
+ }else{
+ this.message=r.data.message
+ this.showMessage=true;
+ }
+
}).catch(error=> {
- alert("err")
+ alert("err login")
})
}
}
}
+);
+const Log=Vue.extend({template:`
+
+ LOGS
+ `,
+
+ data: function(){
+ return {
+ message: 'Hello Vue.js!',
+ q:this.$route.query.q
+ }
+ },
+ created:function(){
+ console.log("Serch",this.$route.query.q)
+ }
+}
+
);
const Options=Vue.extend({template:`
@@ -668,7 +788,7 @@ const People=Vue.extend({template:`