41 Commits

Author SHA1 Message Date
Schiefelbein, Andrew
95875e9200 Fix the license add for .ts and .css
This patch set does the following:
1.  Combines the add_license.sh and check_copyright into one file
2.  Fixes the oversite in the license add for the html components

Change-Id: Iec9a1acaf5fd64aaa708e532f5db070be80344a0
2020-09-28 10:22:29 -05:00
Schiefelbein, Andrew
36dbe35e49 Makefile & build improvements
This should do the following:
1.  Overwrite the websocket address if defined in the
    etc/airshipui.json file at build time.
2.  Speed up the copyright and whitespace linting
3.  Add copyright for .css and .ts files

Change-Id: I4155282e4d69bb4e20a71f0c481834c7232d8479
2020-09-25 10:33:13 -05:00
Schiefelbein, Andrew
04565d48b6 Update NG test in the makefile
This will cause the output to be more verbose and to bail on error

Change-Id: I98a2528641320063c449f3b69f38d62442482904
2020-09-17 10:30:27 -05:00
Schiefelbein, Andrew
f59f2bc6eb Update documentation for TLS and authentication
Change-Id: Iac283b4feb17b5a9ddaf4d50d4fa53b77d29a4a3
2020-09-03 14:28:13 -05:00
Schiefelbein, Andrew
cff2713f74 Update logging per feedback I got on a CTL patch set
Change-Id: I0f16ae0e6340478f668823c193b24ff17ea3d9f3
2020-08-27 14:56:17 -05:00
Danny Massa
8f426a0bb2 Added TS Unit Testing, TS Lint, Yarn package management.
Using this new structure, developers can rebuild, test, and lint
individually, saving time an effort in the event of a failure.

Added Frontend unit testing alongside a more modular module design
to make components and services easier to test and easy to manage
dependencies for.

Adding Yarn for more performant package management

Change-Id: I56a57100b5d831bb31bc18e2c62c78bf63265324
2020-08-16 20:51:55 -05:00
Danny Massa
b3b2c39341 Removed Unused Methods and Made Documentation Updates
1. removed unused methods that retreived html as they now conflict
with the UI design
2. removed all references to electron, npx, and other, now removed
bits of functionality.

Change-Id: Ide23bb0207d6bf0ed5e31ee18f0ad35ce723a502
2020-08-12 14:28:30 -05:00
Schiefelbein, Andrew
a15a4d87e2 Simplify, refactor and rename to bring in line with CTL
This patch does the following:
1.  Simplify the client websocket message transformation
2.  Move the cmd/airshipui to cmd
3.  move internal to pkg
4.  Clean up the copyright checker
5.  clean up the linting in the makefile

Change-Id: I1381d025e8058cbfba44b58ec3c2ec5c2aa36de5
2020-08-04 14:26:51 -05:00
Danny Massa
a0d1b40230 Adding Angular to UI
Angular was added to organize the FE
of the UI application better. In doing so I
have rebuilt the build scripts, added a routing
mechanism for the Go server to route and
serve the compiled TS pages from Angular.

Change-Id: I7ae2cacfd90372fa536b1639e5b54a8da786e2cd
2020-08-04 10:58:46 -05:00
Zuul
1d9e096fb5 Merge "Incorporate the whitespace linter from the CTL project" 2020-07-24 14:36:35 +00:00
Schiefelbein, Andrew
cb9fa2624a Incorporate the whitespace linter from the CTL project
This just brings over the whitespace linter and updates any
files that may have been out of compliance.  It's also a small
update to .gitignore to not care about the .out files generated
by a make cover command.

Change-Id: I3e5a4f170f0fd7724949708a290a1e13def834fb
2020-07-22 13:40:32 -05:00
bijayasharma
99235e2aec Added unit-tests in Makefile
* This commit will add unit-tests and coverprofile for the tests.
* Adds ability to run make unit-tests command.
* This has been referenced from the Airshipctl project.

Change-Id: Ida6bfe64b7fc166072ae6357940d283fa3d60349
2020-07-22 14:06:02 -04:00
Zuul
3fefc40632 Merge "Added copyright in Makefile" 2020-07-21 22:00:09 +00:00
bijayasharma
c5165023d4 Added copyright in Makefile
This commit will add copyright header to missing files.
Also check copyright header is present on all files.

Change-Id: I9116c2329db9b4bb1e5b822189e7c82cf242006c
2020-07-21 16:40:41 -04:00
Alexander Hughes
2ff942f766 Add gomod tidy check to lint gate
Sister project airshipctl uses gomod tidy checks to ensure
dependencies are up to date. These checks are performed at the gate
with an error message for remediation (run go mod tidy) when
dependencies in a patchset are not current. Adding the same
functionality to airshipui.

Change-Id: Ica3602cccd5d84d30f0ffae25667e968369349fd
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
2020-07-13 14:24:18 -05:00
Schiefelbein, Andrew
fc38c593f2 update makefile to build docker images
This is entierly based on what is done in the CTL project

Fixes #10

Change-Id: I3fc27b686a2048d48bb2198cd8439e65d77df659
2020-07-08 08:45:00 -05:00
Schiefelbein, Andrew
a7d68ebdbf addition of monaco editor for online yaml & json editing
Much of this is place holders until further discussion happens

Modified the test to use a more dynamic style of test render

Change-Id: Id9324a66dcd0ad47ce20540d9aa6721747dfb703
2020-06-24 12:47:08 -05:00
Schiefelbein, Andrew
3122f7355f Update Makefile and documentation for npm installs
Changes:
1. npm electron start is run with local node / npm:
   /<airshipui_root>/tools/node-v12.16.3/bin
2. The Makefile now will install node by default
3. The Makefile will now add the node modules on command
4. Seperated out the go linter and the js linter installers

Change-Id: I03904218082e73ef757e06073b548b9c3f499784
2020-05-29 14:17:38 -05:00
Zuul
247d5ea93b Merge "Add make target to check that go.mod is current" 2020-05-20 15:53:12 +00:00
Alexander Hughes
811ca7153f Add make target to check that go.mod is current
Sister project airshipctl is using this make target and supporting
script and is very helpful to ensure dependencies are up to date and
unused dependencies are removed. Adding to airshipui.

Change-Id: Ic1ad3b134dbe871e489f851d41aea9bb3d25e9ba
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
2020-05-20 09:10:06 -04:00
Schiefelbein, Andrew
8672ca43d6 Fix makefile for multiple examples
Change-Id: I5ba7eefea0beff8da224567a6073b298f10153bb
2020-05-19 16:10:28 -05:00
Schiefelbein, Andrew
f070a9fba7 Adding eslint to do basic linting for JS and HTML files
Change-Id: Id37e35c3fff08b0a13ca8cad8f23a1b925fafa35
2020-05-18 13:22:08 -05:00
Schiefelbein, Andrew
dc43d5b17d POC pluggable auth method
Fixes #32

The changes are as follows:
1. An example for basic auth
2. An example for cookie based auth
3. An example for JWT (oauth)
4. Update the linting tools to also test the examples dir
5. Update the examples structure to be more logical

Things still needing to be worked:
1. Determine the best way to handle confs pertaining to auth
2. Understand how credentials are going to be passed where
3. How to store user credentials

Change-Id: Ie8798131d7fa338a8aeec3303593afb0390ab393
2020-05-15 11:45:50 -05:00
Schiefelbein, Andrew
c4fb668985 Adding in an octant plugin with example
This additon means:
1. Changes to the Makefile to accomodate octant specific plugins
2. An example by which people can develop an octant plugin
3. Updates to the developers guide for octant specific development
4. Adding an examples dir in case more will be needed

Change-Id: Ia80d135ee739569b990b58681b114c762b86a2d8
2020-05-12 10:49:06 -05:00
Drew Walters
de5d9017b3 Publish documentation
This change adds the Sphinx theme, plumbing, and jobs to publish the
airshipui documentation to docs.airshipit.org/airshipui.

Change-Id: Ia383b2424078dbab2e2300be5f41068571713b50
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-05-11 21:21:41 +00:00
Schiefelbein, Andrew
31e0b38830 Updated documentation and removed openstack go client
The openstack go client will be replaced with a webview to
horizion which is how we will move sub components into the UI
going forward.  The documentaiton also needs further revsion as
we continue to evolve

Change-Id: I4468d0b2b25bdd9fbdcd232d79fc7b2dc792cf65
2020-04-30 14:33:10 -05:00
Schiefelbein, Andrew
37be06e6dc [WIP] transform airship ui into a standalone electron app
Removing octant reference for now, it will need to be
later embedded into the ui

Working on this will require these commands to be run in
the web directory:
npm install
npm install --save-dev electron

behind a proxy npm install may have issues, this might work:
npx cross-env ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=
http://<proxy>:<port> npm install -D electron@latest

Change-Id: I5bd054a767fe8ab7b0461a16eced1921c4de11f6
2020-04-30 08:54:09 -05:00
Jordan Jensen
386c46e000 Correct multiple plugins install with extensions
When installing multiple plugins only the last listed will get the
extension. This will add the extension as a suffix to each of the
plugins.

Change-Id: I018053cb0629e4ef6f2bc3beb5822b4aed971f5a
2020-03-19 13:24:58 -07:00
Schiefelbein, Andrew
ac29f3976e Makefile plugin copy fix
When there are multiple plugins the original copy command did not
work effectively.  This is a small fix to solve the problem.

Change-Id: Ia7959b6cc5719ad8cb35f29e7903d6b7f3573722
2020-03-19 19:47:13 +00:00
Schiefelbein, Andrew
e951adeaf1 Correct makefile to work with windows
fixes #15

changes:
1.  Update the extension on build for .exe, otherwise not runnable
2.  Fix the pathing for windows on the install plugin

Linting will have problems if WSL curl is used and not cygwin curl

Change-Id: If53e93a4e9a54febc047bf529d7821d7cb25e1ef
2020-02-27 15:35:23 -06:00
Gary Smith
7274339cab Create airshipui executable
Create airshipui executable that derives kube config from the airshipctl
settings and launches octant.  The executable has its own set of
command-line options, which may be expanded in the future to perform
additional setup before launching octant.

Note that octant currently does not support being compiled together and
called as a function from other code, but that support should be coming
in the future.

Remove goimports check from lint suite since it generates undecipherable
(and sometimes unsolvable) false positives and does not substantively
improve on "go fmt".

Change-Id: Iad1530f536fcbae93a92a4e827dbb7aece5231fa
2020-01-08 11:51:30 -08:00
Jordan Jensen
37515f337a Remove docker build for zuul jobs
Instead of using docker to build, lint, and unit tests we can instead
use go directly using Zuul.

Change-Id: I4c22c4f977c94437717da73f52e9665b4e86040d
2020-01-07 10:03:55 -08:00
Gary Smith
c3c4e3b205 Enable make clean
Enable the clean target in the Makefile to clean the artifacts generated
during the build and coverage tests.  Add the bin dir to .gitignore.

Before this change the makefile had a clean target that performed
'git clean -dx' in a source directory, which is a dangerous operation in
a development environment since it will discard any uncommitted source
code changes that a developer has made; it also did not clean up the
actual build/test artifacts since they were not generated into the
directoried being cleaned.

Change-Id: I23fd5f44c8ce1cf6f539c0e05ae91c667a34e044
2019-12-16 19:22:36 +00:00
Gary Smith
6d9d20e3d5 Add gate, check jobs for zuul
Add gate and check jobs for zuul, which requires building in a container
that has the appropriate version of golang installed.  This code is
based on similar code in the airshipctl repository.

Change-Id: I77fd18335b68f1de81e0227eb2a7c77a1a392640
2019-12-13 18:57:22 +00:00
Gary Smith
252c00c780 Integrate golangci-lint linter
Integrate golangci-lint, which is a full-featured linter tool that
includes the checks from 'go vet' and many more.  Borrowed the
install_linter script from airship/airshipctl to install the script
from upstream. Address issues uncovered by the tool.

Change-Id: If30e0819f5d03243e4004bca07951f8aa5218749
2019-12-13 18:57:22 +00:00
Jordan Jensen
3575299373 Add unit tests to airshipui plugin
- Remove globbed url route
- Create unit tests for register.go
- Add test and coverage-html targets to Makefile
- Add test coverage output to gitignore

Change-Id: I980e28204afc83b67a8a4d2d6af500caa9e530c2
2019-12-13 18:47:29 +00:00
Gary Smith
01350d74b0 Add argo-ui as an iframe
This change request demonstrates using the iframe capability in octant.

It requires that argo-ui is running and available locally,
which can be accomplished with the commands:
  kubectl create namespace argo
  kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj\
/argo/stable/manifests/install.yaml
  kubectl -n argo port-forward deployment/argo-ui 8001:8001

A check is made for the presence of the argo-ui deployments and will
only attempt to show the iframe if it is present.

Change-Id: I1a26e788366d0adb770368083c4f1996311bcd33
2019-11-28 00:39:05 +00:00
jezogwza
b273aab419 Modifies Makefile to support multiple plugins
Introduces new convention for plugins that fixes
multi plugin support

Each plugin name will exist at :
- cmd/<plugin name>/main.go
  Definitions to call plugin registration

- internal/plugin/<plugin name>
  Implementations for Navigation, Tab and Print as appropriate

Change-Id: I6f5e71900eb90b26917216ebd1a2749acc4f5a52
2019-11-25 12:18:33 -05:00
Gary Smith
85c3834a9e Inject version number into plugin description (#3) 2019-09-20 14:50:24 -07:00
Jordan Jensen
bc6b42ff10 Rename make plugin target to install-plugin (#2) 2019-09-20 13:51:47 -07:00
Gary Smith
708c014058
Initial commit 2019-09-20 09:08:48 -07:00