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

Develop #2551

Merged
merged 5 commits into from
Mar 4, 2024
Merged

Develop #2551

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/choose-ip/topology-tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<span v-bk-tooltips="{ content: $t(`m.common['已选父级']`), disabled: !isParentChecked(row) }">
<bk-checkbox
:value="formatCheckBoxStatus(row, 'checked')"
:disabled="formatCheckBoxStatus(row, 'disabled')"
:disabled="formatCheckBoxStatus(row, 'disabled') || formatRadioDisabled(row)"
@change="handleChildNodeChange(...arguments, row)"
/>
</span>
Expand Down Expand Up @@ -669,7 +669,7 @@
}
if (!async && expanded) {
return {
'paddingLeft': `${16 + level * 8}px`
'paddingLeft': `16px`
};
}
};
Expand Down
23 changes: 16 additions & 7 deletions frontend/src/views/perm-template/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
import IamGuide from '@/components/iam-guide/index.vue';
import { fuzzyRtxSearch } from '@/common/rtx';
import { buildURLParams } from '@/common/url';
import { formatCodeData, getWindowHeight } from '@/common/util';
import { formatCodeData, getWindowHeight, delLocationHref } from '@/common/util';
export default {
name: '',
components: {
Expand Down Expand Up @@ -290,9 +290,8 @@
refreshCurrentQuery () {
const params = {};
const queryParams = {
...this.searchParams,
...this.$route.query,
...this.queryParams
...this.searchParams,
...this.queryParams
};
if (Object.keys(queryParams).length) {
window.history.replaceState({}, '', `?${buildURLParams(queryParams)}`);
Expand Down Expand Up @@ -341,6 +340,11 @@
count: 0
});
},

resetLocationHref () {
const urlFields = [...this.searchData.map(item => item.id), ...['current', 'limit']];
delLocationHref(urlFields);
},

async handleEmptyClear () {
this.searchParams = {};
Expand Down Expand Up @@ -380,9 +384,9 @@
this.tableLoading = isLoading;
this.setCurrentQueryCache(this.refreshCurrentQuery());
const params = {
...this.searchParams,
limit: this.pagination.limit,
offset: this.pagination.limit * (this.pagination.current - 1)
...this.searchParams,
limit: this.pagination.limit,
offset: this.pagination.limit * (this.pagination.current - 1)
};
delete params.current;
try {
Expand Down Expand Up @@ -475,7 +479,12 @@
this.searchParams = payload;
this.searchList = result;
this.emptyData.tipType = 'search';
this.queryParams = Object.assign(this.queryParams, { current: 1, limit: 10 });
this.resetPagination();
if (!result.length) {
this.resetLocationHref();
window.localStorage.removeItem('templateList');
}
this.fetchTemplateList(true);
},

Expand Down
6 changes: 4 additions & 2 deletions saas/backend/apps/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ class GroupsMemberRenewViewSet(GenericViewSet):
group_biz = GroupBiz()

@swagger_auto_schema(
operation_description="批量用户组添加成员",
operation_description="批量用户组成员续期",
request_body=BatchGroupMemberUpdateExpiredAtSLZ(label="成员"),
responses={status.HTTP_200_OK: serializers.Serializer()},
tags=["group"],
Expand Down Expand Up @@ -598,7 +598,9 @@ def create(self, request, *args, **kwargs):
)

# 写入审计上下文
audit_context_setter(group=group, members=data["members"])
audit_context_setter(group=group, members=group_member)
provider = GroupMemberRenewAuditProvider(request)
log_api_event(request, provider)

return Response({})

Expand Down
Loading