Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"weight": "bolder",
"text": "Are you sure you want to clear the '{{ data.key }}' registry key?"
}
],
"actions": [
{
"type": "Action.Cancel",
"title": "No"
},
{
"type": "Action.Submit",
"title": "Yes"
}
],
"templateMeta": {
"name": "clear-registry-key",
"title": "Clear Registry Key",
"category": "system"
},
"hooks": {
"afterSubmit": {
"actions": [
{
"type": "Action.PushCard",
"stateMachineName": "tymly_viewRegistryKeys_1_0",
"input": {}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"weight": "bolder",
"size": "medium",
"text": "{{ data.key }}"
},
{
"type": "TextBlock",
"text": "<pre>{{ JSON.stringify(data.registryValue, null, 2) }}</pre>"
}
],
"actions": [
{
"type": "Action.Cancel",
"title": "Close"
},
{
"type": "Action.PushCard",
"title": "Clear registry key",
"stateMachineName": "tymly_clearRegistryKey_1_0",
"input": {
"key": "$.key"
}
}

],
"templateMeta": {
"name": "view-registry-key",
"title": "View Registry Key",
"category": "system"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0",
"type": "AdaptiveCard",
"body": [
{
"id": "regKeysTable",
"type": "Table",
"showLaunches": true,
"arrayPath": "data.regKeys",
"columns": [
{
"title": "Key",
"field": "key"
},
{
"title": "Created By",
"field": "createdBy"
},
{
"title": "Created At",
"field": "created",
"format": "formatDate(item.created, 'DD MMM YYYY HH:mm')"
},
{
"title": "Modified By",
"field": "modifiedBy"
},
{
"title": "Modified At",
"field": "modified",
"format": "formatDate(item.modified, 'DD MMM YYYY HH:mm')"
}
]
}
],
"actions": [
{
"type": "Action.Cancel",
"title": "Close"
}
],
"templateMeta": {
"name": "view-registry-keys",
"title": "View Registry Keys",
"category": "system",
"customMaxWidthPx": 1200
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = function getRegistryKeys () {
return async function (env) {
const model = env.bootedServices.storage.models.tymly_registryKey
const records = await model.find({
fields: ['key', 'created', 'createdBy', 'modified', 'modifiedBy'],
orderBy: ['key']
})
return records.map(r => {
r.launches = [
{
title: 'View',
stateMachineName: 'tymly_viewRegistryKey_1_0',
input: { key: r.key }
}
]
return r
})
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"Comment": "Clear Registry Key",
"name": "Clear Registry Key",
"version": "1.0",
"categories": [
"system"
],
"StartAt": "AwaitingHumanInput",
"States": {
"AwaitingHumanInput": {
"Type": "Task",
"Resource": "module:awaitingHumanInput",
"ResourceConfig": {
"uiType": "form",
"uiName": "tymly_clearRegistryKey",
"dataPath": "$"
},
"Next": "Clear"
},
"Clear": {
"Type": "Task",
"InputPath": "$",
"Resource": "module:clearRegistryKey",
"End": true
}
},
"restrictions": [
{
"roleId": "tymly_system",
"allows": [
"*"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Comment": "View Registry Key",
"name": "View Registry Key",
"version": "1.0",
"categories": [
"system"
],
"StartAt": "Get",
"States": {
"Get": {
"Type": "Task",
"InputPath": "$",
"Resource": "module:getRegistryKey",
"ResultPath": "$",
"Next": "AwaitingHumanInput"
},
"AwaitingHumanInput": {
"Type": "Task",
"Resource": "module:awaitingHumanInput",
"ResourceConfig": {
"uiType": "form",
"uiName": "tymly_viewRegistryKey",
"dataPath": "$"
},
"End": true
}
},
"restrictions": [
{
"roleId": "tymly_system",
"allows": [
"*"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"Comment": "View Registry Keys",
"name": "View Registry Keys",
"version": "1.0",
"categories": [
"system"
],
"instigators": [
"user"
],
"instigatorGroup": "app",
"StartAt": "Finding",
"States": {
"Finding": {
"Type": "Task",
"Resource": "function:tymly_getRegistryKeys",
"ResultPath": "$.regKeys",
"Next": "AwaitingHumanInput"
},
"AwaitingHumanInput": {
"Type": "Task",
"Resource": "module:awaitingHumanInput",
"ResourceConfig": {
"uiType": "form",
"uiName": "tymly_viewRegistryKeys",
"dataPath": "$"
},
"End": true
}
},
"restrictions": [
{
"roleId": "tymly_system",
"allows": [
"*"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "System",
"description": "System Operations",
"roleMemberships": [],
"grants": []
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

module.exports = class GetRegistryKey {
module.exports = class ClearRegistryKey {
init (resourceConfig, env) {
this.registry = env.bootedServices.registry
}
Expand All @@ -9,4 +8,4 @@ module.exports = class GetRegistryKey {
.then(() => context.sendTaskSuccess())
.catch(err => context.sendTaskFailure({ error: 'ClearRegistryKeyFail', cause: err }))
} // run
} // GetRegistryKey
} // ClearRegistryKey
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

module.exports = class GetRegistryKey {
init (resourceConfig, env) {
this.registry = env.bootedServices.registry
Expand Down