├── .gitignore ├── LICENSE ├── README.md ├── doc └── images │ ├── Moss-Logo.png │ └── ddq.png ├── docker-compose ├── .env ├── docker-compose.yml └── moss │ └── mysql │ └── moss-init.sql ├── moss-adapter ├── moss-adapter-cloud │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── de │ │ │ │ └── codecentric │ │ │ │ └── boot │ │ │ │ └── admin │ │ │ │ └── server │ │ │ │ └── cloud │ │ │ │ ├── config │ │ │ │ └── AdminServerDiscoveryAutoConfiguration.java │ │ │ │ └── discovery │ │ │ │ ├── DefaultServiceInstanceConverter.java │ │ │ │ ├── EurekaServiceInstanceConverter.java │ │ │ │ ├── InstanceDiscoveryListener.java │ │ │ │ └── ServiceInstanceConverter.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── additional-spring-configuration-metadata.json │ │ │ └── spring.factories │ │ └── test │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ ├── AdminApplicationDiscoveryTest.java │ │ │ ├── config │ │ │ └── AdminServerDiscoveryAutoConfigurationTest.java │ │ │ └── discovery │ │ │ ├── DefaultServiceInstanceConverterTest.java │ │ │ ├── EurekaServiceInstanceConverterTest.java │ │ │ └── InstanceDiscoveryListenerTest.java │ │ └── resources │ │ └── logback-test.xml ├── moss-adapter-multi-consul │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ ├── discovery │ │ │ ├── DefaultServiceInstanceConverter.java │ │ │ └── ServiceInstanceConverter.java │ │ │ └── extension │ │ │ ├── MossInstanceDiscoveryListener.java │ │ │ ├── MossServerDiscoveryAutoConfiguration.java │ │ │ ├── MultRegisterCenter.java │ │ │ ├── MultRegisterCenterServerMgmtConfig.java │ │ │ └── RegisterCenterRefreshEvent.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── moss-adapter-multi-eureka │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ ├── discovery │ │ │ ├── DefaultServiceInstanceConverter.java │ │ │ ├── EurekaServiceInstanceConverter.java │ │ │ └── ServiceInstanceConverter.java │ │ │ └── extension │ │ │ ├── MossEurekaAutoServiceRegistration.java │ │ │ ├── MossInstanceDiscoveryListener.java │ │ │ ├── MossServerDiscoveryAutoConfiguration.java │ │ │ ├── MultRegisterCenter.java │ │ │ └── MultRegisterCenterServerMgmtConfig.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── moss-adapter-multi-nacos │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ ├── discovery │ │ │ ├── DefaultServiceInstanceConverter.java │ │ │ └── ServiceInstanceConverter.java │ │ │ └── extension │ │ │ ├── MossInstanceDiscoveryListener.java │ │ │ ├── MossNacosAutoServiceRegistration.java │ │ │ ├── MossServerDiscoveryAutoConfiguration.java │ │ │ ├── MultRegisterCenter.java │ │ │ ├── MultRegisterCenterServerMgmtConfig.java │ │ │ └── MultRegisterCenterService.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── moss-adapter-multi-zookeeper │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ ├── discovery │ │ │ ├── DefaultServiceInstanceConverter.java │ │ │ ├── ServiceInstanceConverter.java │ │ │ └── ZookeeperServiceInstanceConverter.java │ │ │ └── extension │ │ │ ├── MossAutoServiceRegistration.java │ │ │ ├── MossInstanceDiscoveryListener.java │ │ │ ├── MossServerDiscoveryAutoConfiguration.java │ │ │ ├── MultRegisterCenter.java │ │ │ ├── MultRegisterCenterServerMgmtConfig.java │ │ │ └── MultRegisterCenterService.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── moss-adapter-single-eureka │ └── pom.xml ├── moss-adapter-single-nacos │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── de │ │ │ └── codecentric │ │ │ └── boot │ │ │ └── admin │ │ │ └── server │ │ │ └── cloud │ │ │ └── extension │ │ │ └── MultRegisterCenterServerMgmtConfig.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── moss-client ├── moss-client-1.x │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── xujin │ │ │ │ └── moss │ │ │ │ └── client │ │ │ │ ├── config │ │ │ │ ├── AdminEndPointConfiguration.java │ │ │ │ ├── AdminEndpointApplicationRunListener.java │ │ │ │ ├── ApplicationContextCustomizer.java │ │ │ │ ├── DiscoveryClientRegistrationInvoker.java │ │ │ │ ├── EnvironmentCustomizer.java │ │ │ │ ├── EurekaClientAutoConfiguartion.java │ │ │ │ ├── ManagementConfig.java │ │ │ │ ├── ManagementEnvironmentCustomizer.java │ │ │ │ ├── MetaDataProvider.java │ │ │ │ └── ZooKeeperClientAutoConfiguartion.java │ │ │ │ ├── endpoint │ │ │ │ ├── AppInfoEndPoint.java │ │ │ │ ├── CacheManagerEndpoint.java │ │ │ │ ├── GCLogEndpoint.java │ │ │ │ ├── JarDependenciesEndpoint.java │ │ │ │ ├── LogFileEndPoint.java │ │ │ │ ├── LogFileRegistry.java │ │ │ │ └── MossMetricsEndpoint.java │ │ │ │ ├── eureka │ │ │ │ └── EurekaAutoRegistrationCustomizer.java │ │ │ │ └── zookeeper │ │ │ │ └── ZooKeeperAutoRegistrationCustomizer.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── moss-client │ │ │ └── bootstrap.properties │ │ │ ├── spring.factories │ │ │ └── spring.provides │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── xujin │ │ │ └── moss │ │ │ └── client │ │ │ └── Application.java │ │ └── resources │ │ └── bootstrap.yml ├── moss-client-2.x │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── xujin │ │ │ │ └── moss │ │ │ │ └── client │ │ │ │ ├── config │ │ │ │ ├── AdminEndPointConfiguration.java │ │ │ │ ├── AdminEndpointApplicationRunListener.java │ │ │ │ ├── ApplicationContextCustomizer.java │ │ │ │ ├── DiscoveryClientRegistrationInvoker.java │ │ │ │ ├── EnvironmentCustomizer.java │ │ │ │ ├── EurekaClientAutoConfiguartion.java │ │ │ │ ├── ManagementConfig.java │ │ │ │ ├── ManagementEnvironmentCustomizer.java │ │ │ │ ├── MetaDataProvider.java │ │ │ │ └── ZooKeeperClientAutoConfiguartion.java │ │ │ │ ├── endpoint │ │ │ │ ├── AppInfoEndPoint.java │ │ │ │ ├── CacheManagerEndpoint.java │ │ │ │ ├── GCLogEndpoint.java │ │ │ │ ├── JarDependenciesEndpoint.java │ │ │ │ ├── LogFileEndPoint.java │ │ │ │ ├── LogFileRegistry.java │ │ │ │ └── MossMetricsEndpoint.java │ │ │ │ ├── eureka │ │ │ │ └── EurekaAutoRegistrationCustomizer.java │ │ │ │ └── zookeeper │ │ │ │ └── ZooKeeperAutoRegistrationCustomizer.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── moss-client │ │ │ └── bootstrap.properties │ │ │ ├── spring.factories │ │ │ └── spring.provides │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── xujin │ │ │ └── moss │ │ │ └── client │ │ │ ├── Application.java │ │ │ ├── BaseTest.java │ │ │ └── endpoint │ │ │ └── GCLogEndpointTest.java │ │ └── resources │ │ └── bootstrap.yml ├── moss-client-common │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── xujin │ │ └── moss │ │ └── client │ │ ├── endpoint │ │ └── dependency │ │ │ ├── MavenSearch.java │ │ │ ├── MavenSearchBuilder.java │ │ │ ├── MySSLSocketFactory.java │ │ │ ├── MyX509TrustManager.java │ │ │ ├── analyzer │ │ │ ├── JarDependencies.java │ │ │ ├── PomDependency.java │ │ │ └── PomInfo.java │ │ │ ├── central │ │ │ ├── DefaultMavenSearch.java │ │ │ ├── DefaultMavenSearchBuilder.java │ │ │ ├── PomDoc.java │ │ │ ├── SearchResponse.java │ │ │ └── SearchResult.java │ │ │ ├── nexus │ │ │ ├── NexusMavenSearch.java │ │ │ ├── NexusMavenSearchBuilder.java │ │ │ ├── NexusPomInfo.java │ │ │ ├── RepoDetail.java │ │ │ ├── ResolveData.java │ │ │ ├── ResolveResult.java │ │ │ ├── ResourceInfo.java │ │ │ ├── ResourceResult.java │ │ │ └── SearchResult.java │ │ │ └── util │ │ │ ├── JsonMapper.java │ │ │ ├── PomUtil.java │ │ │ └── ProcessIdUtil.java │ │ ├── enums │ │ └── ScVersionEnum.java │ │ ├── model │ │ └── HaloMetricResponse.java │ │ └── utils │ │ └── Analyzer.java ├── moss-sample-1.5.x │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── xujin │ │ │ └── moss │ │ │ └── sample │ │ │ ├── Sb15XAppliaction.java │ │ │ ├── controller │ │ │ └── OrderController.java │ │ │ ├── entity │ │ │ └── Order.java │ │ │ ├── model │ │ │ └── OrderModel.java │ │ │ └── service │ │ │ ├── OrderService.java │ │ │ └── impl │ │ │ └── OrderServiceImpl.java │ │ └── resources │ │ ├── config │ │ ├── application.yml │ │ ├── bootstrap-consul.yml │ │ ├── bootstrap-eureka.yml │ │ ├── bootstrap-zookeeper.yml │ │ └── bootstrap.yml │ │ └── logback-spring.xml ├── moss-sample-2.1.x │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── xujin │ │ │ │ └── moss │ │ │ │ └── sample │ │ │ │ ├── AppController.java │ │ │ │ └── Sb2xApplication.java │ │ └── resources │ │ │ ├── config │ │ │ ├── application.yml │ │ │ ├── bootstrap-consul.yml │ │ │ ├── bootstrap-eureka.yml │ │ │ ├── bootstrap-zookeeper.yml │ │ │ └── bootstrap.yml │ │ │ └── logback-spring.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── xujin │ │ └── moss │ │ └── sample │ │ └── SpringCloudAdminWebApplicationTests.java └── pom.xml ├── moss-common ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── xujin │ └── moss │ └── common │ ├── ResultData.java │ ├── domain │ └── PageResult.java │ └── util │ ├── PagingUtils.java │ └── ReactorUtils.java ├── moss-core ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── de │ │ │ └── codecentric │ │ │ │ └── boot │ │ │ │ └── admin │ │ │ │ └── server │ │ │ │ ├── config │ │ │ │ ├── AdminServerAutoConfiguration.java │ │ │ │ ├── AdminServerCloudFoundryAutoConfiguration.java │ │ │ │ ├── AdminServerHazelcastAutoConfiguration.java │ │ │ │ ├── AdminServerMarkerConfiguration.java │ │ │ │ ├── AdminServerNotifierAutoConfiguration.java │ │ │ │ ├── AdminServerProperties.java │ │ │ │ ├── AdminServerWebConfiguration.java │ │ │ │ ├── EnableAdminServer.java │ │ │ │ └── package-info.java │ │ │ │ ├── domain │ │ │ │ ├── entities │ │ │ │ │ ├── EventsourcingInstanceRepository.java │ │ │ │ │ ├── Instance.java │ │ │ │ │ ├── InstanceRepository.java │ │ │ │ │ ├── SnapshottingInstanceRepository.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── events │ │ │ │ │ ├── InstanceDeregisteredEvent.java │ │ │ │ │ ├── InstanceEndpointsDetectedEvent.java │ │ │ │ │ ├── InstanceEvent.java │ │ │ │ │ ├── InstanceInfoChangedEvent.java │ │ │ │ │ ├── InstanceRegisteredEvent.java │ │ │ │ │ ├── InstanceRegistrationUpdatedEvent.java │ │ │ │ │ ├── InstanceStatusChangedEvent.java │ │ │ │ │ └── package-info.java │ │ │ │ └── values │ │ │ │ │ ├── BuildVersion.java │ │ │ │ │ ├── Endpoint.java │ │ │ │ │ ├── Endpoints.java │ │ │ │ │ ├── Info.java │ │ │ │ │ ├── InstanceId.java │ │ │ │ │ ├── Registration.java │ │ │ │ │ ├── StatusInfo.java │ │ │ │ │ ├── Tags.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── eventstore │ │ │ │ ├── ConcurrentMapEventStore.java │ │ │ │ ├── HazelcastEventStore.java │ │ │ │ ├── InMemoryEventStore.java │ │ │ │ ├── InstanceEventPublisher.java │ │ │ │ ├── InstanceEventStore.java │ │ │ │ ├── OptimisticLockingException.java │ │ │ │ └── package-info.java │ │ │ │ ├── notify │ │ │ │ ├── AbstractEventNotifier.java │ │ │ │ ├── AbstractStatusChangeNotifier.java │ │ │ │ ├── CompositeNotifier.java │ │ │ │ ├── DiscordNotifier.java │ │ │ │ ├── HipchatNotifier.java │ │ │ │ ├── LetsChatNotifier.java │ │ │ │ ├── LoggingNotifier.java │ │ │ │ ├── MailNotifier.java │ │ │ │ ├── MicrosoftTeamsNotifier.java │ │ │ │ ├── NotificationTrigger.java │ │ │ │ ├── Notifier.java │ │ │ │ ├── OpsGenieNotifier.java │ │ │ │ ├── PagerdutyNotifier.java │ │ │ │ ├── RemindingNotifier.java │ │ │ │ ├── SlackNotifier.java │ │ │ │ ├── TelegramNotifier.java │ │ │ │ ├── filter │ │ │ │ │ ├── AbstractNotificationFilter.java │ │ │ │ │ ├── ApplicationNameNotificationFilter.java │ │ │ │ │ ├── ExpiringNotificationFilter.java │ │ │ │ │ ├── FilteringNotifier.java │ │ │ │ │ ├── InstanceIdNotificationFilter.java │ │ │ │ │ ├── NotificationFilter.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── web │ │ │ │ │ │ ├── NotificationFilterController.java │ │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ │ ├── services │ │ │ │ ├── AbstractEventHandler.java │ │ │ │ ├── CloudFoundryInstanceIdGenerator.java │ │ │ │ ├── EndpointDetectionTrigger.java │ │ │ │ ├── EndpointDetector.java │ │ │ │ ├── HashingInstanceUrlIdGenerator.java │ │ │ │ ├── HostPortPidInstanceIdGenerator.java │ │ │ │ ├── InfoUpdateTrigger.java │ │ │ │ ├── InfoUpdater.java │ │ │ │ ├── InstanceIdGenerator.java │ │ │ │ ├── InstanceRegistry.java │ │ │ │ ├── StatusUpdateTrigger.java │ │ │ │ ├── StatusUpdater.java │ │ │ │ ├── endpoints │ │ │ │ │ ├── ChainingStrategy.java │ │ │ │ │ ├── EndpointDetectionStrategy.java │ │ │ │ │ ├── ProbeEndpointsStrategy.java │ │ │ │ │ ├── QueryIndexEndpointStrategy.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ │ ├── utils │ │ │ │ ├── MediaType.java │ │ │ │ ├── jackson │ │ │ │ │ ├── RegistrationBeanSerializerModifier.java │ │ │ │ │ ├── RegistrationDeserializer.java │ │ │ │ │ ├── SanitizingMapSerializer.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ │ └── web │ │ │ │ ├── AbstractInstancesProxyController.java │ │ │ │ ├── AdminController.java │ │ │ │ ├── ApplicationsController.java │ │ │ │ ├── InstancesController.java │ │ │ │ ├── PathUtils.java │ │ │ │ ├── client │ │ │ │ ├── BasicAuthHttpHeaderProvider.java │ │ │ │ ├── CloudFoundryHttpHeaderProvider.java │ │ │ │ ├── CompositeHttpHeadersProvider.java │ │ │ │ ├── HttpHeadersProvider.java │ │ │ │ ├── InstanceExchangeFilterFunction.java │ │ │ │ ├── InstanceExchangeFilterFunctions.java │ │ │ │ ├── InstanceWebClient.java │ │ │ │ ├── LegacyEndpointConverter.java │ │ │ │ ├── LegacyEndpointConverters.java │ │ │ │ ├── exception │ │ │ │ │ ├── InstanceWebClientException.java │ │ │ │ │ ├── ResolveEndpointException.java │ │ │ │ │ ├── ResolveInstanceException.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ ├── reactive │ │ │ │ ├── AdminControllerHandlerMapping.java │ │ │ │ ├── InstancesProxyController.java │ │ │ │ └── package-info.java │ │ │ │ └── servlet │ │ │ │ ├── AdminControllerHandlerMapping.java │ │ │ │ ├── InstancesProxyController.java │ │ │ │ └── package-info.java │ │ └── org │ │ │ ├── moss │ │ │ └── registry │ │ │ │ └── adapter │ │ │ │ ├── DiscoveryRegistryManager.java │ │ │ │ └── MultRegisterCenterService.java │ │ │ └── xujin │ │ │ └── moss │ │ │ └── core │ │ │ └── extension │ │ │ └── MossInstancesProxyController.java │ └── resources │ │ └── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ ├── spring-boot-admin-server │ │ └── mail │ │ │ └── status-changed.html │ │ └── spring.factories │ └── test │ ├── java │ └── de │ │ └── codecentric │ │ └── boot │ │ └── admin │ │ └── server │ │ ├── AbstractAdminApplicationTest.java │ │ ├── AdminApplicationHazelcastTest.java │ │ ├── AdminReactiveApplicationTest.java │ │ ├── AdminServletApplicationTest.java │ │ ├── config │ │ ├── AdminServerAutoConfigurationTest.java │ │ ├── AdminServerCloudFoundryAutoConfigurationTest.java │ │ └── AdminServerNotifierAutoConfigurationTest.java │ │ ├── domain │ │ ├── entities │ │ │ ├── AbstractInstanceRepositoryTest.java │ │ │ ├── EventsourcingInstanceRepositoryTest.java │ │ │ ├── InstanceTest.java │ │ │ └── SnapshottingInstanceRepositoryTest.java │ │ └── values │ │ │ ├── BuildVersionTest.java │ │ │ ├── EndpointTest.java │ │ │ ├── EndpointsTest.java │ │ │ ├── InfoTest.java │ │ │ ├── InstanceIdTest.java │ │ │ ├── RegistrationTest.java │ │ │ ├── StatusInfoTest.java │ │ │ └── TagsTest.java │ │ ├── eventstore │ │ ├── AbstractEventStoreTest.java │ │ ├── HazelcastEventStoreTest.java │ │ └── InMemoryEventStoreTest.java │ │ ├── notify │ │ ├── CompositeNotifierTest.java │ │ ├── DiscordNotifierTest.java │ │ ├── HipchatNotifierTest.java │ │ ├── LetsChatNotifierTest.java │ │ ├── MailNotifierTest.java │ │ ├── MicrosoftTeamsNotifierTest.java │ │ ├── NotificationTriggerTest.java │ │ ├── OpsGenieNotifierTest.java │ │ ├── PagerdutyNotifierTest.java │ │ ├── RemindingNotifierTest.java │ │ ├── SlackNotifierTest.java │ │ ├── TelegramNotifierTest.java │ │ ├── TestNotifier.java │ │ └── filter │ │ │ ├── FilteringNotifierTest.java │ │ │ ├── InstanceIdNotificationFilterTest.java │ │ │ ├── InstanceNameNotificationFilterTest.java │ │ │ └── web │ │ │ └── NotificationFilterControllerTest.java │ │ ├── services │ │ ├── AbstractEventHandlerTest.java │ │ ├── CloudFoundryInstanceIdGeneratorTest.java │ │ ├── EndpointDetectionTriggerTest.java │ │ ├── EndpointDetectorTest.java │ │ ├── InfoUpdateTriggerTest.java │ │ ├── InfoUpdaterTest.java │ │ ├── InstanceRegistryTest.java │ │ ├── StatusUpdateTriggerTest.java │ │ ├── StatusUpdaterTest.java │ │ └── endpoints │ │ │ ├── ChainingStrategyTest.java │ │ │ ├── ProbeEndpointsStrategyTest.java │ │ │ └── QueryIndexEndpointStrategyTest.java │ │ ├── utils │ │ └── jackson │ │ │ └── RegistrationDeserializerTest.java │ │ └── web │ │ ├── AbstractInstancesProxyControllerIntegrationTest.java │ │ ├── InstancesControllerIntegrationTest.java │ │ ├── PathUtilsTest.java │ │ ├── client │ │ ├── BasicAuthHttpHeaderProviderTest.java │ │ ├── CloudFoundryHttpHeaderProviderTest.java │ │ ├── CompositeHttpHeadersProviderTest.java │ │ ├── InstanceExchangeFilterFunctionsTest.java │ │ ├── InstanceWebClientTest.java │ │ └── LegacyEndpointConvertersTest.java │ │ ├── reactive │ │ └── InstancesProxyControllerIntegrationTest.java │ │ └── servlet │ │ └── InstancesProxyControllerIntegrationTest.java │ └── resources │ ├── application.yml │ ├── de │ └── codecentric │ │ └── boot │ │ └── admin │ │ └── server │ │ ├── notify │ │ ├── custom-mail.html │ │ ├── expected-custom-mail │ │ └── expected-default-mail │ │ └── web │ │ └── client │ │ ├── env-expected.json │ │ ├── env-legacy.json │ │ ├── flyway-expected.json │ │ ├── flyway-legacy.json │ │ ├── health-expected.json │ │ ├── health-legacy.json │ │ ├── httptrace-expected.json │ │ ├── httptrace-legacy.json │ │ ├── liquibase-expected.json │ │ ├── liquibase-legacy.json │ │ ├── threaddump-expected.json │ │ └── threaddump-legacy.json │ └── logback-test.xml ├── moss-extension ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── xujin │ └── moss │ ├── controller │ ├── AppController.java │ ├── BaseController.java │ ├── DashboardController.java │ ├── DictController.java │ ├── LoginController.java │ ├── MenuController.java │ ├── MetaDataController.java │ ├── ProjectController.java │ ├── RegisterCenterController.java │ ├── UserController.java │ ├── UserRoleController.java │ └── extension │ │ ├── ApplicationController.java │ │ └── InstanceController.java │ ├── model │ ├── AppTakeoverModel.java │ ├── DOMSelectModel.java │ ├── DOMSelectOptionsModel.java │ ├── MossApplication.java │ └── MossInstance.java │ └── security │ ├── jwt │ ├── JwtFilter.java │ ├── JwtToken.java │ ├── JwtUtil.java │ └── ResourceCheckFilter.java │ └── shiro │ ├── DBRealm.java │ └── LdapRealm.java ├── moss-service-api ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── xujin │ └── moss │ ├── base │ └── BaseModel.java │ ├── constant │ └── Constants.java │ ├── exception │ └── ApplicationException.java │ ├── model │ ├── AppModel.java │ ├── DictDataModel.java │ ├── DictTypeModel.java │ ├── MenuModel.java │ ├── MetaDataModel.java │ ├── ProjectModel.java │ ├── RegisterCenterModel.java │ ├── UserAppModel.java │ ├── UserModel.java │ └── UserRoleModel.java │ ├── request │ ├── AppMqTraceRequest.java │ ├── AppPageRequest.java │ ├── DictTypeListRequest.java │ ├── ProjectByPageRequest.java │ ├── RegisterCenterPageRequest.java │ └── UserPageListRequest.java │ ├── service │ ├── AppService.java │ ├── CommonService.java │ ├── DictService.java │ ├── MenuService.java │ ├── ProjectService.java │ ├── RegisterCenterService.java │ ├── UserAppService.java │ ├── UserRolesService.java │ └── UserService.java │ └── vo │ ├── BasicDashboardVO.java │ ├── DictTypeListVO.java │ ├── MenuVO.java │ ├── SubMenuVO.java │ └── UserVO.java ├── moss-service ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── xujin │ └── moss │ ├── autoconfigure │ └── MossServerAutoConfiguration.java │ ├── entity │ ├── App.java │ ├── BaseEntity.java │ ├── DictData.java │ ├── DictType.java │ ├── Menu.java │ ├── Project.java │ ├── RegisterCenter.java │ ├── User.java │ ├── UserApp.java │ └── UserRoles.java │ ├── enums │ ├── AppStatusEnum.java │ └── AppTakeOverEnum.java │ ├── mapper │ ├── AppMapper.java │ ├── DictDataMapper.java │ ├── DictTypeMapper.java │ ├── MenuMapper.java │ ├── ProjectMapper.java │ ├── RegisterCenterMapper.java │ ├── UserAppMapper.java │ ├── UserMapper.java │ └── UserRolesMapper.java │ ├── model │ ├── ReportModel.java │ └── trace │ │ ├── Application.java │ │ ├── ApplicationsData.java │ │ ├── ApplicationsResult.java │ │ ├── Call.java │ │ ├── ClusterTopology.java │ │ ├── Duration.java │ │ ├── Node.java │ │ ├── RequestPayload.java │ │ ├── TopologyData.java │ │ ├── TopologyResult.java │ │ └── Variables.java │ ├── service │ └── impl │ │ ├── AppServiceImpl.java │ │ ├── CommonServiceImpl.java │ │ ├── DictServiceImpl.java │ │ ├── MenuServiceImpl.java │ │ ├── ProjectServiceImpl.java │ │ ├── RegisterCenterServiceImpl.java │ │ ├── SwitchMultEurekaServiceImpl.java │ │ ├── UserAppServiceImpl.java │ │ ├── UserRolesServiceImpl.java │ │ └── UserServiceImpl.java │ └── utils │ ├── BeanMapper.java │ ├── HttpClientUtils.java │ ├── MD5.java │ ├── MenuUtil.java │ └── ServerConfig.java ├── moss-ui ├── .editorconfig ├── .env ├── .eslintrc ├── .prettierignore ├── .prettierrc ├── .umirc.dev.js ├── .umirc.js ├── .umirc.prod.js ├── README.md ├── dist.zip ├── mock │ ├── .gitkeep │ └── index.ts ├── package-lock.json ├── package.json ├── script.js ├── src │ ├── app.ts │ ├── assets │ │ ├── .gitkeep │ │ ├── bg.png │ │ ├── default-avatar.png │ │ ├── delIcon.jpg │ │ ├── favicon.ico │ │ ├── icon-spring-framework.svg │ │ ├── logo.png │ │ ├── servermap │ │ │ ├── ACTIVEMQ_CLIENT.png │ │ │ ├── ACTIVEMQ_CLIENT_GROUP.png │ │ │ ├── APACHE.png │ │ │ ├── ARCUS.png │ │ │ ├── BACKEND.png │ │ │ ├── BLOC.png │ │ │ ├── CASSANDRA.png │ │ │ ├── CLIENT.png │ │ │ ├── CUBRID.png │ │ │ ├── CUBRID_GROUP.png │ │ │ ├── DATABASE.png │ │ │ ├── DUBBO_PROVIDER.png │ │ │ ├── DUBBO_PROVIDER_GROUP.png │ │ │ ├── ETC.png │ │ │ ├── ElasticJob.png │ │ │ ├── FILTER.png │ │ │ ├── GRPC.png │ │ │ ├── GRPC.svg │ │ │ ├── HTTPCLIENT.png │ │ │ ├── JBOSS.png │ │ │ ├── JETTY.png │ │ │ ├── MARIADB.png │ │ │ ├── MARIADB_GROUP.png │ │ │ ├── MEMCACHED.png │ │ │ ├── MONGODB.png │ │ │ ├── MONGODB_GROUP.png │ │ │ ├── MSSQLSERVER.png │ │ │ ├── MSSQLSERVER_GROUP.png │ │ │ ├── MYSQL.png │ │ │ ├── MYSQL_GROUP.png │ │ │ ├── NBASE.png │ │ │ ├── NBASE_ARC.png │ │ │ ├── NBASE_ARC_GROUP.png │ │ │ ├── NBASE_T.png │ │ │ ├── NGINX.png │ │ │ ├── ORACLE.png │ │ │ ├── ORACLE_GROUP.png │ │ │ ├── POSTGRESQL.png │ │ │ ├── POSTGRESQL_GROUP.png │ │ │ ├── QUEUE.png │ │ │ ├── REDIS.png │ │ │ ├── RESIN.png │ │ │ ├── RESIN_GROUP.png │ │ │ ├── SPRING_BOOT.png │ │ │ ├── STAND_ALONE.png │ │ │ ├── ShardingJDBC.png │ │ │ ├── TOMCAT.png │ │ │ ├── UNAUTHORIZED.png │ │ │ ├── UNDEFINED.png │ │ │ ├── UNKNOWN.png │ │ │ ├── UNKNOWN_CLOUD.png │ │ │ ├── USER.png │ │ │ ├── USER1.png │ │ │ ├── VERTX.png │ │ │ ├── database@2x.png │ │ │ ├── http@2x.png │ │ │ ├── http_.png │ │ │ ├── httpcomponents.png │ │ │ ├── kafka.png │ │ │ ├── kafka.svg │ │ │ ├── ng.png │ │ │ ├── sq.png │ │ │ ├── struts2.svg │ │ │ ├── www(1).png │ │ │ └── www.png │ │ └── warning.gif │ ├── components │ │ ├── ApplicationCard │ │ │ ├── Chart.tsx │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── BreadCrumb │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── Empty │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── Exception │ │ │ ├── index.less │ │ │ ├── index.tsx │ │ │ └── typeConfig.ts │ │ ├── FormGenerator │ │ │ ├── Control │ │ │ │ ├── CheckBox.tsx │ │ │ │ ├── Radio.tsx │ │ │ │ ├── RangePicker.tsx │ │ │ │ ├── Select.tsx │ │ │ │ ├── Transfer.tsx │ │ │ │ └── index.ts │ │ │ ├── Field.tsx │ │ │ ├── Fieldset.tsx │ │ │ ├── import.tsx │ │ │ └── index.tsx │ │ ├── Header │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── PageGenerator │ │ │ ├── ControllerBar.tsx │ │ │ ├── ListPage.tsx │ │ │ ├── SearchBar.tsx │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── PageTitle │ │ │ └── index.tsx │ │ ├── SearchBar │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── SelectNode │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── ServiceCard │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── Sider │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── StateFul │ │ │ └── index.tsx │ │ ├── Tabs │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── appTbs │ │ │ └── index.tsx │ │ ├── appTopo │ │ │ └── index.tsx │ │ ├── notification │ │ │ ├── dialog.tsx │ │ │ ├── index.tsx │ │ │ ├── loading.tsx │ │ │ ├── notice.tsx │ │ │ └── style.less │ │ ├── util.ts │ │ └── withAuth │ │ │ └── index.tsx │ ├── global.less │ ├── global.ts │ ├── layouts │ │ ├── __tests__ │ │ │ └── index.test.tsx │ │ ├── index.less │ │ └── index.tsx │ ├── models │ │ ├── .gitkeep │ │ ├── application │ │ │ ├── initialState.ts │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── dashboard │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── global │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── login │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── menu │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── notification │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── selectNode │ │ │ ├── initialState.ts │ │ │ ├── model.ts │ │ │ └── service.ts │ │ ├── tab │ │ │ ├── model.ts │ │ │ └── service.ts │ │ └── user │ │ │ ├── model.ts │ │ │ └── service.ts │ ├── pages │ │ ├── .umi │ │ │ ├── DvaContainer.js │ │ │ ├── LocaleWrapper.jsx │ │ │ ├── TitleWrapper.jsx │ │ │ ├── initDva.js │ │ │ ├── initHistory.js │ │ │ ├── polyfills.js │ │ │ ├── router.js │ │ │ └── umi.js │ │ ├── Admin │ │ │ ├── Pages │ │ │ │ ├── Application │ │ │ │ │ ├── AppSearch.tsx │ │ │ │ │ ├── CallTrace.tsx │ │ │ │ │ ├── CreateProject.tsx │ │ │ │ │ ├── CreateRegisterCenter.tsx │ │ │ │ │ ├── CreateUser.tsx │ │ │ │ │ ├── Detail.tsx │ │ │ │ │ ├── EnvironConfig.tsx │ │ │ │ │ ├── EventLog.tsx │ │ │ │ │ ├── GCLog.tsx │ │ │ │ │ ├── JMX.tsx │ │ │ │ │ ├── JVM.tsx │ │ │ │ │ ├── Jar.tsx │ │ │ │ │ ├── List.tsx │ │ │ │ │ ├── Log.tsx │ │ │ │ │ ├── LogDel.tsx │ │ │ │ │ ├── Project.tsx │ │ │ │ │ ├── RemoteConfig.tsx │ │ │ │ │ ├── Service.tsx │ │ │ │ │ ├── Thread.tsx │ │ │ │ │ ├── Trace.tsx │ │ │ │ │ ├── Trajectory.tsx │ │ │ │ │ ├── UserMgmt.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── registerCenterMgmt.tsx │ │ │ │ │ └── style.less │ │ │ │ ├── CodeGenerate │ │ │ │ │ ├── data.ts │ │ │ │ │ └── index.tsx │ │ │ │ ├── Dashboard.tsx │ │ │ │ ├── OSManage │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── menuEdit.tsx │ │ │ │ │ ├── menuEditData.ts │ │ │ │ │ ├── menuManage.tsx │ │ │ │ │ ├── menuNew.tsx │ │ │ │ │ ├── menuNewData.ts │ │ │ │ │ └── modifyExample │ │ │ │ │ │ ├── data.ts │ │ │ │ │ │ └── index.tsx │ │ │ │ ├── SwitchCenter │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── switchManage.tsx │ │ │ │ │ └── switchPushLog.tsx │ │ │ │ ├── dashboard.less │ │ │ │ ├── index.ts │ │ │ │ └── style.less │ │ │ ├── Stage.tsx │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── App.tsx │ │ ├── Login │ │ │ ├── index.tsx │ │ │ └── style.less │ │ ├── __tests__ │ │ │ ├── __mocks__ │ │ │ │ └── umi-plugin-locale.ts │ │ │ └── index.test.tsx │ │ ├── document.ejs │ │ └── index.tsx │ ├── style │ │ ├── antDesignOverride.less │ │ ├── constants.less │ │ ├── form.less │ │ ├── icon │ │ │ ├── icon.less │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── index.less │ │ ├── masonry.less │ │ └── util.less │ └── util │ │ ├── common.ts │ │ ├── commonTableRender.ts │ │ ├── eventbus.ts │ │ ├── fetch.ts │ │ ├── g2CustomShapes.ts │ │ ├── index.ts │ │ ├── store.ts │ │ ├── timestamp.ts │ │ └── validator.ts ├── stylelint.config.js ├── tsconfig.json ├── tslint.json └── typings.d.ts ├── moss-web ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── org │ │ └── xujin │ │ └── moss │ │ ├── MossApplication.java │ │ ├── config │ │ ├── ShiroAuthConfig.java │ │ ├── StaticWebMvcConfiguration.java │ │ └── Swagger2Config.java │ │ └── filter │ │ └── CorsFilter.java │ └── resources │ ├── META-INF │ └── spring-configuration-metadata.json │ ├── banner.txt │ ├── config │ ├── application-consul.yml │ ├── application-eureka.yml │ ├── application-h2.yml │ ├── application-mysql.yml │ ├── application-nacos.yml │ ├── application-zookeeper.yml │ ├── application.properties │ ├── application.yml │ └── readme.md │ ├── db │ ├── h2 │ │ └── moss-init.sql │ └── mysql │ │ └── moss-init.sql │ ├── logback-spring.xml │ └── static │ ├── index.html │ ├── static │ ├── MYSQL.15a5498c.png │ ├── delIcon.8939d775.jpg │ ├── kafka.bd032ad8.png │ └── warning.f07d2bc9.gif │ ├── umi.css │ └── umi.js └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | target 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | moss-ui/node_modules/ 20 | logs 21 | 22 | ### BUILD ### 23 | nbproject/private/ 24 | build/ 25 | nbbuild/ 26 | dist/ 27 | nbdist/ 28 | bin/ 29 | out/ 30 | .DS_Store 31 | /*/target 32 | target 33 | 34 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 35 | 36 | # dependencies 37 | moss-ui/node_modules 38 | moss-ui/npm-debug.log* 39 | moss-ui/yarn-error.log 40 | moss-uiyarn.lock 41 | moss-ui/package-lock.json 42 | 43 | # production 44 | moss-ui/dist 45 | dist.zip 46 | 47 | # misc 48 | .DS_Store 49 | 50 | # umi 51 | .umi 52 | .umi-production 53 | -------------------------------------------------------------------------------- /doc/images/Moss-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/doc/images/Moss-Logo.png -------------------------------------------------------------------------------- /doc/images/ddq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/doc/images/ddq.png -------------------------------------------------------------------------------- /docker-compose/.env: -------------------------------------------------------------------------------- 1 | ## docker-compose环境变量 2 | 3 | ### MOSS 4 | MOSS_DB_TYPE=mysql 5 | MOSS_PORT=8086 6 | MOSS_SKYWALKING_HOST=localhost 7 | MOSS_SKYWALKING_PORT=12800 8 | 9 | ### 数据源mysql实例 10 | DATASOURCE_HOST=moss-db 11 | DATASOURCE_PORT=3306 12 | DATASOURCE_USERNAME=root 13 | DATASOURCE_PASSWORD=root123 14 | DATASOURCE_DRIVER=com.mysql.jdbc.Driver 15 | -------------------------------------------------------------------------------- /docker-compose/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | #MOSS Mysql数据库 4 | moss-db: 5 | image: mysql:5.7 6 | container_name: moss-db 7 | restart: always 8 | networks: 9 | - sc-net 10 | ports: 11 | - 3306:3306 12 | volumes: 13 | - ./moss/mysql:/docker-entrypoint-initdb.d 14 | - ./data/mysql:/var/lib/mysql 15 | environment: 16 | TZ: Asia/Shanghai 17 | MYSQL_ROOT_PASSWORD: root123 18 | 19 | #Moss管理中心 20 | moss: 21 | image: xujin/moss-web:latest 22 | container_name: moss 23 | restart: always 24 | networks: 25 | - sc-net 26 | ports: 27 | - 8086:8086 28 | env_file: .env 29 | environment: 30 | TZ: Asia/Shanghai 31 | depends_on: 32 | - moss-db 33 | 34 | networks: 35 | sc-net: 36 | external: false -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-cloud/src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | ], 4 | "properties": [ 5 | { 6 | "name": "spring.boot.admin.discovery.enabled", 7 | "type": "java.lang.Boolean", 8 | "description": "Enable Spring Cloud Discovery support.", 9 | "defaultValue": "true" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-cloud/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration 3 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-cloud/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-consul/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/ServiceInstanceConverter.java: -------------------------------------------------------------------------------- 1 | package de.codecentric.boot.admin.server.cloud.discovery; 2 | 3 | 4 | import de.codecentric.boot.admin.server.domain.entities.Instance; 5 | import de.codecentric.boot.admin.server.domain.values.Registration; 6 | import org.springframework.cloud.client.ServiceInstance; 7 | 8 | /** 9 | * Converts {@link ServiceInstance}s to {@link Instance}s. 10 | * 11 | * @author Johannes Edmeier 12 | */ 13 | public interface ServiceInstanceConverter { 14 | 15 | /** 16 | * Converts a service instance to a application instance to be registered. 17 | * 18 | * @param instance the service instance. 19 | * @return Instance 20 | */ 21 | Registration convert(ServiceInstance instance); 22 | } 23 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-consul/src/main/java/de/codecentric/boot/admin/server/cloud/extension/RegisterCenterRefreshEvent.java: -------------------------------------------------------------------------------- 1 | package de.codecentric.boot.admin.server.cloud.extension; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | 5 | /** 6 | * @author yangfan 7 | * @date 2019/09/03 8 | */ 9 | public class RegisterCenterRefreshEvent extends ApplicationEvent { 10 | 11 | public RegisterCenterRefreshEvent(Object source) { 12 | super(source); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-consul/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.cloud.extension.MossServerDiscoveryAutoConfiguration 3 | 4 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-eureka/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/ServiceInstanceConverter.java: -------------------------------------------------------------------------------- 1 | package de.codecentric.boot.admin.server.cloud.discovery; 2 | 3 | 4 | import de.codecentric.boot.admin.server.domain.entities.Instance; 5 | import de.codecentric.boot.admin.server.domain.values.Registration; 6 | 7 | import org.springframework.cloud.client.ServiceInstance; 8 | 9 | /** 10 | * Converts {@link ServiceInstance}s to {@link Instance}s. 11 | * 12 | * @author Johannes Edmeier 13 | */ 14 | public interface ServiceInstanceConverter { 15 | 16 | /** 17 | * Converts a service instance to a application instance to be registered. 18 | * 19 | * @param instance the service instance. 20 | * @return Instance 21 | */ 22 | Registration convert(ServiceInstance instance); 23 | } 24 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-eureka/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.cloud.extension.MossServerDiscoveryAutoConfiguration 3 | 4 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-nacos/src/main/java/de/codecentric/boot/admin/server/cloud/extension/MultRegisterCenterService.java: -------------------------------------------------------------------------------- 1 | package de.codecentric.boot.admin.server.cloud.extension; 2 | 3 | import java.util.Map; 4 | 5 | public interface MultRegisterCenterService { 6 | 7 | /** 8 | * 获取所有注册中心的URL 9 | * @return 10 | */ 11 | Map getRegisterCenterList(); 12 | 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-nacos/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.cloud.extension.MossServerDiscoveryAutoConfiguration,\ 3 | de.codecentric.boot.admin.server.cloud.extension.MultRegisterCenterServerMgmtConfig 4 | 5 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-zookeeper/src/main/java/de/codecentric/boot/admin/server/cloud/discovery/ServiceInstanceConverter.java: -------------------------------------------------------------------------------- 1 | package de.codecentric.boot.admin.server.cloud.discovery; 2 | 3 | 4 | import de.codecentric.boot.admin.server.domain.entities.Instance; 5 | import de.codecentric.boot.admin.server.domain.values.Registration; 6 | 7 | import org.springframework.cloud.client.ServiceInstance; 8 | 9 | /** 10 | * Converts {@link ServiceInstance}s to {@link Instance}s. 11 | * 12 | * @author Johannes Edmeier 13 | */ 14 | public interface ServiceInstanceConverter { 15 | 16 | /** 17 | * Converts a service instance to a application instance to be registered. 18 | * 19 | * @param instance the service instance. 20 | * @return Instance 21 | */ 22 | Registration convert(ServiceInstance instance); 23 | } 24 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-zookeeper/src/main/java/de/codecentric/boot/admin/server/cloud/extension/MultRegisterCenterService.java: -------------------------------------------------------------------------------- 1 | //package de.codecentric.boot.admin.server.cloud.extension; 2 | // 3 | //import java.util.Map; 4 | // 5 | //public interface MultRegisterCenterService { 6 | // 7 | // /** 8 | // * 获取所有注册中心的URL 9 | // * @return 10 | // */ 11 | // Map getRegisterCenterList(); 12 | // 13 | // 14 | // 15 | //} 16 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-multi-zookeeper/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.cloud.extension.MossServerDiscoveryAutoConfiguration 3 | 4 | -------------------------------------------------------------------------------- /moss-adapter/moss-adapter-single-nacos/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=de.codecentric.boot.admin.server.cloud.extension.MultRegisterCenterServerMgmtConfig 2 | 3 | -------------------------------------------------------------------------------- /moss-adapter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | org.xujin.moss 7 | moss 8 | 1.0.0.RELEASE 9 | 10 | 4.0.0 11 | org.xujin.moss 12 | moss-adapter 13 | 1.0.0.RELEASE 14 | pom 15 | 16 | moss-adapter-single-eureka 17 | moss-adapter-single-nacos 18 | moss-adapter-multi-eureka 19 | moss-adapter-multi-consul 20 | moss-adapter-multi-zookeeper 21 | moss-adapter-cloud 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/java/org/xujin/moss/client/config/ApplicationContextCustomizer.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.context.ConfigurableApplicationContext; 4 | 5 | public interface ApplicationContextCustomizer { 6 | void customize(T t); 7 | } 8 | -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/java/org/xujin/moss/client/config/EnvironmentCustomizer.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.core.env.Environment; 4 | 5 | public interface EnvironmentCustomizer { 6 | void customize(T t); 7 | } 8 | -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/java/org/xujin/moss/client/config/EurekaClientAutoConfiguartion.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; 4 | import org.springframework.context.annotation.Bean; 5 | import org.xujin.moss.client.eureka.EurekaAutoRegistrationCustomizer; 6 | 7 | @ConditionalOnBean(name = "org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean") 8 | public class EurekaClientAutoConfiguartion { 9 | @Bean 10 | public EurekaAutoRegistrationCustomizer eurekaAutoRegistrationCustomizer() { 11 | return new EurekaAutoRegistrationCustomizer(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/java/org/xujin/moss/client/config/ManagementConfig.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.boot.actuate.autoconfigure.ManagementContextConfiguration; 4 | import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; 5 | 6 | /** 7 | * @Author: xujin 8 | **/ 9 | @ManagementContextConfiguration 10 | @ConditionalOnWebApplication 11 | public class ManagementConfig { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/resources/META-INF/moss-client/bootstrap.properties: -------------------------------------------------------------------------------- 1 | spring.cloud.zookeeper.discovery.root=/moss-client 2 | management.info.git.mode=full 3 | management.port=8081 4 | management.context-path=/actuator 5 | management.security.enabled=false 6 | endpoints.actuator.enabled=true 7 | endpoints.actuator.sensitive=false 8 | endpoints.metrics.enabled=true 9 | endpoints.mappings.enabled=true 10 | endpoints.restart.enabled=false 11 | endpoints.shutdown.enabled=false 12 | endpoints.heapdump.enabled=false 13 | endpoints.pause.enabled=false 14 | endpoints.resume.enabled=false 15 | endpoints.refresh.enabled=false 16 | endpoints.sensitive=false 17 | endpoints.hypermedia.enabled=true -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | org.xujin.moss.client.config.AdminEndPointConfiguration,\ 3 | org.xujin.moss.client.config.EurekaClientAutoConfiguartion,\ 4 | org.xujin.moss.client.config.ZooKeeperClientAutoConfiguartion 5 | org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration=\ 6 | org.xujin.moss.client.config.ManagementConfig 7 | org.springframework.boot.SpringApplicationRunListener=\ 8 | org.xujin.moss.client.config.AdminEndpointApplicationRunListener 9 | org.xujin.moss.client.config.EnvironmentCustomizer=\ 10 | org.xujin.moss.client.config.ManagementEnvironmentCustomizer -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/main/resources/META-INF/spring.provides: -------------------------------------------------------------------------------- 1 | provides: moss-client-1.x-starter -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/test/java/org/xujin/moss/client/Application.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | @SpringBootApplication 9 | @RestController 10 | public class Application { 11 | public static void main(String[] args) { 12 | SpringApplication.run( Application.class, args ); 13 | } 14 | 15 | @GetMapping("/test") 16 | public Object test(){ 17 | return ""; 18 | } 19 | @GetMapping("/foo") 20 | public Object foo(){ 21 | return ""; 22 | } 23 | } -------------------------------------------------------------------------------- /moss-client/moss-client-1.x/src/test/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | group: showcase 4 | name: repaymentservice 5 | version: 1.0.0 -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/java/org/xujin/moss/client/config/ApplicationContextCustomizer.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.context.ConfigurableApplicationContext; 4 | 5 | public interface ApplicationContextCustomizer { 6 | void customize(T t); 7 | } 8 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/java/org/xujin/moss/client/config/EnvironmentCustomizer.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.core.env.Environment; 4 | 5 | public interface EnvironmentCustomizer { 6 | void customize(T t); 7 | } 8 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/java/org/xujin/moss/client/config/EurekaClientAutoConfiguartion.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; 4 | import org.springframework.context.annotation.Bean; 5 | import org.xujin.moss.client.eureka.EurekaAutoRegistrationCustomizer; 6 | 7 | @ConditionalOnBean(name = "org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean") 8 | public class EurekaClientAutoConfiguartion { 9 | @Bean 10 | public EurekaAutoRegistrationCustomizer eurekaAutoRegistrationCustomizer() { 11 | return new EurekaAutoRegistrationCustomizer(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/java/org/xujin/moss/client/config/ManagementConfig.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.config; 2 | 3 | import org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration; 4 | import org.springframework.boot.actuate.autoconfigure.web.ManagementContextType; 5 | import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; 6 | 7 | /** 8 | * @Author: xujin 9 | **/ 10 | @ManagementContextConfiguration(ManagementContextType.ANY) 11 | @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) 12 | public class ManagementConfig { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/resources/META-INF/moss-client/bootstrap.properties: -------------------------------------------------------------------------------- 1 | spring.cloud.zookeeper.discovery.root=/moss-client 2 | management.server.port=8081 3 | management.endpoints.web.exposure.include=* 4 | management.endpoints.web.exposure.exclude[0]=pause 5 | management.endpoints.web.exposure.exclude[1]=refresh 6 | management.endpoints.web.exposure.exclude[2]=restart 7 | management.endpoints.web.exposure.exclude[3]=resume 8 | management.endpoints.web.exposure.exclude[4]=shutdown 9 | management.endpoints.web.exposure.exclude[5]=heapdump 10 | management.endpoints.jmx.exposure.include=* 11 | management.endpoints.jmx.exposure.exclude[0]=pause 12 | management.endpoints.jmx.exposure.exclude[1]=refresh 13 | management.endpoints.jmx.exposure.exclude[2]=restart 14 | management.endpoints.jmx.exposure.exclude[3]=resume 15 | management.endpoints.jmx.exposure.exclude[4]=shutdown 16 | management.endpoints.jmx.exposure.exclude[5]=heapdump 17 | management.endpoint.health.show-details=always 18 | management.endpoint.heapdump.enabled=false 19 | management.endpoint.pause.enabled=false 20 | management.endpoint.refresh.enabled=false 21 | management.endpoint.restart.enabled=false 22 | management.endpoint.resume.enabled=false 23 | management.endpoint.shutdown.enabled=false 24 | management.info.git.mode=full -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | org.xujin.moss.client.config.AdminEndPointConfiguration,\ 3 | org.xujin.moss.client.config.EurekaClientAutoConfiguartion,\ 4 | org.xujin.moss.client.config.ZooKeeperClientAutoConfiguartion 5 | org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration=\ 6 | org.xujin.moss.client.config.ManagementConfig 7 | org.springframework.boot.SpringApplicationRunListener=\ 8 | org.xujin.moss.client.config.AdminEndpointApplicationRunListener 9 | org.xujin.moss.client.config.EnvironmentCustomizer=\ 10 | org.xujin.moss.client.config.ManagementEnvironmentCustomizer -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/main/resources/META-INF/spring.provides: -------------------------------------------------------------------------------- 1 | provides: platform-admin-endpoint -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/test/java/org/xujin/moss/client/Application.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @Program: moss 10 | * @Description: 11 | * @Author: xujin 12 | * @Create: 2019/2/22 16:02 13 | **/ 14 | @SpringBootApplication 15 | @RestController 16 | public class Application { 17 | public static void main(String[] args) { 18 | SpringApplication.run( Application.class, args ); 19 | } 20 | 21 | @GetMapping("/test") 22 | public Object test(){ 23 | return ""; 24 | } 25 | @GetMapping("/foo") 26 | public Object foo(){ 27 | return ""; 28 | } 29 | } -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/test/java/org/xujin/moss/client/BaseTest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client; 2 | 3 | import org.springframework.boot.test.context.SpringBootTest; 4 | 5 | /** 6 | * @Program: moss 7 | * @Description: 8 | * @Author: xujin 9 | * @Create: 2019/2/20 10:29 10 | **/ 11 | @SpringBootTest 12 | public class BaseTest { 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/test/java/org/xujin/moss/client/endpoint/GCLogEndpointTest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint; 2 | 3 | import org.xujin.moss.client.BaseTest; 4 | import org.junit.Test; 5 | 6 | /** 7 | * @Program: moss 8 | * @Description: 9 | * @Author: xujin 10 | * @Create: 2019/2/20 10:29 11 | **/ 12 | 13 | public class GCLogEndpointTest extends BaseTest { 14 | @Test 15 | public void getGClog(){ 16 | System.gc();System.gc();System.gc(); 17 | GCLogEndpoint gcLogEndpoint=new GCLogEndpoint(); 18 | System.out.println(gcLogEndpoint.getGClog(1,100)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /moss-client/moss-client-2.x/src/test/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | group: showcase 4 | name: repaymentservice 5 | version: 1.0.0 -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/MavenSearch.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency; 2 | 3 | import java.io.InputStream; 4 | 5 | public interface MavenSearch { 6 | 7 | InputStream getPomInfoByFileName(String[] av, String fileName); 8 | 9 | InputStream getSourceJarByFileName(String fileName); 10 | } 11 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/MySSLSocketFactory.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency; 2 | 3 | import java.security.KeyManagementException; 4 | import java.security.NoSuchAlgorithmException; 5 | import java.security.NoSuchProviderException; 6 | import java.security.SecureRandom; 7 | 8 | import javax.net.ssl.SSLContext; 9 | import javax.net.ssl.SSLSocketFactory; 10 | import javax.net.ssl.TrustManager; 11 | 12 | public class MySSLSocketFactory { 13 | private static SSLSocketFactory VI_SSL_FACTORY = null; 14 | 15 | public static SSLSocketFactory getSSLSocketFactory() 16 | throws KeyManagementException, NoSuchProviderException, NoSuchAlgorithmException { 17 | 18 | if (VI_SSL_FACTORY == null) { 19 | TrustManager[] tm = {new MyX509TrustManager()}; 20 | SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); 21 | sslContext.init(null, tm, new SecureRandom()); 22 | VI_SSL_FACTORY = sslContext.getSocketFactory(); 23 | } 24 | return VI_SSL_FACTORY; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/MyX509TrustManager.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency; 2 | 3 | import java.security.cert.CertificateException; 4 | import java.security.cert.X509Certificate; 5 | 6 | import javax.net.ssl.X509TrustManager; 7 | 8 | public class MyX509TrustManager implements X509TrustManager { 9 | @Override 10 | public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { 11 | } 12 | 13 | @Override 14 | public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { 15 | } 16 | 17 | @Override 18 | public X509Certificate[] getAcceptedIssuers() { 19 | return new X509Certificate[0]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/analyzer/PomDependency.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.analyzer; 2 | 3 | import java.io.Serializable; 4 | 5 | public class PomDependency implements Serializable { 6 | public String groupId; 7 | public String artifactId; 8 | public String version; 9 | public String scope; 10 | 11 | public String getArtifactId() { 12 | return artifactId; 13 | } 14 | 15 | public String getGroupId() { 16 | return groupId; 17 | } 18 | 19 | public String getScope() { 20 | return scope; 21 | } 22 | 23 | public String getVersion() { 24 | return version; 25 | } 26 | 27 | public void setArtifactId(String artifactId) { 28 | this.artifactId = artifactId; 29 | } 30 | 31 | public void setGroupId(String groupId) { 32 | this.groupId = groupId; 33 | } 34 | 35 | public void setScope(String scope) { 36 | this.scope = scope; 37 | } 38 | 39 | public void setVersion(String version) { 40 | this.version = version; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/central/DefaultMavenSearch.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.central; 2 | 3 | import java.io.InputStream; 4 | 5 | import org.xujin.moss.client.endpoint.dependency.MavenSearch; 6 | import org.xujin.moss.client.endpoint.dependency.MavenSearchBuilder; 7 | 8 | import lombok.extern.slf4j.Slf4j; 9 | 10 | @Slf4j 11 | public class DefaultMavenSearch implements MavenSearch { 12 | 13 | MavenSearchBuilder mavenSearchBuilder = new DefaultMavenSearchBuilder(); 14 | 15 | @Override 16 | public InputStream getPomInfoByFileName(String[] av, String fileName) { 17 | return mavenSearchBuilder.getContentByName(av, fileName); 18 | } 19 | 20 | @Override 21 | public InputStream getSourceJarByFileName(String fileName) { 22 | return mavenSearchBuilder.getContentByName(null, fileName); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/central/PomDoc.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.central; 2 | 3 | class PomDoc { 4 | private String g; 5 | private String a; 6 | private String v; 7 | 8 | public String getA() { 9 | return a; 10 | } 11 | 12 | public String getG() { 13 | return g; 14 | } 15 | 16 | public String getV() { 17 | return v; 18 | } 19 | 20 | public void setA(String a) { 21 | this.a = a; 22 | } 23 | 24 | public void setG(String g) { 25 | this.g = g; 26 | } 27 | 28 | public void setV(String v) { 29 | this.v = v; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/central/SearchResponse.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.central; 2 | 3 | class SearchResponse { 4 | private PomDoc[] docs; 5 | 6 | public PomDoc[] getDocs() { 7 | return docs; 8 | } 9 | 10 | public void setDocs(PomDoc[] docs) { 11 | this.docs = docs; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/central/SearchResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.central; 2 | 3 | class SearchResult { 4 | private SearchResponse response; 5 | 6 | public SearchResponse getResponse() { 7 | return response; 8 | } 9 | 10 | public void setResponse(SearchResponse response) { 11 | this.response = response; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/NexusMavenSearch.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | import java.io.InputStream; 4 | 5 | import org.xujin.moss.client.endpoint.dependency.MavenSearch; 6 | import org.xujin.moss.client.endpoint.dependency.MavenSearchBuilder; 7 | 8 | import lombok.extern.slf4j.Slf4j; 9 | 10 | @Slf4j 11 | public class NexusMavenSearch implements MavenSearch { 12 | private MavenSearchBuilder mavenSearchBuilder = new NexusMavenSearchBuilder(); 13 | 14 | @Override 15 | public InputStream getPomInfoByFileName(String[] av, String fileName) { 16 | return mavenSearchBuilder.getContentByName(av, fileName); 17 | } 18 | 19 | @Override 20 | public InputStream getSourceJarByFileName(String fileName) { 21 | return mavenSearchBuilder.getContentByName(null, fileName); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/NexusPomInfo.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | class NexusPomInfo { 4 | private String groupId; 5 | private String artifactId; 6 | private String version; 7 | 8 | public String getArtifactId() { 9 | return artifactId; 10 | } 11 | 12 | public String getGroupId() { 13 | return groupId; 14 | } 15 | 16 | public String getVersion() { 17 | return version; 18 | } 19 | 20 | public void setArtifactId(String artifactId) { 21 | this.artifactId = artifactId; 22 | } 23 | 24 | public void setGroupId(String groupId) { 25 | this.groupId = groupId; 26 | } 27 | 28 | public void setVersion(String version) { 29 | this.version = version; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/RepoDetail.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | class RepoDetail { 4 | private String repositoryId; 5 | private String repositoryURL; 6 | private String repositoryKind; 7 | 8 | public String getRepositoryId() { 9 | return repositoryId; 10 | } 11 | 12 | public String getRepositoryKind() { 13 | return repositoryKind; 14 | } 15 | 16 | public String getRepositoryURL() { 17 | return repositoryURL; 18 | } 19 | 20 | public void setRepositoryId(String repositoryId) { 21 | this.repositoryId = repositoryId; 22 | } 23 | 24 | public void setRepositoryKind(String repositoryKind) { 25 | this.repositoryKind = repositoryKind; 26 | } 27 | 28 | public void setRepositoryURL(String repositoryURL) { 29 | this.repositoryURL = repositoryURL; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/ResolveData.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | public class ResolveData { 4 | private String groupId; 5 | private String artifactId; 6 | private String version; 7 | private String baseVersion; 8 | 9 | public String getArtifactId() { 10 | return artifactId; 11 | } 12 | 13 | public String getBaseVersion() { 14 | return baseVersion; 15 | } 16 | 17 | public String getGroupId() { 18 | return groupId; 19 | } 20 | 21 | public String getVersion() { 22 | return version; 23 | } 24 | 25 | public void setArtifactId(String artifactId) { 26 | this.artifactId = artifactId; 27 | } 28 | 29 | public void setBaseVersion(String baseVersion) { 30 | this.baseVersion = baseVersion; 31 | } 32 | 33 | public void setGroupId(String groupId) { 34 | this.groupId = groupId; 35 | } 36 | 37 | public void setVersion(String version) { 38 | this.version = version; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/ResolveResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | public class ResolveResult { 4 | private ResolveData data; 5 | 6 | public ResolveData getData() { 7 | return data; 8 | } 9 | 10 | public void setData(ResolveData data) { 11 | this.data = data; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/ResourceInfo.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | class ResourceInfo { 4 | private String text; 5 | 6 | public String getText() { 7 | return text; 8 | } 9 | 10 | public void setText(String text) { 11 | this.text = text; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/ResourceResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | class ResourceResult { 4 | private ResourceInfo[] data; 5 | 6 | public ResourceInfo[] getData() { 7 | return data; 8 | } 9 | 10 | public void setData(ResourceInfo[] data) { 11 | this.data = data; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/nexus/SearchResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.nexus; 2 | 3 | class SearchResult { 4 | private RepoDetail[] repoDetails; 5 | private NexusPomInfo[] data; 6 | 7 | public NexusPomInfo[] getData() { 8 | return data; 9 | } 10 | 11 | public RepoDetail[] getRepoDetails() { 12 | return repoDetails; 13 | } 14 | 15 | public void setData(NexusPomInfo[] data) { 16 | this.data = data; 17 | } 18 | 19 | public void setRepoDetails(RepoDetail[] repoDetails) { 20 | this.repoDetails = repoDetails; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/util/JsonMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.util; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import com.fasterxml.jackson.databind.DeserializationFeature; 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | 7 | public class JsonMapper { 8 | private static final JsonMapper instance = new JsonMapper(); 9 | 10 | public static JsonMapper defaultMapper() { 11 | return instance; 12 | } 13 | 14 | private ObjectMapper mapper; 15 | 16 | public JsonMapper() { 17 | this(null); 18 | } 19 | 20 | public JsonMapper(JsonInclude.Include include) { 21 | mapper = new ObjectMapper(); 22 | 23 | if (include != null) { 24 | mapper.setSerializationInclusion(include); 25 | } 26 | 27 | mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); 28 | } 29 | 30 | public ObjectMapper getMapper() { 31 | return mapper; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /moss-client/moss-client-common/src/main/java/org/xujin/moss/client/endpoint/dependency/util/PomUtil.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.client.endpoint.dependency.util; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | 5 | @Slf4j 6 | public class PomUtil { 7 | 8 | public static String[] getArtifactIdAndVersion(String fileName) { 9 | boolean needJudge = false; 10 | int versionBeginIndex = -1; 11 | for (int i = 0; i < fileName.length(); i++) { 12 | char c = fileName.charAt(i); 13 | if (needJudge && Character.isDigit(c)) { 14 | versionBeginIndex = i; 15 | break; 16 | } 17 | if (c == '-') { 18 | needJudge = true; 19 | } else { 20 | needJudge = false; 21 | } 22 | } 23 | 24 | if (versionBeginIndex > 0) { 25 | return new String[] {fileName.substring(0, versionBeginIndex - 1), fileName.substring(versionBeginIndex)}; 26 | } else { 27 | return null; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/Sb15XAppliaction.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample; 2 | 3 | import io.prometheus.client.spring.boot.EnablePrometheusEndpoint; 4 | import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 8 | 9 | /** 10 | * 服务提供者端,加上@EnableDiscoveryClient注解,完成服务注册。 11 | * @author xujin 12 | * @site http://xujin.org 13 | */ 14 | @SpringBootApplication 15 | @EnableSpringBootMetricsCollector 16 | @EnablePrometheusEndpoint 17 | @EnableDiscoveryClient 18 | public class Sb15XAppliaction { 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(Sb15XAppliaction.class, args); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/controller/OrderController.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample.controller; 2 | 3 | import org.xujin.moss.sample.model.OrderModel; 4 | import org.xujin.moss.sample.service.OrderService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | /** 11 | * OrderController 12 | * @author xujin 13 | * 14 | */ 15 | @RestController 16 | public class OrderController { 17 | 18 | @Autowired 19 | private OrderService orderService; 20 | 21 | @GetMapping("/sc/order/{id}") 22 | public OrderModel findOrderById(@PathVariable Long id) { 23 | OrderModel orderModel = orderService.findOrderByOrderId(id); 24 | return orderModel; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/entity/Order.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample.entity; 2 | 3 | import java.util.Date; 4 | 5 | import lombok.Data; 6 | 7 | /** 8 | * 9 | * @author xujin 10 | * 11 | */ 12 | @Data 13 | public class Order { 14 | private Long orderNo; 15 | private Date createTime; 16 | private Date payTime; 17 | } 18 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/model/OrderModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample.model; 2 | 3 | import java.util.Date; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class OrderModel { 9 | private Long orderNo; 10 | private Date createTime; 11 | private Date payTime; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample.service; 2 | 3 | import org.xujin.moss.sample.model.OrderModel; 4 | 5 | /** 6 | * 7 | * @author xujin 8 | * 9 | */ 10 | public interface OrderService { 11 | public OrderModel findOrderByOrderId(Long orderId); 12 | } 13 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/java/org/xujin/moss/sample/service/impl/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample.service.impl; 2 | 3 | import java.util.Date; 4 | 5 | import org.xujin.moss.sample.service.OrderService; 6 | import org.springframework.beans.BeanUtils; 7 | import org.springframework.stereotype.Service; 8 | import org.xujin.moss.sample.entity.Order; 9 | import org.xujin.moss.sample.model.OrderModel; 10 | 11 | @Service 12 | public class OrderServiceImpl implements OrderService { 13 | public OrderModel findOrderByOrderId(Long orderId) { 14 | OrderModel orderModel = new OrderModel(); 15 | if (orderId.equals(2L)) { 16 | Order order = new Order(); 17 | order.setCreateTime(new Date()); 18 | order.setOrderNo(2L); 19 | BeanUtils.copyProperties(order, orderModel); 20 | } 21 | return orderModel; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/resources/config/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8085 3 | spring: 4 | application: 5 | name: @project.artifactId@ 6 | info.groupId: @project.groupId@ 7 | info.artifactId: @project.artifactId@ 8 | info.version: @project.version@ 9 | 10 | logging.registry.files[0].name: info 11 | logging.registry.files[0].description: 标准输出 12 | logging.registry.files[0].path: logs/${spring.application.name}/info.log 13 | logging.registry.files[1].name: gclog 14 | logging.registry.files[1].path: logs/${spring.application.name}/gc.log 15 | 16 | management.port: 8089 -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/resources/config/bootstrap-consul.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | consul: 4 | discovery: 5 | healthCheckPath: ${management.context-path}/health 6 | healthCheckInterval: 15s 7 | tags: management.port=${management.port} -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/resources/config/bootstrap-eureka.yml: -------------------------------------------------------------------------------- 1 | eureka: 2 | client: 3 | filterOnlyUpInstances: false 4 | registerWithEureka: true 5 | serviceUrl: 6 | defaultZone: http://eureka.springcloud.cn/eureka/ 7 | #eureka.instance.prefer-ip-address 表示将自己的IP注册到Eureka Server上, 8 | #如果不配置,会将当前服务提供者所在的主机名注册到Eureka Server上。 9 | instance: 10 | prefer-ip-address: true -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/resources/config/bootstrap-zookeeper.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | zookeeper: 4 | connect-string: localhost:2181 -------------------------------------------------------------------------------- /moss-client/moss-sample-1.5.x/src/main/resources/config/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: @project.artifactId@ 4 | profiles: 5 | active: @discovery.type@ -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/java/org/xujin/moss/sample/AppController.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | @RestController 10 | @RequestMapping("/admin/app") 11 | public class AppController { 12 | 13 | private static Logger logger = LoggerFactory.getLogger(AppController.class); 14 | 15 | @GetMapping("/add") 16 | public String addCity() { 17 | logger.info("我是Info日志"); 18 | logger.debug("我是debug日志"); 19 | return ""; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/java/org/xujin/moss/sample/Sb2xApplication.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.boot.builder.SpringApplicationBuilder; 8 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 9 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 10 | 11 | @SpringBootApplication 12 | @EnableDiscoveryClient 13 | public class Sb2xApplication extends SpringBootServletInitializer { 14 | 15 | private static Logger logger = LoggerFactory.getLogger(Sb2xApplication.class); 16 | public static void main(String[] args) { 17 | SpringApplication.run(Sb2xApplication.class, args); 18 | } 19 | 20 | @Override 21 | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { 22 | return builder.sources(Sb2xApplication.class); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/resources/config/application.yml: -------------------------------------------------------------------------------- 1 | systemInfo: 2 | appName: @project.artifactId@ 3 | server: 4 | port: 8082 5 | logging: 6 | registry: 7 | files: 8 | - name: info 9 | description: 标准输出 10 | path: logs/${spring.application.name}/info.log 11 | - name: gclog 12 | path: logs/${spring.application.name}/gc.log 13 | 14 | 15 | management.server.port: 8992 -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/resources/config/bootstrap-consul.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | consul: 4 | discovery: 5 | tags: management.port=${management.port} -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/resources/config/bootstrap-eureka.yml: -------------------------------------------------------------------------------- 1 | eureka: 2 | client: 3 | filterOnlyUpInstances: false 4 | registerWithEureka: true 5 | serviceUrl: 6 | defaultZone: http://eureka.springcloud.cn/eureka/ 7 | reference: META-INF/reference.json # optional -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/resources/config/bootstrap-zookeeper.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | zookeeper: 4 | connect-string: localhost:2181 -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/main/resources/config/bootstrap.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: @project.artifactId@ 4 | profiles: 5 | active: @discovery.type@ -------------------------------------------------------------------------------- /moss-client/moss-sample-2.1.x/src/test/java/org/xujin/moss/sample/SpringCloudAdminWebApplicationTests.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.sample; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringCloudAdminWebApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /moss-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.xujin.moss 7 | moss-client 8 | 1.0.0.RELEASE 9 | pom 10 | 11 | moss-client 12 | moss-client 13 | 14 | 15 | 1.8 16 | 17 | 18 | 19 | moss-sample-1.5.x 20 | moss-sample-2.1.x 21 | moss-client-common 22 | moss-client-1.x 23 | moss-client-2.x 24 | 25 | 26 | -------------------------------------------------------------------------------- /moss-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | org.xujin.moss 7 | moss 8 | 1.0.0.RELEASE 9 | 10 | 11 | 4.0.0 12 | 13 | moss-common 14 | 15 | moss-common 16 | 17 | 18 | 19 | org.projectlombok 20 | lombok 21 | 22 | 23 | io.projectreactor 24 | reactor-core 25 | 3.2.3.RELEASE 26 | provided 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /moss-common/src/main/java/org/xujin/moss/common/domain/PageResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.common.domain; 2 | 3 | import lombok.Builder; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author xujin 11 | * @param 12 | */ 13 | @Getter 14 | @Setter 15 | @Builder 16 | public class PageResult { 17 | 18 | /** 19 | * 分页的数据 20 | */ 21 | private List list; 22 | 23 | /** 24 | * 总的记录数 25 | */ 26 | private long totalCount; 27 | 28 | /** 29 | * 总页数 30 | */ 31 | private long totalPage; 32 | 33 | /** 34 | * 当前页数 35 | */ 36 | private long currentPage; 37 | 38 | public static PageResultBuilder builder(List list){ 39 | return new PageResultBuilder().list(list); 40 | } 41 | 42 | public PageResult(List list, long totalCount, long totalPage, long currentPage) { 43 | this.list = list; 44 | this.totalCount = totalCount; 45 | this.totalPage = totalPage; 46 | this.currentPage = currentPage; 47 | } 48 | 49 | public PageResult() { 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /moss-common/src/main/java/org/xujin/moss/common/util/ReactorUtils.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.common.util; 2 | 3 | import reactor.core.publisher.Flux; 4 | import reactor.core.publisher.Mono; 5 | 6 | import java.util.List; 7 | import java.util.Optional; 8 | 9 | /** 10 | * reactor 数据转换类 11 | * @author homeant homeanter@163.com 12 | * @date 2019-01-08 16:45:32 13 | */ 14 | public class ReactorUtils { 15 | 16 | public static Optional> optional(Flux flux){ 17 | return flux.collectList().blockOptional(); 18 | } 19 | 20 | public static Optional optional(Mono mono){ 21 | return mono.blockOptional(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/config/AdminServerMarkerConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 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 | package de.codecentric.boot.admin.server.config; 18 | 19 | import org.springframework.context.annotation.Bean; 20 | import org.springframework.context.annotation.Configuration; 21 | 22 | @Configuration 23 | public class AdminServerMarkerConfiguration { 24 | @Bean 25 | public Marker adminServerMarker() { 26 | return new Marker(); 27 | } 28 | 29 | public static class Marker { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.config; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/domain/entities/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.domain.entities; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/domain/events/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.domain.events; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/domain/values/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.domain.values; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/eventstore/OptimisticLockingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 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 | package de.codecentric.boot.admin.server.eventstore; 18 | 19 | public class OptimisticLockingException extends RuntimeException { 20 | 21 | public OptimisticLockingException(String message) { 22 | super(message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/eventstore/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.eventstore; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/notify/Notifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.notify; 18 | 19 | import de.codecentric.boot.admin.server.domain.events.InstanceEvent; 20 | import reactor.core.publisher.Mono; 21 | 22 | /** 23 | * Interface for components which emits notifications upon status changes in clients 24 | * 25 | * @author Johannes Edmeier 26 | */ 27 | public interface Notifier { 28 | 29 | Mono notify(InstanceEvent event); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/notify/filter/NotificationFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.notify.filter; 18 | 19 | import de.codecentric.boot.admin.server.domain.entities.Instance; 20 | import de.codecentric.boot.admin.server.domain.events.InstanceEvent; 21 | 22 | public interface NotificationFilter { 23 | String getId(); 24 | boolean filter(InstanceEvent event, Instance instance); 25 | } 26 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/notify/filter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.notify.filter; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/notify/filter/web/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.notify.filter.web; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/notify/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.notify; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/services/InstanceIdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.services; 18 | 19 | import de.codecentric.boot.admin.server.domain.values.InstanceId; 20 | import de.codecentric.boot.admin.server.domain.values.Registration; 21 | 22 | public interface InstanceIdGenerator { 23 | 24 | /** 25 | * Generate an id based on the given Instance 26 | * 27 | * @param registration the registration the id is computed for. 28 | * @return the instance id 29 | */ 30 | InstanceId generateId(Registration registration); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/services/endpoints/EndpointDetectionStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 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 | package de.codecentric.boot.admin.server.services.endpoints; 18 | 19 | import de.codecentric.boot.admin.server.domain.entities.Instance; 20 | import de.codecentric.boot.admin.server.domain.values.Endpoints; 21 | import reactor.core.publisher.Mono; 22 | 23 | public interface EndpointDetectionStrategy { 24 | Mono detectEndpoints(Instance instance); 25 | } 26 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/services/endpoints/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.services.endpoints; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/services/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.services; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/utils/jackson/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.utils.jackson; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/utils/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.utils; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/HttpHeadersProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.web.client; 18 | 19 | import de.codecentric.boot.admin.server.domain.entities.Instance; 20 | 21 | import org.springframework.http.HttpHeaders; 22 | 23 | /** 24 | * Is responsible to provide the {@link HttpHeaders} used to interact with the given 25 | * {@link Instance}. 26 | * 27 | * @author Johannes Edmeier 28 | */ 29 | public interface HttpHeadersProvider { 30 | 31 | HttpHeaders getHeaders(Instance instance); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/exception/InstanceWebClientException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.web.client.exception; 18 | 19 | public class InstanceWebClientException extends RuntimeException { 20 | public InstanceWebClientException(String message) { 21 | super(message); 22 | } 23 | 24 | public InstanceWebClientException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/exception/ResolveEndpointException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.web.client.exception; 18 | 19 | public class ResolveEndpointException extends InstanceWebClientException { 20 | public ResolveEndpointException(String message) { 21 | super(message); 22 | } 23 | 24 | public ResolveEndpointException(String message, Throwable cause) { 25 | super(message, cause); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/exception/ResolveInstanceException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.web.client.exception; 18 | 19 | public class ResolveInstanceException extends InstanceWebClientException { 20 | 21 | public ResolveInstanceException(String message) { 22 | super(message); 23 | } 24 | 25 | public ResolveInstanceException(String message, Throwable cause) { 26 | super(message, cause); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/exception/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.web.client.exception; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/client/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.web.client; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.web; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/reactive/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.web.reactive; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/de/codecentric/boot/admin/server/web/servlet/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | @NonNullApi 18 | @NonNullFields 19 | package de.codecentric.boot.admin.server.web.servlet; 20 | 21 | import org.springframework.lang.NonNullApi; 22 | import org.springframework.lang.NonNullFields; 23 | -------------------------------------------------------------------------------- /moss-core/src/main/java/org/moss/registry/adapter/DiscoveryRegistryManager.java: -------------------------------------------------------------------------------- 1 | package org.moss.registry.adapter; 2 | 3 | public interface DiscoveryRegistryManager { 4 | void removeRegistry(String code); 5 | void addRegistry(String code, String url); 6 | } 7 | -------------------------------------------------------------------------------- /moss-core/src/main/java/org/moss/registry/adapter/MultRegisterCenterService.java: -------------------------------------------------------------------------------- 1 | package org.moss.registry.adapter; 2 | 3 | import java.util.Map; 4 | 5 | public interface MultRegisterCenterService { 6 | 7 | /** 8 | * 获取所有注册中心的URL 9 | * @return 10 | */ 11 | Map getRegisterCenterList(); 12 | 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /moss-core/src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "groups": [ 3 | ], 4 | "properties": [ 5 | { 6 | "name": "spring.boot.admin.hazelcast.enabled", 7 | "type": "java.lang.Boolean", 8 | "description": "Enable Hazelcast support.", 9 | "defaultValue": "true" 10 | }, 11 | { 12 | "name": "spring.boot.admin.hazelcast.event-store", 13 | "type": "java.lang.String", 14 | "description": "Name of backing Hazelcast-Map for storing the instance events.", 15 | "defaultValue": "spring-boot-admin-application-store" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /moss-core/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration,\ 3 | de.codecentric.boot.admin.server.config.AdminServerNotifierAutoConfiguration,\ 4 | de.codecentric.boot.admin.server.config.AdminServerHazelcastAutoConfiguration,\ 5 | de.codecentric.boot.admin.server.config.AdminServerCloudFoundryAutoConfiguration 6 | -------------------------------------------------------------------------------- /moss-core/src/test/java/de/codecentric/boot/admin/server/domain/entities/EventsourcingInstanceRepositoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.domain.entities; 18 | 19 | import de.codecentric.boot.admin.server.eventstore.InMemoryEventStore; 20 | 21 | public class EventsourcingInstanceRepositoryTest extends AbstractInstanceRepositoryTest { 22 | 23 | public EventsourcingInstanceRepositoryTest() { 24 | super(new EventsourcingInstanceRepository(new InMemoryEventStore())); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /moss-core/src/test/java/de/codecentric/boot/admin/server/eventstore/InMemoryEventStoreTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 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 | package de.codecentric.boot.admin.server.eventstore; 18 | 19 | public class InMemoryEventStoreTest extends AbstractEventStoreTest { 20 | 21 | @Override 22 | protected InstanceEventStore createStore(int maxLogSizePerAggregate) { 23 | return new InMemoryEventStore(maxLogSizePerAggregate); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /moss-core/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | instance: 5 | name: spring-boot-admin-server-test 6 | jmx: 7 | enabled: false 8 | logging: 9 | level: 10 | de.codecentric: DEBUG 11 | -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/notify/expected-custom-mail: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 |

HELLO WORLD!

23 | application-name (cafebabe) 24 | status changed from UNKNOWN to DOWN 25 |
26 | http://localhost:8081/actuator/health 27 | 28 | 29 | -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/env-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeProfiles": [ 3 | "one" 4 | ], 5 | "propertySources": [ 6 | { 7 | "name": "server.ports", 8 | "properties": { 9 | "local.server.port": { 10 | "value": 9000 11 | } 12 | } 13 | }, 14 | { 15 | "name": "servletContextInitParams", 16 | "properties": {} 17 | }, 18 | { 19 | "name": "systemProperties", 20 | "properties": { 21 | "java.runtime.name": { 22 | "value": "OpenJDK Runtime Environment" 23 | }, 24 | "java.protocol.handler.pkgs": { 25 | "value": "org.springframework.boot.loader" 26 | }, 27 | "sun.boot.library.path": { 28 | "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64" 29 | } 30 | } 31 | }, 32 | { 33 | "name": "class path resource [spring-boot-starter-batch-web.properties]", 34 | "properties": { 35 | "spring.batch.job.enabled": { 36 | "value": "false" 37 | } 38 | } 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/env-legacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": [ 3 | "one" 4 | ], 5 | "server.ports": { 6 | "local.server.port": 9000 7 | }, 8 | "servletContextInitParams": {}, 9 | "systemProperties": { 10 | "java.runtime.name": "OpenJDK Runtime Environment", 11 | "java.protocol.handler.pkgs": "org.springframework.boot.loader", 12 | "sun.boot.library.path": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64" 13 | }, 14 | "class path resource [spring-boot-starter-batch-web.properties]": { 15 | "spring.batch.job.enabled": "false" 16 | } 17 | } -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/flyway-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "contexts": { 3 | "application": { 4 | "flywayBeans": { 5 | "flyway": { 6 | "migrations": [ 7 | { 8 | "type": "SQL", 9 | "checksum": 710039845, 10 | "version": "1", 11 | "description": "init", 12 | "script": "V1__init.sql", 13 | "state": "SUCCESS", 14 | "installedOn": "2017-12-30T11:12:18.544+0000", 15 | "executionTime": 10 16 | } 17 | ] 18 | }, 19 | "secondary": { 20 | "migrations": [ 21 | { 22 | "type": "SQL", 23 | "checksum": 710039845, 24 | "version": "1", 25 | "description": "init", 26 | "script": "V1__init.sql", 27 | "state": "SUCCESS", 28 | "installedOn": "2017-12-30T11:12:18.544+0000", 29 | "executionTime": 10 30 | } 31 | ] 32 | } 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/flyway-legacy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "flyway", 4 | "migrations": [ 5 | { 6 | "type": "SQL", 7 | "checksum": 710039845, 8 | "version": "1", 9 | "description": "init", 10 | "script": "V1__init.sql", 11 | "state": "SUCCESS", 12 | "installedOn": 1514632338544, 13 | "executionTime": 10 14 | } 15 | ] 16 | }, 17 | { 18 | "name": "secondary", 19 | "migrations": [ 20 | { 21 | "type": "SQL", 22 | "checksum": 710039845, 23 | "version": "1", 24 | "description": "init", 25 | "script": "V1__init.sql", 26 | "state": "SUCCESS", 27 | "installedOn": 1514632338544, 28 | "executionTime": 10 29 | } 30 | ] 31 | } 32 | ] -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/health-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "DOWN", 3 | "details": { 4 | "info": "Hello", 5 | "sub-1": { 6 | "status": "DOWN", 7 | "details": { 8 | "info-1": false, 9 | "sub-1-1": { 10 | "status": "UP" 11 | }, 12 | "sub-1-2": { 13 | "status": "DOWN", 14 | "details": { 15 | "info-1-2": "World" 16 | } 17 | } 18 | } 19 | }, 20 | "sub-2": { 21 | "status": "UP", 22 | "details": { 23 | "info-2": 1 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/health-legacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "DOWN", 3 | "info": "Hello", 4 | "sub-1": { 5 | "status": "DOWN", 6 | "info-1": false, 7 | "sub-1-1": { 8 | "status": "UP" 9 | }, 10 | "sub-1-2": { 11 | "status": "DOWN", 12 | "info-1-2": "World" 13 | } 14 | }, 15 | "sub-2": { 16 | "status": "UP", 17 | "info-2": 1 18 | } 19 | } -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/threaddump-expected.json: -------------------------------------------------------------------------------- 1 | { 2 | "threads": [ 3 | { 4 | "threadId": "1", 5 | "threadName": "foo" 6 | }, 7 | { 8 | "threadId": "2", 9 | "threadName": "bar" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /moss-core/src/test/resources/de/codecentric/boot/admin/server/web/client/threaddump-legacy.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "threadId": "1", 4 | "threadName": "foo" 5 | }, 6 | { 7 | "threadId": "2", 8 | "threadName": "bar" 9 | } 10 | ] -------------------------------------------------------------------------------- /moss-core/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /moss-extension/src/main/java/org/xujin/moss/model/AppTakeoverModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import java.util.List; 4 | 5 | public class AppTakeoverModel { 6 | List takeoverAppList; 7 | List noTakeoverAppList; 8 | 9 | public List getTakeoverAppList() { 10 | return takeoverAppList; 11 | } 12 | 13 | public void setTakeoverAppList(List takeoverAppList) { 14 | this.takeoverAppList = takeoverAppList; 15 | } 16 | 17 | public List getNoTakeoverAppList() { 18 | return noTakeoverAppList; 19 | } 20 | 21 | public void setNoTakeoverAppList(List noTakeoverAppList) { 22 | this.noTakeoverAppList = noTakeoverAppList; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /moss-extension/src/main/java/org/xujin/moss/model/DOMSelectModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import lombok.*; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 9 | * @Description: 10 | * @Author: xujin 11 | * @Create: 2018/11/22 10:11 12 | **/ 13 | @Data 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @ToString 17 | @EqualsAndHashCode(callSuper = false) 18 | public class DOMSelectModel { 19 | private String id; 20 | private String label; 21 | private List options; 22 | } 23 | -------------------------------------------------------------------------------- /moss-extension/src/main/java/org/xujin/moss/model/DOMSelectOptionsModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import lombok.*; 4 | 5 | /** 6 | * 7 | * @Description: 8 | * @Author: xujin 9 | * @Create: 2018/11/22 9:57 10 | **/ 11 | 12 | @Data 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @ToString 16 | @EqualsAndHashCode(callSuper = false) 17 | public class DOMSelectOptionsModel { 18 | private String value; 19 | private String text; 20 | } 21 | -------------------------------------------------------------------------------- /moss-extension/src/main/java/org/xujin/moss/security/jwt/JwtToken.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.security.jwt; 2 | 3 | import com.auth0.jwt.JWT; 4 | import com.auth0.jwt.interfaces.DecodedJWT; 5 | import org.apache.shiro.authc.AuthenticationToken; 6 | 7 | /** 8 | * jwtToken 9 | * @author xujin 10 | */ 11 | public class JwtToken implements AuthenticationToken { 12 | private String token; 13 | private DecodedJWT jwt; 14 | public JwtToken(String token) { 15 | this.token = token; 16 | this.jwt = JWT.decode(token); 17 | } 18 | 19 | @Override 20 | public Object getPrincipal() { 21 | return token; 22 | } 23 | 24 | @Override 25 | public Object getCredentials() { 26 | return token; 27 | } 28 | 29 | public String getClaim(String claim) { 30 | return this.jwt.getClaim(claim).asString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/base/BaseModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.base; 2 | 3 | 4 | import org.xujin.moss.constant.Constants; 5 | 6 | import java.sql.Timestamp; 7 | 8 | /** 9 | * base Model 10 | * @author xujin 11 | */ 12 | public class BaseModel { 13 | 14 | private Long id; 15 | 16 | private Timestamp gmtCreate; 17 | 18 | private Timestamp gmtModified; 19 | 20 | private Byte isDeleted= Constants.IS_DELETE_FALSE; 21 | 22 | public Long getId() { 23 | return id; 24 | } 25 | 26 | public void setId(Long id) { 27 | this.id = id; 28 | } 29 | 30 | public Timestamp getGmtCreate() { 31 | return gmtCreate; 32 | } 33 | 34 | public void setGmtCreate(Timestamp gmtCreate) { 35 | this.gmtCreate = gmtCreate; 36 | } 37 | 38 | public Timestamp getGmtModified() { 39 | return gmtModified; 40 | } 41 | 42 | public void setGmtModified(Timestamp gmtModified) { 43 | this.gmtModified = gmtModified; 44 | } 45 | 46 | public Byte getIsDeleted() { 47 | return isDeleted; 48 | } 49 | 50 | public void setIsDeleted(Byte isDeleted) { 51 | this.isDeleted = isDeleted; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/exception/ApplicationException.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.exception; 2 | 3 | /** 4 | * 自定义异常 5 | * 6 | * @author xujin 7 | * @version 1.0 8 | */ 9 | public class ApplicationException extends RuntimeException { 10 | 11 | private static final long serialVersionUID = -3426833209473506363L; 12 | 13 | public ApplicationException() { 14 | super(); 15 | } 16 | 17 | public ApplicationException(String message, Throwable cause) { 18 | super(message, cause); 19 | } 20 | 21 | public ApplicationException(String message) { 22 | super(message); 23 | } 24 | 25 | public ApplicationException(Throwable cause) { 26 | super(cause); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/DictTypeModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import org.xujin.moss.base.BaseModel; 4 | 5 | /** 6 | * @author xujin 7 | * 数据字典分类表 8 | */ 9 | public class DictTypeModel extends BaseModel { 10 | 11 | private String dictName; 12 | 13 | private String dictCode; 14 | 15 | private int status; 16 | 17 | public String getDictName() { 18 | return dictName; 19 | } 20 | 21 | public void setDictName(String dictName) { 22 | this.dictName = dictName; 23 | } 24 | 25 | public String getDictCode() { 26 | return dictCode; 27 | } 28 | 29 | public void setDictCode(String dictCode) { 30 | this.dictCode = dictCode; 31 | } 32 | 33 | public int getStatus() { 34 | return status; 35 | } 36 | 37 | public void setStatus(int status) { 38 | this.status = status; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/MenuModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import org.xujin.moss.base.BaseModel; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.NoArgsConstructor; 7 | import lombok.ToString; 8 | 9 | /** 10 | * @author xujin 11 | */ 12 | @Data 13 | @NoArgsConstructor 14 | @ToString 15 | @EqualsAndHashCode(callSuper = false) 16 | public class MenuModel extends BaseModel { 17 | private Long parentId; 18 | private String name; 19 | private String parentIds; 20 | private String url; 21 | private String roles; 22 | private Integer sort; 23 | private String icon; 24 | private String key; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/MetaDataModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | public class MetaDataModel { 4 | 5 | private String name; 6 | 7 | private String value; 8 | 9 | private String desc; 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | public void setName(String name) { 15 | this.name = name; 16 | } 17 | 18 | public String getDesc() { 19 | return desc; 20 | } 21 | 22 | public void setDesc(String desc) { 23 | this.desc = desc; 24 | } 25 | 26 | public String getValue() { 27 | return value; 28 | } 29 | 30 | public void setValue(String value) { 31 | this.value = value; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/RegisterCenterModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | 4 | import org.xujin.moss.base.BaseModel; 5 | 6 | public class RegisterCenterModel extends BaseModel { 7 | 8 | private String code; 9 | 10 | private String name; 11 | 12 | private String url; 13 | 14 | private String desc; 15 | 16 | private byte status; 17 | 18 | 19 | public String getCode() { 20 | return code; 21 | } 22 | 23 | public void setCode(String code) { 24 | this.code = code; 25 | } 26 | 27 | public String getUrl() { 28 | return url; 29 | } 30 | 31 | public void setUrl(String url) { 32 | this.url = url; 33 | } 34 | 35 | public String getDesc() { 36 | return desc; 37 | } 38 | 39 | public void setDesc(String desc) { 40 | this.desc = desc; 41 | } 42 | 43 | public byte getStatus() { 44 | return status; 45 | } 46 | 47 | public void setStatus(byte status) { 48 | this.status = status; 49 | } 50 | 51 | public String getName() { 52 | return name; 53 | } 54 | 55 | public void setName(String name) { 56 | this.name = name; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/UserAppModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | 4 | import org.xujin.moss.base.BaseModel; 5 | 6 | /** 7 | * 用户和app之间的收藏Model 8 | */ 9 | public class UserAppModel extends BaseModel { 10 | 11 | public String mailNickName; 12 | 13 | public String appId; 14 | 15 | public String getMailNickName() { 16 | return mailNickName; 17 | } 18 | 19 | public void setMailNickName(String mailNickName) { 20 | this.mailNickName = mailNickName; 21 | } 22 | 23 | public String getAppId() { 24 | return appId; 25 | } 26 | 27 | public void setAppId(String appId) { 28 | this.appId = appId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/model/UserRoleModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | import org.xujin.moss.base.BaseModel; 4 | import lombok.Data; 5 | 6 | /** 7 | * 8 | * @Description: 9 | * @Author: xujin 10 | * @Create: 2018/10/15 19:09 11 | **/ 12 | @Data 13 | public class UserRoleModel extends BaseModel { 14 | private String username; 15 | private String role; 16 | } 17 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/AppMqTraceRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class AppMqTraceRequest { 7 | private int pageNo=1; 8 | private int pageSize=10; 9 | private String appName; 10 | private String type; 11 | private String messageId; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/AppPageRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class AppPageRequest { 7 | private int pageNo=1; 8 | private int pageSize=10; 9 | private String name; 10 | private String projectName; 11 | private String status; 12 | private String takeOver; 13 | } 14 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/DictTypeListRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DictTypeListRequest { 7 | private int pageNo=1; 8 | private int pageSize=10; 9 | private String dictCode; 10 | private String dictName; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/ProjectByPageRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ProjectByPageRequest { 7 | private int pageNo=1; 8 | private int pageSize=10; 9 | private String name; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/RegisterCenterPageRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | public class RegisterCenterPageRequest { 4 | private int pageNo=1; 5 | private int pageSize=10; 6 | private String code; 7 | 8 | 9 | public int getPageNo() { 10 | return pageNo; 11 | } 12 | 13 | public void setPageNo(int pageNo) { 14 | this.pageNo = pageNo; 15 | } 16 | 17 | public int getPageSize() { 18 | return pageSize; 19 | } 20 | 21 | public void setPageSize(int pageSize) { 22 | this.pageSize = pageSize; 23 | } 24 | 25 | public String getCode() { 26 | return code; 27 | } 28 | 29 | public void setCode(String code) { 30 | this.code = code; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/request/UserPageListRequest.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.request; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserPageListRequest { 7 | private int pageNo=1; 8 | private int pageSize=10; 9 | private String username; 10 | private String name; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/AppService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | import org.xujin.moss.common.ResultData; 4 | import org.xujin.moss.common.domain.PageResult; 5 | import org.xujin.moss.request.AppPageRequest; 6 | import org.xujin.moss.model.AppModel; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public interface AppService { 12 | 13 | void addApp(AppModel appModel) ; 14 | 15 | List findAllByParamter(String appId,String ownerName,String ownerId); 16 | 17 | 18 | PageResult findByPageVague(AppPageRequest appPageRequest); 19 | 20 | void update(AppModel appModel) ; 21 | 22 | ResultData getTraceTopology(String appName); 23 | 24 | Map getUseReport(); 25 | 26 | boolean checkAppAndMappingName(String appName); 27 | 28 | int totalAppConut(); 29 | 30 | int totalMyAppConut(String userName); 31 | 32 | AppModel findAppById(Long id); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/CommonService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | 4 | import org.xujin.moss.model.AppModel; 5 | import org.xujin.moss.vo.BasicDashboardVO; 6 | 7 | public interface CommonService { 8 | 9 | /** 10 | * 根据应用的唯一Id查询 11 | * @param appId 12 | */ 13 | AppModel findAppExtendInfo(String appId); 14 | 15 | BasicDashboardVO initBasicDashboard(String userName); 16 | 17 | boolean judgeIsProdEnv(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/MenuService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | import org.xujin.moss.model.MenuModel; 4 | import org.xujin.moss.vo.SubMenuVO; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 10 | * @Description: 11 | * @Author: xujin 12 | * @Create: 2018/10/15 15:01 13 | **/ 14 | public interface MenuService { 15 | 16 | List getMenuByRole(String role); 17 | List getAllMenu(); 18 | 19 | MenuModel updateAll(MenuModel menuModel); 20 | 21 | void createNewMenuIfNotExist(MenuModel menuModel); 22 | 23 | void deleteMenu(Long id); 24 | 25 | List getMenuByUserRole(String userName); 26 | 27 | 28 | List getMenuByKey(String key); 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/ProjectService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | 4 | import org.xujin.moss.common.ResultData; 5 | import org.xujin.moss.common.domain.PageResult; 6 | import org.xujin.moss.request.ProjectByPageRequest; 7 | import org.xujin.moss.model.ProjectModel; 8 | 9 | public interface ProjectService { 10 | 11 | ResultData addProject(ProjectModel model) ; 12 | 13 | ProjectModel getProjectById(Long id); 14 | 15 | PageResult findPageByParam(ProjectByPageRequest model); 16 | 17 | void update(ProjectModel model) ; 18 | 19 | int totalProjectConut(); 20 | 21 | int totalProjectConutByOwnerId(String ownerId); 22 | 23 | void deleteProjectById(Long id) ; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/RegisterCenterService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | import org.xujin.moss.common.ResultData; 4 | import org.xujin.moss.common.domain.PageResult; 5 | import org.xujin.moss.model.RegisterCenterModel; 6 | import org.xujin.moss.request.RegisterCenterPageRequest; 7 | 8 | import java.util.List; 9 | 10 | public interface RegisterCenterService { 11 | 12 | ResultData addRegisterCenter(RegisterCenterModel model) ; 13 | 14 | RegisterCenterModel getRegisterCenterById(Long id); 15 | 16 | PageResult findPageByParam(RegisterCenterPageRequest request); 17 | 18 | void update(RegisterCenterModel model) ; 19 | 20 | void deleteRegisterCenterById(Long id) ; 21 | 22 | /** 23 | * 根据是否启用查询注册中心 24 | * @param status 25 | * @return 26 | */ 27 | List findRegisterCenterListByStatus(int status); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/UserAppService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | 4 | import org.xujin.moss.model.UserAppModel; 5 | 6 | import java.util.List; 7 | 8 | public interface UserAppService { 9 | 10 | List findCollectedByMailNickName(String mailNickName, String appId); 11 | 12 | 13 | Boolean collecteApp(String mailNickName, String appId); 14 | 15 | 16 | Boolean cancleCollecteApp(String mailNickName, String appId); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/UserRolesService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | 4 | import org.xujin.moss.model.UserRoleModel; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 菜单角色绑定关系服务 10 | * @author xujin 11 | */ 12 | public interface UserRolesService { 13 | UserRoleModel create(UserRoleModel userRoleModel); 14 | int updateById(UserRoleModel userRoleModel); 15 | UserRoleModel findById(long id); 16 | int deleteById(long id); 17 | List getAll(); 18 | List getByUsername(String username); 19 | } 20 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/service/UserService.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service; 2 | 3 | import org.xujin.moss.common.ResultData; 4 | import org.xujin.moss.common.domain.PageResult; 5 | import org.xujin.moss.model.UserModel; 6 | import org.xujin.moss.request.UserPageListRequest; 7 | import org.xujin.moss.vo.UserVO; 8 | 9 | import java.util.List; 10 | 11 | public interface UserService { 12 | 13 | ResultData addUser(UserModel model) ; 14 | 15 | UserModel getUserById(Long id); 16 | 17 | PageResult findPageByParam(UserPageListRequest userPageListRequest); 18 | 19 | List getUserList(); 20 | 21 | void update(UserModel model) ; 22 | 23 | void deleteUserById(Long id) ; 24 | 25 | UserModel getUserByUserNameAndPassWord(String username,String password); 26 | 27 | 28 | UserModel getUserByUserName(String userName); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/vo/BasicDashboardVO.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class BasicDashboardVO { 7 | 8 | private int appNum; 9 | private int projectNum; 10 | private int instanceNum; 11 | private int myAppNum; 12 | private int myInstanNum; 13 | private int downNum; 14 | private int MyProjectNum; 15 | 16 | /** 17 | * 角色 18 | */ 19 | private String role; 20 | 21 | /** 22 | * 部门 23 | */ 24 | private String department; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/vo/MenuVO.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.vo; 2 | 3 | import org.xujin.moss.base.BaseModel; 4 | import lombok.Data; 5 | import lombok.EqualsAndHashCode; 6 | import lombok.NoArgsConstructor; 7 | import lombok.ToString; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * @author xujin 13 | */ 14 | @Data 15 | @NoArgsConstructor 16 | @ToString 17 | @EqualsAndHashCode(callSuper = false) 18 | public class MenuVO extends BaseModel { 19 | private Long parentId; 20 | private String name; 21 | private String parentIds; 22 | private String url; 23 | private String roles; 24 | private Integer sort; 25 | private String icon; 26 | private String key; 27 | 28 | List subMenuModels; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /moss-service-api/src/main/java/org/xujin/moss/vo/SubMenuVO.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.vo; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | import lombok.experimental.Tolerate; 6 | 7 | import java.sql.Timestamp; 8 | import java.util.List; 9 | 10 | /** 11 | * 12 | * @Description: 13 | * @Author: xujin 14 | * @Create: 2018/10/17 16:06 15 | **/ 16 | @Data 17 | @Builder 18 | public class SubMenuVO { 19 | @Tolerate 20 | public SubMenuVO(){} 21 | private String icon; 22 | private String title; 23 | private String src; 24 | private String key; 25 | private List subMenu; 26 | private String url; 27 | 28 | private Long parentId; 29 | private String name; 30 | private String parentIds; 31 | private String roles; 32 | private Integer sort; 33 | 34 | private Long id; 35 | 36 | private Timestamp gmtCreate; 37 | 38 | private Timestamp gmtModified; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/autoconfigure/MossServerAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.autoconfigure; 2 | 3 | import org.moss.registry.adapter.DiscoveryRegistryManager; 4 | import org.springframework.boot.autoconfigure.AutoConfigureAfter; 5 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | @Configuration 10 | @AutoConfigureAfter(name = { 11 | "de.codecentric.boot.admin.server.cloud.extension.MossServerDiscoveryAutoConfiguration" 12 | }) 13 | public class MossServerAutoConfiguration { 14 | @Bean 15 | @ConditionalOnMissingBean(DiscoveryRegistryManager.class) 16 | public DiscoveryRegistryManager defaultDiscoveryRegistryManager() { 17 | return new DefaultDiscoveryRegistryManager(); 18 | } 19 | 20 | public static class DefaultDiscoveryRegistryManager implements DiscoveryRegistryManager { 21 | 22 | @Override 23 | public void removeRegistry(String code) { 24 | 25 | } 26 | 27 | @Override 28 | public void addRegistry(String code, String url) { 29 | 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/entity/DictType.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | 6 | /** 7 | * @author xujin 8 | * 数据字典分类表 9 | */ 10 | @TableName("t_dict_type") 11 | public class DictType extends BaseEntity { 12 | 13 | @TableField("dict_name") 14 | private String dictName; 15 | 16 | @TableField("dict_code") 17 | private String dictCode; 18 | 19 | @TableField("status") 20 | private int status; 21 | 22 | public String getDictName() { 23 | return dictName; 24 | } 25 | 26 | public void setDictName(String dictName) { 27 | this.dictName = dictName; 28 | } 29 | 30 | public String getDictCode() { 31 | return dictCode; 32 | } 33 | 34 | public void setDictCode(String dictCode) { 35 | this.dictCode = dictCode; 36 | } 37 | 38 | public int getStatus() { 39 | return status; 40 | } 41 | 42 | public void setStatus(int status) { 43 | this.status = status; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/entity/UserApp.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | 6 | @TableName("t_user_app") 7 | public class UserApp extends BaseEntity { 8 | 9 | @TableField("mail_nick_name") 10 | public String mailNickName; 11 | 12 | @TableField("app_id") 13 | public String appId; 14 | 15 | public String getMailNickName() { 16 | return mailNickName; 17 | } 18 | 19 | public void setMailNickName(String mailNickName) { 20 | this.mailNickName = mailNickName; 21 | } 22 | 23 | public String getAppId() { 24 | return appId; 25 | } 26 | 27 | public void setAppId(String appId) { 28 | this.appId = appId; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/entity/UserRoles.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.TableField; 4 | import com.baomidou.mybatisplus.annotation.TableName; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * 用户角色表 9 | */ 10 | @TableName("t_user_roles") 11 | @NoArgsConstructor 12 | public class UserRoles extends BaseEntity { 13 | 14 | 15 | @TableField("username") 16 | private String username; 17 | 18 | @TableField("role") 19 | private String role; 20 | 21 | public String getUsername() { 22 | return this.username; 23 | } 24 | 25 | public void setUsername(String username) { 26 | this.username = username; 27 | } 28 | 29 | public String getRole() { 30 | return this.role; 31 | } 32 | 33 | public void setRole(String role) { 34 | this.role = role; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/enums/AppStatusEnum.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.enums; 2 | 3 | import java.util.Collections; 4 | import java.util.Map; 5 | import java.util.concurrent.ConcurrentHashMap; 6 | 7 | /** 8 | * 9 | * @Description: 10 | * @Author: xujin 11 | * @Create: 2018/11/22 10:19 12 | **/ 13 | public class AppStatusEnum { 14 | public static final Map status; 15 | static { 16 | ConcurrentHashMap enums=new ConcurrentHashMap<>(); 17 | enums.put("0","创建"); 18 | enums.put("1","开发中"); 19 | enums.put("2","运行中"); 20 | enums.put("3","已下线"); 21 | status=Collections.unmodifiableMap(enums); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/enums/AppTakeOverEnum.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.enums; 2 | 3 | /** 4 | * 应用是否被纳管 5 | * @author xujin 6 | */ 7 | public enum AppTakeOverEnum { 8 | 9 | TAKE_OVER_TRUE("takeOver",1,"已接入"), 10 | TAKE_OVER_FALSE("noTakeOver",0,"未接入"); 11 | 12 | AppTakeOverEnum(String name, int value, String desc) { 13 | this.name = name; 14 | this.value = value; 15 | this.desc = desc; 16 | } 17 | private String name; 18 | 19 | private int value; 20 | 21 | private String desc; 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String name) { 28 | this.name = name; 29 | } 30 | 31 | public int getValue() { 32 | return value; 33 | } 34 | 35 | public void setValue(int value) { 36 | this.value = value; 37 | } 38 | 39 | public String getDesc() { 40 | return desc; 41 | } 42 | 43 | public void setDesc(String desc) { 44 | this.desc = desc; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/DictDataMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.DictData; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | import org.apache.ibatis.annotations.Update; 9 | 10 | import java.util.List; 11 | 12 | @Mapper 13 | public interface DictDataMapper extends BaseMapper { 14 | 15 | @Select("SELECT * FROM t_dict_data where is_deleted=0 and dict_code=#{dictCode}") 16 | List findDictDataByDictCode(@Param("dictCode") String dictCode); 17 | 18 | @Update("update t_dict_data set is_deleted=1 where dict_code=#{dictCode} ") 19 | void batchDeleteDictDataByDictCode(@Param("dictCode") String dictCode); 20 | 21 | @Select("SELECT * FROM t_dict_data where is_deleted=0 and status=#{status} and dict_code=#{dictCode}") 22 | List findDictDataByDictCodeAndStatus(@Param("dictCode") String dictCode,@Param("status") int status); 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/DictTypeMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.DictType; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | 9 | import java.util.List; 10 | 11 | @Mapper 12 | public interface DictTypeMapper extends BaseMapper { 13 | 14 | @Select("SELECT * FROM t_dict_type where is_deleted=0 and dict_code=#{dictCode}") 15 | DictType findByDictCode(@Param("dictCode") String dictCode); 16 | 17 | @Select("SELECT * FROM t_dict_type where is_deleted=0") 18 | List findDictTypeList(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/MenuMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.Menu; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Select; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * 12 | * @Description: 13 | * @Author: xujin 14 | * @Create: 2018/10/15 15:12 15 | **/ 16 | @Mapper 17 | public interface MenuMapper extends BaseMapper { 18 | 19 | @Select("SELECT * from t_menu where is_deleted=0 ORDER BY sort DESC;") 20 | List getMenuList(); 21 | } 22 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/ProjectMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.Project; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | 9 | /** 10 | * ProjectModel 11 | * @author xujin 12 | */ 13 | @Mapper 14 | public interface ProjectMapper extends BaseMapper { 15 | 16 | @Select("SELECT Count(*) FROM t_project where is_deleted=0") 17 | int totalConut(); 18 | 19 | @Select("SELECT Count(*) FROM t_project a where a.is_deleted=0 and a.owner_id=#{ownerId}") 20 | int totalMyprojectConut(@Param("ownerId") String ownerId); 21 | 22 | @Select("SELECT * FROM t_project a where a.is_deleted=0 and a.key=#{key}") 23 | Project findProjectByKey(@Param("key") String key); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/RegisterCenterMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | import org.apache.ibatis.annotations.Select; 7 | import org.xujin.moss.entity.RegisterCenter; 8 | 9 | import java.util.List; 10 | 11 | @Mapper 12 | public interface RegisterCenterMapper extends BaseMapper { 13 | 14 | @Select("SELECT * FROM t_register_center a where a.is_deleted=0 and a.code=#{code}") 15 | RegisterCenter findRegisterCenterByCode(@Param("code") String code); 16 | 17 | 18 | /** 19 | * 根据Status查询的注册中心列表 20 | * @return 21 | */ 22 | @Select("SELECT * FROM t_register_center a where a.is_deleted=0 and a.status=#{status}") 23 | List findRegisterCenterListByStatus(@Param("status") int status); 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/UserAppMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.UserApp; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * User收藏App 9 | * @author xujin 10 | */ 11 | @Mapper 12 | public interface UserAppMapper extends BaseMapper { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.User; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.apache.ibatis.annotations.Select; 8 | 9 | /** 10 | * UserVO 11 | * @author xujin 12 | */ 13 | @Mapper 14 | public interface UserMapper extends BaseMapper { 15 | 16 | @Select("SELECT * FROM t_user u where u.is_deleted=0 and u.username=#{userName}") 17 | User findUserByUserName(@Param("userName") String userName); 18 | 19 | @Select("SELECT * FROM t_user u where u.is_deleted=0 and u.username=#{userName} and u.password=#{password}") 20 | User findUserByUserNameAndPassword(@Param("userName") String userName,@Param("password") String password ); 21 | 22 | 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/mapper/UserRolesMapper.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.xujin.moss.entity.UserRoles; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * @author xujin 9 | */ 10 | @Mapper 11 | public interface UserRolesMapper extends BaseMapper { 12 | } 13 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/ReportModel.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model; 2 | 3 | public class ReportModel { 4 | 5 | private String name; 6 | 7 | private int count; 8 | 9 | public String getName() { 10 | return name; 11 | } 12 | 13 | public void setName(String name) { 14 | this.name = name; 15 | } 16 | 17 | public int getCount() { 18 | return count; 19 | } 20 | 21 | public void setCount(int count) { 22 | this.count = count; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/Application.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Application implements Serializable { 6 | private String key; 7 | private String label; 8 | 9 | public String getKey() { 10 | return key; 11 | } 12 | 13 | public void setKey(String key) { 14 | this.key = key; 15 | } 16 | 17 | public String getLabel() { 18 | return label; 19 | } 20 | 21 | public void setLabel(String label) { 22 | this.label = label; 23 | } 24 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/ApplicationsData.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | public class ApplicationsData implements Serializable { 7 | private List applications; 8 | 9 | public List getApplications() { 10 | return applications; 11 | } 12 | 13 | public void setApplications(List applications) { 14 | this.applications = applications; 15 | } 16 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/ApplicationsResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ApplicationsResult implements Serializable { 6 | private ApplicationsData data; 7 | 8 | public ApplicationsData getData() { 9 | return data; 10 | } 11 | 12 | public void setData(ApplicationsData data) { 13 | this.data = data; 14 | } 15 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/ClusterTopology.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | public class ClusterTopology implements Serializable { 7 | private List nodes; 8 | private List calls; 9 | 10 | public List getNodes() { 11 | return nodes; 12 | } 13 | 14 | public void setNodes(List nodes) { 15 | this.nodes = nodes; 16 | } 17 | 18 | public List getCalls() { 19 | return calls; 20 | } 21 | 22 | public void setCalls(List calls) { 23 | this.calls = calls; 24 | } 25 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/Duration.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | public class Duration { 4 | private String start; 5 | private String end; 6 | private String step; 7 | 8 | public String getStart() { 9 | return start; 10 | } 11 | 12 | public void setStart(String start) { 13 | this.start = start; 14 | } 15 | 16 | public String getEnd() { 17 | return end; 18 | } 19 | 20 | public void setEnd(String end) { 21 | this.end = end; 22 | } 23 | 24 | public String getStep() { 25 | return step; 26 | } 27 | 28 | public void setStep(String step) { 29 | this.step = step; 30 | } 31 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/RequestPayload.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | public class RequestPayload { 4 | private String query; 5 | private Variables variables; 6 | 7 | public String getQuery() { 8 | return query; 9 | } 10 | 11 | public void setQuery(String query) { 12 | this.query = query; 13 | } 14 | 15 | public Variables getVariables() { 16 | return variables; 17 | } 18 | 19 | public void setVariables(Variables variables) { 20 | this.variables = variables; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/TopologyData.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | 5 | public class TopologyData implements Serializable { 6 | private ClusterTopology getClusterTopology; 7 | 8 | public ClusterTopology getGetClusterTopology() { 9 | return getClusterTopology; 10 | } 11 | 12 | public void setGetClusterTopology(ClusterTopology getClusterTopology) { 13 | this.getClusterTopology = getClusterTopology; 14 | } 15 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/TopologyResult.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | import java.io.Serializable; 4 | 5 | public class TopologyResult implements Serializable { 6 | private TopologyData data; 7 | 8 | public TopologyData getData() { 9 | return data; 10 | } 11 | 12 | public void setData(TopologyData data) { 13 | this.data = data; 14 | } 15 | } -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/model/trace/Variables.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.model.trace; 2 | 3 | public class Variables { 4 | private Duration duration; 5 | private String applicationId; 6 | 7 | public Duration getDuration() { 8 | return duration; 9 | } 10 | 11 | public void setDuration(Duration duration) { 12 | this.duration = duration; 13 | } 14 | 15 | public String getApplicationId() { 16 | return applicationId; 17 | } 18 | 19 | public void setApplicationId(String applicationId) { 20 | this.applicationId = applicationId; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /moss-service/src/main/java/org/xujin/moss/service/impl/SwitchMultEurekaServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.service.impl; 2 | 3 | import org.moss.registry.adapter.MultRegisterCenterService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import org.xujin.moss.constant.Constants; 7 | import org.xujin.moss.entity.RegisterCenter; 8 | import org.xujin.moss.mapper.RegisterCenterMapper; 9 | 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | @Service 15 | public class SwitchMultEurekaServiceImpl implements MultRegisterCenterService { 16 | 17 | @Autowired 18 | private RegisterCenterMapper registerCenterMapper; 19 | 20 | @Override 21 | public Map getRegisterCenterList() { 22 | 23 | Map map=new HashMap<>(); 24 | List registerCenters= registerCenterMapper.findRegisterCenterListByStatus(Constants.REGISTER_CENTER_ENABLE); 25 | for (RegisterCenter registerCenter:registerCenters) { 26 | map.put(registerCenter.getCode(),registerCenter.getUrl()); 27 | } 28 | return map; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /moss-ui/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /moss-ui/.env: -------------------------------------------------------------------------------- 1 | BROWSER=none 2 | ESLINT=1 3 | PORT=8010 4 | -------------------------------------------------------------------------------- /moss-ui/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-umi" 3 | } 4 | -------------------------------------------------------------------------------- /moss-ui/.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.md 2 | **/*.svg 3 | **/*.ejs 4 | **/*.html 5 | package.json 6 | .umi 7 | .umi-production 8 | -------------------------------------------------------------------------------- /moss-ui/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "es5", 4 | "printWidth": 100, 5 | "semi": false, 6 | "tslintIntegration": true, 7 | "stylelintIntegration": true, 8 | "tabWidth": 2, 9 | "jsxBracketSameLine": true, 10 | "overrides": [ 11 | { 12 | "files": ".prettierrc", 13 | "options": { "parser": "json" } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /moss-ui/.umirc.dev.js: -------------------------------------------------------------------------------- 1 | const yaml = require('js-yaml'); 2 | const fs = require('fs'); 3 | const applicationYml = '../moss-web/src/main/resources/config/application.yml'; 4 | try { 5 | var application = yaml.safeLoad(fs.readFileSync(applicationYml, 'utf8')); 6 | console.log(application.server.port); 7 | } catch (e) { 8 | console.log(e); 9 | } 10 | export default { 11 | define: { 12 | ENV: 'development', 13 | apiHost: 'http://localhost:' + application.server.port, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /moss-ui/.umirc.js: -------------------------------------------------------------------------------- 1 | // ref: https://umijs.org/config/ 2 | export default { 3 | define: { 4 | theme: { 5 | 'primary-color': '#68BD45', 6 | 'layout-body-background': '#f5f8f9', 7 | }, 8 | }, 9 | lessLoaderOptions: { 10 | modifyVars: { 11 | 'primary-color': '#68BD45', 12 | 'layout-body-background': '#f5f8f9', 13 | }, 14 | }, 15 | disableCSSModules: true, 16 | routes: [{ path: '/', component: './index' }], 17 | history: 'hash', 18 | treeShaking: false, 19 | chainWebpack(config, { webpack }) { 20 | config.resolve.extensions.add('tsx') 21 | config.resolve.extensions.add('less') 22 | }, 23 | plugins: [ 24 | // ref: https://umijs.org/plugin/umi-plugin-react.html 25 | [ 26 | 'umi-plugin-react', 27 | { 28 | antd: true, 29 | dynamicImport: false, 30 | title: 'Moss 莫斯', 31 | dll: true, 32 | locale: { 33 | enable: false, 34 | default: 'zh-CN', 35 | }, 36 | routes: { 37 | exclude: [ 38 | /models\//, 39 | /services\//, 40 | /model\.(t|j)sx?$/, 41 | /service\.(t|j)sx?$/, 42 | /components\//, 43 | ], 44 | }, 45 | }, 46 | ], 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /moss-ui/.umirc.prod.js: -------------------------------------------------------------------------------- 1 | export default { 2 | define: { 3 | ENV: 'production', 4 | apiHost: '/', 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /moss-ui/dist.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/dist.zip -------------------------------------------------------------------------------- /moss-ui/mock/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/mock/.gitkeep -------------------------------------------------------------------------------- /moss-ui/mock/index.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | 'POST /admin/project/list': [ 3 | { 4 | cname: 'cname', 5 | description: 'description', 6 | gmtCreate: 1552278469486, 7 | gmtModified: 1552278469487, 8 | id: 5, 9 | isDeleted: 0, 10 | key: 'key', 11 | name: 'name', 12 | ownerId: 'ownerId', 13 | ownerName: 'ownerName', 14 | }, 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /moss-ui/script.js: -------------------------------------------------------------------------------- 1 | const inquirer = require('inquirer') 2 | const chalk = require('chalk') 3 | const fs = require('fs') 4 | const archiver = require('archiver') 5 | const child_process = require('child_process') 6 | const filesize = require('filesize') 7 | 8 | inquirer 9 | .prompt([ 10 | { 11 | type: 'list', 12 | name: 'action', 13 | message: '请选择你要进行的操作?', 14 | choices: [ 15 | { name: '打包+压缩', value: 'build|打包+压缩' }, 16 | { name: '开发', value: 'start|开发' }, 17 | ], 18 | }, 19 | ]) 20 | .then(answers => { 21 | const [command, msg] = answers.action.split('|') 22 | 23 | console.log(chalk.green('>>>>>> 开始执行 : %s'), msg) 24 | child_process.execSync(`npm run ${command}`, { stdio: [0, 1, 2] }) 25 | const output = fs.createWriteStream(__dirname + '/dist.zip') 26 | output.on('close', function() { 27 | console.log(chalk.green(`压缩完成 : ${filesize(archive.pointer())} `)) 28 | }) 29 | 30 | const archive = archiver('zip', { 31 | zlib: { level: 9 }, 32 | }) 33 | 34 | archive.on('error', function(err) { 35 | throw err 36 | }) 37 | archive.pipe(output) 38 | archive.directory('./dist') 39 | archive.finalize() 40 | console.log(chalk.green('>>>>>> 执行结束 : %s'), msg) 41 | }) 42 | -------------------------------------------------------------------------------- /moss-ui/src/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/app.ts -------------------------------------------------------------------------------- /moss-ui/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/.gitkeep -------------------------------------------------------------------------------- /moss-ui/src/assets/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/bg.png -------------------------------------------------------------------------------- /moss-ui/src/assets/default-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/default-avatar.png -------------------------------------------------------------------------------- /moss-ui/src/assets/delIcon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/delIcon.jpg -------------------------------------------------------------------------------- /moss-ui/src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/favicon.ico -------------------------------------------------------------------------------- /moss-ui/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/logo.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ACTIVEMQ_CLIENT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ACTIVEMQ_CLIENT.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ACTIVEMQ_CLIENT_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ACTIVEMQ_CLIENT_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/APACHE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/APACHE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ARCUS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ARCUS.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/BACKEND.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/BACKEND.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/BLOC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/BLOC.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/CASSANDRA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/CASSANDRA.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/CLIENT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/CLIENT.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/CUBRID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/CUBRID.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/CUBRID_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/CUBRID_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/DATABASE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/DATABASE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/DUBBO_PROVIDER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/DUBBO_PROVIDER.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/DUBBO_PROVIDER_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/DUBBO_PROVIDER_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ETC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ETC.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ElasticJob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ElasticJob.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/FILTER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/FILTER.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/GRPC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/GRPC.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/HTTPCLIENT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/HTTPCLIENT.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/JBOSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/JBOSS.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/JETTY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/JETTY.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MARIADB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MARIADB.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MARIADB_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MARIADB_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MEMCACHED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MEMCACHED.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MONGODB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MONGODB.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MONGODB_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MONGODB_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MSSQLSERVER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MSSQLSERVER.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MSSQLSERVER_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MSSQLSERVER_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MYSQL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MYSQL.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/MYSQL_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/MYSQL_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/NBASE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/NBASE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/NBASE_ARC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/NBASE_ARC.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/NBASE_ARC_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/NBASE_ARC_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/NBASE_T.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/NBASE_T.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/NGINX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/NGINX.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ORACLE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ORACLE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ORACLE_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ORACLE_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/POSTGRESQL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/POSTGRESQL.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/POSTGRESQL_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/POSTGRESQL_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/QUEUE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/QUEUE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/REDIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/REDIS.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/RESIN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/RESIN.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/RESIN_GROUP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/RESIN_GROUP.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/SPRING_BOOT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/SPRING_BOOT.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/STAND_ALONE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/STAND_ALONE.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ShardingJDBC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ShardingJDBC.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/TOMCAT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/TOMCAT.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/UNAUTHORIZED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/UNAUTHORIZED.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/UNDEFINED.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/UNDEFINED.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/UNKNOWN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/UNKNOWN.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/UNKNOWN_CLOUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/UNKNOWN_CLOUD.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/USER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/USER.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/USER1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/USER1.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/VERTX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/VERTX.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/database@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/database@2x.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/http@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/http@2x.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/http_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/http_.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/httpcomponents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/httpcomponents.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/kafka.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/kafka.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/ng.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/sq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/sq.png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/www(1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/www(1).png -------------------------------------------------------------------------------- /moss-ui/src/assets/servermap/www.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/servermap/www.png -------------------------------------------------------------------------------- /moss-ui/src/assets/warning.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/assets/warning.gif -------------------------------------------------------------------------------- /moss-ui/src/components/ApplicationCard/Chart.tsx: -------------------------------------------------------------------------------- 1 | import './style.less' 2 | 3 | import React from 'react' 4 | import { Area, Chart, SmoothLine, Tooltip } from 'viser-react' 5 | 6 | class AppChart extends React.PureComponent<{ 7 | data: ApplicationMetricsData[] 8 | color?: string 9 | }> { 10 | public render() { 11 | const { color, data = [] } = this.props 12 | const keys = Object.keys(data[0] || {}) 13 | return ( 14 | 20 | 21 | 22 | 23 | 24 | ) 25 | } 26 | } 27 | 28 | export default AppChart 29 | -------------------------------------------------------------------------------- /moss-ui/src/components/BreadCrumb/style.less: -------------------------------------------------------------------------------- 1 | @import (reference) '../../style/constants'; 2 | 3 | .headAll { 4 | display: flex; 5 | align-items: center; 6 | justify-content: center; 7 | 8 | .ant-breadcrumb { 9 | display: block; 10 | height: 40px; 11 | line-height: 40px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-ui/src/components/Empty/index.tsx: -------------------------------------------------------------------------------- 1 | import { Empty } from 'antd' 2 | import React, { ReactNode } from 'react' 3 | import './style.less' 4 | 5 | interface IEmptyProps { 6 | description?: string 7 | children?: ReactNode 8 | } 9 | 10 | const E = (props: IEmptyProps) => { 11 | const { description, children, ...rest } = props 12 | return ( 13 |
14 | 15 | {children} 16 | 17 |
18 | ) 19 | } 20 | export default E 21 | -------------------------------------------------------------------------------- /moss-ui/src/components/Empty/style.less: -------------------------------------------------------------------------------- 1 | .component-empty { 2 | display: flex; 3 | flex: 1; 4 | align-items: center; 5 | justify-content: center; 6 | height: 100%; 7 | } 8 | -------------------------------------------------------------------------------- /moss-ui/src/components/Exception/typeConfig.ts: -------------------------------------------------------------------------------- 1 | const config = { 2 | 302: { 3 | img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg', 4 | title: '302', 5 | desc: '该应用没有接入服务治理平台,暂时无数据', 6 | }, 7 | 403: { 8 | img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg', 9 | title: '403', 10 | desc: '抱歉,你无权访问该页面', 11 | }, 12 | 404: { 13 | img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg', 14 | title: '404', 15 | desc: '抱歉,你访问的页面不存在', 16 | }, 17 | 500: { 18 | img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg', 19 | title: '500', 20 | desc: '抱歉,服务器出错了', 21 | }, 22 | } as any; 23 | 24 | export default config; 25 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/CheckBox.tsx: -------------------------------------------------------------------------------- 1 | import { Checkbox } from 'antd'; 2 | import { CheckboxGroupProps } from 'antd/lib/checkbox/Group'; 3 | import React from 'react'; 4 | 5 | const { Group } = Checkbox; 6 | 7 | class MyCheckbox extends React.Component { 8 | public render() { 9 | return ; 10 | } 11 | } 12 | 13 | export default MyCheckbox; 14 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/Radio.tsx: -------------------------------------------------------------------------------- 1 | import { Radio } from 'antd'; 2 | import { RadioGroupProps } from 'antd/lib/radio'; 3 | import React from 'react'; 4 | 5 | class MyRadio extends React.PureComponent { 6 | public render() { 7 | return ; 8 | } 9 | } 10 | 11 | export default MyRadio; 12 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/RangePicker.tsx: -------------------------------------------------------------------------------- 1 | import { DatePicker } from 'antd'; 2 | import { RangePickerProps } from 'antd/lib/date-picker/interface'; 3 | import moment from 'moment'; 4 | import React from 'react'; 5 | 6 | const { RangePicker } = DatePicker; 7 | 8 | class MyRangerPicker extends React.PureComponent { 9 | public render() { 10 | const { value = [] } = this.props; 11 | 12 | (value as []).forEach((dateString, idx) => { 13 | if (!moment.isMoment(dateString)) { 14 | value[idx] = moment(dateString * 1); 15 | } 16 | }); 17 | return ; 18 | } 19 | } 20 | 21 | export default MyRangerPicker; 22 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/Select.tsx: -------------------------------------------------------------------------------- 1 | import { Select } from 'antd'; 2 | import { SelectProps } from 'antd/lib/select'; 3 | import React from 'react'; 4 | 5 | class MySelect extends React.PureComponent< 6 | SelectProps & { 7 | options: FieldOptions; 8 | } 9 | > { 10 | public render() { 11 | const { options } = this.props; 12 | return ; 13 | } 14 | private getOption = (option: FieldOption, idx: number) => { 15 | let props: { [key: string]: any }; 16 | 17 | if (typeof option === 'string') { 18 | props = {}; 19 | props.key = option || idx + ''; 20 | props.value = option; 21 | props.label = option; 22 | } else { 23 | props = { ...option }; 24 | props.key = option.key || option.value || idx + ''; 25 | props.label = option.label || option.key; 26 | } 27 | 28 | return {props.label}; 29 | }; 30 | } 31 | 32 | export default MySelect; 33 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/Transfer.tsx: -------------------------------------------------------------------------------- 1 | import { Transfer } from 'antd'; 2 | import { TransferItem, TransferProps } from 'antd/lib/transfer'; 3 | import React from 'react'; 4 | 5 | class MyTransfer extends React.PureComponent< 6 | TransferProps & { 7 | options: FieldOptions; 8 | } 9 | > { 10 | public render() { 11 | const dataSource = this.parse(this.props.options); 12 | const transferProps = { 13 | ...this.props, 14 | dataSource, 15 | render: (item: TransferItem) => item.title, 16 | }; 17 | return ; 18 | } 19 | 20 | private parse(options: FieldOptions): TransferItem[] { 21 | return options.map(opt => { 22 | const { key, title } = 23 | typeof opt === 'string' 24 | ? { key: opt, title: opt } 25 | : { key: opt.value, title: opt.label || opt.value }; 26 | return { key, title }; 27 | }); 28 | } 29 | } 30 | 31 | export default MyTransfer; 32 | -------------------------------------------------------------------------------- /moss-ui/src/components/FormGenerator/Control/index.ts: -------------------------------------------------------------------------------- 1 | import MyCheckbox from './CheckBox'; 2 | import Radio from './Radio'; 3 | import RangePicker from './RangePicker'; 4 | import Select from './Select'; 5 | 6 | import Transfer from './Transfer'; 7 | 8 | const myControl: { [key: string]: any } = { 9 | MyCheckbox, 10 | Radio, 11 | RangePicker, 12 | Select, 13 | Transfer, 14 | }; 15 | 16 | export default myControl; 17 | -------------------------------------------------------------------------------- /moss-ui/src/components/PageGenerator/ControllerBar.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from 'antd'; 2 | import React from 'react'; 3 | 4 | class ControllerBar extends React.PureComponent<{ 5 | data: ControllerData[]; 6 | }> { 7 | public render() { 8 | const { data } = this.props; 9 | 10 | return ( 11 |
12 | {data.map(item => { 13 | return ( 14 | 17 | ); 18 | })} 19 |
20 | ); 21 | } 22 | } 23 | 24 | export default ControllerBar; 25 | -------------------------------------------------------------------------------- /moss-ui/src/components/PageGenerator/index.tsx: -------------------------------------------------------------------------------- 1 | import './style.less' 2 | 3 | import { connect } from '@/util/store' 4 | import React from 'react' 5 | import { withRouter } from 'react-router' 6 | 7 | import ListPage from './ListPage' 8 | 9 | export default (data: PageConstructorData) => 10 | withRouter( 11 | // @ts-ignore 12 | connect({ listData: data.model })((props: any) => ( 13 | 19 | )) 20 | ) 21 | -------------------------------------------------------------------------------- /moss-ui/src/components/PageTitle/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | interface IProps { 4 | icon?: string 5 | name: string 6 | info?: string | JSX.Element 7 | titleExtra?: JSX.Element 8 | rightPanelExtra?: JSX.Element 9 | } 10 | 11 | const PageTitle = React.memo((props: IProps) => { 12 | const { icon, name, info, titleExtra, rightPanelExtra } = props 13 | return ( 14 |
15 | {icon ? : null} 16 |
17 |
18 |
19 |

{name}

20 | {titleExtra ?
: null} 21 |
22 | {rightPanelExtra ? ( 23 |
24 | ) : null} 25 |
26 | {info} 27 |
28 |
29 | ) 30 | }) 31 | 32 | export default PageTitle 33 | -------------------------------------------------------------------------------- /moss-ui/src/components/SelectNode/style.less: -------------------------------------------------------------------------------- 1 | @import (reference) '../../style/constants'; 2 | 3 | .selectNode { 4 | float: right; 5 | width: 360px; 6 | height: 44px; 7 | background: rgba(214, 223, 229, 0.48); 8 | border-radius: 4px; 9 | 10 | .ant-btn-sm { 11 | height: 32px; 12 | font-size: 13px; 13 | border-color: #fff; 14 | border-radius: 3px; 15 | box-shadow: 0 2px 9px 0 rgba(44, 42, 42, 0.22); 16 | 17 | > i { 18 | font-style: normal; 19 | color: #007aff; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /moss-ui/src/components/StateFul/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export const enum ViewState { 4 | IDLE = 'IDLE', 5 | LOADING = 'LOADING', 6 | RENDER = 'RENDER', 7 | EMPTY = 'EMPTY', 8 | ERROR = 'ERROR', 9 | } 10 | 11 | export type SetViewStateFunctionType = (vs: ViewState | any) => void 12 | 13 | export type StateFulRenderPropsType = { 14 | viewState: ViewState 15 | setViewState: SetViewStateFunctionType 16 | } 17 | 18 | interface IStateFulProps { 19 | viewState?: ViewState | T 20 | } 21 | 22 | interface IStateFulState { 23 | viewState?: ViewState | T 24 | } 25 | 26 | class Stateful extends React.Component, IStateFulState> { 27 | public state: IStateFulState = { 28 | viewState: ViewState.IDLE, 29 | } 30 | 31 | private setViewState = (viewState: T) => { 32 | this.setState({ 33 | viewState, 34 | }) 35 | } 36 | 37 | render() { 38 | const { viewState: vs } = this.state 39 | const { viewState, children } = this.props 40 | 41 | return ( 42 | (children && 43 | typeof children === 'function' && 44 | children({ viewState: viewState || vs, setViewState: this.setViewState })) || 45 | null 46 | ) 47 | } 48 | } 49 | 50 | export default Stateful 51 | -------------------------------------------------------------------------------- /moss-ui/src/components/notification/dialog.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/components/notification/dialog.tsx -------------------------------------------------------------------------------- /moss-ui/src/components/notification/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Spin } from 'antd'; 2 | import React from 'react'; 3 | 4 | class Loading extends React.Component { 5 | public render() { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | } 13 | export default Loading; 14 | -------------------------------------------------------------------------------- /moss-ui/src/components/withAuth/index.tsx: -------------------------------------------------------------------------------- 1 | import { connect, wholeModel } from '@/util/store' 2 | import React from 'react' 3 | import { Redirect } from 'react-router-dom' 4 | 5 | export const withAuth = (BaseComponent: React.ComponentType) => { 6 | class AuthRoute extends React.Component<{ 7 | login: LoginData 8 | }> { 9 | public render() { 10 | const { login } = this.props 11 | return login.token ? ( 12 | 13 | ) : ( 14 | 19 | ) 20 | } 21 | } 22 | return connect({ login: wholeModel.login })(AuthRoute) 23 | } 24 | 25 | export default withAuth 26 | -------------------------------------------------------------------------------- /moss-ui/src/global.less: -------------------------------------------------------------------------------- 1 | @import './style/index'; 2 | @import './style/constants.less'; 3 | -------------------------------------------------------------------------------- /moss-ui/src/global.ts: -------------------------------------------------------------------------------- 1 | import 'moment/locale/zh-cn' 2 | import moment from 'moment' 3 | 4 | moment.locale('zh-cn') 5 | -------------------------------------------------------------------------------- /moss-ui/src/layouts/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | import 'jest'; 2 | import BasicLayout from '..'; 3 | import React from 'react'; 4 | import renderer, { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'; 5 | 6 | describe('Layout: BasicLayout', () => { 7 | it('Render correctly', () => { 8 | const wrapper: ReactTestRenderer = renderer.create(); 9 | expect(wrapper.root.children.length).toBe(1); 10 | const outerLayer = wrapper.root.children[0] as ReactTestInstance; 11 | expect(outerLayer.type).toBe('div'); 12 | const title = outerLayer.children[0] as ReactTestInstance; 13 | expect(title.type).toBe('h1'); 14 | expect(title.children[0]).toBe('Yay! Welcome to umi!'); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /moss-ui/src/layouts/index.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/layouts/index.less -------------------------------------------------------------------------------- /moss-ui/src/layouts/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import styles from './index.less' 3 | 4 | export type BasicLayoutComponent

= React.SFC

5 | 6 | export interface BasicLayoutProps extends React.Props { 7 | history?: History 8 | location?: Location 9 | } 10 | 11 | const BasicLayout: BasicLayoutComponent = props => { 12 | return

{props.children}
13 | } 14 | 15 | export default BasicLayout 16 | -------------------------------------------------------------------------------- /moss-ui/src/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/models/.gitkeep -------------------------------------------------------------------------------- /moss-ui/src/models/dashboard/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux' 2 | 3 | const dashboard = gluer((data: DashboardBasicData): DashboardBasicData => { 4 | return data 5 | }, {}) 6 | 7 | const report = gluer((data: ReportData): ReportData => { 8 | return data 9 | }, {}) 10 | 11 | export default { dashboard, report } 12 | -------------------------------------------------------------------------------- /moss-ui/src/models/dashboard/service.ts: -------------------------------------------------------------------------------- 1 | import { wholeModel } from '@/util/store' 2 | import fetch from '@/util/fetch' 3 | 4 | export default { 5 | fetchDashBoard: (): Promise => { 6 | return fetch({ 7 | method: 'get', 8 | url: `admin/dashboard/basic`, 9 | }).then(data => { 10 | return wholeModel.dashboard.dashboard(data) 11 | }) 12 | }, 13 | fetchReports: (): Promise => { 14 | return fetch({ 15 | method: 'get', 16 | url: `admin/dashboard/report`, 17 | }).then(data => { 18 | return wholeModel.dashboard.report(data) 19 | }) 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /moss-ui/src/models/global/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux' 2 | 3 | const globalConf = gluer((data?: GlobalConf) => { 4 | if (data && data.registerCenter && Array.isArray(data.registerCenter)) { 5 | const localRegisterCenter = localStorage.getItem('registerCenter') 6 | const localRegisterCenterInList = data.registerCenter.find(c => { 7 | return c.value === localRegisterCenter 8 | }) 9 | if (!localRegisterCenterInList) { 10 | localStorage.setItem('registerCenter', '') 11 | } 12 | } 13 | return { ...data } 14 | }, {}) 15 | 16 | export default globalConf 17 | -------------------------------------------------------------------------------- /moss-ui/src/models/global/service.ts: -------------------------------------------------------------------------------- 1 | import fetch from '@/util/fetch' 2 | import { wholeModel } from '@/util/store' 3 | 4 | export default { 5 | fetchGlobalConf: (): Promise => { 6 | return fetch( 7 | { 8 | url: `admin/metadata/list`, 9 | }, 10 | { showLoading: false } 11 | ).then(data => { 12 | return wholeModel.globalConf(data) 13 | }) 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /moss-ui/src/models/login/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux' 2 | 3 | const login = gluer( 4 | (data?: LoginData) => { 5 | localStorage.setItem('token', (data && data.token) || '') 6 | localStorage.setItem('userName', (data && data.userName) || '') 7 | return data 8 | }, 9 | { 10 | userName: localStorage.getItem('userName') || 'anonymous', 11 | token: localStorage.getItem('token'), 12 | } 13 | ) 14 | 15 | export default login 16 | -------------------------------------------------------------------------------- /moss-ui/src/models/login/service.ts: -------------------------------------------------------------------------------- 1 | import { wholeModel } from '@/util/store' 2 | import fetch from '@/util/fetch' 3 | 4 | export default { 5 | login: (body: any): Promise => { 6 | return fetch({ 7 | method: 'POST', 8 | url: `/admin/login`, 9 | data: body, 10 | }).then(data => { 11 | return wholeModel.login(data) 12 | }) 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /moss-ui/src/models/menu/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux'; 2 | 3 | const menu = gluer([]); 4 | 5 | export default menu; 6 | -------------------------------------------------------------------------------- /moss-ui/src/models/notification/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux'; 2 | 3 | const loading = gluer((data: number, state: number) => data + state, 0); 4 | 5 | const notices = gluer([]); 6 | 7 | export default { 8 | loading, 9 | notices, 10 | }; 11 | -------------------------------------------------------------------------------- /moss-ui/src/models/notification/service.ts: -------------------------------------------------------------------------------- 1 | import { referToState, wholeModel } from '@/util/store' 2 | 3 | let currentCount = 0 4 | const notification = { 5 | addNotice: (source: { message: string; type: string; count?: number }) => { 6 | const state = referToState(wholeModel.notification.notices) 7 | return wholeModel.notification.notices([...state, { ...source, count: ++currentCount }]) 8 | }, 9 | loading: (data: number) => wholeModel.notification.loading(data), 10 | removeNotice: (source: { count?: number }) => { 11 | const state = referToState(wholeModel.notification.notices) 12 | if (state.length) { 13 | const newNotices = [...state] 14 | 15 | state.forEach((notice: INotice, index: number) => { 16 | if (notice.count === source.count) { 17 | newNotices.splice(index, 1) 18 | } 19 | }) 20 | return wholeModel.notification.notices(newNotices) 21 | } 22 | }, 23 | } 24 | export default notification 25 | -------------------------------------------------------------------------------- /moss-ui/src/models/selectNode/initialState.ts: -------------------------------------------------------------------------------- 1 | export const SELECTNODE = { 2 | SELECTNODE: [], 3 | }; 4 | -------------------------------------------------------------------------------- /moss-ui/src/models/selectNode/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux'; 2 | 3 | import { SELECTNODE } from './initialState'; 4 | 5 | // 选择节点 6 | const SelectNode = gluer((data: any) => { 7 | return { 8 | data, 9 | }; 10 | }, SELECTNODE); 11 | 12 | const nodeList = { 13 | SelectNode, 14 | }; 15 | 16 | export default nodeList; 17 | -------------------------------------------------------------------------------- /moss-ui/src/models/selectNode/service.ts: -------------------------------------------------------------------------------- 1 | import fetch from '@/util/fetch'; 2 | 3 | import model from './model'; 4 | 5 | const selectNode = { 6 | /* 节点列表 */ 7 | fetchApplicationNodelist: () => { 8 | return fetch({ 9 | method: 'get', 10 | url: `api/applications/`, 11 | }).then((data: any) => { 12 | return Promise.resolve(model.SelectNode(data)); 13 | }); 14 | }, 15 | }; 16 | 17 | export default selectNode; 18 | -------------------------------------------------------------------------------- /moss-ui/src/models/tab/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux'; 2 | 3 | const tab = gluer(['dashboard']); 4 | export default tab; 5 | -------------------------------------------------------------------------------- /moss-ui/src/models/tab/service.ts: -------------------------------------------------------------------------------- 1 | import { getMenuInfo } from '@/models/menu/service' 2 | import { referToState, wholeModel } from '@/util/store' 3 | 4 | const model = wholeModel.tab 5 | 6 | export default { 7 | addTab: (source: { title: string; force?: boolean }) => { 8 | const state = referToState(model) 9 | const { title, force } = source 10 | const info = getMenuInfo(title) 11 | 12 | if (info) { 13 | const isOpened = state.indexOf(title) > -1 14 | let final 15 | 16 | if (isOpened) { 17 | final = state 18 | } else if (info.isExternal || force || state.length < 2) { 19 | final = state.concat(title) 20 | } else { 21 | const internalInfo = getMenuInfo(state[1]) 22 | 23 | state.splice(1, internalInfo.isExternal ? 0 : 1, title) 24 | final = [...state] 25 | } 26 | return model(final) 27 | } 28 | return model([...state]) 29 | }, 30 | removeTab: (source: { title: string; force?: boolean }) => { 31 | const state = referToState(model) 32 | const { title } = source 33 | return model(state.filter((tabTitle: string) => tabTitle !== title)) 34 | }, 35 | } 36 | -------------------------------------------------------------------------------- /moss-ui/src/models/user/model.ts: -------------------------------------------------------------------------------- 1 | import { gluer } from 'glue-redux' 2 | 3 | const User = gluer((data: UserData): UserData => { 4 | return data 5 | }, []) 6 | 7 | const userMgmt = { 8 | User, 9 | } 10 | 11 | export default userMgmt 12 | -------------------------------------------------------------------------------- /moss-ui/src/models/user/service.ts: -------------------------------------------------------------------------------- 1 | import fetch from '@/util/fetch' 2 | 3 | import model from './model' 4 | 5 | export default { 6 | fetchUserList: ( 7 | username: string = '', 8 | pageNo: number = 1, 9 | name: string = '', 10 | pageSize: number = 10 11 | ) => { 12 | debugger 13 | return fetch({ 14 | method: 'POST', 15 | url: `admin/user/pageList`, 16 | data: { username, name, pageNo, pageSize }, 17 | }).then((data: any) => { 18 | data.list = data.list.map((d: any) => { 19 | d.isDeleted = d.isDeleted === 1 ? true : false 20 | return d 21 | }) 22 | return model.User(data) 23 | }) 24 | }, 25 | deleteUser: (userId: number) => { 26 | return fetch({ 27 | url: `admin/user/delete/${userId}`, 28 | }) 29 | }, 30 | 31 | 32 | createUser: (userData: any) => { 33 | return fetch({ 34 | method: 'POST', 35 | url: `admin/user/add`, 36 | data: userData, 37 | }) 38 | }, 39 | 40 | updateUser: (userData: any) => { 41 | return fetch({ 42 | method: 'POST', 43 | url: `admin/user/update`, 44 | data: userData, 45 | }) 46 | }, 47 | } 48 | -------------------------------------------------------------------------------- /moss-ui/src/pages/.umi/DvaContainer.js: -------------------------------------------------------------------------------- 1 | import { Component } from 'react'; 2 | 3 | class DvaContainer extends Component { 4 | render() { 5 | window.g_app.router(() => this.props.children); 6 | return window.g_app.start()(); 7 | } 8 | } 9 | 10 | export default DvaContainer; 11 | -------------------------------------------------------------------------------- /moss-ui/src/pages/.umi/TitleWrapper.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default class UmiReactTitle extends React.Component { 4 | componentDidMount() { 5 | document.title = this.props.route._title; 6 | } 7 | getTitle() { 8 | const separator = '' || ' - '; 9 | const title = this.props.route._title.split(separator).map(item => { 10 | return formatMessage({ 11 | id: item.trim(), 12 | defaultMessage: item.trim(), 13 | }); 14 | }) 15 | return title.join(separator); 16 | } 17 | componentWillUnmount() { 18 | if (document.title === this.props.route._title) { 19 | document.title = this.props.route._title; 20 | } 21 | } 22 | render() { 23 | return this.props.children; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /moss-ui/src/pages/.umi/initDva.js: -------------------------------------------------------------------------------- 1 | import dva from 'dva'; 2 | import createLoading from 'dva-loading'; 3 | 4 | const runtimeDva = window.g_plugins.mergeConfig('dva'); 5 | let app = dva({ 6 | history: window.g_history, 7 | 8 | ...(runtimeDva.config || {}), 9 | }); 10 | 11 | window.g_app = app; 12 | app.use(createLoading()); 13 | (runtimeDva.plugins || []).forEach(plugin => { 14 | app.use(plugin); 15 | }); 16 | 17 | 18 | -------------------------------------------------------------------------------- /moss-ui/src/pages/.umi/initHistory.js: -------------------------------------------------------------------------------- 1 | // create history 2 | window.g_history = require('history/createHashHistory').default({}); 3 | -------------------------------------------------------------------------------- /moss-ui/src/pages/.umi/polyfills.js: -------------------------------------------------------------------------------- 1 | import '@babel/polyfill'; 2 | 3 | -------------------------------------------------------------------------------- /moss-ui/src/pages/Admin/Pages/OSManage/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Route, Switch } from 'react-router' 3 | import menuEdit from './menuEdit' 4 | import menuManage from './menuManage' 5 | import menuNew from './menuNew' 6 | import modifyExample from './modifyExample' 7 | class OSManage extends React.Component { 8 | public render() { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ) 20 | } 21 | } 22 | export default OSManage 23 | -------------------------------------------------------------------------------- /moss-ui/src/pages/Admin/Pages/SwitchCenter/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, Switch } from 'react-router'; 3 | 4 | import switchManage from './switchManage'; 5 | import switchPushLog from './switchPushLog'; 6 | 7 | class SwitchManage extends React.Component { 8 | public render() { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | } 18 | } 19 | 20 | export default SwitchManage; 21 | -------------------------------------------------------------------------------- /moss-ui/src/pages/Admin/Pages/SwitchCenter/switchPushLog.tsx: -------------------------------------------------------------------------------- 1 | import PageTitle from '@/components/PageTitle'; 2 | import { Col, Layout, Row } from 'antd'; 3 | import React from 'react'; 4 | 5 | const SwitchPushLog = React.memo(() => { 6 | return ( 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | }); 18 | 19 | export default SwitchPushLog; 20 | -------------------------------------------------------------------------------- /moss-ui/src/pages/Admin/Pages/index.ts: -------------------------------------------------------------------------------- 1 | import './style.less'; 2 | 3 | import Application from './Application'; 4 | import CodeGenerate from './CodeGenerate'; 5 | import Dashboard from './Dashboard'; 6 | import OSManage from './OSManage'; 7 | import SwitchCenter from './SwitchCenter'; 8 | 9 | const pages: { [key: string]: any } = { 10 | Application, 11 | Dashboard, 12 | CodeGenerate, 13 | OSManage, 14 | SwitchCenter, 15 | }; 16 | 17 | export default pages; 18 | -------------------------------------------------------------------------------- /moss-ui/src/pages/Admin/style.less: -------------------------------------------------------------------------------- 1 | #stage { 2 | display: flex; 3 | 4 | iframe { 5 | flex: auto; 6 | overflow: auto; 7 | border: 0; 8 | } 9 | 10 | & > div { 11 | display: none; 12 | flex: auto; 13 | flex-direction: column; 14 | 15 | &.active { 16 | display: flex; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /moss-ui/src/pages/__tests__/__mocks__/umi-plugin-locale.ts: -------------------------------------------------------------------------------- 1 | export const formatMessage = (): string => 'Mock text'; 2 | -------------------------------------------------------------------------------- /moss-ui/src/pages/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | import 'jest'; 2 | import Index from '..'; 3 | import React from 'react'; 4 | import renderer, { ReactTestInstance, ReactTestRenderer } from 'react-test-renderer'; 5 | 6 | jest.mock('umi-plugin-locale'); 7 | 8 | describe('Page: index', () => { 9 | it('Render correctly', () => { 10 | const wrapper: ReactTestRenderer = renderer.create(); 11 | expect(wrapper.root.children.length).toBe(1); 12 | const outerLayer = wrapper.root.children[0] as ReactTestInstance; 13 | expect(outerLayer.type).toBe('div'); 14 | expect(outerLayer.children.length).toBe(2); 15 | const getStartLink = outerLayer.findAllByProps({ 16 | href: 'https://umijs.org/guide/getting-started.html', 17 | }) as ReactTestInstance[]; 18 | expect(getStartLink.length).toBe(1); 19 | expect(getStartLink[0].children).toMatchObject(['Mock text']); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /moss-ui/src/pages/document.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 莫斯-服务治理平台 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /moss-ui/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import App from '@/pages/App' 2 | import { polyfill } from 'es6-promise' 3 | import React from 'react' 4 | 5 | if (window.Promise && !window.Promise.prototype.finally) { 6 | window.Promise = null 7 | polyfill() 8 | } 9 | 10 | export default function() { 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /moss-ui/src/style/antDesignOverride.less: -------------------------------------------------------------------------------- 1 | // ant design override 2 | 3 | // ant design notification override 4 | .ant-notification-notice-closable { 5 | border-radius: 25px; 6 | } 7 | 8 | .ant-notification-notice-with-icon { 9 | display: flex; 10 | flex-direction: column; 11 | justify-content: center; 12 | 13 | .ant-notification-notice-message { 14 | font-weight: 500; 15 | color: black; 16 | } 17 | 18 | .ant-notification-notice-description { 19 | font-size: 12px; 20 | } 21 | 22 | .icon { 23 | width: 46px; 24 | margin-left: -12px; 25 | } 26 | } 27 | 28 | .ant-tooltip-inner { 29 | user-select: text; 30 | } 31 | -------------------------------------------------------------------------------- /moss-ui/src/style/icon/icon.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'iconfont'; 3 | src: url('./iconfont.eot?t=1529483438781'); 4 | } 5 | 6 | .iconfont { 7 | font-family: 'iconfont', sans-serif !important; 8 | font-style: normal; 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | } 12 | 13 | .icon-back::before { 14 | content: '\e610'; 15 | } 16 | 17 | .icon-close::before { 18 | content: '\e611'; 19 | } 20 | 21 | .icon-eye-close::before { 22 | content: '\e612'; 23 | } 24 | 25 | .icon-eye-open::before { 26 | content: '\e613'; 27 | } 28 | 29 | .icon-unselectednormal::before { 30 | content: '\e614'; 31 | } 32 | 33 | .icon-success::before { 34 | content: '\e615'; 35 | } 36 | 37 | .icon-info::before { 38 | content: '\e617'; 39 | } 40 | 41 | .icon-error::before { 42 | content: '\e618'; 43 | } 44 | 45 | .icon-selectednormal::before { 46 | content: '\e61a'; 47 | } 48 | -------------------------------------------------------------------------------- /moss-ui/src/style/icon/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/style/icon/iconfont.eot -------------------------------------------------------------------------------- /moss-ui/src/style/icon/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/style/icon/iconfont.ttf -------------------------------------------------------------------------------- /moss-ui/src/style/icon/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-ui/src/style/icon/iconfont.woff -------------------------------------------------------------------------------- /moss-ui/src/style/index.less: -------------------------------------------------------------------------------- 1 | @import (reference) './constants.less'; 2 | 3 | html { 4 | font-size: 100px; 5 | } 6 | 7 | body { 8 | font-family: @font-family-base; 9 | font-size: 0.14rem; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | -webkit-touch-callout: none; 13 | -webkit-touch-scrolling: touch; 14 | -webkit-overflow-scrolling: touch; 15 | -webkit-tap-highlight-color: rgba(200, 200, 200, 0); 16 | } 17 | 18 | .link, 19 | a, 20 | a:hover, 21 | a:active { 22 | text-decoration-line: none; 23 | } 24 | 25 | p { 26 | line-height: 1.5; 27 | } 28 | 29 | h1 { 30 | margin-bottom: 0.3rem; 31 | font-size: 0.24rem; 32 | line-height: 1.5; 33 | } 34 | 35 | * { 36 | box-sizing: border-box; 37 | } 38 | 39 | pre { 40 | user-select: text; 41 | } 42 | 43 | @import './icon/icon'; 44 | @import './form.less'; 45 | @import './antDesignOverride.less'; 46 | -------------------------------------------------------------------------------- /moss-ui/src/style/util.less: -------------------------------------------------------------------------------- 1 | /* --- CLEARFIX --- */ 2 | .clearfix() { 3 | *zoom: 1; 4 | 5 | &::before, 6 | &::after { 7 | display: table; 8 | line-height: 0; 9 | content: ''; 10 | } 11 | 12 | &::after { 13 | clear: both; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /moss-ui/src/util/commonTableRender.ts: -------------------------------------------------------------------------------- 1 | import moment from 'moment' 2 | 3 | export const renderBoolean = (booleanValue: boolean | number) => { 4 | return Boolean(Number(booleanValue)) ? '是' : '否' 5 | } 6 | 7 | export const renderDate = (format?: string) => (date: string | number) => { 8 | if (format) { 9 | return moment(String(date), format).fromNow() 10 | } else { 11 | return moment(String(date)).fromNow() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /moss-ui/src/util/eventbus.ts: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'events'; 2 | 3 | export const EventBus = new EventEmitter(); 4 | export const EVENTS = { COLLAPSE_CHANGE: 'COLLAPSE_CHANGE' }; 5 | -------------------------------------------------------------------------------- /moss-ui/src/util/timestamp.ts: -------------------------------------------------------------------------------- 1 | // 时间戳转本地时间 2 | export function getLocalTime(str: string) { 3 | return new Date(parseInt(str, 10)).toLocaleString().replace(/:\d{1,2}$/, ' '); 4 | } 5 | 6 | // 获取当前时分秒 7 | export function getTime(timeType: string) { 8 | const myDate = new Date(); 9 | const hours = myDate.getHours(); // 获取当前小时数(0-23) 10 | const minutes = myDate.getMinutes(); // 获取当前分钟数(0-59) 11 | const seconds = myDate.getSeconds(); // 获取当前秒数(0-59) 12 | let returnDate = ''; 13 | if (timeType === 'hms') { 14 | returnDate = `${hours}:${minutes}:${seconds}`; 15 | } 16 | return returnDate; 17 | } 18 | 19 | export function timestampToTime(timestamp: number) { 20 | const unixTimestamp = new Date(timestamp); 21 | const commonTime = unixTimestamp.toLocaleString(); 22 | return commonTime; 23 | } 24 | -------------------------------------------------------------------------------- /moss-ui/src/util/validator.ts: -------------------------------------------------------------------------------- 1 | const phoneRegexp = new RegExp(/^(\d{3})\d{4}(\d{4})$/); 2 | const passwordRegexp = new RegExp(/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$/); 3 | 4 | export function isPhone(str: string): boolean { 5 | return phoneRegexp.test(str); 6 | } 7 | 8 | export function isPassword(str: string): boolean { 9 | return passwordRegexp.test(str); 10 | } 11 | -------------------------------------------------------------------------------- /moss-ui/stylelint.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = { 3 | extends: ['stylelint-config-standard', 'stylelint-config-recess-order'], 4 | rules: { 'no-descending-specificity': null }, 5 | ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'], 6 | }; 7 | -------------------------------------------------------------------------------- /moss-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "importHelpers": true, 7 | "jsx": "react", 8 | "esModuleInterop": true, 9 | "sourceMap": true, 10 | "strict": true, 11 | "noImplicitReturns": true, 12 | "allowSyntheticDefaultImports": true, 13 | "noUnusedLocals": true, 14 | "noUnusedParameters": true, 15 | "skipLibCheck": true, 16 | "pretty": true, 17 | "baseUrl": ".", 18 | "paths": { 19 | "@/*": ["src/*"] 20 | } 21 | }, 22 | "include": ["src/*", "src/**/*", "./typings.d.ts"] 23 | } 24 | -------------------------------------------------------------------------------- /moss-ui/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": ["tslint-react", "tslint-eslint-rules", "tslint-config-prettier"], 4 | "rules": { 5 | "eofline": true, 6 | "no-construct": true, 7 | "no-reference": true, 8 | "jsx-no-multiline-js": false, 9 | "no-object-literal-type-assertion": false, 10 | "no-implicit-dependencies": false, 11 | "no-submodule-imports": false, 12 | "no-console": false, 13 | "curly": true, 14 | "ordered-imports": true, 15 | "object-literal-sort-keys": false, 16 | "variable-name": [true, "ban-keywords", "allow-leading-underscore"], 17 | "no-unsafe-finally": true, 18 | "no-unused-expression": true, 19 | "no-use-before-declare": true, 20 | "no-var-keyword": true, 21 | "triple-equals": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /moss-web/src/main/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM java:alpine 2 | VOLUME /tmp 3 | ADD moss-web.jar app.jar 4 | ENTRYPOINT ["java","-jar","/app.jar"] 5 | -------------------------------------------------------------------------------- /moss-web/src/main/java/org/xujin/moss/config/Swagger2Config.java: -------------------------------------------------------------------------------- 1 | package org.xujin.moss.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import springfox.documentation.builders.ApiInfoBuilder; 6 | import springfox.documentation.builders.PathSelectors; 7 | import springfox.documentation.service.ApiInfo; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @Configuration 13 | @EnableSwagger2 14 | public class Swagger2Config { 15 | 16 | @Bean 17 | public Docket createRestApi() { 18 | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() 19 | .paths(PathSelectors.any()).build(); 20 | } 21 | private ApiInfo apiInfo() { 22 | return new ApiInfoBuilder().title("服务治理平台").description("统一的服务服务治理平台测试") 23 | .contact("Software_King@qq.com").version("2.0").build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/META-INF/spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "hints": [], 3 | "groups": [], 4 | "properties": [ 5 | { 6 | "name": "logging.moss.path", 7 | "type": "java.lang.String", 8 | "defaultValue":"~/logs", 9 | "description":"logback files prefix." 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-consul.yml: -------------------------------------------------------------------------------- 1 | management: 2 | server: 3 | port: 8082 4 | 5 | 6 | spring: 7 | cloud: 8 | consul: 9 | discovery: 10 | tags: management.port=${management.port} -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-eureka.yml: -------------------------------------------------------------------------------- 1 | eureka: 2 | instance: 3 | leaseRenewalIntervalInSeconds: 10 4 | health-check-url-path: /actuator/health 5 | prefer-ip-address: true 6 | client: 7 | enabled: false -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-h2.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | url: jdbc:h2:mem:moss;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL 4 | username: root 5 | password: 6 | driver-class-name: org.h2.Driver 7 | type: com.alibaba.druid.pool.DruidDataSource 8 | filters: stat 9 | maxActive: 20 10 | initialSize: 1 11 | maxWait: 60000 12 | minIdle: 1 13 | timeBetweenEvictionRunsMillis: 60000 14 | minEvictableIdleTimeMillis: 300000 15 | validationQuery: select 'x' 16 | testWhileIdle: false 17 | testOnBorrow: false 18 | testOnReturn: false 19 | poolPreparedStatements: true 20 | maxOpenPreparedStatements: 20 21 | schema: classpath:db/h2/moss-init.sql 22 | h2: 23 | console: 24 | enabled: true 25 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-mysql.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | url: jdbc:mysql://${DATASOURCE_HOST:localhost}:${DATASOURCE_PORT:3306}/moss?useUnicode=true&characterEncoding=utf8&useSSL=false 4 | username: ${DATASOURCE_USERNAME:root} 5 | password: ${DATASOURCE_PASSWORD:root123} 6 | driver-class-name: com.mysql.cj.jdbc.Driver 7 | type: com.alibaba.druid.pool.DruidDataSource 8 | filters: stat 9 | maxActive: 20 10 | initialSize: 1 11 | maxWait: 60000 12 | minIdle: 1 13 | timeBetweenEvictionRunsMillis: 60000 14 | minEvictableIdleTimeMillis: 300000 15 | validationQuery: select 'x' 16 | testWhileIdle: true 17 | testOnBorrow: false 18 | testOnReturn: false 19 | poolPreparedStatements: true 20 | maxOpenPreparedStatements: 20 21 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-nacos.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | nacos: 4 | discovery: 5 | server-addr: 127.0.0.1:8848 6 | maxOpenPreparedStatements: 20 7 | 8 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application-zookeeper.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | zookeeper: 4 | connect-string: localhost:2181 5 | discovery: 6 | root: /moss-client 7 | management: 8 | endpoints: 9 | web: 10 | exposure: 11 | include: '*' 12 | exclude: ['pause', 'refresh', 'restart', 'resume', 'shutdown', 'heapdump'] 13 | jmx: 14 | exposure: 15 | include: '*' 16 | exclude: ['pause', 'refresh', 'restart', 'resume', 'shutdown', 'heapdump'] 17 | endpoint: 18 | health: 19 | show-details: always 20 | heapdump: 21 | enabled: false 22 | pause: 23 | enabled: false 24 | refresh: 25 | enabled: false 26 | restart: 27 | enabled: false 28 | resume: 29 | enabled: false 30 | shutdown: 31 | enabled: false 32 | info: 33 | git: 34 | mode: full 35 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/application.properties: -------------------------------------------------------------------------------- 1 | info.groupId: @project.groupId@ 2 | info.artifactId: @project.artifactId@ 3 | info.version: @project.version@ 4 | -------------------------------------------------------------------------------- /moss-web/src/main/resources/config/readme.md: -------------------------------------------------------------------------------- 1 | # Application Properties 2 | 3 | you can easily change the registry and backend database type by `spring.profiles.active` -------------------------------------------------------------------------------- /moss-web/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 莫斯-服务治理平台
-------------------------------------------------------------------------------- /moss-web/src/main/resources/static/static/MYSQL.15a5498c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-web/src/main/resources/static/static/MYSQL.15a5498c.png -------------------------------------------------------------------------------- /moss-web/src/main/resources/static/static/delIcon.8939d775.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-web/src/main/resources/static/static/delIcon.8939d775.jpg -------------------------------------------------------------------------------- /moss-web/src/main/resources/static/static/kafka.bd032ad8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-web/src/main/resources/static/static/kafka.bd032ad8.png -------------------------------------------------------------------------------- /moss-web/src/main/resources/static/static/warning.f07d2bc9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GrailStack/Moss/9e54b0274ddb769c411343cb736467867bf28b82/moss-web/src/main/resources/static/static/warning.f07d2bc9.gif --------------------------------------------------------------------------------