Created
November 19, 2021 02:23
-
-
Save loloDawit/9fadb631cb7b1b90b3df074f3a3d2fd0 to your computer and use it in GitHub Desktop.
Slack payloads
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
module.exports = { | |
recoverModal: () => { | |
return { | |
view: JSON.stringify({ | |
title: { | |
type: "plain_text", | |
text: "Recover Dashboard" | |
}, | |
submit: { | |
type: "plain_text", | |
text: "Submit" | |
}, | |
blocks: [ | |
{ | |
type: "input", | |
block_id: "guid_input", | |
element: { | |
type: "plain_text_input", | |
action_id: "title", | |
placeholder: { | |
type: "plain_text", | |
text: "Please provide the dashboard GUID" | |
} | |
}, | |
label: { | |
type: "plain_text", | |
text: "GUID" | |
} | |
}, | |
{ | |
type: "divider" | |
}, | |
{ | |
type: "section", | |
text: { | |
type: "mrkdwn", | |
text: "Where to find dashboard GUID" | |
}, | |
accessory: { | |
type: "button", | |
action_id: "btn_moreInfo", | |
text: { | |
type: "plain_text", | |
text: "More info", | |
emoji: true | |
}, | |
value: "click_me_123", | |
url: "https://docs.newrelic.com/attribute-dictionary/?event=DistributedTraceSummary&attribute=entityGuids" | |
} | |
}, | |
{ | |
type: "context", | |
elements: [ | |
{ | |
type: "mrkdwn", | |
text: "No worries, your dashboard is one click away :smile:" | |
} | |
] | |
} | |
], | |
type: "modal", | |
callback_id: "view_recover" | |
}) | |
}; | |
}, | |
homeView: () => { | |
return ( | |
{ | |
type: "section", | |
text: { | |
type: "mrkdwn", | |
text: "*:loud_sound: WIP*" | |
} | |
}, | |
{ | |
type: "actions", | |
elements: [ | |
{ | |
type: "button", | |
action_id: "settings-button", | |
style: "primary", | |
text: { | |
type: "plain_text", | |
text: "Enable Now" | |
} | |
} | |
] | |
} | |
); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment