开发者账号支持自定义自动检测

dependabot/npm_and_yarn/fir_admin/url-parse-1.5.10
nineven 3 years ago
parent 44cfd03cee
commit f02eb026de
  1. 42
      fir_client/src/components/user/FirSuperSignBase.vue
  2. 17
      fir_ser/api/migrations/0033_appiosdeveloperinfo_auto_check.py
  3. 1
      fir_ser/api/models.py
  4. 2
      fir_ser/api/utils/crontab/ctasks.py
  5. 2
      fir_ser/api/views/supersign.py

@ -112,7 +112,7 @@
inactive-color="#ff4949"
inactive-value="off">
</el-switch>
<el-tag style="margin-left: 10px" type="warning"> 该模式下新设备新应用无法进行注册安装但是已经安装的不影响</el-tag>
<el-tag style="margin-left: 10px" type="warning"> 该模式下新设备新应用无法进行注册安装但是已经安装的不影响默认关闭</el-tag>
<el-tag v-if="read_only_mode==='on'" style="margin-left: 50px" type="warning"> 通过账户激活进行关闭维护模式</el-tag>
</el-form-item>
<el-form-item label="清理禁用设备" label-width="110px" style="text-align: left">
@ -123,7 +123,17 @@
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
<el-tag style="margin-left: 10px" type="warning"> 清理数据的时候是否同时将开发者设备禁用默认不禁用</el-tag>
<el-tag style="margin-left: 10px" type="warning"> 清理数据的时候是否同时将开发者设备禁用默认关闭</el-tag>
</el-form-item>
<el-form-item label="状态自动检测" label-width="110px" style="text-align: left">
<el-switch
v-model="editdeveloperinfo.auto_check"
:active-value="true"
:inactive-value="false"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
<el-tag style="margin-left: 10px" type="warning"> 开启之后每天凌晨自动检测该开发者状态是否正常默认关闭</el-tag>
</el-form-item>
<el-form-item label="证书id" label-width="110px">
<el-input v-model="editdeveloperinfo.certid" :disabled='isedit'/>
@ -381,7 +391,7 @@
fixed
label="开发者ID issuer_id"
prop="issuer_id"
width="200">
width="160">
<template slot-scope="scope">
<el-popover placement="top" trigger="hover">
<el-tooltip content="点击复制到剪贴板">
@ -412,7 +422,7 @@
align="center"
label="是否激活"
prop="status"
width="110">
width="105">
<template slot-scope="scope">
<el-tooltip v-if="scope.row.status!==0" content="点击禁用">
<el-button size="small" type="success" @click="disabledeveloperFun(scope.row,'disable')">已激活</el-button>
@ -529,6 +539,16 @@
</el-popover>
</template>
</el-table-column>
<el-table-column
align="center"
label="自动检测"
prop="auto_check"
width="60">
<template slot-scope="scope">
<el-tag v-if="scope.row.auto_check" size="medium"></el-tag>
<el-tag v-else size="medium" type="info"></el-tag>
</template>
</el-table-column>
<el-table-column
:formatter="formatter"
align="center"
@ -1092,7 +1112,13 @@
label="目标用户UID">
<template slot-scope="scope">
<el-popover placement="top" trigger="hover">
<p>用户UID: {{ scope.row.target_user.uid }}</p>
<el-tooltip content="点击复制到剪贴板">
<el-link v-clipboard:copy="scope.row.target_user.uid"
v-clipboard:success="copy_success"
:underline="false">用户UID: {{ scope.row.target_user.uid }}
</el-link>
</el-tooltip>
<p>用户昵称: {{ scope.row.target_user.name }}</p>
<div slot="reference" class="name-wrapper">
<span>{{ scope.row.target_user.uid }}</span>
@ -1633,7 +1659,7 @@ export default {
},
handleCurrentChange(val) {
this.pagination.currentPage = val;
this.this.refreshactiveFun()
this.refreshactiveFun()
},
syncdevices() {
this.iosdeveloperFun({
@ -1897,7 +1923,7 @@ export default {
this.$message.error("操作失败")
}
if (params.methods === 'PUT' || params.methods === 'DELETE') {
this.this.refreshactiveFun()
this.refreshactiveFun()
}
if (params.methods !== 'GET') {
this.loadingfun.close();
@ -2015,7 +2041,7 @@ export default {
this.developer_udevices_lists = data.data;
this.pagination.total = data.count;
} else {
this.this.refreshactiveFun()
this.refreshactiveFun()
}
} else {
this.$message.error("操作失败了 " + data.msg);

@ -0,0 +1,17 @@
# Generated by Django 3.2.3 on 2022-02-05 09:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0032_systemconfig'),
]
operations = [
migrations.AddField(
model_name='appiosdeveloperinfo',
name='auto_check',
field=models.BooleanField(default=False, verbose_name='是否自动检测开发者状态'),
),
]

@ -284,6 +284,7 @@ class AppIOSDeveloperInfo(models.Model):
status = models.SmallIntegerField(choices=status_choices, verbose_name="账户状态", default=0)
clean_status = models.BooleanField(verbose_name="清理是否同时禁用设备ID", default=False)
auto_check = models.BooleanField(verbose_name="是否自动检测开发者状态", default=False)
class Meta:
verbose_name = '苹果开发者账户'

@ -66,7 +66,7 @@ def auto_delete_ios_mobile_tmp_file():
def auto_check_ios_developer_active():
all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=DEVELOPER_AUTO_CHECK_STATUS)
all_ios_developer = AppIOSDeveloperInfo.objects.filter(status__in=DEVELOPER_AUTO_CHECK_STATUS, auto_check=True)
error_issuer_id = {}
for ios_developer in all_ios_developer:
userinfo = ios_developer.user_id

@ -205,6 +205,8 @@ class DeveloperView(APIView):
developer_obj.clean_status = data.get("clean_status", developer_obj.clean_status)
update_fields.append("clean_status")
developer_obj.auto_check = data.get("auto_check", developer_obj.auto_check)
update_fields.append("auto_check")
private_key_id = data.get("private_key_id", developer_obj.private_key_id)
p8key = data.get("p8key", developer_obj.p8key)

Loading…
Cancel
Save