@yorha2b-lab/autodev 7.5.5 → 7.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/scripts/analyze/deep_intelligence.py +1 -1
- package/.github/scripts/render/dashboard.py +20 -14
- package/package.json +1 -1
- package/src/workshop/react/blueprint/molds/handleBlock.hbs +2 -0
- package/src/workshop/react/blueprint/molds/hookBlock.hbs +1 -2
- package/src/workshop/react/builder/index.js +1 -1
|
@@ -10,34 +10,46 @@ def peak_recon():
|
|
|
10
10
|
df = pd.read_csv('ghrs-data/clones_ledger.csv')
|
|
11
11
|
df['date'] = pd.to_datetime(df['date'])
|
|
12
12
|
df = df.sort_values('date').reset_index(drop=True)
|
|
13
|
+
one_year_ago = df['date'].max() - pd.Timedelta(days=365)
|
|
14
|
+
df = df[df['date'] >= one_year_ago].reset_index(drop=True)
|
|
13
15
|
fig3, axes3 = plt.subplots(3, 1, figsize=(16, 14))
|
|
14
16
|
# 3.1 时间序列图
|
|
15
17
|
axA = axes3[0]
|
|
16
18
|
axA.fill_between(df['date'], df['clones'],
|
|
17
19
|
alpha=0.3, color='#3498db', label='Clones')
|
|
18
20
|
axA.plot(df['date'], df['clones'], color='#3498db', linewidth=1.2)
|
|
21
|
+
|
|
22
|
+
# 💡 1. 核心修复:给左侧 Y 轴增加 25% 的顶部呼吸空间(从 859 扩充到 ~1050)
|
|
23
|
+
axA.set_ylim(bottom=0, top=df['clones'].max() * 1.25)
|
|
24
|
+
|
|
19
25
|
axA_twin = axA.twinx()
|
|
20
26
|
axA_twin.plot(df['date'], df['uniques'],
|
|
21
27
|
color='#e74c3c', linewidth=1.2, label='Visitors')
|
|
22
28
|
axA_twin.fill_between(
|
|
23
29
|
df['date'], df['uniques'], alpha=0.15, color='#e74c3c')
|
|
30
|
+
# 💡 2. 右侧 Y 轴同步给点余量
|
|
31
|
+
axA_twin.set_ylim(bottom=0, top=df['uniques'].max() * 1.2)
|
|
32
|
+
|
|
24
33
|
axA.set_ylabel('Clones', color='#3498db', fontsize=12)
|
|
25
34
|
axA_twin.set_ylabel('Visitors', color='#e74c3c', fontsize=12)
|
|
35
|
+
|
|
36
|
+
# 💡 3. 给标题加上 pad=15 间距,防止任何碰撞
|
|
26
37
|
axA.set_title('Bunker Signal Intensity (Peak Detection Mode)',
|
|
27
|
-
fontsize=14, fontweight='bold')
|
|
38
|
+
fontsize=14, fontweight='bold', pad=15)
|
|
28
39
|
|
|
40
|
+
# 💡 4. 战术箭头微调:指向清晰,文字居中悬浮在留白区
|
|
29
41
|
peak_clone_idx = df['clones'].idxmax()
|
|
30
42
|
axA.annotate(f'LEGEND PEAK: {df["clones"].max()}',
|
|
31
43
|
xy=(df.loc[peak_clone_idx, 'date'],
|
|
32
44
|
df.loc[peak_clone_idx, 'clones']),
|
|
33
|
-
xytext=(
|
|
34
|
-
arrowprops=dict(arrowstyle='->', color='yellow'),
|
|
45
|
+
xytext=(25, 20), textcoords='offset points',
|
|
46
|
+
arrowprops=dict(arrowstyle='->', color='yellow', lw=1.5),
|
|
35
47
|
fontsize=10, color='yellow', fontweight='bold')
|
|
36
48
|
|
|
37
49
|
# 3.2 每周汇总
|
|
38
50
|
axB = axes3[1]
|
|
39
51
|
weekly_agg = df.assign(W=df['date'].dt.strftime(
|
|
40
|
-
'%Y-W%
|
|
52
|
+
'%Y-W%V')).groupby('W')[['clones', 'uniques']].sum().tail(12)
|
|
41
53
|
weekly_agg.plot(kind='bar', ax=axB, alpha=0.8)
|
|
42
54
|
axB.set_title('Weekly Operational Summary',
|
|
43
55
|
fontsize=14, fontweight='bold')
|
|
@@ -62,6 +74,8 @@ def intelligence_grid():
|
|
|
62
74
|
df = pd.read_csv('ghrs-data/clones_ledger.csv')
|
|
63
75
|
df['date'] = pd.to_datetime(df['date'])
|
|
64
76
|
df = df.sort_values('date').reset_index(drop=True)
|
|
77
|
+
one_year_ago = df['date'].max() - pd.Timedelta(days=365)
|
|
78
|
+
df = df[df['date'] >= one_year_ago].reset_index(drop=True)
|
|
65
79
|
df['week'] = df['date'].dt.isocalendar().week
|
|
66
80
|
df['year'] = df['date'].dt.isocalendar().year
|
|
67
81
|
df['week_key'] = df['year'].astype(
|
|
@@ -204,13 +218,6 @@ def main_dashboard(df_c, df_v):
|
|
|
204
218
|
df = pd.merge(df_c, df_v, on='date', how='outer').fillna(
|
|
205
219
|
0).sort_values('date')
|
|
206
220
|
df['cumulative'] = df['Clones'].cumsum()
|
|
207
|
-
df['ratio'] = df['Clones'] / \
|
|
208
|
-
df['Views_Uniques'].replace(0, 1)
|
|
209
|
-
|
|
210
|
-
# 💡 2. 核心算法注入:计算“信号纯度” (Purity)
|
|
211
|
-
df['cumulative'] = df['Clones'].cumsum()
|
|
212
|
-
|
|
213
|
-
# 计算“信号纯度”:克隆数 / 访客数
|
|
214
221
|
df['ratio'] = df['Clones'] / df['Views_Uniques'].replace(0, 1)
|
|
215
222
|
|
|
216
223
|
# 算法:(比例/10 * 0.6) + (总量/500 * 0.4)
|
|
@@ -241,9 +248,8 @@ def main_dashboard(df_c, df_v):
|
|
|
241
248
|
# --- 💡 子图 3 [核心新增]: 信号纯度审计 (Signal Purity) ---
|
|
242
249
|
ax_p = fig1.add_subplot(gs1[2])
|
|
243
250
|
# 使用渐变紫色,代表地堡的“骇入感知”
|
|
244
|
-
ax_p.fill_between(df['date']
|
|
245
|
-
|
|
246
|
-
ax_p.plot(df['date'].tail(45), df['purity'].tail(45),
|
|
251
|
+
ax_p.fill_between(df['date'], df['purity'], color='#ff00ff', alpha=0.1)
|
|
252
|
+
ax_p.plot(df['date'], df['purity'],
|
|
247
253
|
color='#ff00ff', lw=1.5, label='Signal Purity %')
|
|
248
254
|
ax_p.set_ylim(0, 105) # 留点空白放标题
|
|
249
255
|
ax_p.axhline(y=50, color='#444', linestyle=':', alpha=0.5) # 50% 警戒线
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
const initialParams = {{initParams}}
|
|
3
|
-
|
|
4
3
|
const query = formatQuery(Object.fromEntries(new URLSearchParams(location.search).entries()), {{formItems}})
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -10,7 +9,7 @@ const query = formatQuery(Object.fromEntries(new URLSearchParams(location.search
|
|
|
10
9
|
* 2. 手动模式:搜索 BUNKER_API_ANCHOR 手动替换为真实接口。
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
|
-
const { total, columns, loading, dataSource,
|
|
12
|
+
const { total, search, columns, loading, dataSource, setLoading, setSearch, setDataSource, refresh } = useTableQuery({
|
|
14
13
|
cols:tableColumns,
|
|
15
14
|
initialParams: { ...initialParams, ...query },
|
|
16
15
|
api: async params => await {{{this.uri}}},
|
|
@@ -118,7 +118,7 @@ module.exports = ({ template, logistics, headquarters }) => {
|
|
|
118
118
|
const functionButtons = pageConfig.functionButton?.filter(item => !['查询', '重置', 'query', 'search', 'reset'].includes(item.btn.toLowerCase().replaceAll(' ', ''))) || []
|
|
119
119
|
const needRenderAction = hasImageColumn
|
|
120
120
|
|
|
121
|
-
const pageStruct = ['stateBlock', '
|
|
121
|
+
const pageStruct = ['stateBlock', 'hookBlock', 'handleBlock', hasOperate ? 'operateBlock' : '', 'renderBlock'].filter(Boolean)
|
|
122
122
|
|
|
123
123
|
let columnsValue = hasTabs ? 'columns[activeKey]' : 'columns'
|
|
124
124
|
if (hasOperate) {
|