mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-19 12:36:34 +00:00
remove dashboard related code
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
name: Dashboard
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
workflow_dispatch: {}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./references/dashboard
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm install
|
||||
@@ -312,3 +312,18 @@ jobs:
|
||||
|
||||
- name: Check Diff
|
||||
run: make check-diff
|
||||
|
||||
build-cli:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go 1.14
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.14
|
||||
id: go
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Run cross-build
|
||||
run: make cross-build
|
||||
- name: Run compress binary
|
||||
run: make compress
|
||||
@@ -23,18 +23,10 @@ jobs:
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
||||
- name: Use Node.js 10.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- name: Run dashboard build
|
||||
run: make dashboard-build
|
||||
- name: Tag helm chart image
|
||||
run: |
|
||||
sed -i 's/latest/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/values.yaml
|
||||
sed -i 's/0.1.0/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/Chart.yaml
|
||||
- name: Run generate-source
|
||||
run: make generate-source
|
||||
- name: Run cross-build
|
||||
run: make cross-build
|
||||
- name: Run compress binary
|
||||
|
||||
@@ -7,10 +7,8 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
@@ -36,11 +34,12 @@ func NewDashboardCommand(c types.Args, ioStreams cmdutil.IOStreams, frontendSour
|
||||
var o Options
|
||||
o.frontendSource = frontendSource
|
||||
cmd := &cobra.Command{
|
||||
Hidden: true,
|
||||
Use: "dashboard",
|
||||
Short: "Setup API Server and launch Dashboard",
|
||||
Long: "Setup API Server and launch Dashboard",
|
||||
Example: `dashboard`,
|
||||
Hidden: true,
|
||||
Use: "dashboard",
|
||||
Short: "Setup API Server and launch Dashboard",
|
||||
Long: "Setup API Server and launch Dashboard",
|
||||
Example: `dashboard`,
|
||||
Deprecated: "vela dashboard is deprecated, it will only launch APIServer without dashboard",
|
||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
return c.SetConfig()
|
||||
},
|
||||
@@ -200,23 +199,6 @@ func SetupAPIServer(c types.Args, cmd *cobra.Command, o Options) error {
|
||||
return server.Shutdown(ctx)
|
||||
}
|
||||
|
||||
// OpenBrowser will open browser by url in different OS system
|
||||
// nolint:gosec
|
||||
func OpenBrowser(url string) error {
|
||||
var err error
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
err = exec.Command("xdg-open", url).Start()
|
||||
case "windows":
|
||||
err = exec.Command("cmd", "/C", "start", url).Run()
|
||||
case "darwin":
|
||||
err = exec.Command("open", url).Start()
|
||||
default:
|
||||
err = fmt.Errorf("unsupported platform")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// CheckVelaRuntimeInstalledAndReady checks whether vela-core runtime is installed and ready
|
||||
func CheckVelaRuntimeInstalledAndReady(ioStreams cmdutil.IOStreams, c client.Client) (bool, error) {
|
||||
if !helm.IsHelmReleaseRunning(types.DefaultKubeVelaReleaseName, types.DefaultKubeVelaChartName, types.DefaultKubeVelaNS, ioStreams) {
|
||||
|
||||
@@ -7,8 +7,10 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -346,3 +348,20 @@ func showReferenceConsole(ctx context.Context, c types.Args, ioStreams cmdutil.I
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// OpenBrowser will open browser by url in different OS system
|
||||
// nolint:gosec
|
||||
func OpenBrowser(url string) error {
|
||||
var err error
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
err = exec.Command("xdg-open", url).Start()
|
||||
case "windows":
|
||||
err = exec.Command("cmd", "/C", "start", url).Run()
|
||||
case "darwin":
|
||||
err = exec.Command("open", url).Start()
|
||||
default:
|
||||
err = fmt.Errorf("unsupported platform")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user