-
{{ label }}
+
+ {{ label }}
+ ({{ desc }})
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
-
-
@@ -25,8 +32,8 @@
import SaveBtn from '@/components/Settings/SaveBtn'
import TextBox from '@/components/Common/TextBox'
import actions from '@/store/actions'
-import { mapState } from 'vuex'
-import { httpUrl, required } from '@/util/rules'
+import {mapState} from 'vuex'
+import {httpUrl, required} from '@/util/rules'
export default {
name: "SystemSettingsHome",
@@ -60,7 +67,7 @@ export default {
}
this.$store.dispatch(actions.settings.save, this.settings).then(() => {
- this.showSnackBar("Saved")
+ this.showSnackBar("Saved")
})
}
}
From ae2e49312789b20fcaac72ade66249eb5556afcc Mon Sep 17 00:00:00 2001
From: gy2006 <32008001@qq.com>
Date: Fri, 10 Dec 2021 15:28:45 +0100
Subject: [PATCH 4/5] show built in variables
---
src/assets/styles/common.scss | 8 ++++++++
src/util/jobs.js | 32 +++++++++++++++++++++----------
src/view/Job/DetailTabContext.vue | 23 +++++++++++++++++++---
3 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/src/assets/styles/common.scss b/src/assets/styles/common.scss
index dbf80f33..395271fb 100644
--- a/src/assets/styles/common.scss
+++ b/src/assets/styles/common.scss
@@ -55,6 +55,14 @@
height: auto !important;
}
+.if-overflow {
+ float: left;
+ width: 400px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
@-moz-keyframes loader {
from {
transform: rotate(0);
diff --git a/src/util/jobs.js b/src/util/jobs.js
index 590a0036..54366670 100644
--- a/src/util/jobs.js
+++ b/src/util/jobs.js
@@ -26,6 +26,23 @@ export const TRIGGER_SCHEDULER = 'SCHEDULER'
export class JobWrapper {
constructor(job) {
this.job = job
+
+ this.builtInVarList = []
+ this.customVarList = []
+
+ Object.keys(this.context).forEach(key => {
+ let value = this.context[key]
+ if (value === '') {
+ return
+ }
+
+ if (key.startsWith('FLOWCI_')) {
+ this.builtInVarList.push({key: key, value: value})
+ return
+ }
+
+ this.customVarList.push({key: key, value: value})
+ })
}
get context() {
@@ -86,16 +103,11 @@ export class JobWrapper {
return status
}
- get customVarList() {
- const contextAsPairList = []
-
- Object.keys(this.context).forEach(key => {
- if (!key.startsWith('FLOWCI_')) {
- contextAsPairList.push({key: key, value: this.context[key]})
- }
- })
-
- return contextAsPairList
+ get vars() {
+ return {
+ builtIn: this.builtInVarList,
+ custom: this.customVarList
+ }
}
get duration() {
diff --git a/src/view/Job/DetailTabContext.vue b/src/view/Job/DetailTabContext.vue
index ce848011..4cdc87a6 100644
--- a/src/view/Job/DetailTabContext.vue
+++ b/src/view/Job/DetailTabContext.vue
@@ -6,6 +6,7 @@
:items="value.data"
class="mb-2 bottom-border"
v-show="value.show"
+ disable-pagination
hide-default-footer
hide-default-header>
@@ -20,7 +21,9 @@
{{ item.key }}
-
+
+
+
-
@@ -31,7 +34,7 @@
@@ -85,7 +88,15 @@ export default {
variables: {
name: 'Variables',
show: true,
- data: this.wrapper.customVarList
+ data: this.wrapper.vars.custom,
+ showBar: true
+ },
+
+ builtInVars: {
+ name: 'Built In Variables',
+ show: true,
+ data: this.wrapper.vars.builtIn,
+ showBar: true
}
}
}
@@ -206,4 +217,10 @@ export default {
vertical-align: middle;
background-color: #E0E0E0;
}
+
+.vertical-bar {
+ display: flex;
+ height: 20px;
+ border-left: 1px solid #c6c6cb;
+}
From fccdd812010a7fe38658e5a5763b2be3cd063447 Mon Sep 17 00:00:00 2001
From: gy2006 <32008001@qq.com>
Date: Fri, 10 Dec 2021 20:44:00 +0100
Subject: [PATCH 5/5] skip _TYPE_ for job context
---
src/util/jobs.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/util/jobs.js b/src/util/jobs.js
index 54366670..540ec9f4 100644
--- a/src/util/jobs.js
+++ b/src/util/jobs.js
@@ -32,6 +32,10 @@ export class JobWrapper {
Object.keys(this.context).forEach(key => {
let value = this.context[key]
+ if (key === '_TYPE_') {
+ return
+ }
+
if (value === '') {
return
}