-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finally the Risk page makes sense :)
- Loading branch information
1 parent
6c7d3d9
commit 08e8c3d
Showing
8 changed files
with
228 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { config } from '../config.js' | ||
|
||
export class Risk { | ||
constructor( | ||
failure, | ||
businessImpact, | ||
likelihood = config.likelihood.default, | ||
impactLevel = config.impactLevel.default | ||
) { | ||
this.failure = failure | ||
this.businessImpact = businessImpact | ||
this.likelihood = likelihood | ||
this.impactLevel = impactLevel | ||
} | ||
|
||
toString() { | ||
return `${this.failure.consequence} - ${this.businessImpact}` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<div> | ||
<div class="annotated"> | ||
<div class="annotated__controls"> | ||
<h2>Business Impact</h2> | ||
<input type="text" v-model="risk.businessImpact"> | ||
</div> | ||
<div class="annotated__help"> | ||
<p> | ||
What is the business impacted when | ||
{{ risk.failure.consequence }} | ||
because | ||
{{ risk.failure.symptom }} (symptom) | ||
which is caused by | ||
{{ risk.failure.dependency.service.title }} | ||
(provided by {{ risk.failure.dependency.service.system.title }}) | ||
when | ||
{{ risk.failure.dependency.consumption.consumer.title }} | ||
is trying to | ||
{{ risk.failure.dependency.consumption.title }} | ||
</p> | ||
<code> | ||
<span title="Consequence" class="exprs"> | ||
{{ risk.failure.consequence }} | ||
</span> | ||
<br> | ||
<span class="punct">↳</span> | ||
Because | ||
<span title="Symptom" class="exprs"> | ||
{{ risk.failure.symptom }} | ||
</span> | ||
<br> | ||
<span class="punct">↳</span> | ||
When | ||
<span title="Consumer" class="exprs"> | ||
{{ risk.failure.dependency.consumption.consumer.title }} | ||
</span> | ||
is trying to | ||
<span title="Consumption" class="exprs"> | ||
{{ risk.failure.dependency.consumption.title }} | ||
</span> | ||
<br> | ||
<span class="punct">↳</span> | ||
Using | ||
<span title="Service" class="exprs"> | ||
{{ risk.failure.dependency.service.title }} | ||
</span> | ||
provided by | ||
<span title="System" class="exprs"> | ||
{{ risk.failure.dependency.service.system.title }} | ||
</span> | ||
</code> | ||
</div> | ||
</div> | ||
|
||
<div class="annotated"> | ||
<div class="annotated__controls"> | ||
<h2>Impact Level</h2> | ||
<select v-model="risk.impactLevel"> | ||
<option v-for="impactLevel of config.impactLevel.possibleValues" | ||
:value="impactLevel.value"> | ||
{{ impactLevel.title }} | ||
</option> | ||
</select> | ||
<h2>Likelihood</h2> | ||
<select v-model="risk.likelihood"> | ||
<option v-for="likelihood of config.likelihood.possibleValues" | ||
:value="likelihood.value"> | ||
{{ likelihood.title }} | ||
</option> | ||
</select> | ||
</div> | ||
<div class="annotated__help"> | ||
<p> | ||
YY | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { loadComponent } from '../lib/fetch-template.js' | ||
import { isInstance } from '../lib/validation.js' | ||
import { config } from '../config.js' | ||
import { percL10n } from '../lib/fmt.js' | ||
import ExtLink from '../components/ext-link.js' | ||
import { Risk } from '../models/risk.js' | ||
|
||
export default { | ||
template: await loadComponent(import.meta.url, true), | ||
computed: { | ||
config() { | ||
return config | ||
} | ||
}, | ||
props: { | ||
risk: { | ||
type: Object, | ||
validator: v => isInstance(v, Risk), | ||
}, | ||
}, | ||
methods: { | ||
percL10n, | ||
}, | ||
components: { | ||
ExtLink, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters