Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding assets from Online repo #1

Merged
merged 1 commit into from
Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# online-console-extensions
OpenShift Online extensions to the Origin Web Console

This repository contains various CSS, JavaScript, and HTML files used by OpenShift Online to extend the OpenShift Web Console.

These files are built and deployed in an Apache HTTP Server container. This can be tested in an OpenShift cluster with the following command:

`$ oc new-app centos/httpd-24-centos7~https://github.com/openshift/online-console-extensions`

If you run `oc expose svc/online-console-extensions` you will be able to see the files in a web browser under `<route>/ui`


11 changes: 11 additions & 0 deletions dedicated/ui/assets/extensions/dedicated-extensions.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions dedicated/ui/assets/extensions/dedicated-extensions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
This file contains extensions being used by the OpenShift Online Dedicated Cluster
They can be used as reference examples.
*/

/*
Override the CLI download locations
*/
window.OPENSHIFT_CONSTANTS.CLI = {
"Linux (64 bits)": window.OPENSHIFT_EXTENSION_PROPERTIES.CLI_linux64,
"Windows": window.OPENSHIFT_EXTENSION_PROPERTIES.CLI_windows,
"Mac OS X": window.OPENSHIFT_EXTENSION_PROPERTIES.CLI_mac
};

/*
Override the documentation links
*/
window.OPENSHIFT_CONSTANTS.HELP_BASE_URL = window.OPENSHIFT_EXTENSION_PROPERTIES.doc_url;

angular.module('openshiftDedicatedConsoleExtensions', ['openshiftConsole'])
.run(function(HawtioExtension) {

/*
Add additional items to the help dropdown in the top navigation bar
*/
HawtioExtension.add('nav-help-dropdown', function ($scope) {
var li = $('<li>');
$('<a href="'+window.OPENSHIFT_EXTENSION_PROPERTIES.support_link+'" target="_blank">Support</a>')
.appendTo(li);
return li;
});

HawtioExtension.add('nav-help-dropdown', function ($scope) {
return $('<li class="divider">');
});

});

/*
Register the custom angular module
*/
hawtioPluginLoader.addModule('openshiftDedicatedConsoleExtensions');
Loading