diff --git a/web/ui/src/components/Job.vue b/web/ui/src/components/Job.vue
index adee2a9..9700403 100644
--- a/web/ui/src/components/Job.vue
+++ b/web/ui/src/components/Job.vue
@@ -12,11 +12,11 @@
@@ -85,8 +85,8 @@ export default {
},
mounted: function(){
+ this.fillParams();
var vm = this;
- this.group = this.$route.query.group || '';
this.$rest.GET('job/groups').onsucceed(200, (resp)=>{
!resp.includes('default') && resp.unshift('default');
@@ -105,12 +105,17 @@ export default {
watch: {
'$route': function(){
- this.group = this.$route.query.group || '';
+ this.fillParams();
this.fetchList(this.buildQuery());
}
},
methods: {
+ fillParams: function(){
+ this.group = this.$route.query.group || '';
+ this.node = this.$route.query.node || '';
+ },
+
changeGroup: function(val, text){
var vm = this;
this.group = val;
diff --git a/web/ui/src/components/Log.vue b/web/ui/src/components/Log.vue
index b69480a..dae7898 100644
--- a/web/ui/src/components/Log.vue
+++ b/web/ui/src/components/Log.vue
@@ -95,14 +95,7 @@ export default {
},
mounted: function(to, from, next){
- this.names = this.$route.query.names || '';
- this.ids = this.$route.query.ids || '';
- this.nodes = this.$route.query.nodes || '';
- this.begin = this.$route.query.begin || '';
- this.end = this.$route.query.end || '';
- this.page = this.$route.query.page || 1;
- this.latest = this.$route.query.latest ? true : false;
- this.failedOnly = this.$route.query.failedOnly ? true : false;
+ this.fillParams();
this.fetchList(this.buildQuery());
var vm = this;
@@ -112,6 +105,13 @@ export default {
watch: {
'$route': function(){
+ this.fillParams();
+ this.fetchList(this.buildQuery());
+ }
+ },
+
+ methods: {
+ fillParams(){
this.names = this.$route.query.names || '';
this.ids = this.$route.query.ids || '';
this.nodes = this.$route.query.nodes || '';
@@ -120,11 +120,8 @@ export default {
this.page = this.$route.query.page || 1;
this.latest = this.$route.query.latest == 'true' ? true : false;
this.failedOnly = this.$route.query.failedOnly ? true : false;
- this.fetchList(this.buildQuery());
- }
- },
+ },
- methods: {
fetchList(query){
this.loading = true;
var vm = this;