mihari 5.3.0 → 5.3.2
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.
- checksums.yaml +4 -4
- data/Rakefile +8 -2
- data/frontend/package-lock.json +657 -576
- data/frontend/package.json +23 -20
- data/frontend/src/ace-config.ts +6 -0
- data/frontend/src/components/Loading.vue +1 -1
- data/frontend/src/components/alert/Alert.vue +1 -1
- data/frontend/src/components/alert/AlertsWrapper.vue +1 -1
- data/frontend/src/components/alert/Form.vue +2 -2
- data/frontend/src/components/artifact/Artifact.vue +3 -3
- data/frontend/src/components/config/Configs.vue +2 -2
- data/frontend/src/components/rule/EditRule.vue +4 -3
- data/frontend/src/components/rule/Form.vue +2 -2
- data/frontend/src/components/rule/InputForm.vue +18 -59
- data/frontend/src/components/rule/NewRule.vue +1 -1
- data/frontend/src/components/rule/Rule.vue +3 -3
- data/frontend/src/components/rule/RulesWrapper.vue +1 -1
- data/frontend/src/components/rule/YAML.vue +21 -28
- data/frontend/src/main.ts +33 -3
- data/frontend/src/views/Artifact.vue +3 -8
- data/frontend/src/views/EditRule.vue +2 -7
- data/frontend/src/views/Rule.vue +3 -8
- data/lib/mihari/analyzers/base.rb +6 -0
- data/lib/mihari/analyzers/binaryedge.rb +1 -1
- data/lib/mihari/analyzers/censys.rb +1 -1
- data/lib/mihari/analyzers/onyphe.rb +1 -1
- data/lib/mihari/analyzers/rule.rb +4 -7
- data/lib/mihari/analyzers/shodan.rb +1 -1
- data/lib/mihari/analyzers/urlscan.rb +1 -1
- data/lib/mihari/analyzers/virustotal_intelligence.rb +1 -1
- data/lib/mihari/analyzers/zoomeye.rb +2 -2
- data/lib/mihari/commands/rule.rb +3 -3
- data/lib/mihari/commands/search.rb +3 -3
- data/lib/mihari/constants.rb +3 -0
- data/lib/mihari/emitters/base.rb +2 -2
- data/lib/mihari/emitters/misp.rb +3 -3
- data/lib/mihari/emitters/slack.rb +1 -1
- data/lib/mihari/emitters/the_hive.rb +1 -1
- data/lib/mihari/emitters/webhook.rb +1 -1
- data/lib/mihari/mixins/configurable.rb +5 -0
- data/lib/mihari/mixins/falsepositive.rb +1 -1
- data/lib/mihari/mixins/retriable.rb +0 -2
- data/lib/mihari/{structs → services}/rule.rb +16 -16
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/endpoints/rules.rb +9 -8
- data/lib/mihari/web/public/assets/index-116033d0.js +1737 -0
- data/lib/mihari/web/public/assets/index-33165282.css +1 -0
- data/lib/mihari/web/public/assets/mode-yaml-a21faa53.js +8 -0
- data/lib/mihari/web/public/index.html +2 -2
- data/lib/mihari.rb +3 -2
- data/mihari.gemspec +5 -4
- metadata +15 -21
- data/lib/mihari/web/public/assets/fa-brands-400-20c4a58b.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-brands-400-74833209.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400-528d022d.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-regular-400-8e7e5ea1.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900-67a65763.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-solid-900-7152a693.woff2 +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility-0515a423.ttf +0 -0
- data/lib/mihari/web/public/assets/fa-v4compatibility-694a17c3.woff2 +0 -0
- data/lib/mihari/web/public/assets/index-2ba8f0a6.css +0 -5
- data/lib/mihari/web/public/assets/index-71285b15.js +0 -50
data/frontend/package.json
CHANGED
@@ -14,13 +14,17 @@
|
|
14
14
|
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
|
15
15
|
},
|
16
16
|
"dependencies": {
|
17
|
-
"@fortawesome/fontawesome-
|
18
|
-
"@
|
19
|
-
"@
|
17
|
+
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
18
|
+
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
19
|
+
"@fortawesome/vue-fontawesome": "^3.0.3",
|
20
|
+
"@vueuse/core": "^10.3.0",
|
21
|
+
"@vueuse/router": "^10.3.0",
|
22
|
+
"ace-builds": "^1.23.4",
|
20
23
|
"axios": "^1.4.0",
|
21
24
|
"bulma": "^0.9.4",
|
22
25
|
"bulma-helpers": "^0.4.3",
|
23
26
|
"dayjs": "^1.11.9",
|
27
|
+
"font-awesome-animation": "^1.1.1",
|
24
28
|
"js-sha256": "^0.9.0",
|
25
29
|
"truncate": "^3.0.0",
|
26
30
|
"ts-dedent": "^2.2.0",
|
@@ -29,36 +33,35 @@
|
|
29
33
|
"vue": "^3.3.4",
|
30
34
|
"vue-concurrency": "4.0.1",
|
31
35
|
"vue-json-pretty": "^2.2.4",
|
32
|
-
"vue-
|
33
|
-
"
|
36
|
+
"vue-router": "^4.2.4",
|
37
|
+
"vue3-ace-editor": "^2.2.3"
|
34
38
|
},
|
35
39
|
"devDependencies": {
|
36
|
-
"@redocly/cli": "
|
40
|
+
"@redocly/cli": "1.0.0",
|
37
41
|
"@rushstack/eslint-patch": "^1.3.2",
|
38
|
-
"@tsconfig/node20": "^1.
|
42
|
+
"@tsconfig/node20": "^20.1.1",
|
39
43
|
"@types/jsdom": "^21.1.1",
|
40
|
-
"@types/node": "^20.4.
|
41
|
-
"@types/prismjs": "^1.26.0",
|
44
|
+
"@types/node": "^20.4.8",
|
42
45
|
"@types/url-parse": "^1.4.8",
|
43
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
44
|
-
"@typescript-eslint/parser": "^6.
|
46
|
+
"@typescript-eslint/eslint-plugin": "^6.2.1",
|
47
|
+
"@typescript-eslint/parser": "^6.2.1",
|
45
48
|
"@vitejs/plugin-vue": "^4.2.3",
|
46
|
-
"@vue/eslint-config-prettier": "^
|
49
|
+
"@vue/eslint-config-prettier": "^8.0.0",
|
47
50
|
"@vue/eslint-config-typescript": "^11.0.3",
|
48
|
-
"@vue/test-utils": "2.4.
|
51
|
+
"@vue/test-utils": "2.4.1",
|
49
52
|
"@vue/tsconfig": "^0.4.0",
|
50
|
-
"eslint": "^8.
|
51
|
-
"eslint-config-prettier": "^
|
53
|
+
"eslint": "^8.46.0",
|
54
|
+
"eslint-config-prettier": "^9.0.0",
|
52
55
|
"eslint-plugin-prettier": "^5.0.0",
|
53
56
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
54
|
-
"eslint-plugin-vue": "^9.
|
57
|
+
"eslint-plugin-vue": "^9.16.1",
|
55
58
|
"husky": "^8.0.3",
|
56
59
|
"jsdom": "^22.1.0",
|
57
60
|
"npm-run-all": "^4.1.5",
|
58
|
-
"prettier": "^3.0.
|
61
|
+
"prettier": "^3.0.1",
|
59
62
|
"typescript": "~5.1.6",
|
60
|
-
"vite": "^4.4.
|
61
|
-
"vitest": "^0.
|
62
|
-
"vue-tsc": "^1.8.
|
63
|
+
"vite": "^4.4.9",
|
64
|
+
"vitest": "^0.34.1",
|
65
|
+
"vue-tsc": "^1.8.8"
|
63
66
|
}
|
64
67
|
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import ace from "ace-builds"
|
2
|
+
import modeYamlUrl from "ace-builds/src-min-noconflict/mode-yaml?url"
|
3
|
+
import themeMonokaiUrl from "ace-builds/src-min-noconflict/theme-monokai?url"
|
4
|
+
|
5
|
+
ace.config.setModuleUrl("ace/mode/yaml", modeYamlUrl)
|
6
|
+
ace.config.setModuleUrl("ace/theme/monokai", themeMonokaiUrl)
|
@@ -95,7 +95,7 @@
|
|
95
95
|
</template>
|
96
96
|
|
97
97
|
<script lang="ts">
|
98
|
-
import { defineComponent, type PropType, ref, watch } from "vue"
|
98
|
+
import { defineComponent, type PropType, ref, toRef,watch } from "vue"
|
99
99
|
import { useRoute } from "vue-router"
|
100
100
|
|
101
101
|
import type { AlertSearchParams } from "@/types"
|
@@ -126,7 +126,7 @@ export default defineComponent({
|
|
126
126
|
|
127
127
|
const artifact = ref<string | undefined>(undefined)
|
128
128
|
const fromAt = ref<string | undefined>(undefined)
|
129
|
-
const tagInput =
|
129
|
+
const tagInput = toRef(props, "tag")
|
130
130
|
const ruleId = ref<string | undefined>(undefined)
|
131
131
|
const toAt = ref<string | undefined>(undefined)
|
132
132
|
const asn = ref<number | undefined>(undefined)
|
@@ -44,7 +44,7 @@
|
|
44
44
|
<button class="button is-primary is-light is-small" @click="enrichArtifact">
|
45
45
|
<span>Enrich</span>
|
46
46
|
<span class="icon is-small">
|
47
|
-
<
|
47
|
+
<font-awesome-icon icon="lightbulb"></font-awesome-icon>
|
48
48
|
</span>
|
49
49
|
</button>
|
50
50
|
|
@@ -55,14 +55,14 @@
|
|
55
55
|
>
|
56
56
|
<span>Metadata</span>
|
57
57
|
<span class="icon is-small">
|
58
|
-
<
|
58
|
+
<font-awesome-icon icon="info-circle"></font-awesome-icon>
|
59
59
|
</span>
|
60
60
|
</button>
|
61
61
|
|
62
62
|
<button class="button is-light is-small" @click="deleteArtifact">
|
63
63
|
<span>Delete</span>
|
64
64
|
<span class="icon is-small">
|
65
|
-
<
|
65
|
+
<font-awesome-icon icon="times"></font-awesome-icon>
|
66
66
|
</span>
|
67
67
|
</button>
|
68
68
|
</span>
|
@@ -21,13 +21,13 @@
|
|
21
21
|
<td>
|
22
22
|
<button class="button is-success is-small ml-1" v-if="config.isConfigured">
|
23
23
|
<span class="icon is-small">
|
24
|
-
<
|
24
|
+
<font-awesome-icon icon="check"></font-awesome-icon>
|
25
25
|
</span>
|
26
26
|
<span>Yes</span>
|
27
27
|
</button>
|
28
28
|
<button class="button is-warning is-small ml-1" v-else>
|
29
29
|
<span class="icon is-small">
|
30
|
-
<
|
30
|
+
<font-awesome-icon icon="exclamation"></font-awesome-icon>
|
31
31
|
</span>
|
32
32
|
<span>No</span>
|
33
33
|
</button>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<p class="control">
|
9
9
|
<a class="button is-primary" @click="edit">
|
10
10
|
<span class="icon is-small">
|
11
|
-
<
|
11
|
+
<font-awesome-icon icon="edit"></font-awesome-icon>
|
12
12
|
</span>
|
13
13
|
<span>Edit</span>
|
14
14
|
</a>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</template>
|
24
24
|
|
25
25
|
<script lang="ts">
|
26
|
-
import { defineComponent, type PropType,
|
26
|
+
import { defineComponent, type PropType, toRef } from "vue"
|
27
27
|
import { useRouter } from "vue-router"
|
28
28
|
|
29
29
|
import { generateUpdateRuleTask } from "@/api-helper"
|
@@ -46,7 +46,8 @@ export default defineComponent({
|
|
46
46
|
setup(props) {
|
47
47
|
const router = useRouter()
|
48
48
|
|
49
|
-
const
|
49
|
+
const rule = toRef(props, "rule")
|
50
|
+
const yaml = toRef(rule.value, "yaml")
|
50
51
|
|
51
52
|
const updateRuleTask = generateUpdateRuleTask()
|
52
53
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
</template>
|
89
89
|
|
90
90
|
<script lang="ts">
|
91
|
-
import { defineComponent, type PropType, ref, watch } from "vue"
|
91
|
+
import { defineComponent, type PropType, ref, toRef,watch } from "vue"
|
92
92
|
import { useRoute } from "vue-router"
|
93
93
|
|
94
94
|
import type { RuleSearchParams } from "@/types"
|
@@ -115,7 +115,7 @@ export default defineComponent({
|
|
115
115
|
|
116
116
|
const description = ref<string | undefined>(undefined)
|
117
117
|
const fromAt = ref<string | undefined>(undefined)
|
118
|
-
const tagInput =
|
118
|
+
const tagInput = toRef(props, "tag")
|
119
119
|
const title = ref<string | undefined>(undefined)
|
120
120
|
const toAt = ref<string | undefined>(undefined)
|
121
121
|
|
@@ -1,31 +1,29 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="block
|
3
|
-
<
|
4
|
-
class="
|
5
|
-
v-model="yamlInput"
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<div class="block">
|
3
|
+
<VAceEditor
|
4
|
+
class="vue-ace-editor"
|
5
|
+
v-model:value="yamlInput"
|
6
|
+
lang="yaml"
|
7
|
+
theme="monokai"
|
8
|
+
:options="{
|
9
|
+
fontSize: 16,
|
10
|
+
minLines: 6,
|
11
|
+
maxLines: 10000
|
12
|
+
}"
|
13
|
+
></VAceEditor>
|
9
14
|
</div>
|
10
15
|
</template>
|
11
16
|
|
12
17
|
<script lang="ts">
|
13
|
-
|
14
|
-
import "vue-prism-editor/dist/prismeditor.min.css"
|
18
|
+
import "@/ace-config"
|
15
19
|
|
16
|
-
import { defineComponent,
|
17
|
-
import {
|
18
|
-
|
19
|
-
import Prism from "prismjs"
|
20
|
-
|
21
|
-
import "prismjs/components/prism-yaml"
|
22
|
-
import "prismjs/plugins/custom-class/prism-custom-class"
|
23
|
-
import "prismjs/themes/prism-twilight.css"
|
20
|
+
import { defineComponent, toRef, watchEffect } from "vue"
|
21
|
+
import { VAceEditor } from "vue3-ace-editor"
|
24
22
|
|
25
23
|
export default defineComponent({
|
26
24
|
name: "RuleInputForm",
|
27
25
|
components: {
|
28
|
-
|
26
|
+
VAceEditor
|
29
27
|
},
|
30
28
|
props: {
|
31
29
|
yaml: {
|
@@ -35,52 +33,13 @@ export default defineComponent({
|
|
35
33
|
},
|
36
34
|
emits: ["update-yaml"],
|
37
35
|
setup(props, context) {
|
38
|
-
const yamlInput =
|
39
|
-
const wrapper = ref<HTMLElement | undefined>(undefined)
|
40
|
-
|
41
|
-
Prism.plugins.customClass.map({
|
42
|
-
number: "prism-number",
|
43
|
-
tag: "prism-tag"
|
44
|
-
})
|
45
|
-
|
46
|
-
const highlighter = (code: string) => {
|
47
|
-
return Prism.highlight(code, Prism.languages.yaml, "yaml")
|
48
|
-
}
|
36
|
+
const yamlInput = toRef(props, "yaml")
|
49
37
|
|
50
38
|
watchEffect(() => {
|
51
39
|
context.emit("update-yaml", yamlInput.value)
|
52
|
-
|
53
|
-
// TODO: a dirty hack to change the default text color
|
54
|
-
if (wrapper.value) {
|
55
|
-
const strings = wrapper.value.querySelectorAll(":not(span.token)")
|
56
|
-
strings.forEach((string) => {
|
57
|
-
;(string as HTMLElement).style.color = "white"
|
58
|
-
})
|
59
|
-
}
|
60
40
|
})
|
61
41
|
|
62
|
-
return { yamlInput
|
42
|
+
return { yamlInput }
|
63
43
|
}
|
64
44
|
})
|
65
45
|
</script>
|
66
|
-
|
67
|
-
<style scoped>
|
68
|
-
.my-editor {
|
69
|
-
background: hsl(0, 0%, 8%);
|
70
|
-
font-family:
|
71
|
-
Fira code,
|
72
|
-
Fira Mono,
|
73
|
-
Consolas,
|
74
|
-
Menlo,
|
75
|
-
Courier,
|
76
|
-
monospace;
|
77
|
-
font-size: 1em;
|
78
|
-
line-height: 1.5;
|
79
|
-
padding: 5px;
|
80
|
-
}
|
81
|
-
|
82
|
-
.my-editor-wrapper {
|
83
|
-
background: hsl(0, 0%, 8%);
|
84
|
-
padding: 10px;
|
85
|
-
}
|
86
|
-
</style>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<button class="button is-primary is-light is-small" @click="runRule">
|
18
18
|
<span>Run</span>
|
19
19
|
<span class="icon is-small">
|
20
|
-
<
|
20
|
+
<font-awesome-icon icon="arrow-right"></font-awesome-icon>
|
21
21
|
</span>
|
22
22
|
</button>
|
23
23
|
<router-link
|
@@ -26,13 +26,13 @@
|
|
26
26
|
>
|
27
27
|
<span>Edit</span>
|
28
28
|
<span class="icon is-small">
|
29
|
-
<
|
29
|
+
<font-awesome-icon icon="edit"></font-awesome-icon>
|
30
30
|
</span>
|
31
31
|
</router-link>
|
32
32
|
<button class="button is-light is-small" @click="deleteRule">
|
33
33
|
<span>Delete</span>
|
34
34
|
<span class="icon is-small">
|
35
|
-
<
|
35
|
+
<font-awesome-icon icon="times"></font-awesome-icon>
|
36
36
|
</span>
|
37
37
|
</button>
|
38
38
|
</span>
|
@@ -1,44 +1,37 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<div class="block">
|
3
|
+
<VAceEditor
|
4
|
+
class="vue-ace-editor"
|
5
|
+
:value="yaml"
|
6
|
+
lang="yaml"
|
7
|
+
theme="monokai"
|
8
|
+
:options="{
|
9
|
+
readOnly: true,
|
10
|
+
fontSize: 16,
|
11
|
+
maxLines: 10000,
|
12
|
+
minLines: 6
|
13
|
+
}"
|
14
|
+
></VAceEditor>
|
15
|
+
</div>
|
3
16
|
</template>
|
4
17
|
|
5
18
|
<script lang="ts">
|
6
|
-
|
7
|
-
import { defineComponent, onMounted, ref } from "vue"
|
19
|
+
import "@/ace-config"
|
8
20
|
|
9
|
-
import
|
10
|
-
|
11
|
-
import "prismjs/components/prism-yaml"
|
12
|
-
import "prismjs/plugins/custom-class/prism-custom-class"
|
13
|
-
import "prismjs/plugins/line-numbers/prism-line-numbers.css"
|
14
|
-
import "prismjs/plugins/line-numbers/prism-line-numbers"
|
15
|
-
import "prismjs/themes/prism-twilight.css"
|
21
|
+
import { defineComponent } from "vue"
|
22
|
+
import { VAceEditor } from "vue3-ace-editor"
|
16
23
|
|
17
24
|
export default defineComponent({
|
18
25
|
name: "YAML",
|
26
|
+
components: {
|
27
|
+
VAceEditor
|
28
|
+
},
|
19
29
|
props: {
|
20
30
|
yaml: {
|
21
31
|
type: String,
|
22
32
|
required: true
|
23
33
|
}
|
24
34
|
},
|
25
|
-
setup() {
|
26
|
-
const pre = ref<HTMLElement | undefined>(undefined)
|
27
|
-
|
28
|
-
Prism.plugins.customClass.map({
|
29
|
-
number: "prism-number",
|
30
|
-
tag: "prism-tag"
|
31
|
-
})
|
32
|
-
|
33
|
-
onMounted(() => {
|
34
|
-
if (pre.value) {
|
35
|
-
pre.value.querySelectorAll("code").forEach((elem) => {
|
36
|
-
Prism.highlightElement(elem)
|
37
|
-
})
|
38
|
-
}
|
39
|
-
})
|
40
|
-
|
41
|
-
return { pre }
|
42
|
-
}
|
35
|
+
setup() {}
|
43
36
|
})
|
44
37
|
</script>
|
data/frontend/src/main.ts
CHANGED
@@ -1,11 +1,41 @@
|
|
1
1
|
import "bulma/css/bulma.css"
|
2
2
|
import "bulma-helpers/css/bulma-helpers.min.css"
|
3
|
-
import "
|
4
|
-
import "@fortawesome/fontawesome-free/js/all.js"
|
3
|
+
import "font-awesome-animation/css/font-awesome-animation.min.css"
|
5
4
|
|
5
|
+
import { library } from "@fortawesome/fontawesome-svg-core"
|
6
|
+
import {
|
7
|
+
faArrowRight,
|
8
|
+
faCheck,
|
9
|
+
faEdit,
|
10
|
+
faExclamation,
|
11
|
+
faInfoCircle,
|
12
|
+
faLightbulb,
|
13
|
+
faPlus,
|
14
|
+
faSearch,
|
15
|
+
faSpinner,
|
16
|
+
faTimes
|
17
|
+
} from "@fortawesome/free-solid-svg-icons"
|
18
|
+
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"
|
6
19
|
import { createApp } from "vue"
|
7
20
|
|
8
21
|
import App from "@/App.vue"
|
9
22
|
import router from "@/router"
|
10
23
|
|
11
|
-
|
24
|
+
library.add(
|
25
|
+
faArrowRight,
|
26
|
+
faCheck,
|
27
|
+
faEdit,
|
28
|
+
faExclamation,
|
29
|
+
faInfoCircle,
|
30
|
+
faLightbulb,
|
31
|
+
faPlus,
|
32
|
+
faSearch,
|
33
|
+
faSpinner,
|
34
|
+
faTimes
|
35
|
+
)
|
36
|
+
|
37
|
+
const app = createApp(App)
|
38
|
+
|
39
|
+
app.component("font-awesome-icon", FontAwesomeIcon)
|
40
|
+
|
41
|
+
app.use(router).mount("#app")
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<Artifact :id="
|
2
|
+
<Artifact :id="id"></Artifact>
|
3
3
|
</template>
|
4
4
|
|
5
5
|
<script lang="ts">
|
6
6
|
import { useTitle } from "@vueuse/core"
|
7
|
-
import { defineComponent, onMounted,
|
7
|
+
import { defineComponent, onMounted, watch } from "vue"
|
8
8
|
|
9
9
|
import Artifact from "@/components/artifact/ArtifactWrapper.vue"
|
10
10
|
|
@@ -20,10 +20,8 @@ export default defineComponent({
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
setup(props) {
|
23
|
-
const artifactId = ref<string>(props.id)
|
24
|
-
|
25
23
|
const updateTitle = () => {
|
26
|
-
useTitle(`Artifact:${
|
24
|
+
useTitle(`Artifact:${props.id} - Mihari`)
|
27
25
|
}
|
28
26
|
|
29
27
|
onMounted(() => {
|
@@ -33,12 +31,9 @@ export default defineComponent({
|
|
33
31
|
watch(
|
34
32
|
() => props.id,
|
35
33
|
() => {
|
36
|
-
artifactId.value = props.id
|
37
34
|
updateTitle()
|
38
35
|
}
|
39
36
|
)
|
40
|
-
|
41
|
-
return { artifactId }
|
42
37
|
}
|
43
38
|
})
|
44
39
|
</script>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<script lang="ts">
|
6
6
|
import { useTitle } from "@vueuse/core"
|
7
|
-
import { defineComponent, onMounted,
|
7
|
+
import { defineComponent, onMounted, watch } from "vue"
|
8
8
|
|
9
9
|
import EditRule from "@/components/rule/EditRuleWrapper.vue"
|
10
10
|
|
@@ -20,10 +20,8 @@ export default defineComponent({
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
setup(props) {
|
23
|
-
const ruleId = ref<string>(props.id)
|
24
|
-
|
25
23
|
const updateTitle = () => {
|
26
|
-
useTitle(`Edit rule:${
|
24
|
+
useTitle(`Edit rule:${props.id} - Mihari`)
|
27
25
|
}
|
28
26
|
|
29
27
|
onMounted(() => {
|
@@ -33,12 +31,9 @@ export default defineComponent({
|
|
33
31
|
watch(
|
34
32
|
() => props.id,
|
35
33
|
() => {
|
36
|
-
ruleId.value = props.id
|
37
34
|
updateTitle()
|
38
35
|
}
|
39
36
|
)
|
40
|
-
|
41
|
-
return { ruleId }
|
42
37
|
}
|
43
38
|
})
|
44
39
|
</script>
|
data/frontend/src/views/Rule.vue
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<Rule :id="
|
2
|
+
<Rule :id="id"></Rule>
|
3
3
|
</template>
|
4
4
|
|
5
5
|
<script lang="ts">
|
6
6
|
import { useTitle } from "@vueuse/core"
|
7
|
-
import { defineComponent, onMounted,
|
7
|
+
import { defineComponent, onMounted, watch } from "vue"
|
8
8
|
|
9
9
|
import Rule from "@/components/rule/RuleWrapper.vue"
|
10
10
|
|
@@ -20,10 +20,8 @@ export default defineComponent({
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
setup(props) {
|
23
|
-
const ruleId = ref<string>(props.id)
|
24
|
-
|
25
23
|
const updateTitle = () => {
|
26
|
-
useTitle(`Rule:${
|
24
|
+
useTitle(`Rule:${props.id} - Mihari`)
|
27
25
|
}
|
28
26
|
|
29
27
|
onMounted(() => {
|
@@ -33,12 +31,9 @@ export default defineComponent({
|
|
33
31
|
watch(
|
34
32
|
() => props.id,
|
35
33
|
() => {
|
36
|
-
ruleId.value = props.id
|
37
34
|
updateTitle()
|
38
35
|
}
|
39
36
|
)
|
40
|
-
|
41
|
-
return { ruleId }
|
42
37
|
}
|
43
38
|
})
|
44
39
|
</script>
|