rails-mermaid_erd 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-mermaid_erd/version.rb +1 -1
- data/lib/templates/index.html.erb +24 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 504e1237efa4afd3d86bf50d4c466443a2b1ee075033f645c126f5e46e5bf78d
|
4
|
+
data.tar.gz: adf2c78d06647387cc2874571007629c7cb680592ffbcf6b5669e7cbe6863964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a9a19d6f95e00edaf5e3e42ea7129ef335313c0edd3026e2413f6db4e7f4391aab54cfee1140aadd8f40de3a8654a32589dfb18bf98d7144ee4a688e538e89e
|
7
|
+
data.tar.gz: e1facb6208c5de58d28b6ff2a69b69a39d643a14ef0b97562d3f1790c4a88f98b5dc5c08b9572156e52ca157a682c66d7de3d7e303ccc44d069043ac19aca44a
|
@@ -130,6 +130,18 @@
|
|
130
130
|
</label>
|
131
131
|
</div>
|
132
132
|
|
133
|
+
<div class="min-w-0 flex-1 text-sm">
|
134
|
+
<label class="relative flex items-start cursor-pointer hover:bg-gray-100 rounded">
|
135
|
+
<input
|
136
|
+
type="checkbox"
|
137
|
+
class="h-4 w-4 rounded border-gray-300 text-red-600 mr-2 focus:ring-red-600"
|
138
|
+
v-model="isShowRelationComment"
|
139
|
+
@change="updateHash"
|
140
|
+
/>
|
141
|
+
<span class="text-xs text-gray-900">{{i18n[language]["options"]["show_relationship_comment"]}}</span>
|
142
|
+
</label>
|
143
|
+
</div>
|
144
|
+
|
133
145
|
<div class="min-w-0 flex-1 text-sm">
|
134
146
|
<label class="relative flex items-start cursor-pointer hover:bg-gray-100 rounded">
|
135
147
|
<input
|
@@ -253,6 +265,7 @@
|
|
253
265
|
options: {
|
254
266
|
title: 'Options',
|
255
267
|
preview_relationships: 'Preview Relationships',
|
268
|
+
show_relationship_comment: 'Show Relationship Comment',
|
256
269
|
show_key: 'Show Key',
|
257
270
|
show_column_comment: 'Show Column Comment',
|
258
271
|
hide_columns: 'Hide Columns',
|
@@ -286,6 +299,7 @@
|
|
286
299
|
options: {
|
287
300
|
title: '設定',
|
288
301
|
preview_relationships: 'リレーションをプレビュー',
|
302
|
+
show_relationship_comment: 'リレーションのコメントを表示',
|
289
303
|
show_key: 'キーを表示',
|
290
304
|
show_column_comment: 'コメントを表示',
|
291
305
|
hide_columns: 'カラムを非表示',
|
@@ -319,6 +333,7 @@
|
|
319
333
|
}
|
320
334
|
const selectModels = Vue.ref([])
|
321
335
|
const isPreviewRelations = Vue.ref(false)
|
336
|
+
const isShowRelationComment = Vue.ref(false)
|
322
337
|
const isShowKey = Vue.ref(false)
|
323
338
|
const isShowComment = Vue.ref(false)
|
324
339
|
const isHideColumns = Vue.ref(false)
|
@@ -329,6 +344,7 @@
|
|
329
344
|
const parsedData = JSON.parse(atob(h))
|
330
345
|
selectModels.value = parsedData.selectModels || []
|
331
346
|
isPreviewRelations.value = !!parsedData.isPreviewRelations
|
347
|
+
isShowRelationComment.value = !!parsedData.isShowRelationComment
|
332
348
|
isShowKey.value = !!parsedData.isShowKey
|
333
349
|
isShowComment.value = !!parsedData.isShowComment
|
334
350
|
isHideColumns.value = !!parsedData.isHideColumns
|
@@ -343,6 +359,7 @@
|
|
343
359
|
selectModels.value.push(model.ModelName)
|
344
360
|
})
|
345
361
|
isPreviewRelations.value = false
|
362
|
+
isShowRelationComment.value = false
|
346
363
|
isShowKey.value = false
|
347
364
|
isShowComment.value = false
|
348
365
|
isHideColumns.value = false
|
@@ -353,6 +370,7 @@
|
|
353
370
|
location.hash = btoa(JSON.stringify({
|
354
371
|
selectModels: selectModels.value,
|
355
372
|
isPreviewRelations: isPreviewRelations.value,
|
373
|
+
isShowRelationComment: isShowRelationComment.value,
|
356
374
|
isShowKey: isShowKey.value,
|
357
375
|
isShowComment: isShowComment.value,
|
358
376
|
isHideColumns: isHideColumns.value,
|
@@ -422,7 +440,11 @@
|
|
422
440
|
});
|
423
441
|
|
424
442
|
filteredData.value.Relations.forEach(relation => {
|
425
|
-
|
443
|
+
if (isShowRelationComment.value) {
|
444
|
+
lines.push(` ${relation.LeftModelName.replace(/:/g, '-')} ${relation.LeftValue}${relation.Line}${relation.RightValue} ${relation.RightModelName.replace(/:/g, '-')} : "${relation.Comment}"`)
|
445
|
+
} else {
|
446
|
+
lines.push(` ${relation.LeftModelName.replace(/:/g, '-')} ${relation.LeftValue}${relation.Line}${relation.RightValue} ${relation.RightModelName.replace(/:/g, '-')} : ""`)
|
447
|
+
}
|
426
448
|
});
|
427
449
|
|
428
450
|
return lines.join("\n")
|
@@ -555,6 +577,7 @@
|
|
555
577
|
isCopiedUrl,
|
556
578
|
isExistsNoModelTable,
|
557
579
|
isPreviewRelations,
|
580
|
+
isShowRelationComment,
|
558
581
|
isShowComment,
|
559
582
|
isShowKey,
|
560
583
|
language,
|