├── .nvmrc ├── widgets ├── executionLogs │ ├── README.md │ ├── widget.png │ └── src │ │ ├── consts.ts │ │ └── types.ts ├── sites │ ├── src │ │ ├── widget.consts.ts │ │ ├── widget.css │ │ └── widget.utils.ts │ └── widget.png ├── tokens │ ├── src │ │ ├── widget.consts.ts │ │ ├── TokensTableHeader │ │ │ ├── index.ts │ │ │ └── CreateTokenModal.types.ts │ │ ├── types.ts │ │ ├── widget.utils.ts │ │ └── TokensTable.consts.ts │ └── widget.png ├── deployments │ ├── src │ │ ├── widget.css │ │ └── FirstUserJourneyButtons │ │ │ ├── index.ts │ │ │ ├── images │ │ │ └── terraform_logo.png │ │ │ └── styles.tsx │ └── widget.png ├── blueprintCatalog │ ├── src │ │ ├── UploadingMessage │ │ │ ├── index.ts │ │ │ └── UploadingMessage.styles.tsx │ │ ├── widget.css │ │ ├── AuthenticationWarning.tsx │ │ ├── consts.ts │ │ └── ExternalBlueprintImage.tsx │ └── widget.png ├── executions │ ├── src │ │ ├── widget.utils.ts │ │ ├── tasksGraph │ │ │ ├── States.ts │ │ │ └── GraphEdges.tsx │ │ ├── DryRunIcon.tsx │ │ └── SystemWorkflowIcon.tsx │ └── widget.png ├── snapshots │ ├── src │ │ ├── widget.common.ts │ │ └── widget.types.ts │ └── widget.png ├── nodes │ ├── widget.png │ └── src │ │ ├── common.ts │ │ └── NodeType.tsx ├── text │ └── widget.png ├── agents │ ├── widget.png │ └── src │ │ ├── utils.tsx │ │ └── consts.ts ├── blueprints │ ├── src │ │ ├── widget.utils.ts │ │ └── widget.css │ └── widget.png ├── events │ ├── widget.png │ └── src │ │ └── widget.css ├── filter │ ├── widget.png │ └── src │ │ └── types.ts ├── filters │ ├── widget.png │ └── src │ │ ├── types.ts │ │ ├── FilterAddModal.tsx │ │ └── FilterEditModal.tsx ├── inputs │ ├── widget.png │ └── README.md ├── labels │ ├── widget.png │ └── src │ │ ├── widget.css │ │ └── AddLabelsModal.tsx ├── outputs │ ├── widget.png │ └── src │ │ └── types.ts ├── plugins │ └── widget.png ├── secrets │ ├── widget.png │ └── src │ │ ├── widget.utils.ts │ │ └── widget.types.ts ├── tenants │ ├── widget.png │ └── src │ │ └── widget.types.ts ├── buttonLink │ └── widget.png ├── cloudNum │ ├── widget.png │ └── README.md ├── nodesStats │ ├── widget.png │ └── README.md ├── pluginsNum │ └── widget.png ├── serversNum │ ├── widget.png │ └── README.md ├── sitesMap │ ├── widget.png │ └── src │ │ ├── widget.css │ │ └── types.ts ├── topology │ └── widget.png ├── userGroups │ ├── widget.png │ └── src │ │ ├── consts.ts │ │ └── widget.types.ts ├── blueprintNum │ └── widget.png ├── cloudButton │ └── widget.png ├── composerLink │ ├── widget.png │ └── README.md ├── eventsFilter │ ├── widget.png │ └── src │ │ └── widget.tsx ├── executionNum │ ├── widget.png │ └── README.md ├── blueprintInfo │ ├── widget.png │ └── src │ │ └── types.ts ├── deploymentInfo │ ├── widget.png │ └── src │ │ ├── consts.ts │ │ └── utils.ts ├── deploymentNum │ └── widget.png ├── deploymentsView │ └── widget.png ├── nodesComputeNum │ ├── widget.png │ └── README.md ├── onlyMyResources │ ├── widget.png │ ├── README.md │ └── src │ │ └── widget.tsx ├── pluginsCatalog │ ├── widget.png │ ├── README.md │ └── src │ │ └── types.ts ├── secretProviders │ ├── widget.png │ ├── src │ │ └── widget.consts.ts │ └── README.md ├── serviceButton │ └── widget.png ├── userManagement │ ├── widget.png │ └── src │ │ ├── getWidgetT.ts │ │ └── widget.types.ts ├── blueprintSources │ ├── widget.png │ └── src │ │ └── widget.css ├── deploymentButton │ └── widget.png ├── environmentButton │ ├── widget.png │ └── src │ │ └── widget.consts.ts ├── executionsStatus │ ├── widget.png │ └── README.md ├── highAvailability │ ├── widget.png │ └── src │ │ └── widget.tsx ├── pluginUploadButton │ ├── widget.png │ └── README.md ├── blueprintActionButtons │ ├── widget.png │ └── src │ │ ├── consts.ts │ │ └── utils.ts ├── blueprintUploadButton │ └── widget.png ├── maintenanceModeButton │ └── widget.png ├── deploymentActionButtons │ ├── widget.png │ ├── src │ │ ├── widget.utils.ts │ │ ├── widget.consts.ts │ │ └── widget.types.ts │ └── README.md ├── deploymentsViewDrilledDown │ ├── widget.png │ └── README.md └── tsconfig.json ├── backend ├── .npmrc ├── routes │ ├── Style.types.ts │ ├── External.types.ts │ ├── File.types.ts │ ├── Filters.types.ts │ ├── Executions.types.ts │ ├── blueprints │ │ └── Environment.types.ts │ ├── BlueprintUserData.types.ts │ ├── Config.ts │ ├── UserApp.types.ts │ ├── GitHub.types.ts │ ├── Filters.ts │ ├── index.d.ts │ ├── SourceBrowser.types.ts │ ├── ContactDetails.types.ts │ ├── Widgets.types.ts │ └── WidgetBackend.ts ├── handler │ ├── templates │ │ └── consts.ts │ ├── __mocks__ │ │ ├── ManagerHandler.ts │ │ └── AuthHandler.ts │ ├── FilterHandler.types.ts │ ├── services │ │ └── LoggerService.ts │ ├── WidgetsHandler.types.ts │ ├── SourceHandler.types.ts │ ├── widgets │ │ └── validateUniqueness.ts │ ├── EnvironmentHandler.types.ts │ └── BackendHandler.types.ts ├── test │ ├── routes │ │ ├── fixtures │ │ │ ├── example.txt │ │ │ └── snapshots │ │ │ │ └── widgets.zip │ │ ├── blueprints │ │ │ ├── fixtures │ │ │ │ └── terraform │ │ │ │ │ ├── template.zip │ │ │ │ │ ├── inputs_fetch-data.json │ │ │ │ │ ├── template_fetch-data.zip │ │ │ │ │ └── inputs_minimal.json │ │ │ └── common.ts │ │ ├── Style.test.ts │ │ ├── Widgets.test.ts │ │ └── GitHub.test.ts │ ├── mockDb.ts │ ├── handlers │ │ ├── fixtures │ │ │ └── ArchiveHelper.test.zip │ │ ├── widgets │ │ │ ├── installFiles.test.ts │ │ │ └── validateUniqueness.test.ts │ │ └── services │ │ │ ├── LoggerService.test.ts │ │ │ ├── ManagerService.test.ts │ │ │ └── RequestService.test.ts │ ├── fixtures │ │ └── userConfig.json │ ├── tsconfig.json │ ├── sharedUtils.test.ts │ ├── auth │ │ └── CookieStrategy.test.ts │ └── app.test.ts ├── babel.config.js ├── tsconfig.json ├── db │ ├── models │ │ ├── types.ts │ │ ├── BlueprintUserDataModel.types.ts │ │ ├── BlueprintAdditionsModel.types.ts │ │ └── WidgetBackendsModel.types.ts │ ├── __mocks__ │ │ └── Connection.ts │ └── types │ │ └── ResourceTypes.ts ├── migration.ts ├── migrations │ ├── 20170808104541-4_2-ResourceModelPageEnum.ts │ ├── common │ │ └── types.ts │ ├── 20220523121125-6_4-RemoveApplicationsTable.ts │ ├── 20220523115533-6_4-RemoveClientConfigsTable.ts │ ├── 20170821121958-4_2-ResourceModelJsonField.ts │ └── 20201230113319-5_1_1-UpdateManagerIp.ts ├── __mocks__ │ └── passport.ts ├── patches │ └── pg+8.7.3.patch ├── middleware │ └── checkIfFileUploadedMiddleware.ts └── jest.config.js ├── test ├── jest │ ├── stub.ts │ ├── widgets │ │ ├── topology │ │ │ └── data │ │ │ │ └── ExecutionsData.json │ │ └── common │ │ │ └── PollHelper.test.ts │ ├── setupFiles.ts │ ├── tsconfig.json │ └── i18n.ts └── cypress │ ├── fixtures │ ├── license │ │ ├── invalid_license.yaml │ │ ├── valid_spire_license.yaml │ │ ├── valid_trial_license.yaml │ │ ├── expired_trial_license.yaml │ │ └── tampered_paying_license.yaml │ ├── snapshots │ │ └── empty.zip │ ├── cluster_status │ │ └── summary-degraded.json │ ├── blueprints │ │ ├── empty.zip │ │ ├── labels.zip │ │ ├── outputs.zip │ │ ├── simple.zip │ │ ├── topology.zip │ │ ├── capabilities.zip │ │ ├── input_types.zip │ │ ├── component_app.zip │ │ ├── custom_plugin.zip │ │ ├── required_secrets.zip │ │ ├── workflow_parameters.zip │ │ ├── blueprint_with_image.zip │ │ ├── deploy_on_environment.zip │ │ ├── custom_install_workflow.zip │ │ ├── without_required_inputs.zip │ │ ├── deploy_on_with_suggestion.zip │ │ └── deploy_on_without_suggestion.zip │ ├── terraform │ │ ├── multiple.zip │ │ ├── single.zip │ │ └── variables-and-outputs.zip │ ├── widgets │ │ ├── testWidget.zip │ │ ├── testWidgetBackend.zip │ │ ├── testWidgetIncorrectFiles.zip │ │ ├── testWidgetInvalidPermission.zip │ │ ├── testWidgetSyntaxNotAllowed.zip │ │ ├── testWidgetMandatoryFieldMissing.zip │ │ ├── testWidgetMethodNotAllowedInService.zip │ │ └── testWidgetInstallIncorrectDirectoryName.zip │ ├── community │ │ └── config.json │ ├── babel.config.js │ └── configuration │ │ └── userConfig.json │ ├── support │ ├── component-index.html │ ├── resource_urls.ts │ └── cluster_status_commons.ts │ ├── components │ └── initAppContext.ts │ ├── .babelrc.json │ └── integration │ └── widgets │ ├── only_my_resources_spec.ts │ ├── cloud_num_spec.ts │ ├── text_spec.ts │ ├── cloud_button_spec.ts │ └── servers_num_spec.ts ├── semantic-ui ├── site │ ├── modules │ │ ├── embed.variables.less │ │ ├── dimmer.overrides.less │ │ ├── nag.overrides.less │ │ ├── popup.overrides.less │ │ ├── shape.overrides.less │ │ ├── tab.overrides.less │ │ ├── accordion.overrides.less │ │ ├── chatroom.overrides.less │ │ ├── embed.overrides.less │ │ ├── modal.overrides.less │ │ ├── rating.overrides.less │ │ ├── search.overrides.less │ │ ├── sticky.overrides.less │ │ ├── dimmer.variables.less │ │ ├── nag.variables.less │ │ ├── popup.variables.less │ │ ├── progress.overrides.less │ │ ├── shape.variables.less │ │ ├── tab.variables.less │ │ ├── transition.overrides.less │ │ ├── accordion.variables.less │ │ ├── chatroom.variables.less │ │ ├── modal.variables.less │ │ ├── progress.variables.less │ │ ├── rating.variables.less │ │ ├── search.variables.less │ │ ├── sidebar.variables.less │ │ ├── sticky.variables.less │ │ ├── transition.variables.less │ │ └── sidebar.overrides.less │ ├── elements │ │ ├── flag.variables.less │ │ ├── list.overrides.less │ │ ├── flag.overrides.less │ │ ├── image.overrides.less │ │ ├── label.overrides.less │ │ ├── rail.overrides.less │ │ ├── step.overrides.less │ │ ├── container.overrides.less │ │ ├── divider.overrides.less │ │ ├── header.overrides.less │ │ ├── header.variables.less │ │ ├── icon.variables.less │ │ ├── image.variables.less │ │ ├── list.variables.less │ │ ├── loader.overrides.less │ │ ├── loader.variables.less │ │ ├── rail.variables.less │ │ ├── reveal.overrides.less │ │ ├── reveal.variables.less │ │ ├── segment.overrides.less │ │ ├── step.variables.less │ │ ├── container.variables.less │ │ ├── divider.variables.less │ │ ├── segment.variables.less │ │ └── label.variables.less │ ├── views │ │ ├── ad.overrides.less │ │ ├── card.overrides.less │ │ ├── comment.overrides.less │ │ ├── feed.overrides.less │ │ ├── item.overrides.less │ │ ├── ad.variables.less │ │ ├── card.variables.less │ │ ├── feed.variables.less │ │ ├── item.variables.less │ │ ├── statistic.overrides.less │ │ ├── comment.variables.less │ │ └── statistic.variables.less │ ├── globals │ │ ├── reset.overrides.less │ │ ├── site.overrides.less │ │ └── reset.variables.less │ └── collections │ │ ├── grid.overrides.less │ │ ├── grid.variables.less │ │ ├── breadcrumb.variables.less │ │ ├── menu.variables.less │ │ ├── message.variables.less │ │ ├── table.variables.less │ │ ├── breadcrumb.overrides.less │ │ ├── menu.overrides.less │ │ └── message.overrides.less └── fonts │ └── cloudify-icons │ └── cloudify-icons.ttf ├── packaging ├── source_branch └── files │ ├── etc │ ├── sudoers.d │ │ └── cloudify-stage │ └── logrotate.d │ │ └── cloudify-stage │ └── usr │ └── lib │ └── systemd │ └── system │ └── cloudify-stage.service ├── app ├── components │ ├── routes │ │ ├── index.ts │ │ └── LogoPage.tsx │ ├── common │ │ ├── Link.ts │ │ └── status │ │ │ ├── cluster │ │ │ └── ClusterServicesOverview.css │ │ │ └── SystemStatusIcon.tsx │ ├── page │ │ ├── content │ │ │ ├── widgets │ │ │ │ └── dynamicContent │ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── PageContent.css │ │ └── editMode │ │ │ └── EditModeButton.css │ ├── overlays │ │ ├── contactDetails │ │ │ ├── ContactDetailsModalContent │ │ │ │ ├── index.ts │ │ │ │ ├── utils.ts │ │ │ │ └── CheckboxLabel.tsx │ │ │ └── index.ts │ │ └── gettingStarted │ │ │ ├── steps │ │ │ ├── SecretsStep │ │ │ │ └── index.ts │ │ │ ├── SummaryStep │ │ │ │ ├── index.ts │ │ │ │ └── descriptions.tsx │ │ │ └── EnvironmentsStep │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── secrets │ │ │ └── model.ts │ │ │ ├── plugins │ │ │ └── model.ts │ │ │ ├── common │ │ │ └── icons.tsx │ │ │ └── useCloudSetupUrlParam.ts │ ├── sidebar │ │ ├── fonts.ts │ │ └── SideBarItemIcon.tsx │ ├── templateManagement │ │ ├── templates │ │ │ └── types.ts │ │ ├── pages │ │ │ └── useCreatePageId.ts │ │ └── common │ │ │ └── ItemsCount.tsx │ └── license │ │ └── EulaLink.tsx ├── main.ts ├── images │ ├── clouds.png │ ├── k8s_logo.png │ ├── services.png │ ├── terraform.png │ ├── k8s_logo_dark.png │ ├── marker-shadow.png │ ├── terraform_logo.png │ ├── marker-icon-blue.png │ ├── marker-icon-grey.png │ ├── marker-icon-red.png │ ├── marker-icon-green.png │ ├── marker-icon-yellow.png │ └── terraform_logo-dark.png ├── widgets │ └── common │ │ ├── deployModal │ │ ├── BlueprintDropdown │ │ │ ├── index.ts │ │ │ ├── SuggestedBlueprintDropdown.consts.ts │ │ │ ├── BlueprintDropdown.consts.ts │ │ │ └── SuggestedBlueprintDropdown.types.ts │ │ ├── EnvironmentDropdown │ │ │ ├── index.ts │ │ │ └── EnvironmentDropdown.consts.ts │ │ └── useFetchTrigger.ts │ │ ├── terraformModal │ │ ├── index.ts │ │ └── TerraformModal.css │ │ ├── inputs │ │ ├── consts.ts │ │ ├── utils │ │ │ ├── blueprintIdContext.ts │ │ │ ├── deploymentIdContext.ts │ │ │ ├── translateInputs.ts │ │ │ ├── index.ts │ │ │ ├── getPlanForUpdate.ts │ │ │ ├── getConstraintValueFunction.ts │ │ │ └── errors.ts │ │ ├── index.ts │ │ ├── InputsHelpIcon.tsx │ │ └── fields │ │ │ └── GenericInputField.tsx │ │ ├── configuration │ │ └── index.ts │ │ ├── deploymentsView │ │ ├── header │ │ │ ├── RunWorkflowModal.consts.ts │ │ │ ├── filter │ │ │ │ └── common.ts │ │ │ ├── common.ts │ │ │ ├── ExecutionGroupsActions.ts │ │ │ └── RunWorkflowModal.types.ts │ │ ├── map │ │ │ ├── index.ts │ │ │ ├── marker │ │ │ │ └── index.ts │ │ │ └── common.ts │ │ ├── table │ │ │ ├── index.ts │ │ │ └── no-data-image.png │ │ ├── detailsPane │ │ │ ├── header.scss │ │ │ └── drilldownButtons │ │ │ │ └── common.ts │ │ └── index.ts │ │ ├── labels │ │ ├── types.ts │ │ ├── common.ts │ │ ├── DuplicationErrorPopup.tsx │ │ ├── LabelErrorPopup.tsx │ │ ├── index.ts │ │ └── ValidationErrorPopup.tsx │ │ ├── roles │ │ ├── types.ts │ │ ├── index.ts │ │ └── utils.ts │ │ ├── secrets │ │ └── index.ts │ │ ├── components │ │ ├── parameter │ │ │ └── index.ts │ │ ├── GridWrapper.tsx │ │ ├── DynamicDropdown.css │ │ └── IconButtonsGroup.tsx │ │ ├── executions │ │ └── index.ts │ │ ├── actions │ │ └── index.ts │ │ ├── filters │ │ ├── resourceTypeContext.ts │ │ ├── inputs │ │ │ ├── types.ts │ │ │ ├── CreatorValueInput.tsx │ │ │ ├── SiteNameValueInput.tsx │ │ │ ├── TenantNameValueInput.tsx │ │ │ └── BlueprintValueInput.tsx │ │ ├── index.ts │ │ ├── AddRuleButton.tsx │ │ └── RuleRemoveButton.tsx │ │ ├── tenants │ │ ├── index.ts │ │ └── utils.ts │ │ ├── events │ │ └── index.ts │ │ ├── types.ts │ │ ├── plugins │ │ ├── index.ts │ │ └── PluginIcon.tsx │ │ ├── deployments │ │ ├── index.ts │ │ ├── DeploymentUpdatesActions.ts │ │ └── useSitesExist.ts │ │ ├── map │ │ ├── MarkerIcon.ts │ │ └── DefaultTileLayer.tsx │ │ └── blueprints │ │ ├── index.ts │ │ └── UploadedBlueprintImage.tsx ├── typings │ ├── styles.d.ts │ └── images.d.ts ├── utils │ ├── __mocks__ │ │ └── SplashLoadingScreen.ts │ ├── ErrorCodes.ts │ ├── props │ │ ├── StringOrArray.ts │ │ ├── index.ts │ │ ├── AnyDataPropType.ts │ │ ├── LayoutPropType.ts │ │ └── Toolbox.ts │ ├── shared │ │ ├── combineClassNames.ts │ │ └── IdpUtils.ts │ ├── hooks │ │ ├── useRefreshEvent.ts │ │ ├── useManager.ts │ │ └── useEventListener.ts │ ├── types.ts │ └── ConfigLoader.ts ├── reducers │ └── managerReducer │ │ ├── index.ts │ │ └── emptyState.ts ├── actions │ ├── config.ts │ └── manager │ │ └── version.ts ├── tsconfig.json ├── index.tmpl.html └── styles │ └── colors.scss ├── doc ├── screenshot.png └── diagrams │ └── README.md ├── .nycrc ├── .prettierrc.js ├── .browserslistrc ├── scripts ├── tsconfig.json ├── buildWidget.sh └── checkJsonFiles.sh ├── conf ├── manager.json ├── db.options.json ├── logging.json ├── me.json.template └── app.json ├── templates ├── page-groups │ ├── deployments.json │ ├── resources.json │ └── systemSetup.json ├── customer.json ├── README.md ├── pages │ ├── sites.json │ ├── agents.json │ ├── filters.json │ ├── plugins.json │ ├── snapshots.json │ ├── users.json │ ├── groups.json │ ├── tenants.json │ ├── health.json │ ├── tokens.json │ ├── drilldownDeployments.json │ └── environments.json ├── main-default.json ├── community.json └── main-sys_admin.json ├── tsconfig.ui.json ├── cypress.config.ts ├── .eslintignore ├── tsconfig.base.json ├── .dockerignore ├── .gitignore ├── tsconfig.json ├── .editorconfig └── babel.config.js /.nvmrc: -------------------------------------------------------------------------------- 1 | v18.20.4 2 | -------------------------------------------------------------------------------- /widgets/executionLogs/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/.npmrc: -------------------------------------------------------------------------------- 1 | unsafe-perm = true 2 | -------------------------------------------------------------------------------- /test/jest/stub.ts: -------------------------------------------------------------------------------- 1 | export default {}; 2 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/embed.variables.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packaging/source_branch: -------------------------------------------------------------------------------- 1 | export CORE_BRANCH="master" 2 | -------------------------------------------------------------------------------- /test/cypress/fixtures/license/invalid_license.yaml: -------------------------------------------------------------------------------- 1 | invalid -------------------------------------------------------------------------------- /test/cypress/fixtures/snapshots/empty.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /test/cypress/support/component-index.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /app/components/routes/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Routes'; 2 | -------------------------------------------------------------------------------- /backend/routes/Style.types.ts: -------------------------------------------------------------------------------- 1 | export type GetStyleResponse = string; 2 | -------------------------------------------------------------------------------- /widgets/sites/src/widget.consts.ts: -------------------------------------------------------------------------------- 1 | export const widgetId = 'sites'; 2 | -------------------------------------------------------------------------------- /widgets/tokens/src/widget.consts.ts: -------------------------------------------------------------------------------- 1 | export const widgetId = 'tokens'; 2 | -------------------------------------------------------------------------------- /app/main.ts: -------------------------------------------------------------------------------- 1 | import app from './app'; 2 | 3 | app.load().then(app.start); 4 | -------------------------------------------------------------------------------- /backend/handler/templates/consts.ts: -------------------------------------------------------------------------------- 1 | export const defaultUpdater = 'Manager'; 2 | -------------------------------------------------------------------------------- /widgets/deployments/src/widget.css: -------------------------------------------------------------------------------- 1 | .deploymentSegment { 2 | min-height: 8rem; 3 | } 4 | -------------------------------------------------------------------------------- /widgets/tokens/src/TokensTableHeader/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './TokensTableHeader'; 2 | -------------------------------------------------------------------------------- /backend/test/routes/fixtures/example.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 2 | -------------------------------------------------------------------------------- /doc/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/doc/screenshot.png -------------------------------------------------------------------------------- /app/components/common/Link.ts: -------------------------------------------------------------------------------- 1 | import { Link } from 'react-router-dom'; 2 | 3 | export default Link; 4 | -------------------------------------------------------------------------------- /app/images/clouds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/clouds.png -------------------------------------------------------------------------------- /app/widgets/common/deployModal/BlueprintDropdown/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './BlueprintDropdown'; 2 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/src/UploadingMessage/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './UploadingMessage'; 2 | -------------------------------------------------------------------------------- /widgets/executions/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | export const translate = Stage.Utils.getT('widgets.executions'); 2 | -------------------------------------------------------------------------------- /widgets/snapshots/src/widget.common.ts: -------------------------------------------------------------------------------- 1 | export const translate = Stage.Utils.getT('widgets.snapshots'); 2 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "branches": 77, 3 | "lines": 85, 4 | "functions": 83, 5 | "statements": 85 6 | } 7 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./node_modules/cloudify-ui-common-configs/prettier-common.json'); 2 | -------------------------------------------------------------------------------- /app/components/page/content/widgets/dynamicContent/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './WidgetDynamicContent'; 2 | -------------------------------------------------------------------------------- /app/images/k8s_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/k8s_logo.png -------------------------------------------------------------------------------- /app/images/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/services.png -------------------------------------------------------------------------------- /app/images/terraform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/terraform.png -------------------------------------------------------------------------------- /app/widgets/common/deployModal/EnvironmentDropdown/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './EnvironmentDropdown'; 2 | -------------------------------------------------------------------------------- /backend/routes/External.types.ts: -------------------------------------------------------------------------------- 1 | export interface GetExternalContentQueryParams { 2 | url: string; 3 | } 4 | -------------------------------------------------------------------------------- /widgets/deployments/src/FirstUserJourneyButtons/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './FirstUserJourneyButtons'; 2 | -------------------------------------------------------------------------------- /widgets/nodes/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/nodes/widget.png -------------------------------------------------------------------------------- /widgets/sites/src/widget.css: -------------------------------------------------------------------------------- 1 | .leaflet-container a:hover { 2 | text-decoration: none !important; 3 | } 4 | -------------------------------------------------------------------------------- /widgets/sites/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/sites/widget.png -------------------------------------------------------------------------------- /widgets/text/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/text/widget.png -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 2 Chrome versions 2 | last 2 Firefox versions 3 | last 2 Safari versions 4 | last 2 Edge versions -------------------------------------------------------------------------------- /scripts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../node_modules/cloudify-ui-common-configs/tsconfig.node.json" 3 | } 4 | -------------------------------------------------------------------------------- /test/cypress/components/initAppContext.ts: -------------------------------------------------------------------------------- 1 | import { initAppContext } from 'app/app'; 2 | 3 | initAppContext(); 4 | -------------------------------------------------------------------------------- /widgets/agents/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/agents/widget.png -------------------------------------------------------------------------------- /widgets/blueprints/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | export const translateBlueprints = Stage.Utils.getT('widgets.blueprints'); 2 | -------------------------------------------------------------------------------- /widgets/events/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/events/widget.png -------------------------------------------------------------------------------- /widgets/filter/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/filter/widget.png -------------------------------------------------------------------------------- /widgets/filters/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/filters/widget.png -------------------------------------------------------------------------------- /widgets/inputs/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/inputs/widget.png -------------------------------------------------------------------------------- /widgets/labels/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/labels/widget.png -------------------------------------------------------------------------------- /widgets/outputs/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/outputs/widget.png -------------------------------------------------------------------------------- /widgets/plugins/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/plugins/widget.png -------------------------------------------------------------------------------- /widgets/secrets/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/secrets/widget.png -------------------------------------------------------------------------------- /widgets/tenants/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/tenants/widget.png -------------------------------------------------------------------------------- /widgets/tokens/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/tokens/widget.png -------------------------------------------------------------------------------- /app/images/k8s_logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/k8s_logo_dark.png -------------------------------------------------------------------------------- /app/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-shadow.png -------------------------------------------------------------------------------- /app/images/terraform_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/terraform_logo.png -------------------------------------------------------------------------------- /semantic-ui/site/elements/flag.variables.less: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Flag Variables 3 | --------------------*/ 4 | -------------------------------------------------------------------------------- /test/cypress/fixtures/cluster_status/summary-degraded.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "Degraded", 3 | "services": {} 4 | } 5 | -------------------------------------------------------------------------------- /widgets/blueprints/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprints/widget.png -------------------------------------------------------------------------------- /widgets/buttonLink/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/buttonLink/widget.png -------------------------------------------------------------------------------- /widgets/cloudNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/cloudNum/widget.png -------------------------------------------------------------------------------- /widgets/executions/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/executions/widget.png -------------------------------------------------------------------------------- /widgets/nodesStats/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/nodesStats/widget.png -------------------------------------------------------------------------------- /widgets/pluginsNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/pluginsNum/widget.png -------------------------------------------------------------------------------- /widgets/serversNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/serversNum/widget.png -------------------------------------------------------------------------------- /widgets/sitesMap/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/sitesMap/widget.png -------------------------------------------------------------------------------- /widgets/snapshots/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/snapshots/widget.png -------------------------------------------------------------------------------- /widgets/topology/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/topology/widget.png -------------------------------------------------------------------------------- /widgets/userGroups/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/userGroups/widget.png -------------------------------------------------------------------------------- /app/images/marker-icon-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-icon-blue.png -------------------------------------------------------------------------------- /app/images/marker-icon-grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-icon-grey.png -------------------------------------------------------------------------------- /app/images/marker-icon-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-icon-red.png -------------------------------------------------------------------------------- /app/widgets/common/terraformModal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './TerraformModal'; 2 | export { default } from './TerraformModal'; 3 | -------------------------------------------------------------------------------- /widgets/blueprintNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintNum/widget.png -------------------------------------------------------------------------------- /widgets/cloudButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/cloudButton/widget.png -------------------------------------------------------------------------------- /widgets/composerLink/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/composerLink/widget.png -------------------------------------------------------------------------------- /widgets/deployments/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deployments/widget.png -------------------------------------------------------------------------------- /widgets/eventsFilter/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/eventsFilter/widget.png -------------------------------------------------------------------------------- /widgets/executionNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/executionNum/widget.png -------------------------------------------------------------------------------- /app/images/marker-icon-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-icon-green.png -------------------------------------------------------------------------------- /app/images/marker-icon-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/marker-icon-yellow.png -------------------------------------------------------------------------------- /app/images/terraform_logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/images/terraform_logo-dark.png -------------------------------------------------------------------------------- /app/widgets/common/inputs/consts.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_TEXTAREA_ROWS = 10; 2 | export const STRING_VALUE_SURROUND_CHAR = '"'; 3 | -------------------------------------------------------------------------------- /backend/handler/__mocks__/ManagerHandler.ts: -------------------------------------------------------------------------------- 1 | export const jsonRequest = jest.fn(); 2 | export const updateOptions = jest.fn(); 3 | -------------------------------------------------------------------------------- /conf/manager.json: -------------------------------------------------------------------------------- 1 | { 2 | "ip":"127.0.0.1", 3 | "apiVersion": "v3.1", 4 | "protocol" : "https", 5 | "port": "443" 6 | } 7 | -------------------------------------------------------------------------------- /widgets/blueprintInfo/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintInfo/widget.png -------------------------------------------------------------------------------- /widgets/deploymentInfo/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentInfo/widget.png -------------------------------------------------------------------------------- /widgets/deploymentNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentNum/widget.png -------------------------------------------------------------------------------- /widgets/deploymentsView/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentsView/widget.png -------------------------------------------------------------------------------- /widgets/executionLogs/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/executionLogs/widget.png -------------------------------------------------------------------------------- /widgets/nodesComputeNum/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/nodesComputeNum/widget.png -------------------------------------------------------------------------------- /widgets/onlyMyResources/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/onlyMyResources/widget.png -------------------------------------------------------------------------------- /widgets/pluginsCatalog/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/pluginsCatalog/widget.png -------------------------------------------------------------------------------- /widgets/secretProviders/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/secretProviders/widget.png -------------------------------------------------------------------------------- /widgets/serviceButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/serviceButton/widget.png -------------------------------------------------------------------------------- /widgets/userManagement/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/userManagement/widget.png -------------------------------------------------------------------------------- /app/components/overlays/contactDetails/ContactDetailsModalContent/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './ContactDetailsModalContent'; 2 | -------------------------------------------------------------------------------- /app/widgets/common/configuration/index.ts: -------------------------------------------------------------------------------- 1 | import Button from './buttonConfiguration'; 2 | 3 | export default { 4 | Button 5 | }; 6 | -------------------------------------------------------------------------------- /semantic-ui/site/views/ad.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintCatalog/widget.png -------------------------------------------------------------------------------- /widgets/blueprintSources/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintSources/widget.png -------------------------------------------------------------------------------- /widgets/deploymentButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentButton/widget.png -------------------------------------------------------------------------------- /widgets/environmentButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/environmentButton/widget.png -------------------------------------------------------------------------------- /widgets/executionsStatus/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/executionsStatus/widget.png -------------------------------------------------------------------------------- /widgets/highAvailability/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/highAvailability/widget.png -------------------------------------------------------------------------------- /widgets/tokens/src/types.ts: -------------------------------------------------------------------------------- 1 | export enum RequestStatus { 2 | INITIAL, 3 | SUBMITTING, 4 | SUBMITTED, 5 | ERROR 6 | } 7 | -------------------------------------------------------------------------------- /app/components/common/status/cluster/ClusterServicesOverview.css: -------------------------------------------------------------------------------- 1 | .servicesData a:hover { 2 | text-decoration: none !important; 3 | } 4 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/header/RunWorkflowModal.consts.ts: -------------------------------------------------------------------------------- 1 | export const fetchedWorkflowFields = ['name', 'parameters'] as const; 2 | -------------------------------------------------------------------------------- /backend/routes/File.types.ts: -------------------------------------------------------------------------------- 1 | export type PostFileTextResponse = string; 2 | export type PostFileYamlResponse = Record | any[]; 3 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/list.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/dimmer.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/nag.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/popup.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/shape.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/tab.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/card.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/comment.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/feed.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/item.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /widgets/nodes/src/common.ts: -------------------------------------------------------------------------------- 1 | export const widgetId = 'nodes'; 2 | export const translateWidget = Stage.Utils.getT(`widgets.${widgetId}`); 3 | -------------------------------------------------------------------------------- /widgets/pluginUploadButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/pluginUploadButton/widget.png -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/steps/SecretsStep/index.ts: -------------------------------------------------------------------------------- 1 | import SecretsStep from './SecretsStep'; 2 | 3 | export default SecretsStep; 4 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/steps/SummaryStep/index.ts: -------------------------------------------------------------------------------- 1 | import SummaryStep from './SummaryStep'; 2 | 3 | export default SummaryStep; 4 | -------------------------------------------------------------------------------- /app/typings/styles.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.scss' { 2 | const content: { [className: string]: string }; 3 | export default content; 4 | } 5 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/flag.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/image.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/label.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/rail.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/step.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/globals/reset.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/globals/site.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/accordion.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/chatroom.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/embed.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/modal.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/rating.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/search.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/sticky.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/ad.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/card.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/feed.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/item.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/statistic.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /templates/page-groups/deployments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Deployments", 3 | "icon": "rocket", 4 | "pages": ["services", "environments"] 5 | } 6 | -------------------------------------------------------------------------------- /widgets/blueprintActionButtons/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintActionButtons/widget.png -------------------------------------------------------------------------------- /widgets/blueprintUploadButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/blueprintUploadButton/widget.png -------------------------------------------------------------------------------- /widgets/maintenanceModeButton/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/maintenanceModeButton/widget.png -------------------------------------------------------------------------------- /widgets/userManagement/src/getWidgetT.ts: -------------------------------------------------------------------------------- 1 | export default function getWidgetT() { 2 | return Stage.Utils.getT('widgets.userManagement'); 3 | } 4 | -------------------------------------------------------------------------------- /app/components/overlays/contactDetails/index.ts: -------------------------------------------------------------------------------- 1 | import ContactDetailsModal from './ContactDetailsModal'; 2 | 3 | export default ContactDetailsModal; 4 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/index.ts: -------------------------------------------------------------------------------- 1 | import GettingStartedModal from './GettingStartedModal'; 2 | 3 | export default GettingStartedModal; 4 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/map/index.ts: -------------------------------------------------------------------------------- 1 | import DeploymentsMapContainer from './container'; 2 | 3 | export default DeploymentsMapContainer; 4 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/grid.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/container.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/divider.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/header.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/header.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/icon.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/image.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/list.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/loader.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/loader.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/rail.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/reveal.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/reveal.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/segment.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/step.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/globals/reset.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Global Variables 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/dimmer.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/nag.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/popup.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/progress.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/shape.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/tab.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/transition.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/comment.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/views/statistic.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/empty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/empty.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/labels.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/labels.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/outputs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/outputs.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/simple.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/simple.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/terraform/multiple.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/terraform/multiple.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/terraform/single.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/terraform/single.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidget.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidget.zip -------------------------------------------------------------------------------- /widgets/deploymentActionButtons/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentActionButtons/widget.png -------------------------------------------------------------------------------- /app/utils/__mocks__/SplashLoadingScreen.ts: -------------------------------------------------------------------------------- 1 | export default class SplashLoadingScreen { 2 | static turnOn() {} 3 | 4 | static turnOff() {} 5 | } 6 | -------------------------------------------------------------------------------- /backend/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'] 3 | }; 4 | -------------------------------------------------------------------------------- /backend/handler/FilterHandler.types.ts: -------------------------------------------------------------------------------- 1 | export interface FilterUses { 2 | pageName: string; 3 | widgetName: string; 4 | username: string; 5 | } 6 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/grid.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/container.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/divider.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/segment.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/accordion.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/chatroom.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/modal.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/progress.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/rating.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/search.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/sidebar.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/sticky.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /semantic-ui/site/modules/transition.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/topology.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/topology.zip -------------------------------------------------------------------------------- /widgets/deploymentsViewDrilledDown/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deploymentsViewDrilledDown/widget.png -------------------------------------------------------------------------------- /app/components/sidebar/fonts.ts: -------------------------------------------------------------------------------- 1 | import 'cloudify-ui-common-frontend/styles/font-JosefinSans-Bold.css'; 2 | 3 | export const productFont = 'JosefinSans-Bold'; 4 | -------------------------------------------------------------------------------- /app/widgets/common/deployModal/BlueprintDropdown/SuggestedBlueprintDropdown.consts.ts: -------------------------------------------------------------------------------- 1 | export const fetchedBlueprintFields = ['id', 'requirements'] as const; 2 | -------------------------------------------------------------------------------- /backend/routes/Filters.types.ts: -------------------------------------------------------------------------------- 1 | import type { FilterUses } from '../handler/FilterHandler.types'; 2 | 3 | export type GetFiltersUsageResponse = FilterUses[]; 4 | -------------------------------------------------------------------------------- /backend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/cloudify-ui-common-configs/tsconfig.node.json", 3 | "exclude": ["**/__mocks__/*", "test"] 4 | } 5 | -------------------------------------------------------------------------------- /conf/db.options.json: -------------------------------------------------------------------------------- 1 | { 2 | "dialect": "postgres", 3 | "pool": { 4 | "max": 20, 5 | "min": 1, 6 | "idle": 10000 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/capabilities.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/capabilities.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/input_types.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/input_types.zip -------------------------------------------------------------------------------- /widgets/sites/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | import { widgetId } from './widget.consts'; 2 | 3 | export const translateWidget = Stage.Utils.getT(`widgets.${widgetId}`); 4 | -------------------------------------------------------------------------------- /widgets/tokens/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | import { widgetId } from './widget.consts'; 2 | 3 | export const translateWidget = Stage.Utils.getT(`widgets.${widgetId}`); 4 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/steps/EnvironmentsStep/index.ts: -------------------------------------------------------------------------------- 1 | import EnvironmentsStep from './EnvironmentsStep'; 2 | 3 | export default EnvironmentsStep; 4 | -------------------------------------------------------------------------------- /app/widgets/common/labels/types.ts: -------------------------------------------------------------------------------- 1 | export interface Label { 2 | key: string; 3 | value: string; 4 | } 5 | 6 | export type LabelInputType = 'key' | 'value'; 7 | -------------------------------------------------------------------------------- /app/widgets/common/roles/types.ts: -------------------------------------------------------------------------------- 1 | import type Consts from '../Consts'; 2 | 3 | export type SystemRole = typeof Consts.sysAdminRole | typeof Consts.defaultUserRole; 4 | -------------------------------------------------------------------------------- /backend/test/mockDb.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore TypeScript not aware of 'db/Connection' extended with mocking function 2 | export { mockDb as default } from 'db/Connection'; 3 | -------------------------------------------------------------------------------- /backend/test/routes/fixtures/snapshots/widgets.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/backend/test/routes/fixtures/snapshots/widgets.zip -------------------------------------------------------------------------------- /semantic-ui/fonts/cloudify-icons/cloudify-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/semantic-ui/fonts/cloudify-icons/cloudify-icons.ttf -------------------------------------------------------------------------------- /semantic-ui/site/collections/breadcrumb.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/component_app.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/component_app.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/custom_plugin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/custom_plugin.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetBackend.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetBackend.zip -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/table/index.ts: -------------------------------------------------------------------------------- 1 | import DeploymentsTable from './DeploymentsTable'; 2 | 3 | export * from './columns'; 4 | export { DeploymentsTable }; 5 | -------------------------------------------------------------------------------- /backend/db/models/types.ts: -------------------------------------------------------------------------------- 1 | export interface CommonAttributes { 2 | readonly id?: number; 3 | readonly createdAt?: Date; 4 | readonly updatedAt?: Date; 5 | } 6 | -------------------------------------------------------------------------------- /backend/test/handlers/fixtures/ArchiveHelper.test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/backend/test/handlers/fixtures/ArchiveHelper.test.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/required_secrets.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/required_secrets.zip -------------------------------------------------------------------------------- /widgets/agents/src/utils.tsx: -------------------------------------------------------------------------------- 1 | export const translate = Stage.Utils.getT('widgets.agents'); 2 | export const translateColumn = Stage.Utils.composeT(translate, 'columns'); 3 | -------------------------------------------------------------------------------- /templates/page-groups/resources.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Resources", 3 | "icon": "server", 4 | "pages": ["secrets", "plugins", "sites", "agents", "filters", "tokens"] 5 | } 6 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/workflow_parameters.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/workflow_parameters.zip -------------------------------------------------------------------------------- /test/jest/widgets/topology/data/ExecutionsData.json: -------------------------------------------------------------------------------- 1 | [{"status": "terminated", "workflow_id": "create_deployment_environment", "id": "480ff8b5-2d42-4f26-bbf8-72e1d4982d21"}] 2 | -------------------------------------------------------------------------------- /widgets/labels/src/widget.css: -------------------------------------------------------------------------------- 1 | .labelsWidget .labelValueEditInput input { 2 | padding: 4px; 3 | } 4 | 5 | .labelsWidget .labelsTable { 6 | table-layout: fixed; 7 | } 8 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/table/no-data-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/app/widgets/common/deploymentsView/table/no-data-image.png -------------------------------------------------------------------------------- /backend/db/__mocks__/Connection.ts: -------------------------------------------------------------------------------- 1 | export const db = {}; 2 | 3 | export function mockDb(dbToSet: Record Promise>) { 4 | Object.assign(db, dbToSet); 5 | } 6 | -------------------------------------------------------------------------------- /templates/page-groups/systemSetup.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "System Setup", 3 | "icon": "setting", 4 | "pages": ["users", "groups", "tenants", "health", "logs", "snapshots"] 5 | } 6 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/blueprint_with_image.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/blueprint_with_image.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/deploy_on_environment.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/deploy_on_environment.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/terraform/variables-and-outputs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/terraform/variables-and-outputs.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetIncorrectFiles.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetIncorrectFiles.zip -------------------------------------------------------------------------------- /widgets/deploymentActionButtons/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | import { widgetId } from './widget.consts'; 2 | 3 | export const translateWidget = Stage.Utils.getT(`widgets.${widgetId}`); 4 | -------------------------------------------------------------------------------- /widgets/secrets/src/widget.utils.ts: -------------------------------------------------------------------------------- 1 | export const translateSecrets = Stage.Utils.getT('widgets.secrets'); 2 | export const translateForm = Stage.Utils.getT('widgets.secrets.form'); 3 | -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/custom_install_workflow.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/custom_install_workflow.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/without_required_inputs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/without_required_inputs.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetInvalidPermission.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetInvalidPermission.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetSyntaxNotAllowed.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetSyntaxNotAllowed.zip -------------------------------------------------------------------------------- /tsconfig.ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true 4 | }, 5 | "references": [{ "path": "app" }, { "path": "widgets" }], 6 | "files": [] 7 | } 8 | -------------------------------------------------------------------------------- /widgets/deploymentInfo/src/consts.ts: -------------------------------------------------------------------------------- 1 | const WIDGET_ID = 'deploymentInfo'; 2 | 3 | export default { 4 | WIDGET_ID, 5 | WIDGET_TRANSLATION_PATH: `widgets.${WIDGET_ID}` 6 | }; 7 | -------------------------------------------------------------------------------- /backend/test/fixtures/userConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "saml": { 3 | "enabled": true, 4 | "certPath": "/path/to/cert", 5 | "ssoUrl": "sso", 6 | "portalUrl": "portal" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/test/routes/blueprints/fixtures/terraform/template.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/backend/test/routes/blueprints/fixtures/terraform/template.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/deploy_on_with_suggestion.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/deploy_on_with_suggestion.zip -------------------------------------------------------------------------------- /widgets/filters/src/types.ts: -------------------------------------------------------------------------------- 1 | export interface FilterWidgetConfiguration { 2 | pageSize: number; 3 | } 4 | 5 | export type FilterWidget = Stage.Types.Widget; 6 | -------------------------------------------------------------------------------- /app/utils/ErrorCodes.ts: -------------------------------------------------------------------------------- 1 | export const UNAUTHORIZED_ERR = 'UNAUTHORIZED_ERR'; 2 | export const LICENSE_ERR = 'LICENSE_ERR'; 3 | export const NO_PAGES_FOR_TENANT_ERR = 'NO_PAGES_FOR_TENANT_ERR'; 4 | -------------------------------------------------------------------------------- /backend/handler/services/LoggerService.ts: -------------------------------------------------------------------------------- 1 | import { getLogger } from '../LoggerHandler'; 2 | 3 | export default (category = '') => getLogger(`WidgetBackend${category ? `-${category}` : ''}`); 4 | -------------------------------------------------------------------------------- /backend/routes/Executions.types.ts: -------------------------------------------------------------------------------- 1 | import type { ExecutionGraphNode } from '../handler/ExecutionsHandler.types'; 2 | 3 | export type ExecutionGraphResponse = Omit; 4 | -------------------------------------------------------------------------------- /backend/test/routes/blueprints/fixtures/terraform/inputs_fetch-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceLocation": "tf-source-main/template/modules/public_vm", 3 | "templateUrl": "http://test/test.zip" 4 | } -------------------------------------------------------------------------------- /test/cypress/fixtures/blueprints/deploy_on_without_suggestion.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/blueprints/deploy_on_without_suggestion.zip -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetMandatoryFieldMissing.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetMandatoryFieldMissing.zip -------------------------------------------------------------------------------- /widgets/blueprintInfo/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { BlueprintDetails } from './actions'; 2 | 3 | export interface BlueprintInfoData extends BlueprintDetails { 4 | deployments: number; 5 | } 6 | -------------------------------------------------------------------------------- /widgets/cloudNum/README.md: -------------------------------------------------------------------------------- 1 | # Number of clouds 2 | Displays the cloud icon. 3 | 4 | ![number_of_clouds]( /images/ui/widgets/num_of_clouds.png ) 5 | 6 | 7 | ## Settings 8 | 9 | None 10 | -------------------------------------------------------------------------------- /app/components/overlays/contactDetails/ContactDetailsModalContent/utils.ts: -------------------------------------------------------------------------------- 1 | export const removeHtmlTagsFromString = (value: string) => { 2 | return value.replace(/<\/?[^>]+(>|$)/g, ''); 3 | }; 4 | -------------------------------------------------------------------------------- /app/widgets/common/secrets/index.ts: -------------------------------------------------------------------------------- 1 | import Actions from './SecretActions'; 2 | import MultilineInput from './MultilineInput'; 3 | 4 | export default { 5 | Actions, 6 | MultilineInput 7 | }; 8 | -------------------------------------------------------------------------------- /doc/diagrams/README.md: -------------------------------------------------------------------------------- 1 | Tool to be used for diagrams generation: [yUML](http://yuml.me). 2 | 3 | You can generate diagrams using: [Scruffy class diagram](https://yuml.me/diagram/scruffy/class/draw). 4 | -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetMethodNotAllowedInService.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetMethodNotAllowedInService.zip -------------------------------------------------------------------------------- /test/cypress/support/resource_urls.ts: -------------------------------------------------------------------------------- 1 | export const exampleBlueprintUrl = 2 | 'https://github.com/cloudify-community/blueprint-examples/releases/download/6.3.0-14/simple-hello-world-example.zip'; 3 | -------------------------------------------------------------------------------- /app/widgets/common/components/parameter/index.ts: -------------------------------------------------------------------------------- 1 | import Value from './ParameterValue'; 2 | import ValueDescription from './ParameterValueDescription'; 3 | 4 | export default { Value, ValueDescription }; 5 | -------------------------------------------------------------------------------- /templates/customer.json: -------------------------------------------------------------------------------- 1 | { 2 | "roles": ["*"], 3 | "tenants": ["*"], 4 | 5 | "pages": [ 6 | {"id": "adminDash", "type": "page"}, 7 | {"id": "deploy", "type": "page"} 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /app/utils/props/StringOrArray.ts: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | 3 | const StringOrArrayPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.array]); 4 | export default StringOrArrayPropType; 5 | -------------------------------------------------------------------------------- /backend/test/routes/blueprints/fixtures/terraform/template_fetch-data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/backend/test/routes/blueprints/fixtures/terraform/template_fetch-data.zip -------------------------------------------------------------------------------- /semantic-ui/site/modules/sidebar.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | 5 | .ui.sidebar .item { 6 | text-align: left; 7 | } 8 | -------------------------------------------------------------------------------- /test/cypress/fixtures/widgets/testWidgetInstallIncorrectDirectoryName.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/test/cypress/fixtures/widgets/testWidgetInstallIncorrectDirectoryName.zip -------------------------------------------------------------------------------- /widgets/deployments/src/FirstUserJourneyButtons/images/terraform_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-stage/HEAD/widgets/deployments/src/FirstUserJourneyButtons/images/terraform_logo.png -------------------------------------------------------------------------------- /app/components/page/editMode/EditModeButton.css: -------------------------------------------------------------------------------- 1 | .ui.button.editModeButton { 2 | background-color: #fff8db !important; 3 | } 4 | .ui.button.editModeButton:hover { 5 | background-color: #fff !important; 6 | } 7 | -------------------------------------------------------------------------------- /widgets/executions/src/tasksGraph/States.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | inProgress: ['Sending', 'Sent', 'Started', 'Response-sent', 'Rescheduled'], 3 | succeeded: ['Succeeded'], 4 | failed: ['Failed'] 5 | }; 6 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/blueprintIdContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const BlueprintIdContext = createContext(undefined); 4 | 5 | export default BlueprintIdContext; 6 | -------------------------------------------------------------------------------- /widgets/deploymentActionButtons/src/widget.consts.ts: -------------------------------------------------------------------------------- 1 | export const widgetId = 'deploymentActionButtons'; 2 | export const fetchedDeploymentFields = ['id', 'display_name', 'workflows', 'labels', 'capabilities'] as const; 3 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/deploymentIdContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const DeploymentIdContext = createContext(undefined); 4 | 5 | export default DeploymentIdContext; 6 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/translateInputs.ts: -------------------------------------------------------------------------------- 1 | import StageUtils from '../../../../utils/stageUtils'; 2 | 3 | const translateInputs = StageUtils.getT('widgets.common.inputs'); 4 | 5 | export default translateInputs; 6 | -------------------------------------------------------------------------------- /backend/test/routes/blueprints/fixtures/terraform/inputs_minimal.json: -------------------------------------------------------------------------------- 1 | { 2 | "terraformVersion": "1.2.2", 3 | "terraformTemplate": "http://host/path/template.zip", 4 | "resourceLocation": "/ft_folder/template" 5 | } 6 | -------------------------------------------------------------------------------- /backend/migration.ts: -------------------------------------------------------------------------------- 1 | import { runMigration } from 'cloudify-ui-common-backend'; 2 | import loggerFactory from './handler/LoggerHandler'; 3 | import dbModule from './db/Connection'; 4 | 5 | runMigration(loggerFactory, dbModule); 6 | -------------------------------------------------------------------------------- /app/typings/images.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.png' { 2 | const imagePath: string; 3 | export default imagePath; 4 | } 5 | 6 | declare module '*.svg' { 7 | const content: any; 8 | export default content; 9 | } 10 | -------------------------------------------------------------------------------- /backend/handler/WidgetsHandler.types.ts: -------------------------------------------------------------------------------- 1 | export interface WidgetData { 2 | id: string; 3 | isCustom: boolean; 4 | } 5 | 6 | export interface WidgetUsage { 7 | username: string; 8 | managerIp: string; 9 | } 10 | -------------------------------------------------------------------------------- /packaging/files/etc/sudoers.d/cloudify-stage: -------------------------------------------------------------------------------- 1 | # snapshot restore script 2 | cfyuser ALL=(stage_user) NOPASSWD:/opt/cloudify/stage/restore-snapshot.py 3 | 4 | # running node scripts 5 | cfyuser ALL=(stage_user) NOPASSWD:/usr/bin/npm 6 | -------------------------------------------------------------------------------- /app/widgets/common/executions/index.ts: -------------------------------------------------------------------------------- 1 | import Actions from './ExecutionActions'; 2 | import LatestExecutionStatusIcon from './LatestExecutionStatusIcon'; 3 | 4 | export default { 5 | Actions, 6 | LatestExecutionStatusIcon 7 | }; 8 | -------------------------------------------------------------------------------- /cypress.config.ts: -------------------------------------------------------------------------------- 1 | import { getConfig } from 'cloudify-ui-common-cypress/config'; 2 | import getWebpackConfig from './webpack.config'; 3 | 4 | export default getConfig('http://localhost:4000', getWebpackConfig({}, { mode: 'test' })[0]); 5 | -------------------------------------------------------------------------------- /scripts/buildWidget.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | WIDGET_NAME=$1 4 | bestzip --version > /dev/null || npm install -g bestzip 5 | npm run build -- --env widget=$WIDGET_NAME && cd dist/widgets && bestzip ../$WIDGET_NAME.zip $WIDGET_NAME 6 | -------------------------------------------------------------------------------- /app/widgets/common/actions/index.ts: -------------------------------------------------------------------------------- 1 | import File from './FileActions'; 2 | import Search from './SearchActions'; 3 | import Summary from './SummaryActions'; 4 | 5 | export default { 6 | File, 7 | Search, 8 | Summary 9 | }; 10 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/header/filter/common.ts: -------------------------------------------------------------------------------- 1 | import { i18nPrefix } from '../../common'; 2 | import StageUtils from '../../../../../utils/stageUtils'; 3 | 4 | export const tModal = StageUtils.getT(`${i18nPrefix}.header.filter.modal`); 5 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/map/marker/index.ts: -------------------------------------------------------------------------------- 1 | import DeploymentSiteMarker from './single-deployment-site'; 2 | import DeploymentMarkerClusterGroup from './cluster'; 3 | 4 | export { DeploymentSiteMarker, DeploymentMarkerClusterGroup }; 5 | -------------------------------------------------------------------------------- /app/widgets/common/roles/index.ts: -------------------------------------------------------------------------------- 1 | import Picker from './RolesPicker'; 2 | import Presenter from './RolesPresenter'; 3 | import * as Utils from './utils'; 4 | 5 | export default { 6 | Picker, 7 | Presenter, 8 | Utils 9 | }; 10 | -------------------------------------------------------------------------------- /widgets/userGroups/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const menuActions = { 2 | editUsers: 'users', 3 | editTenants: 'tenants', 4 | delete: 'delete', 5 | setDefaultGroupRole: 'set-default-role', 6 | setAdminGroupRole: 'set-admin-role' 7 | }; 8 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .circleci/** 2 | backend/node_modules/** 3 | conf/** 4 | dist/** 5 | doc/** 6 | templates/** 7 | tours/** 8 | userData/** 9 | tsc-dist/** 10 | widgets/*/backend.ts 11 | 12 | # To be removed, when code is fixed in these folders 13 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/secrets/model.ts: -------------------------------------------------------------------------------- 1 | // from REST API 2 | 3 | export type SecretResponse = { 4 | key: string; 5 | visibility: string; 6 | }; 7 | 8 | export type SecretsResponse = Stage.Types.PaginatedResponse; 9 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/menu.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | 5 | @disabledTextColor: #efefef; 6 | @itemTextColor: @grey; 7 | @paginationActiveTextColor: @blue; 8 | -------------------------------------------------------------------------------- /widgets/blueprintSources/src/widget.css: -------------------------------------------------------------------------------- 1 | .treeIcon { 2 | color: rgba(0, 0, 0, 0.6); 3 | } 4 | 5 | 6 | .rc-tree-treenode-disabled>a, .rc-tree-treenode-disabled>a span, .rc-tree-treenode-disabled>span:not(.rc-tree-switcher) { 7 | cursor: default; 8 | } -------------------------------------------------------------------------------- /app/utils/props/index.ts: -------------------------------------------------------------------------------- 1 | import AnyData from './AnyDataPropType'; 2 | import Widget from './WidgetPropType'; 3 | import StringOrArray from './StringOrArray'; 4 | import Toolbox from './Toolbox'; 5 | 6 | export { StringOrArray, Toolbox, AnyData, Widget }; 7 | -------------------------------------------------------------------------------- /app/utils/props/AnyDataPropType.ts: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | 3 | export default PropTypes.oneOfType([ 4 | PropTypes.array, 5 | PropTypes.bool, 6 | PropTypes.object, 7 | PropTypes.string, 8 | PropTypes.number 9 | ]); 10 | -------------------------------------------------------------------------------- /app/reducers/managerReducer/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './managerReducer'; 2 | export { default as emptyState } from './emptyState'; 3 | export type { ManagerData } from './managerReducer'; 4 | export type { LicenseData, LicenseStatus } from './licenseReducer'; 5 | -------------------------------------------------------------------------------- /backend/test/handlers/widgets/installFiles.test.ts: -------------------------------------------------------------------------------- 1 | import installFiles from '../../../handler/widgets/installFiles'; 2 | 3 | describe('installFiles', () => { 4 | it('rejects on invalid source path', () => expect(installFiles('', '')).rejects.toBeTruthy()); 5 | }); 6 | -------------------------------------------------------------------------------- /backend/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "types": ["jest"], 5 | "baseUrl": ".." 6 | }, 7 | "include": ["../**/*", "../../conf/*.json", "../../widgets/*/src/backend.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /test/cypress/fixtures/community/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "maintenancePollingInterval": 10000, 4 | "whiteLabel": { 5 | "showVersionDetails": true 6 | } 7 | }, 8 | "manager": { "ip": "127.0.0.1" }, 9 | "mode": "community" 10 | } 11 | -------------------------------------------------------------------------------- /conf/logging.json: -------------------------------------------------------------------------------- 1 | { 2 | "logsFile": "/var/log/cloudify/stage/server-output.log", 3 | "errorsFile": "/var/log/cloudify/stage/server-error.log", 4 | "logLevelConf": "/etc/cloudify/logging.conf", 5 | "serviceName": "cloudify-stage", 6 | "logLevel": "warn" 7 | } 8 | -------------------------------------------------------------------------------- /app/widgets/common/filters/resourceTypeContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | import type { FilterResourceType } from './types'; 3 | 4 | const ResourceTypeContext = createContext(undefined); 5 | 6 | export default ResourceTypeContext; 7 | -------------------------------------------------------------------------------- /app/widgets/common/tenants/index.ts: -------------------------------------------------------------------------------- 1 | import TenantsDropdown from './TenantsDropdown'; 2 | import * as Utils from './utils'; 3 | import { mapTenantsToRoles } from './utils'; 4 | 5 | export default { 6 | TenantsDropdown, 7 | Utils, 8 | mapTenantsToRoles 9 | }; 10 | -------------------------------------------------------------------------------- /backend/routes/blueprints/Environment.types.ts: -------------------------------------------------------------------------------- 1 | import type { EnvironmentRenderParams } from '../../handler/EnvironmentHandler.types'; 2 | 3 | export type PostEnvironmentBlueprintRequestBody = EnvironmentRenderParams; 4 | 5 | export type PostEnvironmentBlueprintResponse = string; 6 | -------------------------------------------------------------------------------- /conf/me.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "ssl": { 4 | "ca": null 5 | }, 6 | "logLevelConf": "", 7 | "logLevel": "info" 8 | }, 9 | "manager": { 10 | "ip":"", 11 | "protocol" : "http", 12 | "port": "80" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/cypress/.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["module-resolver", { 4 | "alias": { 5 | "app": "./app", 6 | "conf": "./conf", 7 | "widgets": "./widgets" 8 | } 9 | }] 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /widgets/environmentButton/src/widget.consts.ts: -------------------------------------------------------------------------------- 1 | import colors from '../../../app/styles/colors.scss'; 2 | 3 | // NOTE: these two should be in line 4 | export const blueprintDefaultHighlightSemanticColor = 'blue'; 5 | export const blueprintDefaultHighlightHTMLColor = colors.cloudifyBlue; 6 | -------------------------------------------------------------------------------- /app/components/page/content/index.ts: -------------------------------------------------------------------------------- 1 | import PageContent from './PageContent'; 2 | import Widget from './widgets/Widget'; 3 | import WidgetsGrid from './widgets/WidgetsGrid'; 4 | import WidgetsList from './widgets/WidgetsList'; 5 | 6 | export { PageContent, Widget, WidgetsGrid, WidgetsList }; 7 | -------------------------------------------------------------------------------- /app/widgets/common/deployModal/BlueprintDropdown/BlueprintDropdown.consts.ts: -------------------------------------------------------------------------------- 1 | import type { FilteredBlueprints } from './SuggestedBlueprintDropdown.types'; 2 | 3 | export const defaultBlueprintList: FilteredBlueprints = { 4 | suggestedBlueprints: [], 5 | notSuggestedBlueprints: [] 6 | }; 7 | -------------------------------------------------------------------------------- /semantic-ui/site/elements/label.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | 5 | @color: @grey; 6 | @fontWeight: @normal; 7 | @backgroundColor: #efefef; 8 | @borderRadius: @relative5px; 9 | @deleteMargin: 0.75em; 10 | -------------------------------------------------------------------------------- /app/widgets/common/deployModal/EnvironmentDropdown/EnvironmentDropdown.consts.ts: -------------------------------------------------------------------------------- 1 | import type { FilteredEnvironments } from './EnvironmentDropdown.types'; 2 | 3 | export const defaultEnvironmentList: FilteredEnvironments = { 4 | suggestedEnvironments: [], 5 | notSuggestedEnvironments: [] 6 | }; 7 | -------------------------------------------------------------------------------- /app/utils/shared/combineClassNames.ts: -------------------------------------------------------------------------------- 1 | type PossibleClassNameEntry = string | number | null | undefined | boolean; 2 | 3 | const combineClassNames = (...classNames: (PossibleClassNameEntry | PossibleClassNameEntry[])[]) => 4 | classNames.flat().filter(Boolean).join(' '); 5 | export default combineClassNames; 6 | -------------------------------------------------------------------------------- /backend/db/models/BlueprintUserDataModel.types.ts: -------------------------------------------------------------------------------- 1 | import type { CommonAttributes } from './types'; 2 | 3 | export interface BlueprintUserData { 4 | blueprintId: string; 5 | username: string; 6 | layout: any; 7 | } 8 | export type BlueprintUserDataAttributes = CommonAttributes & BlueprintUserData; 9 | -------------------------------------------------------------------------------- /app/components/templateManagement/templates/types.ts: -------------------------------------------------------------------------------- 1 | export interface PageMenuItem { 2 | id: string; 3 | type: 'page' | 'pageGroup'; 4 | } 5 | 6 | export interface CommonListProps { 7 | custom: boolean; 8 | onDelete: (listItem: string) => void; 9 | style?: React.CSSProperties; 10 | } 11 | -------------------------------------------------------------------------------- /app/widgets/common/events/index.ts: -------------------------------------------------------------------------------- 1 | import ErrorCausesModal from './ErrorCausesModal'; 2 | import EventUtils from './EventUtils'; 3 | 4 | export type { CloudifyEventPart, CloudifyLogEventPart, FullEventData } from './types'; 5 | 6 | export default { 7 | ErrorCausesModal, 8 | Utils: EventUtils 9 | }; 10 | -------------------------------------------------------------------------------- /app/widgets/common/filters/inputs/types.ts: -------------------------------------------------------------------------------- 1 | import type { FilterRuleOperator } from '../types'; 2 | 3 | export interface CommonAttributeValueInputProps { 4 | onChange: (value: string[]) => void; 5 | operator: FilterRuleOperator; 6 | toolbox: Stage.Types.WidgetlessToolbox; 7 | value: string[]; 8 | } 9 | -------------------------------------------------------------------------------- /app/widgets/common/types.ts: -------------------------------------------------------------------------------- 1 | export type DropdownValue = string | string[] | null; 2 | export type Field = { name: string; value: unknown; type: string; checked?: boolean }; 3 | export type Visibility = 'private' | 'tenant' | 'global' | 'unknown'; 4 | export type FetchParams = { gridParams: Stage.Types.GridParams }; 5 | -------------------------------------------------------------------------------- /packaging/files/etc/logrotate.d/cloudify-stage: -------------------------------------------------------------------------------- 1 | /var/log/cloudify/stage/*.log { 2 | hourly 3 | rotate 7 4 | size 100M 5 | copytruncate 6 | compress 7 | delaycompress 8 | missingok 9 | notifempty 10 | dateext dateformat -%Y%m%d-%s 11 | } 12 | -------------------------------------------------------------------------------- /templates/README.md: -------------------------------------------------------------------------------- 1 | JSON files in this directory represents [Template Management](https://docs.cloudify.co/staging/dev/working_with/console/customization/templates-mgmt/) resources - UI templates, pages and page groups. 2 | 3 | You can check [schemas](./schemas) directory to get familiar with those JSON files structure. 4 | -------------------------------------------------------------------------------- /app/widgets/common/components/GridWrapper.tsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | const GridWrapper = styled.div` 4 | display: grid; 5 | grid-template-columns: repeat(auto-fill, minmax(300px, 3fr)); 6 | grid-gap: 20px; 7 | margin-bottom: 1rem; 8 | `; 9 | 10 | export default GridWrapper; 11 | -------------------------------------------------------------------------------- /app/widgets/common/labels/common.ts: -------------------------------------------------------------------------------- 1 | import type { Label } from './types'; 2 | 3 | export function sortLabels(labels: Label[]) { 4 | return _.sortBy(labels, 'key', 'value'); 5 | } 6 | 7 | export function isLabelModifiable(key: string) { 8 | return key !== 'csys-consumer-id' && key !== 'csys-obj-parent'; 9 | } 10 | -------------------------------------------------------------------------------- /app/widgets/common/plugins/index.ts: -------------------------------------------------------------------------------- 1 | import Actions from './PluginActions'; 2 | import Icon from './PluginIcon'; 3 | import UploadForm from './UploadPluginForm'; 4 | import UploadModal from './UploadPluginModal'; 5 | 6 | export default { 7 | Actions, 8 | Icon, 9 | UploadForm, 10 | UploadModal 11 | }; 12 | -------------------------------------------------------------------------------- /conf/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "backend": { 3 | "port": 8088 4 | }, 5 | "db": { 6 | "url": "postgres://cloudify:cloudify@localhost:5432/stage", 7 | "options": { 8 | "dialectOptions": { 9 | "ssl": false 10 | } 11 | } 12 | }, 13 | "maps": { 14 | "accessToken": "" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/cypress/integration/widgets/only_my_resources_spec.ts: -------------------------------------------------------------------------------- 1 | describe('Show only my resources widget', () => { 2 | before(() => cy.activate().usePageMock('onlyMyResources').mockLogin()); 3 | 4 | it('should render', () => { 5 | cy.contains('.onlyMyResourcesWidget', 'Show only my resources'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/cloudify-ui-common-configs/tsconfig.composite.json", 3 | "compilerOptions": { 4 | "declarationMap": false, 5 | "composite": true, 6 | "outDir": "./tsc-dist", 7 | "rootDir": ".", 8 | "allowJs": false 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /app/utils/hooks/useRefreshEvent.ts: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | import useEventListener from './useEventListener'; 3 | 4 | export default function useRefreshEvent(toolbox: Stage.Types.Toolbox, event: string) { 5 | const refresh = useCallback(toolbox.refresh, []); 6 | useEventListener(toolbox, event, refresh); 7 | } 8 | -------------------------------------------------------------------------------- /backend/db/models/BlueprintAdditionsModel.types.ts: -------------------------------------------------------------------------------- 1 | import type { CommonAttributes } from './types'; 2 | 3 | export interface BlueprintAdditionsData { 4 | blueprintId: string; 5 | image: any; 6 | imageUrl: string; 7 | } 8 | 9 | export type BlueprintAdditionsAttributes = CommonAttributes & BlueprintAdditionsData; 10 | -------------------------------------------------------------------------------- /test/cypress/integration/widgets/cloud_num_spec.ts: -------------------------------------------------------------------------------- 1 | describe('Number of clouds widget', () => { 2 | before(() => cy.activate().usePageMock('cloudNum', { icon: 'cloud' }).mockLogin()); 3 | 4 | it('should display configured icon', () => { 5 | cy.get('.statistic .value i').should('have.class', 'cloud'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /widgets/blueprintActionButtons/src/consts.ts: -------------------------------------------------------------------------------- 1 | const WIDGET_ID = 'blueprintActionButtons'; 2 | 3 | export default { 4 | WIDGET_ID, 5 | WIDGET_TRANSLATION_PATH: `widgets.${WIDGET_ID}`, 6 | CONTEXT_KEY: { 7 | OPEN_DEPLOYMENT_MODAL: 'openDeploymentModal', 8 | BLUEPRINT_ID: 'blueprintId' 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/src/widget.css: -------------------------------------------------------------------------------- 1 | .repositoryCatalog .ui.icon.button { 2 | width: 22px; 3 | height: 22px; 4 | } 5 | .repositoryCatalog .contentBlock { 6 | margin-bottom: 17px; 7 | width: 100%; 8 | } 9 | 10 | .widget .repositoryCatalog .row, 11 | .ui.segment { 12 | cursor: default !important; 13 | } 14 | -------------------------------------------------------------------------------- /widgets/onlyMyResources/README.md: -------------------------------------------------------------------------------- 1 | # Only my resources 2 | Shows a toggle allowing to filter only resources created by the logged in user. The supported resources are blueprints, deployments, plugins and snapshots. 3 | 4 | ![only-my-resources]( /images/ui/widgets/only_my_resources.png ) 5 | 6 | 7 | ## Settings 8 | 9 | None 10 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | doc 2 | jenkins 3 | test 4 | .git 5 | 6 | # .gitignore contents: 7 | .eslintcache 8 | .idea 9 | .vscode 10 | .history 11 | .tmp 12 | .nyc_output 13 | .DS_Store 14 | .fontello-session 15 | coverage-* 16 | conf/me.json 17 | /dist 18 | /tsc-dist 19 | userData 20 | node_modules 21 | widgets/*/backend.ts 22 | stage.tar.gz 23 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/detailsPane/header.scss: -------------------------------------------------------------------------------- 1 | .detailsPane { 2 | display: flex; 3 | flex-direction: column; 4 | overflow: auto; 5 | height: 100%; 6 | 7 | .centeredButtons { 8 | margin-right: 1rem; 9 | } 10 | div > div:last-child { 11 | margin-left: auto; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /scripts/checkJsonFiles.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ajv help > /dev/null || npm install -g ajv-cli 4 | ajv -s templates/schemas/template.schema.json -d "templates/*.json" && \ 5 | ajv -s templates/schemas/page-group.schema.json -d "templates/page-groups/*.json" && \ 6 | ajv -s templates/schemas/page.schema.json -d "templates/pages/*.json" 7 | -------------------------------------------------------------------------------- /test/jest/setupFiles.ts: -------------------------------------------------------------------------------- 1 | import { TextDecoder, TextEncoder } from 'util'; 2 | 3 | // NOTE: Workaround for https://github.com/jsdom/jsdom/issues/2524 4 | if (typeof TextEncoder !== 'undefined' && typeof TextDecoder !== 'undefined') { 5 | (global as any).TextEncoder = TextEncoder; 6 | (global as any).TextDecoder = TextDecoder; 7 | } 8 | -------------------------------------------------------------------------------- /backend/db/models/WidgetBackendsModel.types.ts: -------------------------------------------------------------------------------- 1 | import type { CommonAttributes } from './types'; 2 | 3 | export interface WidgetBackendsData { 4 | widgetId: string; 5 | serviceName: string; 6 | method: string; 7 | script: string; 8 | } 9 | 10 | export type WidgetBackendsAttributes = CommonAttributes & WidgetBackendsData; 11 | -------------------------------------------------------------------------------- /backend/routes/BlueprintUserData.types.ts: -------------------------------------------------------------------------------- 1 | import type { BlueprintUserData } from '../db/models/BlueprintUserDataModel.types'; 2 | 3 | export type BlueprintLayout = BlueprintUserData['layout']; 4 | 5 | export type GetBlueprintUserDataLayoutResponse = BlueprintLayout; 6 | 7 | export type PutBlueprintUserDataLayoutRequestBody = BlueprintLayout; 8 | -------------------------------------------------------------------------------- /widgets/deploymentInfo/src/utils.ts: -------------------------------------------------------------------------------- 1 | import Consts from './consts'; 2 | 3 | const widgetTranslation = Stage.Utils.getT(Consts.WIDGET_TRANSLATION_PATH); 4 | 5 | const getWidgetTranslation = (translationPath = '') => Stage.Utils.composeT(widgetTranslation, translationPath); 6 | 7 | export default { 8 | getWidgetTranslation 9 | }; 10 | -------------------------------------------------------------------------------- /app/utils/props/LayoutPropType.ts: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import Consts from '../consts'; 3 | 4 | export default PropTypes.arrayOf( 5 | PropTypes.shape({ 6 | type: PropTypes.oneOf([Consts.LAYOUT_TYPE.WIDGETS, Consts.LAYOUT_TYPE.TABS]), 7 | content: PropTypes.arrayOf(PropTypes.shape({})) 8 | }) 9 | ); 10 | -------------------------------------------------------------------------------- /app/widgets/common/components/DynamicDropdown.css: -------------------------------------------------------------------------------- 1 | .dropdown.dynamic .menu .item.disabled { 2 | padding: 0 !important; 3 | background: white !important; 4 | } 5 | 6 | .dropdown.dynamic .menu .item.disabled .ui.segment { 7 | margin: 3px 0 9px 0; 8 | } 9 | 10 | .dropdown.dynamic .menu .item.disabled .text { 11 | display: none; 12 | } -------------------------------------------------------------------------------- /test/cypress/fixtures/babel.config.js: -------------------------------------------------------------------------------- 1 | const mainConfig = require('../../../babel.config'); 2 | 3 | module.exports = { 4 | ...mainConfig, 5 | // NOTE: since the files are loaded into the browser as-is, `require` is not supported 6 | plugins: mainConfig.plugins.filter(pluginName => pluginName !== '@babel/plugin-transform-runtime') 7 | }; 8 | -------------------------------------------------------------------------------- /widgets/blueprintActionButtons/src/utils.ts: -------------------------------------------------------------------------------- 1 | import Consts from './consts'; 2 | 3 | const widgetTranslation = Stage.Utils.getT(Consts.WIDGET_TRANSLATION_PATH); 4 | 5 | const getWidgetTranslation = (translationPath = '') => Stage.Utils.composeT(widgetTranslation, translationPath); 6 | 7 | export default { 8 | getWidgetTranslation 9 | }; 10 | -------------------------------------------------------------------------------- /app/widgets/common/plugins/PluginIcon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | interface PluginIconProps { 4 | src?: string; 5 | } 6 | 7 | export default function PluginIcon({ src }: PluginIconProps) { 8 | const { Image, Icon } = Stage.Basic; 9 | return src ? : ; 10 | } 11 | -------------------------------------------------------------------------------- /widgets/nodesStats/README.md: -------------------------------------------------------------------------------- 1 | # Nodes Statistics 2 | Displays the number of node instances, according to their status. 3 | 4 | ![node-statistics]( /images/ui/widgets/node-statistics.png ) 5 | 6 | 7 | ## Settings 8 | 9 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 10 seconds 10 | -------------------------------------------------------------------------------- /templates/pages/sites.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sites", 3 | "icon": "sitemap", 4 | "layout": [{ 5 | "type": "widgets", 6 | "content": [ 7 | { 8 | "name": "Sites", 9 | "definition": "sites", 10 | "width": 12, 11 | "height": 24, 12 | "x": 0, 13 | "y": 0 14 | } 15 | ] 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /templates/main-default.json: -------------------------------------------------------------------------------- 1 | { 2 | "roles": ["default"], 3 | "tenants": ["*"], 4 | 5 | "pages": [ 6 | {"id": "adminDash", "type": "page"}, 7 | {"id": "blueprints", "type": "page"}, 8 | {"id": "deployments", "type": "pageGroup"}, 9 | {"id": "executions", "type": "page"}, 10 | {"id": "resources", "type": "pageGroup"} 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /templates/pages/agents.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Agents", 3 | "icon": "user secret", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Agents", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "agents" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /templates/pages/filters.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Filters", 3 | "icon": "filter", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Filters", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "filters" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /templates/pages/plugins.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Plugins", 3 | "icon": "plug", 4 | "layout": [{ 5 | "type": "widgets", 6 | "content": [ 7 | { 8 | "name": "Plugins", 9 | "definition": "plugins", 10 | "width": 12, 11 | "height": 24, 12 | "x": 0, 13 | "y": 0 14 | } 15 | ] 16 | }] 17 | } 18 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/message.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | 5 | @verticalPadding: @relative10px; 6 | @horizontalPadding: @relative12px; 7 | @background: fade(@grey, 10%); 8 | @strongBorderColor: @grey; 9 | @textColor: @grey; 10 | 11 | @iconSize: @relative30px; 12 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/table.variables.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | 5 | @fontSize: 14px; 6 | @iconMargin: 0 0.6rem 0 0; 7 | 8 | @sortableActiveBackground: #ffffff; 9 | @sortableHoverBackground: #f2f2f2; 10 | @activeBackgroundColor: #f2f2f2; 11 | 12 | @borderColor: #f2f2f2; 13 | -------------------------------------------------------------------------------- /templates/pages/snapshots.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Snapshots", 3 | "icon": "photo", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Snapshots list", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "snapshots" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /templates/pages/users.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Users", 3 | "icon": "user", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "User management", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "userManagement" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /templates/pages/groups.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Groups", 3 | "icon": "group", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "User group management", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "userGroups" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /widgets/serversNum/README.md: -------------------------------------------------------------------------------- 1 | # Number of nodes 2 | Displays the total number of nodes created on the tenant, according to the user’s permissions. 3 | 4 | ![number_of_nodes]( /images/ui/widgets/num_of_nodes.png ) 5 | 6 | 7 | ## Settings 8 | 9 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 30 seconds. 10 | -------------------------------------------------------------------------------- /templates/pages/tenants.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tenants", 3 | "icon": "cloudify-user-cog", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Tenants management", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "tenants" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /templates/pages/health.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "System Health", 3 | "icon": "heartbeat", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Cluster Status", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "highAvailability" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /widgets/outputs/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { PollingTimeConfiguration } from '../../../app/utils/GenericConfig'; 2 | 3 | export interface OutputsAndCapabilitiesItem { 4 | description: string; 5 | isOutput: boolean; 6 | name: string; 7 | value: unknown; 8 | } 9 | 10 | export type OutputsWidgetConfiguration = PollingTimeConfiguration & { showCapabilities: boolean }; 11 | -------------------------------------------------------------------------------- /templates/community.json: -------------------------------------------------------------------------------- 1 | { 2 | "roles": ["*"], 3 | "tenants": ["*"], 4 | 5 | "pages": [ 6 | { "id": "adminDash", "type": "page" }, 7 | { "id": "blueprints", "type": "page" }, 8 | { "id": "deployments", "type": "pageGroup" }, 9 | { "id": "executions", "type": "page" }, 10 | { "id": "resources", "type": "pageGroup" } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /widgets/executionsStatus/README.md: -------------------------------------------------------------------------------- 1 | # Executions Statuses Graph 2 | Displays the number of executions per status as a bar chart graph. 3 | 4 | ![number_of_executions_per_status]( /images/ui/widgets/executions-status-graph.png ) 5 | 6 | 7 | ## Settings 8 | 9 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 5 seconds. 10 | -------------------------------------------------------------------------------- /widgets/pluginUploadButton/README.md: -------------------------------------------------------------------------------- 1 | # Plugin upload button 2 | Opens the plugin upload screen, from which permitted users can specify the plugin’s wagon and yaml file (URL or local files) and visibility level of the plugins they wish to upload to the current tenant. 3 | 4 | ![plugin upload button]( /images/ui/widgets/plugin_upload_button.png ) 5 | 6 | 7 | ## Settings 8 | 9 | None 10 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/breadcrumb.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | 5 | .ui.breadcrumb { 6 | .active.section { 7 | font-weight: 600; 8 | color: @grey; 9 | } 10 | .divider { 11 | color: @grey; 12 | font-size: 14px; 13 | opacity: 1; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /widgets/executionLogs/src/consts.ts: -------------------------------------------------------------------------------- 1 | export const widgetId = 'executionLogs'; 2 | 3 | export const translate = Stage.Utils.getT(`widgets.${widgetId}`); 4 | 5 | export const basePageSize = 50; 6 | 7 | export const commonIncludeKeys = [ 8 | '_storage_id', 9 | 'execution_id', 10 | 'message', 11 | 'error_causes', 12 | 'reported_timestamp', 13 | 'type' 14 | ] as const; 15 | -------------------------------------------------------------------------------- /widgets/tokens/src/TokensTable.consts.ts: -------------------------------------------------------------------------------- 1 | import type { TokensWidget } from './widget.types'; 2 | 3 | export const tableRefreshEvent = 'tokens:refresh'; 4 | export const dataSortingKeys: Record = { 5 | value: 'secret_hash', 6 | description: 'description', 7 | expirationDate: 'expiration_date', 8 | lastUsed: 'last_used' 9 | } as const; 10 | -------------------------------------------------------------------------------- /app/widgets/common/terraformModal/TerraformModal.css: -------------------------------------------------------------------------------- 1 | #terraformModal .accordion .content .ui.table td { 2 | vertical-align: top; 3 | } 4 | 5 | #terraformModal .error.field > .label { 6 | z-index: 1; 7 | } 8 | 9 | #terraformModal .accordion .field.type, 10 | #terraformModal .accordion .field.name, 11 | #terraformModal .accordion .field.source { 12 | height: auto !important; 13 | } 14 | -------------------------------------------------------------------------------- /widgets/secretProviders/src/widget.consts.ts: -------------------------------------------------------------------------------- 1 | import type { SecretProvidersWidget } from './widget.types'; 2 | 3 | export const tableRefreshEvent = 'secretProviders:refresh'; 4 | export const dataSortingKeys: Record = { 5 | name: 'name', 6 | type: 'type', 7 | createdAt: 'created_at', 8 | updatedAt: 'updated_at' 9 | } as const; 10 | -------------------------------------------------------------------------------- /backend/test/handlers/widgets/validateUniqueness.test.ts: -------------------------------------------------------------------------------- 1 | import validateUniqueness from '../../../handler/widgets/validateUniqueness'; 2 | 3 | describe('validateUniqueness', () => { 4 | // eslint-disable-next-line jest/expect-expect -- we're returning a promise that if rejected will fail the test 5 | it('resolves when widget does not exist', () => validateUniqueness('nonExistingWidgetId')); 6 | }); 7 | -------------------------------------------------------------------------------- /templates/pages/tokens.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Tokens", 3 | "icon": "tag", 4 | "layout": [ 5 | { 6 | "type": "widgets", 7 | "content": [ 8 | { 9 | "name": "Tokens", 10 | "width": 12, 11 | "height": 24, 12 | "definition": "tokens" 13 | } 14 | ] 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .eslintcache 2 | .idea 3 | .vscode 4 | .history 5 | .tmp 6 | .nyc_output 7 | .DS_Store 8 | .fontello-session 9 | coverage-* 10 | conf/me.json 11 | /dist 12 | /tsc-dist 13 | userData 14 | node_modules 15 | test/cypress/screenshots 16 | test/cypress/videos 17 | test/cypress/results 18 | test/cypress/downloads 19 | widgets/*/backend.ts 20 | stage.tar.gz 21 | test/cypress/fixtures/blueprints/*/* 22 | -------------------------------------------------------------------------------- /backend/test/routes/Style.test.ts: -------------------------------------------------------------------------------- 1 | import request from 'supertest'; 2 | import app from 'app'; 3 | import css from 'css'; 4 | 5 | jest.mock('handler/ManagerHandler'); 6 | 7 | describe('/style endpoint', () => { 8 | it('allows to get style', () => 9 | request(app) 10 | .get('/console/style') 11 | .then(response => expect(css.parse(response.text)).toBeTruthy())); 12 | }); 13 | -------------------------------------------------------------------------------- /test/cypress/integration/widgets/text_spec.ts: -------------------------------------------------------------------------------- 1 | describe('Text box widget', () => { 2 | const header = 'Header text'; 3 | const content = 'Content text'; 4 | 5 | before(() => cy.activate('valid_trial_license').usePageMock('text', { header, content }).mockLogin()); 6 | 7 | it('should render', () => { 8 | cy.contains(header); 9 | cy.contains(content); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /widgets/nodesComputeNum/README.md: -------------------------------------------------------------------------------- 1 | # Number of compute nodes 2 | Displays the total number of compute nodes created on the tenant, according to the user’s permissions. 3 | 4 | ![number_of_compute_nodes]( /images/ui/widgets/num_of_compute_nodes.png ) 5 | 6 | 7 | ## Settings 8 | 9 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 30 seconds. 10 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/header/common.ts: -------------------------------------------------------------------------------- 1 | import { filterIdQueryParameterName } from '../../filters/common'; 2 | import { useSearchParam } from '../../../../utils/hooks'; 3 | 4 | export function getGroupIdForBatchAction() { 5 | return `BATCH_ACTION_${new Date().toISOString()}`; 6 | } 7 | 8 | export function useFilterIdFromUrl() { 9 | return useSearchParam(filterIdQueryParameterName); 10 | } 11 | -------------------------------------------------------------------------------- /backend/handler/SourceHandler.types.ts: -------------------------------------------------------------------------------- 1 | interface ScanningItemCommon { 2 | key: string; 3 | title: string; 4 | } 5 | 6 | export interface ScanningDir extends ScanningItemCommon { 7 | isDir: true; 8 | children: ScanningItem[]; 9 | } 10 | 11 | export interface ScanningFile extends ScanningItemCommon { 12 | isDir: false; 13 | } 14 | 15 | export type ScanningItem = ScanningDir | ScanningFile; 16 | -------------------------------------------------------------------------------- /test/jest/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "baseUrl": "../../", 5 | "paths": { 6 | "*": ["node_modules/*", "app/*", "widgets/*", "./*"] 7 | }, 8 | "types": ["jest"] 9 | }, 10 | "references": [{ "path": "../../app" }, { "path": "../../widgets" }], 11 | "include": ["**/*", "**/*.json"] 12 | } 13 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/src/UploadingMessage/UploadingMessage.styles.tsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components'; 2 | 3 | export const MessageLine = styled.span` 4 | display: block; 5 | `; 6 | 7 | export const MessageHeader = styled(MessageLine)` 8 | font-weight: bold; 9 | `; 10 | 11 | export const MessageDescription = styled(MessageLine)` 12 | opacity: 0.75; 13 | margin-top: 4px; 14 | `; 15 | -------------------------------------------------------------------------------- /app/actions/config.ts: -------------------------------------------------------------------------------- 1 | import type { PayloadAction } from './types'; 2 | import { ActionType } from './types'; 3 | 4 | export type SetConfigEditModeAction = PayloadAction; 5 | 6 | export function setEditMode(isEditMode: boolean): SetConfigEditModeAction { 7 | return { 8 | type: ActionType.SET_CONFIG_EDIT_MODE, 9 | payload: isEditMode 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /templates/main-sys_admin.json: -------------------------------------------------------------------------------- 1 | { 2 | "roles": ["sys_admin"], 3 | "tenants": ["*"], 4 | 5 | "pages": [ 6 | {"id": "adminDash", "type": "page"}, 7 | {"id": "blueprints", "type": "page"}, 8 | {"id": "deployments", "type": "pageGroup"}, 9 | {"id": "executions", "type": "page"}, 10 | {"id": "resources", "type": "pageGroup"}, 11 | {"id": "systemSetup", "type": "pageGroup"} 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/plugins/model.ts: -------------------------------------------------------------------------------- 1 | import type { PluginCatalogEntry, PluginEntry } from 'backend/routes/Plugins.types'; 2 | 3 | export type URLString = string; 4 | 5 | // from REST API 6 | 7 | export type CatalogPluginResponse = PluginCatalogEntry; 8 | export type ManagerPluginResponse = PluginEntry; 9 | export type ManagerPluginsResponse = Stage.Types.PaginatedResponse; 10 | -------------------------------------------------------------------------------- /backend/test/sharedUtils.test.ts: -------------------------------------------------------------------------------- 1 | import { isYamlFile } from 'sharedUtils'; 2 | 3 | describe('Shared utils', () => { 4 | it('should determine yaml file', () => { 5 | expect(isYamlFile('test.yaml')).toBeTruthy(); 6 | expect(isYamlFile('test.YAML')).toBeTruthy(); 7 | expect(isYamlFile('test.yml')).toBeTruthy(); 8 | 9 | expect(isYamlFile('test.tgz')).toBeFalsy(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /widgets/secrets/src/widget.types.ts: -------------------------------------------------------------------------------- 1 | import type { Secret } from 'app/widgets/common/secrets/SecretActions'; 2 | import type { DataTableConfiguration, PollingTimeConfiguration } from '../../../app/utils/GenericConfig'; 3 | 4 | export declare namespace SecretsWidget { 5 | export type Data = Stage.Types.PaginatedResponse; 6 | 7 | export type Configuration = PollingTimeConfiguration & DataTableConfiguration; 8 | } 9 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/index.ts: -------------------------------------------------------------------------------- 1 | import getInputFieldInitialValue from './getInputFieldInitialValue'; 2 | import getInputsMap from './getInputsMap'; 3 | import getInputsWithoutValues from './getInputsWithoutValues'; 4 | import getUpdatedInputs from './getUpdatedInputs'; 5 | 6 | export default { 7 | getInputFieldInitialValue, 8 | getInputsMap, 9 | getInputsWithoutValues, 10 | getUpdatedInputs 11 | }; 12 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/map/common.ts: -------------------------------------------------------------------------------- 1 | import i18n from 'i18next'; 2 | import type { SiteWithPosition } from '../../map/site'; 3 | import { i18nPrefix } from '../common'; 4 | import type { Deployment } from '../types'; 5 | 6 | export const tMap = (suffix: string) => i18n.t(`${i18nPrefix}.map.${suffix}`); 7 | 8 | export interface DeploymentSitePair { 9 | deployment: Deployment; 10 | site: SiteWithPosition; 11 | } 12 | -------------------------------------------------------------------------------- /widgets/executions/src/tasksGraph/GraphEdges.tsx: -------------------------------------------------------------------------------- 1 | import type { ElkExtendedEdge } from 'elkjs/lib/elk-api'; 2 | import GraphEdge from './GraphEdge'; 3 | 4 | const GraphEdges = ({ graphEdges = [] }: { graphEdges: ElkExtendedEdge[] }) => ( 5 | <> 6 | {graphEdges.map(graphEdge => ( 7 | 8 | ))} 9 | 10 | ); 11 | 12 | export default GraphEdges; 13 | -------------------------------------------------------------------------------- /widgets/sitesMap/src/widget.css: -------------------------------------------------------------------------------- 1 | 2 | .sites-map { 3 | height: 100%; 4 | width: 100%; 5 | z-index: 5; 6 | } 7 | 8 | .sites-map a:hover { 9 | text-decoration: none !important; 10 | } 11 | 12 | .deploymentState .segment { 13 | padding: 1px 0px !important; 14 | min-width: 4rem; 15 | } 16 | 17 | .row > .column.deploymentState { 18 | padding-right: 2px !important; 19 | padding-left: 2px !important; 20 | } 21 | -------------------------------------------------------------------------------- /app/widgets/common/deployments/index.ts: -------------------------------------------------------------------------------- 1 | import Actions from './DeploymentActions'; 2 | import ActionsMenu from './DeploymentActionsMenu'; 3 | import ActionsModals from './DeploymentActionsModals'; 4 | import Details from './DeploymentDetails'; 5 | import UpdateDetailsModal from './UpdateDetailsModal'; 6 | 7 | export default { 8 | Actions, 9 | ActionsMenu, 10 | ActionsModals, 11 | Details, 12 | UpdateDetailsModal 13 | }; 14 | -------------------------------------------------------------------------------- /app/widgets/common/labels/DuplicationErrorPopup.tsx: -------------------------------------------------------------------------------- 1 | import type { FunctionComponent } from 'react'; 2 | import React from 'react'; 3 | import LabelErrorPopup from './LabelErrorPopup'; 4 | 5 | const DuplicationErrorPopup: FunctionComponent = () => { 6 | const { i18n } = Stage; 7 | 8 | return ; 9 | }; 10 | 11 | export default DuplicationErrorPopup; 12 | -------------------------------------------------------------------------------- /backend/db/types/ResourceTypes.ts: -------------------------------------------------------------------------------- 1 | const resourceTypes = { 2 | WIDGET: 'widget' as const, 3 | TEMPLATE: 'template' as const, 4 | PAGE: 'page' as const, 5 | 6 | get values() { 7 | return [this.WIDGET, this.TEMPLATE, this.PAGE]; 8 | } 9 | } as const; 10 | 11 | export default resourceTypes; 12 | 13 | export type ResourceType = typeof resourceTypes.WIDGET | typeof resourceTypes.TEMPLATE | typeof resourceTypes.PAGE; 14 | -------------------------------------------------------------------------------- /backend/migrations/20170808104541-4_2-ResourceModelPageEnum.ts: -------------------------------------------------------------------------------- 1 | import type { MigrationObject } from './common/types'; 2 | 3 | export const { up, down }: MigrationObject = { 4 | up(queryInterface) { 5 | return queryInterface.sequelize.query('ALTER TYPE "enum_Resources_type" ADD VALUE IF NOT EXISTS \'page\';'); 6 | }, 7 | 8 | down() { 9 | // Nothing to do 10 | return Promise.resolve(); 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /widgets/executionLogs/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { PaginatedResponse } from 'backend/types'; 2 | import type { CloudifyEventPart, CloudifyLogEventPart, FullEventData } from 'app/widgets/common/events'; 3 | import type { commonIncludeKeys } from './consts'; 4 | 5 | export type Event = Pick & (CloudifyEventPart | CloudifyLogEventPart); 6 | 7 | export type ExecutionLogsData = PaginatedResponse; 8 | -------------------------------------------------------------------------------- /test/cypress/integration/widgets/cloud_button_spec.ts: -------------------------------------------------------------------------------- 1 | describe('Setup cloud account button widget', () => { 2 | before(() => cy.activate().useWidgetWithDefaultConfiguration('cloudButton')); 3 | 4 | it('should display a modal on button click', () => { 5 | cy.clickButton('Setup cloud account'); 6 | 7 | cy.get('.modal').within(() => { 8 | cy.contains('Welcome to Cloudify'); 9 | }); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /app/utils/types.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | namespace Stage.Types { 3 | type WithOptionalProperties = Omit & 4 | Partial>; 5 | } 6 | } 7 | 8 | export type ObjectKeys> = T[keyof T]; 9 | 10 | export type CancelablePromise = { 11 | promise: Promise; 12 | cancel: () => void; 13 | }; 14 | 15 | export {}; 16 | -------------------------------------------------------------------------------- /backend/routes/Config.ts: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import type { Response } from 'express'; 3 | import { getMode } from '../serverSettings'; 4 | import { getClientConfig } from '../config'; 5 | import type { GetConfigResponse } from './Config.types'; 6 | 7 | const router = express.Router(); 8 | 9 | router.get('/', (_req, res: Response) => { 10 | res.send(getClientConfig(getMode())); 11 | }); 12 | 13 | export default router; 14 | -------------------------------------------------------------------------------- /templates/pages/drilldownDeployments.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Subdeployments", 3 | "layout": [ 4 | { 5 | "type": "widgets", 6 | "content": [ 7 | { 8 | "name": "Deployments view", 9 | "width": 12, 10 | "height": 150, 11 | "x": 0, 12 | "y": 0, 13 | "definition": "deploymentsViewDrilledDown", 14 | "configuration": {} 15 | } 16 | ] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /app/components/common/status/SystemStatusIcon.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useSelector } from 'react-redux'; 3 | import type { ReduxState } from '../../../reducers'; 4 | import ClusterStatusIcon from './cluster/ClusterStatusIcon'; 5 | 6 | export default function SystemStatusIcon() { 7 | const systemStatus = useSelector((state: ReduxState) => state.manager.clusterStatus.status); 8 | return ; 9 | } 10 | -------------------------------------------------------------------------------- /backend/__mocks__/passport.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHandler } from 'express'; 2 | import { noop } from 'lodash'; 3 | 4 | const middlewareMock: RequestHandler = (req, _res, next) => { 5 | req.user = { username: 'testuser', role: '', group_system_roles: {}, tenants: {}, show_getting_started: false }; 6 | next(); 7 | }; 8 | 9 | export default { 10 | authenticate: () => middlewareMock, 11 | initialize: () => middlewareMock, 12 | use: noop 13 | }; 14 | -------------------------------------------------------------------------------- /test/cypress/support/cluster_status_commons.ts: -------------------------------------------------------------------------------- 1 | import { ClusterServiceStatus } from 'app/components/common/status/cluster/types'; 2 | 3 | export const styles = { 4 | [ClusterServiceStatus.Degraded]: 'background-color: rgb(251, 189, 8);', 5 | [ClusterServiceStatus.OK]: 'background-color: rgb(33, 186, 69);', 6 | [ClusterServiceStatus.Fail]: 'background-color: rgb(219, 40, 40);', 7 | [ClusterServiceStatus.Unknown]: 'background-color: rgb(170, 170, 170);' 8 | }; 9 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/src/AuthenticationWarning.tsx: -------------------------------------------------------------------------------- 1 | import Utils from './utils'; 2 | 3 | const { Message, Icon } = Stage.Basic; 4 | const translate = Utils.getWidgetTranslation(); 5 | 6 | const AuthenticationWarning = () => { 7 | return ( 8 | 9 | 10 | {translate('authenticationWarning')} 11 | 12 | ); 13 | }; 14 | 15 | export default AuthenticationWarning; 16 | -------------------------------------------------------------------------------- /backend/patches/pg+8.7.3.patch: -------------------------------------------------------------------------------- 1 | diff --git a/node_modules/pg/lib/connection.js b/node_modules/pg/lib/connection.js 2 | index ebb2f09..1a6a48f 100644 3 | --- a/node_modules/pg/lib/connection.js 4 | +++ b/node_modules/pg/lib/connection.js 5 | @@ -77,6 +77,7 @@ class Connection extends EventEmitter { 6 | var tls = require('tls') 7 | const options = { 8 | socket: self.stream, 9 | + host 10 | } 11 | 12 | if (self.ssl !== true) { 13 | -------------------------------------------------------------------------------- /backend/routes/UserApp.types.ts: -------------------------------------------------------------------------------- 1 | import type { UserAppsData } from '../db/models/UserAppsModel.types'; 2 | 3 | export type GetUserAppResponse = UserAppsData | null; 4 | 5 | export type PostUserAppResponse = UserAppsData; 6 | 7 | export type PostUserAppRequestBody = { 8 | appData: UserAppsData['appData']; 9 | version: UserAppsData['appDataVersion']; 10 | }; 11 | 12 | export interface GetUserAppClearPagesRequestQueryParams { 13 | tenant?: string; 14 | } 15 | -------------------------------------------------------------------------------- /widgets/blueprints/src/widget.css: -------------------------------------------------------------------------------- 1 | .blueprintsTable th:nth-child(6) { 2 | min-width: 81px; 3 | } 4 | 5 | .blueprintCatalog .segment { 6 | background: white !important; 7 | } 8 | 9 | .uploadBlueprintButton { 10 | z-index: 5; 11 | position: absolute !important; 12 | right: 12px; 13 | } 14 | 15 | .blueprintCatalog .actionButtons .button { 16 | margin: 0.2rem; 17 | } 18 | 19 | .blueprintCatalog .row .header { 20 | margin-bottom: 1rem; 21 | } 22 | -------------------------------------------------------------------------------- /widgets/nodes/src/NodeType.tsx: -------------------------------------------------------------------------------- 1 | import { icons } from 'cloudify-ui-common-frontend'; 2 | import type { TypeHierarchy } from './types'; 3 | 4 | interface NodeTypeIconProps { 5 | typeHierarchy: TypeHierarchy; 6 | } 7 | 8 | export default function NodeTypeIcon({ typeHierarchy }: NodeTypeIconProps) { 9 | const icon = icons.getNodeIcon([...typeHierarchy].reverse()); 10 | 11 | return {icon}; 12 | } 13 | -------------------------------------------------------------------------------- /app/components/templateManagement/pages/useCreatePageId.ts: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import { useSelector } from 'react-redux'; 3 | import type { ReduxState } from '../../../reducers'; 4 | import { createPageId } from '../../../actions/templateManagement/pages'; 5 | 6 | export default function useCreatePageId() { 7 | const pageDefs = useSelector((state: ReduxState) => state.templates.pagesDef); 8 | 9 | return (name: string) => createPageId(name, pageDefs); 10 | } 11 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/getPlanForUpdate.ts: -------------------------------------------------------------------------------- 1 | export default function getPlanForUpdate(plan: any, inputsValues: Record) { 2 | const newPlan = _.cloneDeep(plan); 3 | 4 | _.forEach(newPlan, (_inputObj, inputName) => { 5 | if (!_.isUndefined(inputsValues[inputName]) && !_.isUndefined(newPlan[inputName].default)) { 6 | newPlan[inputName].default = inputsValues[inputName]; 7 | } 8 | }); 9 | 10 | return newPlan; 11 | } 12 | -------------------------------------------------------------------------------- /backend/test/auth/CookieStrategy.test.ts: -------------------------------------------------------------------------------- 1 | import cookieStrategy from '../../auth/CookieStrategy'; 2 | import { TOKEN_COOKIE_NAME } from '../../consts'; 3 | 4 | describe('CookieStrategy', () => { 5 | it('should return new passport Strategy', () => { 6 | expect(cookieStrategy()).toEqual( 7 | expect.objectContaining({ 8 | _cookieName: TOKEN_COOKIE_NAME, 9 | name: 'cookie' 10 | }) 11 | ); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /test/jest/i18n.ts: -------------------------------------------------------------------------------- 1 | import type { TFunction, ResourceKey } from 'i18next'; 2 | import i18n from 'i18next'; 3 | import translation from 'translations/en.json'; 4 | 5 | export default function i18nInit(resource?: ResourceKey): Promise { 6 | return i18n.init({ 7 | resources: { 8 | en: { 9 | translation: resource || translation 10 | } 11 | }, 12 | lng: 'en', 13 | fallbackLng: 'en' 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /app/utils/hooks/useManager.ts: -------------------------------------------------------------------------------- 1 | import { useSelector } from 'react-redux'; 2 | import { useMemo } from 'react'; 3 | import type { ReduxState } from '../../reducers'; 4 | import Manager from '../Manager'; 5 | 6 | /** 7 | * Gets current manager from context. 8 | * @returns current manager object 9 | */ 10 | export default function useManager() { 11 | const manager = useSelector((state: ReduxState) => state.manager); 12 | return useMemo(() => new Manager(manager), [manager]); 13 | } 14 | -------------------------------------------------------------------------------- /app/widgets/common/inputs/utils/getConstraintValueFunction.ts: -------------------------------------------------------------------------------- 1 | import type { Constraint } from '../types'; 2 | 3 | export default function getConstraintValueFunction(constraints: Constraint[]) { 4 | return (constraintName: string) => { 5 | if (_.isEmpty(constraints)) { 6 | return undefined; 7 | } 8 | const index = _.findIndex(constraints, constraintName); 9 | return index >= 0 ? constraints[index][constraintName] : null; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /widgets/filter/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { PollingTimeConfiguration } from 'app/utils/GenericConfig'; 2 | 3 | export interface FilterConfiguration extends PollingTimeConfiguration { 4 | filterByBlueprints: boolean; 5 | filterByDeployments: boolean; 6 | filterByExecutions: boolean; 7 | filterByNodes: boolean; 8 | filterByNodeInstances: boolean; 9 | filterByExecutionsStatus: boolean; 10 | filterBySiteName: boolean; 11 | allowMultipleSelection: boolean; 12 | } 13 | -------------------------------------------------------------------------------- /test/cypress/integration/widgets/servers_num_spec.ts: -------------------------------------------------------------------------------- 1 | describe('Number of nodes widget', () => { 2 | before(() => 3 | cy 4 | .activate('valid_trial_license') 5 | .usePageMock('serversNum', { pollingTime: 1 }) 6 | .mockLogin() 7 | .killRunningExecutions() 8 | .deleteDeployments('', true) 9 | ); 10 | 11 | it('should display nodes count', () => { 12 | cy.contains('.serversNumWidget', '0'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packaging/files/usr/lib/systemd/system/cloudify-stage.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cloudify Console Service 3 | Wants=network-online.target 4 | After=network-online.target 5 | 6 | [Service] 7 | TimeoutStartSec=0 8 | Restart=always 9 | RestartSec=10 10 | EnvironmentFile=/etc/sysconfig/cloudify-stage 11 | User=stage_user 12 | Group=stage_group 13 | WorkingDirectory=/opt/cloudify-stage/backend 14 | ExecStart=/usr/bin/npm run start 15 | UMask=0002 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /test/jest/widgets/common/PollHelper.test.ts: -------------------------------------------------------------------------------- 1 | import PollHelper from 'widgets/common/utils/PollHelper'; 2 | 3 | describe('(Widgets common) PollHelper', () => { 4 | it('should reject when maximum number of attempts is exceeded', async () => { 5 | const pollHelper = new PollHelper(1); 6 | 7 | await pollHelper.wait(); 8 | pollHelper.resetAttempts(); 9 | await pollHelper.wait(); 10 | await expect(pollHelper.wait()).rejects.toThrowError(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /widgets/composerLink/README.md: -------------------------------------------------------------------------------- 1 | # Composer link 2 | Opens the [{{< param cfy_composer_name >}}]({{< param cfy_composer_link >}}), which allows creating blueprints with a graphical drag-and-drop tool. 3 | 4 |
5 | The {{< param cfy_composer_name >}} comes as part of the {{< param mgr_premium_title >}}, and is only available for users with certain roles. 6 |
7 | 8 | ![Composer-link]( /images/ui/widgets/composer-link.png ) 9 | 10 | 11 | ## Settings 12 | 13 | None 14 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/common/icons.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Icon } from 'semantic-ui-react'; 3 | 4 | const iconStyle = { marginLeft: '0.5em', verticalAlign: 'middle', display: 'inline-block' }; 5 | 6 | export const SuccessIcon = () => ; 7 | export const ErrorIcon = () => ; 8 | export const ProcessingIcon = () => ; 9 | -------------------------------------------------------------------------------- /widgets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "types": ["react", "react-dom", "moment", "lodash"], 5 | "plugins": [{ "name": "typescript-styled-plugin" }], 6 | "paths": { 7 | "*": ["../*"] 8 | } 9 | }, 10 | "include": ["**/*", "**/*.json", "../app/typings", "../app/utils/consts.ts", "../backend/routes/*.types.ts"], 11 | "exclude": ["*/backend.ts"], 12 | "references": [{ "path": "../app" }] 13 | } 14 | -------------------------------------------------------------------------------- /app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "types": [], 5 | "plugins": [{ "name": "typescript-styled-plugin" }], 6 | "paths": { 7 | "*": ["../*"] 8 | } 9 | }, 10 | "include": ["**/*", "**/*.json", "../backend/consts.ts", "../backend/serverSettings.ts", "../backend/**/types.ts", 11 | "../backend/**/*.types.ts", "../backend/sharedUtils.ts", "../conf/*.json"], 12 | "files": ["../package.json"] 13 | } 14 | -------------------------------------------------------------------------------- /app/widgets/common/deployments/DeploymentUpdatesActions.ts: -------------------------------------------------------------------------------- 1 | export default class DeploymentUpdatesActions { 2 | constructor(private toolbox: Stage.Types.WidgetlessToolbox) { 3 | this.toolbox = toolbox; 4 | } 5 | 6 | doGetUpdate(id: string) { 7 | return this.toolbox.getManager().doGet(`/deployment-updates/${id}`); 8 | } 9 | 10 | doGetExecutionParameters(id: string) { 11 | return this.toolbox.getManager().doGet(`/executions/${id}?_include=parameters`); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /backend/routes/GitHub.types.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/no-extraneous-dependencies,node/no-unpublished-import */ 2 | import type { Endpoints } from '@octokit/types'; 3 | 4 | export type { Endpoints } from '@octokit/types'; 5 | 6 | export type GetGitHubSearchRepositoriesResponse = Endpoints['GET /search/repositories']['response']['data'] & { 7 | isAuth: boolean; 8 | }; 9 | 10 | export type GetGitHubReposTreesResponse = 11 | Endpoints['GET /repos/{owner}/{repo}/git/trees/{tree_sha}']['response']['data']; 12 | -------------------------------------------------------------------------------- /widgets/deploymentActionButtons/src/widget.types.ts: -------------------------------------------------------------------------------- 1 | import type { FullDeploymentData } from 'app/widgets/common/deployments/DeploymentActions'; 2 | import type { fetchedDeploymentFields } from './widget.consts'; 3 | 4 | export type FetchedDeployment = Pick; 5 | 6 | export type FetchedDeploymentState = 7 | // eslint-disable-next-line camelcase 8 | { status: 'success'; data: FetchedDeployment } | { status: 'loading' } | { status: 'error'; error: Error }; 9 | -------------------------------------------------------------------------------- /app/components/page/content/PageContent.css: -------------------------------------------------------------------------------- 1 | .draggedTab { 2 | border: 1px solid #d4d4d5; 3 | border-bottom: none; 4 | border-top-left-radius: 4px; 5 | border-top-right-radius: 4px; 6 | margin-bottom: 4px; 7 | padding-top: 13px; 8 | text-align: center; 9 | color: rgba(0, 0, 0, 0.95); 10 | background-color: white; 11 | opacity: 0.9; 12 | } 13 | 14 | .draggedTab.active { 15 | font-weight: bold; 16 | } 17 | 18 | .draggedTab button { 19 | margin-right: 0 !important; 20 | } 21 | -------------------------------------------------------------------------------- /app/widgets/common/map/MarkerIcon.ts: -------------------------------------------------------------------------------- 1 | import Consts from '../../../utils/consts'; 2 | 3 | export type MarkerIconColor = 'blue' | 'green' | 'grey' | 'red' | 'yellow'; 4 | 5 | export function createMarkerIcon(color: MarkerIconColor) { 6 | return new window.L.Icon({ 7 | iconUrl: `${Consts.CONTEXT_PATH}/static/images/marker-icon-${color}.png`, 8 | shadowUrl: `${Consts.CONTEXT_PATH}/static/images/marker-shadow.png`, 9 | iconAnchor: [12, 41], 10 | popupAnchor: [1, -34] 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/menu.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | 5 | .ui.pagination.menu { 6 | box-shadow: none; 7 | border-color: @lightGrey; 8 | .item { 9 | &::before { 10 | width: 0; 11 | } 12 | &.active { 13 | &::before { 14 | width: 0; 15 | } 16 | } 17 | &:hover { 18 | color: @blue; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/components/overlays/gettingStarted/useCloudSetupUrlParam.ts: -------------------------------------------------------------------------------- 1 | import useSearchParam from '../../../utils/hooks/useSearchParam'; 2 | 3 | const cloudSetupParameterName = 'cloudSetup'; 4 | const cloudSetupParameterValue = 'true'; 5 | 6 | export default function useCloudSetupUrlParam(): [boolean, () => void] { 7 | const [cloudSetupParameter, , deleteCloudSetupParameter] = useSearchParam(cloudSetupParameterName); 8 | 9 | return [cloudSetupParameter === cloudSetupParameterValue, deleteCloudSetupParameter]; 10 | } 11 | -------------------------------------------------------------------------------- /app/index.tmpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Cloudify Console 6 | 7 | 8 | 9 | 10 |
11 |
12 | 14 |
15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /app/utils/hooks/useEventListener.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export default function useEventListener( 4 | toolbox: Stage.Types.WidgetlessToolbox, 5 | event: string | undefined, 6 | handler: (...args: any[]) => void 7 | ) { 8 | useEffect(() => { 9 | if (event) { 10 | toolbox.getEventBus().on(event, handler); 11 | return () => toolbox.getEventBus().off(event, handler); 12 | } 13 | 14 | return undefined; 15 | }, [event, handler]); 16 | } 17 | -------------------------------------------------------------------------------- /widgets/filters/src/FilterAddModal.tsx: -------------------------------------------------------------------------------- 1 | import type { FunctionComponent } from 'react'; 2 | import type { FilterModalProps } from './FilterModal'; 3 | import FilterModal from './FilterModal'; 4 | 5 | type FilterAddModalProps = Pick; 6 | 7 | const FilterAddModal: FunctionComponent = props => { 8 | return ; 9 | }; 10 | 11 | export default FilterAddModal; 12 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/index.ts: -------------------------------------------------------------------------------- 1 | import * as DCommon from './common'; 2 | import { getSharedConfiguration, sharedDefinition } from './configuration'; 3 | import { DeploymentsView as DDeploymentsView } from './DeploymentsView'; 4 | import './styles.scss'; 5 | import { DeploymentStatus } from './types'; 6 | 7 | export default { 8 | sharedDefinition, 9 | Common: DCommon, 10 | Configuration: { getSharedConfiguration }, 11 | DeploymentsView: DDeploymentsView, 12 | Types: { DeploymentStatus } 13 | }; 14 | -------------------------------------------------------------------------------- /backend/routes/Filters.ts: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import type { Response } from 'express'; 3 | import { getFilterUsage } from '../handler/FilterHandler'; 4 | import type { GetFiltersUsageResponse } from './Filters.types'; 5 | 6 | const router = express.Router(); 7 | 8 | router.get('/usage/:filterId', (req, res: Response, next) => { 9 | getFilterUsage(req.params.filterId) 10 | .then(result => res.send(result)) 11 | .catch(next); 12 | }); 13 | 14 | export default router; 15 | -------------------------------------------------------------------------------- /backend/test/routes/Widgets.test.ts: -------------------------------------------------------------------------------- 1 | import request from 'supertest'; 2 | import app from 'app'; 3 | import { isAuthorized } from 'handler/AuthHandler'; 4 | 5 | jest.mock('handler/AuthHandler'); 6 | 7 | (isAuthorized).mockReturnValue(false); 8 | 9 | describe('/widgets endpoint', () => { 10 | it('should validate install widget permission', async () => { 11 | const response = await request(app).delete('/console/widgets/widgetId'); 12 | expect(response.statusCode).toBe(403); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /app/widgets/common/labels/LabelErrorPopup.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps, FunctionComponent } from 'react'; 2 | import React from 'react'; 3 | 4 | interface LabelsErrorPopupProps { 5 | content: ComponentProps['content']; 6 | } 7 | 8 | const LabelsErrorPopup: FunctionComponent = ({ content }) => { 9 | const { Popup } = Stage.Basic; 10 | return } content={content} position="top left" pinned wide />; 11 | }; 12 | export default LabelsErrorPopup; 13 | -------------------------------------------------------------------------------- /backend/migrations/common/types.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line import/no-extraneous-dependencies,node/no-unpublished-import 2 | import type { DataTypes } from 'sequelize'; 3 | import type { UpDownFunction } from 'cloudify-ui-common-backend'; 4 | 5 | export type DataTypes = typeof DataTypes; 6 | // eslint-disable-next-line import/no-extraneous-dependencies,node/no-unpublished-import 7 | export type { QueryInterface, QueryInterfaceIndexOptions } from 'sequelize'; 8 | export type MigrationObject = { up: UpDownFunction; down: UpDownFunction }; 9 | -------------------------------------------------------------------------------- /backend/handler/__mocks__/AuthHandler.ts: -------------------------------------------------------------------------------- 1 | export const isAuthorized = jest.fn(() => { 2 | return true; 3 | }); 4 | 5 | export const getRBAC = jest.fn(() => { 6 | return Promise.resolve({ permissions: {} }); 7 | }); 8 | 9 | export const getToken = jest.fn(); 10 | 11 | export const isProductLicensed = jest.fn(); 12 | 13 | export const getManagerVersion = jest.fn(); 14 | 15 | export const getAndCacheConfig = jest.fn(); 16 | 17 | export const getLicense = jest.fn(); 18 | 19 | export const getTokenViaSamlResponse = jest.fn(); 20 | -------------------------------------------------------------------------------- /backend/routes/index.d.ts: -------------------------------------------------------------------------------- 1 | import type { GroupSystemRoles, TenantsRoles } from '../types'; 2 | 3 | declare global { 4 | namespace Express { 5 | interface User { 6 | username: string; 7 | role: string; 8 | // eslint-disable-next-line camelcase 9 | group_system_roles: GroupSystemRoles; 10 | tenants: TenantsRoles; 11 | // eslint-disable-next-line camelcase 12 | show_getting_started: boolean; 13 | } 14 | } 15 | } 16 | 17 | export {}; 18 | -------------------------------------------------------------------------------- /widgets/agents/src/consts.ts: -------------------------------------------------------------------------------- 1 | import type { InstallMethod } from './types'; 2 | 3 | interface InstallMethodsOption { 4 | text: string; 5 | name: string; 6 | value: InstallMethod; 7 | } 8 | 9 | export const installMethodsOptions: InstallMethodsOption[] = [ 10 | { text: 'Remote', name: 'Remote', value: 'remote' }, 11 | { text: 'Plugin', name: 'Plugin', value: 'plugin' }, 12 | { text: 'Init Script', name: 'Init Script', value: 'init_script' }, 13 | { text: 'Provided', name: 'Provided', value: 'provided' } 14 | ]; 15 | -------------------------------------------------------------------------------- /widgets/executionNum/README.md: -------------------------------------------------------------------------------- 1 | # Number of running executions 2 | Displays the total number of executions which are currently running, i.e, in one of the following statuses: 3 | 'pending', 'started', 'cancelling', 'force_cancelling', 'kill_cancelling' according to the user’s permissions. 4 | 5 | ![number_of_running_executions]( /images/ui/widgets/num_of_running_executions.png ) 6 | 7 | 8 | ## Settings 9 | 10 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 10 seconds. 11 | -------------------------------------------------------------------------------- /widgets/tokens/src/TokensTableHeader/CreateTokenModal.types.ts: -------------------------------------------------------------------------------- 1 | export interface ReceivedToken { 2 | id: string; 3 | description: string; 4 | // eslint-disable-next-line camelcase 5 | expiration_date: null; 6 | // eslint-disable-next-line camelcase 7 | last_used: null; 8 | username: string; 9 | value: string; 10 | role: string; 11 | } 12 | 13 | export interface TokensPostRequestBody { 14 | description?: string; 15 | // eslint-disable-next-line camelcase 16 | expiration_date?: string; 17 | } 18 | -------------------------------------------------------------------------------- /app/widgets/common/labels/index.ts: -------------------------------------------------------------------------------- 1 | import { sortLabels, isLabelModifiable } from './common'; 2 | import DuplicationErrorPopup from './DuplicationErrorPopup'; 3 | import Input from './LabelsInput'; 4 | import Modal from './LabelsModal'; 5 | import ManageModal from './ManageLabelsModal'; 6 | import ValidationErrorPopup from './ValidationErrorPopup'; 7 | 8 | export default { 9 | DuplicationErrorPopup, 10 | Input, 11 | Modal, 12 | ManageModal, 13 | ValidationErrorPopup, 14 | sortLabels, 15 | isLabelModifiable 16 | }; 17 | -------------------------------------------------------------------------------- /semantic-ui/site/collections/message.overrides.less: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | 5 | .ui.message { 6 | &.icon { 7 | & { 8 | align-items: flex-start; 9 | } 10 | 11 | & > .icon:not(.close) { 12 | @relativeIconSizeScaling: @emSize / 30; 13 | 14 | margin-right: @horizontalPadding * @relativeIconSizeScaling; 15 | margin-top: @relative2px * @relativeIconSizeScaling; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /widgets/deploymentActionButtons/README.md: -------------------------------------------------------------------------------- 1 | # Deployment action buttons 2 | Buttons which allow running workflows of the deployment currently set in the context, updating it or deleting it. 3 | 4 | See [notes](/working_with/console/widgets/index.html) for more information on resource context. 5 | 6 | ![deployment-action-buttons.png]( /images/ui/widgets/deployment-action-buttons.png ) 7 | 8 | 9 | ## Settings 10 | 11 | * `Refresh time interval` - The time interval in which the widget’s data will be refreshed, in seconds. Default: 5 seconds. 12 | -------------------------------------------------------------------------------- /widgets/filters/src/FilterEditModal.tsx: -------------------------------------------------------------------------------- 1 | import type { FunctionComponent } from 'react'; 2 | import type { FilterModalProps } from './FilterModal'; 3 | import FilterModal from './FilterModal'; 4 | 5 | type FilterEditModalProps = Omit; 6 | 7 | const FilterEditModal: FunctionComponent = props => { 8 | return ; 9 | }; 10 | 11 | export default FilterEditModal; 12 | -------------------------------------------------------------------------------- /app/actions/manager/version.ts: -------------------------------------------------------------------------------- 1 | import type { VersionResponse } from 'backend/handler/AuthHandler.types'; 2 | import type { PayloadAction } from '../types'; 3 | import { ActionType } from '../types'; 4 | 5 | export type SetVersionAction = PayloadAction; 6 | export type VersionAction = SetVersionAction; 7 | 8 | export function setVersion(version: VersionResponse): SetVersionAction { 9 | return { 10 | type: ActionType.SET_MANAGER_VERSION, 11 | payload: version 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /app/widgets/common/components/IconButtonsGroup.tsx: -------------------------------------------------------------------------------- 1 | import type { FunctionComponent } from 'react'; 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | const RightAlignedDiv = styled.div` 6 | display: flex; 7 | justify-content: flex-end; 8 | && > * { 9 | margin-left: 15px; 10 | } 11 | `; 12 | 13 | const IconButtonsGroup: FunctionComponent = ({ children }) => { 14 | return children ? {children} : null; 15 | }; 16 | 17 | export default IconButtonsGroup; 18 | -------------------------------------------------------------------------------- /app/widgets/common/deployModal/useFetchTrigger.ts: -------------------------------------------------------------------------------- 1 | import type { DependencyList } from 'react'; 2 | import { useCallback, useEffect } from 'react'; 3 | import { debounce } from 'lodash'; 4 | 5 | const useFetchTrigger = (fetchTrigger: () => void, fetchDependencies: DependencyList) => { 6 | const delayMs = 500; 7 | const debouncedFetchTrigger = useCallback(debounce(fetchTrigger, delayMs), []); 8 | 9 | useEffect(() => { 10 | debouncedFetchTrigger(); 11 | }, fetchDependencies); 12 | }; 13 | 14 | export default useFetchTrigger; 15 | -------------------------------------------------------------------------------- /backend/routes/SourceBrowser.types.ts: -------------------------------------------------------------------------------- 1 | import type { ScanningDir } from '../handler/SourceHandler.types'; 2 | 3 | export type GetSourceBrowseBlueprintFileResponse = string; 4 | 5 | interface ScanningDirWithTimestamp extends ScanningDir { 6 | timestamp: string; 7 | } 8 | 9 | export type GetSourceBrowseBlueprintArchiveResponse = ScanningDirWithTimestamp | null; 10 | 11 | export interface PutSourceListYamlQueryParams { 12 | includeFilename?: string; 13 | url?: string; 14 | } 15 | 16 | export type PutSourceListYamlResponse = string[]; 17 | -------------------------------------------------------------------------------- /widgets/userGroups/src/widget.types.ts: -------------------------------------------------------------------------------- 1 | import type { UserGroupResponse } from 'backend/handler/AuthHandler.types'; 2 | import type { DataTableConfiguration, PollingTimeConfiguration } from '../../../app/utils/GenericConfig'; 3 | 4 | export type UserGroup = UserGroupResponse; 5 | 6 | export declare namespace UserGroupManagmentWidget { 7 | export type Params = unknown; 8 | 9 | export type Data = Stage.Types.PaginatedResponse; 10 | 11 | export type Configuration = PollingTimeConfiguration & DataTableConfiguration; 12 | } 13 | -------------------------------------------------------------------------------- /backend/migrations/20220523121125-6_4-RemoveApplicationsTable.ts: -------------------------------------------------------------------------------- 1 | import { createApplicationModel } from './20170425132017-4_0-init'; 2 | import type { MigrationObject } from './common/types'; 3 | 4 | export const { up, down }: MigrationObject = { 5 | up: queryInterface => 6 | queryInterface 7 | .dropTable('Applications') 8 | .then(() => queryInterface.removeIndex('Applications', ['id'], { type: 'UNIQUE' })), 9 | 10 | down: (queryInterface, Sequelize) => createApplicationModel(queryInterface, Sequelize) 11 | }; 12 | -------------------------------------------------------------------------------- /backend/test/handlers/services/LoggerService.test.ts: -------------------------------------------------------------------------------- 1 | import { getLogger } from 'handler/LoggerHandler'; 2 | import Logger from 'handler/services/LoggerService'; 3 | 4 | jest.mock('handler/LoggerHandler'); 5 | const loggerMock = {}; 6 | (getLogger).mockReturnValue(loggerMock); 7 | 8 | describe('LoggerService', () => { 9 | it('should return logger instance', () => { 10 | const logger = Logger(); 11 | expect(logger).toBe(loggerMock); 12 | expect(getLogger).toHaveBeenCalledWith('WidgetBackend'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /app/utils/ConfigLoader.ts: -------------------------------------------------------------------------------- 1 | import log from 'loglevel'; 2 | import fetch from 'isomorphic-fetch'; 3 | 4 | import type { GetConfigResponse } from 'backend/routes/Config.types'; 5 | import StageUtils from './stageUtils'; 6 | 7 | export default class ConfigLoader { 8 | static load(): Promise { 9 | return fetch(StageUtils.Url.url('/config')) 10 | .then(response => response.json()) 11 | .catch(e => { 12 | log.debug('Error fetching configuration file', e); 13 | }); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/widgets/common/filters/index.ts: -------------------------------------------------------------------------------- 1 | import { environmentFilterRule, filterIdQueryParameterName } from './common'; 2 | import FilterActions from './FilterActions'; 3 | import FilterIdDropdown from './FilterIdDropdown'; 4 | import RulesForm from './RulesForm'; 5 | import { FilterRuleOperators, FilterRuleType } from './types'; 6 | 7 | export default { 8 | Actions: FilterActions, 9 | environmentFilterRule, 10 | FilterIdDropdown, 11 | filterIdQueryParameterName, 12 | RulesForm, 13 | FilterRuleOperators, 14 | FilterRuleType 15 | }; 16 | -------------------------------------------------------------------------------- /backend/migrations/20220523115533-6_4-RemoveClientConfigsTable.ts: -------------------------------------------------------------------------------- 1 | import { createClientConfigs } from './20170425132017-4_0-init'; 2 | import type { MigrationObject } from './common/types'; 3 | 4 | export const { up, down }: MigrationObject = { 5 | up: queryInterface => 6 | queryInterface 7 | .dropTable('ClientConfigs') 8 | .then(() => queryInterface.removeIndex('ClientConfigs', ['managerIp'], { type: 'UNIQUE' })), 9 | 10 | down: (queryInterface, Sequelize) => createClientConfigs(queryInterface, Sequelize) 11 | }; 12 | -------------------------------------------------------------------------------- /widgets/blueprintCatalog/src/consts.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | WIDGET_ID: 'blueprintCatalog', 3 | GITHUB_DATA_SOURCE: 'github', 4 | JSON_DATA_SOURCE: 'json', 5 | BLUEPRINT_IMAGE_FILENAME: 'blueprint.png', 6 | GITHUB_BLUEPRINT_IMAGE_URL: (user: string, repo: string) => `/github/content/${user}/${repo}/master/blueprint.png`, 7 | CONTEXT_KEY: { 8 | UPLOADING_BLUEPRINT: 'uploadingBlueprint', 9 | UPLOADING_BLUEPRINT_ERROR: 'uploadingBlueprintError', 10 | SELECTED_BLUEPRINT_ID: 'selectedBlueprintId' 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /widgets/snapshots/src/widget.types.ts: -------------------------------------------------------------------------------- 1 | import type { Visibility } from 'app/widgets/common/types'; 2 | import type { DataTableConfiguration } from 'app/utils/GenericConfig'; 3 | import type { Widget } from 'app/utils/StageAPI'; 4 | 5 | export interface Snapshot { 6 | id?: string; 7 | /* eslint-disable camelcase */ 8 | created_at?: string; 9 | created_by?: string; 10 | /* eslint-enable camelcase */ 11 | visibility?: Visibility; 12 | status?: string; 13 | } 14 | 15 | export type SnapshotsWidget = Widget; 16 | -------------------------------------------------------------------------------- /app/utils/props/Toolbox.ts: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | 3 | const ToolboxPropType = PropTypes.shape({ 4 | drillDown: PropTypes.func, 5 | getContext: PropTypes.func, 6 | getEventBus: PropTypes.func, 7 | getManager: PropTypes.func, 8 | getManagerState: PropTypes.func, 9 | getWidget: PropTypes.func, 10 | getWidgetBackend: PropTypes.func, 11 | goToPage: PropTypes.func, 12 | goToParentPage: PropTypes.func, 13 | loading: PropTypes.func, 14 | refresh: PropTypes.func 15 | }); 16 | export default ToolboxPropType; 17 | -------------------------------------------------------------------------------- /widgets/pluginsCatalog/README.md: -------------------------------------------------------------------------------- 1 | # Plugins Catalog 2 | A widget listing all the latest releases of the certified plugins, allowing plugin upload to the current tenant. You can upload selected plugins or upload all plugins at once by clicking the **Upload all plugins** button. 3 | 4 | ![plugins_catalog]( /images/ui/widgets/plugins-catalog.png ) 5 | 6 | 7 | ## Settings 8 | 9 | * `Plugins Catalog JSON Source` - The json file from which the widget reads the plugins list. 10 | * `Sort by name` - if set to true, then plugins will be sorted by name. Default: No 11 | -------------------------------------------------------------------------------- /app/styles/colors.scss: -------------------------------------------------------------------------------- 1 | // TODO(RD-6464): After moving theme related files to cloudify-ui-common, make sure that those colors would be also relocated 2 | 3 | /*--- Cloudify Site Colors ---*/ 4 | 5 | $cloudify-red: #ef5350; 6 | $cloudify-yellow: #fee584; 7 | $cloudify-blue: #65adff; 8 | $cloudify-grey: #5f6368; 9 | $cloudify-black: #050229; 10 | 11 | :export { 12 | cloudifyRed: $cloudify-red; 13 | cloudifyYellow: $cloudify-yellow; 14 | cloudifyBlue: $cloudify-blue; 15 | cloudifyGrey: $cloudify-grey; 16 | cloudifyBlack: $cloudify-black; 17 | } 18 | -------------------------------------------------------------------------------- /backend/migrations/20170821121958-4_2-ResourceModelJsonField.ts: -------------------------------------------------------------------------------- 1 | import type { MigrationObject } from './common/types'; 2 | 3 | const DATA_COLUMN_NAME = 'data'; 4 | 5 | export const { up, down }: MigrationObject = { 6 | up(queryInterface, Sequelize) { 7 | return queryInterface.addColumn('Resources', DATA_COLUMN_NAME, { 8 | type: Sequelize.JSONB, 9 | allowNull: true 10 | }); 11 | }, 12 | 13 | down(queryInterface) { 14 | return queryInterface.removeColumn('Resources', DATA_COLUMN_NAME); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /widgets/events/src/widget.css: -------------------------------------------------------------------------------- 1 | .ui.table td.row-error, .ui.table tr.row-error { 2 | box-shadow: 0 0 0 #FFA3A3 inset; 3 | background: #FFD6D6 !important; 4 | color: #7F1E1E !important; 5 | } 6 | 7 | .ui.table td.row-debug, .ui.table tr.row-debug { 8 | box-shadow: 0 0 0 #A3C2FF inset; 9 | background: #D5FFFF !important; 10 | color: #245396 !important; 11 | } 12 | 13 | .ui.table td.row-warning, .ui.table tr.row-warning { 14 | box-shadow: 0 0 0 #FFFFA3 inset; 15 | background: #FFFFD6 !important; 16 | color: #68681A !important; 17 | } 18 | -------------------------------------------------------------------------------- /widgets/labels/src/AddLabelsModal.tsx: -------------------------------------------------------------------------------- 1 | import type { LabelsModalProps } from 'app/widgets/common/labels/LabelsModal'; 2 | 3 | type AddLabelsModalProps = Omit; 4 | export default function AddLabelsModal(props: AddLabelsModalProps) { 5 | const { Modal } = Stage.Common.Labels; 6 | return ( 7 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/detailsPane/drilldownButtons/common.ts: -------------------------------------------------------------------------------- 1 | import { i18nDrillDownPrefix } from '../../common'; 2 | import type { SubdeploymentsResult } from './subdeployments-result'; 3 | import StageUtils from '../../../../../utils/stageUtils'; 4 | 5 | const i18nDrillDownButtonsPrefix = `${i18nDrillDownPrefix}.buttons`; 6 | 7 | export const tDrillDownButtons = StageUtils.getT(i18nDrillDownButtonsPrefix); 8 | 9 | export const shouldDisplaySubdeploymentButton = (result: SubdeploymentsResult) => { 10 | return !result.loading && result.count > 0; 11 | }; 12 | -------------------------------------------------------------------------------- /backend/handler/widgets/validateUniqueness.ts: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import { getBuiltInWidgets, getUserWidgets } from './WidgetsHandler'; 3 | 4 | function getAllWidgets() { 5 | return _.concat(getBuiltInWidgets(), getUserWidgets()); 6 | } 7 | 8 | export default function validateUniqueness(widgetId: string) { 9 | const widgets = getAllWidgets(); 10 | if (_.indexOf(widgets, widgetId) >= 0) { 11 | return Promise.reject({ status: 422, message: `Widget ${widgetId} is already installed` }); 12 | } 13 | 14 | return Promise.resolve(); 15 | } 16 | -------------------------------------------------------------------------------- /widgets/sitesMap/src/types.ts: -------------------------------------------------------------------------------- 1 | export const { DeploymentStatus } = Stage.Common.DeploymentsView.Types; 2 | 3 | export type DeploymentStatus = typeof DeploymentStatus[keyof typeof DeploymentStatus]; 4 | 5 | export type DeploymentStatusesSummary = Record; 6 | 7 | export type SitesData = Record< 8 | string, 9 | { 10 | name: string; 11 | latitude: number; 12 | longitude: number; 13 | statusesSummary: DeploymentStatusesSummary; 14 | } 15 | >; 16 | 17 | export const DeploymentStatuses = DeploymentStatus; 18 | -------------------------------------------------------------------------------- /app/widgets/common/deploymentsView/header/ExecutionGroupsActions.ts: -------------------------------------------------------------------------------- 1 | export default class ExecutionGroupsActions { 2 | constructor(private toolbox: Stage.Types.Toolbox) {} 3 | 4 | doStart(groupId: string, workflowId: string, defaultParameters?: Record) { 5 | return this.toolbox.getManager().doPost('/execution-groups', { 6 | body: { 7 | workflow_id: workflowId, 8 | deployment_group_id: groupId, 9 | default_parameters: defaultParameters 10 | } 11 | }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/widgets/common/filters/AddRuleButton.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentProps, FunctionComponent } from 'react'; 2 | import React from 'react'; 3 | import { getTranslation } from './common'; 4 | import { Button } from '../../../components/basic'; 5 | 6 | interface AddRuleButtonProps { 7 | onClick: ComponentProps['onClick']; 8 | } 9 | 10 | const AddRuleButton: FunctionComponent = ({ onClick }) => { 11 | return