Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问流水线搜索日志,全屏浏览器查询搜索的日志,上方的搜索栏会消失 #11118 #11120

Merged
merged 6 commits into from
Oct 29, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,27 @@
<div class="item-content">
<div class="item-label">{{ $t('environment.nodeInfo.dockerMaxConcurrency') }}</div>
<div class="item-value">
<div class="display-item" v-if="isEditDockerCount">
<input type="number" class="bk-form-input parallelTaskCount-input"
<div
class="display-item"
v-if="isEditDockerCount"
>
<input
type="number"
class="bk-form-input parallelTaskCount-input"
ref="dockerParallelTaskCount"
name="dockerParallelTaskCount"
:placeholder="$t('environment.nodeInfo.parallelTaskCountTips')"
v-validate.initial="`required|between:0,100|decimal:0`"
v-model="dockerParallelTaskCount"
:class="{ 'is-danger': errors.has('dockerParallelTaskCount') }">
:class="{ 'is-danger': errors.has('dockerParallelTaskCount') }"
>
</div>
<div
class="editing-item"
v-else
>
{{ nodeDetails.dockerParallelTaskCount || '--' }}
</div>
<div class="editing-item" v-else>{{ nodeDetails.dockerParallelTaskCount || '--' }}</div>
</div>
<div class="handle-btn">
<div v-if="isEditDockerCount">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/devops-nav/src/store/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const getters: GetterTree<RootState, any> = {
getCollectServices: (state: RootState) => {
return state.services.reduce((collects: any, service: any) => {
Array.isArray(service.children) && service.children.forEach((child: any) => {
if (child.collected) {
if (child.collected && child.status !== 'developing' && child.status !== 'planning') {
collects.push(child)
}
})
Expand Down
8 changes: 5 additions & 3 deletions src/frontend/devops-nav/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,18 @@
}))
}

get recentVisitService (): object[] {
get recentVisitService (): any[] {
const recentVisitService = localStorage.getItem('recentVisitService')
const recentVisitServiceList = recentVisitService ? JSON.parse(recentVisitService) : []
return recentVisitServiceList.map(service => {
const serviceList = recentVisitServiceList.map(service => {
const serviceObj = window.serviceObject.serviceMap[service.key] || {}
return {
...service,
...serviceObj
}
})
}).filter(item => item.status !== 'planning' && item.status !== 'developing')
localStorage.setItem('recentVisitService', JSON.stringify(serviceList))
return serviceList
}

get serviceCount (): number {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
id: item.id,
name: this.$t(`storeMap.${item.name}`)
}
})
}).filter(item => item.id !== 'CHECKBOX')
},
boolList () {
return BOOLEAN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
justify-content: space-between;
color: #d4d4d4;
position: relative;
flex: 0 0 auto; /* 确保 header 固定在顶部 */
.head-tab {
position: absolute;
left: 50%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@
.plugin-log {
display: flex;
flex-direction: column;
flex: 1;
flex: 1 1 auto;
overflow-y: auto;
.log-tools {
position: absolute;
right: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@
name: this.$t(`storeMap.${item.name}`)
}
})
return this.paramType === 'constant' ? list.filter(item => CONST_TYPE_LIST.includes(item.id)) : list
const variableList = list.filter(item => item.id !== 'CHECKBOX')
return this.paramType === 'constant' ? list.filter(item => CONST_TYPE_LIST.includes(item.id)) : variableList
}
},
created () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
v-validate.initial="showCondition ? 'required' : ''"
name="customCondition"
:handle-change="handleUpdateStageControl"
:placeholder="$t('storeMap.customConditionExpPlaceholder')"
>
</vuex-input>
</form-field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ const jobOptionConfigMixin = {
label: this.$t('storeMap.customConditionExp'),
isHidden: (container) => {
return container?.jobControlOption?.runCondition !== 'CUSTOM_CONDITION_MATCH'
}
},
placeholder: this.$t('storeMap.customConditionExpPlaceholder')
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ const optionConfigMixin = {
label: this.$t('storeMap.customConditionExp'),
isHidden: (element) => {
return element?.additionalOptions?.runCondition !== 'CUSTOM_CONDITION_MATCH'
}
},
placeholder: this.$t('storeMap.customConditionExpPlaceholder')
},
otherTask: {
isHidden: true,
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,8 @@
"singleNodeConcurrencyPlaceholder": "Default is the maximum concurrency set on the node",
"allNodeConcurrency": "Concurrency limit across all nodes",
"allNodeConcurrencyPlaceholder": "The theoretical concurrency = concurrency per node * number of nodes",
"minutes": "Minutes"
"minutes": "Minutes",
"customConditionExpPlaceholder": "e.g., variables.a == 1 || jobs.job1.steps.step1.outputs.b == 'api'"
},
"主版本": "Major version",
"特性版本": "Minor version",
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,8 @@
"singleNodeConcurrencyPlaceholder": "不填则以节点上设置的最大并发数为准",
"allNodeConcurrency": "所有节点上的总并发",
"allNodeConcurrencyPlaceholder": "不填则 总并发理论值=单节点最大并发*构建节点数",
"minutes": "分钟"
"minutes": "分钟",
"customConditionExpPlaceholder": "如:variables.a == 1 || jobs.job1.steps.step1.outputs.b == 'api'"
},
"主版本": "主版本",
"特性版本": "特性版本",
Expand Down
Loading