Skip to content

Commit 9f2ece2

Browse files
Allow dismissing login notifications and update button label (#1819)
* Update Login Notification * Rename "Commands" webview to "Cloud" * No more platform --------- Co-authored-by: Sebastian Tiedtke <sebastiantiedtke@gmail.com>
1 parent 11b8184 commit 9f2ece2

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

README-platform.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Stateful provides a powerful set of tools for creating, running, discovering, st
77
Stateful combines the power of interactive DevOps Notebooks with a robust set of features designed to streamline your development and operational processes. There are two major pieces:
88

99
- **Stateful Extension**: A super set of the open-source Runme project, offering enhanced features for authentication, collaboration, and security, making it ideal for teams and enterprises.
10-
- **Stateful Platform**: A SaaS solution that integrates with GitHub and Slack, serving as a collaboration hub for finding, launching, running, sharing, and troubleshooting Notebooks and their metadata.
10+
- **Stateful Cloud**: A SaaS solution that integrates with GitHub and Slack, serving as a collaboration hub for finding, launching, running, sharing, and troubleshooting Notebooks and their metadata.
1111

1212
<br />
1313

@@ -23,7 +23,7 @@ Stateful combines the power of interactive DevOps Notebooks with a robust set of
2323

2424
### Platform
2525

26-
The Stateful platform offers a suite of tools and services designed to enhance your development lifecycle.
26+
The Stateful cloud offers a suite of tools and services designed to enhance your development lifecycle.
2727

2828
- **Believe in Your Docs Again**: Transform your documentation into actionable, GitOps-compatible, cloud-native DevOps Notebooks that are collaborative and searchable.
2929
- **Markdown and VS Code Integration**: Repurpose your existing engineering docs (READMEs, runbooks, etc.) by making commands runnable and configurable, stored next to code in Git.
@@ -35,7 +35,7 @@ The Stateful platform offers a suite of tools and services designed to enhance y
3535

3636
### Features
3737

38-
- **Runnable Engineering Docs**: Launch Markdown files from GitHub as runnable DevOps Notebooks, saving sessions to the Stateful platform.
38+
- **Runnable Engineering Docs**: Launch Markdown files from GitHub as runnable DevOps Notebooks, saving sessions to the Stateful cloud.
3939
- **Easy Discovery**: Quickly locate and launch DevOps Notebooks from your GitHub organization with one click to open in VS Code, clone the repo, and start running.
4040
- **History and Metadata**: Automatically save commands, metadata, outputs, and history to Stateful. Search your history, see diffs, share, and troubleshoot processes.
4141
- **Slack Integration**: Easily escalate or share DevOps Notebooks and commands on Slack for team troubleshooting and discussion.
@@ -47,7 +47,7 @@ The Stateful platform offers a suite of tools and services designed to enhance y
4747

4848
1. **Sign Up**: Create your free account at [Stateful](https://platform.stateful.com/).
4949
2. **Install VS Code Extension**: Download the Stateful extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=stateful.platform). The extension is fully compatible with Runme, but adds authentication, collaboration, and security features, making it secure for teams and inside companies.
50-
3. **Explore**: Start creating, running, sharing, and discussing your first DevOps Notebook and its commands using the Stateful platform.
50+
3. **Explore**: Start creating, running, sharing, and discussing your first DevOps Notebook and its commands using the Stateful cloud.
5151

5252
For detailed documentation and tutorials, visit our [Documentation](https://stateful.com/docs).
5353

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@
11121112
{
11131113
"id": "runme.cloud",
11141114
"type": "webview",
1115-
"name": "Commands",
1115+
"name": "Cloud",
11161116
"visibility": "visible"
11171117
},
11181118
{

src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ export enum TELEMETRY_EVENTS {
11191119
NotebookGist = 'runme.notebookGist',
11201120
CellGist = 'runme.cellGist',
11211121
ShellWarning = 'extension.shellWarning',
1122+
OpenWorkspace = 'cloud.OpenWorkspace',
11221123
}
11231124

11241125
export enum WebViews {

src/extension/provider/statefulAuth.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import fetch from 'node-fetch'
2020
import jwt, { JwtPayload } from 'jsonwebtoken'
2121

2222
import { getAuthTokenPath, getDeleteAuthToken, getRunmeAppUrl } from '../../utils/configuration'
23-
import { AuthenticationProviders, PLATFORM_USER_SIGNED_IN } from '../../constants'
23+
import { AuthenticationProviders, PLATFORM_USER_SIGNED_IN, TELEMETRY_EVENTS } from '../../constants'
2424
import { RunmeUriHandler } from '../handler/uri'
2525
import ContextState from '../contextState'
2626
import getLogger from '../logger'
@@ -574,14 +574,22 @@ export class StatefulAuthProvider implements AuthenticationProvider, Disposable
574574
}
575575

576576
showLoginNotification() {
577-
const openDashboardStr = 'Open Dashboard'
577+
if (!this.context.globalState.get<boolean>(TELEMETRY_EVENTS.OpenWorkspace, true)) {
578+
return
579+
}
580+
581+
const openWorkspace = 'Open Workspace'
582+
const dontAskAgain = "Don't ask again"
583+
578584
window
579-
.showInformationMessage('Logged into the Stateful Platform', openDashboardStr)
585+
.showInformationMessage('Logged into the Stateful Cloud', openWorkspace, dontAskAgain)
580586
.then((answer) => {
581-
if (answer === openDashboardStr) {
587+
if (answer === openWorkspace) {
582588
const dashboardUri = getRunmeAppUrl(['app'])
583589
const uri = Uri.parse(dashboardUri)
584590
env.openExternal(uri)
591+
} else if (answer === dontAskAgain) {
592+
this.context.globalState.update(TELEMETRY_EVENTS.OpenWorkspace, false)
585593
}
586594
})
587595
}

0 commit comments

Comments
 (0)