Giter Site home page Giter Site logo

kui-shell / kuiclienttemplate Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 8.0 1.37 MB

Use this template to make your own custom graphical terminal, via the Kui Grahpical CLI Framework

Home Page: https://github.com/kubernetes-sigs/kui

TypeScript 95.25% SCSS 0.39% Shell 4.35%
electron krew krew-plugin kubectl kubectl-plugins kubernetes kui visualization

kuiclienttemplate's People

Contributors

starpit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kuiclienttemplate's Issues

webpack-dev-server seems not to start correctly the second time

there seems to be some bug in webpack-dev-server. if you do

npm ci
npm run webpack

then visit localhost:9080... so far, so good. then if you ctrl-c that, and run npm run webpack again and visit localhost:9080, you will see errors. this time, webpack has generated code that has node_modules/node_modules/@kui-shell in its webpack-require generated code

re-running npm ci prior to the npm run webpack, and it's fine again. weird.

`k logs` doesn't take selector correctly

The following screenshot shows how k logs -l looks like in plugin-kubeui:
屏幕快照 2019-10-29 下午1 25 24

k logs is usually followed by entityName, but entityName is not required when selector is available. The logs handler doesn't handle with this use case.

The following screenshot shows the correct behavior in plain terminal:
屏幕快照 2019-10-29 下午1 31 00

several issues:

  1. I tried to start proxy with KUBECONFIG, but sees not work
git clone https://github.com/kui-shell/plugin-kubeui && cd plugin-kubeui
npm ci
KUBECONFIG=xxxx npm run proxy &  
npm run webpack 

The output is like below, seems the KUBECONFIG env variable is not there.

❯
ready
Successfully connected to your cloud. For next steps, try this command: getting started
❯
env
KUI=true
TERM=xterm-color
KUI_REPL_MODE=stdout
KUI_EXEC_OPTIONS={"noHistory":true,"rethrowErrors":true,"type":2,"env":{},"nested":true,"isProxied":true,"credentials":{},"rawResponse":true,"language":"en-US"}
__CF_USER_TEXT_ENCODING=0x1F5:0x19:0x34
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
LOCALE=en-US
DEVMODE=true
PWD=/
SHLVL=3
HOME=/Users/shenxh
KUI_HEADLESS=true
_=/usr/bin/env
❯
kubectl get pod
The connection to the server localhost:8080 was refused - did you specify the right host or port?

and the UI console has many error like

Not allowed to load local resource: file:///Applications/Utilities/Terminal.app/Contents/Resources/Fonts/SFMono-Light.otf
  1. if I stop the npm run webpack and run again, when access http://localhost:9080, will show errors like below

屏幕快照 2019-10-25 上午10 09 36

clean dist and node-modules and rerun `npm ci` can resolve this issue.

move Events to be a button

kui 5.2.29 has improved support for Buttons in multi modal responses. let's start by moving the Events tab to be a button, so that the events table (along with the associated get events command) show up in the REPL. then, clicks on that table can re-populate the sidecar with the chosen event resource

test

/kind test
/priority fun

export the doExecWith... functions

we should probably export doExecWithStdout, doExecWithPty, doExecWithStatus, and doExecWithTable to allow other plugins a higher level way to call kubectl.

they could always do a REPL.qexec, but if the goal of the separate plugin is to offer new kubectl listen or Mode enhancements (e.g. log formatting), rather than just consuming a kube resource model, those doExec routines do offer some assistance. (e.g., if the goal of that other plugin is do do something with a kube resource, or display a kube table, a qexec is probably fine, because this plugin has listen functions that export the needed information via qexec)

tests!

get the tests working, and in travis

Code and Contribute does not work

[root@agentavtone-masterone ~]# git clone https://github.com/kui-shell/plugin-kubeui && cd plugin-kubeui
Cloning into 'plugin-kubeui'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 759 (delta 0), reused 2 (delta 0), pack-reused 745
Receiving objects: 100% (759/759), 1.15 MiB | 13.20 MiB/s, done.
Resolving deltas: 100% (403/403), done.
[root@agentavtone-masterone plugin-kubeui]# ls
attic  docs         lerna.json    package-lock.json  README.md  tools
bin    kubeui.yaml  package.json  plugins            theme      tsconfig.json
[root@agentavtone-masterone plugin-kubeui]# npm ci

Usage: npm <command>

where <command> is one of:
    access, adduser, bin, bugs, c, cache, completion, config,
    ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
    help, help-search, i, init, install, install-test, it, link,
    list, ln, login, logout, ls, outdated, owner, pack, ping,
    prefix, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /root/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] /usr/lib/node_modules/npm
[root@agentavtone-masterone plugin-kubeui]#

enhance events display

  1. enhance nameHash parsing to support the pattern used by events
  2. add Show Involved Object mode button

build electron clients

add support for building electron clients. this should mostly just leverage the existing support in @kui-shell/builder

fix up CSP violations

as reported in #9 there are some CSP violation errors due to having an "$CSP" CSP policy string

export doExecRaw

rather than having plugins use _kubectl directly, and expose (for now) the RawResponse schema, let's instead expose a doExecRaw which returns a string (stdout)

incorporate logui

for now, let's incorporate the logui plugin into this repo. it can easily be split out if we find the need to do so.

consolidating it here will simplify keeping the kui-core versioning in sync across the plugins shipped in the client that we build and distribute via the Releases page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.