Commit Graph

61 Commits

Author SHA1 Message Date
Mark Yen
130c2cdece Add support for running TypeScript tests
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-04-21 16:07:47 -07:00
Mark Yen
d64617ef96 Package.json: bump semver
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-04-21 16:07:39 -07:00
Mark Yen
64d58a2bac Packages: explicitly install @types/node >=12 <12.17
The version of Electron we're using ships with NodeJS 12.16.x; explicitly
pull in the correct version of the TypeScript declarations so that when we
compile TypeScript we can get the correct conversions (i.e. it will not
error out due to different arguments etc.).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-04-09 15:45:30 -07:00
Mark Yen
208dfc77c7 Package.json: Drop explicit follow-redirects
We no longer use it.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-04-09 15:45:28 -07:00
Mark Yen
cc6d5c016e Package.json: Add node-fetch
Needed to download the K3s distro packages.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-04-09 15:45:25 -07:00
Mark Yen
0ab9140c30 Packages: force nan 2.14.0
nan 2.14.1 does not appear to be compatible with the version of electron
we're using:

https://github.com/nodejs/nan/issues/892

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-03-31 15:27:09 -07:00
Mark Yen
c44f879df1 Drop deepmerge
The functionality is available as part of lodash.  It's actually still
used by dependencies, though.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-03-30 11:34:09 -07:00
Eric Promislow
2aa28ce464 Remove the Dashboard and all uses of Homestead
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-03-29 16:35:08 -07:00
Mark Yen
097a4558b2 ESLint changes for TypeScript
Pull in the default TypeScript lint configuration, but turn off things
we do not obey yet.  Note that we make sure to insert it before all the
nuxt changes, so that the dashboard code will not need to comply.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-03-12 15:09:42 -08:00
Mark Yen
c7818729ee build: Support TypeScript
This adds TypeScript support in the build; none of the code actually
uses it yet.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-03-12 15:09:39 -08:00
Matt Farina
2469806fcb Merge pull request #141 from mook-as/node-sass-downgrade
package.json: Downgrade node-sass to 4.x
2021-03-04 15:47:09 -05:00
Mark Yen
cb051c0bdb packages: remove nuxtron
We no longer use nuxtron, since we needed the raw webpack configs to
ensure we quit the dev server when we quit the application.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-26 14:21:23 -08:00
Mark Yen
27b800ac04 package.json: Downgrade node-sass to 4.x
Stratos doesn't yet work with node-sass 5.x, and for some reason having
it installed in the parent project breaks Stratos builds.  Downgrade to
4.x to have things work.

Note that node-sass 4.x is reported to not work with nodejs 15.x; this
means that we will require nodejs 14.x to build.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-25 16:43:19 -08:00
Mark Yen
58fce2f564 build: Fix loading translations
We neeed to use a loader that parses YAML files, not save it as a blob.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-23 17:27:29 -08:00
Mark Yen
458a7ff5bc package.json: remove @vue/cli-plugin-eslint
We don't use this (we run eslint directly), and it pulls in a dependency
(yorkie) that messes with git hooks unnecessarily.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-22 09:26:15 -08:00
Mark Yen
2bea4b0ad7 package-lock.json: regenerate
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-18 14:09:36 -08:00
Mark Yen
b20f882631 package-lock.json: Regenerate.
Updating because package.json was changed.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-17 15:51:35 -08:00
Mark Yen
03a2d50e9d package.json: Pull in dependencies of SortableTable
We will be pulling in dashboard's SortableTable shortly; this is the
first step, to add its dependencies.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-02-16 13:08:23 -08:00
Eric Promislow
2b1bbadaf0 better way of testing for exceptions 2021-02-10 16:10:42 -08:00
Eric Promislow
13ab092e8e Convert console.error writes to exceptions
* Verify minimum and specified values are sane wrt max

* Redefine console.error to spy on and verify errors.
2021-02-10 10:50:53 -08:00
Eric Promislow
58b2015227 rebase to update nuxtron usage 2021-02-09 15:20:19 -08:00
Eric Promislow
e234e6ea82 changes due to eslint 2021-02-09 14:41:44 -08:00
Eric Promislow
4b9e33ad14 reran npm install 2021-02-09 14:29:07 -08:00
Eric Promislow
50180fc0f6 Issue 89: Rework Settings UI
Move the "Reset Kubernetes" button under the sliders

- Update preferences on each slider change

Note that this branch is based on 60-sliderize-prefs
2021-02-09 14:29:06 -08:00
Eric Promislow
e4d06b49cc rebased against 60-sliderize-prefs 2021-02-09 14:28:01 -08:00
Eric Promislow
2b2b968652 Add an apply button for updating prefs and restarting the k8s engine
* The apply button should be enabled only when changes have been made.

There's a new TODO: we should add a status bar in the UI to indicate
when prefs have been updated or k8s has been restarted.
2021-02-09 14:27:27 -08:00
Eric Promislow
6084ca59bb Update package.json rebasing against main 2021-02-09 14:26:05 -08:00
Eric Promislow
d547b1bb15 rebase against main 2021-02-09 14:24:12 -08:00
Eric Promislow
6a360174f4 rebase to pull in updates 2021-02-09 14:24:12 -08:00
Eric Promislow
675c066698 Rebase against main and fix parseFloat calls 2021-02-09 14:24:12 -08:00
Eric Promislow
da11980191 move babel-plugin-module-resolver to dev, remove babel-plugin-root-import 2021-02-09 14:22:38 -08:00
Eric Promislow
e791fafd20 Update package.json rebasing against main 2021-02-09 14:21:10 -08:00
Eric Promislow
124875411f yet another rebase commit 2021-02-09 13:41:22 -08:00
Eric Promislow
e998fd8707 post-rebase fixes before merging 2021-02-09 11:26:30 -08:00
Eric Promislow
37f4b09c26 add suggestions 2021-02-09 11:21:08 -08:00
Eric Promislow
f988999f5a Finish rebasing against main 2021-02-09 11:20:39 -08:00
Eric Promislow
383d3fb1b5 Rebase against main, and hoist gone var up with other module globals. 2021-02-09 11:20:36 -08:00
Mark Yen
8e7ff5145b ESLint: also lint *.vue
Also move the eslint configuration to a separate file, because it will
get more complex before we tackle the errors.
2021-02-03 14:49:39 -08:00
Mark Yen
e1c0aab8d9 package.json: Remove unneeded dependencies
We are no longer using the Vue CLI for anything.
2021-02-03 14:49:12 -08:00
Mark Yen
75d56a491d Package.json: Add nuxt & nuxtron
In order to pull more components from github.com/rancher/dashboard, we
will need to use nuxt.  But for that to happen, we need some
compatiblity layer with electron.  It appears that nuxtron is a
reasonable option here.
2021-02-03 14:48:34 -08:00
Eric Promislow
396e75ecf4 fixing the webpack resource bug (again)
Ref: https://github.com/vuejs/vue-cli/issues/5986
2021-01-29 14:59:17 -08:00
Eric Promislow
d4698a5a96 Checkbox wiring broke when backing from vue 3 to 2.
This change brings it back

Also:
* allow resources to be in a .../bin dir
* add a missing await to a Promise call
2021-01-26 15:15:32 -08:00
Eric Promislow
b60b201f93 Use lodash instead of deepequal
- Other dependencies already use lodash, so we might as well use it
  instead of relying on a single-use library

- Also I had to run the following to deal with the fatal startup error
  message:

  "Rule can only have one resource source"

  $ rm -rf node_modules package-lock.json
  $ npm install --legacy-peer-deps

I would have preferred separate commits, but the lodash change was
intermixed with the legacy changes.
2021-01-26 11:31:56 -08:00
Mark Yen
1eded433e3 package.json: reinstall follow-redirects
This is still needed for the setupmac script.
2021-01-21 14:20:09 -08:00
Mark Yen
2790f7421e package.json: explicitly install eslint
For some reason, `npm run lint` (running `vue-cli-service lint`) works
on mac, but not linux, unless we manually install eslint.
2021-01-20 14:42:04 -08:00
Mark Yen
9759bc661d packge.json: rebuild
It appears that the Vue 2 downgrade has caused issues in the
package.json such that removing the lock file leads to a combination
that could not be installed correctly.

This rebuilds package.json after removing packge-lock.json to ensure
that we are back to a consistent state again.
2021-01-20 14:16:17 -08:00
Mark Yen
4264f3baa4 Update package-lock.json
This is just regenerated from the previous commit.
2021-01-19 14:05:39 -08:00
Matt Farina
221b3e8dfe Adding hyperkit to RD
Up to this point RD has used hyperkit provided by docker or installed
via homebrew. This has worked for development but does not work going
forward. We cannot assume that either hyperkit is installed or that
the path the built app has includes hyperkit.

The change adds hyperkit via two steps:
1. hyperkit is downloaded and placed in the resources/darwin directory
   alongside of minikube. It does this by checking out the source at
   a specific version and building it. This is needed because hyperkit
   is not available as a download.
2. The path to hyperkit is added at the start of the path when minikube
   processes are spawned. The start of the path is used so that RD
   provided hyperkit is used instead of a different version that may
   be available on the system.

Signed-off-by: Matt Farina <matt@mattfarina.com>
2021-01-11 13:08:22 -05:00
Mark Yen
928e7671a4 package.json: use vue-clie-service electron:serve for dev
That does everything needed; running electron manually leads to errors
loading files.

Also drops the "concurrently" package, since we no longer use it.
2021-01-06 13:36:48 -08:00
Mark Yen
36cdc5d013 package.json: add vue-cli-plugin-electron-builder
This will be used to package things up.
2021-01-06 13:35:39 -08:00