├── CODEOWNERS
├── monitoring-dashboard
├── components
│ ├── org.wso2.ei.dashboard.core
│ │ ├── .swagger-codegen
│ │ │ └── VERSION
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── webapp
│ │ │ │ └── index.jsp
│ │ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── wso2
│ │ │ │ └── ei
│ │ │ │ └── dashboard
│ │ │ │ └── core
│ │ │ │ ├── rest
│ │ │ │ ├── model
│ │ │ │ │ ├── CSRFToken.java
│ │ │ │ │ ├── User.java
│ │ │ │ │ ├── UsersResourceResponse.java
│ │ │ │ │ ├── LogsResourceResponse.java
│ │ │ │ │ ├── RolesResourceResponse.java
│ │ │ │ │ ├── NodesResourceResponse.java
│ │ │ │ │ ├── LogConfigsResourceResponse.java
│ │ │ │ │ ├── ArtifactsResourceResponse.java
│ │ │ │ │ ├── RegistryResourceResponse.java
│ │ │ │ │ ├── LogList.java
│ │ │ │ │ └── Artifacts.java
│ │ │ │ ├── annotation
│ │ │ │ │ └── Secured.java
│ │ │ │ ├── RestApplication.java
│ │ │ │ └── delegates
│ │ │ │ │ └── ArtifactsManager.java
│ │ │ │ ├── exception
│ │ │ │ ├── ManagementApiException.java
│ │ │ │ └── DashboardServerException.java
│ │ │ │ ├── data
│ │ │ │ └── manager
│ │ │ │ │ └── DataManagerSingleton.java
│ │ │ │ └── commons
│ │ │ │ └── utils
│ │ │ │ └── TokenUtils.java
│ │ └── .swagger-codegen-ignore
│ ├── org.wso2.micro.integrator.dashboard.web
│ │ └── web-app
│ │ │ ├── public
│ │ │ ├── robots.txt
│ │ │ ├── favicon.ico
│ │ │ ├── logo192.png
│ │ │ ├── logo512.png
│ │ │ ├── monaco-editor
│ │ │ │ ├── min
│ │ │ │ │ └── vs
│ │ │ │ │ │ └── base
│ │ │ │ │ │ ├── browser
│ │ │ │ │ │ └── ui
│ │ │ │ │ │ │ └── codicons
│ │ │ │ │ │ │ └── codicon
│ │ │ │ │ │ │ └── codicon.ttf
│ │ │ │ │ │ └── common
│ │ │ │ │ │ └── worker
│ │ │ │ │ │ ├── simpleWorker.nls.js
│ │ │ │ │ │ ├── simpleWorker.nls.de.js
│ │ │ │ │ │ ├── simpleWorker.nls.es.js
│ │ │ │ │ │ ├── simpleWorker.nls.fr.js
│ │ │ │ │ │ ├── simpleWorker.nls.it.js
│ │ │ │ │ │ ├── simpleWorker.nls.ja.js
│ │ │ │ │ │ ├── simpleWorker.nls.ko.js
│ │ │ │ │ │ ├── simpleWorker.nls.ru.js
│ │ │ │ │ │ ├── simpleWorker.nls.zh-cn.js
│ │ │ │ │ │ └── simpleWorker.nls.zh-tw.js
│ │ │ │ └── LICENSE
│ │ │ └── manifest.json
│ │ │ ├── src
│ │ │ ├── setupTests.js
│ │ │ ├── redux
│ │ │ │ ├── DataReducer.js
│ │ │ │ ├── GroupListReducer.js
│ │ │ │ ├── Reducers.js
│ │ │ │ ├── SuperAdminReducer.js
│ │ │ │ └── IsRefreshedReducer.js
│ │ │ ├── pages
│ │ │ │ ├── Templates.js
│ │ │ │ ├── APIs.js
│ │ │ │ ├── Tasks.js
│ │ │ │ ├── LogFiles.js
│ │ │ │ ├── Sequences.js
│ │ │ │ ├── LocalEntries.js
│ │ │ │ ├── Datasources.js
│ │ │ │ ├── Services.js
│ │ │ │ ├── DataServices.js
│ │ │ │ ├── SiddhiApplications.js
│ │ │ │ ├── Endpoints.js
│ │ │ │ ├── Listener.js
│ │ │ │ ├── Stores.js
│ │ │ │ ├── Queries.js
│ │ │ │ ├── Windows.js
│ │ │ │ ├── MessageStores.js
│ │ │ │ ├── Aggregations.js
│ │ │ │ ├── ProxyService.js
│ │ │ │ ├── InboundEndpoints.js
│ │ │ │ ├── MessageProcessors.js
│ │ │ │ ├── CarbonApplications.js
│ │ │ │ ├── Sinks.js
│ │ │ │ ├── Sources.js
│ │ │ │ ├── Connectors.js
│ │ │ │ └── nodes
│ │ │ │ │ └── Nodes.js
│ │ │ ├── commons
│ │ │ │ ├── statusCell
│ │ │ │ │ ├── StatusCell.test.js
│ │ │ │ │ └── __snapshots__
│ │ │ │ │ │ └── StatusCell.test.js.snap
│ │ │ │ ├── sideDrawers
│ │ │ │ │ └── commons
│ │ │ │ │ │ ├── CopyToClipboardRow.js
│ │ │ │ │ │ └── CopyToClipBoardCell.js
│ │ │ │ ├── Error.jsx
│ │ │ │ ├── Progress.jsx
│ │ │ │ └── TypeIcon.js
│ │ │ ├── auth
│ │ │ │ ├── Constants.js
│ │ │ │ ├── Interceptor.js
│ │ │ │ └── Logout.js
│ │ │ ├── utils
│ │ │ │ └── Constants.js
│ │ │ └── home
│ │ │ │ └── layout
│ │ │ │ └── Content.js
│ │ │ └── .gitignore
│ ├── org.wso2.micro.integrator.dashboard.utils
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── wso2
│ │ │ └── micro
│ │ │ └── integrator
│ │ │ └── dashboard
│ │ │ └── utils
│ │ │ ├── Constants.java
│ │ │ └── SSOConfigException.java
│ └── org.wso2.dashboard.security.user.core
│ │ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── wso2
│ │ └── dashboard
│ │ └── security
│ │ └── user
│ │ └── core
│ │ ├── User.java
│ │ ├── common
│ │ └── UnsupportedSecretTypeException.java
│ │ └── UserInfo.java
├── distribution
│ ├── src
│ │ └── main
│ │ │ └── resources
│ │ │ ├── conf
│ │ │ ├── config-parser
│ │ │ │ ├── validator.json
│ │ │ │ ├── unit-resolve.json
│ │ │ │ ├── templates
│ │ │ │ │ └── conf
│ │ │ │ │ │ └── security
│ │ │ │ │ │ └── cipher-text.properties.j2
│ │ │ │ └── default.json
│ │ │ ├── security
│ │ │ │ ├── dashboard.jks
│ │ │ │ ├── wso2carbon.jks
│ │ │ │ ├── client-truststore.jks
│ │ │ │ └── cipher-text.properties
│ │ │ ├── cipher-standalone-config.properties
│ │ │ └── deployment.toml
│ │ │ ├── updates
│ │ │ └── product.txt
│ │ │ └── bin
│ │ │ ├── version.txt
│ │ │ └── yajsw
│ │ │ └── README.txt
│ └── filter.properties
└── README.md
├── cmd
├── integration
│ ├── testdata
│ │ ├── capps
│ │ │ ├── HealthCareCompositeExporter_1.0.0.car
│ │ │ └── RESTDataServiceCompositeExporter_1.0.0.car
│ │ ├── mysql
│ │ │ ├── mysql_transaction_count.sql
│ │ │ └── Dockerfile
│ │ └── mi
│ │ │ └── docker-entrypoint.sh
│ ├── config.yaml
│ ├── cleanup_MI.sh
│ └── connector_test.go
├── docs
│ ├── mi_logout.md
│ ├── mi_version.md
│ ├── mi_secret.md
│ ├── mi_delete_env.md
│ ├── mi_secret_init.md
│ ├── mi_add_env.md
│ ├── mi_get_envs.md
│ ├── mi_login.md
│ ├── mi_delete.md
│ ├── mi_add_role.md
│ ├── mi_add_user.md
│ ├── mi_update_user.md
│ ├── mi_get_connectors.md
│ ├── mi_activate_endpoint.md
│ ├── mi_update.md
│ ├── mi_add.md
│ ├── mi_deactivate_endpoint.md
│ ├── mi_activate.md
│ ├── mi_update_hashicorp-secret.md
│ ├── mi_update_log-level.md
│ ├── mi_activate_proxy-service.md
│ ├── mi_add_log-level.md
│ ├── mi_deactivate.md
│ ├── mi_deactivate_proxy-service.md
│ ├── mi_delete_user.md
│ ├── mi_delete_role.md
│ ├── mi_get_log-levels.md
│ ├── mi_activate_message-processor.md
│ ├── mi_deactivate_message-processor.md
│ ├── mi_get_apis.md
│ ├── mi_get_tasks.md
│ ├── mi.md
│ ├── mi_get_endpoints.md
│ ├── mi_get_sequences.md
│ ├── mi_get_logs.md
│ ├── mi_get_composite-apps.md
│ ├── mi_get_local-entries.md
│ ├── mi_get_proxy-services.md
│ ├── mi_get_transaction-counts.md
│ ├── mi_get_data-services.md
│ ├── mi_get_roles.md
│ ├── mi_get_message-stores.md
│ ├── mi_get_inbound-endpoints.md
│ ├── mi_get_templates.md
│ ├── mi_get_message-processors.md
│ └── mi_secret_create.md
├── utils
│ ├── artifactUtils
│ │ ├── taskUtils.go
│ │ ├── connectorUtils.go
│ │ ├── localEntryUtils.go
│ │ ├── templateUtils.go
│ │ ├── proxyServiceUtils.go
│ │ ├── loggerUtils.go
│ │ ├── apiUtils.go
│ │ ├── sequenceUtils.go
│ │ ├── roleUtils.go
│ │ ├── transactionUtils.go
│ │ ├── messageStoreUtils.go
│ │ ├── dataServiceUtils.go
│ │ ├── inboundEndpointUtils.go
│ │ ├── endpointUtils.go
│ │ ├── messageProcessorUtils.go
│ │ ├── logFileUtils.go
│ │ ├── userUtils.go
│ │ └── compositeAppUtils.go
│ ├── keyStore.go
│ ├── errorHandling.go
│ ├── fileIOUtils_test.go
│ └── logUtils.go
├── mi.go
├── tools
│ ├── gen.go
│ └── generate_bash_completion_script.go
├── go.mod
├── credentials
│ ├── encode.go
│ └── store.go
├── cmd
│ └── secret
│ │ └── secret.go
└── impl
│ ├── hashiCorpVault.go
│ ├── endpoint.go
│ └── proxyService.go
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ └── config.yml
└── workflows
│ ├── push_ubuntu_build.yml
│ └── pull_request_ubuntu_build.yml
├── encryption-client
└── src
│ └── main
│ └── java
│ └── org
│ └── wso2
│ └── mi
│ └── tooling
│ └── security
│ └── exception
│ └── EncryptionToolException.java
├── .travis.yml
├── README.md
└── Makefile
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | /monitoring-dashboard/ @sachithKay @dulanjalidilmi
2 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/.swagger-codegen/VERSION:
--------------------------------------------------------------------------------
1 | 3.0.23
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/config-parser/validator.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/config-parser/unit-resolve.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/updates/product.txt:
--------------------------------------------------------------------------------
1 | ${product.wum.name}-${product.version}
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/bin/version.txt:
--------------------------------------------------------------------------------
1 | WSO2 Micro Integrator Monitoring Dashboard v${project.version}
2 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World!
4 |
5 |
6 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/filter.properties:
--------------------------------------------------------------------------------
1 | product.name=WSO2 Integration Control Plane
2 | product.version=1.1.0
3 | product.wum.name=wso2-integration-control-plane
4 |
--------------------------------------------------------------------------------
/cmd/integration/testdata/capps/HealthCareCompositeExporter_1.0.0.car:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/cmd/integration/testdata/capps/HealthCareCompositeExporter_1.0.0.car
--------------------------------------------------------------------------------
/cmd/integration/config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # name - MI CLI environment name
3 | # host - host name of MI instance
4 | # offset - port offset of MI instance
5 | name: testing
6 | host: localhost
7 | offset: 0
8 |
--------------------------------------------------------------------------------
/cmd/integration/testdata/capps/RESTDataServiceCompositeExporter_1.0.0.car:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/cmd/integration/testdata/capps/RESTDataServiceCompositeExporter_1.0.0.car
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/security/dashboard.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/distribution/src/main/resources/conf/security/dashboard.jks
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/security/wso2carbon.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/distribution/src/main/resources/conf/security/wso2carbon.jks
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/security/client-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/distribution/src/main/resources/conf/security/client-truststore.jks
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/favicon.ico
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/logo192.png
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/logo512.png
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Lines starting with '#' are comments.
2 | # Each line is a file pattern followed by one or more owners.
3 |
4 | # See: https://help.github.com/articles/about-codeowners/
5 |
6 | # These owners will be the default owners for everything in the repo.
7 | * @chanikag
8 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/setupTests.js:
--------------------------------------------------------------------------------
1 | import 'regenerator-runtime/runtime'
2 | import Enzyme from 'enzyme'
3 | import EnzymeAdapter from 'enzyme-adapter-react-16'
4 |
5 | Enzyme.configure({
6 | adapter: new EnzymeAdapter()
7 | })
8 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wso2/product-mi-tooling/HEAD/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf
--------------------------------------------------------------------------------
/cmd/integration/testdata/mysql/mysql_transaction_count.sql:
--------------------------------------------------------------------------------
1 | CREATE DATABASE transactiondb;
2 |
3 | USE transactiondb;
4 |
5 | CREATE TABLE IF NOT EXISTS CURRENT_STATS (
6 | TIME_STAMP DATE NOT NULL,
7 | NODE_ID VARCHAR(40) NOT NULL,
8 | TRANSACTION_COUNT INT NOT NULL,
9 | TRANSACTION_COUNT_ENCRYPTED VARCHAR(400) NOT NULL
10 | ) ENGINE INNODB;
11 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/redux/DataReducer.js:
--------------------------------------------------------------------------------
1 | import { DATA_CHANGE } from './Actions'
2 |
3 | const DataReducer = (state = [], action) => {
4 | switch(action.type) {
5 | case DATA_CHANGE:
6 | return action.payload;
7 | default:
8 | return state
9 | }
10 | }
11 |
12 | export default DataReducer;
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/redux/GroupListReducer.js:
--------------------------------------------------------------------------------
1 | import { GROUP_CHANGE } from './Actions'
2 |
3 | const GroupListReducer = (state = '', action) => {
4 | switch(action.type) {
5 | case GROUP_CHANGE:
6 | return action.payload;
7 | default:
8 | return state
9 | }
10 | }
11 |
12 | export default GroupListReducer;
13 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/CSRFToken.java:
--------------------------------------------------------------------------------
1 | package org.wso2.ei.dashboard.core.rest.model;
2 |
3 | public class CSRFToken {
4 | private final String csrfToken;
5 |
6 | public CSRFToken(String csrfToken) {
7 | this.csrfToken = csrfToken;
8 | }
9 |
10 | public String getCsrfToken() {
11 | return csrfToken;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/cmd/integration/cleanup_MI.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | WSO2_MI_MYSQL_DB_TAG=mi-mysql-db
4 | WSO2_MI_TAG=mi-test-micli
5 |
6 | # This will reomve the containers, images and the network created to run MI CLI integration tests for MI
7 | docker container rm micontainer -f
8 |
9 | docker container rm sqlcontainer -f
10 |
11 | docker network rm mi-test-net
12 |
13 | docker image rm $WSO2_MI_TAG -f
14 |
15 | docker image rm $WSO2_MI_MYSQL_DB_TAG -f
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: '📚 Create an Issue'
4 | about: Create an issue if something does not work as expected or suggest new functionality/improvements to the product suite.
5 | url: https://github.com/wso2/micro-integrator/issues/new/choose
6 | - name: '💬 Slack Channel'
7 | url: 'https://wso2-ei.slack.com/'
8 | about: |
9 | Chat with the community to get quick clarifications for your questions.
10 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/config-parser/templates/conf/security/cipher-text.properties.j2:
--------------------------------------------------------------------------------
1 | # By default, This file contains the secret alias names and the plain text passwords enclosed with '[]' brackets
2 | # In Production environments, It is recommend to replace these plain text password by the encrypted values. CipherTool can be used for it.
3 |
4 | {% for secret_name,secret_value in secrets.items()%}
5 | {{secret_name}}={{secret_value}}
6 | {% endfor %}
7 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/cipher-standalone-config.properties:
--------------------------------------------------------------------------------
1 | # this file contains the optional Ciphertool configuration parameters for it to work in non-Carbon environments
2 | primary.key.location=conf/security/dashboard.jks
3 | primary.key.type=JKS
4 | primary.key.alias=wso2carbon
5 | cipher.text.properties.file=conf/security/cipher-text.properties
6 | cipher.tool.properties.file=conf/security/cipher-tool.properties
7 | secret.conf.properties.file=conf/security/secret-conf.properties
8 |
--------------------------------------------------------------------------------
/cmd/integration/testdata/mysql/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mysql:latest as builder
2 |
3 | RUN ["sed", "-i", "s/exec \"$@\"/echo \"not running $@\"/", "/usr/local/bin/docker-entrypoint.sh"]
4 |
5 | ENV MYSQL_ROOT_PASSWORD=root
6 |
7 | COPY mysql_user.sql /docker-entrypoint-initdb.d/
8 | COPY mysql_transaction_count.sql /docker-entrypoint-initdb.d/
9 |
10 | RUN ["/usr/local/bin/docker-entrypoint.sh", "mysqld", "--datadir", "/initialized-db"]
11 |
12 | FROM mysql:latest
13 |
14 | COPY --from=builder /initialized-db /var/lib/mysql
15 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/bin/yajsw/README.txt:
--------------------------------------------------------------------------------
1 | Running WSO2 Integration Control Plane as a Windows Service
2 | ------------------------------------------------
3 |
4 | 1. Download the latest stable version of YAJSW from the project home page. (http://yajsw.sourceforge.net/)
5 | 2. Unzip the YAJSW archive and place the provided wrapper.conf file (this directory) inside /conf.
6 | 3. Set 'java_home' and 'wso2_integration_control_plane_home' environment properties
7 | 4. Start the product as a windows service. (batch scripts are found under /bat)
--------------------------------------------------------------------------------
/cmd/docs/mi_logout.md:
--------------------------------------------------------------------------------
1 | ## mi logout
2 |
3 | Logout from a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Logout from a Micro Integrator
8 |
9 | ```
10 | mi logout [environment] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi logout dev
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for logout
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 |
36 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Templates.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import EnhancedTable from '../commons/EnhancedTable';
3 |
4 | export default function Templates() {
5 | const [pageInfo] = React.useState({
6 | pageId: "templates",
7 | title: "Templates",
8 | headCells: [
9 | {id: 'name', label: 'Template Name'},
10 | {id: 'nodes', label: 'Nodes'},
11 | {id: 'type', label: 'Type'}],
12 | tableOrderBy: 'name'
13 | });
14 |
15 | return
16 | }
--------------------------------------------------------------------------------
/cmd/docs/mi_version.md:
--------------------------------------------------------------------------------
1 | ## mi version
2 |
3 | Display Version on current mi
4 |
5 | ### Synopsis
6 |
7 | Display the current version of this command line tool
8 |
9 | ```
10 | mi version [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi version
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for version
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 |
36 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/redux/Reducers.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import NodeStateReducer from './NodeStateReducer';
3 | import GroupListReducer from './GroupListReducer';
4 | import DataReducer from './DataReducer';
5 | import SuperUserReducer from './SuperAdminReducer';
6 | import IsRefreshedReducer from './IsRefreshedReducer';
7 |
8 | export default combineReducers({
9 | nodeState: NodeStateReducer,
10 | groupId : GroupListReducer,
11 | data : DataReducer,
12 | superAdmin : SuperUserReducer,
13 | isRefreshed : IsRefreshedReducer
14 | })
15 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.de.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.de",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.de.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.es.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.es",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.es.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.fr.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.fr",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.fr.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.it.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.it",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.it.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ja.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.ja",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.ja.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ko.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.ko",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.ko.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.ru.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.ru",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.ru.js.map
--------------------------------------------------------------------------------
/cmd/docs/mi_secret.md:
--------------------------------------------------------------------------------
1 | ## mi secret
2 |
3 | Manage sensitive information
4 |
5 | ### Synopsis
6 |
7 | Encrypt secrets to be used in the Micro Integrator
8 |
9 | ```
10 | mi secret [flags]
11 | ```
12 |
13 | ### Options
14 |
15 | ```
16 | -h, --help help for secret
17 | ```
18 |
19 | ### Options inherited from parent commands
20 |
21 | ```
22 | -k, --insecure Allow connections to SSL endpoints without certs
23 | --verbose Enable verbose mode
24 | ```
25 |
26 | ### SEE ALSO
27 |
28 | * [mi](mi.md) - Micro Integrator commands
29 | * [mi secret create](mi_secret_create.md) - Encrypt secrets
30 | * [mi secret init](mi_secret_init.md) - Initialize Key Store
31 |
32 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/annotation/Secured.java:
--------------------------------------------------------------------------------
1 | package org.wso2.ei.dashboard.core.rest.annotation;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.Target;
5 |
6 | import javax.ws.rs.NameBinding;
7 |
8 | import static java.lang.annotation.ElementType.METHOD;
9 | import static java.lang.annotation.ElementType.TYPE;
10 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
11 |
12 | /**
13 | * Annotation used to Authenticate the rest api endpoints.
14 | */
15 | @NameBinding
16 | @Retention(RUNTIME)
17 | @Target({TYPE, METHOD})
18 | public @interface Secured { }
19 |
--------------------------------------------------------------------------------
/.github/workflows/push_ubuntu_build.yml:
--------------------------------------------------------------------------------
1 | name: CI - Push request - Ubuntu
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 |
7 | jobs:
8 | build:
9 |
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - uses: actions/checkout@v4
14 | - name: Set up JDK 11
15 | uses: actions/setup-java@v4
16 | with:
17 | java-version: '11'
18 | distribution: 'temurin'
19 | cache: maven
20 | - name: Build with Maven
21 | run: mvn clean install
22 | - name: Upload test coverage to Codecov
23 | uses: codecov/codecov-action@v4.0.1
24 | with:
25 | flags: unit_tests
26 | token: ${{ secrets.CODECOV_TOKEN }}
27 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.zh-cn",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.zh-cn.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/min/vs/base/common/worker/simpleWorker.nls.zh-tw.js:
--------------------------------------------------------------------------------
1 | /*!-----------------------------------------------------------
2 | * Copyright (c) Microsoft Corporation. All rights reserved.
3 | * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
4 | * Released under the MIT license
5 | * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
6 | *-----------------------------------------------------------*/define("vs/base/common/worker/simpleWorker.nls.zh-tw",{"vs/base/common/platform":["_"]});
7 |
8 | //# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.zh-tw.js.map
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/statusCell/StatusCell.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import renderer from 'react-test-renderer';
3 | import StatusCell from "./StatusCell";
4 |
5 | test('Test on green batch', () => {
6 | const component = renderer.create(
7 | ,
8 | );
9 | let tree = component.toJSON();
10 | expect(tree).toMatchSnapshot();
11 |
12 | });
13 |
14 | test('Test on red batch', () => {
15 | const component = renderer.create(
16 | ,
17 | );
18 | let tree = component.toJSON();
19 | expect(tree).toMatchSnapshot();
20 |
21 | });
22 |
--------------------------------------------------------------------------------
/cmd/docs/mi_delete_env.md:
--------------------------------------------------------------------------------
1 | ## mi delete env
2 |
3 | Delete Environment from Config file
4 |
5 | ### Synopsis
6 |
7 | Delete Environment and its related endpoints from the config file
8 |
9 | ```
10 | mi delete env [environment] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi delete env production
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for env
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi delete](mi_delete.md) - Delete users or roles from a Micro Integrator instance
35 |
36 |
--------------------------------------------------------------------------------
/cmd/docs/mi_secret_init.md:
--------------------------------------------------------------------------------
1 | ## mi secret init
2 |
3 | Initialize Key Store
4 |
5 | ### Synopsis
6 |
7 | Initialize the Key Store information required for secret encryption
8 |
9 | ```
10 | mi secret init [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To initialize a Key Store information
17 | mi mi secret init
18 | NOTE: Secret encryption supports only JKS Key Stores
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -h, --help help for init
25 | ```
26 |
27 | ### Options inherited from parent commands
28 |
29 | ```
30 | -k, --insecure Allow connections to SSL endpoints without certs
31 | --verbose Enable verbose mode
32 | ```
33 |
34 | ### SEE ALSO
35 |
36 | * [mi secret](mi_secret.md) - Manage sensitive information
37 |
38 |
--------------------------------------------------------------------------------
/.github/workflows/pull_request_ubuntu_build.yml:
--------------------------------------------------------------------------------
1 | name: CI - Pull request - Ubuntu
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | build:
10 |
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - uses: actions/checkout@v4
15 | - name: Set up JDK 11
16 | uses: actions/setup-java@v4
17 | with:
18 | java-version: '11'
19 | distribution: 'temurin'
20 | cache: maven
21 | - name: Build with Maven
22 | run: mvn clean install
23 | - name: Upload test coverage to Codecov
24 | uses: codecov/codecov-action@v4
25 | with:
26 | flags: unit_tests
27 | files: monitoring-dashboard/integration/org.wso2.micro.integrator.dashboard.integration.tests/target/site/jacoco/jacoco.xml
28 |
--------------------------------------------------------------------------------
/cmd/docs/mi_add_env.md:
--------------------------------------------------------------------------------
1 | ## mi add env
2 |
3 | Add Environment to Config file
4 |
5 | ### Synopsis
6 |
7 | Add new environment and its related endpoints to the config file
8 |
9 | ```
10 | mi add env [environment] [mi_management_url] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi add env production https://localhost:9164
17 |
18 | mi add env dev https://localhost:9164
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -h, --help help for env
25 | ```
26 |
27 | ### Options inherited from parent commands
28 |
29 | ```
30 | -k, --insecure Allow connections to SSL endpoints without certs
31 | --verbose Enable verbose mode
32 | ```
33 |
34 | ### SEE ALSO
35 |
36 | * [mi add](mi_add.md) - Add new users, roles or loggers to a Micro Integrator instance
37 |
38 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_envs.md:
--------------------------------------------------------------------------------
1 | ## mi get envs
2 |
3 | Display the list of environments
4 |
5 | ### Synopsis
6 |
7 | Display a list of environments defined in 'main_config.yaml' file
8 |
9 | ```
10 | mi get envs [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi list envs
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | --format string Pretty-print environments using go templates (default "table {{.Name}}\t{{.MiManagementEndpoint}}")
23 | -h, --help help for envs
24 | ```
25 |
26 | ### Options inherited from parent commands
27 |
28 | ```
29 | -k, --insecure Allow connections to SSL endpoints without certs
30 | --verbose Enable verbose mode
31 | ```
32 |
33 | ### SEE ALSO
34 |
35 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
36 |
37 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/taskUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type TaskList struct {
4 | Count int32 `json:"count"`
5 | Tasks []Task `json:"list"`
6 | }
7 |
8 | type Task struct {
9 | Name string `json:"name"`
10 | Type string `json:"triggerType"`
11 | TriggerCount string `json:"triggerCount"`
12 | TriggerInterval string `json:"triggerInterval"`
13 | TriggerCron string `json:"triggerCron"`
14 | }
15 |
16 | func (tasks *TaskList) GetDataIterator() <-chan []string {
17 | ch := make(chan []string)
18 |
19 | go func() {
20 | for _, task := range tasks.Tasks {
21 | ch <- []string{task.Name, task.Type, task.TriggerCount, task.TriggerInterval, task.TriggerCron}
22 | }
23 | close(ch)
24 | }()
25 |
26 | return ch
27 | }
28 |
29 | func (tasks *TaskList) GetCount() int32 {
30 | return tasks.Count
31 | }
32 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/connectorUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type ConnectorList struct {
4 | Count int32 `json:"count"`
5 | Connectors []ConnectorSummary `json:"list"`
6 | }
7 |
8 | type ConnectorSummary struct {
9 | Name string `json:"name"`
10 | Status string `json:"status"`
11 | Package string `json:"package"`
12 | Description string `json:"description"`
13 | }
14 |
15 | func (connectors *ConnectorList) GetDataIterator() <-chan []string {
16 | ch := make(chan []string)
17 |
18 | go func() {
19 | for _, connector := range connectors.Connectors {
20 | ch <- []string{connector.Name, connector.Status, connector.Package, connector.Description}
21 | }
22 | close(ch)
23 | }()
24 |
25 | return ch
26 | }
27 |
28 | func (connectors *ConnectorList) GetCount() int32 {
29 | return connectors.Count
30 | }
31 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/localEntryUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type LocalEntryList struct {
4 | Count int32 `json:"count"`
5 | LocalEntries []LocalEntry `json:"list"`
6 | }
7 |
8 | type LocalEntry struct {
9 | Name string `json:"name"`
10 | Type string `json:"type"`
11 | }
12 |
13 | type LocalEntryData struct {
14 | Name string `json:"name"`
15 | Type string `json:"type"`
16 | Value string `json:"value"`
17 | }
18 |
19 | func (localEntries *LocalEntryList) GetDataIterator() <-chan []string {
20 | ch := make(chan []string)
21 |
22 | go func() {
23 | for _, localEntry := range localEntries.LocalEntries {
24 | ch <- []string{localEntry.Name, localEntry.Type}
25 | }
26 | close(ch)
27 | }()
28 |
29 | return ch
30 | }
31 |
32 | func (localEntries *LocalEntryList) GetCount() int32 {
33 | return localEntries.Count
34 | }
35 |
--------------------------------------------------------------------------------
/cmd/mi.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package main
20 |
21 | import cmd "github.com/wso2/product-mi-tooling/cmd/cmd"
22 |
23 | func main() {
24 | cmd.Execute()
25 | }
26 |
--------------------------------------------------------------------------------
/cmd/docs/mi_login.md:
--------------------------------------------------------------------------------
1 | ## mi login
2 |
3 | Login to a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Login to a Micro Integrator using credentials
8 |
9 | ```
10 | mi login [environment] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi login dev -u admin -p admin
17 | mi login dev -u admin
18 | cat ~/.mypassword | mi login dev -u admin
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -h, --help help for login
25 | -p, --password string Password for login
26 | --password-stdin Get password from stdin
27 | -u, --username string Username for login
28 | ```
29 |
30 | ### Options inherited from parent commands
31 |
32 | ```
33 | -k, --insecure Allow connections to SSL endpoints without certs
34 | --verbose Enable verbose mode
35 | ```
36 |
37 | ### SEE ALSO
38 |
39 | * [mi](mi.md) - Micro Integrator commands
40 |
41 |
--------------------------------------------------------------------------------
/cmd/tools/gen.go:
--------------------------------------------------------------------------------
1 | //go:build ignore
2 | // +build ignore
3 |
4 | package main
5 |
6 | import (
7 | "log"
8 | "path/filepath"
9 |
10 | "github.com/spf13/cobra/doc"
11 | mi "github.com/wso2/product-mi-tooling/cmd/cmd"
12 | )
13 |
14 | func main() {
15 | log.Println("Generating docs...")
16 | mi.MICmd.DisableAutoGenTag = true
17 |
18 | err := doc.GenMarkdownTree(mi.MICmd, "docs")
19 | if err != nil {
20 | log.Fatal(err)
21 | }
22 |
23 | log.Println("Generating MI bash completions...")
24 | err = mi.MICmd.GenBashCompletionFile(filepath.FromSlash("./shell-completions/mi_bash_completion.sh"))
25 | if err != nil {
26 | log.Fatal(err)
27 | }
28 |
29 | log.Println("Generating MI zsh completions...")
30 | err = mi.MICmd.GenZshCompletionFile(filepath.FromSlash("./shell-completions/mi_zsh_completion.sh"))
31 | if err != nil {
32 | log.Fatal(err)
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/cmd/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/wso2/product-mi-tooling/cmd
2 |
3 | go 1.25
4 |
5 | require (
6 | github.com/lithammer/dedent v1.1.0
7 | github.com/magiconair/properties v1.8.1
8 | github.com/olekukonko/tablewriter v0.0.1
9 | github.com/pavlo-v-chernykh/keystore-go/v4 v4.5.0
10 | github.com/spf13/cobra v1.0.0
11 | github.com/stretchr/testify v1.2.2
12 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
13 | gopkg.in/resty.v1 v1.12.0
14 | gopkg.in/yaml.v2 v2.2.2
15 | )
16 |
17 | require (
18 | github.com/davecgh/go-spew v1.1.1 // indirect
19 | github.com/inconshreveable/mousetrap v1.0.0 // indirect
20 | github.com/mattn/go-runewidth v0.0.4 // indirect
21 | github.com/pmezard/go-difflib v1.0.0 // indirect
22 | github.com/spf13/pflag v1.0.3 // indirect
23 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
24 | golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
25 | )
26 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/config-parser/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "sso.enable": false,
3 | "sso.storage": "webWorker",
4 | "sso.user_name_attribute" : "sub",
5 | "internal_apis.file_user_store.enable": true,
6 | "internal_apis.users": [
7 | {
8 | "user.name": "admin",
9 | "user.password": "admin",
10 | "user.is_admin": true
11 | }
12 | ],
13 | "mi_super_admin.username": "admin",
14 | "mi_super_admin.password": "admin",
15 | "bal_service_account.username": "bal_admin",
16 | "bal_service_account.password": "bal_secret",
17 | "user_store.base_dn": "dc=wso2,dc=org",
18 | "super_admin.create_admin_account": true,
19 | "super_admin.admin_role": "admin",
20 | "super_admin.username": "admin",
21 | "super_admin.password": "admin",
22 | "realm_manager": {
23 | "data_source": "WSO2CarbonDB",
24 | "properties": {
25 | "isCascadeDeleteEnabled": true
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/deployment.toml:
--------------------------------------------------------------------------------
1 | [server_config]
2 | port = 9743
3 |
4 | [heartbeat_config]
5 | pool_size = 15
6 |
7 | [keystore]
8 | file_name = "conf/security/dashboard.jks"
9 | password = "wso2carbon"
10 | key_password = "wso2carbon"
11 |
12 | [mi_super_admin]
13 | username = "admin"
14 | password = "admin"
15 |
16 | [bal_service_account]
17 | username = "bal_admin"
18 | password = "bal_secret"
19 |
20 | [si_service_account]
21 | username = "admin"
22 | password = "admin"
23 |
24 | [truststore]
25 | file_name = "conf/security/client-truststore.jks"
26 | password = "wso2carbon"
27 |
28 | #by default file based user store is enabled
29 | #[internal_apis.file_user_store]
30 | #enable = true
31 |
32 | #[[internal_apis.users]]
33 | #user.name = "admin"
34 | #user.password = "admin"
35 | #user.is_admin = true
36 |
37 | [user_access]
38 | make_non_admin_users_read_only = false
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/templateUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type TemplateList struct {
4 | SequenceTemplates []Template `json:"sequenceTemplateList"`
5 | EndpointTemplates []Template `json:"endpointTemplateList"`
6 | }
7 |
8 | type TemplateListByType struct {
9 | Count int32 `json:"count"`
10 | Templates []Template `json:"list"`
11 | }
12 |
13 | type TemplateSequenceListByName struct {
14 | Parameters []TemplateSequenceDetail `json:"Parameters"`
15 | Name string `json:"name"`
16 | }
17 |
18 | type TemplateEndpointListByName struct {
19 | Parameters []string `json:"Parameters"`
20 | Name string `json:"name"`
21 | }
22 |
23 | type Template struct {
24 | Name string `json:"name"`
25 | }
26 |
27 | type TemplateSequenceDetail struct {
28 | Name string `json:"name"`
29 | IsMandatory bool `json:"mandatory"`
30 | DefaultValue string `json:"defaultValue"`
31 | }
32 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/proxyServiceUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type Proxy struct {
4 | Name string `json:"name"`
5 | Wsdl11 string `json:"wsdl1_1"`
6 | Wsdl20 string `json:"wsdl2_0"`
7 | Stats string `json:"stats"`
8 | Tracing string `json:"tracing"`
9 | }
10 |
11 | type ProxyServiceList struct {
12 | Count int32 `json:"count"`
13 | Proxies []ProxySummary `json:"list"`
14 | }
15 |
16 | type ProxySummary struct {
17 | Name string `json:"name"`
18 | Wsdl11 string `json:"wsdl1_1"`
19 | Wsdl20 string `json:"wsdl2_0"`
20 | }
21 |
22 | func (data *ProxyServiceList) GetDataIterator() <-chan []string {
23 | ch := make(chan []string)
24 |
25 | go func() {
26 | for _, proxy := range data.Proxies {
27 | ch <- []string{proxy.Name, proxy.Wsdl11, proxy.Wsdl20}
28 | }
29 | close(ch)
30 | }()
31 |
32 | return ch
33 | }
34 |
35 | func (data *ProxyServiceList) GetCount() int32 {
36 | return data.Count
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/loggerUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package artifactUtils
20 |
21 | type Logger struct {
22 | LoggerName string `json:"loggerName"`
23 | ComponentName string `json:"componentName"`
24 | LogLevel string `json:"level"`
25 | }
26 |
--------------------------------------------------------------------------------
/cmd/docs/mi_delete.md:
--------------------------------------------------------------------------------
1 | ## mi delete
2 |
3 | Delete users or roles from a Micro Integrator instance
4 |
5 | ### Synopsis
6 |
7 | Delete users or roles from a Micro Integrator instance in the environment specified by the flag (--environment, -e)
8 |
9 | ```
10 | mi delete [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi delete user capp-tester -e dev
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for delete
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 | * [mi delete env](mi_delete_env.md) - Delete Environment from Config file
36 | * [mi delete role](mi_delete_role.md) - Delete a role from the Micro Integrator
37 | * [mi delete user](mi_delete_user.md) - Delete a user from the Micro Integrator
38 |
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/auth/Constants.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 |
20 | export const Constants = {
21 | // Cookies
22 | SESSION_USER_COOKIE: 'DASHBOARD_USER',
23 | JWT_TOKEN_COOKIE: 'JWT_TOKEN'
24 | };
25 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/statusCell/__snapshots__/StatusCell.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Test on green batch 1`] = `
4 |
5 | |
6 |
9 |
12 |
13 |
14 |
15 | Active
16 | |
17 |
18 | `;
19 |
20 | exports[`Test on red batch 1`] = `
21 |
22 | |
23 |
26 |
29 |
30 |
31 |
32 | Inactive
33 | |
34 |
35 | `;
36 |
--------------------------------------------------------------------------------
/cmd/docs/mi_add_role.md:
--------------------------------------------------------------------------------
1 | ## mi add role
2 |
3 | Add new role to a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Add a new role with the name specified by the command line argument [role-name] to a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi add role [role-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To add a new role
17 | mi add role [role-name] -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator to which a new user should be added
25 | -h, --help help for role
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi add](mi_add.md) - Add new users, roles or loggers to a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_add_user.md:
--------------------------------------------------------------------------------
1 | ## mi add user
2 |
3 | Add new user to a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Add a new user with the name specified by the command line argument [user-name] to a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi add user [user-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To add a new user
17 | mi add user capp-tester -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator to which a new user should be added
25 | -h, --help help for user
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi add](mi_add.md) - Add new users, roles or loggers to a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/apiUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type API struct {
4 | Name string `json:"name"`
5 | Url string `json:"url"`
6 | Version string `json:"version"`
7 | Stats string `json:"stats"`
8 | Tracing string `json:"tracing"`
9 | Resources []Resource `json:"resources"`
10 | }
11 |
12 | type Resource struct {
13 | Methods []string `json:"methods"`
14 | Url string `json:"url"`
15 | }
16 |
17 | type APIList struct {
18 | Count int32 `json:"count"`
19 | Apis []APISummary `json:"list"`
20 | }
21 |
22 | type APISummary struct {
23 | Name string `json:"name"`
24 | Url string `json:"url"`
25 | }
26 |
27 | func (apis *APIList) GetDataIterator() <-chan []string {
28 | ch := make(chan []string)
29 |
30 | go func() {
31 | for _, api := range apis.Apis {
32 | ch <- []string{api.Name, api.Url}
33 | }
34 | close(ch)
35 | }()
36 |
37 | return ch
38 | }
39 |
40 | func (apis *APIList) GetCount() int32 {
41 | return apis.Count
42 | }
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/exception/ManagementApiException.java:
--------------------------------------------------------------------------------
1 | package org.wso2.ei.dashboard.core.exception;
2 |
3 | /**
4 | * RuntimeException to throw when exception/error is caught inside dashboard server due to error responses from the
5 | * MI management API invocations.
6 | */
7 | public class ManagementApiException extends Exception {
8 |
9 | private int errorCode = 500;
10 |
11 | public ManagementApiException(String message, int errorCode) {
12 | super(message);
13 | this.errorCode = errorCode;
14 | }
15 |
16 | public ManagementApiException(String message, int errorCode, Throwable cause) {
17 | super(message, cause);
18 | this.errorCode = errorCode;
19 | }
20 |
21 | public ManagementApiException(int errorCode, Throwable cause) {
22 | super(cause);
23 | this.errorCode = errorCode;
24 | }
25 |
26 | public int getErrorCode() {
27 | return errorCode;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/cmd/docs/mi_update_user.md:
--------------------------------------------------------------------------------
1 | ## mi update user
2 |
3 | Update roles of a user in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Update the roles of a user named [user-name] specified by the command line arguments in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi update user [user-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To update the roles
17 | mi update user [user-name] -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the Micro Integrator of which the user's roles should be updated
25 | -h, --help help for user
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi update](mi_update.md) - Update log level of Loggers in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/sequenceUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type SequenceList struct {
4 | Count int32 `json:"count"`
5 | Sequences []SequenceSummary `json:"list"`
6 | }
7 |
8 | type SequenceSummary struct {
9 | Name string `json:"name"`
10 | Container string `json:"container"`
11 | Stats string `json:"stats"`
12 | Tracing string `json:"tracing"`
13 | }
14 |
15 | type Sequence struct {
16 | Name string `json:"name"`
17 | Container string `json:"container"`
18 | Stats string `json:"stats"`
19 | Tracing string `json:"tracing"`
20 | Mediators []string `json:"mediators"`
21 | }
22 |
23 | func (sequences *SequenceList) GetDataIterator() <-chan []string {
24 | ch := make(chan []string)
25 |
26 | go func() {
27 | for _, sequence := range sequences.Sequences {
28 | ch <- []string{sequence.Name, sequence.Stats, sequence.Tracing}
29 | }
30 | close(ch)
31 | }()
32 |
33 | return ch
34 | }
35 |
36 | func (sequences *SequenceList) GetCount() int32 {
37 | return sequences.Count
38 | }
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_connectors.md:
--------------------------------------------------------------------------------
1 | ## mi get connectors
2 |
3 | Get information about connectors deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | List all the connectors deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi get connectors [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To list all the connectors
17 | mi get connectors -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment to be searched
25 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
26 | -h, --help help for connectors
27 | ```
28 |
29 | ### Options inherited from parent commands
30 |
31 | ```
32 | -k, --insecure Allow connections to SSL endpoints without certs
33 | --verbose Enable verbose mode
34 | ```
35 |
36 | ### SEE ALSO
37 |
38 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
39 |
40 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/roleUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package artifactUtils
20 |
21 | type RoleList struct {
22 | Count int32 `json:"count"`
23 | Roles []Role `json:"list"`
24 | }
25 |
26 | type RoleSummary struct {
27 | Users []string `json:"users"`
28 | Role string `json:"role"`
29 | }
30 |
31 | type Role struct {
32 | Role string `json:"role"`
33 | }
34 |
--------------------------------------------------------------------------------
/cmd/docs/mi_activate_endpoint.md:
--------------------------------------------------------------------------------
1 | ## mi activate endpoint
2 |
3 | Activate a endpoint deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Activate the endpoint specified by the command line argument [endpoint-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi activate endpoint [endpoint-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To activate a endpoint
17 | mi activate endpoint TestEP -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the endpoint should be activated
25 | -h, --help help for endpoint
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi activate](mi_activate.md) - Activate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_update.md:
--------------------------------------------------------------------------------
1 | ## mi update
2 |
3 | Update log level of Loggers in a Micro Integrator instance
4 |
5 | ### Synopsis
6 |
7 | Update log level of Loggers in a Micro Integrator instance in the environment specified by the flag (--environment, -e)
8 |
9 | ```
10 | mi update [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi update log-level org-apache-coyote DEBUG -e dev
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for update
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 | * [mi update hashicorp-secret](mi_update_hashicorp-secret.md) - Update the secret ID of HashiCorp configuration in a Micro Integrator
36 | * [mi update log-level](mi_update_log-level.md) - Update log level of a Logger in a Micro Integrator
37 | * [mi update user](mi_update_user.md) - Update roles of a user in a Micro Integrator
38 |
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/transactionUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package artifactUtils
20 |
21 | type TransactionCount struct {
22 | Year int `json:"Year"`
23 | Month int `json:"Month"`
24 | TransactionCount int64 `json:"TransactionCount"`
25 | }
26 |
27 | type TransactionCountInfo struct {
28 | TransactionCounts [][]string `json:"TransactionCountData"`
29 | }
30 |
--------------------------------------------------------------------------------
/cmd/docs/mi_add.md:
--------------------------------------------------------------------------------
1 | ## mi add
2 |
3 | Add new users, roles or loggers to a Micro Integrator instance
4 |
5 | ### Synopsis
6 |
7 | Add new users, roles or loggers to a Micro Integrator instance in the environment specified by the flag (--environment, -e)
8 |
9 | ```
10 | mi add [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi add user capp-developer -e dev
17 | mi add log-level synapse-api org.apache.synapse.rest.API DEBUG -e dev
18 | ```
19 |
20 | ### Options
21 |
22 | ```
23 | -h, --help help for add
24 | ```
25 |
26 | ### Options inherited from parent commands
27 |
28 | ```
29 | -k, --insecure Allow connections to SSL endpoints without certs
30 | --verbose Enable verbose mode
31 | ```
32 |
33 | ### SEE ALSO
34 |
35 | * [mi](mi.md) - Micro Integrator commands
36 | * [mi add env](mi_add_env.md) - Add Environment to Config file
37 | * [mi add log-level](mi_add_log-level.md) - Add new Logger to a Micro Integrator
38 | * [mi add role](mi_add_role.md) - Add new role to a Micro Integrator
39 | * [mi add user](mi_add_user.md) - Add new user to a Micro Integrator
40 |
41 |
--------------------------------------------------------------------------------
/cmd/docs/mi_deactivate_endpoint.md:
--------------------------------------------------------------------------------
1 | ## mi deactivate endpoint
2 |
3 | Deactivate a endpoint deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Deactivate the endpoint specified by the command line argument [endpoint-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi deactivate endpoint [endpoint-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To deactivate a endpoint
17 | mi deactivate endpoint TestEP -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the endpoint should be deactivated
25 | -h, --help help for endpoint
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi deactivate](mi_deactivate.md) - Deactivate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_activate.md:
--------------------------------------------------------------------------------
1 | ## mi activate
2 |
3 | Activate artifacts deployed in a Micro Integrator instance
4 |
5 | ### Synopsis
6 |
7 | Activate artifacts deployed in a Micro Integrator instance in the environment specified by the flag (--environment, -e)
8 |
9 | ```
10 | mi activate [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi activate endpoint TestEP -e dev
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for activate
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 | * [mi activate endpoint](mi_activate_endpoint.md) - Activate a endpoint deployed in a Micro Integrator
36 | * [mi activate message-processor](mi_activate_message-processor.md) - Activate a message processor deployed in a Micro Integrator
37 | * [mi activate proxy-service](mi_activate_proxy-service.md) - Activate a proxy service deployed in a Micro Integrator
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_update_hashicorp-secret.md:
--------------------------------------------------------------------------------
1 | ## mi update hashicorp-secret
2 |
3 | Update the secret ID of HashiCorp configuration in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Update the secret ID of the HashiCorp configuration in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi update hashicorp-secret [secret-id] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To update the secret ID
17 | mi update hashicorp-secret new_secret_id -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator of which the HashiCorp secret ID should be updated
25 | -h, --help help for hashicorp-secret
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi update](mi_update.md) - Update log level of Loggers in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_update_log-level.md:
--------------------------------------------------------------------------------
1 | ## mi update log-level
2 |
3 | Update log level of a Logger in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Update the log level of a Logger named [logger-name] to [log-level] specified by the command line arguments in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi update log-level [logger-name] [log-level] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To update the log level
17 | mi update log-level org-apache-coyote DEBUG -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator of which the logger should be updated
25 | -h, --help help for log-level
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi update](mi_update.md) - Update log level of Loggers in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_activate_proxy-service.md:
--------------------------------------------------------------------------------
1 | ## mi activate proxy-service
2 |
3 | Activate a proxy service deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Activate the proxy service specified by the command line argument [proxy-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi activate proxy-service [proxy-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To activate a proxy service
17 | mi activate proxy-service SampleProxy -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the proxy service should be activated
25 | -h, --help help for proxy-service
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi activate](mi_activate.md) - Activate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_add_log-level.md:
--------------------------------------------------------------------------------
1 | ## mi add log-level
2 |
3 | Add new Logger to a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Add new Logger named [logger-name] to the [class-name] with log level [log-level] specified by the command line arguments to a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi add log-level [logger-name] [class-name] [log-level] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To add a new logger
17 | mi add log-level synapse-api org.apache.synapse.rest.API DEBUG -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator to which a new logger should be added
25 | -h, --help help for log-level
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi add](mi_add.md) - Add new users, roles or loggers to a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/cmd/docs/mi_deactivate.md:
--------------------------------------------------------------------------------
1 | ## mi deactivate
2 |
3 | Deactivate artifacts deployed in a Micro Integrator instance
4 |
5 | ### Synopsis
6 |
7 | Deactivate artifacts deployed in a Micro Integrator instance in the environment specified by the flag (--environment, -e)
8 |
9 | ```
10 | mi deactivate [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | mi deactivate endpoint TestEP -e dev
17 | ```
18 |
19 | ### Options
20 |
21 | ```
22 | -h, --help help for deactivate
23 | ```
24 |
25 | ### Options inherited from parent commands
26 |
27 | ```
28 | -k, --insecure Allow connections to SSL endpoints without certs
29 | --verbose Enable verbose mode
30 | ```
31 |
32 | ### SEE ALSO
33 |
34 | * [mi](mi.md) - Micro Integrator commands
35 | * [mi deactivate endpoint](mi_deactivate_endpoint.md) - Deactivate a endpoint deployed in a Micro Integrator
36 | * [mi deactivate message-processor](mi_deactivate_message-processor.md) - Deactivate a message processor deployed in a Micro Integrator
37 | * [mi deactivate proxy-service](mi_deactivate_proxy-service.md) - Deactivate a proxy service deployed in a Micro Integrator
38 |
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/messageStoreUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | import "strconv"
4 |
5 | type MessageStoreList struct {
6 | Count int32 `json:"count"`
7 | MessageStores []MessageStore `json:"list"`
8 | }
9 |
10 | type MessageStore struct {
11 | Name string `json:"name"`
12 | Size int `json:"size"`
13 | Type string `json:"type"`
14 | }
15 |
16 | type MessageStoreData struct {
17 | Name string `json:"name"`
18 | FileName string `json:"file"`
19 | Container string `json:"container"`
20 | Properties map[string]string `json:"properties"`
21 | Size int `json:"size"`
22 | }
23 |
24 | func (messageStores *MessageStoreList) GetDataIterator() <-chan []string {
25 | ch := make(chan []string)
26 |
27 | go func() {
28 | for _, messageStore := range messageStores.MessageStores {
29 | ch <- []string{messageStore.Name, messageStore.Type, strconv.Itoa(messageStore.Size)}
30 | }
31 | close(ch)
32 | }()
33 |
34 | return ch
35 | }
36 |
37 | func (messageStores *MessageStoreList) GetCount() int32 {
38 | return messageStores.Count
39 | }
40 |
--------------------------------------------------------------------------------
/cmd/docs/mi_deactivate_proxy-service.md:
--------------------------------------------------------------------------------
1 | ## mi deactivate proxy-service
2 |
3 | Deactivate a proxy service deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Deactivate the proxy service specified by the command line argument [proxy-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi deactivate proxy-service [proxy-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To deactivate a proxy service
17 | mi deactivate proxy-service SampleProxy -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the proxy service should be deactivated
25 | -h, --help help for proxy-service
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi deactivate](mi_deactivate.md) - Deactivate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.utils/src/main/java/org/wso2/micro/integrator/dashboard/utils/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package org.wso2.micro.integrator.dashboard.utils;
19 |
20 | /**
21 | * Constants used for utils.
22 | */
23 | public final class Constants {
24 | private Constants() {
25 | }
26 |
27 | public static final String HEARTBEAT_POOL_SIZE = "heartbeat_pool_size";
28 | }
29 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/RestApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | package org.wso2.ei.dashboard.core.rest;
22 |
23 | import javax.ws.rs.ApplicationPath;
24 | import javax.ws.rs.core.Application;
25 |
26 | /**
27 | * Temporary rest application.
28 | */
29 | @ApplicationPath("/")
30 | public class RestApplication extends Application {
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/cmd/docs/mi_delete_user.md:
--------------------------------------------------------------------------------
1 | ## mi delete user
2 |
3 | Delete a user from the Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Delete a user with the name specified by the command line argument [user-name] from a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi delete user [user-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To delete a user
17 | mi delete user [user-id] -e dev
18 | To delete a user in a secondary user store
19 | mi delete user [user-id] -d [domain] -e dev
20 | NOTE: The flag (--environment (-e)) is mandatory
21 | ```
22 |
23 | ### Options
24 |
25 | ```
26 | -d, --domain string select user's domain
27 | -e, --environment string Environment of the micro integrator from which a user should be deleted
28 | -h, --help help for user
29 | ```
30 |
31 | ### Options inherited from parent commands
32 |
33 | ```
34 | -k, --insecure Allow connections to SSL endpoints without certs
35 | --verbose Enable verbose mode
36 | ```
37 |
38 | ### SEE ALSO
39 |
40 | * [mi delete](mi_delete.md) - Delete users or roles from a Micro Integrator instance
41 |
42 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/redux/SuperAdminReducer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | import { SET_SUPER_USER } from './Actions'
20 |
21 | const SuperUserReducer = (state = '', action) => {
22 | switch(action.type) {
23 | case SET_SUPER_USER:
24 | return action.payload;
25 | default:
26 | return state
27 | }
28 | }
29 |
30 | export default SuperUserReducer;
31 |
--------------------------------------------------------------------------------
/cmd/utils/keyStore.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package utils
20 |
21 | import "fmt"
22 |
23 | var KeyStoreData KeyStore
24 |
25 |
26 | func (keyStore *KeyStore) SetKeyStore(file string, storeType string, alias string, password string) error {
27 |
28 | fmt.Println("setting informartion")
29 | initializedKeyStore := KeyStore{Location:file, Type:storeType, Alias:alias, Password:password}
30 | KeyStoreData = initializedKeyStore
31 |
32 | return nil
33 | }
34 |
--------------------------------------------------------------------------------
/cmd/docs/mi_delete_role.md:
--------------------------------------------------------------------------------
1 | ## mi delete role
2 |
3 | Delete a role from the Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Delete a role with the name specified by the command line argument [role-name] from a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi delete role [role-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To delete a role
17 | mi delete role [role-name] -e dev
18 | To delete a role in a secondary user store
19 | mi delete role [role-name] -d [domain] -e dev
20 | NOTE: The flag (--environment (-e)) is mandatory
21 | ```
22 |
23 | ### Options
24 |
25 | ```
26 | -d, --domain string Select the domain of the role
27 | -e, --environment string Environment of the Micro Integrator from which a role should be deleted
28 | -h, --help help for role
29 | ```
30 |
31 | ### Options inherited from parent commands
32 |
33 | ```
34 | -k, --insecure Allow connections to SSL endpoints without certs
35 | --verbose Enable verbose mode
36 | ```
37 |
38 | ### SEE ALSO
39 |
40 | * [mi delete](mi_delete.md) - Delete users or roles from a Micro Integrator instance
41 |
42 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_log-levels.md:
--------------------------------------------------------------------------------
1 | ## mi get log-levels
2 |
3 | Get information about a Logger configured in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the Logger specified by command line argument [logger-name]
8 | configured in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get log-levels [logger-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To get details about a specific logger
18 | mi get log-levels org-apache-coyote -e dev
19 | NOTE: The flag (--environment (-e)) is mandatory
20 | ```
21 |
22 | ### Options
23 |
24 | ```
25 | -e, --environment string Environment to be searched
26 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
27 | -h, --help help for log-levels
28 | ```
29 |
30 | ### Options inherited from parent commands
31 |
32 | ```
33 | -k, --insecure Allow connections to SSL endpoints without certs
34 | --verbose Enable verbose mode
35 | ```
36 |
37 | ### SEE ALSO
38 |
39 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
40 |
41 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/redux/IsRefreshedReducer.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import { IS_REFRESHED } from './Actions'
22 |
23 | const IsRefreshedReducer = (state = false, action) => {
24 | switch(action.type) {
25 | case IS_REFRESHED:
26 | return action.payload;
27 | default:
28 | return state
29 | }
30 | }
31 |
32 | export default IsRefreshedReducer;
33 |
--------------------------------------------------------------------------------
/cmd/docs/mi_activate_message-processor.md:
--------------------------------------------------------------------------------
1 | ## mi activate message-processor
2 |
3 | Activate a message processor deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Activate the message processor specified by the command line argument [messageprocessor-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi activate message-processor [messageprocessor-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To activate a message processor
17 | mi activate message-processor TestMessageProcessor -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the message processor should be activated
25 | -h, --help help for message-processor
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi activate](mi_activate.md) - Activate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/.swagger-codegen-ignore:
--------------------------------------------------------------------------------
1 | # Swagger Codegen Ignore
2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3 |
4 | # Use this file to prevent files from being overwritten by the generator.
5 | # The patterns follow closely to .gitignore or .dockerignore.
6 |
7 | # As an example, the C# client generator defines ApiClient.cs.
8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9 | #ApiClient.cs
10 |
11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12 | #foo/*/qux
13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14 |
15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16 | #foo/**/qux
17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18 |
19 | # You can also negate patterns with an exclamation (!).
20 | # For example, you can ignore all files in a docs folder with the file extension .md:
21 | #docs/*.md
22 | # Then explicitly reverse the ignore rule for a single file:
23 | #!docs/README.md
24 |
--------------------------------------------------------------------------------
/cmd/docs/mi_deactivate_message-processor.md:
--------------------------------------------------------------------------------
1 | ## mi deactivate message-processor
2 |
3 | Deactivate a message processor deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Deactivate the message processor specified by the command line argument [messageprocessor-name] deployed in a Micro Integrator in the environment specified by the flag --environment, -e
8 |
9 | ```
10 | mi deactivate message-processor [messageprocessor-name] [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To deactivate a message processor
17 | mi deactivate message-processor TestMessageProcessor -e dev
18 | NOTE: The flag (--environment (-e)) is mandatory
19 | ```
20 |
21 | ### Options
22 |
23 | ```
24 | -e, --environment string Environment of the micro integrator in which the message processor should be deactivated
25 | -h, --help help for message-processor
26 | ```
27 |
28 | ### Options inherited from parent commands
29 |
30 | ```
31 | -k, --insecure Allow connections to SSL endpoints without certs
32 | --verbose Enable verbose mode
33 | ```
34 |
35 | ### SEE ALSO
36 |
37 | * [mi deactivate](mi_deactivate.md) - Deactivate artifacts deployed in a Micro Integrator instance
38 |
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/utils/Constants.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 |
20 | export const Constants = {
21 | PREFIX_GROUPS: "groups",
22 | PREFIX_NODES: "nodes",
23 | PREFIX_USERS: "users",
24 | PREFIX_ROLES: "roles",
25 | PREFIX_ALLROLES: "all-roles",
26 | PREFIX_LOG_CONFIGS: "log-configs",
27 | PREFIX_LOGS: "logs",
28 | PREFIX_RESOURCE_TYPE: "resource-type",
29 | PREFIX_USER_PASSWORD: "user/password"
30 | };
31 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_apis.md:
--------------------------------------------------------------------------------
1 | ## mi get apis
2 |
3 | Get information about apis deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the apis specified by command line argument [api-name]
8 | If not specified, list all the apis deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get apis [api-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the apis
18 | mi get apis -e dev
19 | To get details about a specific apis
20 | mi get apis SampleIntegrationAPI -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for apis
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_tasks.md:
--------------------------------------------------------------------------------
1 | ## mi get tasks
2 |
3 | Get information about tasks deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the tasks specified by command line argument [task-name]
8 | If not specified, list all the tasks deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get tasks [task-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the tasks
18 | mi get tasks -e dev
19 | To get details about a specific tasks
20 | mi get tasks SampleTask -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for tasks
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi.md:
--------------------------------------------------------------------------------
1 | ## mi
2 |
3 | Micro Integrator commands
4 |
5 | ### Synopsis
6 |
7 | mi is a Command Line Tool for Managing WSO2 Micro Integrator
8 |
9 | ```
10 | mi [flags]
11 | ```
12 |
13 | ### Options
14 |
15 | ```
16 | -h, --help help for mi
17 | -k, --insecure Allow connections to SSL endpoints without certs
18 | --verbose Enable verbose mode
19 | ```
20 |
21 | ### SEE ALSO
22 |
23 | * [mi activate](mi_activate.md) - Activate artifacts deployed in a Micro Integrator instance
24 | * [mi add](mi_add.md) - Add new users, roles or loggers to a Micro Integrator instance
25 | * [mi deactivate](mi_deactivate.md) - Deactivate artifacts deployed in a Micro Integrator instance
26 | * [mi delete](mi_delete.md) - Delete users or roles from a Micro Integrator instance
27 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
28 | * [mi login](mi_login.md) - Login to a Micro Integrator
29 | * [mi logout](mi_logout.md) - Logout from a Micro Integrator
30 | * [mi secret](mi_secret.md) - Manage sensitive information
31 | * [mi update](mi_update.md) - Update log level of Loggers in a Micro Integrator instance
32 | * [mi version](mi_version.md) - Display Version on current mi
33 |
34 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/sideDrawers/commons/CopyToClipboardRow.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | import React from 'react';
21 | import { TableRow } from '@material-ui/core';
22 | import CopyToClipBoardWithTooltip from './CopyToClipBoardWithTooltip'
23 |
24 | export default function CopyToClipboardRow(props) {
25 | const text = props.text;
26 |
27 | return {text}
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/cmd/credentials/encode.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package credentials
20 |
21 | import "encoding/base64"
22 |
23 | // Base64Encode encodes given str to Base64 string
24 | func Base64Encode(str string) string {
25 | return base64.StdEncoding.EncodeToString([]byte(str))
26 | }
27 |
28 | // Base64Decode decodes a given str to original or returns an error
29 | func Base64Decode(str string) (string, error) {
30 | enc, err := base64.StdEncoding.DecodeString(str)
31 | if err != nil {
32 | return "", err
33 | }
34 | return string(enc), nil
35 | }
36 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/sideDrawers/commons/CopyToClipBoardCell.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | import React from 'react';
21 | import { TableCell } from '@material-ui/core';
22 | import CopyToClipBoardWithTooltip from './CopyToClipBoardWithTooltip'
23 |
24 | export default function CopyToClipboardCell(props) {
25 | const text = props.text;
26 |
27 | return {text}
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/encryption-client/src/main/java/org/wso2/mi/tooling/security/exception/EncryptionToolException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.mi.tooling.security.exception;
20 |
21 | /**
22 | * Exception handling class for Encryption tool.
23 | */
24 | public class EncryptionToolException extends RuntimeException {
25 |
26 | public EncryptionToolException(String message) {
27 | super(message);
28 | }
29 |
30 | public EncryptionToolException(String message, Throwable error) {
31 | super(message, error);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/cmd/tools/generate_bash_completion_script.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package main
20 |
21 | import (
22 | "log"
23 | "os"
24 | "path/filepath"
25 |
26 | cmd "github.com/wso2/product-mi-tooling/cmd/cmd"
27 | )
28 |
29 | func main() {
30 |
31 | err := os.MkdirAll("shell-completions", os.ModePerm)
32 | if err != nil {
33 | log.Fatal(err)
34 | }
35 |
36 | log.Println("Generating bash completions...")
37 | err = cmd.MICmd.GenBashCompletionFile(filepath.FromSlash("./shell-completions/mi_bash_completion.sh"))
38 | if err != nil {
39 | log.Fatal(err)
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/public/monaco-editor/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 - present Microsoft Corporation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_endpoints.md:
--------------------------------------------------------------------------------
1 | ## mi get endpoints
2 |
3 | Get information about endpoints deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the endpoints specified by command line argument [endpoint-name]
8 | If not specified, list all the endpoints deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get endpoints [endpoint-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the endpoints
18 | mi get endpoints -e dev
19 | To get details about a specific endpoints
20 | mi get endpoints SampleEndpoint -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for endpoints
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_sequences.md:
--------------------------------------------------------------------------------
1 | ## mi get sequences
2 |
3 | Get information about sequences deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the sequences specified by command line argument [sequence-name]
8 | If not specified, list all the sequences deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get sequences [sequence-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the sequences
18 | mi get sequences -e dev
19 | To get details about a specific sequences
20 | mi get sequences SampleSequence -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for sequences
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/dataServiceUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type DataServicesList struct {
4 | Count int32 `json:"count"`
5 | List []DataServiceSummary `json:"list"`
6 | }
7 |
8 | type DataServiceInfo struct {
9 | ServiceName string `json:"serviceName"`
10 | ServiceDescription string `json:"serviceDescription"`
11 | ServiceGroupName string `json:"serviceGroupName"`
12 | Wsdl11 string `json:"wsdl1_1"`
13 | Wsdl20 string `json:"wsdl2_0"`
14 | Queries []QuerySummary `json:"queries"`
15 | }
16 |
17 | type DataServiceSummary struct {
18 | ServiceName string `json:"name"`
19 | Wsdl11 string `json:"wsdl1_1"`
20 | Wsdl20 string `json:"wsdl2_0"`
21 | }
22 |
23 | type QuerySummary struct {
24 | Id string `json:"id"`
25 | Namespace string `json:"namespace"`
26 | }
27 |
28 | func (data *DataServicesList) GetDataIterator() <-chan []string {
29 | ch := make(chan []string)
30 |
31 | go func() {
32 | for _, val := range data.List {
33 | ch <- []string{val.ServiceName, val.Wsdl11, val.Wsdl20}
34 | }
35 | close(ch)
36 | }()
37 |
38 | return ch
39 | }
40 |
41 | func (data *DataServicesList) GetCount() int32 {
42 | return data.Count
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/inboundEndpointUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type InboundEndpointList struct {
4 | Count int32 `json:"count"`
5 | InboundEndpoints []InboundEndpointSummary `json:"list"`
6 | }
7 |
8 | type InboundEndpointSummary struct {
9 | Name string `json:"name"`
10 | Type string `json:"protocol"`
11 | Status string `json:"status"`
12 | }
13 |
14 | type InboundEndpoint struct {
15 | Name string `json:"name"`
16 | Type string `json:"protocol"`
17 | Stats string `json:"stats"`
18 | Tracing string `json:"tracing"`
19 | Parameters []Parameter `json:"parameters"`
20 | Status string `json:"status"`
21 | }
22 |
23 | type Parameter struct {
24 | Name string `json:"name"`
25 | Value string `json:"value"`
26 | }
27 |
28 | func (inboundEndpoints *InboundEndpointList) GetDataIterator() <-chan []string {
29 | ch := make(chan []string)
30 |
31 | go func() {
32 | for _, inboundEndpoint := range inboundEndpoints.InboundEndpoints {
33 | ch <- []string{inboundEndpoint.Name, inboundEndpoint.Type}
34 | }
35 | close(ch)
36 | }()
37 |
38 | return ch
39 | }
40 |
41 | func (inboundEndpoints *InboundEndpointList) GetCount() int32 {
42 | return inboundEndpoints.Count
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/utils/errorHandling.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package utils
20 |
21 | import (
22 | "fmt"
23 | "os"
24 | )
25 |
26 | var IsVerbose bool
27 |
28 | func HandleErrorAndExit(msg string, err error) {
29 | if err == nil {
30 | fmt.Fprintf(os.Stderr, "%s: %v\n", ProjectName, msg)
31 | } else {
32 | fmt.Fprintf(os.Stderr, "%s: %v Reason: %v\n", ProjectName, msg, err.Error())
33 | }
34 | defer printAndExit()
35 | }
36 |
37 | func printAndExit() {
38 |
39 | if !IsVerbose {
40 | fmt.Println("Execute with --verbose to see detailed info.")
41 | }
42 | os.Exit(1)
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_logs.md:
--------------------------------------------------------------------------------
1 | ## mi get logs
2 |
3 | List all the available log files
4 |
5 | ### Synopsis
6 |
7 | Download a log file by providing the file name and download location,
8 | if not provided, list all the log files of the Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get logs [file-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | Example:
18 | To list all the log files
19 | mi get logs -e dev
20 | To download a selected log file
21 | mi get logs [file-name] -p [download-location] -e dev
22 | NOTE: The flag (--environment (-e)) is mandatory
23 | ```
24 |
25 | ### Options
26 |
27 | ```
28 | -e, --environment string Environment to be searched
29 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
30 | -h, --help help for logs
31 | -p, --path string Path the file should be downloaded
32 | ```
33 |
34 | ### Options inherited from parent commands
35 |
36 | ```
37 | -k, --insecure Allow connections to SSL endpoints without certs
38 | --verbose Enable verbose mode
39 | ```
40 |
41 | ### SEE ALSO
42 |
43 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
44 |
45 |
--------------------------------------------------------------------------------
/monitoring-dashboard/README.md:
--------------------------------------------------------------------------------
1 | # Monitoring Dashboard for WSO2 Micro Integrator
2 |
3 | ## Building from the source.
4 |
5 | ### Setting up the development environment.
6 | 1. Install Node.js [14.X.X](https://nodejs.org/en/download/releases/).
7 | 2. Fork the [Micro Integrator Tooling repository](https://github.com/wso2/product-mi-tooling).
8 | 3. Clone your fork into any directory.
9 | 4. Access the cloned directory and then navigate to `product-mi-tooling/monitoring-dashboard`. This
10 | will be the for future reference.
11 | 5. Run the script available by doing the following Apache Maven command.
12 | ```mvn clean install```
13 | 6. wso2mi-monitoring-dashboard-version.zip can be found in
14 | `/distribution/target`.
15 |
16 | ### Running.
17 | - Extract the compressed archive generated to a desired location.
18 | ```
19 | cd to the /bin
20 |
21 | Execute dashboard.sh or dashboard.bat as appropriate.
22 | ```
23 |
24 | - Load the login page with the dashboard context. i.e: https://localhost:9743/dashboard.
25 |
26 | ### Management API Address and Port
27 | The Management API address and Port is required when logging into the dashboard.
28 | NOTE: The default hostname is localhost and the port is 9164.
29 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/Error.jsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | import React from 'react';
20 | import Alert from '@material-ui/lab/Alert';
21 |
22 | export default function Error(props) {
23 |
24 |
25 | return (
26 | <>
27 | {props.err.message ?
28 | {props.err.message}
29 | :
30 | An error occurred while retrieving data. Please check server logs.
31 | }
32 | >
33 | );
34 | }
35 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/endpointUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | import "strconv"
4 |
5 | type EndpointList struct {
6 | Count int32 `json:"count"`
7 | Endpoints []EndpointSummary `json:"list"`
8 | }
9 |
10 | type EndpointSummary struct {
11 | Name string `json:"name"`
12 | Type string `json:"type"`
13 | Active bool `json:"isActive"`
14 | }
15 |
16 | type Endpoint struct {
17 | Name string `json:"name"`
18 | Type string `json:"type"`
19 | Active bool `json:"isActive"`
20 | Method string `json:"method"`
21 | Url string `json:"url"`
22 | Stats string `json:"stats"`
23 | Address string `json:"address"`
24 | URITemplate string `json:"uriTemplate"`
25 | ServiceName string `json:"serviceName"`
26 | PortName string `json:"portName"`
27 | WsdlURI string `json:"wsdlUri"`
28 | }
29 |
30 | func (endpoints *EndpointList) GetDataIterator() <-chan []string {
31 | ch := make(chan []string)
32 |
33 | go func() {
34 | for _, endpoint := range endpoints.Endpoints {
35 | ch <- []string{endpoint.Name, endpoint.Type, strconv.FormatBool(endpoint.Active)}
36 | }
37 | close(ch)
38 | }()
39 |
40 | return ch
41 | }
42 |
43 | func (endpoints *EndpointList) GetCount() int32 {
44 | return endpoints.Count
45 | }
46 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/messageProcessorUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type MessageProcessorList struct {
4 | Count int32 `json:"count"`
5 | MessageProcessors []MessageProcessor `json:"list"`
6 | }
7 |
8 | type MessageProcessor struct {
9 | Name string `json:"name"`
10 | Type string `json:"type"`
11 | Status string `json:"status"`
12 | }
13 |
14 | type MessageProcessorData struct {
15 | Name string `json:"name"`
16 | FileName string `json:"fileName"`
17 | Type string `json:"type"`
18 | Store string `json:"messageStore"`
19 | Container string `json:"artifactContainer"`
20 | Parameters map[string]string `json:"parameters"`
21 | Status string `json:"status"`
22 | }
23 |
24 | func (messageProcessors *MessageProcessorList) GetDataIterator() <-chan []string {
25 | ch := make(chan []string)
26 |
27 | go func() {
28 | for _, messageProcessor := range messageProcessors.MessageProcessors {
29 | ch <- []string{messageProcessor.Name, messageProcessor.Type, messageProcessor.Status}
30 | }
31 | close(ch)
32 | }()
33 |
34 | return ch
35 | }
36 |
37 | func (messageProcessors *MessageProcessorList) GetCount() int32 {
38 | return messageProcessors.Count
39 | }
40 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_composite-apps.md:
--------------------------------------------------------------------------------
1 | ## mi get composite-apps
2 |
3 | Get information about composite apps deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the composite apps specified by command line argument [app-name]
8 | If not specified, list all the composite apps deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get composite-apps [app-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the composite apps
18 | mi get composite-apps -e dev
19 | To get details about a specific composite apps
20 | mi get composite-apps SampleApp -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for composite-apps
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_local-entries.md:
--------------------------------------------------------------------------------
1 | ## mi get local-entries
2 |
3 | Get information about local entries deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the local entries specified by command line argument [localentry-name]
8 | If not specified, list all the local entries deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get local-entries [localentry-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the local entries
18 | mi get local-entries -e dev
19 | To get details about a specific local entries
20 | mi get local-entries SampleLocalEntry -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for local-entries
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_proxy-services.md:
--------------------------------------------------------------------------------
1 | ## mi get proxy-services
2 |
3 | Get information about proxy services deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the proxy services specified by command line argument [proxy-name]
8 | If not specified, list all the proxy services deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get proxy-services [proxy-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the proxy services
18 | mi get proxy-services -e dev
19 | To get details about a specific proxy services
20 | mi get proxy-services SampleProxy -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for proxy-services
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_transaction-counts.md:
--------------------------------------------------------------------------------
1 | ## mi get transaction-counts
2 |
3 | Retrieve transaction count
4 |
5 | ### Synopsis
6 |
7 | Retrieve transaction count based on the given year and month.
8 | If year and month not provided, retrieve the count for the current year and month of Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get transaction-counts [year] [month] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To get the transaction count for the current month
18 | mi get transaction-counts -e dev
19 | To get the transaction count for a specific month
20 | mi get transaction-counts 2020 06 -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for transaction-counts
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_data-services.md:
--------------------------------------------------------------------------------
1 | ## mi get data-services
2 |
3 | Get information about data services deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the data services specified by command line argument [dataservice-name]
8 | If not specified, list all the data services deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get data-services [dataservice-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the data services
18 | mi get data-services -e dev
19 | To get details about a specific data services
20 | mi get data-services SampleDataService -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for data-services
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_roles.md:
--------------------------------------------------------------------------------
1 | ## mi get roles
2 |
3 | Get information about roles
4 |
5 | ### Synopsis
6 |
7 | Get information about the roles in primary and secondary user stores.
8 | List all roles of the Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get roles [role-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the roles
18 | mi get roles -e dev
19 | To get details about a role by providing the role name
20 | mi get roles [role-name] -e dev
21 | To get details about a role in a secondary user store
22 | mi get roles [role-name] -d [domain] -e dev
23 | NOTE: The flag (--environment (-e)) is mandatory
24 | ```
25 |
26 | ### Options
27 |
28 | ```
29 | -d, --domain string Filter roles by domain
30 | -e, --environment string Environment to be searched
31 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
32 | -h, --help help for roles
33 | ```
34 |
35 | ### Options inherited from parent commands
36 |
37 | ```
38 | -k, --insecure Allow connections to SSL endpoints without certs
39 | --verbose Enable verbose mode
40 | ```
41 |
42 | ### SEE ALSO
43 |
44 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
45 |
46 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_message-stores.md:
--------------------------------------------------------------------------------
1 | ## mi get message-stores
2 |
3 | Get information about message stores deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the message stores specified by command line argument [messagestore-name]
8 | If not specified, list all the message stores deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get message-stores [messagestore-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the message stores
18 | mi get message-stores -e dev
19 | To get details about a specific message stores
20 | mi get message-stores TestMessageStore -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for message-stores
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/integration/testdata/mi/docker-entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ---------------------------------------------------------------------------
3 | # Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
4 | #
5 | # WSO2 Inc. licenses this file to you under the Apache License,
6 | # Version 2.0 (the "License"); you may not use this file except
7 | # in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | # ---------------------------------------------------------------------------
19 |
20 | set -e
21 |
22 | # check if the WSO2 non-root user home exists
23 | test ! -d "${WORKING_DIRECTORY}" && echo "WSO2 Docker non-root user home does not exist" && exit 1
24 |
25 | # check if the WSO2 product home exists
26 | test ! -d "${WSO2_SERVER_HOME}" && echo "WSO2 Docker product home does not exist" && exit 1
27 |
28 | # start Micro Integrator
29 | sh "${WSO2_SERVER_HOME}"/bin/micro-integrator.sh "$@"
30 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.utils/src/main/java/org/wso2/micro/integrator/dashboard/utils/SSOConfigException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.micro.integrator.dashboard.utils;
20 |
21 | /**
22 | * Exception to throw when sso config error is caught when starting dashboard server.
23 | */
24 | public class SSOConfigException extends Exception {
25 |
26 | public SSOConfigException(String error) {
27 |
28 | super(error);
29 | }
30 |
31 | public SSOConfigException(String error, Throwable cause) {
32 |
33 | super(error, cause);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/auth/Interceptor.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import axios from "axios";
22 | import AuthManager from "./AuthManager";
23 |
24 | export default function interceptor(logout){
25 | axios.interceptors.response.use(undefined, function axiosRetryInterceptor(error){
26 | if(AuthManager.isLoggedIn() && error.response.status === 401 ){
27 | AuthManager.logout()
28 | .then(() =>{
29 | logout();
30 | })
31 | }
32 | return Promise.reject(error);
33 | })
34 | }
35 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/APIs.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function APIs() {
25 | const [pageInfo] = React.useState({
26 | pageId: "apis",
27 | title: "APIs",
28 | headCells: [
29 | {id: 'name', label: 'API Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'url', label: 'URL'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/cmd/utils/fileIOUtils_test.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package utils
20 |
21 | import (
22 | "testing"
23 | )
24 |
25 | // test case 1 - for a file that does not exist
26 | func TestIsFileExist1(t *testing.T) {
27 | isFileExist := IsFileExist("random-string")
28 | if isFileExist {
29 | t.Errorf("Expected '%t' for a file that does not exist, got '%t' instead\n", false, true)
30 | }
31 | }
32 |
33 | // test for a file that does exist
34 | func TestIsFileExist2(t *testing.T) {
35 | isFileExist := IsFileExist("./fileIOUtils.go")
36 | if !isFileExist {
37 | t.Errorf("Expected '%t' for a file that does exist, got '%t' instead\n", true, false)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Tasks.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Tasks() {
25 | const [pageInfo] = React.useState({
26 | pageId: "tasks",
27 | title: "Tasks",
28 | headCells: [
29 | {id: 'name', label: 'Task Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'group', label: 'Task Group'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_inbound-endpoints.md:
--------------------------------------------------------------------------------
1 | ## mi get inbound-endpoints
2 |
3 | Get information about inbound endpoints deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the inbound endpoints specified by command line argument [inbound-name]
8 | If not specified, list all the inbound endpoints deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get inbound-endpoints [inbound-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the inbound endpoints
18 | mi get inbound-endpoints -e dev
19 | To get details about a specific inbound endpoints
20 | mi get inbound-endpoints SampleInboundEndpoint -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for inbound-endpoints
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/cmd/credentials/store.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package credentials
20 |
21 | type Store interface {
22 | // HasMI return the existance of mi credentials in the store for a given environment
23 | HasMI(env string) bool
24 | // GetMICredentials returns credentials for micro integrator from the store or an error
25 | GetMICredentials(env string) (MiCredential, error)
26 | // SetMICredentials sets credentials for micro integrator using username, password and access token
27 | SetMICredentials(env, username, password, accessToken string) error
28 | // Erase mi credentials in a given environment
29 | EraseMI(env string) error
30 | // Load store
31 | Load() error
32 | }
33 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_templates.md:
--------------------------------------------------------------------------------
1 | ## mi get templates
2 |
3 | Get information about templates deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the template specified by command line arguments [template-type] and [template-name]
8 | If not specified, list all the templates in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get templates [template-type] [template-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the templates
18 | mi get templates -e dev
19 | To get details about a specific template type
20 | mi get templates TemplateType
21 | To get details about a specific template
22 | mi get templates TemplateType TemplateName -e dev
23 | NOTE: The flag (--environment (-e)) is mandatory
24 | ```
25 |
26 | ### Options
27 |
28 | ```
29 | -e, --environment string Environment to be searched
30 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
31 | -h, --help help for templates
32 | ```
33 |
34 | ### Options inherited from parent commands
35 |
36 | ```
37 | -k, --insecure Allow connections to SSL endpoints without certs
38 | --verbose Enable verbose mode
39 | ```
40 |
41 | ### SEE ALSO
42 |
43 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
44 |
45 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/LogFiles.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function LogFiles() {
25 | const [pageInfo] = React.useState({
26 | pageId: "logs",
27 | title: "Log Files",
28 | headCells: [
29 | {id: 'name', label: 'Log File Name'},
30 | {id: 'nodes_logs', label: 'Nodes'},
31 | {id: 'log_size', label: 'Size'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/auth/Logout.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | import React, {useEffect, useState} from 'react';
20 | import AuthManager from './AuthManager';
21 | import {Redirect} from 'react-router';
22 |
23 | export default function Logout() {
24 |
25 | const [loggedOut, setLoggedOut] = useState(false)
26 |
27 | useEffect(() => {
28 | AuthManager.logout()
29 | .then(() => {
30 | setLoggedOut(true);
31 | });
32 | }, [])
33 |
34 |
35 | if (loggedOut) {
36 | return
37 | }
38 | return "";
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Sequences.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Sequences() {
25 | const [pageInfo] = React.useState({
26 | pageId: "sequences",
27 | title: "Sequences",
28 | headCells: [
29 | {id: 'name', label: 'Sequence Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'statistic', label: 'Statistics'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/LocalEntries.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function LocalEntries() {
25 | const [pageInfo] = React.useState({
26 | pageId: "local-entries",
27 | title: "Local Entries",
28 | headCells: [
29 | {id: 'name', label: 'Local Entry Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'type', label: 'Type'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/cmd/docs/mi_get_message-processors.md:
--------------------------------------------------------------------------------
1 | ## mi get message-processors
2 |
3 | Get information about message processors deployed in a Micro Integrator
4 |
5 | ### Synopsis
6 |
7 | Get information about the message processors specified by command line argument [messageprocessor-name]
8 | If not specified, list all the message processors deployed in a Micro Integrator in the environment specified by the flag --environment, -e
9 |
10 | ```
11 | mi get message-processors [messageprocessor-name] [flags]
12 | ```
13 |
14 | ### Examples
15 |
16 | ```
17 | To list all the message processors
18 | mi get message-processors -e dev
19 | To get details about a specific message processors
20 | mi get message-processors TestMessageProcessor -e dev
21 | NOTE: The flag (--environment (-e)) is mandatory
22 | ```
23 |
24 | ### Options
25 |
26 | ```
27 | -e, --environment string Environment to be searched
28 | --format string Pretty-print using Go Templates. Use "{{ jsonPretty . }}" to list all fields
29 | -h, --help help for message-processors
30 | ```
31 |
32 | ### Options inherited from parent commands
33 |
34 | ```
35 | -k, --insecure Allow connections to SSL endpoints without certs
36 | --verbose Enable verbose mode
37 | ```
38 |
39 | ### SEE ALSO
40 |
41 | * [mi get](mi_get.md) - Get information about artifacts deployed in a Micro Integrator instance
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Datasources.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React, { useState } from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function DataSources() {
25 | const [pageInfo] = useState({
26 | pageId: "data-sources",
27 | title: "Data Sources",
28 | headCells: [
29 | {id: 'name', label: 'Data Source Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'type', label: 'Type'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Services.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Services() {
25 | const [pageInfo] = React.useState({
26 | pageId: "services",
27 | title: "Services",
28 | headCells: [
29 | {id: 'name', label: 'Service Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'basePath', label: 'Base Path'},
32 | ],
33 | tableOrderBy: 'name'
34 | });
35 | return
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/cmd/cmd/secret/secret.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package secret
20 |
21 | import (
22 | "github.com/spf13/cobra"
23 | "github.com/wso2/product-mi-tooling/cmd/utils"
24 | )
25 |
26 | const secretCmdLiteral = "secret"
27 | const secretCmdShortDesc = "Manage sensitive information"
28 |
29 | const secretCmdLongDesc = "Encrypt secrets to be used in the Micro Integrator"
30 |
31 | // SecretCmd represents the secret command
32 | var SecretCmd = &cobra.Command{
33 | Use: secretCmdLiteral,
34 | Short: secretCmdShortDesc,
35 | Long: secretCmdLongDesc,
36 | Run: func(cmd *cobra.Command, args []string) {
37 | utils.Logln(utils.LogPrefixInfo + secretCmdLiteral + " called")
38 | cmd.Help()
39 | },
40 | }
41 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/logFileUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package artifactUtils
19 |
20 | type LogFileList struct {
21 | Count int32 `json:"count"`
22 | LogFiles []LogFile `json:"list"`
23 | }
24 |
25 | type LogFile struct {
26 | FileName string `json:"FileName"`
27 | Size string `json:"size"`
28 | }
29 |
30 | func (fileList *LogFileList) GetDataIterator() <-chan []string {
31 | ch := make(chan []string)
32 |
33 | go func() {
34 | for _, logFile := range fileList.LogFiles {
35 | ch <- []string{logFile.FileName, logFile.Size}
36 | }
37 | close(ch)
38 | }()
39 |
40 | return ch
41 | }
42 |
43 | func (fileList *LogFileList) GetCount() int32 {
44 | return fileList.Count
45 | }
46 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/DataServices.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function DataServices() {
25 | const [pageInfo] = React.useState({
26 | pageId: "data-services",
27 | title: "Data Services",
28 | headCells: [
29 | {id: 'name', label: 'Data Service Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'wsdlUrl', label: 'WSDL 1.1'}],
32 | tableOrderBy: 'name'
33 | });
34 |
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/data/manager/DataManagerSingleton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | package org.wso2.ei.dashboard.core.data.manager;
22 |
23 | /**
24 | * Creates a single instance of InMemoryDataManager.
25 | */
26 | public class DataManagerSingleton {
27 |
28 | private DataManagerSingleton() {
29 |
30 | }
31 |
32 | private static DataManager dataManager;
33 |
34 | public static DataManager getDataManager() {
35 | if (dataManager == null) {
36 | dataManager = new InMemoryDataManager();
37 | }
38 | return dataManager;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/SiddhiApplications.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function SiddhiApplications() {
25 | const [pageInfo] = React.useState({
26 | pageId: "siddhiapps",
27 | title: "Siddhi Applications",
28 | headCells: [
29 | {id: 'name', label: 'Siddhi Application'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'status', label: 'Active / Faulty'}
32 | ],
33 | tableOrderBy: 'name'
34 | });
35 | return
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/User.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.ei.dashboard.core.rest.model;
20 |
21 | /**
22 | * Sample class used to de-serialize JSON response from management API.
23 | */
24 | public class User implements Comparable {
25 | private final String userId;
26 |
27 | public User(String userId) {
28 | this.userId = userId;
29 | }
30 |
31 | public String getUserId() {
32 | return userId;
33 | }
34 |
35 | @Override
36 | public int compareTo(User o) {
37 | return this.userId.toLowerCase().compareTo(o.userId.toLowerCase());
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/UsersResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class UsersResourceResponse {
23 | private Users resourceList;
24 | private int count;
25 |
26 | public void setResourceList(Users resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public Users getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Endpoints.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Endpoints() {
25 | const [pageInfo] = React.useState({
26 | pageId: "endpoints",
27 | title: "Endpoints",
28 | headCells: [
29 | {id: 'name', label: 'Endpoint Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'type', label: 'Type'},
32 | {id: 'state', label: 'State'}],
33 | tableOrderBy: 'name'
34 | });
35 |
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2018, WSO2 Inc. (http://wso2.com) All Rights Reserved.
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | matrix:
16 | include:
17 | - language: go
18 | go:
19 | - 1.12.x
20 |
21 | env:
22 | - GO111MODULE=on
23 |
24 | before_install:
25 | - cd cmd/
26 | - go mod download
27 |
28 | script:
29 | - go test -v ./...
30 |
31 | cache:
32 | directories:
33 | - $HOME/.cache/go-build
34 | - $HOME/gopath/pkg/mod
35 |
36 | - language: java
37 | jdk:
38 | - openjdk8
39 | install: true
40 |
41 | script: mvn clean install -P smoke-tests -Dsurefire.useSystemClassLoader=false -fae -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
42 |
43 | cache:
44 | directories:
45 | - $HOME/.m2
46 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/LogsResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | package org.wso2.ei.dashboard.core.rest.model;
22 | public class LogsResourceResponse {
23 | private LogList resourceList;
24 | private int count;
25 |
26 | public void setResourceList(LogList resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public LogList getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/RolesResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class RolesResourceResponse {
23 | private RoleList resourceList;
24 | private int count;
25 |
26 | public void setResourceList(RoleList resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public RoleList getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Listener.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Listeners() {
25 | const [pageInfo] = React.useState({
26 | pageId: "listeners",
27 | title: "Listeners",
28 | headCells: [
29 | {id: 'name', label: 'Listener Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'protocol', label: 'Protocol'},
32 | {id: 'port', label: 'Port'},
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Stores.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Stores() {
25 | const [pageInfo] = React.useState({
26 | pageId: "stores",
27 | title: "Stores",
28 | headCells: [
29 | {id: 'name', label: ' Store'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Queries.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Queries() {
25 | const [pageInfo] = React.useState({
26 | pageId: "queries",
27 | title: "Queries",
28 | headCells: [
29 | {id: 'name', label: 'Query Name'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Windows.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Windows() {
25 | const [pageInfo] = React.useState({
26 | pageId: "windows",
27 | title: "Windows",
28 | headCells: [
29 | {id: 'name', label: ' Window'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/NodesResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class NodesResourceResponse {
23 | private NodeList resourceList;
24 | private int count;
25 |
26 | public void setResourceList(NodeList resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public NodeList getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/LogConfigsResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class LogConfigsResourceResponse {
23 | private LogConfigs resourceList;
24 | private int count;
25 |
26 | public void setResourceList(LogConfigs resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public LogConfigs getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/distribution/src/main/resources/conf/security/cipher-text.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | #
4 | # WSO2 Inc. licenses this file to you under the Apache License,
5 | # Version 2.0 (the "License"); you may not use this file except
6 | # in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | #
18 |
19 | # By default, This file contains the secret alias names and the plain text passwords enclosed with '[]' brackets
20 | # In Production environments, It is recommend to replace these plain text password by the encrypted values. CipherTool can be used for it.
21 |
22 | Carbon.Security.KeyStore.Password=[wso2carbon]
23 | Carbon.Security.KeyStore.KeyPassword=[wso2carbon]
24 | Carbon.Security.TrustStore.Password=[wso2carbon]
25 | UserManager.AdminUser.Password=[admin]
26 | Datasources.WSO2_CARBON_DB.Configuration.Password=[wso2carbon]
27 | Server.Service.Connector.keystorePass=[wso2carbon]
28 | Management.Api.AdminUser.Password=[admin]
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/ArtifactsResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class ArtifactsResourceResponse {
23 | private Artifacts resourceList;
24 | private int count;
25 |
26 | public void setResourceList(Artifacts resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public Artifacts getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 |
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/MessageStores.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function MessageStores() {
25 | const [pageInfo] = React.useState({
26 | pageId: "message-stores",
27 | title: "Message Stores",
28 | headCells: [
29 | {id: 'name', label: 'Message Store Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'type', label: 'Type'},
32 | {id: 'message_count', label: 'Message Count'}],
33 | tableOrderBy: 'name'
34 | });
35 |
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/userUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 | package artifactUtils
19 |
20 | type UserList struct {
21 | Count int32 `json:"count"`
22 | Users []User `json:"list"`
23 | }
24 |
25 | type UserSummary struct {
26 | Roles []string `json:"roles"`
27 | IsAdmin bool `json:"isAdmin"`
28 | UserId string `json:"userId"`
29 | }
30 |
31 | type User struct {
32 | UserId string `json:"userId"`
33 | }
34 |
35 | func (users *UserList) GetDataIterator() <-chan []string {
36 | ch := make(chan []string)
37 |
38 | go func() {
39 | for _, user := range users.Users {
40 | ch <- []string{user.UserId}
41 | }
42 | close(ch)
43 | }()
44 |
45 | return ch
46 | }
47 |
48 | func (userList *UserList) GetCount() int32 {
49 | return userList.Count
50 | }
51 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/Progress.jsx:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | import React from 'react';
20 | import CircularProgress from '@material-ui/core/CircularProgress';
21 | import {makeStyles} from "@material-ui/core/styles/index";
22 |
23 | const useStyles = makeStyles((theme) => (
24 | {
25 | progress: {
26 | width: '64px',
27 | height: '64px',
28 | position: 'absolute',
29 | left: '50%',
30 | top: '50%',
31 | },
32 | }
33 | ));
34 |
35 | export default function Progress(props) {
36 |
37 | const classes = useStyles();
38 |
39 | return (
);
40 | }
41 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Aggregations.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Aggregations() {
25 | const [pageInfo] = React.useState({
26 | pageId: "aggregations",
27 | title: "Aggregations",
28 | headCells: [
29 | {id: 'name', label: ' Aggregation'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/ProxyService.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function ProxyService() {
25 | const [pageInfo] = React.useState({
26 | pageId: "proxy-services",
27 | title: "Proxy Services",
28 | headCells: [
29 | {id: 'name', label: 'Service Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'wsdlUrl', label: 'WSDL 1.1'},
32 | {id: 'isRunning', label: 'State'}
33 | ],
34 | tableOrderBy: 'name'
35 | });
36 |
37 | return
38 | }
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/RegistryResourceResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 | package org.wso2.ei.dashboard.core.rest.model;
21 |
22 | public class RegistryResourceResponse {
23 | private RegistryArtifacts resourceList;
24 | private int count;
25 |
26 | public void setResourceList(RegistryArtifacts resourceList) {
27 | this.resourceList = resourceList;
28 | }
29 |
30 | public RegistryArtifacts getResourceList() {
31 | return resourceList;
32 | }
33 |
34 | public void setCount(int count) {
35 | this.count = count;
36 | }
37 |
38 | public int getCount() {
39 | return count;
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/InboundEndpoints.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function InboundEndpoints() {
25 | const [pageInfo] = React.useState({
26 | pageId: "inbound-endpoints",
27 | title: "Inbound Endpoints",
28 | headCells: [
29 | {id: 'name', label: 'Inbound Endpoint Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'protocol', label: 'Protocol'},
32 | {id: 'status', label: 'Status'}],
33 | tableOrderBy: 'name'
34 | });
35 |
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/MessageProcessors.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function MessageProcessors() {
25 | const [pageInfo] = React.useState({
26 | pageId: "message-processors",
27 | title: "Message Processors",
28 | headCells: [
29 | {id: 'name', label: 'Message Processor Name'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'type', label: 'Type'},
32 | {id: 'status', label: 'Status'}],
33 | tableOrderBy: 'name'
34 | })
35 |
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/CarbonApplications.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function CarbonApplications() {
25 | const [pageInfo] = React.useState({
26 | pageId: "carbonapps",
27 | title: "Carbon Applications",
28 | headCells: [
29 | {id: 'name', label: 'Carbon Application'},
30 | {id: 'nodes', label: 'Nodes'},
31 | {id: 'version', label: 'Version'},
32 | {id: 'capp_status', label: 'Active / Faulty'}],
33 | tableOrderBy: 'name'
34 | });
35 |
36 | return
37 | }
38 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Sinks.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Sinks() {
25 | const [pageInfo] = React.useState({
26 | pageId: "sinks",
27 | title: "Sinks",
28 | headCells: [
29 | {id: 'name', label: 'Stream Name'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'type', label: 'Type'},
33 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
34 | ],
35 | tableOrderBy: 'name'
36 | });
37 | return
38 | }
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Sources.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Sources() {
25 | const [pageInfo] = React.useState({
26 | pageId: "sources",
27 | title: "Sources",
28 | headCells: [
29 | {id: 'name', label: 'Stream Name'},
30 | {id: 'appName', label: 'Application Name'},
31 | {id: 'nodes', label: 'Nodes'},
32 | {id: 'type', label: 'Type'},
33 | {id: 'si_artifact_status', label: 'Enabled / Disabled'}
34 | ],
35 | tableOrderBy: 'name'
36 | });
37 | return
38 | }
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/commons/utils/TokenUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.ei.dashboard.core.commons.utils;
20 |
21 | import com.google.gson.JsonElement;
22 | import com.google.gson.JsonParser;
23 |
24 | import java.util.Base64;
25 |
26 | /**
27 | * Utilities to handle access tokens.
28 | */
29 | public class TokenUtils {
30 |
31 | private static final Base64.Decoder decoder = Base64.getUrlDecoder();
32 |
33 | public static JsonElement getParsedToken(String token) {
34 |
35 | String[] parts = token.split("\\.");
36 | String payloadJson = new String(decoder.decode(parts[1]));
37 | return JsonParser.parseString(payloadJson);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # product-mi-tooling
2 |
3 | [](https://wso2.org/jenkins/job/products/job/product-mi-tooling/)
4 | [](https://opensource.org/licenses/Apache-2.0)
5 |
6 | This repository houses tooling components required for WSO2 Micro Integrator. Each of these components interact with
7 | the Management API of the WSO2 Micro Integrator to provide the information related to a specified server instance.
8 |
9 | # product-mi-components
10 | The two main tooling artifacts included here are as follows:
11 | 1. [Command Line Interface](https://github.com/wso2/product-mi-tooling/tree/master/cmd) for WSO2 Micro Integrator.
12 | 2. [Monitoring Dashboard](https://github.com/wso2/product-mi-tooling/tree/master/monitoring-dashboard) for WSO2 Micro Integrator.
13 |
14 | * Please refer the README.md files relevant to each module for more information on each of the modules.
15 | 1. [Command Line Interface README.md](https://github.com/wso2/product-mi-tooling/blob/master/cmd/README.md)
16 | 2. [Monitoring Dashboard README.md](https://github.com/wso2/product-mi-tooling/blob/master/monitoring-dashboard/README.md)
17 |
18 |
19 | # How to Contribute
20 | - Please report issues on [Github](https://github.com/wso2/micro-integrator).
21 | - Send your pull requests to [product-mi-tooling](https://github.com/wso2/product-mi-tooling) repository.
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/cmd/utils/logUtils.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package utils
20 |
21 | import (
22 | "fmt"
23 | "os"
24 | )
25 |
26 | var loglnFunc = doNothinglnFunc
27 |
28 | var logfFunc = doNothingfFunc
29 |
30 | func verbosePrintlnFunc(a ...interface{}) {
31 | fmt.Fprintln(os.Stderr, a...)
32 | }
33 |
34 | func doNothinglnFunc(v ...interface{}) {
35 | }
36 |
37 | func verbosePrintfFunc(format string, a ...interface{}) {
38 | fmt.Fprintf(os.Stderr, format, a...)
39 | }
40 |
41 | func doNothingfFunc(format string, a ...interface{}) {
42 | }
43 |
44 | func Logln(a ...interface{}) {
45 | loglnFunc(a...)
46 | }
47 |
48 | func Logf(format string, a ...interface{}) {
49 | logfFunc(format, a...)
50 | }
51 |
52 | func EnableVerboseMode() {
53 | loglnFunc = verbosePrintlnFunc
54 | logfFunc = verbosePrintfFunc
55 | }
56 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.dashboard.security.user.core/src/main/java/org/wso2/dashboard/security/user/core/User.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.dashboard.security.user.core;
20 |
21 | public class User {
22 | private String username;
23 | private String[] roles;
24 |
25 | public User(String username, String[] roles) {
26 | this.username = username;
27 | this.roles = roles;
28 | }
29 |
30 | public String getUsername() {
31 | return username;
32 | }
33 |
34 | public void setUsername(String username) {
35 | this.username = username;
36 | }
37 |
38 | public String[] getRoles() {
39 | return roles;
40 | }
41 |
42 | public void setRoles(String[] roles) {
43 | this.roles = roles;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/Connectors.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import React from 'react';
22 | import EnhancedTable from '../commons/EnhancedTable';
23 |
24 | export default function Connectors() {
25 | const [pageInfo] = React.useState({
26 | pageId: "connectors",
27 | title: "Connectors",
28 | headCells: [
29 | {id: 'name', label: 'Library Name'},
30 | {id: 'connector_nodes', label: 'Nodes'},
31 | {id: 'package', label: 'Package'},
32 | {id: 'description', label: 'Description'},
33 | {id: 'connector_status', label: 'Status'}],
34 | tableOrderBy: 'name'
35 | });
36 |
37 | return
38 | }
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/delegates/ArtifactsManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | package org.wso2.ei.dashboard.core.rest.delegates;
22 |
23 | import org.wso2.ei.dashboard.core.commons.utils.ManagementApiUtils;
24 | import org.wso2.ei.dashboard.core.exception.ManagementApiException;
25 |
26 | /**
27 | * This interface should be implemented by all products to store, update and delete node data.
28 | */
29 | public interface ArtifactsManager {
30 |
31 | void runFetchAllExecutorService();
32 |
33 | void runDeleteAllExecutorService();
34 |
35 | default String getAccessToken(String mgtApiUrl) throws ManagementApiException {
36 | return ManagementApiUtils.getAccessToken(mgtApiUrl);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.dashboard.security.user.core/src/main/java/org/wso2/dashboard/security/user/core/common/UnsupportedSecretTypeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.dashboard.security.user.core.common;
20 |
21 | /**
22 | * Exception defined to denote that provided secret type is not supported.
23 | */
24 | public class UnsupportedSecretTypeException extends Exception{
25 |
26 | public UnsupportedSecretTypeException() {
27 | }
28 |
29 | public UnsupportedSecretTypeException(String message) {
30 | super(message);
31 | }
32 |
33 | public UnsupportedSecretTypeException(String message, Throwable cause) {
34 | super(message, cause);
35 | }
36 |
37 | public UnsupportedSecretTypeException(Throwable cause) {
38 | super(cause);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/exception/DashboardServerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | package org.wso2.ei.dashboard.core.exception;
22 |
23 | /**
24 | * RuntimeException to throw when exception/error is caught inside dashboard server.
25 | */
26 | public class DashboardServerException extends RuntimeException {
27 | public DashboardServerException() {
28 | super();
29 | }
30 |
31 | public DashboardServerException(String message) {
32 | super(message);
33 | }
34 |
35 | public DashboardServerException(String message, Throwable cause) {
36 | super(message, cause);
37 | }
38 |
39 | public DashboardServerException(Throwable cause) {
40 | super(cause);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/cmd/impl/hashiCorpVault.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package impl
20 |
21 | import (
22 | "github.com/wso2/product-mi-tooling/cmd/utils"
23 | )
24 |
25 | // UpdateHashiCorpSecretID updates the secretID of the HashiCorp vault configuration in the micro integrator in a given environment
26 | func UpdateHashiCorpSecretID(env, secretID string) (interface{}, error) {
27 | body := `{"secretId":"` + secretID + `"}`
28 | url := utils.GetMIManagementEndpointOfResource(utils.MiManagementExternalVaultsResource, env, utils.MainConfigFilePath) + "/" +
29 | utils.MiManagementExternalVaultHashiCorpResource
30 | return updateHarshiCorpSecret(env, url, body)
31 | }
32 |
33 | func updateHarshiCorpSecret(env, url, body string) (string, error) {
34 | resp, err := invokePOSTRequestWithRetry(env, url, body)
35 | return handleResponse(resp, err, url, "Message", "Error")
36 | }
37 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/LogList.java:
--------------------------------------------------------------------------------
1 | package org.wso2.ei.dashboard.core.rest.model;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import org.wso2.ei.dashboard.core.rest.model.LogListInner;
6 | import javax.validation.constraints.*;
7 | import javax.validation.Valid;
8 |
9 |
10 | import io.swagger.annotations.*;
11 | import java.util.Objects;
12 | import com.fasterxml.jackson.annotation.JsonProperty;
13 |
14 |
15 | public class LogList extends ArrayList {
16 |
17 |
18 | @Override
19 | public boolean equals(java.lang.Object o) {
20 | if (this == o) {
21 | return true;
22 | }
23 | if (o == null || getClass() != o.getClass()) {
24 | return false;
25 | }
26 | LogList logList = (LogList) o;
27 | return true;
28 | }
29 |
30 | @Override
31 | public int hashCode() {
32 | return Objects.hash();
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | StringBuilder sb = new StringBuilder();
38 | sb.append("class LogList {\n");
39 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
40 | sb.append("}");
41 | return sb.toString();
42 | }
43 |
44 | /**
45 | * Convert the given object to string with each line indented by 4 spaces
46 | * (except the first line).
47 | */
48 | private String toIndentedString(java.lang.Object o) {
49 | if (o == null) {
50 | return "null";
51 | }
52 | return o.toString().replace("\n", "\n ");
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/commons/TypeIcon.js:
--------------------------------------------------------------------------------
1 | import { SvgIcon } from "@material-ui/core";
2 | import { Question } from 'react-bootstrap-icons';
3 |
4 |
5 | export default function TypeIcon (props) {
6 | const { type, className } = props;
7 | switch (type) {
8 | case 'bal':
9 | return
10 |
11 |
12 | case 'mi':
13 | return
14 |
15 |
16 | default:
17 | return
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.ei.dashboard.core/src/main/java/org/wso2/ei/dashboard/core/rest/model/Artifacts.java:
--------------------------------------------------------------------------------
1 | package org.wso2.ei.dashboard.core.rest.model;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import org.wso2.ei.dashboard.core.rest.model.ArtifactsInner;
6 | import javax.validation.constraints.*;
7 | import javax.validation.Valid;
8 |
9 |
10 | import io.swagger.annotations.*;
11 | import java.util.Objects;
12 | import com.fasterxml.jackson.annotation.JsonProperty;
13 |
14 |
15 | public class Artifacts extends ArrayList {
16 |
17 |
18 | @Override
19 | public boolean equals(java.lang.Object o) {
20 | if (this == o) {
21 | return true;
22 | }
23 | if (o == null || getClass() != o.getClass()) {
24 | return false;
25 | }
26 | Artifacts artifacts = (Artifacts) o;
27 | return true;
28 | }
29 |
30 | @Override
31 | public int hashCode() {
32 | return Objects.hash();
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | StringBuilder sb = new StringBuilder();
38 | sb.append("class Artifacts {\n");
39 | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
40 | sb.append("}");
41 | return sb.toString();
42 | }
43 |
44 | /**
45 | * Convert the given object to string with each line indented by 4 spaces
46 | * (except the first line).
47 | */
48 | private String toIndentedString(java.lang.Object o) {
49 | if (o == null) {
50 | return "null";
51 | }
52 | return o.toString().replace("\n", "\n ");
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/home/layout/Content.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import AppBar from '@material-ui/core/AppBar';
4 | import Toolbar from '@material-ui/core/Toolbar';
5 | import Typography from '@material-ui/core/Typography';
6 | import Paper from '@material-ui/core/Paper';
7 | import Grid from '@material-ui/core/Grid';
8 | import Button from '@material-ui/core/Button';
9 | import TextField from '@material-ui/core/TextField';
10 | import Tooltip from '@material-ui/core/Tooltip';
11 | import IconButton from '@material-ui/core/IconButton';
12 | import { withStyles } from '@material-ui/core/styles';
13 | import SearchIcon from '@material-ui/icons/Search';
14 | import RefreshIcon from '@material-ui/icons/Refresh';
15 |
16 | const styles = (theme) => ({
17 | paper: {
18 | maxWidth: 936,
19 | margin: 'auto',
20 | overflow: 'hidden',
21 | },
22 | searchBar: {
23 | borderBottom: '1px solid rgba(0, 0, 0, 0.12)',
24 | },
25 | searchInput: {
26 | fontSize: theme.typography.fontSize,
27 | },
28 | block: {
29 | display: 'block',
30 | },
31 | addUser: {
32 | marginRight: theme.spacing(1),
33 | },
34 | contentWrapper: {
35 | margin: '40px 16px',
36 | },
37 | });
38 |
39 | function Content(props) {
40 | const { classes } = props;
41 |
42 | return (
43 | <>
44 | {props.children}
45 | >
46 | );
47 | }
48 |
49 | Content.propTypes = {
50 | classes: PropTypes.object.isRequired,
51 | };
52 |
53 | export default withStyles(styles)(Content);
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.dashboard.security.user.core/src/main/java/org/wso2/dashboard/security/user/core/UserInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package org.wso2.dashboard.security.user.core;
20 |
21 | /**
22 | * This class is used to store user store configs.
23 | */
24 | public class UserInfo {
25 |
26 | private char[] password;
27 | private boolean isAdmin;
28 |
29 | public UserInfo(char[] password, boolean isAdmin) {
30 | this.password = password;
31 | this.isAdmin = isAdmin;
32 | }
33 |
34 | public char[] getPassword() {
35 | return password;
36 | }
37 |
38 | public void setPassword(char[] password) {
39 | this.password = password;
40 | }
41 |
42 | public boolean isAdmin() {
43 | return isAdmin;
44 | }
45 |
46 | public void setIsAdmin(boolean isAdmin) {
47 | this.isAdmin = isAdmin;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # --------------------------------------------------------------------
2 | # Copyright (c) 2019, WSO2 Inc. (http://wso2.com) All Rights Reserved.
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | # -----------------------------------------------------------------------
16 |
17 | # do not indent (Makefile syntax, not bash)
18 | ifdef CLI_RELEASE_VERSION
19 | # maven release
20 | $(info MVN_RELEASE_VERSION is $(CLI_RELEASE_VERSION))
21 | VERSION=$(CLI_RELEASE_VERSION)
22 | else
23 | endif
24 | # one of these will be set to VERSION in Jenkins Production Environment
25 |
26 |
27 | .PHONY: install-cli
28 | install-cli:
29 | cd cmd && ./build.sh -t mi.go -v ${VERSION} -f
30 |
31 | .PHONY: install-cli-skip-test
32 | install-cli-skip-test:
33 | cd cmd && ./build.sh -t mi.go -v ${VERSION} -f test.skip
34 |
35 | .PHONY: install-cli-local
36 | install-cli-local:
37 | $(eval VERSION := $(shell mvn -q -Dexec.executable=echo -Dexec.args='$${project.version}' --non-recursive exec:exec))
38 | cd encryption-client && mvn clean install
39 | cd cmd && ./build.sh -t mi.go -v ${VERSION} -f
40 |
--------------------------------------------------------------------------------
/cmd/docs/mi_secret_create.md:
--------------------------------------------------------------------------------
1 | ## mi secret create
2 |
3 | Encrypt secrets
4 |
5 | ### Synopsis
6 |
7 | Create secrets based on given arguments
8 |
9 | ```
10 | mi secret create [flags]
11 | ```
12 |
13 | ### Examples
14 |
15 | ```
16 | To encrypt secret and get output on console
17 | mi secret create
18 | To encrypt secret and get output as a .properties file (stored in the security folder in apictl executable directory)
19 | mi secret create -o file
20 | To encrypt secret and get output as a .yaml file (stored in the security folder in apictl executable directory)
21 | mi secret create -o k8
22 | To bulk encrypt secrets defined in a properties file
23 | mi secret create -f
24 | To bulk encrypt secrets defined in a properties file and get a .yaml file (stored in the security folder in apictl executable directory)
25 | mi secret create -o k8 -f
26 | ```
27 |
28 | ### Options
29 |
30 | ```
31 | -c, --cipher string Encryption algorithm (default "RSA/ECB/OAEPWithSHA1AndMGF1Padding")
32 | -f, --from-file string Path to the properties file which contains secrets to be encrypted
33 | -h, --help help for create
34 | -o, --output string Get the output in yaml (k8) or properties (file) format. By default the output is printed to the console (default "console")
35 | ```
36 |
37 | ### Options inherited from parent commands
38 |
39 | ```
40 | -k, --insecure Allow connections to SSL endpoints without certs
41 | --verbose Enable verbose mode
42 | ```
43 |
44 | ### SEE ALSO
45 |
46 | * [mi secret](mi_secret.md) - Manage sensitive information
47 |
48 |
--------------------------------------------------------------------------------
/cmd/impl/endpoint.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package impl
20 |
21 | import (
22 | "github.com/wso2/product-mi-tooling/cmd/utils"
23 | )
24 |
25 | // ActivateEndpoint activates an endpoint deployed in the micro integrator in a given environment
26 | func ActivateEndpoint(env, endpointName string) (interface{}, error) {
27 | return updateEndpointState(env, endpointName, "active")
28 | }
29 |
30 | // DeactivateEndpoint deactivates an endpoint deployed in the micro integrator in a given environment
31 | func DeactivateEndpoint(env, endpointName string) (interface{}, error) {
32 | return updateEndpointState(env, endpointName, "inactive")
33 | }
34 |
35 | func updateEndpointState(env, endpointName, state string) (interface{}, error) {
36 | url := utils.GetMIManagementEndpointOfResource(utils.MiManagementEndpointResource, env, utils.MainConfigFilePath)
37 | return updateArtifactState(url, endpointName, state, env)
38 | }
39 |
--------------------------------------------------------------------------------
/cmd/impl/proxyService.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 LLC. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package impl
20 |
21 | import (
22 | "github.com/wso2/product-mi-tooling/cmd/utils"
23 | )
24 |
25 | // ActivateProxy activates a proxy service deployed in the micro integrator in a given environment
26 | func ActivateProxy(env, proxyName string) (interface{}, error) {
27 | return updateProxySerivceState(env, proxyName, "active")
28 | }
29 |
30 | // DeactivateProxy deactivates a proxy service deployed in the micro integrator in a given environment
31 | func DeactivateProxy(env, proxyName string) (interface{}, error) {
32 | return updateProxySerivceState(env, proxyName, "inactive")
33 | }
34 |
35 | func updateProxySerivceState(env, proxyName, state string) (interface{}, error) {
36 | url := utils.GetMIManagementEndpointOfResource(utils.MiManagementProxyServiceResource, env, utils.MainConfigFilePath)
37 | return updateArtifactState(url, proxyName, state, env)
38 | }
39 |
--------------------------------------------------------------------------------
/cmd/utils/artifactUtils/compositeAppUtils.go:
--------------------------------------------------------------------------------
1 | package artifactUtils
2 |
3 | type CompositeAppList struct {
4 | ActiveCount int32 `json:"activeCount"`
5 | ActiveCompositeApps []CompositeAppSummary `json:"activeList"`
6 | FaultyCount int32 `json:"faultyCount"`
7 | FaultyCompositeApps []CompositeAppSummary `json:"faultyList"`
8 | TotalCount int32 `json:"totalCount"`
9 | }
10 |
11 | type CompositeAppSummary struct {
12 | Name string `json:"name"`
13 | Version string `json:"version"`
14 | }
15 |
16 | type CompositeApp struct {
17 | Name string `json:"name"`
18 | Version string `json:"version"`
19 | Artifacts []Artifact `json:"artifacts"`
20 | }
21 |
22 | type Artifact struct {
23 | Name string `json:"name"`
24 | Type string `json:"type"`
25 | }
26 |
27 | func (compositeApps *CompositeAppList) GetDataIterator() <-chan []string {
28 | ch := make(chan []string)
29 |
30 | go func() {
31 | ch <- []string{"\n----------------------\nActive Composite Apps:\n----------------------"}
32 | for _, compositeApp := range compositeApps.ActiveCompositeApps {
33 | ch <- []string{compositeApp.Name, compositeApp.Version}
34 | }
35 | ch <- []string{"\n----------------------\nFaulty Composite Apps:\n----------------------"}
36 | for _, compositeApp := range compositeApps.FaultyCompositeApps {
37 | ch <- []string{compositeApp.Name, compositeApp.Version}
38 | }
39 | close(ch)
40 | }()
41 |
42 | return ch
43 | }
44 |
45 | func (compositeApps *CompositeAppList) GetCount() int32 {
46 | return compositeApps.TotalCount
47 | }
48 |
--------------------------------------------------------------------------------
/monitoring-dashboard/components/org.wso2.micro.integrator.dashboard.web/web-app/src/pages/nodes/Nodes.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | *
18 | *
19 | */
20 |
21 | import EnhancedTable from '../../commons/EnhancedTable';
22 | import { currentGroupSelector } from '../../redux/Actions';
23 | import { useSelector } from 'react-redux';
24 | import React, {useEffect, useState} from 'react';
25 |
26 | export default function Nodes () {
27 | const [pageInfo] = React.useState({
28 | pageId: "nodesPage",
29 | title: "Nodes",
30 | headCells: [
31 | {id: 'node_type', label: 'Type'},
32 | {id: 'node_select', label: 'Select'},
33 | {id: 'nodeId', label: 'Node ID'},
34 | {id: 'node_status', label: 'Status'},
35 | {id: 'role', label: 'Role'}],
36 | tableOrderBy: 'service'
37 | });
38 | return ();
39 | }
40 |
--------------------------------------------------------------------------------
/cmd/integration/connector_test.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
3 | *
4 | * WSO2 Inc. licenses this file to you under the Apache License,
5 | * Version 2.0 (the "License"); you may not use this file except
6 | * in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an
13 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | * KIND, either express or implied. See the License for the
15 | * specific language governing permissions and limitations
16 | * under the License.
17 | */
18 |
19 | package integration
20 |
21 | import (
22 | "testing"
23 |
24 | "github.com/wso2/product-mi-tooling/cmd/integration/testutils"
25 | )
26 |
27 | const connectorCmd = "connectors"
28 |
29 | func TestGetConnectors(t *testing.T) {
30 | testutils.ValidateConnectorList(t, connectorCmd, config)
31 | }
32 |
33 | func TestGetConnectorsWithoutSettingUpEnv(t *testing.T) {
34 | testutils.ExecGetCommandWithoutSettingEnv(t, cAppCmd)
35 | }
36 |
37 | func TestGetConnectorsWithoutLogin(t *testing.T) {
38 | testutils.ExecGetCommandWithoutLogin(t, connectorCmd, config)
39 | }
40 |
41 | func TestGetConnectorsWithoutEnvFlag(t *testing.T) {
42 | testutils.ExecGetCommandWithoutEnvFlag(t, connectorCmd, config)
43 | }
44 |
45 | func TestGetConnectorsWithInvalidArgs(t *testing.T) {
46 | testutils.ExecGetCommandWithInvalidArgCount(t, config, 0, 2, true, connectorCmd, "abc", "123")
47 | }
48 |
--------------------------------------------------------------------------------