Giter Site home page Giter Site logo

fabric8-ui / fabric8-runtime-console Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 18.0 4.26 MB

DEPRECATED - the angular 2 runtime console for Builds, Pipelines, Environments and Runtime resources

Home Page: https://github.com/fabric8-ui/fabric8-ui

TypeScript 68.16% JavaScript 6.66% HTML 18.54% CSS 5.21% Shell 1.31% Groovy 0.12%

fabric8-runtime-console's Introduction

fabric8-ui

Build Status codecov

Development environment

Run fabric8-ui with remote backends

You need to setup your shell to point to the right cluster so that it can talk to the required back end services like KeyCloak, WIT, Forge, OpenShift etc.

We provide various sample environments out of the box which make it easier to get started. They are all located as bash scripts in environments.

The default one you should use when you want to develop on the console is to reuse openshift.io production cluster:

source environments/openshift-prod-cluster.sh

There are others too. For example if you want to try run fabric8 locally on minishift and connect fabric8-ui to it then try:

source environments/local-cluster.sh

NOTE: If you want to target a local WIT backend, check our wiki How To pages.

Build and Run

Requires node version 8.3.0 and npm 5.3.0. Consider using Node Version Manager.

Run npm install. This will download all the required dependencies to be able to start the UI.

Run npm start. This will start the UI with live reload enabled. Then navigate to http://localhost:3000.

Run test

We use jest test loader because it's faster than karma execution.

All tests

npm run test

Note: the first execution of the test take longer, subsequent calls are cached and much faster.

Watch mode

If you want to run all test in a feature-flag folder in watch mode:

npm run test -- feature-flag -- --watch=true

Note: You don't need to specify full path for the name of the test.

Debug

npm run test:debug

or to debug a specific test:

npm run test:debug -- feature-flag.service
  • Go to chrome: chrome://inspect
  • Let go the debugger and put debugger in your test.

To debug in your prefer IDE consolt Jest debugging documentation.

VS Code

Run ext install EditorConfig to read the .editorconfig file

Feature flag

To learn how to toggle your work in progress development, read our wiki page on fabric8-toggles.

HTML, CSS and Less

| Code Guidelines

fabric8-ui uses HTML5 elements where appropriate, and practices practicality over purity. Use the least amount of markup with the fewest intricacies as possible.

Attribution order, syntax definitions and declaration order are an important aspect of the fabric8-ui code and should be followed according the the guidelines.

fabric8-ui uses Less for it's stylesheets. If you find yourself wanting to create a shared style that multiple components will use, then we recommend adding it to an existing .less file in the src/assets/stylesheets/shared/ directory. Only update these styles if you are making a truly global style, and are going to synchronize your changes across all of the various UI projects.

If you only want to make a change to a specific component, do so in that component's .less file, according to Angular best practices.

The file osio.less is imported into every component Less file using @import (reference), so all files inside of the /shared directory will be used by each component.

Code Quality

fabric8-ui utilizes stylelint and htmlhint to check the less and html code. As part of each linter, we include three files: .stylelintrc, .stylelintignore and .htmlhintrc.

The .stylelintrc configuration file controls our configuration for the stylelinter, which only checks folders and files that are not included in the .stylelintignore file. This allows us to exclude certain areas of the application, as needed.

The .htmlhintrc configuration file controls our HTML verification configuration. In the creation of this configuration, we have taken into account the various Angular elements that will exist in the HTML pages.

Running the code quality checks

Each linter is built into the build process, so running npm run build or npm start will display any errors, their location (file name and line number), and any error message(s). Whenever a file that is watched by the code quality checks is changed, the build (if started with npm start) will re-run, checking only the altered files.

If you would like to run either of these checks individually, without kicking off a full build, you can do so by installing stylelint and htmlhint globally:

npm install stylelint -g
npm install htmlhint -g

After installing stylelint and htmlhint globally, you can run the following commands:

  • stylelint "**/*.less"

This will run stylelint against all .less files in fabric8-ui/src, using the .stylelintrc configuration file.

  • htmlhint

This will run htmlhint against all html files in fabric8-ui/src, using the .htmlhintrc configuration file. This command will not ignore the files and folders dictated in the webpack.common.js file, leading to the possibility of errors being displayed that will not appear at build time.

Alternatively, if you would like to check a subset of folders, or a specific file, you can do so by altering your htmlhint command:

  cat src/app/layout/header/header.component.html | htmlhint stdin

Integrations

fabric8-ui uses rxjs to provide loose coupling between modules (both those in the code base and those integrated via NPM). To do this, fabric8-ui makes extensive use of the Broadcaster.

Context

Space changed

When the current space the user is viewing changes, fabric8-ui broadcasts with the key spaceChanged and the
new Space as the payload.

UI integrations

Notifications

To send a notification to the user, the module should import ngx-fabric8-wit and inject the Notifications service, and call the message() method, passing in a Notification. You can subscribe to the result of message() to observe any NotificationActions that result from the notification.

Working with multi-level depenendencies

Let's consider a scenario wher you have an NPM module 'C' which sits inside another NPM module 'B' which is included in the parent module 'A'. During development, it is very common to use npm link to create a symlink and test the changes automatically. In this case, there is a high possbility for the parent module 'A' to be totally unaware of the existence of npm module 'C' as the symlinks don't get propagated all the way up. As a result, you might end up seeing the following error in the parent module 'A':

Module not found: Error: Can't resolve 'C' in ...

To address this, we can make the parent module 'A' be aware of the existence of 'C', by making changes in

tsconfig.json

of the parent module 'A'.

Inside "compilerOptions", Add an object key, "baseUrl" which basically identifies the base of the project and all the other urls are relative to this. Add an object key, "paths" as below

{
  "compilerOptions": {
    .
    .
    .
    "baseUrl": ".",
    "paths": {
      .
      .
      .
      "C": ["node_modules/B/node_modules/C"] //relative to the base url
    }
  }
}

By doing this, parent module A now is aware of the existence of the grand child 'C'. This can be modified for n-level dependencies. If your project builds using AOT or in other words if your project uses tsconfig-aot.json or similar, same things can be handled over there as well.

Continuous Delivery & Semantic Releases

In ngx-fabric8-wit we use the semantic-release plugin. That means that all you have to do is use the AngularJS Commit Message Conventions (documented below). Once the PR is merged, a new release will be automatically published to npmjs.com and a release tag created on GitHub. The version will be updated following semantic versioning rules.

Commit Message Format

A commit message consists of a header, body and footer. The header has a type, scope and subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

The header is mandatory and the scope of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.

Revert

If the commit reverts a previous commit, it should begin with revert:, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.

Type

If the prefix is fix, feat, or perf, it will always appear in the changelog.

Other prefixes are up to your discretion. Suggested prefixes are docs, chore, style, refactor, and test for non-changelog related tasks.

Scope

The scope could be anything specifying place of the commit change. For example $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView, etc...

Subject

The subject contains succinct description of the change:

  • use the imperative, present tense: "change" not "changed" nor "changes"
  • don't capitalize first letter
  • no dot (.) at the end

Body

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

Footer

The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.

Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines. The rest of the commit message is then used for this.

A detailed explanation can be found in this document.

Based on https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit

Examples

Appears under "Features" header, pencil sub-header:

feat(pencil): add 'graphiteWidth' option

Appears under "Bug Fixes" header, graphite sub-header, with a link to issue #28:

fix(graphite): stop graphite breaking when width < 0.1

Closes #28

Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:

perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason.

The following commit and commit 667ecc1 do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.

revert: feat(pencil): add 'graphiteWidth' option

This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

Commitizen - craft valid commit messages

Commitizen helps you craft correct commit messages. Install it using npm install commitizen -g. Then run git cz rather than git commit.

Running End-to-End (E2E) Tests

A set of E2E tests have been written to verify the operation of major features such as the creation of a build pipeline.

These E2E tests are configured to be run locally in a shell, locally in a docker container, and in a docker container in Centos CI. The tests can be run against a local or remote server by specifying the server's URL as a parameter to the tests.

The E2E tests are available in this repo: https://github.com/fabric8io/fabric8-test

The full set of instructions on installing and executing the E2E tests are avalable here: https://github.com/fabric8io/fabric8-test/blob/master/ee_tests/README.md

Easy E2E Test Setup

Run the following script and follow the on screen prompts to configure the test environment. The process will checkout the fabric8-test project as a sibling to fabric8-ui.

npm run e2e

To clean up the fabric8-test project:

npm run e2e:clean

To delete the e2e configuration file and re-prompt for all data:

npm run e2e:reconfig

To run the e2e tests using the last configuration without prompting:

npm run e2e:last

Mac Users

You may encounter the error readlink: illegal option -- f. To fix this, run the following commands:

brew install coreutils
ln -s "$(which greadlink)" "$(dirname "$(which greadlink)")/readlink"

Monorepo

This monorepo is managed with Lerna.

To get started, install the project dependencies and bootstrap all packages. The bootstrap process will update all packages with all their dependencies and link any cross-dependencies.

npm install
npm run bootstrap

VSCode Extensions

  • Prettier - Code formatter
    • Integrates prettier for auto formatting.
  • ESLint
    • Integrates ESLint reporting in editors.
  • Coverage Gutters
    • Display test coverage generated by lcov.
  • Jest
    • Snapshot syntax highlighting.
    • Augment unit tests with inline error reports.
  • Angular Language Service (angular.ng-template)
    • Provides a rich editing experience for Angular templates.

fabric8-runtime-console's People

Contributors

arunkumars08 avatar corinnekrych avatar dgutride avatar dlabrecq avatar fabric8cd avatar gashcrumb avatar jimmidyson avatar joshuawilson avatar jstrachan avatar kahboom avatar maxandersen avatar pmuir avatar rawlingsj avatar vineetreynolds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fabric8-runtime-console's Issues

release pipeline is failing `Error in plugin 'gulp-ngc'`

The runtime console release pipeline is failing

http://jenkins.cd.k8s.fabric8.io/job/fabric8-ui/job/fabric8-runtime-console/job/master/59/console

Is gulp build-library needed? If it is we should probably calling it during the CI pipeline too and avoid hitting these issues when releasing?

> gulp build-library

[13:57:53] Using gulpfile /home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/gulpfile.js
[13:57:53] Starting 'transpile'...
[13:57:53] Starting 'transpile-sass'...
[13:57:53] Starting 'copy-html'...
[13:57:53] Starting 'copy-static-assets'...
Error at /home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/src/app/shared/sso-api.provider.ts:8:12: Exported variable 'ssoApiUrlProvider' has or is using name 'OpaqueToken' from external module "/home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/node_modules/@angular/core/src/di/opaque_token" but cannot be named.
Error at /home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/src/app/shared/auth-api.provider.ts:8:12: Exported variable 'authApiUrlProvider' has or is using name 'OpaqueToken' from external module "/home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/node_modules/@angular/core/src/di/opaque_token" but cannot be named.
Error at /home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/src/app/shared/wit-api.provider.ts:8:12: Exported variable 'witApiUrlProvider' has or is using name 'OpaqueToken' from external module "/home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/node_modules/@angular/core/src/di/opaque_token" but cannot be named.
[13:58:01] 'transpile' errored after 7.34 s
[13:58:01] Error in plugin 'gulp-ngc'
Message:
    Compilation error.
See details in the ngc output
Details:
    fileName: /home/jenkins/workspace/ric8-runtime-console_master-J7JD3SGZU3JX3OVHUU2IXMGEUMRINU6SFIBWYPCAMJISUKMC5PHQ@2/tsconfig.json
[13:58:01] Finished 'copy-static-assets' after 7.69 s
[13:58:02] Finished 'copy-html' after 8.29 s
sh-4.2# exit
exit
[13:58:02] Finished 'transpile-sass' after 8.37 s

npm ERR! Linux 4.4.21+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:library"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:library: `gulp build-library`
npm ERR! Exit status 1

Add Space awareness

The pipelines should display pipelines for the context they exist in.

This may or may not involve configuring this repo to run as a standalone app. The requirement is to run in the Platform UI.

CI builds are taking ~6mins, can that time be reduced?

We run npm install and npm test in the CI pipeline however the test seems to halt for a good while before churning out some warnings and an error. I'm wondering if there's a timeout before the tests progress? The job still passes too so I think there's something odd going on.

+ npm test

> [email protected] test /home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2
> karma start


�[4m�[1mSTART:�[22m�[24m
webpack: wait until bundle finished: 

[at-loader] Using [email protected] from typescript and "tsconfig.json" from /home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/tsconfig.json.


[at-loader] Checking started in a separate process...

[at-loader] Checking finished with 1 errors
[at-loader] Checking started in a separate process...

[at-loader] Checking finished with 1 errors
�[1m�[33mWARNING in ./~/ngx-dropdown/index.js
Cannot find source file '../../src/index.ts': Error: Can't resolve '../../src/index.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ngx-dropdown'
 @ ./src/app/app.module.ts 27:0-46
 @ ./src/main.browser.ts�[39m�[22m

�[1m�[33mWARNING in ./~/ngx-dropdown/DropdownNotClosableZone.js
Cannot find source file '../../src/DropdownNotClosableZone.ts': Error: Can't resolve '../../src/DropdownNotClosableZone.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ngx-dropdown'
 @ ./~/ngx-dropdown/index.js 13:32-68 16:9-45
 @ ./src/app/app.module.ts
 @ ./src/main.browser.ts�[39m�[22m

�[1m�[33mWARNING in ./~/ngx-dropdown/Dropdown.js
Cannot find source file '../../src/Dropdown.ts': Error: Can't resolve '../../src/Dropdown.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ngx-dropdown'
 @ ./~/ngx-dropdown/index.js 14:17-38 17:9-30
 @ ./src/app/app.module.ts
 @ ./src/main.browser.ts�[39m�[22m

�[1m�[33mWARNING in ./~/ngx-dropdown/DropdownOpen.js
Cannot find source file '../../src/DropdownOpen.ts': Error: Can't resolve '../../src/DropdownOpen.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ngx-dropdown'
 @ ./~/ngx-dropdown/index.js 15:21-46 18:9-34
 @ ./src/app/app.module.ts
 @ ./src/main.browser.ts�[39m�[22m

�[1m�[33mWARNING in ./~/ng2-modal/index.js
Cannot find source file '../../src/index.ts': Error: Can't resolve '../../src/index.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ng2-modal'
 @ ./src/app/kubernetes/ui/build/edit-wrapper/edit-wrapper.build.spec.ts 12:0-40
 @ ./src \.spec\.ts
 @ ./config/spec-bundle.js�[39m�[22m

�[1m�[33mWARNING in ./~/ng2-modal/RouteModal.js
Cannot find source file '../../src/RouteModal.ts': Error: Can't resolve '../../src/RouteModal.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ng2-modal'
 @ ./~/ng2-modal/index.js 6:19-42 10:9-32
 @ ./src/app/kubernetes/ui/build/edit-wrapper/edit-wrapper.build.spec.ts
 @ ./src \.spec\.ts
 @ ./config/spec-bundle.js�[39m�[22m

�[1m�[33mWARNING in ./~/ng2-modal/Modal.js
Cannot find source file '../../src/Modal.ts': Error: Can't resolve '../../src/Modal.ts' in '/home/jenkins/workspace/ric8-runtime-console_PR-110-B62QW7MUZWHBSRZQI7QNYKSIZRQTRSG6M7O2UR2PGLLB5EYMCKIA@2/node_modules/ng2-modal'
 @ ./~/ng2-modal/index.js 5:14-32 9:9-27
 @ ./src/app/kubernetes/ui/build/edit-wrapper/edit-wrapper.build.spec.ts
 @ ./src \.spec\.ts
 @ ./config/spec-bundle.js�[39m�[22m

�[1m�[31mERROR in [at-loader] ./src/app/environment.ts:19:22 
    TS2304: Cannot find name 'ENV'.�[39m�[22m
webpack: Failed to compile.
�[32m16 03 2017 18:21:08.493:INFO [karma]: �[39mKarma v1.5.0 server started at http://0.0.0.0:9876/
�[32m16 03 2017 18:21:08.496:INFO [launcher]: �[39mLaunching browser PhantomJS_custom with unlimited concurrency
�[32m16 03 2017 18:21:08.504:INFO [launcher]: �[39mStarting browser PhantomJS
�[32m16 03 2017 18:21:09.013:INFO [phantomjs.launcher]: �[39mACTION REQUIRED:
�[32m16 03 2017 18:21:09.014:INFO [phantomjs.launcher]: �[39m
�[32m16 03 2017 18:21:09.014:INFO [phantomjs.launcher]: �[39m  Launch browser at
�[32m16 03 2017 18:21:09.014:INFO [phantomjs.launcher]: �[39m  http://localhost:9000/webkit/inspector/inspector.html?page=2
�[32m16 03 2017 18:21:09.014:INFO [phantomjs.launcher]: �[39m
�[32m16 03 2017 18:21:09.014:INFO [phantomjs.launcher]: �[39mWaiting 15 seconds ...

Extract loading support into library and reimplement reactively

The loading feature is interesting, and something we should adopt for the whole platform, but I think we need to reimplement it to be suitable for reactive streams rather than stateful webapps.

I would propose that all services should return an observable of a wrapper object

export class ResultWrapper<T> {
   val: T;
   loading: boolean
}

Each request to a service would result in two emissions; the first, which happens immediately on method return, would be

{
   result: null;
   loading: true;
}

Once the service actually receives data, it then emits:

{
   result: val;
   loading: false;
}

If we decide to add additional metadata to results (for example, validation information, authz info etc.) we can do this without breaking the API.

Convert namespace from aspect to argument in service layer

Right now the namespace is injected and stored in both the stores and the services, which makes them very hard to reuse as composable services.

This happens via the NamespacedResourceService and NamespacedResourceStore.

Instead of injecting the namespace into a parent class, it would be better if operations like loadAll took an argument of namespace: Observable allowing the consumer to explicitly choose the namespace.

Relates to:

  1. #146 - this is a longer term task to remove the store layer entirely
  2. #147 - this issue (#143) really a subtask (the most pressing) of #147.

Allow custom filters

The current filters are not extensible, meaning that if a consumer wants to extend them, they have to replace them. Instead, allow consumers to specify additional filter configs, perhaps via a callback.

Depends on #153

JavaScript console errors about $(...).matchHeight

vendor.bundle.js:13742 Angular is running in the development mode. Call enableProdMode() to enable the production mode.
jquery-3.1.1.slim.min.js:2 jQuery.Deferred exception: $(...).matchHeight is not a function TypeError: $(...).matchHeight is not a function
    at HTMLDocument.<anonymous> (http://localhost:4200/:47:67)
    at j (https://code.jquery.com/jquery-3.1.1.slim.min.js:2:30164)
    at k (https://code.jquery.com/jquery-3.1.1.slim.min.js:2:30478)
    at ZoneDelegate.ac_polyfills../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.bundle.js:16383:31)
    at Zone.ac_polyfills../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4200/polyfills.bundle.js:16186:47)
    at ZoneTask.invoke (http://localhost:4200/polyfills.bundle.js:16436:38)
    at data.args.(anonymous function) (http://localhost:4200/polyfills.bundle.js:17547:25) undefined
r.Deferred.exceptionHook @ jquery-3.1.1.slim.min.js:2
k @ jquery-3.1.1.slim.min.js:2
ac_polyfills../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.bundle.js:16383
ac_polyfills../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.bundle.js:16186
ZoneTask.invoke @ polyfills.bundle.js:16436
data.args.(anonymous function) @ polyfills.bundle.js:17547
main.bundle.js:88405 Logging in with client fabric8 scope user:full and issuer https://int.rdu2c.fabric8.io:8443
main.bundle.js:88451 has valid OAuth token!
main.bundle.js:94419 Logged in with token true
main.bundle.js:88451 has valid OAuth token!
polyfills.bundle.js:16190 Uncaught TypeError: $(...).matchHeight is not a function
    at HTMLDocument.<anonymous> (http://localhost:4200/:47:67)
    at j (https://code.jquery.com/jquery-3.1.1.slim.min.js:2:30164)
    at k (https://code.jquery.com/jquery-3.1.1.slim.min.js:2:30478)
    at ZoneDelegate.ac_polyfills../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.bundle.js:16383:31)
    at Zone.ac_polyfills../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:4200/polyfills.bundle.js:16186:47)
    at ZoneTask.invoke (http://localhost:4200/polyfills.bundle.js:16436:38)
    at data.args.(anonymous function) (http://localhost:4200/polyfills.bundle.js:17547:25)
(anonymous) @ :4200/:47
j @ jquery-3.1.1.slim.min.js:2
k @ jquery-3.1.1.slim.min.js:2
ac_polyfills../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.bundle.js:16383
ac_polyfills../node_modules/zone.js/dist/zone.js.Zone.runTask @ polyfills.bundle.js:16186
ZoneTask.invoke @ polyfills.bundle.js:16436
data.args.(anonymous function) @ polyfills.bundle.js:17547
main.bundle.js:92733 WARNING: invoked the isOpenShift() method before the APIsStore has loaded!

Environments not displaying

While reviewing this PR #215

I clicked the staging link to see it run on the platform. I then logged in, created a new space, went to the space, and went to the environments tab. I got the following message.

Something went wrong your environments as the OpenShift Project 'josh-6' is not accessible to you or does not exist.

openshift web console

env-error

Login configuration

Setup the library to use the ngx-login-client and the auth that Platform is using.

Use css classes for images not src

This is the case for all dynamically loaded images - doing them via img src means that webpack can't load them.

If we do them via css classes the css loader will automatically pick them up and include them.

WORKAROUND: For now I will copy the img dir to fabric8-ui

Look at removing restangular

It seems to have almost no benefit over the Http client that is built in to Angular but brings huge complexity.

Allow results links on pages to be customised

Consumers may want to customize the links generated e.g. to point to the openshift console directly rather to sub-views of fabric8-runtime-console. Introduce a good way to do this.

My initial idea would be a callback.

services should not call stores

The service layer should be stateless and have all arguments passed in to method calls, not injected in to the constructor. This will better allow reusability.

Setup Semantic Release

Most of the code is in place for Semantic Release but there is no pipeline for it yet.

Configure a pipeline to release the module when the correct syntax is used in the commit message.

Extract generic config store idea to shared library

This is a useful concept we need for the whole platform. It should include:

  1. Code to load configs from arbitrary /_config/<name>.json files
  2. Injection by OpaqueToken and the generic config interface not just class name, to allow easy switching out inside the platform
  3. typed api to allow easy casting of types.

Configure PatternFly and SASS

Much of the work done in the Platform was copied of to use PF and SASS the same way.

Confirm that it is set up and running correctly, fix anything not set up yet.

kebab drop down menus now broken

there's no drop down menu - clicking the kebab (3 vertical dots) doesn't drop down the action menu on any page any more (builds/buildconfigs/deployments/pods etc)

fabric8_runtime_console_and___devtools-platform_-_rh-devtools_mattermost_and_jstrachan_on_freenode_irc_network_ __fabric8__220_users____nt_

a common fabric8-ui and fabric8-runtime-console approach to configuration?

  • fabric8-runtime-console runs stand alone, uses standard OAuth to OpenShift and needs to know the API server & needs to detect/be configured if its in openshift or not
  • fabric8-ui uses keycloak/almighty but still needs the OSO API server location

In both cases there's some environment configuration that needs to be loaded into the client. Right now in fabric8-runtime-console we're using a separate REST call on startup to load this file https://github.com/fabric8-ui/fabric8-runtime-console/blob/master/src/config/oauth.json in this code https://github.com/fabric8-ui/fabric8-runtime-console/blob/master/src/app/kubernetes/store/oauth-config-store.ts#L56

It would be nice to settle on a unified approach to this environmental configuration.

It does complicate the app a reasonable amount not being able to know this configuration on startup. I wonder if we should bake this configuration into the index.html file (so that its a template served up by the server side putting in all the environmental data ASAP) so that all the configuration is loaded before the app bootstraps? So maybe a webpack/template thingy might simplify the code & the app and boost the startup time?

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.