mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-09 13:30:48 +08:00
Call netx REST from native netx__* tools.
Drop the local python -m netx_mcp / mcp-client path so terminal users only need API URL + token. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5179eb74b1
commit
ed219842d3
22 changed files with 1431 additions and 179 deletions
|
|
@ -18,7 +18,6 @@ const API_TOKEN_FIELD = 'apiToken'
|
|||
export interface NetxopsSettings {
|
||||
apiUrl?: string
|
||||
lang?: string
|
||||
pythonCommand?: string
|
||||
tokenCredentialRef?: string
|
||||
}
|
||||
|
||||
|
|
@ -32,7 +31,6 @@ interface CredentialState {
|
|||
export interface NetxopsCardState extends CardShell {
|
||||
apiUrl: CardFieldState
|
||||
lang: CardFieldState
|
||||
pythonCommand: CardFieldState
|
||||
apiToken: CardFieldState
|
||||
apiTokenConfigured: boolean
|
||||
apiTokenWritable: boolean
|
||||
|
|
@ -66,7 +64,7 @@ export class NetxopsCardController {
|
|||
) {
|
||||
this.form = new CardForm(
|
||||
scope,
|
||||
[textField('apiUrl'), textField('lang'), textField('pythonCommand')],
|
||||
[textField('apiUrl'), textField('lang')],
|
||||
[{ field: API_TOKEN_FIELD, write: text => this.writeToken(text) }],
|
||||
)
|
||||
this.store = this.form.bind(() => this.projection())
|
||||
|
|
@ -91,7 +89,6 @@ export class NetxopsCardController {
|
|||
...this.form.shell(),
|
||||
apiUrl: this.form.field('apiUrl'),
|
||||
lang: this.form.field('lang'),
|
||||
pythonCommand: this.form.field('pythonCommand'),
|
||||
apiToken: this.form.field(API_TOKEN_FIELD),
|
||||
apiTokenConfigured: this.credential.configured,
|
||||
apiTokenWritable: this.credential.remoteReady && this.credential.writable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue