├── .eslintignore ├── .meteor ├── .gitignore ├── release ├── platforms ├── .id ├── .finished-upgraders └── packages ├── .dockerignore ├── imports ├── ui │ ├── components │ │ ├── icons │ │ │ └── index.js │ │ ├── loading │ │ │ ├── index.js │ │ │ └── component.html │ │ ├── noClusters │ │ │ ├── index.js │ │ │ └── component.html │ │ ├── portlet │ │ │ ├── index.js │ │ │ └── component.html │ │ ├── cluster │ │ │ ├── updaterMessages │ │ │ │ ├── index.js │ │ │ │ ├── component.scss │ │ │ │ └── component.html │ │ │ ├── comments │ │ │ │ ├── component.html │ │ │ │ └── index.js │ │ │ └── resources │ │ │ │ ├── component.scss │ │ │ │ └── component.html │ │ ├── historyDropdown │ │ │ ├── component.scss │ │ │ ├── component.html │ │ │ └── index.js │ │ ├── addCluster │ │ │ ├── component.scss │ │ │ └── index.js │ │ ├── kindIcon │ │ │ ├── component.html │ │ │ ├── component.scss │ │ │ └── index.js │ │ ├── breadcrumbs │ │ │ ├── breadcrumbs.scss │ │ │ └── breadcrumbs.html │ │ ├── commitLink │ │ │ ├── component.html │ │ │ └── index.js │ │ ├── activeDeployments │ │ │ └── component.html │ │ ├── strDiff │ │ │ └── index.jsx │ │ ├── clustersByKubeVersion │ │ │ └── component.html │ │ ├── externalApplications │ │ │ └── component.scss │ │ ├── sevenDayDeployments │ │ │ ├── index.js │ │ │ └── component.html │ │ ├── moment │ │ │ └── index.jsx │ │ ├── recentDeployments │ │ │ ├── index.js │ │ │ └── component.html │ │ └── inactiveClusters │ │ │ ├── component.html │ │ │ └── index.js │ ├── pages │ │ ├── deployables │ │ │ ├── index.js │ │ │ ├── subscriptions │ │ │ │ ├── groupSelect.html │ │ │ │ ├── groupSelect.js │ │ │ │ └── helpModal.html │ │ │ ├── channels │ │ │ │ └── helpModal.html │ │ │ ├── page.html │ │ │ ├── versions │ │ │ │ ├── index.js │ │ │ │ └── page.html │ │ │ ├── page.scss │ │ │ ├── channel │ │ │ │ └── apiHelp.html │ │ │ ├── version │ │ │ │ ├── page.html │ │ │ │ └── index.js │ │ │ └── utils.js │ │ ├── not-found │ │ │ ├── index.js │ │ │ ├── page.scss │ │ │ └── page.html │ │ ├── org │ │ │ └── page.scss │ │ ├── userprofile │ │ │ ├── page.scss │ │ │ └── index.js │ │ ├── clusters │ │ │ └── page.scss │ │ ├── razeeWelcome │ │ │ └── page.scss │ │ ├── welcome │ │ │ ├── page.scss │ │ │ └── page.html │ │ ├── cluster │ │ │ ├── page.scss │ │ │ └── index.js │ │ └── resources │ │ │ └── page.scss │ ├── style │ │ ├── toastr.scss │ │ ├── _font-awesome.scss │ │ ├── _fonts.scss │ │ ├── main.scss │ │ └── _colors.scss │ └── layouts │ │ └── body │ │ ├── footer.html │ │ └── body.html ├── api │ ├── userLog │ │ ├── utils.js │ │ └── userLog.js │ ├── stat │ │ ├── utils.js │ │ ├── stats.js │ │ ├── server │ │ │ └── publications.js │ │ └── methods.js │ ├── org │ │ ├── orgs.js │ │ ├── utils.js │ │ └── server │ │ │ └── publications.js │ ├── resource │ │ └── resources.js │ ├── cluster │ │ └── clusters │ │ │ ├── clusters.js │ │ │ └── server │ │ │ └── publications.js │ ├── webhook │ │ ├── webhookLogs.js │ │ └── server │ │ │ └── publications.js │ ├── deployables │ │ ├── channels │ │ │ ├── channels.js │ │ │ ├── deployableVersions.js │ │ │ └── server │ │ │ │ └── publications.js │ │ ├── subscriptions │ │ │ ├── subscriptions.js │ │ │ └── server │ │ │ │ └── publications.js │ │ └── groups │ │ │ ├── groups.js │ │ │ └── server │ │ │ └── publications.js │ ├── resourceYamlHist │ │ ├── resourceYamlHist.js │ │ ├── server │ │ │ └── publications.js │ │ └── methods.js │ ├── externalApplications │ │ ├── externalApplications.js │ │ └── server │ │ │ └── publications.js │ ├── lib │ │ ├── log.js │ │ ├── login.js │ │ ├── graphql.js │ │ └── ghe.js │ ├── message │ │ ├── server │ │ │ └── publications.js │ │ └── messages.js │ └── user │ │ ├── server │ │ └── publications.js │ │ └── methods.js └── startup │ ├── client │ ├── react.js │ ├── popper.js │ ├── main.html │ └── toastr.js │ ├── both │ └── index.js │ └── server │ └── register-api.js ├── .markdownlintrc ├── .meteorignore ├── public ├── img │ ├── Octocat.png │ ├── GitHub_Logo.png │ ├── container-service-logo.svg │ ├── bitbucket.svg │ ├── razeedash.svg │ ├── container-deploy.svg │ └── container-cluster.svg ├── favicon │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── site.webmanifest │ ├── browserconfig.xml │ └── safari-pinned-tab.svg └── fonts │ ├── IBMPlexMono-Bold-V01.woff │ ├── IBMPlexMono-Light-V01.woff │ ├── IBMPlexMono-Text-V01.woff │ ├── IBMPlexMono-Thin-V01.woff │ ├── IBMPlexMono-Italic-V01.woff │ ├── IBMPlexMono-Medium-V01.woff │ ├── IBMPlexMono-Regular-V01.woff │ ├── IBMPlexMono-SemiBold-V01.woff │ ├── IBMPlexSans-Bold-V01.1.woff │ ├── IBMPlexSans-Italic-V01.1.woff │ ├── IBMPlexSans-Light-V01.1.woff │ ├── IBMPlexSans-Medium-V01.1.woff │ ├── IBMPlexSans-Text-V01.1.woff │ ├── IBMPlexSans-Thin-V01.1.woff │ ├── IBMPlexMono-BoldItalic-V01.woff │ ├── IBMPlexMono-ExtraLight-V01.woff │ ├── IBMPlexMono-TextItalic-V01.woff │ ├── IBMPlexMono-ThinItalic-V01.woff │ ├── IBMPlexSans-Regular-V01.1.woff │ ├── IBMPlexSans-SemiBold-V01.1.woff │ ├── IBMPlexMono-LightItalic-V01.woff │ ├── IBMPlexMono-MediumItalic-V01.woff │ ├── IBMPlexSans-BoldItalic-V01.1.woff │ ├── IBMPlexSans-ExtraLight-V01.1.woff │ ├── IBMPlexSans-LightItalic-V01.1.woff │ ├── IBMPlexSans-TextItalic-V01.1.woff │ ├── IBMPlexSans-ThinItalic-V01.1.woff │ ├── IBMPlexMono-SemiBoldItalic-V01.woff │ ├── IBMPlexSans-MediumItalic-V01.1.woff │ ├── IBMPlexMono-ExtraLightItalic-V01.woff │ ├── IBMPlexSans-ExtraLightItalic-V01.1.woff │ └── IBMPlexSans-SemiBoldItalic-V01.1.woff ├── .yamllint ├── .gitignore ├── .coverage.json ├── packages ├── razee-mongo-coonfig │ ├── server │ │ └── index.js │ └── package.js ├── ghe │ ├── ghe_configure.js │ ├── ghe_configure.html │ ├── ghe.js │ ├── ghe_login_button.css │ ├── package.js │ └── ghe_client.js └── bitbucket │ ├── bitbucket_configure.js │ ├── bitbucket_configure.html │ ├── bitbucket_login_button.css │ ├── accounts-bitbucket.js │ ├── package.js │ └── bitbucket_client.js ├── private ├── README.md └── scripts │ ├── build_app.sh │ ├── clean-final.sh │ └── run_app.sh ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── stale.yml ├── .eslintrc.json ├── client ├── main.scss ├── main.js └── head.html ├── server └── main.js ├── Dockerfile └── .travis.yml /.eslintignore: -------------------------------------------------------------------------------- 1 | .gitignore -------------------------------------------------------------------------------- /.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !.build 3 | -------------------------------------------------------------------------------- /.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.10.2 2 | -------------------------------------------------------------------------------- /.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /imports/ui/components/icons/index.js: -------------------------------------------------------------------------------- 1 | import './component.html'; 2 | -------------------------------------------------------------------------------- /.markdownlintrc: -------------------------------------------------------------------------------- 1 | { 2 | "default": "true", 3 | "MD013": null 4 | } -------------------------------------------------------------------------------- /.meteorignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | coverage/ 3 | services/ 4 | kubernetes/ 5 | -------------------------------------------------------------------------------- /public/img/Octocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/img/Octocat.png -------------------------------------------------------------------------------- /public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/favicon.ico -------------------------------------------------------------------------------- /public/img/GitHub_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/img/GitHub_Logo.png -------------------------------------------------------------------------------- /public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Bold-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Bold-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Light-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Light-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Text-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Text-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Thin-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Thin-V01.woff -------------------------------------------------------------------------------- /public/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /public/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Italic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Italic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Medium-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Medium-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Regular-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-Regular-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-SemiBold-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-SemiBold-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Bold-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Bold-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Italic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Italic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Light-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Light-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Medium-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Medium-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Text-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Text-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Thin-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Thin-V01.1.woff -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | extends: relaxed 2 | 3 | rules: 4 | line-length: 5 | max: 180 6 | level: warning 7 | empty-lines: 8 | max: 1 9 | -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-BoldItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-BoldItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-ExtraLight-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-ExtraLight-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-TextItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-TextItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-ThinItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-ThinItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-Regular-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-Regular-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-SemiBold-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-SemiBold-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-LightItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-LightItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-MediumItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-MediumItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-BoldItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-BoldItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-ExtraLight-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-ExtraLight-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-LightItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-LightItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-TextItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-TextItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-ThinItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-ThinItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-SemiBoldItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-SemiBoldItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-MediumItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-MediumItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-ExtraLightItalic-V01.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexMono-ExtraLightItalic-V01.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-ExtraLightItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-ExtraLightItalic-V01.1.woff -------------------------------------------------------------------------------- /public/fonts/IBMPlexSans-SemiBoldItalic-V01.1.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/razee-io/Razeedash/HEAD/public/fonts/IBMPlexSans-SemiBoldItalic-V01.1.woff -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .build 3 | build-tools/ 4 | armada-config/ 5 | npm-debug.log 6 | .idea/ 7 | .vscode/launch.json 8 | .DS_Store 9 | .nyc_output/ 10 | .coverage/ 11 | .vscode/settings.json 12 | dev-envvars.sh 13 | .vscode 14 | .nvmrc 15 | -------------------------------------------------------------------------------- /imports/api/userLog/utils.js: -------------------------------------------------------------------------------- 1 | import { UserLog } from './userLog.js'; 2 | 3 | const logUserAction = function(userid, action, message) { 4 | UserLog.insert({ userid: userid, action: action, message: message, created: new Date() }); 5 | }; 6 | 7 | export { logUserAction }; -------------------------------------------------------------------------------- /public/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /.coverage.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": [ 3 | "**/*.test.js", 4 | "**/*.tests.js" 5 | ], 6 | "include": [ 7 | "**/*.js" 8 | ], 9 | "remap": { 10 | "format": ["html", "clover", "cobertura", "json", "json-summary", "lcovonly", "teamcity", "text", "text-summary"] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /imports/api/stat/utils.js: -------------------------------------------------------------------------------- 1 | import { Channels } from '../deployables/channels/channels.js'; 2 | import { Stats } from './stats.js'; 3 | 4 | export const updateDeployablesCountStat = (orgId)=>{ 5 | const count = Channels.find({org_id: orgId}).count(); 6 | Stats.upsert({ orgId }, { $set: { deployablesCount: count } }); 7 | }; 8 | -------------------------------------------------------------------------------- /imports/api/userLog/userLog.js: -------------------------------------------------------------------------------- 1 | // Colletion to hold all user log entries 2 | 3 | import { Mongo } from 'meteor/mongo'; 4 | 5 | export const UserLog = new Mongo.Collection('user_log'); 6 | 7 | UserLog.deny({ 8 | insert() { return true; }, 9 | update() { return true; }, 10 | remove() { return true; }, 11 | }); 12 | -------------------------------------------------------------------------------- /.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | 10qrf3e18ypdsynb831v 8 | -------------------------------------------------------------------------------- /packages/razee-mongo-coonfig/server/index.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | // ex: export MONGO_OPTIONS='{"ssl": true}' 4 | 5 | const mongoOptionStr = process.env.MONGO_OPTIONS; 6 | if (typeof mongoOptionStr !== 'undefined') { 7 | const mongoOptions = JSON.parse(mongoOptionStr); 8 | Mongo.setConnectionOptions(mongoOptions); 9 | } 10 | -------------------------------------------------------------------------------- /private/README.md: -------------------------------------------------------------------------------- 1 | **private folder** 2 | 3 | All files inside a top-level directory called `private/` are only accessible from server code and can be loaded via the [`Assets`](http://docs.meteor.com/#/full/assets_getText) API. This can be used for private data files and any files that are in your project directory that you don't want to be accessible from the outside. 4 | -------------------------------------------------------------------------------- /imports/startup/client/react.js: -------------------------------------------------------------------------------- 1 | import { FlowRouter } from 'meteor/kadira:flow-router'; 2 | import { Session } from 'meteor/session'; 3 | import _ from 'lodash'; 4 | 5 | FlowRouter.pathFor = (pathDef, fields = {}, queryParams)=>{ 6 | if(!_.get(fields, 'baseOrgName')){ 7 | _.set(fields, 'baseOrgName', Session.get('currentOrgName')); 8 | } 9 | return FlowRouter.path(pathDef, fields, queryParams); 10 | }; 11 | -------------------------------------------------------------------------------- /packages/ghe/ghe_configure.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | Template.configureLoginServiceDialogForGhe.helpers({ 4 | siteUrl: function() { 5 | return Meteor.absoluteUrl(); 6 | } 7 | }); 8 | 9 | Template.configureLoginServiceDialogForGhe.fields = () => [ 10 | { property: 'gheURL', label: 'GitHub Enterprise URL' }, 11 | { property: 'clientId', label: 'Client ID' }, 12 | { property: 'secret', label: 'Client Secret' } 13 | ]; 14 | -------------------------------------------------------------------------------- /packages/bitbucket/bitbucket_configure.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | Template.configureLoginServiceDialogForBitbucket.helpers({ 3 | // Bitbucket doesn't recognize localhost as a domain name 4 | siteUrl() { 5 | return Meteor.absoluteUrl({replaceLocalhost: true}); 6 | } 7 | }); 8 | 9 | Template.configureLoginServiceDialogForBitbucket.fields = function () { 10 | return [ 11 | {property: 'consumerKey', label: 'Key'}, 12 | {property: 'secret', label: 'Secret'} 13 | ]; 14 | }; 15 | -------------------------------------------------------------------------------- /packages/razee-mongo-coonfig/package.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | // based off of the mongo-config from https://github.com/RocketChat/Rocket.Chat/tree/develop/packages/rocketchat-mongo-config 3 | 4 | Package.describe({ 5 | name: 'razeeio:mongo-config', 6 | version: '0.1.0', 7 | summary: 'Set mongo connection string options using an env variable' 8 | }); 9 | 10 | Package.onUse(function(api) { 11 | api.use([ 12 | 'ecmascript', 13 | 'mongo' 14 | ]); 15 | 16 | api.mainModule('server/index.js', 'server'); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/bitbucket/bitbucket_configure.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/index.js: -------------------------------------------------------------------------------- 1 | 2 | import './channels'; 3 | import './channel'; 4 | import './versions'; 5 | import './version'; 6 | import './clusterGroups'; 7 | import './clusterGroup'; 8 | import '../../components/icons'; 9 | import './page.html'; 10 | import './page.scss'; 11 | import { Template } from 'meteor/templating'; 12 | import { FlowRouter } from 'meteor/kadira:flow-router'; 13 | 14 | Template.page_deployables.helpers({ 15 | isActiveTab(tabId) { 16 | if ( FlowRouter.getParam('tabId') === tabId ) { 17 | return 'active'; 18 | } 19 | return false; 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /packages/ghe/ghe_configure.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true, 5 | "node": true, 6 | "jquery": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "parserOptions": { 10 | "sourceType": "module", 11 | "ecmaVersion": 2018 12 | }, 13 | "rules": { 14 | "indent": [ 15 | "error", 16 | 4 17 | ], 18 | "linebreak-style": [ 19 | "error", 20 | "unix" 21 | ], 22 | "quotes": [ 23 | "error", 24 | "single" 25 | ], 26 | "semi": [ 27 | "error", 28 | "always" 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | 1.4.3-split-account-service-packages 17 | 1.5-add-dynamic-import-package 18 | 1.7-split-underscore-from-meteor-base 19 | 1.8.3-split-jquery-from-blaze 20 | -------------------------------------------------------------------------------- /client/main.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | @import "{}/imports/ui/style/main.scss"; 17 | -------------------------------------------------------------------------------- /imports/ui/components/loading/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | -------------------------------------------------------------------------------- /imports/ui/components/noClusters/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | -------------------------------------------------------------------------------- /imports/ui/components/portlet/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | -------------------------------------------------------------------------------- /imports/ui/pages/not-found/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './page.scss'; 18 | import './page.html'; 19 | -------------------------------------------------------------------------------- /imports/ui/pages/not-found/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .not-found-image > img { 18 | width:200px; 19 | } 20 | -------------------------------------------------------------------------------- /imports/startup/client/popper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import Popper from 'popper.js'; 18 | window.Popper = Popper; 19 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 30 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - bug 8 | - enhancement 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /packages/ghe/ghe.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | Accounts.oauth.registerService('ghe'); 4 | 5 | if (Meteor.isClient) { 6 | Meteor.loginWithGhe = function(options, callback) { 7 | // support a callback without options 8 | if (!callback && typeof options === 'function') { 9 | callback = options; 10 | options = null; 11 | } 12 | 13 | const credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback); 14 | Ghe.requestCredential(options, credentialRequestCompleteCallback); 15 | }; 16 | } else { 17 | Accounts.addAutopublishFields({ 18 | forLoggedInUser: ['services.ghe'], 19 | forOtherUsers: ['services.ghe.username'] 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/updaterMessages/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.scss'; 18 | import './component.html'; 19 | -------------------------------------------------------------------------------- /imports/startup/client/main.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /private/scripts/build_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### 4 | # Copyright 2019 IBM Corp. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ## 18 | 19 | set -e 20 | 21 | cd /app 22 | cd /app/programs/server/ 23 | npm install 24 | cd /app -------------------------------------------------------------------------------- /packages/bitbucket/bitbucket_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-bitbucket { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAtFBMVEUAAAABLVoAKVABL14AKlQCLFoBMWIAKGkAECkBMWIBLl0AGjQAI0MAAAABL14ALV0AIUQCMWQBMWIALVsAK1cBMGIAJkoAH0AALFgAKVEAAAAALFcAAAABMGEBL2AALV0AMGICM2UBMWICLlwAJk8AJEoAIkYAKVQCKVMBMWICLFoAKFACK1cAJFIBMWMBMWIAEhoCMGABMmMAJk8BNGgBN28BMWIBMmUBOXIBNWsBM2YBM2bFbbQdAAAANHRSTlMAhkLDY5P3AQP8sTMjCbadK57Qf2jkOxRIWAVwFd/XdWuc3JdSRj5favGLM4Ec8OwdrOE9iVbAlQAAAMxJREFUGNMdjFe2gzAMRAXYwKH3vJDe83qTLdv7X1jkjL7uPZqBBGDq6/ZwaNsgnD0Wla6C3X6/C7I4egeAD0PDegZI18vY1CxW1pEbt9tNTA7fWLwQolXGKIuIgkWjrUMK+i90qEMWiyN3xDU8a8TXgkVaWTv+aGoihV0JHKmQLrfh+m1VxpjwqlXxcBuNoiUj30V2pLXuTueZMYWFXOX5NOW5qD+fIonUXybl79FuSl9IoDfqGXPyk/xSZJqcczpqPHs5/4v7XYSl5wdfIBodShj2/wAAAABJRU5ErkJggg==); 3 | } -------------------------------------------------------------------------------- /public/img/container-service-logo.svg: -------------------------------------------------------------------------------- 1 | Group 32 -------------------------------------------------------------------------------- /imports/ui/components/historyDropdown/component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .dropdown-header i { 18 | position:absolute; 19 | left:9px; 20 | display:inline-block; 21 | } 22 | -------------------------------------------------------------------------------- /client/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Client entry point, imports all client code 18 | 19 | import '/imports/startup/client'; 20 | import '/imports/startup/both'; 21 | import 'bootstrap'; 22 | -------------------------------------------------------------------------------- /imports/ui/pages/org/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #editor { 18 | height: 500px; 19 | } 20 | 21 | .varNamesCard{ 22 | tr:first-child td{ 23 | border:none; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /imports/ui/pages/userprofile/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .refresh-btn{ 18 | cursor:pointer; 19 | } 20 | 21 | .org-image { 22 | width: 25px; 23 | height: 25px; 24 | } 25 | -------------------------------------------------------------------------------- /imports/ui/components/addCluster/component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #add-cluster-modal { 18 | .copy-button { 19 | position: absolute; 20 | bottom: 0; 21 | right: 10px; 22 | } 23 | } -------------------------------------------------------------------------------- /imports/ui/components/cluster/updaterMessages/component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | td > pre { 18 | white-space: pre-wrap; 19 | word-wrap: break-word; 20 | } 21 | 22 | .message_cell { 23 | width: 90%; 24 | } 25 | -------------------------------------------------------------------------------- /imports/ui/style/toastr.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #toast-container{ 18 | pointer-events:none; 19 | } 20 | .toast{ 21 | opacity:0.985 !important; 22 | margin:6px auto !important; 23 | pointer-events: all; 24 | } 25 | -------------------------------------------------------------------------------- /imports/ui/components/kindIcon/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /imports/startup/both/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Import modules used by both client and server through a single index entry point 18 | // e.g. useraccounts configuration file. 19 | 20 | require('moment-duration-format')(require('moment')); 21 | -------------------------------------------------------------------------------- /imports/ui/layouts/body/footer.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /imports/ui/components/loading/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | -------------------------------------------------------------------------------- /public/img/bitbucket.svg: -------------------------------------------------------------------------------- 1 | bitbucket-icon-gradient-blue -------------------------------------------------------------------------------- /imports/ui/components/breadcrumbs/breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | ol{ 18 | background: transparent; 19 | 20 | li{ 21 | display: inline-block; 22 | 23 | &:not(:first-of-type):before{ 24 | content: ">"; 25 | padding:0 5px; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /imports/api/org/orgs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Orgs = new Mongo.Collection('orgs'); 20 | 21 | Orgs.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /packages/ghe/ghe_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-ghe { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJGBYxHYxl31wAAAHpSURBVDjLpZI/aFNRFMZ/973bJqGRPopV4qNq/+SpTYnWRhCKilShg9BGcHOM+GfQoZuLk4iLgw4qZNBaHLuIdBNHl7Ta1qdNFI3SihnaNG1MpH3vuiQYQnwZvHCG893zffc751z4z6PX5T5gA1DAKnAaOAQEgAfAVeCpl+CeCrlRuEC6maO4h0A1wl4tPAHMqNUthvrDdHYY7A3t4rDVjeO6rBU2FaABM1WCrBNoi48Mi+nH9yj+KtPibAKwJXfQ5vcRG7soUnYmWEuQgAEIYBv4cGpoILI0Z4tyYYPegS6UguyijZQ6J45GSNmZHzUcJYD2ii2Ajv7efZ8WZ6ZwXFj79hXpayW4O0SL1Nl/8jzZlZ9dQLFS70pgvZKIyGD0yvu5eRmMnrk1PjI81ir1qBACTdPevXj95mVuNX8XKDQc/+T334bZZ104cvzYw2s3J3qAL5WXSsDbf61NNMBu+wOBs+VSyQ84Nfhg028ZGx3/qyy0lC7lgi7lghBitoon03lvB8l0/k7Wnk+8mny0cyXzEcfZxgwfZPTyRMHsOzAFXE9YhtNQIJnOx4FpJXT1eSkn2g0frqMoFrfoCXcqlCOAGwnLuO/l4JymcWl5uRxzXUKghBAiZ5r+WaV4lrCM555zqO+x2d0ftGmpiA/0k70AAAAASUVORK5CYII=); 3 | } 4 | -------------------------------------------------------------------------------- /imports/ui/pages/clusters/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .clusterInfoDetails{ 18 | font-size:70%; 19 | } 20 | .sortable-header { 21 | cursor: pointer; 22 | } 23 | 24 | .cluster_icon_row .fa { 25 | font-size: 1.5em; 26 | line-height: 1em; 27 | vertical-align: middle; 28 | } 29 | -------------------------------------------------------------------------------- /imports/api/stat/stats.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Stats = new Mongo.Collection('resourceStats'); 20 | 21 | Stats.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/resource/resources.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Resources = new Mongo.Collection('resources'); 20 | 21 | Resources.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); -------------------------------------------------------------------------------- /imports/ui/pages/deployables/subscriptions/groupSelect.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 24 | -------------------------------------------------------------------------------- /private/scripts/clean-final.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### 4 | # Copyright 2019 IBM Corp. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ## 18 | 19 | set -e 20 | 21 | npm cache clear --force 22 | 23 | rm -rf $METEORD_DIR/bin /usr/share/doc /usr/share/man /tmp/* /var/cache/apk/* \ 24 | /usr/share/man /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp #/usr/lib/node_modules/npm 25 | -------------------------------------------------------------------------------- /imports/api/cluster/clusters/clusters.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Clusters = new Mongo.Collection('clusters'); 20 | 21 | Clusters.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/webhook/webhookLogs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const WebhookLogs = new Mongo.Collection('webhookLogs'); 20 | 21 | WebhookLogs.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/deployables/channels/channels.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Channels = new Mongo.Collection('channels'); 20 | 21 | Channels.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /imports/api/deployables/subscriptions/subscriptions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const Subscriptions = new Mongo.Collection('subscriptions'); 20 | 21 | Subscriptions.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /server/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Server entry point, imports all server code 18 | import { Accounts } from 'meteor/accounts-base'; 19 | 20 | if ( process.env.OAUTH_SECRET_KEY ) { 21 | Accounts.config({ oauthSecretKey: process.env.OAUTH_SECRET_KEY }); 22 | } 23 | 24 | import '/imports/startup/server'; 25 | import '/imports/startup/both'; 26 | -------------------------------------------------------------------------------- /imports/api/deployables/groups/groups.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | // import { Meteor } from 'meteor/meteor'; 19 | 20 | export const Groups = new Mongo.Collection('groups'); 21 | 22 | Groups.deny({ 23 | insert() { return true; }, 24 | update() { return true; }, 25 | remove() { return true; }, 26 | }); 27 | -------------------------------------------------------------------------------- /imports/api/deployables/channels/deployableVersions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const DeployableVersions = new Mongo.Collection('deployableVersions'); 20 | 21 | DeployableVersions.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/resourceYamlHist/resourceYamlHist.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const ResourceYamlHist = new Mongo.Collection('resourceYamlHist'); 20 | 21 | ResourceYamlHist.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/stat/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Stats } from '../stats.js'; 19 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 20 | 21 | Meteor.publish('resourceStats', function(orgId){ 22 | requireOrgAccess(orgId); 23 | return Stats.find({org_id: orgId}); 24 | }); 25 | -------------------------------------------------------------------------------- /imports/api/externalApplications/externalApplications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Mongo } from 'meteor/mongo'; 18 | 19 | export const ExternalApplications = new Mongo.Collection('externalApplications'); 20 | 21 | ExternalApplications.deny({ 22 | insert() { return true; }, 23 | update() { return true; }, 24 | remove() { return true; }, 25 | }); 26 | -------------------------------------------------------------------------------- /imports/ui/components/commitLink/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /imports/ui/components/breadcrumbs/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /imports/api/lib/log.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | const winston = require('winston'); 18 | 19 | const log = winston.createLogger({ 20 | level: (process.env.LOG_LEVEL || 'info'), 21 | format: winston.format.json(), 22 | defaultMeta: { service: 'razeedash' }, 23 | transports: [ 24 | new winston.transports.Console(), 25 | ], 26 | }); 27 | 28 | export default log; 29 | -------------------------------------------------------------------------------- /private/scripts/run_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ### 4 | # Copyright 2019 IBM Corp. All Rights Reserved. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | ## 18 | 19 | set -e 20 | 21 | # Set a delay to wait to start meteor container 22 | if [[ $DELAY ]]; then 23 | echo "Delaying startup for $DELAY seconds" 24 | sleep $DELAY 25 | fi 26 | 27 | # Honour already existing PORT setup 28 | export PORT=${PORT:-3000} 29 | export NODE_ENV=production 30 | cd /app 31 | 32 | echo "=> Starting meteor app on port:$PORT" 33 | node main.js 34 | -------------------------------------------------------------------------------- /packages/bitbucket/accounts-bitbucket.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | // based off of https://github.com/meteor/meteor/blob/devel/packages/accounts-github/github.js 3 | 4 | Accounts.oauth.registerService('bitbucket'); 5 | 6 | if (Meteor.isClient) { 7 | const loginWithBitbucket = (options, callback) => { 8 | // support a callback without options 9 | if (! callback && typeof options === 'function') { 10 | callback = options; 11 | options = null; 12 | } 13 | 14 | const credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback); 15 | Bitbucket.requestCredential(options, credentialRequestCompleteCallback); 16 | }; 17 | Accounts.registerClientLoginFunction('bitbucket', loginWithBitbucket); 18 | Meteor.loginWithBitbucket = (...args) => Accounts.applyLoginFunction('bitbucket', args); 19 | } else { 20 | Accounts.addAutopublishFields({ 21 | forLoggedInUser: ['services.bitbucket'], 22 | forOtherUsers: ['services.bitbucket.username'] 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /imports/ui/components/kindIcon/component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .kube-kind-icon { 18 | width: 2em; 19 | font-family: ibm-mono; 20 | } 21 | 22 | .kube-kind-icon::after { 23 | content: attr(shortTitle); 24 | } 25 | 26 | .kube-kind-icon:hover, .kube-kind-icon:active { 27 | width: 8.5em; 28 | transition: width 0.3s ease; 29 | } 30 | 31 | .kube-kind-icon:hover::after,.kube-kind-icon:active::after{ 32 | content: attr(title); 33 | } 34 | -------------------------------------------------------------------------------- /imports/api/deployables/groups/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { Groups } from '../groups'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | 22 | Meteor.publish('groups', function(org_id) { 23 | check( org_id, String ); 24 | requireOrgAccess(org_id); 25 | return Groups.find({ org_id: org_id }, {pollingIntervalMs: 1000}); 26 | }); 27 | -------------------------------------------------------------------------------- /imports/ui/pages/not-found/page.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | -------------------------------------------------------------------------------- /packages/ghe/package.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | Package.describe({ 4 | summary: 'Github Enterprise OAuth flow', 5 | version: '3.0.0', 6 | name: 'ibmcloud:accounts-ghe', 7 | documentation: null 8 | }); 9 | 10 | Package.onUse(function(api) { 11 | api.use('accounts-base', ['client', 'server']); 12 | api.use('ecmascript'); 13 | api.imply('accounts-base', ['client', 'server']); 14 | api.use('accounts-oauth', ['client', 'server']); 15 | api.use('oauth2', ['client', 'server']); 16 | api.use('oauth', ['client', 'server']); 17 | api.use('http', ['client', 'server']); 18 | api.use('underscore', 'client'); 19 | api.use('templating', 'client'); 20 | api.use('random', 'client'); 21 | api.use('service-configuration', ['client', 'server']); 22 | api.addFiles('ghe_login_button.css', 'client'); 23 | api.addFiles('ghe.js'); 24 | api.export('Ghe'); 25 | api.addFiles( 26 | ['ghe_configure.html', 'ghe_configure.js'], 27 | 'client'); 28 | api.addFiles('ghe_server.js', 'server'); 29 | api.addFiles('ghe_client.js', 'client'); 30 | }); 31 | -------------------------------------------------------------------------------- /imports/ui/components/activeDeployments/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | -------------------------------------------------------------------------------- /imports/api/externalApplications/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { ExternalApplications } from '../externalApplications.js'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | 22 | Meteor.publish('externalApplications', function(orgId) { 23 | check( orgId, String ); 24 | requireOrgAccess(orgId); 25 | return ExternalApplications.find({ org_id: orgId }); 26 | }); 27 | -------------------------------------------------------------------------------- /imports/api/message/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Messages } from '../messages.js'; 19 | import { check } from 'meteor/check'; 20 | import moment from 'moment'; 21 | 22 | Meteor.publish('messages.byCluster', function(clusterId) { 23 | check( clusterId, String ); 24 | return Messages.find({ cluster_id: clusterId, updated: { $gte: new moment().subtract(1, 'hour').toDate() } }, { limit: 100, sort: { updated: -1 } }); 25 | }); 26 | -------------------------------------------------------------------------------- /imports/api/webhook/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { WebhookLogs } from '../webhookLogs.js'; 20 | 21 | Meteor.publish('webhook_log.mostRecentByClusterIdWebhookUrl', (clusterId, webhookId)=>{ 22 | check( clusterId, String ); 23 | check( webhookId, String ); 24 | return WebhookLogs.find({ cluster_id: clusterId, webhook_id: webhookId }, { limit: 10, sort: { created: -1 } } ); 25 | }); 26 | -------------------------------------------------------------------------------- /imports/ui/pages/razeeWelcome/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .action-button { 18 | width: 65px; 19 | } 20 | 21 | .git-img { 22 | font-size: 1.2rem; 23 | } 24 | 25 | .refresh-btn{ 26 | cursor:pointer; 27 | } 28 | 29 | .org-image { 30 | width: 25px; 31 | height: 25px; 32 | } 33 | .org-link:hover{ 34 | text-decoration: none; 35 | } 36 | .img-thumbnail org-image my-1 37 | 38 | .grayscale{ 39 | filter:grayscale(100%); 40 | } 41 | 42 | .modal-dialog, .modal-content { 43 | border-radius: 0%; 44 | } 45 | -------------------------------------------------------------------------------- /imports/ui/components/noClusters/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 28 | -------------------------------------------------------------------------------- /public/img/razeedash.svg: -------------------------------------------------------------------------------- 1 | razeeFlag -------------------------------------------------------------------------------- /imports/ui/components/strDiff/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { diffLines, formatLines } from 'unidiff'; 3 | import { parseDiff, Diff, Hunk } from 'react-diff-view'; 4 | import 'react-diff-view/style/index.css'; 5 | 6 | export class StrDiff extends React.Component { 7 | render(){ 8 | var oldStr = this.props.oldStr || ''; 9 | var newStr = this.props.newStr || ''; 10 | if(_.isObject(oldStr)){ 11 | oldStr = JSON.stringify(oldStr, null, 2); 12 | } 13 | if(_.isObject(oldStr)){ 14 | newStr = JSON.stringify(newStr, null, 2); 15 | } 16 | 17 | var diffText = formatLines(diffLines(oldStr, newStr), { context: 3 }); 18 | var files = parseDiff(diffText); 19 | 20 | return ( 21 |
22 | {files.map(({oldRevision, newRevision, type, hunks})=>{ 23 | return 24 | {hunks => hunks.map(hunk => )} 25 | ; 26 | })} 27 |
28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /imports/startup/client/toastr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import toastr from 'toastr'; 18 | 19 | toastr.options = { 20 | 'closeButton': true, 21 | 'debug': false, 22 | 'newestOnTop': true, 23 | 'progressBar': false, 24 | 'positionClass': 'toast-bottom-right', 25 | 'preventDuplicates': false, 26 | 'onclick': null, 27 | 'showDuration': '300', 28 | 'hideDuration': '1000', 29 | 'timeOut': '15000', 30 | 'extendedTimeOut': '1000', 31 | 'showEasing': 'swing', 32 | 'hideEasing': 'linear', 33 | 'showMethod': 'fadeIn', 34 | 'hideMethod': 'fadeOut' 35 | }; 36 | -------------------------------------------------------------------------------- /imports/ui/components/clustersByKubeVersion/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 36 | -------------------------------------------------------------------------------- /packages/bitbucket/package.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | // This package is a modification of code from https://github.com/Tarang/Meteor-Accounts-Bitbucket 4 | // and https://github.com/meteor/meteor/tree/devel/packages/github-oauth 5 | 6 | Package.describe({ 7 | name: 'bitbucket', 8 | version: '0.1.0', 9 | summary: 'Login service for Bitbucket accounts', 10 | }); 11 | 12 | Package.onUse(function(api) { 13 | api.versionsFrom('1.8.1'); 14 | api.use('ecmascript'); 15 | api.use('oauth2', ['client', 'server']); 16 | api.use('oauth', ['client', 'server']); 17 | api.use('random', 'client'); 18 | api.use('service-configuration', ['client', 'server']); 19 | 20 | api.addFiles( ['bitbucket_configure.html', 'bitbucket_configure.js'], 'client'); 21 | api.addFiles('bitbucket_server.js', 'server'); 22 | api.addFiles('bitbucket_client.js', 'client'); 23 | 24 | api.use('accounts-base', ['client', 'server']); 25 | api.imply('accounts-base', ['client', 'server']); 26 | api.use('accounts-oauth', ['client', 'server']); 27 | 28 | api.use('http', ['client', 'server']); 29 | api.use('templating', 'client'); 30 | 31 | api.addFiles('bitbucket_login_button.css', 'client'); 32 | api.addFiles('accounts-bitbucket.js'); 33 | 34 | api.export('Bitbucket'); 35 | }); 36 | -------------------------------------------------------------------------------- /imports/ui/components/portlet/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 34 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/channels/helpModal.html: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/subscriptions/groupSelect.js: -------------------------------------------------------------------------------- 1 | 2 | import './groupSelect.html'; 3 | import { Template } from 'meteor/templating'; 4 | import { Meteor } from 'meteor/meteor'; 5 | import { Session } from 'meteor/session'; 6 | // eslint-disable-next-line no-unused-vars 7 | import selectpicker from 'bootstrap-select'; 8 | 9 | Template.group_select.onRendered( function() { 10 | $('.js-group-select').selectpicker(); 11 | }); 12 | Template.group_select.onCreated( function() { 13 | this.autorun(()=>{ 14 | Meteor.subscribe('groups', Session.get('currentOrgId')); 15 | }); 16 | }); 17 | 18 | Template.group_select.events({ 19 | 'click .js-add-new-group'(e){ 20 | e.preventDefault(); 21 | var $modal = $('.js-add-group-modal'); 22 | $modal.modal('show'); 23 | return false; 24 | }, 25 | }); 26 | 27 | Template.group_option.helpers({ 28 | selectStatus() { 29 | // when editing a subscription, this puts checks on the 30 | // items in the dropdown that are already selected 31 | let selected = ''; 32 | if(this.subscription && this.subscription.groups) { 33 | this.subscription.groups.map( (group) => { 34 | if(group === this.group.name) { 35 | selected='selected'; 36 | } 37 | }); 38 | } 39 | return selected; 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /imports/api/deployables/channels/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { Channels } from '../channels'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | import { DeployableVersions } from '../deployableVersions'; 22 | 23 | Meteor.publish('channels', function(orgId) { 24 | check( orgId, String ); 25 | requireOrgAccess(orgId); 26 | return Channels.find({ org_id: orgId }, {pollingIntervalMs: 1000}); 27 | }); 28 | 29 | Meteor.publish('deployableVersions', function(orgId) { 30 | check( orgId, String ); 31 | requireOrgAccess(orgId); 32 | return DeployableVersions.find({ org_id: orgId }, {pollingIntervalMs: 1000}); 33 | }); 34 | -------------------------------------------------------------------------------- /imports/ui/pages/welcome/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .animated { 18 | -webkit-animation-duration: 3s; 19 | animation-duration: 3s; 20 | -webkit-animation-fill-mode: both; 21 | animation-fill-mode: both; 22 | border: 6px solid rgb(245, 247, 250); 23 | padding: 0.25rem; 24 | } 25 | 26 | @-webkit-keyframes fadeIn { 27 | 0% {opacity: 0;} 28 | 100% {opacity: 1;} 29 | } 30 | 31 | @keyframes fadeIn { 32 | 0% {opacity: 0;} 33 | 100% {opacity: 1;} 34 | } 35 | 36 | .fadeIn { 37 | -webkit-animation-name: fadeIn; 38 | animation-name: fadeIn; 39 | } 40 | 41 | .plot-container.plotly { 42 | .svg-container{ 43 | width: 100% !important; 44 | .main-svg { 45 | width: 100%; 46 | } 47 | } 48 | } 49 | 50 | .container { 51 | font-family: 'IBM Plex Sans'; 52 | } 53 | -------------------------------------------------------------------------------- /imports/ui/pages/cluster/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .clusterVersionInfo { 18 | margin-top: -10px; 19 | overflow-y: scroll; 20 | } 21 | 22 | .removeWebhookBtn{ 23 | color:red; 24 | font-size:160%; 25 | cursor:pointer; 26 | line-height:100%; 27 | 28 | &:hover{ 29 | color:#c00; 30 | } 31 | } 32 | 33 | .showWebhookLogDetailsBtn{ 34 | background: #eee; 35 | } 36 | .webhookLogErrorIcon{ 37 | color:#d00; 38 | } 39 | .webhookLogSuccessIcon{ 40 | color:#0a0; 41 | } 42 | 43 | .clusterInfo { 44 | align-items:center; 45 | justify-content: flex-start; 46 | 47 | .fieldValue{ 48 | width:100%; 49 | } 50 | } 51 | 52 | .bd-clipboard { 53 | position: relative; 54 | float: right; 55 | .highlight { 56 | margin-top: 0; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/page.html: -------------------------------------------------------------------------------- 1 | 38 | -------------------------------------------------------------------------------- /imports/api/org/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Orgs } from './orgs.js'; 19 | import { localUser } from '/imports/api/lib/login.js'; 20 | import _ from 'lodash'; 21 | 22 | export const requireOrgAccess = (orgId)=>{ 23 | let accessibleOrgNames; 24 | if(localUser()) { 25 | accessibleOrgNames = _.map(Orgs.find({ type: 'local' }, { name: 1 }).fetch(), 'name'); 26 | } else { 27 | const accessibleOrgs = _.get(Meteor.user(), 'orgs', []); 28 | accessibleOrgNames = _.map(accessibleOrgs, 'name'); 29 | } 30 | 31 | let org = Orgs.findOne({_id: orgId}); 32 | if(org && _.includes(accessibleOrgNames, org.name)){ 33 | return true; 34 | } 35 | const errorMessage = `you dont have access to org ${_.get(org, 'name', `_id ${orgId}`)}`; 36 | throw new Meteor.Error(errorMessage); 37 | }; 38 | -------------------------------------------------------------------------------- /client/head.html: -------------------------------------------------------------------------------- 1 | 2 | RazeeDash 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | -------------------------------------------------------------------------------- /imports/ui/components/externalApplications/component.scss: -------------------------------------------------------------------------------- 1 | 2 | $grey:#ced4da; 3 | 4 | .app-edit { 5 | min-height: 37px; 6 | cursor: pointer; 7 | overflow-x: scroll; 8 | } 9 | #app-table .container-fluid { 10 | padding-left: 0px; 11 | } 12 | .app-item { 13 | line-height: 2.5; 14 | margin-bottom: 2px; 15 | &:hover { 16 | background-color: rgba(0,0,0,.075); 17 | } 18 | } 19 | .app-item-edit { 20 | margin-bottom: 2px; 21 | } 22 | .row-header { 23 | line-height: 2.1; 24 | border-bottom: solid 1px $grey; 25 | border-top: solid 1px $grey; 26 | font-weight: 600; 27 | margin-bottom: 8px; 28 | } 29 | .row-header-sm { 30 | border: none; 31 | font-weight: 600; 32 | } 33 | 34 | @media (max-width: 991px) { 35 | .app-item { 36 | line-height: 3.5; 37 | &:hover { 38 | background-color: inherit; 39 | } 40 | } 41 | .app-item-new { 42 | line-height: 3.5; 43 | } 44 | .action-col { 45 | border-bottom: solid 1px $grey; 46 | padding-bottom: 10px; 47 | } 48 | .app-item-edit { 49 | line-height: 3.5; 50 | } 51 | .form-control { 52 | height: 39px; 53 | } 54 | .app-edit { 55 | display: block; 56 | width: 100%; 57 | height: 39px; 58 | padding: 0.375rem 0.75rem; 59 | font-size: 0.875rem; 60 | font-weight: 400; 61 | line-height: 1.9; 62 | border: 1px solid $grey; 63 | border-radius: 0px; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /imports/api/user/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | 20 | Meteor.publish('userData', function() { 21 | if (this.userId) { 22 | return Meteor.users.find({ _id: this.userId }, { 23 | fields: { 24 | 'services.github.email': 1, 25 | 'services.ghe.email': 1, 26 | 'services.bitbucket.username': 1, 27 | 'emails': 1, 28 | 'apiKey': 1, 29 | 'profile': 1, 30 | 'github': 1, 31 | 'bitbucket': 1, 32 | 'orgs': 1 33 | }, 34 | }); 35 | } else { 36 | this.ready(); 37 | } 38 | }); 39 | 40 | Meteor.publish('users.byId', function(userId) { 41 | check( userId, String ); 42 | return Meteor.users.find({ _id: userId }, { fields: { 'profile.name': true } }); 43 | }); 44 | -------------------------------------------------------------------------------- /imports/api/stat/methods.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Stats } from './stats.js'; 19 | import { Clusters } from '../cluster/clusters/clusters.js'; 20 | import { Resources } from '../resource/resources.js'; 21 | import { Subscriptions } from '../deployables/subscriptions/subscriptions.js'; 22 | 23 | Meteor.methods({ 24 | updateResourceStats(orgId){ 25 | var userId = Meteor.userId(); 26 | if(!userId){ 27 | throw new Meteor.Error('not logged in'); 28 | } 29 | const clusterCount = Clusters.find({org_id: orgId}).count(); 30 | const resourceCount = Resources.find({org_id: orgId, deleted: false}).count(); 31 | const deployablesCount = Subscriptions.find({org_id: orgId}).count(); 32 | Stats.update({ org_id: orgId }, { $set: { deploymentCount: resourceCount, clusterCount: clusterCount, deployablesCount: deployablesCount } } ); 33 | }, 34 | }); 35 | -------------------------------------------------------------------------------- /imports/api/message/messages.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Used to store error messages sent from watch-keeper 18 | 19 | import { Mongo } from 'meteor/mongo'; 20 | import SimpleSchema from 'simpl-schema'; 21 | 22 | export const Messages = new Mongo.Collection('messages'); 23 | 24 | Messages.deny({ 25 | insert() { return true; }, 26 | update() { return true; }, 27 | remove() { return true; }, 28 | }); 29 | 30 | const messagesSchema = new SimpleSchema({ 31 | cluster_id: { type: String, index: true, required: true }, 32 | org_id: { type: String, index: true, required: true }, 33 | message_hash: { type: String, index: true, required: true }, 34 | message: { type: String, required: true }, 35 | level: { type: String, required: true }, 36 | data: { type: String, required: false}, 37 | created: { type: Date, required: true, }, 38 | updated: { type: Date, index: true, required: true, }, 39 | }); 40 | 41 | Messages.attachSchema(messagesSchema); 42 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/comments/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 39 | -------------------------------------------------------------------------------- /imports/api/resourceYamlHist/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { ResourceYamlHist } from '../resourceYamlHist.js'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | 22 | Meteor.publish('resourceYamlHist.histForSelfLink', function(orgId, clusterId, selfLink) { 23 | check( orgId, String ); 24 | check( clusterId, String ); 25 | check( selfLink, String ); 26 | requireOrgAccess(orgId); 27 | 28 | var search = { 29 | org_id: orgId, 30 | cluster_id: clusterId, 31 | resourceSelfLink: selfLink, 32 | }; 33 | var options = { 34 | sort: { updated: -1 }, 35 | limit: 10, 36 | fields: { 37 | org_id: 1, 38 | cluster_id: 1, 39 | resourceSelfLink: 1, 40 | updated: 1, 41 | }, 42 | }; 43 | return ResourceYamlHist.find(search, options); 44 | }); 45 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/resources/component.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .deployments { 18 | display: flex; 19 | flex-wrap: wrap; 20 | } 21 | 22 | .razee-about-icon { 23 | height: 5rem; 24 | width: 5rem; 25 | } 26 | 27 | .razee-about-icon-disabled { 28 | background-color: #EEE; 29 | } 30 | 31 | .deployments>.card { 32 | width: 30rem; 33 | } 34 | 35 | .deployment-row:hover .deployment-details-dropdown { 36 | display: inline-block; 37 | animation: fadein 0.2s; 38 | color: #152934; 39 | } 40 | 41 | @keyframes fadein { 42 | from { 43 | opacity: 0; 44 | } 45 | to { 46 | opacity: 1; 47 | } 48 | } 49 | 50 | .deployment-details-dropdown { 51 | display: none; 52 | cursor: pointer; 53 | width: 20px; 54 | text-align: center; 55 | color: #dfe3e6; 56 | } 57 | 58 | .deployment-details-dropdown-mobile { 59 | cursor: pointer; 60 | width: 20px; 61 | text-align: center; 62 | } 63 | 64 | .right-items { 65 | float: right; 66 | } 67 | -------------------------------------------------------------------------------- /public/favicon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /imports/ui/components/sevenDayDeployments/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import { Template } from 'meteor/templating'; 19 | import { ReactiveVar } from 'meteor/reactive-var'; 20 | import { Meteor } from 'meteor/meteor'; 21 | import '../portlet'; 22 | import { Session } from 'meteor/session'; 23 | 24 | Template.sevenDayDeployments.helpers({ 25 | recentDepsPerService: () => Template.instance().recentDepsPerService.get(), 26 | }); 27 | 28 | Template.sevenDayDeployments.onRendered(function() { 29 | this.autorun(()=>{ 30 | this.subscribe('userData'); 31 | Meteor.call('getRecentDepsPerService', Session.get('currentOrgId'), (error, result)=>{ 32 | this.recentDepsPerService.set(result); 33 | }); 34 | }); 35 | }); 36 | 37 | Template.sevenDayDeployments.onCreated(function() { 38 | this.recentDepsPerService = new ReactiveVar(); 39 | 40 | this.autorun(() => { 41 | this.subscribe('resources.recent', Session.get('currentOrgId')); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /imports/ui/components/moment/index.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import React from 'react'; 18 | import moment from 'moment'; 19 | import { ReactiveVar } from 'meteor/reactive-var'; 20 | import { Meteor } from "meteor/meteor"; 21 | import { withTracker } from 'meteor/react-meteor-data'; 22 | 23 | var curTime = new ReactiveVar(); 24 | curTime.set(new Date()); 25 | Meteor.setInterval(function() { 26 | curTime.set(new Date()); 27 | }, 10000); 28 | 29 | class MomentComponent extends React.Component{ 30 | render(){ 31 | var curTime = this.props.curTime; 32 | var datetime = this.props.datetime; 33 | if (!datetime || datetime === '--' || datetime === '') return ''; 34 | if(moment(datetime).isAfter(curTime)){ 35 | datetime = curTime.get(); 36 | } 37 | return moment(datetime).from(curTime); 38 | } 39 | } 40 | 41 | export default withTracker((props)=>{ 42 | return { 43 | curTime: curTime.get(), 44 | ...props, 45 | }; 46 | })(MomentComponent); 47 | -------------------------------------------------------------------------------- /imports/ui/style/_font-awesome.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | meteor's fourseven:scss ignores files with _ in the file name unless youre really specific with it (or globally allow 19 | importing everything), making it incompatible with font-awesome unless you jump through hoops, as was done here 20 | */ 21 | 22 | @import "{}/node_modules/font-awesome/scss/variables"; 23 | @import "{}/node_modules/font-awesome/scss/mixins"; 24 | @import "{}/node_modules/font-awesome/scss/path"; 25 | @import "{}/node_modules/font-awesome/scss/core"; 26 | @import "{}/node_modules/font-awesome/scss/larger"; 27 | @import "{}/node_modules/font-awesome/scss/fixed-width"; 28 | @import "{}/node_modules/font-awesome/scss/list"; 29 | @import "{}/node_modules/font-awesome/scss/bordered-pulled"; 30 | @import "{}/node_modules/font-awesome/scss/animated"; 31 | @import "{}/node_modules/font-awesome/scss/rotated-flipped"; 32 | @import "{}/node_modules/font-awesome/scss/stacked"; 33 | @import "{}/node_modules/font-awesome/scss/icons"; 34 | @import "{}/node_modules/font-awesome/scss/screen-reader"; 35 | -------------------------------------------------------------------------------- /imports/api/user/methods.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Random } from 'meteor/random'; 19 | import log from '../lib/log.js'; 20 | 21 | Meteor.methods({ 22 | generateApikey() { 23 | log.info('Generate API key', { userid: this.userId }); 24 | const newKey = Random.hexString(32); 25 | Meteor.users.update(this.userId, { $set: { apiKey: newKey } }); 26 | return newKey; 27 | }, 28 | getApiKey() { 29 | const user = Meteor.users.findOne(this.userId); 30 | if(!user.apiKey) { 31 | const newKey = Random.hexString(32); 32 | log.info('Generate API key for new graphql user', { userid: this.userId }); 33 | Meteor.users.update(this.userId, { $set: { apiKey: newKey } }); 34 | return newKey; 35 | } else { 36 | return user.apiKey; 37 | } 38 | }, 39 | setToken(newAccessToken) { 40 | Meteor.users.update(this.userId, { $set: { 'services.bitbucket.accessToken': newAccessToken } }); 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/updaterMessages/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 41 | 42 | 43 | 51 | -------------------------------------------------------------------------------- /imports/ui/components/recentDeployments/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import { Template } from 'meteor/templating'; 19 | import { Resources } from '/imports/api/resource/resources.js'; 20 | import '../portlet'; 21 | import '../kindIcon'; 22 | import { Session } from 'meteor/session'; 23 | 24 | Template.recentDeployments.helpers({ 25 | recentDeployments: () => Resources.find({}, { sort: { 'updated': -1 }, limit: 10 }), 26 | hasRecentDeployments: () => { 27 | const deploymentCount = Resources.find({}, { sort: { 'updated': -1 }, limit: 10 }).count(); 28 | return (deploymentCount > 0) ? true: false; 29 | } 30 | }); 31 | 32 | Template.recentDeployments.onCreated(function() { 33 | this.autorun(() => { 34 | this.subscribe('resources.recent', Session.get('currentOrgId')); 35 | }); 36 | }); 37 | 38 | Template.recentDeployments_row.onCreated(function() { 39 | this.autorun(() => { 40 | this.subscribe('clusters.id', Session.get('currentOrgId'), this.data.deployment.cluster_id); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /imports/ui/pages/userprofile/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './page.scss'; 18 | import './page.html'; 19 | import { Meteor } from 'meteor/meteor'; 20 | import { Template } from 'meteor/templating'; 21 | import toastr from 'toastr'; 22 | 23 | Template.UserProfile_home.events({ 24 | 'click .js-key-btn': function(e) { 25 | e.preventDefault(); 26 | const $modal = $('#js-key-modal'); 27 | $modal.modal('show'); 28 | return false; 29 | }, 30 | 'click .js-key-modal-confirm': function() { 31 | const $modal = $('#js-key-modal'); 32 | Meteor.call('generateApikey', (error)=> { 33 | if(error) { 34 | toastr.error(error.message, 'Error creating an api key'); 35 | console.error(error); 36 | } 37 | }); 38 | $modal.modal('hide'); 39 | return false; 40 | } 41 | }); 42 | 43 | Template.UserProfile_home.onCreated(function() { 44 | this.autorun(() => { 45 | this.subscribe('userData'); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /imports/api/resourceYamlHist/methods.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check, Match } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { ResourceYamlHist } from './resourceYamlHist.js'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | 22 | Meteor.methods({ 23 | async getTwoYamlHistsAtTimestamp(orgId, clusterId, resourceSelfLink, ts=null){ 24 | check(orgId, String); 25 | check(clusterId, String); 26 | check(resourceSelfLink, String); 27 | check(ts, Match.Maybe(Number)); 28 | requireOrgAccess(orgId); 29 | 30 | var search = { 31 | org_id: orgId, 32 | cluster_id: clusterId, 33 | resourceSelfLink, 34 | }; 35 | if(ts){ 36 | search.updated = { $lte: new Date(ts) }; 37 | } 38 | var options = { 39 | sort: { 40 | updated: -1, 41 | }, 42 | limit: 2, 43 | }; 44 | return await ResourceYamlHist.find(search, options).fetch(); 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2019 IBM Corp. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ################################################################################ 16 | ####################################### 17 | # Build the preliminary image 18 | ####################################### 19 | FROM node:12-alpine as buildImg 20 | 21 | RUN apk update 22 | RUN apk add python3 make g++ 23 | 24 | 25 | USER node 26 | WORKDIR /home/node 27 | 28 | COPY --chown=node .build/bundle /home/node/app 29 | 30 | RUN cd app/programs/server/ && npm install 31 | 32 | ####################################### 33 | # Build the production image 34 | ####################################### 35 | FROM node:12-alpine 36 | LABEL maintainer="Michael McKay " 37 | 38 | USER node 39 | WORKDIR /home/node 40 | 41 | ARG BUILD_ID 42 | ARG LAST_COMMIT_ID 43 | ENV BUILD_ID="${BUILD_ID}" 44 | ENV LAST_COMMIT_ID="${LAST_COMMIT_ID}" 45 | ENV PORT="${PORT:-3000}" 46 | ENV NODE_ENV="production" 47 | 48 | RUN mkdir -p /home/node/app 49 | COPY --chown=node --from=buildImg /home/node /home/node 50 | 51 | EXPOSE "${PORT}" 52 | CMD ["node", "/home/node/app/main.js"] 53 | -------------------------------------------------------------------------------- /imports/ui/pages/welcome/page.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 46 | -------------------------------------------------------------------------------- /imports/ui/components/historyDropdown/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 39 | -------------------------------------------------------------------------------- /imports/ui/components/inactiveClusters/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 50 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/versions/index.js: -------------------------------------------------------------------------------- 1 | 2 | import './page.html'; 3 | import { Meteor } from 'meteor/meteor'; 4 | import { Template } from 'meteor/templating'; 5 | import { DeployableVersions } from '/imports/api/deployables/channels/deployableVersions'; 6 | import { FlowRouter } from 'meteor/kadira:flow-router'; 7 | import { Session } from 'meteor/session'; 8 | 9 | let versionsHandle; 10 | Template.channel_versions_all.onCreated(function() { 11 | this.autorun(()=>{ 12 | versionsHandle = Meteor.subscribe('deployableVersions', Session.get('currentOrgId')); 13 | Meteor.subscribe('channels', Session.get('currentOrgId')); 14 | }); 15 | 16 | }); 17 | 18 | Template.channel_versions_all.helpers({ 19 | versions() { 20 | const channelId = FlowRouter.current().params.id; 21 | return DeployableVersions.find({'org_id': Session.get('currentOrgId'), 'channel_id': channelId}, { sort: { 'created': -1 }}).fetch(); 22 | }, 23 | showNoVersionsMessage() { 24 | const channelId = FlowRouter.current().params.id; 25 | const versions = DeployableVersions.find({'org_id': Session.get('currentOrgId'), 'channel_id': channelId}).fetch(); 26 | const noVersions = (versions && versions.length > 0) ? false : true; 27 | return versionsHandle && versionsHandle.ready() && noVersions; 28 | } 29 | }); 30 | 31 | Template.channel_versions_all.events({ 32 | 'click .js-version-details'(e) { 33 | e.preventDefault(); 34 | const versionId = $(e.target).closest('.js-version-details').data('id'); 35 | const channelId = FlowRouter.current().params.id; 36 | const params = { 37 | baseOrgName: Session.get('currentOrgName'), 38 | tabId: 'channels', 39 | id: channelId, 40 | versionId 41 | }; 42 | FlowRouter.go('channel.version.details', params ); 43 | }, 44 | }); 45 | -------------------------------------------------------------------------------- /public/img/container-deploy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 10 | Group 32 11 | Group 32 12 | Group 32 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /imports/api/org/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import _ from 'lodash'; 18 | import { check } from 'meteor/check'; 19 | import { Meteor } from 'meteor/meteor'; 20 | import { Orgs } from '../orgs.js'; 21 | import { localUser } from '../../lib/login.js'; 22 | 23 | Meteor.publish('orgIdByName', function(orgName){ 24 | return Orgs.find({ name: orgName }, { _id: 1, name: 1, customSearchableAttrs: 1}); 25 | }); 26 | 27 | Meteor.publish('orgs', function(names){ 28 | check( names, [String] ); 29 | return Orgs.find({ name: { $in: names } }, { name: 1 }); 30 | }); 31 | 32 | Meteor.publish('orgsForUser', function(){ 33 | if(localUser()) { 34 | // local users should be able to see see all orgs with type local 35 | return Orgs.find({ type: 'local' }, { name: 1, customSearchableAttrs: 1 }); 36 | } else { 37 | const orgNames = _.map(Meteor.user().orgs || [], 'name'); 38 | return Orgs.find({ name: { $in: orgNames } }, { name: 1, customSearchableAttrs: 1 }); 39 | } 40 | }); 41 | 42 | Meteor.publish('gheOrg', (orgName)=>{ 43 | check( orgName, String ); 44 | return Orgs.find({ name: orgName }, { fields: { name: 1, gheOrgId: 1, } }); 45 | }); 46 | 47 | Meteor.publish('allRegisteredOrgs', function(){ 48 | return Orgs.find({}); 49 | }); 50 | -------------------------------------------------------------------------------- /imports/ui/components/sevenDayDeployments/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 54 | -------------------------------------------------------------------------------- /packages/bitbucket/bitbucket_client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | // based off of https://github.com/meteor/meteor/blob/devel/packages/github-oauth/github_client.js 3 | 4 | Bitbucket = {}; 5 | 6 | // Request Bitbucket credentials for the user 7 | // @param options {optional} XXX support options.requestPermissions 8 | // @param credentialRequestCompleteCallback {Function} Callback function to call on 9 | // completion. Takes one argument, credentialToken on success, or Error on 10 | // error. 11 | Bitbucket.requestCredential = function (options, credentialRequestCompleteCallback) { 12 | // support both (options, callback) and (callback). 13 | if (!credentialRequestCompleteCallback && typeof options === 'function') { 14 | credentialRequestCompleteCallback = options; 15 | options = {}; 16 | } 17 | 18 | var config = ServiceConfiguration.configurations.findOne({service: 'bitbucket'}); 19 | if (!config) { 20 | credentialRequestCompleteCallback && credentialRequestCompleteCallback(new ServiceConfiguration.ConfigError('Service not configured')); 21 | return; 22 | } 23 | 24 | const credentialToken = Random.secret(); 25 | const loginStyle = OAuth._loginStyle('bitbucket', config, options); 26 | const redirectUrl = Meteor.absoluteUrl('_oauth/bitbucket?close&state=' + credentialToken); 27 | const state = OAuth._stateParam(loginStyle, credentialToken, redirectUrl); 28 | const loginUrl = 'https://bitbucket.org/site/oauth2/authorize' + 29 | `?client_id=${config.consumerKey}` + 30 | '&response_type=code' + 31 | `&state=${state}`; 32 | 33 | OAuth.launchLogin({ 34 | loginService: 'bitbucket', 35 | loginStyle, 36 | loginUrl, 37 | credentialRequestCompleteCallback, 38 | credentialToken, 39 | popupOptions: {width: 900, height: 450} 40 | }); 41 | 42 | }; 43 | -------------------------------------------------------------------------------- /imports/api/deployables/subscriptions/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { Subscriptions } from '../subscriptions'; 20 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 21 | 22 | Meteor.publish('subscriptions', function(orgId) { 23 | check( orgId, String ); 24 | requireOrgAccess(orgId); 25 | return Subscriptions.find({ org_id: orgId }, {pollingIntervalMs: 1000}); 26 | }); 27 | 28 | Meteor.publish('subscriptions.byChannel', function(orgId, channelId) { 29 | check( orgId, String ); 30 | check( channelId, String ); 31 | requireOrgAccess(orgId); 32 | return Subscriptions.find({ org_id: orgId, channel_uuid: channelId }, {pollingIntervalMs: 1000}); 33 | }); 34 | 35 | Meteor.publish('subscriptions.byClusterGroup', function(orgId, name) { 36 | check( orgId, String ); 37 | check( name, String ); 38 | requireOrgAccess(orgId); 39 | return Subscriptions.find({ org_id: orgId, groups: {$in: [name]}}, {pollingIntervalMs: 1000}); 40 | }); 41 | 42 | Meteor.publish('users.byIds', function(userIds) { 43 | check( userIds, Array); 44 | return Meteor.users.find({ _id: {$in: userIds} }, { fields: { 'profile.name': true } }, {pollingIntervalMs: 1000}); 45 | }); 46 | -------------------------------------------------------------------------------- /imports/startup/server/register-api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import '../../api/resource/methods.js'; 18 | import '../../api/resource/server/publications.js'; 19 | 20 | import '../../api/cluster/clusters/methods.js'; 21 | import '../../api/cluster/clusters/server/publications.js'; 22 | 23 | import '../../api/webhook/server/publications.js'; 24 | 25 | import '../../api/message/server/publications.js'; 26 | 27 | import '../../api/org/server/publications.js'; 28 | import '../../api/org/methods.js'; 29 | 30 | import '../../api/stat/server/publications.js'; 31 | import '../../api/stat/methods.js'; 32 | 33 | import '../../api/user/server/publications.js'; 34 | import '../../api/user/methods.js'; 35 | 36 | import '../../api/resourceYamlHist/server/publications.js'; 37 | import '../../api/resourceYamlHist/methods.js'; 38 | 39 | import '../../api/externalApplications/server/publications.js'; 40 | import '../../api/externalApplications/methods.js'; 41 | 42 | import '../../api/deployables/channels/server/publications.js'; 43 | import '../../api/deployables/channels/methods.js'; 44 | 45 | import '../../api/deployables/subscriptions/server/publications.js'; 46 | import '../../api/deployables/subscriptions/methods.js'; 47 | 48 | import '../../api/deployables/groups/server/publications.js'; 49 | import '../../api/deployables/groups/methods.js'; 50 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/subscriptions/helpModal.html: -------------------------------------------------------------------------------- 1 | 35 | -------------------------------------------------------------------------------- /.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | razeeio:mongo-config 8 | 9 | meteor-base@1.4.0 # Packages every Meteor app needs to have 10 | mobile-experience@1.1.0 # Packages for a great mobile UX 11 | mongo@1.10.0 # The database Meteor supports right now 12 | blaze-html-templates # Compile .html files into Meteor Blaze views 13 | reactive-var@1.0.11 # Reactive variable for tracker 14 | tracker@1.2.0 # Meteor's client-side reactive programming library 15 | 16 | standard-minifier-js@2.6.0 # JS minifier run for production mode 17 | es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers 18 | ecmascript@0.14.3 # Enable ECMAScript2015+ syntax in app code 19 | 20 | kadira:flow-router # FlowRouter is a very simple router for Meteor 21 | kadira:blaze-layout # Layout manager for blaze (works well with FlowRouter) 22 | 23 | johanbrook:publication-collector # Test a Meteor publication by collecting its output 24 | nimble:restivus 25 | accounts-ui@1.3.1 26 | aldeed:collection2-core 27 | aldeed:schema-index 28 | fourseven:scss 29 | seba:minifiers-autoprefixer 30 | http@1.4.2 31 | ahref:flow-router-breadcrumb 32 | arillo:flow-router-helpers 33 | session@1.2.0 34 | underscore@1.0.10 35 | check@1.3.1 36 | oauth-encryption@1.3.1 37 | reactive-dict@1.3.0 38 | react-template-helper 39 | react-meteor-data 40 | dburles:factory 41 | xolvio:cleaner 42 | practicalmeteor:chai 43 | lmieulet:meteor-coverage@3.1.1 44 | meteortesting:mocha@1.1.1 45 | meteortesting:mocha-core@5.2.0_3 46 | gadicc:blaze-react-component 47 | accounts-github@1.4.3 48 | github-config-ui@1.0.1 49 | ibmcloud:accounts-ghe@3.0.0 50 | useraccounts:core 51 | useraccounts:unstyled 52 | service-configuration@1.0.11 53 | aldeed:template-extension 54 | email@1.2.3 55 | bitbucket 56 | jquery 57 | -------------------------------------------------------------------------------- /imports/ui/components/historyDropdown/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import './component.scss'; 19 | import { Template } from 'meteor/templating'; 20 | 21 | Template.history_dropdown.onRendered(function() { 22 | $(function() { 23 | $('[data-toggle="tooltip"]').tooltip(); 24 | }); 25 | }); 26 | 27 | Template.history_dropdown.helpers({ 28 | getColoredIcon(s) { 29 | let total = s.hash.s.total; 30 | 31 | if (typeof total === 'number') { 32 | if (total <= 25) { 33 | return 'fa fa-thermometer-0 fa-lg'; 34 | } else if (total > 25 && total <= 75) { 35 | return 'fa fa-thermometer-2 fa-lg'; 36 | } else { 37 | return 'fa fa-thermometer-4 fa-lg'; 38 | } 39 | } 40 | }, 41 | getColorIndicator(s) { 42 | let total = s.hash.s.total; 43 | 44 | if (typeof total === 'number') { 45 | if (total <= 25) { 46 | return 'color:green;'; 47 | } else if (total > 25 && total <= 75) { 48 | return 'color:orange;'; 49 | } else { 50 | return 'color:red;'; 51 | } 52 | } 53 | }, 54 | resourcePathQueryObj(){ 55 | return { selfLink: this.resource.selfLink }; 56 | }, 57 | timestampToDateObj(timestamp){ 58 | return new Date(timestamp); 59 | }, 60 | }); 61 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/versions/page.html: -------------------------------------------------------------------------------- 1 | 42 | -------------------------------------------------------------------------------- /packages/ghe/ghe_client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | Ghe = {}; 4 | 5 | // Request Github credentials for the user 6 | // @param options {optional} 7 | // @param credentialRequestCompleteCallback {Function} Callback function to call on 8 | // completion. Takes one argument, credentialToken on success, or Error on 9 | // error. 10 | Ghe.requestCredential = function(options, credentialRequestCompleteCallback) { 11 | // support both (options, callback) and (callback). 12 | if (!credentialRequestCompleteCallback && typeof options === 'function') { 13 | credentialRequestCompleteCallback = options; 14 | options = {}; 15 | } 16 | 17 | const config = ServiceConfiguration.configurations.findOne({ service: 'ghe' }); 18 | if (!config) { 19 | credentialRequestCompleteCallback && credentialRequestCompleteCallback(new ServiceConfiguration.ConfigError()); 20 | return; 21 | } 22 | const credentialToken = Random.secret(); 23 | 24 | const scope = (options && options.requestPermissions) || ['user:email']; 25 | const flatScope = _.map(scope, encodeURIComponent).join('+'); 26 | 27 | const loginStyle = OAuth._loginStyle('ghe', config, options); 28 | 29 | let url = config.gheURL; 30 | const httpCheck = /^((http|https):\/\/)/; 31 | if(!httpCheck.test(config.gheURL)) { 32 | url = `https://${config.gheURL}`; 33 | } 34 | 35 | const trailingSlash = /\/*$/gi; 36 | const gheUrl = url.replace(trailingSlash, ''); 37 | 38 | const loginUrl = 39 | gheUrl + '/login/oauth/authorize' + 40 | '?client_id=' + config.clientId + 41 | '&scope=' + flatScope + 42 | '&redirect_uri=' + OAuth._redirectUri('ghe', config) + 43 | '&state=' + OAuth._stateParam(loginStyle, credentialToken, options && options.redirectUrl); 44 | 45 | OAuth.launchLogin({ 46 | loginService: 'ghe', 47 | loginStyle, 48 | loginUrl, 49 | credentialRequestCompleteCallback, 50 | credentialToken, 51 | popupOptions: { 52 | width: 900, 53 | height: 450 54 | } 55 | }); 56 | 57 | }; 58 | -------------------------------------------------------------------------------- /imports/api/lib/login.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import _ from 'lodash'; 19 | import { AccountsTemplates } from 'meteor/useraccounts:core'; 20 | import { ServiceConfiguration } from 'meteor/service-configuration'; 21 | 22 | AccountsTemplates.configure({ 23 | texts: { 24 | socialIcons: { 25 | 'ghe': 'fa fa-github' 26 | } 27 | }, 28 | }); 29 | 30 | const sanitizeUrl = (url) => { 31 | 32 | const httpCheck = /^((http|https):\/\/)/; 33 | if(!httpCheck.test(url)) { 34 | url = `https://${url}`; 35 | } 36 | 37 | const trailingSlash = /\/*$/gi; 38 | const newUrl = url.replace(trailingSlash, ''); 39 | 40 | return newUrl; 41 | }; 42 | 43 | // A user can logon via github, github enterprise, bitbucket or they can create a local id/password stored in mongo 44 | // `localUser` is used throughout our code so that we can skip calls to the github api for local users 45 | function localUser() { 46 | if( _.has(Meteor.user(), 'services.github') || _.has(Meteor.user(), 'services.ghe') || _.has(Meteor.user(), 'services.bitbucket') ) { 47 | return false; 48 | } else { 49 | return true; 50 | } 51 | } 52 | 53 | function loginType() { 54 | const service = getServiceConfiguration(); 55 | return service; 56 | } 57 | 58 | function getServiceConfiguration() { 59 | const config = ServiceConfiguration.configurations.findOne({}); 60 | return config ? config.service : undefined; 61 | } 62 | 63 | export { localUser, loginType, getServiceConfiguration, sanitizeUrl }; 64 | -------------------------------------------------------------------------------- /public/img/container-cluster.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Group 32 10 | 11 | 14 | 16 | 17 | Group 32 18 | 19 | 22 | 24 | 25 | Group 32 26 | 27 | 30 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /imports/ui/style/_fonts.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | $font-path: '/fonts'; 18 | 19 | @font-face { 20 | font-family: 'ibm-font'; 21 | font-style: normal; 22 | font-weight: 300; 23 | src: url('#{$font-path}/IBMPlexSans-Light-V01.1.woff') format('woff'); 24 | } 25 | 26 | @font-face { 27 | font-family: 'ibm-font'; 28 | font-style: normal; 29 | font-weight: 400; 30 | src: url('#{$font-path}/IBMPlexSans-Regular-V01.1.woff') format('woff'); 31 | } 32 | 33 | @font-face { 34 | font-family: 'ibm-font'; 35 | font-style: normal; 36 | font-weight: 700; 37 | src: url('#{$font-path}/IBMPlexSans-Bold-V01.1.woff') format('woff'); 38 | } 39 | 40 | @font-face { 41 | font-family: 'ibm-mono'; 42 | font-style: normal; 43 | font-weight: 300; 44 | src: url('#{$font-path}/IBMPlexMono-Light-V01.woff') format('woff'); 45 | } 46 | 47 | @font-face { 48 | font-family: 'ibm-mono'; 49 | font-style: italic; 50 | font-weight: 300; 51 | src: url('#{$font-path}/IBMPlexMono-LightItalic-V01.woff') format('woff'); 52 | } 53 | 54 | @font-face { 55 | font-family: 'ibm-mono'; 56 | font-style: normal; 57 | font-weight: 400; 58 | src: url('https://1.www.s81c.com/common/fonts/plex/v1/ibmplexmono-regular.woff') format('woff'); 59 | } 60 | 61 | @font-face { 62 | font-family: 'ibm-mono'; 63 | font-style: italic; 64 | font-weight: 400; 65 | src: url('#{$font-path}/IBMPlexMono-ItalicV01.woff') format('woff'); 66 | } 67 | 68 | @font-face { 69 | font-family: 'ibm-mono'; 70 | font-style: normal; 71 | font-weight: 700; 72 | src: url('#{$font-path}/IBMPlexSans-Bold-V01.1.woff') format('woff'); 73 | } 74 | -------------------------------------------------------------------------------- /imports/ui/components/recentDeployments/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 46 | 47 | 59 | -------------------------------------------------------------------------------- /imports/ui/style/main.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @import "./fonts"; 18 | @import "./colors"; 19 | @import "./variables"; 20 | @import "./toastr"; 21 | @import "{}/node_modules/bootstrap/scss/bootstrap.scss"; 22 | @import "{}/node_modules/toastr/toastr.scss"; 23 | @import "./font-awesome"; 24 | body { 25 | margin-top: 78px; 26 | color: #152934; 27 | background: white; 28 | } 29 | 30 | .flex-grow-1 { 31 | flex-grow: 1; 32 | } 33 | 34 | .badge { 35 | border-radius: 7px; 36 | } 37 | 38 | .collapse-caret { 39 | transition-duration: 0.3s; 40 | transform: rotate(0deg) 41 | } 42 | 43 | .collapsed { 44 | .collapse-caret { 45 | transform: rotate(-90deg) 46 | } 47 | } 48 | 49 | .table.table-sm td, .table.table-sm th, .table-responsive td, .table-responsive th { 50 | padding-left: $table-left-padding; 51 | } 52 | 53 | //github and ghe login buttons 54 | #at-btn, .at-social-btn, #at-github, #at-bitbucket, #at-ghe { 55 | margin: 10px 0 10px 0; 56 | background: #3d70b2; 57 | color: white; 58 | display: inline-block; 59 | font-weight: 400; 60 | text-align: center; 61 | vertical-align: middle; 62 | user-select: none; 63 | border: 1px solid transparent; 64 | padding: 0.375rem 0.75rem; 65 | font-size: 0.875rem; 66 | line-height: 1.5; 67 | border-radius: 0px; 68 | opacity: 0; 69 | transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; 70 | .fa { 71 | margin-right: 3px; 72 | } 73 | } 74 | 75 | #at-github:hover, #at-bitbucket:hover, #at-ghe:hover { 76 | background: #555; 77 | } 78 | -------------------------------------------------------------------------------- /imports/ui/components/kindIcon/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.scss'; 18 | import './component.html'; 19 | import { Template } from 'meteor/templating'; 20 | 21 | Template.kindIcon.helpers({ 22 | getKindLabel(kind) { 23 | switch (kind) { 24 | case 'APIService': 25 | return 'AS'; 26 | case 'ClusterRole': 27 | return 'CR'; 28 | case 'ClusterRoleBinding': 29 | return 'CRB'; 30 | case 'ConfigMap': 31 | return 'CM'; 32 | case 'CustomResourceDefinition': 33 | return 'CRD'; 34 | case 'DaemonSet': 35 | return 'Ds'; 36 | case 'Deployment': 37 | return 'D'; 38 | case 'Endpoints': 39 | return 'EPs'; 40 | case 'Event': 41 | return 'E'; 42 | case 'Job': 43 | return 'J'; 44 | case 'Namespace': 45 | return 'Ns'; 46 | case 'NetworkPolicy': 47 | return 'NP'; 48 | case 'Node': 49 | return 'No'; 50 | case 'Pod': 51 | return 'P'; 52 | case 'PodSecurityPolicy': 53 | return 'PSP'; 54 | case 'PriorityClass': 55 | return 'PC'; 56 | case 'ReplicaSet': 57 | return 'RS'; 58 | case 'RemoteResource': 59 | return 'RR'; 60 | case 'Secret': 61 | return 'Sec'; 62 | case 'Service': 63 | return 'Sv'; 64 | case 'ServiceAccount': 65 | return 'SA'; 66 | case 'StorageClass': 67 | return 'SC'; 68 | default: 69 | return '?'; 70 | } 71 | } 72 | }); 73 | -------------------------------------------------------------------------------- /imports/api/lib/graphql.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | 19 | const { ApolloLink } = require('apollo-link'); 20 | const ApolloClient = require('apollo-boost').ApolloClient; 21 | const fetch = require('cross-fetch/polyfill').fetch; 22 | const createHttpLink = require('apollo-link-http').createHttpLink; 23 | const { onError } = require('apollo-link-error'); 24 | const InMemoryCache = require('apollo-cache-inmemory').InMemoryCache; 25 | 26 | const getQueryClient = async () => { 27 | 28 | const token = Meteor.user().apiKey ? Meteor.user().apiKey : Meteor.call('getApiKey'); 29 | 30 | // strip any trailing / from RAZEEDASH_API_URL 31 | const regex = /\/*$/gi; 32 | const API_HOST = Meteor.settings.public.RAZEEDASH_API_URL.replace(regex, ''); 33 | 34 | const httpLink = createHttpLink({ 35 | uri: `${API_HOST}/graphql`, 36 | fetch: fetch, 37 | headers: { 38 | 'x-api-key': token 39 | } 40 | }); 41 | 42 | const errorLink = onError(({ graphQLErrors, networkError }) => { 43 | if (graphQLErrors) 44 | graphQLErrors.map(({ message, extensions }) => { 45 | console.error(`[GraphQL error]: Message: ${message}, Type: ${extensions.code}`); 46 | }); 47 | if (networkError) { 48 | console.error(`[Network error]: ${networkError}`); 49 | } 50 | }); 51 | 52 | const links = ApolloLink.from ([ 53 | errorLink, 54 | httpLink, 55 | ]); 56 | 57 | const client = new ApolloClient({ 58 | link: links, 59 | cache: new InMemoryCache(), 60 | }); 61 | return client; 62 | }; 63 | 64 | exports.getQueryClient = getQueryClient; 65 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/page.scss: -------------------------------------------------------------------------------- 1 | $grey:#ced4da; 2 | $grey-hover: #dae0e5; 3 | 4 | .details-card { 5 | height: 280px; 6 | } 7 | 8 | .edit-button, .copy-button { 9 | position: relative; 10 | bottom: 2px; 11 | border: none; 12 | } 13 | 14 | .yaml-upload-error { 15 | display: none; 16 | color: red; 17 | } 18 | 19 | .help-icon { 20 | position: relative; 21 | bottom: 1px; 22 | } 23 | 24 | .clipboard-icon { 25 | width: 10px; 26 | } 27 | 28 | .version-dropdown:hover{ 29 | cursor: pointer; 30 | background-color: $grey-hover; 31 | } 32 | 33 | .group-edit { 34 | min-height: 37px; 35 | cursor: pointer; 36 | } 37 | 38 | .dropdown.bootstrap-select { 39 | width: 100% !important; 40 | } 41 | 42 | .resource-item { 43 | cursor: pointer; 44 | } 45 | .group-item, .resource-item { 46 | line-height: 2.5; 47 | margin-bottom: 4px; 48 | &:hover { 49 | background-color: rgba(0,0,0,.075); 50 | } 51 | } 52 | 53 | .resource-item-edit { 54 | margin-bottom: 2px; 55 | } 56 | 57 | .group-item.disabled { 58 | pointer-events: none; 59 | } 60 | 61 | .row-header { 62 | line-height: 2.1; 63 | border-bottom: solid 1px $grey; 64 | border-top: solid 1px $grey; 65 | font-weight: 600; 66 | margin-bottom: 8px; 67 | } 68 | 69 | .row-header-sm { 70 | border: none; 71 | font-weight: 600; 72 | } 73 | 74 | .footer-buttons { 75 | position: relative; 76 | bottom: 5px; 77 | } 78 | 79 | @media (max-width: 991px) { 80 | .group-item, .resource-item { 81 | line-height: 3.5; 82 | &:hover { 83 | background-color: inherit; 84 | } 85 | } 86 | .group-item-new, .resource-item-new, .resource-item-edit { 87 | line-height: 3.5; 88 | } 89 | .action-col { 90 | border-bottom: solid 1px $grey; 91 | padding-bottom: 10px; 92 | } 93 | .form-control { 94 | height: 39px; 95 | } 96 | .group-edit { 97 | display: block; 98 | width: 100%; 99 | height: 39px; 100 | padding: 0.375rem 0.75rem; 101 | font-size: 0.875rem; 102 | font-weight: 400; 103 | line-height: 1.9; 104 | border: 1px solid $grey; 105 | border-radius: 0px; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /imports/ui/components/inactiveClusters/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import { Template } from 'meteor/templating'; 19 | import { Clusters } from '/imports/api/cluster/clusters/clusters'; 20 | import '../../components/portlet'; 21 | import moment from 'moment'; 22 | import { Session } from 'meteor/session'; 23 | import { Meteor } from 'meteor/meteor'; 24 | 25 | Template.inactiveClusters.helpers({ 26 | zombieClusters: () => Clusters.find({ updated: { $lt: new moment().subtract(1, 'day').toDate() } }, { sort: { updated: -1 } }), 27 | hasZombieClusters: () => { 28 | const zombies = Clusters.find({ updated: { $lt: new moment().subtract(1, 'day').toDate() } }, { sort: { updated: -1 } }).count(); 29 | return (zombies > 0) ? true : false; 30 | }, 31 | }); 32 | 33 | Template.inactiveClusters.onCreated(function() { 34 | this.autorun(() => { 35 | this.subscribe('clusters.zombie', Session.get('currentOrgId')); 36 | }); 37 | }); 38 | 39 | Template.inactiveClusters.events({ 40 | 'click .delete'(event){ 41 | var confirmation = confirm('Are you sure?'); 42 | if (confirmation){ 43 | Meteor.call('pruneCluster', Session.get('currentOrgId'), event.target.attributes['cluster_id'].value, (err) => { 44 | if (err){ 45 | throw err; 46 | } 47 | }); 48 | Meteor.call('pruneClusterResources', Session.get('currentOrgId'), event.target.attributes['cluster_id'].value, (err) => { 49 | if (err) { 50 | throw err; 51 | } 52 | }); 53 | Meteor.call('updateResourceStats', Session.get('currentOrgId')); 54 | } 55 | } 56 | 57 | }); 58 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/channel/apiHelp.html: -------------------------------------------------------------------------------- 1 | 44 | -------------------------------------------------------------------------------- /imports/ui/layouts/body/body.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 58 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/version/page.html: -------------------------------------------------------------------------------- 1 | 18 | 19 | 59 | -------------------------------------------------------------------------------- /imports/ui/components/commitLink/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import { Template } from 'meteor/templating'; 19 | import { Blaze } from 'meteor/blaze'; 20 | 21 | Template.commitLink.helpers({ 22 | gitData() { 23 | const resourceData = this.resource.searchableData; 24 | if(resourceData) { 25 | let gitRepo; 26 | let otherRepo; 27 | let commitSHA; 28 | let trimmedSHA; 29 | for (const key in resourceData) { 30 | if(key === 'annotations_razee_io_commit_sha' || key === 'annotations["razee_io_commit_sha"]') { 31 | commitSHA = resourceData[key]; 32 | } 33 | if(key === 'annotations_razee_io_git_repo' || key === 'annotations["razee_io_git_repo"]') { 34 | gitRepo = resourceData[key]; 35 | } 36 | if(key === 'annotations_razee_io_source_url' || key === 'annotations["razee_io_source_url"]') { 37 | otherRepo = resourceData[key]; 38 | } 39 | } 40 | if(this.commitSha){ 41 | commitSHA = this.commitSha; 42 | } 43 | if(commitSHA){ 44 | trimmedSHA = Blaze._globalHelpers.trimCommit(commitSHA); 45 | } 46 | // razee.io/git-repo 47 | if(gitRepo) { 48 | return { 49 | 'link': gitRepo.split('.git')[0] + '/commit/' + commitSHA, 50 | 'text': trimmedSHA || 'source' 51 | }; 52 | } 53 | // razee.io/source-url 54 | if(otherRepo) { 55 | return { 56 | 'link': otherRepo, 57 | 'text': trimmedSHA || 'source' 58 | }; 59 | } 60 | } 61 | }, 62 | }); 63 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/comments/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import { Template } from 'meteor/templating'; 19 | import { Meteor } from 'meteor/meteor'; 20 | import { ReactiveVar } from 'meteor/reactive-var'; 21 | import { Blaze } from 'meteor/blaze'; 22 | 23 | const postCommentContent = new ReactiveVar(null); 24 | 25 | Template.cluster_comments.helpers({ 26 | comments() { 27 | return (this.cluster.comments || []).reverse(); 28 | }, 29 | postCommentBtnDisplayClass() { 30 | return (postCommentContent.get() ? '' : 'd-none'); 31 | }, 32 | }); 33 | 34 | Template.cluster_comments.events({ 35 | 'keyup .postCommentTextarea': function(event) { 36 | const content = $(event.target).val(); 37 | postCommentContent.set(content); 38 | }, 39 | 'click .postCommentBtn': function() { 40 | const content = postCommentContent.get(); 41 | const clusterId = this.cluster.cluster_id; 42 | Meteor.call('createClusterComment', clusterId, content, (err) => { 43 | if (err) { 44 | throw err; 45 | } 46 | $('.postCommentTextarea').val(''); 47 | postCommentContent.set(''); 48 | }); 49 | }, 50 | }); 51 | 52 | 53 | Template.cluster_comment.onCreated(function() { 54 | this.autorun(() => { 55 | this.subscribe('users.byId', Template.currentData().comment.user_id); 56 | }); 57 | }); 58 | 59 | Template.cluster_comment.helpers({ 60 | authorName() { 61 | const user = Meteor.users.findOne({ _id: this.comment.user_id }); 62 | if (!user) { 63 | return '[UNKNOWN USER]'; 64 | } 65 | return user.profile.name; 66 | }, 67 | commentHtml() { 68 | var html = Blaze._escape(this.comment.content); 69 | html = html.replace(/\n/g, '
\n'); 70 | return html; 71 | } 72 | }); 73 | -------------------------------------------------------------------------------- /imports/ui/pages/resources/page.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | .decryptionKey{ 18 | max-width: 500px; 19 | } 20 | 21 | @media only screen and (max-width: 767px) { 22 | .stacked > table > tbody > tr > td { 23 | display: block; 24 | } 25 | .stacked > table > tbody > tr > td.smallHeader { 26 | font-weight: bolder; 27 | } 28 | } 29 | 30 | 31 | .externalApp { 32 | padding-top: 10px; 33 | padding-left: 20px; 34 | } 35 | 36 | table.tableCollapse{ 37 | .colName{ 38 | display:none; 39 | } 40 | } 41 | 42 | @media only screen and (max-width: 767px) { 43 | table.tableCollapse { 44 | display:block; 45 | 46 | > thead{ 47 | display:none; 48 | } 49 | > tbody { 50 | display:block; 51 | 52 | > tr { 53 | display: grid; 54 | grid-template-columns: 90px auto; 55 | max-width: 100%; 56 | 57 | > td { 58 | padding-left: 6px; 59 | padding-right: 2px; 60 | overflow:scroll; 61 | 62 | &.colName { 63 | overflow: hidden; 64 | font-weight: bold; 65 | display:block; 66 | } 67 | } 68 | } 69 | } 70 | } 71 | } 72 | 73 | .yamlHistDropdown { 74 | .dropdown-item { 75 | cursor: pointer; 76 | 77 | &:not(.active):not(:active):hover { 78 | background: #def; 79 | } 80 | } 81 | } 82 | 83 | .diffCollapseBtn{ 84 | .collapseArrow { 85 | transform: rotate(-180deg); 86 | transition-duration: .3s; 87 | } 88 | 89 | &.collapsed{ 90 | .collapseArrow { 91 | transform: rotate(0deg); 92 | } 93 | } 94 | } 95 | 96 | .diff-hunk{ 97 | border-bottom: 1px solid #eee; 98 | } -------------------------------------------------------------------------------- /imports/api/lib/ghe.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { OAuth } from 'meteor/oauth'; 19 | import { HTTP } from 'meteor/http'; 20 | import log from './log.js'; 21 | import _ from 'lodash'; 22 | import { ServiceConfiguration } from 'meteor/service-configuration'; 23 | import { loginType, sanitizeUrl } from './login.js'; 24 | 25 | function listOrgs(loggedInUserObj){ 26 | const serviceName = loginType(); 27 | let gitUrl = 'https://api.github.com'; 28 | if(serviceName === 'ghe') { 29 | let {gheURL} = ServiceConfiguration.configurations.findOne({ service: 'ghe' }, {fields: {gheURL: 1}}); 30 | gitUrl = sanitizeUrl(gheURL) + '/api/v3'; 31 | } 32 | 33 | const url = `${gitUrl}/user/memberships/orgs?state=active&per_page=100`; 34 | const token = OAuth.openSecret( loggedInUserObj.services[serviceName].accessToken, loggedInUserObj._id ); 35 | 36 | const options = { 37 | headers: { 38 | Authorization: `bearer ${token}`, 39 | 'User-Agent': 'razeedash' 40 | }, 41 | }; 42 | var response; 43 | try { 44 | response = HTTP.get(url, options); 45 | }catch(e){ 46 | log.info('http error', { e }); 47 | return false; 48 | } 49 | const data = response.data; 50 | if(!data){ 51 | return []; 52 | } 53 | // returns the list of user org objs 54 | return _.map(data, (item)=>{ 55 | var org = item.organization; 56 | if(!org){ 57 | throw new Meteor.Error('GitHub returned a role obj without an org'); 58 | } 59 | if(!item.role){ 60 | throw new Meteor.Error('GitHub returned a role obj with a role set'); 61 | } 62 | return { 63 | name: org.login, 64 | gheOrgId: org.id, 65 | role: item.role, 66 | url: org.url, 67 | desc: org.description, 68 | avatarUrl: org.avatar_url, 69 | }; 70 | }); 71 | } 72 | 73 | export { listOrgs }; 74 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "12" 4 | 5 | services: 6 | - docker 7 | 8 | before_install: 9 | # project unique tools 10 | - curl https://install.meteor.com | /bin/sh 11 | - export PATH="$HOME/.meteor:$PATH" 12 | - if [[ `npm -v` != 6* ]]; then npm i -g npm@latest; fi 13 | - echo "$DOCKERHUB_TOKEN" | docker login -u "icdevops" --password-stdin 14 | 15 | install: 16 | - meteor npm i 17 | 18 | script: 19 | # Audit npm packages. Fail build whan a PR audit fails, otherwise report the vulnerability and proceed. 20 | - if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then npx audit-ci --low; else npx audit-ci --low || true; fi || travis_terminate 1 21 | - npm run lint || travis_terminate 1 22 | - npm test || travis_terminate 1 23 | - meteor build --directory .build --architecture=os.linux.x86_64 --server-only 24 | - export HASH=`git log --pretty=format:'%h' -n 1` 25 | - docker build --build-arg BUILD_ID=${TRAVIS_BUILD_NUMBER} --build-arg LAST_COMMIT_ID=${HASH} --pull --rm -t "quay.io/razee/razeedash:${TRAVIS_COMMIT}" . 26 | - if [ -n "${TRAVIS_TAG}" ]; then docker tag quay.io/razee/razeedash:${TRAVIS_COMMIT} quay.io/razee/razeedash:${TRAVIS_TAG}; fi 27 | #- if [ "${TRAVIS_BRANCH}" = "master" ]; then export TRAVIS_TAG="master"; docker tag quay.io/razee/razeedash:${TRAVIS_COMMIT} quay.io/razee/razeedash:${TRAVIS_TAG}; fi 28 | - docker images 29 | - ./build/process-template.sh kubernetes/razeedash/resource.yaml >/tmp/resource.yaml 30 | 31 | before_deploy: 32 | - docker login -u="${QUAY_ID}" -p="${QUAY_TOKEN}" quay.io 33 | 34 | deploy: 35 | # Deploy master builds 36 | # - provider: script 37 | # script: docker push "quay.io/razee/razeedash:${TRAVIS_TAG}" 38 | # skip_cleanup: true 39 | # on: 40 | # branch: master 41 | # - provider: releases 42 | # file: /tmp/resource.yaml 43 | # overwrite: true 44 | # skip_cleanup: true 45 | # prerelease: true 46 | # on: 47 | # branch: master 48 | # api_key: "${GITHUB_TOKEN}" 49 | 50 | # Deploy alpha builds 51 | - provider: script 52 | script: docker push "quay.io/razee/razeedash:${TRAVIS_TAG}" 53 | skip_cleanup: true 54 | on: 55 | tags: true 56 | condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+_[0-9]{3}$ 57 | 58 | # Deploy released builds 59 | - provider: script 60 | script: docker push "quay.io/razee/razeedash:${TRAVIS_TAG}" 61 | skip_cleanup: true 62 | on: 63 | tags: true 64 | condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ 65 | - provider: releases 66 | file: /tmp/resource.yaml 67 | skip_cleanup: true 68 | on: 69 | tags: true 70 | condition: ${TRAVIS_TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ 71 | api_key: "${GITHUB_TOKEN}" 72 | name: "${TRAVIS_TAG}" 73 | -------------------------------------------------------------------------------- /imports/ui/components/cluster/resources/component.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | 21 | 43 | 44 | 66 | -------------------------------------------------------------------------------- /imports/ui/pages/cluster/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './page.scss'; 18 | import './page.html'; 19 | import '../../components/cluster/details'; 20 | import '../../components/cluster/resources'; 21 | import '../../components/cluster/updaterMessages'; 22 | import '../../components/cluster/webhooks'; 23 | import '../../components/cluster/comments'; 24 | import moment from 'moment'; 25 | import { Messages } from '/imports/api/message/messages.js'; 26 | import { Template } from 'meteor/templating'; 27 | import { FlowRouter } from 'meteor/kadira:flow-router'; 28 | 29 | Template.cluster.helpers({ 30 | collapsable() { 31 | return !Template.currentData().notCollapsable; 32 | }, 33 | updaterMessagesByClusterId(clusterId) { 34 | return Messages.find({ 35 | cluster_id: clusterId, 36 | updated: { $gte: new moment().subtract(1, 'hour').toDate() } 37 | }, { sort: { updated: -1 } }); 38 | }, 39 | hasUpdaterMessages(clusterId) { 40 | return Messages.find({ 41 | cluster_id: clusterId, 42 | updated: { $gte: new moment().subtract(1, 'hour').toDate() } 43 | }).count() > 0; 44 | }, 45 | updaterMessagesByClusterIdCountStr(clusterId) { 46 | var count = Messages.find({ cluster_id: clusterId }).count(); 47 | if (count > 99) { 48 | // stops at 99 because we have a limit 100 on the publisher 49 | count = '99+'; 50 | } 51 | return count || '0'; 52 | }, 53 | commentCountStr() { 54 | return (this.cluster.comments || []).length; 55 | }, 56 | hasComments() { 57 | return ((this.cluster.comments || []).length > 0); 58 | }, 59 | isActiveTab(tabId) { 60 | if ( FlowRouter.getParam('tabId') === tabId ) { 61 | return 'active'; 62 | } 63 | return false; 64 | } 65 | }); 66 | 67 | Template.cluster.onCreated(function() { 68 | this.autorun(() => { 69 | const clusterId = Template.currentData().cluster.cluster_id; 70 | this.subscribe('messages.byCluster', clusterId); 71 | }); 72 | }); 73 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/version/index.js: -------------------------------------------------------------------------------- 1 | 2 | import './page.html'; 3 | import { Meteor } from 'meteor/meteor'; 4 | import { Template } from 'meteor/templating'; 5 | import { DeployableVersions } from '/imports/api/deployables/channels/deployableVersions'; 6 | import { FlowRouter } from 'meteor/kadira:flow-router'; 7 | import { Session } from 'meteor/session'; 8 | import { ReactiveVar } from 'meteor/reactive-var'; 9 | import ace from 'ace-builds/src-min-noconflict/ace'; 10 | // eslint-disable-next-line 11 | import yamlMode from 'ace-builds/src-min-noconflict/mode-yaml'; 12 | 13 | import Clipboard from 'clipboard'; 14 | 15 | Template.version_details.onRendered( () => { 16 | const clipboard = new Clipboard('.copy-button'); 17 | clipboard.on('success', function(e) { 18 | $(e.trigger).tooltip('show'); 19 | e.clearSelection(); 20 | setTimeout(function() { 21 | $(e.trigger).tooltip('dispose'); 22 | }, 800); 23 | }); 24 | }); 25 | 26 | Template.channel_version.onCreated(function() { 27 | const self = this; 28 | self.versionContent = new ReactiveVar('Loading resource...'); 29 | const channelId = FlowRouter.current().params.id; 30 | const versionId= FlowRouter.current().params.versionId; 31 | Meteor.call('getChannelVersion', Session.get('currentOrgId'), channelId, versionId, (err, response) => { 32 | if (err) { 33 | self.versionContent.set(err.error); 34 | } 35 | else { 36 | self.versionContent.set(response.data.channelVersion.content); 37 | } 38 | }); 39 | }); 40 | 41 | Template.channel_version.onRendered(function() { 42 | this.autorun(()=>{ 43 | Meteor.subscribe('deployableVersions', Session.get('currentOrgId')); 44 | Meteor.subscribe('channels', Session.get('currentOrgId')); 45 | }); 46 | const template = Template.instance(); 47 | template.editor = ace.edit( 'editor' ); 48 | template.editor.setShowPrintMargin(false); 49 | template.editor.session.setMode( 'ace/mode/yaml' ); 50 | }); 51 | 52 | Template.channel_version.helpers({ 53 | version() { 54 | const channelId = FlowRouter.current().params.id; 55 | const versionId= FlowRouter.current().params.versionId; 56 | const version = DeployableVersions.findOne({'org_id': Session.get('currentOrgId'), 'channel_id': channelId, 'uuid': versionId}, { sort: { 'created': -1 }}); 57 | return version; 58 | }, 59 | resourceDetails() { 60 | const template = Template.instance(); 61 | if(template.editor) { 62 | template.editor.setValue(template.versionContent.get()); 63 | template.editor.gotoLine(1); 64 | } 65 | return Template.instance().versionContent.get(); 66 | }, 67 | }); 68 | -------------------------------------------------------------------------------- /imports/ui/style/_colors.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // UI Color Scheme 18 | $color__blue-20 : #7cc7ff !default; 19 | $color__blue-30 : #5aaafa !default; 20 | $color__blue-40 : #5596e6 !default; 21 | $color__blue-50 : #4178be !default; 22 | $color__blue-90 : #152935 !default; 23 | $color__navy-gray-1: #0f212e !default; 24 | $color__navy-gray-2: #20343e !default; 25 | $color__navy-gray-3: #2d3f49 !default; 26 | $color__navy-gray-4: #394b54 !default; 27 | $color__navy-gray-5: #42535c !default; 28 | $color__navy-gray-6: #5a6872 !default; 29 | $color__navy-gray-7: #8c9ba5 !default; 30 | $color__navy-gray-8: #dfe6eb !default; 31 | $color__navy-gray-9: #eff2f5 !default; 32 | $color__white : #fff !default; 33 | 34 | // Light UI Color Scheme 35 | $color__blue-51 : #3d70b2 !default; 36 | $color__gray-1 : #dfe3e6 !default; 37 | $color__gray-2 : #f0f3f6 !default; 38 | $color__gray-3 : #f3f3f3 !default; 39 | 40 | // Accent Colors 41 | $color__blue-10 : #c0e6ff !default; 42 | $color__blue-60 : #325c80 !default; 43 | $color__teal-10 : #a7fae6 !default; 44 | $color__teal-20 : #6eedd8 !default; 45 | $color__teal-30 : #41d6c3 !default; 46 | $color__teal-40 : #00b4a0 !default; 47 | $color__teal-50 : #008571 !default; 48 | $color__teal-60 : #006d5d !default; 49 | $color__green-10 : #c8f08f !default; 50 | $color__green-20 : #b4e051 !default; 51 | $color__green-30 : #8cd211 !default; 52 | $color__green-40 : #5aa700 !default; 53 | $color__green-50 : #4b8400 !default; 54 | $color__green-60 : #2d660a !default; 55 | $color__yellow-10: #fde876 !default; 56 | $color__yellow-20: #fdd600 !default; 57 | $color__yellow-30: #efc100 !default; 58 | $color__yellow-60: #735f00 !default; 59 | $color__orange-10: #ffd4a0 !default; 60 | $color__orange-20: #ffa573 !default; 61 | $color__orange-30: #ff7832 !default; 62 | $color__orange-60: #a53725 !default; 63 | $color__red-10 : #ffd2dd !default; 64 | $color__red-30 : #ff7d87 !default; 65 | $color__red-40 : #ff5050 !default; 66 | $color__red-50 : #e71d32 !default; 67 | $color__red-60 : #ad1625 !default; 68 | $color__purple-10: #eed2ff !default; 69 | $color__purple-20: #d7aaff !default; 70 | $color__purple-30: #ba8ff7 !default; 71 | $color__purple-40: #af6ee8 !default; 72 | $color__purple-60: #734098 !default; 73 | -------------------------------------------------------------------------------- /imports/ui/pages/deployables/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { Meteor } from 'meteor/meteor'; 18 | import { Clusters } from '/imports/api/cluster/clusters/clusters.js'; 19 | import _ from 'lodash'; 20 | 21 | const addClustersToGroup = (orgId, uuid, clusterIds) => { 22 | return new Promise((resolve, reject) => { 23 | Meteor.call('groupClusters', orgId, uuid, clusterIds, (error, results) => { 24 | error ? reject(error) : resolve(results); 25 | }); 26 | }); 27 | }; 28 | 29 | const removeClustersFromGroup = (orgId, uuid, clusterIds) => { 30 | return new Promise((resolve, reject) => { 31 | Meteor.call('unGroupClusters', orgId, uuid, clusterIds, (error, results) => { 32 | error ? reject(error) : resolve(results); 33 | }); 34 | }); 35 | }; 36 | 37 | const updateClusterGroup = async (orgId, uuid, newClusterIds) => { 38 | 39 | const currentClusterList = Clusters.find({ org_id: orgId, 'groups.uuid': {$in: [uuid]}}, {fields: {cluster_id: 1}}).fetch(); 40 | const currentClusterIds = currentClusterList.map( (cluster) => cluster.cluster_id); 41 | 42 | const clustersToAdd = _.difference(newClusterIds, currentClusterIds); 43 | if(clustersToAdd.length > 0) { 44 | try { 45 | await addClustersToGroup(orgId, uuid, clustersToAdd); 46 | } catch (error) { 47 | return new Meteor.Error(error.error); 48 | } 49 | } 50 | 51 | const clustersToDelete = _.difference(currentClusterIds, newClusterIds); 52 | if(clustersToDelete.length > 0) { 53 | try { 54 | await removeClustersFromGroup(orgId, uuid, clustersToDelete); 55 | } catch (error) { 56 | return new Meteor.Error(error.error); 57 | } 58 | } 59 | return; 60 | }; 61 | 62 | const clusterName = (cluster) => { 63 | let name; 64 | if(cluster) { 65 | if(cluster.registration && cluster.registration.name) { 66 | name = cluster.registration.name; 67 | } else if(cluster.metadata && cluster.metadata.name) { 68 | name = cluster.metadata.name; 69 | } else { 70 | name = cluster.cluster_id; 71 | } 72 | } 73 | return name; 74 | }; 75 | 76 | exports.updateClusterGroup = updateClusterGroup; 77 | exports.clusterName = clusterName; 78 | -------------------------------------------------------------------------------- /imports/api/cluster/clusters/server/publications.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { check } from 'meteor/check'; 18 | import { Meteor } from 'meteor/meteor'; 19 | import { Clusters } from '../clusters.js'; 20 | import { Match } from 'meteor/check'; 21 | import utils from '/imports/both/utils.js'; 22 | import { requireOrgAccess } from '/imports/api/org/utils.js'; 23 | import moment from 'moment'; 24 | 25 | Meteor.publish('clusters.zombie', function(orgId) { 26 | requireOrgAccess(orgId); 27 | return Clusters.find({ 28 | org_id: orgId, 29 | updated: { $lt: new moment().subtract(1, 'day').toDate() } 30 | }, { 31 | sort: { updated: 1 }, 32 | fields: { 33 | org_id: 1, 34 | 'cluster_id': 1, 35 | 'cluster_name': 1, 36 | 'metadata.name': 1, 37 | 'cluster_lock': 1, 38 | 'updated': 1, 39 | }, 40 | limit: 10, 41 | }); 42 | }); 43 | 44 | Meteor.publish('clusters.org', function(orgId) { 45 | check( orgId, String ); 46 | requireOrgAccess(orgId); 47 | return Clusters.find({ org_id: orgId }, {pollingIntervalMs: 1000}); 48 | }); 49 | 50 | Meteor.publish('clusters.id', function(orgId, clusterId) { 51 | check( orgId, String ); 52 | check( clusterId, String ); 53 | requireOrgAccess(orgId); 54 | return Clusters.find({ org_id: orgId, cluster_id: clusterId }); 55 | }); 56 | 57 | Meteor.publish('clusterSearch', function(orgId, searchStr, limit=50) { 58 | requireOrgAccess(orgId); 59 | check( orgId, String ); 60 | check( searchStr, String ); 61 | check( limit, Match.Maybe(Number) ); 62 | limit = limit || 50; 63 | var options = { 64 | sort: [ 65 | ['cluster_name', 1] 66 | ], 67 | fields: { 68 | org_id: 1, 69 | cluster_id: 1, 70 | updated: 1, 71 | 'metadata.name': 1, 72 | 'metadata.cluster_lock': 1, 73 | 'metadata.kube_version': 1, 74 | 'metadata.last_updater_message': 1 75 | }, 76 | limit: limit, 77 | }; 78 | if (!searchStr) { 79 | return Clusters.find({org_id: orgId}, {...options, sort: {created: -1}}); 80 | } 81 | var search = utils.buildSearchForClusterName(orgId, searchStr); 82 | return Clusters.find(search, options); 83 | }); 84 | -------------------------------------------------------------------------------- /imports/ui/components/addCluster/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 IBM Corp. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import './component.html'; 18 | import './component.scss'; 19 | 20 | import { Meteor } from 'meteor/meteor'; 21 | import { Template } from 'meteor/templating'; 22 | import Clipboard from 'clipboard'; 23 | import { Session } from 'meteor/session'; 24 | import { ReactiveVar } from 'meteor/reactive-var'; 25 | import toastr from 'toastr'; 26 | 27 | const kubeCommand = new ReactiveVar(); 28 | const errorState = new ReactiveVar(); 29 | 30 | Template.addCluster.onRendered( () => { 31 | const clipboard = new Clipboard('.copy-button', { 32 | container: document.getElementById('add-cluster-modal') 33 | }); 34 | clipboard.on('success', function(e) { 35 | $(e.trigger).tooltip('show'); 36 | e.clearSelection(); 37 | setTimeout(function() { 38 | $(e.trigger).tooltip('dispose'); 39 | }, 800); 40 | }); 41 | }); 42 | 43 | Template.addCluster.events({ 44 | 'click .js-register-cluster'(e) { 45 | e.preventDefault(); 46 | kubeCommand.set(false); 47 | errorState.set(false); 48 | $('#js-new-cluster').removeClass('is-invalid'); 49 | const clusterName = $('#js-new-cluster').val(); 50 | 51 | if(!clusterName|| clusterName.length == 0) { 52 | $('#js-new-cluster').addClass('is-invalid').focus(); 53 | return false; 54 | } 55 | 56 | Meteor.call('registerCluster', Session.get('currentOrgId'), clusterName, (error, response)=>{ 57 | if(error) { 58 | toastr.error(error.error, 'Error adding the channel'); 59 | $('#js-new-cluster').addClass('is-invalid').focus(); 60 | Meteor.setTimeout(function(){ 61 | errorState.set(error.error); 62 | }, 100); 63 | return false; 64 | } else { 65 | Meteor.setTimeout(function(){ 66 | kubeCommand.set(`kubectl apply -f ${response.data.registerCluster.url}`); 67 | }, 100); 68 | return false; 69 | } 70 | }); 71 | } 72 | }); 73 | 74 | Template.addCluster.helpers({ 75 | kubeCommand() { 76 | return kubeCommand.get(); 77 | }, 78 | registrationError() { 79 | return errorState.get(); 80 | }, 81 | }); --------------------------------------------------------------------------------