@liujitcn/kratos-admin-system 0.0.27 → 0.0.28

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.
Files changed (24) hide show
  1. package/dist/package/declarations/src/api/system/runtime_log.d.ts +13 -0
  2. package/dist/package/declarations/src/api/system/runtime_log_sse.d.ts +8 -0
  3. package/dist/package/declarations/src/locales/generated.d.ts +116 -0
  4. package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +4 -0
  5. package/dist/package/declarations/src/rpc/system/admin/v1/project_document.d.ts +4 -6
  6. package/dist/package/declarations/src/rpc/system/admin/v1/runtime_log.d.ts +96 -0
  7. package/dist/package/declarations/src/views/tool/runtime-log/index.vue.d.ts +3 -0
  8. package/dist/package/src/api/system/runtime_log.ts +80 -0
  9. package/dist/package/src/api/system/runtime_log_sse.ts +40 -0
  10. package/dist/package/src/locales/en-US.json +31 -2
  11. package/dist/package/src/locales/ja-JP.json +31 -2
  12. package/dist/package/src/locales/zh-CN.json +31 -2
  13. package/dist/package/src/locales/zh-TW.json +31 -2
  14. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +4 -0
  15. package/dist/package/src/rpc/system/admin/v1/project_document.ts +4 -7
  16. package/dist/package/src/rpc/system/admin/v1/runtime_log.ts +113 -0
  17. package/dist/package/src/views/tool/api-doc/index.vue +14 -6
  18. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +17 -0
  19. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +96 -14
  20. package/dist/package/src/views/tool/code-gen/table/index.vue +32 -0
  21. package/dist/package/src/views/tool/ops-monitoring/index.vue +130 -24
  22. package/dist/package/src/views/tool/project-doc/index.vue +9 -4
  23. package/dist/package/src/views/tool/runtime-log/index.vue +883 -0
  24. package/package.json +2 -2
@@ -72,7 +72,7 @@
72
72
  import { computed, nextTick, onMounted, ref, watch } from "vue";
73
73
  import { Search } from "@element-plus/icons-vue";
74
74
  import type { TreeNodeData } from "element-plus";
75
- import { getCurrentLocale, t } from "@liujitcn/kratos-admin-core";
75
+ import { getCurrentLocale, t, useLocaleStore } from "@liujitcn/kratos-admin-core";
76
76
  import MarkdownPreview from "@liujitcn/kratos-admin-core/components/MarkdownPreview/index.vue";
77
77
  import { useGlobalStore } from "@liujitcn/kratos-admin-core/stores/runtime";
78
78
  import { defProjectDocumentService } from "@liujitcn/kratos-admin-system/api/system/project_document";
@@ -112,6 +112,7 @@ interface ProjectDocumentTreeNode {
112
112
  }
113
113
 
114
114
  const globalStore = useGlobalStore();
115
+ const { locale } = useLocaleStore();
115
116
  const loading = ref(false);
116
117
  const detailLoading = ref(false);
117
118
  const keyword = ref("");
@@ -137,11 +138,11 @@ const filteredDocumentCount = computed(() => {
137
138
  const search = keyword.value.trim().toLocaleLowerCase();
138
139
  if (!search) return documents.value.length;
139
140
  return documents.value.filter(node =>
140
- [node.projectKey, node.projectName, node.path].some(value => value.toLocaleLowerCase().includes(search))
141
+ [node.label, node.projectKey, node.projectName, node.path].some(value => value.toLocaleLowerCase().includes(search))
141
142
  ).length;
142
143
  });
143
144
  const selectedDocumentNodeKey = computed(() => (selectedDocumentId.value ? buildDocumentNodeKey(selectedDocumentId.value) : ""));
144
- const selectedDocumentName = computed(() => selectedDocument.value?.path.split("/").at(-1) ?? "");
145
+ const selectedDocumentName = computed(() => selectedDocument.value?.name ?? "");
145
146
  const selectedDocumentUpdatedAt = computed(
146
147
  () => documents.value.find(node => node.document?.id === selectedDocumentId.value)?.document?.updated_at ?? ""
147
148
  );
@@ -321,7 +322,7 @@ function buildDocumentTreeNode(
321
322
  ): ProjectDocumentTreeNode {
322
323
  return {
323
324
  key: buildDocumentNodeKey(document.id),
324
- label: document.path.split("/").at(-1) ?? document.path,
325
+ label: document.name,
325
326
  kind: "document",
326
327
  projectKey,
327
328
  projectName,
@@ -352,6 +353,10 @@ watch(keyword, value => {
352
353
  documentTreeRef.value?.filter(value);
353
354
  });
354
355
 
356
+ watch(locale, () => {
357
+ void loadDocuments();
358
+ });
359
+
355
360
  onMounted(() => {
356
361
  void loadDocuments();
357
362
  });