├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── lib ├── alloy-skin-1.4.4.jar ├── jcalendar-1.3.4.200905090658.jar ├── jdesktop-swing-worker-1.2.jar ├── jdesktop-swingx-1.0.jar ├── jide-oss-2.9.7.jar ├── l2fprod-common-all-7.3.jar ├── nepxion-cots-1.0.0.jar ├── nepxion-swing-1.0.0.jar ├── nepxion-util-1.0.0.jar ├── twaver-3.7.jar ├── twaver-gis-3.7.jar └── twaver-layouter-3.7.jar ├── pom.xml └── src ├── assembly ├── dist.xml ├── startup.bat └── startup.sh └── main ├── java └── com │ └── nepxion │ └── discovery │ └── console │ ├── cache │ └── ConsoleCache.java │ ├── controller │ ├── ConsoleController.java │ └── ConsoleInterceptor.java │ ├── desktop │ ├── ConsoleFrame.java │ ├── ConsoleHierarchy.java │ ├── ConsoleInitializer.java │ ├── ConsoleLauncher.java │ ├── ConsoleLogin.java │ ├── common │ │ ├── component │ │ │ ├── AbstractConsoleHierarchy.java │ │ │ └── AbstractConsoleLogin.java │ │ ├── context │ │ │ ├── ConsoleBannerContext.java │ │ │ ├── ConsoleConstant.java │ │ │ ├── ConsoleDataContext.java │ │ │ ├── ConsolePropertiesContext.java │ │ │ └── ConsoleUIContext.java │ │ ├── icon │ │ │ └── ConsoleIconFactory.java │ │ ├── locale │ │ │ └── ConsoleLocaleFactory.java │ │ ├── swing │ │ │ ├── dialog │ │ │ │ └── JExceptionDialog.java │ │ │ └── lookandfeel │ │ │ │ └── LookAndFeelManager.java │ │ └── util │ │ │ ├── BorderUtil.java │ │ │ ├── ButtonUtil.java │ │ │ ├── ComboBoxUtil.java │ │ │ ├── DimensionUtil.java │ │ │ ├── ListUtil.java │ │ │ └── TextFieldUtil.java │ └── workspace │ │ ├── AbstractReleaseTopology.java │ │ ├── AbstractStrategyTopology.java │ │ ├── AbstractTopology.java │ │ ├── BlueGreenTopology.java │ │ ├── GrayTopology.java │ │ ├── InspectorTopology.java │ │ ├── panel │ │ ├── BlueGreenConditionPanel.java │ │ ├── BlueGreenCreatePanel.java │ │ ├── CacheSetPanel.java │ │ ├── CreatePanel.java │ │ ├── GrayCreatePanel.java │ │ ├── InspectorConditionPanel.java │ │ ├── InspectorConfirmPanel.java │ │ ├── InspectorParameterPanel.java │ │ ├── LayouterSetPanel.java │ │ ├── MultiPreviewPanel.java │ │ ├── OpenPanel.java │ │ ├── PreviewPanel.java │ │ ├── ResetPanel.java │ │ ├── SetManagePanel.java │ │ ├── SetPanel.java │ │ ├── StrategyCreatePanel.java │ │ └── SubscriptionPanel.java │ │ ├── processor │ │ ├── AbstractReleaseProcessor.java │ │ ├── ReleaseProcessor.java │ │ ├── ReleaseProcessorFactory.java │ │ ├── ReleaseProcessorUtil.java │ │ └── strategy │ │ │ ├── AbstractStrategyReleaseProcessor.java │ │ │ ├── BlueGreenStrategyReleaseProcessor.java │ │ │ ├── GrayStrategyReleaseProcessor.java │ │ │ └── StrategyReleaseProcessor.java │ │ ├── topology │ │ ├── BasicTopology.java │ │ ├── LinkUI.java │ │ ├── NodeImageType.java │ │ ├── NodeLocation.java │ │ ├── NodeSizeType.java │ │ └── NodeUI.java │ │ └── type │ │ ├── AuthorityType.java │ │ ├── DimensionType.java │ │ ├── FeatureType.java │ │ ├── ProtocolType.java │ │ ├── ReleaseType.java │ │ ├── SetType.java │ │ ├── StrategyType.java │ │ └── TypeLocale.java │ └── entity │ └── Instance.java └── resources ├── com └── nepxion │ └── discovery │ └── console │ └── desktop │ └── common │ ├── icon │ ├── load │ │ ├── 1.png │ │ ├── 10.png │ │ ├── 11.png │ │ ├── 12.png │ │ ├── 13.png │ │ ├── 14.png │ │ ├── 15.png │ │ ├── 16.png │ │ ├── 17.png │ │ ├── 18.png │ │ ├── 19.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── 9.png │ ├── logo.png │ ├── navigator │ │ ├── flat │ │ │ ├── close_16.png │ │ │ ├── close_24.png │ │ │ ├── close_32.png │ │ │ ├── open_favorite_16.png │ │ │ ├── open_favorite_24.png │ │ │ └── open_favorite_32.png │ │ └── stereo │ │ │ ├── close_16.png │ │ │ ├── close_20.png │ │ │ ├── close_24.png │ │ │ ├── close_32.png │ │ │ ├── close_48.png │ │ │ ├── open_16.png │ │ │ ├── open_20.png │ │ │ ├── open_24.png │ │ │ ├── open_32.png │ │ │ ├── open_48.png │ │ │ ├── open_favorite_16.png │ │ │ ├── open_favorite_20.png │ │ │ ├── open_favorite_24.png │ │ │ ├── open_favorite_32.png │ │ │ ├── open_favorite_48.png │ │ │ └── plus │ │ │ ├── close.ico │ │ │ ├── open.ico │ │ │ └── open_favorite.ico │ ├── outlook │ │ └── stereo │ │ │ ├── authority_discovery.png │ │ │ ├── authority_other.png │ │ │ ├── authority_register.png │ │ │ ├── authority_strategy.png │ │ │ ├── blacklist.png │ │ │ ├── blue_green.png │ │ │ ├── blue_green_1.png │ │ │ ├── blue_green_2.png │ │ │ ├── database_blue_green.png │ │ │ ├── gray.png │ │ │ ├── gray_1.png │ │ │ ├── gray_2.png │ │ │ ├── inspector.png │ │ │ ├── inspector_1.png │ │ │ ├── message_queue_blue_green.png │ │ │ └── plus │ │ │ ├── authority_discovery.png │ │ │ ├── authority_other.png │ │ │ ├── authority_register.png │ │ │ ├── authority_strategy.png │ │ │ ├── blacklist.png │ │ │ ├── blue_green.ico │ │ │ ├── blue_green_1.png │ │ │ ├── blue_green_2.ico │ │ │ ├── database_blue_green.png │ │ │ ├── gray.png │ │ │ ├── gray_1.ico │ │ │ ├── gray_1.png │ │ │ ├── gray_2.png │ │ │ ├── inspector.png │ │ │ ├── inspector_1.png │ │ │ └── message_queue_blue_green.png │ ├── selector.png │ └── topology │ │ ├── gateway_black_32.png │ │ ├── gateway_black_48.png │ │ ├── gateway_black_64.png │ │ ├── gateway_blue_32.png │ │ ├── gateway_blue_48.png │ │ ├── gateway_blue_64.png │ │ ├── gateway_gray_32.png │ │ ├── gateway_gray_48.png │ │ ├── gateway_gray_64.png │ │ ├── gateway_green_32.png │ │ ├── gateway_green_48.png │ │ ├── gateway_green_64.png │ │ ├── gateway_group_32.png │ │ ├── gateway_group_48.png │ │ ├── gateway_group_64.png │ │ ├── gateway_group_80.png │ │ ├── gateway_orange_32.png │ │ ├── gateway_orange_48.png │ │ ├── gateway_orange_64.png │ │ ├── gateway_yellow_32.png │ │ ├── gateway_yellow_48.png │ │ ├── gateway_yellow_64.png │ │ ├── service_black_32.png │ │ ├── service_black_48.png │ │ ├── service_black_64.png │ │ ├── service_blue_32.png │ │ ├── service_blue_48.png │ │ ├── service_blue_64.png │ │ ├── service_gray_32.png │ │ ├── service_gray_48.png │ │ ├── service_gray_64.png │ │ ├── service_green_32.png │ │ ├── service_green_48.png │ │ ├── service_green_64.png │ │ ├── service_group_32.png │ │ ├── service_group_48.png │ │ ├── service_group_64.png │ │ ├── service_group_80.png │ │ ├── service_orange_32.png │ │ ├── service_orange_48.png │ │ ├── service_orange_64.png │ │ ├── service_yellow_32.png │ │ ├── service_yellow_48.png │ │ ├── service_yellow_64.png │ │ └── svg │ │ ├── gateway_black.svg │ │ ├── gateway_blue.svg │ │ ├── gateway_gray.svg │ │ ├── gateway_green.svg │ │ ├── gateway_orange.svg │ │ ├── gateway_yellow.svg │ │ ├── service_black.svg │ │ ├── service_blue.svg │ │ ├── service_gray.svg │ │ ├── service_green.svg │ │ ├── service_orange.svg │ │ └── service_yellow.svg │ └── locale │ ├── Locale.bat │ ├── Locale.properties │ ├── Locale_en_US.properties │ └── Locale_zh_CN.properties ├── config └── console.properties └── logback.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have UNIX line endings on checkout. 2 | *.sh text eol=lf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | .classpath 4 | .springBeans 5 | .factorypath 6 | # Mobile Tools for Java (J2ME) 7 | .mtj.tmp/ 8 | 9 | *.class 10 | *.classpath 11 | *.project 12 | *.springBeans 13 | bin/ 14 | log/ 15 | test-output/ 16 | 17 | # Package Files # 18 | *.jar 19 | *.war 20 | *.ear 21 | *.zip 22 | *.tar.gz 23 | *.rar 24 | *.swp 25 | *.log 26 | *.ctxt 27 | # nodejs local modules 28 | .tags* 29 | .idea/ 30 | *.iml 31 | .gradle/ 32 | .settings/ 33 | target/ 34 | hs_err_pid* -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://nepxion.github.io/Discovery/docs/discovery-doc/Banner.png) 2 | 3 | # Discovery【探索】云原生微服务解决方案 4 | ![Total visits](https://visitor-badge.laobi.icu/badge?page_id=Nepxion&title=total%20visits) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license)](https://github.com/Nepxion/Discovery/blob/6.x.x/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/com.nepxion/discovery.svg?label=maven)](https://search.maven.org/artifact/com.nepxion/discovery) [![Javadocs](http://www.javadoc.io/badge/com.nepxion/discovery-plugin-framework-starter.svg)](http://www.javadoc.io/doc/com.nepxion/discovery-plugin-framework-starter) [![Build Status](https://github.com/Nepxion/Discovery/workflows/build/badge.svg)](https://github.com/Nepxion/Discovery/actions) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/5c42eb719ef64def9cad773abd877e8b)](https://www.codacy.com/gh/Nepxion/Discovery/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Nepxion/Discovery&utm_campaign=Badge_Grade) [![Stars](https://img.shields.io/github/stars/Nepxion/Discovery.svg?label=Stars&style=flat&logo=GitHub)](https://github.com/Nepxion/Discovery/stargazers) [![Stars](https://gitee.com/Nepxion/Discovery/badge/star.svg?theme=gvp)](https://gitee.com/Nepxion/Discovery/stargazers) 5 | 6 | [![Wiki](https://badgen.net/badge/icon/wiki?icon=wiki&label=GitHub)](https://github.com/Nepxion/Discovery/wiki) [![Wiki](https://badgen.net/badge/icon/wiki?icon=wiki&label=Gitee)](https://gitee.com/nepxion/Discovery/wikis/pages?sort_id=3993615&doc_id=1124387) [![Discovery PPT](https://img.shields.io/badge/Discovery%20-ppt-brightgreen?logo=Microsoft%20PowerPoint)](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt.html) [![Discovery Page](https://img.shields.io/badge/Discovery%20-page-brightgreen?logo=Microsoft%20Edge)](https://nepxion.github.io/Discovery/) [![Discovery Platform Page](https://img.shields.io/badge/Discovery%20Platform%20-page-brightgreen?logo=Microsoft%20Edge)](https://nepxion.github.io/DiscoveryPlatform) [![Discovery Desktop Page](https://img.shields.io/badge/Discovery%20Desktop%20-page-brightgreen?logo=Microsoft%20Edge)](https://nepxion.github.io/DiscoveryDesktop) [![Polaris Page](https://img.shields.io/badge/Polaris%20-page-brightgreen?logo=Microsoft%20Edge)](https://polaris-paas.github.io/polaris-wiki) 7 | 8 |             9 | 10 | 如果您觉得本框架具有一定的参考价值和借鉴意义,请帮忙在页面右上角 [**Star**] 11 | 12 | ## 简介 13 | 14 | ### 作者简介 15 | - Nepxion开源社区创始人 16 | - 2020年阿里巴巴中国云原生峰会出品人 17 | - 2020年被Nacos和Spring Cloud Alibaba纳入相关开源项目 18 | - 2021年阿里巴巴技术峰会上海站演讲嘉宾 19 | - 2021年荣获陆奇博士主持的奇绩资本,进行风险投资的关注和调研 20 | - 2021年入选Gitee最有价值开源项目 21 | - 2024年入围中国开源创新榜候选项目 22 | - 阿里巴巴官方书籍《Nacos架构与原理》作者之一 23 | - Spring Cloud Alibaba Steering Committer、Nacos Group Member 24 | - Spring Cloud Alibaba、Nacos、Sentinel、OpenTracing Committer & Contributor 25 | 26 | 27 | 28 | ### 商业合作 29 | ① Discovery系列 30 | 31 | | 框架名称 | 框架版本 | 支持Spring Cloud版本 | 使用许可 | 32 | | --- | --- | --- | --- | 33 | | Discovery | 1.x.x ~ 6.x.x | Camden ~ Hoxton | 开源,永久免费 | 34 | | DiscoveryX | 7.x.x + | 2020 + | 闭源,商业许可 | 35 | 36 | ② Polaris系列 37 | 38 | Polaris为Discovery高级定制版,特色功能 39 | 40 | - 基于Nepxion Discovery集成定制 41 | - 多云、多活、多机房流量调配 42 | - 跨云动态域名、跨环境适配 43 | - DCN、DSU、SET单元化部署 44 | - 组件灵活装配、配置对外屏蔽 45 | - 极简低代码PaaS平台 46 | 47 | | 框架名称 | 框架版本 | 支持Discovery版本 | 支持Spring Cloud版本 | 使用许可 | 48 | | --- | --- | --- | --- | --- | 49 | | Polaris | 1.x.x | 6.x.x | Finchley ~ Hoxton | 闭源,商业许可 | 50 | | Polaris | 2.x.x | 7.x.x + | 2020 + | 闭源,商业许可 | 51 | 52 | 有商业版需求的企业和用户,请添加微信1394997,联系作者,洽谈合作事宜 53 | 54 | ### 入门资料 55 | ![](https://nepxion.github.io/Discovery/docs/discovery-doc/Logo64.png) Discovery【探索】企业级云原生微服务开源解决方案 56 | 57 | ① 快速入门 58 | - [快速入门Github版](https://github.com/Nepxion/Discovery/wiki) 59 | - [快速入门Gitee版](https://gitee.com/Nepxion/Discovery/wikis/pages) 60 | 61 | ② 解决方案 62 | - [解决方案WIKI版](http://nepxion.com/discovery) 63 | - [解决方案PPT版](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt.html) 64 | 65 | ③ 最佳实践 66 | - [最佳实践PPT版](https://nepxion.github.io/Discovery/docs/link-doc/discovery-ppt-1.html) 67 | 68 | ④ 平台桌面 69 | - [平台界面WIKI版](http://nepxion.com/discovery-platform) 70 | - [图形桌面WIKI版](http://nepxion.com/discovery-desktop) 71 | 72 | ⑤ 框架源码 73 | - [框架源码Github版](https://github.com/Nepxion/Discovery) 74 | - [框架源码Gitee版](https://gitee.com/Nepxion/Discovery) 75 | 76 | ⑥ 指南示例源码 77 | - [指南示例源码Github版](https://github.com/Nepxion/DiscoveryGuide) 78 | - [指南示例源码Gitee版](https://gitee.com/Nepxion/DiscoveryGuide) 79 | 80 | ⑦ 指南示例说明 81 | - Spring Cloud Finchley ~ Hoxton版本 82 | - [极简版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple),分支为6.x.x-simple 83 | - [极简版域网关部署指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple-domain-gateway),分支为6.x.x-simple-domain-gateway 84 | - [极简版非域网关部署指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-simple-non-domain-gateway),分支为6.x.x-simple-non-domain-gateway 85 | - [集成版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x),分支为6.x.x 86 | - [高级版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/6.x.x-complex),分支为6.x.x-complex 87 | - Spring Cloud 20xx版本 88 | - [极简版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master-simple),分支为master-simple 89 | - [极简版本地化指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master-simple-native),分支为master-simple-native 90 | - [集成版指南示例](https://github.com/Nepxion/DiscoveryGuide/tree/master),分支为master 91 | 92 | ![](https://nepxion.github.io/Discovery/docs/polaris-doc/Logo64.png) Polaris【北极星】企业级云原生微服务商业解决方案 93 | 94 | ① 解决方案 95 | - [解决方案WIKI版](http://nepxion.com/polaris) 96 | 97 | ② 框架源码 98 | - [框架源码Github版](https://github.com/polaris-paas/polaris-sdk) 99 | - [框架源码Gitee版](https://gitee.com/polaris-paas/polaris-sdk) 100 | 101 | ③ 指南示例源码 102 | - [指南示例源码Github版](https://github.com/polaris-paas/polaris-guide) 103 | - [指南示例源码Gitee版](https://gitee.com/polaris-paas/polaris-guide) 104 | 105 | ④ 指南示例说明 106 | - Spring Cloud Finchley ~ Hoxton版本 107 | - [指南示例](https://github.com/polaris-paas/polaris-guide/tree/1.x.x),分支为1.x.x 108 | - Spring Cloud 20xx版本 109 | - [指南示例](https://github.com/polaris-paas/polaris-guide/tree/master),分支为master 110 | 111 | ### 请联系我 112 | 微信、钉钉、公众号和文档 113 | 114 | ![](https://nepxion.github.io/Discovery/docs/contact-doc/wechat-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/dingding-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/gongzhonghao-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/document-1.jpg) 115 | 116 | ## Star走势图 117 | [![Stargazers over time](https://starchart.cc/Nepxion/Discovery.svg)](https://starchart.cc/Nepxion/Discovery) -------------------------------------------------------------------------------- /lib/alloy-skin-1.4.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/alloy-skin-1.4.4.jar -------------------------------------------------------------------------------- /lib/jcalendar-1.3.4.200905090658.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/jcalendar-1.3.4.200905090658.jar -------------------------------------------------------------------------------- /lib/jdesktop-swing-worker-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/jdesktop-swing-worker-1.2.jar -------------------------------------------------------------------------------- /lib/jdesktop-swingx-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/jdesktop-swingx-1.0.jar -------------------------------------------------------------------------------- /lib/jide-oss-2.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/jide-oss-2.9.7.jar -------------------------------------------------------------------------------- /lib/l2fprod-common-all-7.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/l2fprod-common-all-7.3.jar -------------------------------------------------------------------------------- /lib/nepxion-cots-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/nepxion-cots-1.0.0.jar -------------------------------------------------------------------------------- /lib/nepxion-swing-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/nepxion-swing-1.0.0.jar -------------------------------------------------------------------------------- /lib/nepxion-util-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/nepxion-util-1.0.0.jar -------------------------------------------------------------------------------- /lib/twaver-3.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/twaver-3.7.jar -------------------------------------------------------------------------------- /lib/twaver-gis-3.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/twaver-gis-3.7.jar -------------------------------------------------------------------------------- /lib/twaver-layouter-3.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/lib/twaver-layouter-3.7.jar -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | com.nepxion 5 | discovery-desktop 6 | Nepxion Discovery Desktop 7 | jar 8 | 4.0.0 9 | 1.1.0 10 | Nepxion DiscoveryDesktop is a desktop for Nepxion Discovery with service governance, blue green and gray release orchestration, modelling, flow inspection 11 | http://www.nepxion.com 12 | 13 | 14 | 6.23.0 15 | 16 | 1.10 17 | 1.2 18 | 1.0 19 | 2.9.7 20 | 7.3 21 | 1.3.4.200905090658 22 | 1.0.0 23 | 1.0.0 24 | 1.0.0 25 | 3.7 26 | 1.4.4 27 | 28 | 1.8 29 | UTF-8 30 | 31 | 32 | 33 | 34 | 35 | com.nepxion 36 | discovery 37 | ${discovery.version} 38 | pom 39 | import 40 | 41 | 42 | 43 | 44 | 45 | 46 | com.nepxion 47 | discovery-plugin-framework-starter-parser 48 | 49 | 50 | 51 | com.nepxion 52 | banner 53 | 54 | 55 | 56 | commons-configuration 57 | commons-configuration 58 | ${commons.configuration.version} 59 | 60 | 61 | 62 | ch.qos.logback 63 | logback-classic 64 | 65 | 66 | 67 | jdesktop 68 | swing-worker 69 | ${swing.worker.version} 70 | system 71 | ${project.basedir}/lib/jdesktop-swing-worker-${swing.worker.version}.jar 72 | 73 | 74 | 75 | jdesktop 76 | swingx 77 | ${swingx.version} 78 | system 79 | ${project.basedir}/lib/jdesktop-swingx-${swingx.version}.jar 80 | 81 | 82 | 83 | jide 84 | oss 85 | ${jide.version} 86 | system 87 | ${project.basedir}/lib/jide-oss-${jide.version}.jar 88 | 89 | 90 | 91 | l2fprod 92 | common-all 93 | ${l2fprod.version} 94 | system 95 | ${project.basedir}/lib/l2fprod-common-all-${l2fprod.version}.jar 96 | 97 | 98 | 99 | jcalendar 100 | jcalendar 101 | ${jcalendar.version} 102 | system 103 | ${project.basedir}/lib/jcalendar-${jcalendar.version}.jar 104 | 105 | 106 | 107 | com.nepxion 108 | swing 109 | ${nepxion.swing.version} 110 | system 111 | ${project.basedir}/lib/nepxion-swing-${nepxion.swing.version}.jar 112 | 113 | 114 | 115 | com.nepxion 116 | util 117 | ${nepxion.util.version} 118 | system 119 | ${project.basedir}/lib/nepxion-util-${nepxion.util.version}.jar 120 | 121 | 122 | 123 | com.nepxion 124 | cots 125 | ${nepxion.cots.version} 126 | system 127 | ${project.basedir}/lib/nepxion-cots-${nepxion.cots.version}.jar 128 | 129 | 130 | 131 | twaver 132 | twaver 133 | ${twaver.version} 134 | system 135 | ${project.basedir}/lib/twaver-${twaver.version}.jar 136 | 137 | 138 | 139 | twaver 140 | twaver-gis 141 | ${twaver.version} 142 | system 143 | ${project.basedir}/lib/twaver-gis-${twaver.version}.jar 144 | 145 | 146 | 147 | twaver 148 | twaver-layouter 149 | ${twaver.version} 150 | system 151 | ${project.basedir}/lib/twaver-layouter-${twaver.version}.jar 152 | 153 | 154 | 155 | com.incors 156 | alloy-skin 157 | ${alloy.version} 158 | system 159 | ${project.basedir}/lib/alloy-skin-${alloy.version}.jar 160 | 161 | 162 | 163 | 164 | ${project.artifactId}-${project.version} 165 | 166 | 167 | org.apache.maven.plugins 168 | maven-compiler-plugin 169 | 170 | 171 | -parameters 172 | 173 | ${project.build.sourceEncoding} 174 | ${java.version} 175 | ${java.version} 176 | 177 | 178 | 179 | maven-assembly-plugin 180 | 181 | 182 | src/assembly/dist.xml 183 | 184 | ${project.build.sourceEncoding} 185 | true 186 | true 187 | 188 | 189 | 190 | make-assembly 191 | package 192 | 193 | single 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /src/assembly/dist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | release 4 | 5 | zip 6 | dir 7 | 8 | false 9 | 10 | 11 | lib 12 | false 13 | runtime 14 | 15 | 16 | 17 | 18 | src/assembly 19 | / 20 | 21 | *.bat 22 | *.sh 23 | 24 | 0744 25 | 26 | 27 | src/main/resources/config 28 | /config 29 | 30 | *.properties 31 | 32 | 0744 33 | 34 | 35 | lib 36 | /lib 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/assembly/startup.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/assembly/startup.bat -------------------------------------------------------------------------------- /src/assembly/startup.sh: -------------------------------------------------------------------------------- 1 | echo -e '\033[32m' 2 | echo '=============================================================' 3 | echo '$ $' 4 | echo '$ Nepxion Discovery $' 5 | echo '$ $' 6 | echo '$ $' 7 | echo '$ $' 8 | echo '$ Nepxion Studio All Right Reserved $' 9 | echo '$ Copyright (C) 2017-2050 $' 10 | echo '$ $' 11 | echo '=============================================================' 12 | 13 | echo -n $'\e'"]0;Nepxion Discovery"$'\a' 14 | 15 | JARPATH=`find lib -name *.jar|xargs|sed "s/ /:/g"` 16 | CONFIGPATH=`find config -name *.properties|xargs|sed "s/ /:/g"` 17 | CLASSPATH="$JARPATH:$CONFIGPATH" 18 | PATH= 19 | 20 | $JAVA_HOME/bin/java -Dfile.encoding=GBK -Ddefault.client.encoding=GBK -Duser.language=zh -Duser.region=CN -Djava.security.policy=java.policy -Djava.library.path=${PATH} -Xms128m -Xmx512m -classpath ${CLASSPATH} -Dnepxion.banner.shown.ansi.mode=true com.nepxion.discovery.console.desktop.ConsoleLauncher 21 | 22 | function pause(){ 23 | echo 'Press any key to continue...' 24 | read -n 1 -p "$*" str_inp 25 | if [ -z "$str_inp" ];then 26 | str_inp=1 27 | fi 28 | if [ $str_inp != '' ];then 29 | echo -ne '\b \n' 30 | fi 31 | } 32 | 33 | pause -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/cache/ConsoleCache.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.cache; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | import org.apache.commons.collections4.CollectionUtils; 16 | 17 | import com.nepxion.discovery.common.entity.ConfigType; 18 | import com.nepxion.discovery.common.entity.DiscoveryType; 19 | import com.nepxion.discovery.console.controller.ConsoleController; 20 | 21 | public class ConsoleCache { 22 | private static String consoleUrl; 23 | private static String accessToken; 24 | 25 | private static DiscoveryType discoveryType; 26 | private static ConfigType configType; 27 | 28 | private static List groups; 29 | private static List gateways; 30 | private static List services; 31 | 32 | private static boolean cacheEnabled = true; 33 | 34 | public static String getConsoleUrl() { 35 | return consoleUrl; 36 | } 37 | 38 | public static void setConsoleUrl(String consoleUrl) { 39 | ConsoleCache.consoleUrl = consoleUrl; 40 | } 41 | 42 | public static String getAccessToken() { 43 | return accessToken; 44 | } 45 | 46 | public static void setAccessToken(String accessToken) { 47 | ConsoleCache.accessToken = accessToken; 48 | } 49 | 50 | public static DiscoveryType getDiscoveryType() { 51 | if (discoveryType == null) { 52 | discoveryType = DiscoveryType.fromString(ConsoleController.getDiscoveryType()); 53 | } 54 | 55 | return discoveryType; 56 | } 57 | 58 | public static ConfigType getConfigType() { 59 | if (configType == null) { 60 | configType = ConfigType.fromString(ConsoleController.getConfigType()); 61 | } 62 | 63 | return configType; 64 | } 65 | 66 | public static List getGroups() { 67 | if (groups == null || !cacheEnabled) { 68 | groups = ConsoleController.getGroups(); 69 | } 70 | 71 | return groups; 72 | } 73 | 74 | public static List getCachedGroups() { 75 | return groups; 76 | } 77 | 78 | public static List refreshGroups() { 79 | groups = ConsoleController.getGroups(); 80 | 81 | return groups; 82 | } 83 | 84 | public static List getGateways() { 85 | if (gateways == null || !cacheEnabled) { 86 | gateways = ConsoleController.getGateways(); 87 | } 88 | 89 | return gateways; 90 | } 91 | 92 | public static List getCachedGateways() { 93 | return gateways; 94 | } 95 | 96 | public static List refreshGateways() { 97 | gateways = ConsoleController.getGateways(); 98 | 99 | return gateways; 100 | } 101 | 102 | public static List getServices() { 103 | if (services == null || !cacheEnabled) { 104 | services = ConsoleController.getServices(); 105 | } 106 | 107 | return services; 108 | } 109 | 110 | public static List getCachedServices() { 111 | return services; 112 | } 113 | 114 | public static List refreshServices() { 115 | services = ConsoleController.getServices(); 116 | 117 | return services; 118 | } 119 | 120 | public static List getRealServices() { 121 | List services = getServices(); 122 | if (CollectionUtils.isEmpty(services)) { 123 | return null; 124 | } 125 | 126 | List gateways = getGateways(); 127 | 128 | List realServices = new ArrayList(); 129 | for (String service : services) { 130 | if (CollectionUtils.isNotEmpty(gateways)) { 131 | if (!gateways.contains(service)) { 132 | realServices.add(service); 133 | } 134 | } else { 135 | realServices.add(service); 136 | } 137 | } 138 | 139 | return realServices; 140 | } 141 | 142 | public static String getKey(String group, String serviceId) { 143 | ConfigType configType = getConfigType(); 144 | String key = null; 145 | if (ConfigType.isSingleKey(configType)) { 146 | key = group + "-" + serviceId; 147 | } else { 148 | key = "Data ID=" + serviceId + " | Group=" + group; 149 | } 150 | 151 | return key; 152 | } 153 | 154 | public static boolean isCacheEnabled() { 155 | return cacheEnabled; 156 | } 157 | 158 | public static void setCacheEnabled(boolean cacheEnabled) { 159 | ConsoleCache.cacheEnabled = cacheEnabled; 160 | } 161 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/controller/ConsoleInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.controller; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @author Fengfeng Li 10 | * @version 1.0 11 | */ 12 | 13 | import java.io.IOException; 14 | import java.util.List; 15 | 16 | import org.apache.commons.collections4.CollectionUtils; 17 | import org.springframework.http.HttpRequest; 18 | import org.springframework.http.client.ClientHttpRequestExecution; 19 | import org.springframework.http.client.ClientHttpRequestInterceptor; 20 | import org.springframework.http.client.ClientHttpResponse; 21 | 22 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 23 | import com.nepxion.discovery.console.cache.ConsoleCache; 24 | 25 | public class ConsoleInterceptor implements ClientHttpRequestInterceptor { 26 | @Override 27 | public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { 28 | ClientHttpResponse response = execution.execute(request, body); 29 | 30 | List headers = response.getHeaders().get(DiscoveryConstant.N_D_ACCESS_TOKEN); 31 | if (CollectionUtils.isNotEmpty(headers)) { 32 | String accessToken = headers.get(0); 33 | 34 | ConsoleCache.setAccessToken(accessToken); 35 | } 36 | 37 | return response; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/ConsoleFrame.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Dimension; 13 | 14 | import org.slf4j.Logger; 15 | import org.slf4j.LoggerFactory; 16 | 17 | import com.nepxion.discovery.console.cache.ConsoleCache; 18 | import com.nepxion.discovery.console.desktop.common.context.ConsoleConstant; 19 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 20 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 21 | import com.nepxion.swing.frame.JBasicFrame; 22 | 23 | public class ConsoleFrame extends JBasicFrame { 24 | private static final long serialVersionUID = 1L; 25 | private static final Logger LOG = LoggerFactory.getLogger(ConsoleFrame.class); 26 | 27 | public ConsoleFrame() { 28 | super(ConsoleLocaleFactory.getString("title") + " " + getSubTitle(), ConsoleIconFactory.getContextIcon("logo.png"), new Dimension(1630, 1030)); 29 | } 30 | 31 | public void launch() { 32 | ConsoleHierarchy consoleHierarchy = new ConsoleHierarchy(); 33 | getContentPane().add(consoleHierarchy); 34 | 35 | Boolean fullscreenEnabled = Boolean.valueOf(System.getProperty(ConsoleConstant.FULLSCREEN_ENABLED, Boolean.TRUE.toString())); 36 | if (fullscreenEnabled) { 37 | setExtendedState(ConsoleFrame.MAXIMIZED_BOTH); 38 | } 39 | setVisible(true); 40 | toFront(); 41 | } 42 | 43 | private static String getSubTitle() { 44 | try { 45 | return "【" + ConsoleCache.getDiscoveryType() + " " + ConsoleLocaleFactory.getString("discovery_center") + "】【" + ConsoleCache.getConfigType() + " " + ConsoleLocaleFactory.getString("config_center") + "】"; 46 | } catch (Exception e) { 47 | LOG.error("Not connnect to Discovery Console", e); 48 | 49 | return "【" + ConsoleLocaleFactory.getString("not_connnect_to_console") + "】"; 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/ConsoleHierarchy.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Font; 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | import com.nepxion.discovery.console.desktop.common.component.AbstractConsoleHierarchy; 17 | import com.nepxion.discovery.console.desktop.common.context.ConsoleUIContext; 18 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 19 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 20 | import com.nepxion.discovery.console.desktop.workspace.AbstractTopology; 21 | import com.nepxion.discovery.console.desktop.workspace.BlueGreenTopology; 22 | import com.nepxion.discovery.console.desktop.workspace.GrayTopology; 23 | import com.nepxion.discovery.console.desktop.workspace.InspectorTopology; 24 | import com.nepxion.discovery.console.desktop.workspace.type.AuthorityType; 25 | import com.nepxion.discovery.console.desktop.workspace.type.FeatureType; 26 | import com.nepxion.discovery.console.desktop.workspace.type.ReleaseType; 27 | import com.nepxion.discovery.console.desktop.workspace.type.TypeLocale; 28 | import com.nepxion.swing.element.ElementNode; 29 | import com.nepxion.swing.list.JBasicList; 30 | import com.nepxion.swing.shrinkbar.JShrinkOutlook; 31 | 32 | public class ConsoleHierarchy extends AbstractConsoleHierarchy { 33 | private static final long serialVersionUID = 1L; 34 | 35 | public static final String OUTLOOK_STYLE = "outlook/stereo/"; 36 | public static final String NAVIGATOR_STYLE = "navigator/stereo/"; 37 | 38 | @Override 39 | public void initializeUI() { 40 | createServiceReleaseManageShrinkOutlook(); 41 | createServiceAuthorityManageShrinkOutlook(); 42 | createMiddlewareReleaseManageShrinkOutlook(); 43 | } 44 | 45 | private JShrinkOutlook createServiceReleaseManageShrinkOutlook() { 46 | List elementNodes = new ArrayList(); 47 | elementNodes.add(new ElementNode(ReleaseType.BLUE_GREEN.toString(), TypeLocale.getDescription(ReleaseType.BLUE_GREEN), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "blue_green.png"), TypeLocale.getDescription(ReleaseType.BLUE_GREEN), new BlueGreenTopology())); 48 | elementNodes.add(new ElementNode(ReleaseType.GRAY.toString(), TypeLocale.getDescription(ReleaseType.GRAY), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "gray.png"), TypeLocale.getDescription(ReleaseType.GRAY), new GrayTopology())); 49 | elementNodes.add(new ElementNode(FeatureType.INSPECTOR.toString(), TypeLocale.getDescription(FeatureType.INSPECTOR), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "inspector.png"), TypeLocale.getDescription(FeatureType.INSPECTOR), new InspectorTopology())); 50 | 51 | JBasicList toggleList = createToggleList(elementNodes); 52 | toggleList.setSelectedIndex(0); 53 | 54 | JShrinkOutlook shrinkOutlook = shrinkOutlookBar.addShrinkOutlook(ConsoleLocaleFactory.getString("service_release_manage"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "close_16.png"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "open_favorite_16.png"), ConsoleLocaleFactory.getString("service_release_manage"), new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getMiddleFontSize())); 55 | shrinkOutlook.setContentPane(toggleList); 56 | shrinkOutlook.addPropertyChangeListener(new OutlookSelectionListener()); 57 | 58 | return shrinkOutlook; 59 | } 60 | 61 | private JShrinkOutlook createServiceAuthorityManageShrinkOutlook() { 62 | List elementNodes = new ArrayList(); 63 | elementNodes.add(new ElementNode(AuthorityType.STRATEGY.toString(), TypeLocale.getDescription(AuthorityType.STRATEGY), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "authority_strategy.png"), TypeLocale.getDescription(AuthorityType.STRATEGY), null)); 64 | elementNodes.add(new ElementNode(AuthorityType.DISCOVERY.toString(), TypeLocale.getDescription(AuthorityType.DISCOVERY), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "authority_discovery.png"), TypeLocale.getDescription(AuthorityType.DISCOVERY), null)); 65 | elementNodes.add(new ElementNode(AuthorityType.REGISTER.toString(), TypeLocale.getDescription(AuthorityType.REGISTER), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "authority_register.png"), TypeLocale.getDescription(AuthorityType.REGISTER), null)); 66 | 67 | JBasicList toggleList = createToggleList(elementNodes); 68 | 69 | JShrinkOutlook shrinkOutlook = shrinkOutlookBar.addShrinkOutlook(ConsoleLocaleFactory.getString("service_authority_manage"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "close_16.png"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "open_favorite_16.png"), ConsoleLocaleFactory.getString("service_authority_manage"), new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getMiddleFontSize())); 70 | shrinkOutlook.setContentPane(toggleList); 71 | shrinkOutlook.addPropertyChangeListener(new OutlookSelectionListener()); 72 | 73 | return shrinkOutlook; 74 | } 75 | 76 | private JShrinkOutlook createMiddlewareReleaseManageShrinkOutlook() { 77 | List elementNodes = new ArrayList(); 78 | elementNodes.add(new ElementNode(ReleaseType.DATABASE_BLUE_GREEN.toString(), TypeLocale.getDescription(ReleaseType.DATABASE_BLUE_GREEN), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "database_blue_green.png"), TypeLocale.getDescription(ReleaseType.DATABASE_BLUE_GREEN), null)); 79 | elementNodes.add(new ElementNode(ReleaseType.MESSAGE_QUEUE_BLUE_GREEN.toString(), TypeLocale.getDescription(ReleaseType.MESSAGE_QUEUE_BLUE_GREEN), ConsoleIconFactory.getContextIcon(OUTLOOK_STYLE + "message_queue_blue_green.png"), TypeLocale.getDescription(ReleaseType.MESSAGE_QUEUE_BLUE_GREEN), null)); 80 | 81 | JBasicList toggleList = createToggleList(elementNodes); 82 | 83 | JShrinkOutlook shrinkOutlook = shrinkOutlookBar.addShrinkOutlook(ConsoleLocaleFactory.getString("middleware_release_manage"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "close_16.png"), ConsoleIconFactory.getContextIcon(NAVIGATOR_STYLE + "open_favorite_16.png"), ConsoleLocaleFactory.getString("middleware_release_manage"), new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getMiddleFontSize())); 84 | shrinkOutlook.setContentPane(toggleList); 85 | shrinkOutlook.addPropertyChangeListener(new OutlookSelectionListener()); 86 | 87 | return shrinkOutlook; 88 | } 89 | 90 | @Override 91 | public void toggleListSelected(ElementNode elementNode) { 92 | Object userObject = elementNode.getUserObject(); 93 | if (userObject == null) { 94 | return; 95 | } 96 | 97 | if (userObject instanceof AbstractTopology) { 98 | AbstractTopology topology = (AbstractTopology) userObject; 99 | 100 | shrinkContentBar.setContentPane(topology); 101 | shrinkOperationBar.setContentPane(topology.getOperationBar()); 102 | } 103 | } 104 | 105 | @Override 106 | public int getOutlookBarWidth() { 107 | return 250; 108 | } 109 | 110 | @Override 111 | public int getOperationBar() { 112 | return 400; 113 | } 114 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/ConsoleInitializer.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.console.desktop.common.context.ConsoleBannerContext; 13 | import com.nepxion.discovery.console.desktop.common.context.ConsoleDataContext; 14 | import com.nepxion.discovery.console.desktop.common.context.ConsolePropertiesContext; 15 | import com.nepxion.discovery.console.desktop.common.context.ConsoleUIContext; 16 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 17 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 18 | 19 | public class ConsoleInitializer { 20 | private static final String PROPERTIES_PATH = "config/console.properties"; 21 | private static final String ICON_PATH = "com/nepxion/discovery/console/desktop/common/icon/"; 22 | private static final String LOCALE_PATH = "com/nepxion/discovery/console/desktop/common/locale/"; 23 | 24 | public static void initialize() { 25 | ConsoleBannerContext.initialize(); 26 | ConsolePropertiesContext.initialize(PROPERTIES_PATH); 27 | ConsoleDataContext.initialize(); 28 | ConsoleUIContext.initialize(); 29 | 30 | ConsoleIconFactory.initialize(ICON_PATH); 31 | ConsoleLocaleFactory.initialize(LOCALE_PATH); 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/ConsoleLauncher.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import javax.swing.SwingUtilities; 13 | 14 | import com.nepxion.discovery.console.desktop.common.context.ConsoleConstant; 15 | 16 | public class ConsoleLauncher { 17 | public static void main(String[] args) { 18 | ConsoleInitializer.initialize(); 19 | 20 | SwingUtilities.invokeLater(new Runnable() { 21 | public void run() { 22 | Boolean loginEnabled = Boolean.valueOf(System.getProperty(ConsoleConstant.LOGIN_ENABLED, Boolean.TRUE.toString())); 23 | if (loginEnabled) { 24 | ConsoleLogin consoleLogin = new ConsoleLogin(); 25 | consoleLogin.launch(); 26 | } 27 | 28 | ConsoleFrame consoleFrame = new ConsoleFrame(); 29 | consoleFrame.launch(); 30 | } 31 | }); 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/ConsoleLogin.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.console.desktop.common.component.AbstractConsoleLogin; 13 | 14 | public class ConsoleLogin extends AbstractConsoleLogin { 15 | private static final long serialVersionUID = 1L; 16 | 17 | @Override 18 | public void initializeUI() { 19 | accountTextField.setText("admin"); 20 | passwordField.setText("admin"); 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/component/AbstractConsoleHierarchy.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.component; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | import java.awt.Component; 14 | import java.awt.Font; 15 | import java.awt.event.MouseAdapter; 16 | import java.awt.event.MouseEvent; 17 | import java.util.List; 18 | 19 | import javax.swing.BorderFactory; 20 | import javax.swing.JPanel; 21 | 22 | import com.nepxion.discovery.console.desktop.common.context.ConsoleUIContext; 23 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 24 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 25 | import com.nepxion.discovery.console.desktop.common.util.DimensionUtil; 26 | import com.nepxion.swing.container.ContainerManager; 27 | import com.nepxion.swing.element.ElementNode; 28 | import com.nepxion.swing.framework.reflection.JReflectionHierarchy; 29 | import com.nepxion.swing.list.JBasicList; 30 | import com.nepxion.swing.shrinkbar.JShrinkBar; 31 | import com.nepxion.swing.shrinkbar.JShrinkOutlook; 32 | import com.nepxion.swing.shrinkbar.JShrinkOutlookBar; 33 | import com.nepxion.swing.shrinkbar.ShrinkListCellRenderer; 34 | import com.nepxion.swing.shrinkbar.ShrinkOutlookSelectionListener; 35 | import com.nepxion.swing.style.texture.shrink.IHeaderTextureStyle; 36 | import com.nepxion.swing.style.texture.shrink.IOutlookTextureStyle; 37 | import com.nepxion.swing.style.texture.shrink.JBlackHeaderTextureStyle; 38 | import com.nepxion.swing.style.texture.shrink.JBlackOutlookTextureStyle; 39 | import com.nepxion.util.data.CollectionUtil; 40 | 41 | public abstract class AbstractConsoleHierarchy extends JReflectionHierarchy { 42 | private static final long serialVersionUID = 1L; 43 | 44 | protected JShrinkBar shrinkOperationBar; 45 | protected JShrinkBar shrinkContentBar; 46 | protected JShrinkOutlookBar shrinkOutlookBar; 47 | 48 | public AbstractConsoleHierarchy() { 49 | super(20, 20); 50 | 51 | IHeaderTextureStyle headerTextureStyle = new JBlackHeaderTextureStyle(); 52 | IOutlookTextureStyle outlookTextureStyle = new JBlackOutlookTextureStyle(); 53 | 54 | shrinkOperationBar = new JShrinkBar(JShrinkBar.PLACEMENT_EAST, JShrinkBar.CONTENT_PANE_TYPE_LABEL, headerTextureStyle) { 55 | private static final long serialVersionUID = 1L; 56 | 57 | private JPanel container; 58 | private Component contentPane; 59 | 60 | @Override 61 | public Component getContentPane() { 62 | return contentPane; 63 | } 64 | 65 | @Override 66 | public void setContentPane(Component contentPane) { 67 | this.contentPane = contentPane; 68 | 69 | if (container == null) { 70 | container = new JPanel(); 71 | container.setLayout(new BorderLayout()); 72 | // container.setBorder(BorderFactory.createLineBorder(outlookTextureStyle.getBorderColor())); 73 | 74 | shrinkContentPane.add(container, BorderLayout.CENTER); 75 | } 76 | 77 | container.removeAll(); 78 | container.add(contentPane, BorderLayout.CENTER); 79 | 80 | ContainerManager.update(container); 81 | } 82 | }; 83 | shrinkOperationBar.setTitle(ConsoleLocaleFactory.getString("operation_bar")); 84 | shrinkOperationBar.setToolTipText(ConsoleLocaleFactory.getString("operation_bar")); 85 | shrinkOperationBar.setIcon(ConsoleIconFactory.getSwingIcon("property.png")); 86 | shrinkOperationBar.setTitleFont(new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getLargeFontSize())); 87 | DimensionUtil.setWidth(shrinkOperationBar, getOperationBar()); 88 | 89 | shrinkContentBar = new JShrinkBar(JShrinkBar.PLACEMENT_EAST, JShrinkBar.CONTENT_PANE_TYPE_LABEL, headerTextureStyle); 90 | shrinkContentBar.setShrinkable(false); 91 | shrinkContentBar.setTitle(ConsoleLocaleFactory.getString("content_bar")); 92 | shrinkContentBar.setToolTipText(ConsoleLocaleFactory.getString("content_bar")); 93 | shrinkContentBar.setIcon(ConsoleIconFactory.getSwingIcon("paste.png")); 94 | shrinkContentBar.setTitleFont(new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getLargeFontSize())); 95 | shrinkContentBar.getShrinkHeader().getLabel().addMouseListener(new ShrinkContentBarMouseListener()); 96 | 97 | shrinkOutlookBar = new JShrinkOutlookBar(JShrinkBar.PLACEMENT_WEST, JShrinkBar.CONTENT_PANE_TYPE_LABEL, headerTextureStyle, outlookTextureStyle); 98 | shrinkOutlookBar.setTitle(ConsoleLocaleFactory.getString("navigator_bar")); 99 | shrinkOutlookBar.setToolTipText(ConsoleLocaleFactory.getString("navigator_bar")); 100 | shrinkOutlookBar.setIcon(ConsoleIconFactory.getSwingIcon("hierarchy.png")); 101 | shrinkOutlookBar.setTitleFont(new Font(ConsoleUIContext.getFontName(), Font.BOLD, ConsoleUIContext.getLargeFontSize())); 102 | DimensionUtil.setWidth(shrinkOutlookBar, getOutlookBarWidth()); 103 | 104 | initializeUI(); 105 | 106 | shrinkOutlookBar.getShrinkOutlook(0).setSelected(true); 107 | 108 | JPanel container = new JPanel(); 109 | container.setLayout(new BorderLayout(5, 5)); 110 | container.add(shrinkOperationBar, BorderLayout.EAST); 111 | container.add(shrinkContentBar, BorderLayout.CENTER); 112 | container.add(shrinkOutlookBar, BorderLayout.WEST); 113 | 114 | setContentPane(container); 115 | } 116 | 117 | @SuppressWarnings("unchecked") 118 | public JBasicList createToggleList(List elementNodes) { 119 | JBasicList toggleList = new JBasicList(CollectionUtil.parseVector(elementNodes)) { 120 | private static final long serialVersionUID = 1L; 121 | 122 | @Override 123 | public void executeSelection(int oldSelectedRow, int newSelectedRow) { 124 | if (newSelectedRow == -1) { 125 | return; 126 | } 127 | 128 | ElementNode elementNode = (ElementNode) getModel().getElementAt(newSelectedRow); 129 | toggleListSelected(elementNode); 130 | } 131 | }; 132 | toggleList.setSelectionMode(JBasicList.SINGLE_SELECTION); 133 | toggleList.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0)); 134 | toggleList.setCellRenderer(new ShrinkListCellRenderer(toggleList, BorderFactory.createEmptyBorder(0, 10, 0, 0), 40)); 135 | 136 | return toggleList; 137 | } 138 | 139 | public class ShrinkContentBarMouseListener extends MouseAdapter { 140 | public void mouseClicked(MouseEvent e) { 141 | if (e.getClickCount() > 1) { 142 | boolean isShrinked = !shrinkOutlookBar.isShrinked(); 143 | shrinkOutlookBar.setShrinked(isShrinked); 144 | shrinkOperationBar.setShrinked(isShrinked); 145 | } 146 | } 147 | } 148 | 149 | public class OutlookSelectionListener extends ShrinkOutlookSelectionListener { 150 | public void selectionStateChanged(JShrinkOutlook shrinkOutlook) { 151 | JBasicList toggleList = (JBasicList) shrinkOutlook.getContentPane(); 152 | toggleList.executeSelection(-1, toggleList.getSelectedIndex()); 153 | } 154 | } 155 | 156 | public abstract void initializeUI(); 157 | 158 | public abstract void toggleListSelected(ElementNode elementNode); 159 | 160 | public abstract int getOutlookBarWidth(); 161 | 162 | public abstract int getOperationBar(); 163 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/component/AbstractConsoleLogin.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.component; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Component; 13 | import java.awt.Font; 14 | import java.awt.Frame; 15 | import java.util.Locale; 16 | import java.util.Vector; 17 | 18 | import javax.swing.DefaultListCellRenderer; 19 | import javax.swing.JList; 20 | import javax.swing.JPanel; 21 | 22 | import org.apache.commons.lang3.StringUtils; 23 | 24 | import com.nepxion.discovery.common.entity.UserEntity; 25 | import com.nepxion.discovery.console.controller.ConsoleController; 26 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 27 | import com.nepxion.swing.combobox.JBasicComboBox; 28 | import com.nepxion.swing.dialog.JLoginDialog; 29 | import com.nepxion.swing.font.FontContext; 30 | import com.nepxion.swing.label.JBasicLabel; 31 | import com.nepxion.swing.layout.table.TableLayout; 32 | 33 | public abstract class AbstractConsoleLogin extends JLoginDialog { 34 | private static final long serialVersionUID = 1L; 35 | 36 | protected JBasicLabel urlLabel; 37 | protected JBasicComboBox urlComboBox; 38 | 39 | public AbstractConsoleLogin() { 40 | super(null); 41 | 42 | initializeUI(); 43 | } 44 | 45 | public AbstractConsoleLogin(Frame parent) { 46 | super(parent); 47 | 48 | initializeUI(); 49 | } 50 | 51 | @SuppressWarnings("unchecked") 52 | @Override 53 | protected void initEditorPanelLayout() { 54 | urlLabel = new JBasicLabel(); 55 | urlLabel.setFont(new Font(FontContext.getFontName(), FONT_STYLE, FONT_SIZE)); 56 | 57 | String url = null; 58 | try { 59 | url = ConsoleController.getUrl(); 60 | } catch (Exception e) { 61 | 62 | } 63 | 64 | Vector urls = new Vector(); 65 | if (StringUtils.isNotEmpty(url)) { 66 | urls.add(url); 67 | } 68 | 69 | urlComboBox = new JBasicComboBox(urls); 70 | urlComboBox.setEditable(true); 71 | urlComboBox.setRenderer(new DefaultListCellRenderer() { 72 | private static final long serialVersionUID = 1L; 73 | 74 | @SuppressWarnings("rawtypes") 75 | public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 76 | super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); 77 | 78 | setToolTipText(value.toString()); 79 | 80 | return this; 81 | } 82 | }); 83 | 84 | double[][] size = { 85 | { 80, 230 }, 86 | { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } 87 | }; 88 | 89 | TableLayout tableLayout = new TableLayout(size); 90 | tableLayout.setVGap(10); 91 | 92 | editorPanel = new JPanel(); 93 | editorPanel.setLayout(tableLayout); 94 | editorPanel.add(urlLabel, "0, 0"); 95 | editorPanel.add(urlComboBox, "1, 0"); 96 | editorPanel.add(accountLabel, "0, 1"); 97 | editorPanel.add(accountTextField, "1, 1"); 98 | editorPanel.add(passwordLabel, "0, 2"); 99 | editorPanel.add(passwordField, "1, 2"); 100 | editorPanel.add(localeLabel, "0, 3"); 101 | editorPanel.add(localeComboBox, "1, 3"); 102 | } 103 | 104 | @Override 105 | protected void initLocale(Locale locale) { 106 | super.initLocale(locale); 107 | 108 | urlLabel.setText(ConsoleLocaleFactory.getString("url", locale)); 109 | } 110 | 111 | @Override 112 | public boolean login(String userId, String password, Locale locale) throws Exception { 113 | Object url = urlComboBox.getSelectedItem(); 114 | if (url == null || StringUtils.isEmpty(url.toString().trim())) { 115 | throw new IllegalArgumentException("Console url can't be null or empty"); 116 | } 117 | 118 | ConsoleController.setUrl(url.toString().trim()); 119 | 120 | UserEntity userEntity = new UserEntity(); 121 | userEntity.setUserId(userId); 122 | userEntity.setPassword(password); 123 | 124 | return ConsoleController.authenticate(userEntity); 125 | } 126 | 127 | public void launch() { 128 | setVisible(true); 129 | toFront(); 130 | } 131 | 132 | public abstract void initializeUI(); 133 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/context/ConsoleBannerContext.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.context; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.banner.BannerConstant; 13 | import com.nepxion.banner.Description; 14 | import com.nepxion.banner.LogoBanner; 15 | import com.nepxion.banner.NepxionBanner; 16 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 17 | import com.taobao.text.Color; 18 | 19 | public class ConsoleBannerContext { 20 | public static void initialize() { 21 | LogoBanner logoBanner = new LogoBanner(ConsoleBannerContext.class, "/com/nepxion/discovery/resource/logo.txt", "Welcome to Nepxion", 9, 5, new Color[] { Color.red, Color.green, Color.cyan, Color.blue, Color.yellow, Color.magenta, Color.red, Color.green, Color.cyan }, true); 22 | 23 | NepxionBanner.show(logoBanner, new Description(BannerConstant.VERSION + ":", DiscoveryConstant.DISCOVERY_VERSION, 0, 1), new Description(BannerConstant.GITHUB + ":", BannerConstant.NEPXION_GITHUB + "/Discovery", 0, 1)); 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/context/ConsoleConstant.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.context; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public class ConsoleConstant { 13 | public static final String URL = "url"; 14 | 15 | public static final String THEME = "theme"; 16 | public static final String DEFAULT_THEME = "NimbusLookAndFeel"; 17 | 18 | public static final String LOGIN_ENABLED = "login.enabled"; 19 | public static final String FULLSCREEN_ENABLED = "fullscreen.enabled"; 20 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/context/ConsoleDataContext.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.context; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.util.encoder.EncoderContext; 13 | import com.nepxion.util.locale.LocaleContext; 14 | 15 | public class ConsoleDataContext { 16 | public static final String CHARSET = "UTF-8"; 17 | public static final String LOCALE = "zh_CN"; 18 | 19 | public static void initialize() { 20 | initializeEncoder(); 21 | initializeLocale(); 22 | initializeTracer(); 23 | } 24 | 25 | private static void initializeEncoder() { 26 | EncoderContext.registerIOCharset(CHARSET); 27 | } 28 | 29 | private static void initializeLocale() { 30 | LocaleContext.registerLocale(LOCALE); 31 | } 32 | 33 | private static void initializeTracer() { 34 | // ExceptionTracerContext.register(true); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/context/ConsolePropertiesContext.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.context; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.io.File; 13 | import java.net.URL; 14 | 15 | import org.apache.commons.configuration.ConfigurationException; 16 | import org.apache.commons.configuration.PropertiesConfiguration; 17 | 18 | public class ConsolePropertiesContext extends PropertiesConfiguration { 19 | private static ConsolePropertiesContext propertiesContext; 20 | 21 | public static void initialize(String propertiesPath) { 22 | try { 23 | propertiesContext = new ConsolePropertiesContext(propertiesPath); 24 | } catch (ConfigurationException e) { 25 | e.printStackTrace(); 26 | } 27 | } 28 | 29 | public static ConsolePropertiesContext getProperties() { 30 | return propertiesContext; 31 | } 32 | 33 | public ConsolePropertiesContext(String path) throws ConfigurationException { 34 | super(path); 35 | } 36 | 37 | public ConsolePropertiesContext(File file) throws ConfigurationException { 38 | super(file); 39 | } 40 | 41 | public ConsolePropertiesContext(URL url) throws ConfigurationException { 42 | super(url); 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/context/ConsoleUIContext.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.context; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Font; 13 | 14 | import org.apache.commons.lang3.StringUtils; 15 | 16 | import com.nepxion.discovery.console.desktop.common.swing.lookandfeel.LookAndFeelManager; 17 | import com.nepxion.swing.font.FontContext; 18 | import com.nepxion.util.locale.LocaleContext; 19 | 20 | public class ConsoleUIContext { 21 | private static final String FONT_NAME_ZH_CN = "\u5fae\u8f6f\u96c5\u9ed1"; // 微软雅黑 22 | private static final int FONT_SMALL_SIZE_ZH_CN = 12; // 11 23 | private static final int FONT_MIDDLE_SIZE_ZH_CN = FONT_SMALL_SIZE_ZH_CN + 1; 24 | private static final int FONT_LARGE_SIZE_ZH_CN = FONT_SMALL_SIZE_ZH_CN + 2; 25 | 26 | private static final String FONT_NAME_EN_US = "Calibri"; 27 | private static final int FONT_SMALL_SIZE_EN_US = 12; 28 | private static final int FONT_MIDDLE_SIZE_EN_US = FONT_SMALL_SIZE_EN_US + 1; 29 | private static final int FONT_LARGE_SIZE_EN_US = FONT_SMALL_SIZE_EN_US + 2; 30 | 31 | public static void initialize() { 32 | String theme = ConsolePropertiesContext.getProperties().getString(ConsoleConstant.THEME, ConsoleConstant.DEFAULT_THEME); 33 | if (StringUtils.equals(theme, ConsoleConstant.DEFAULT_THEME)) { 34 | setFont(); 35 | setLookAndFeel(theme); 36 | } else { 37 | setLookAndFeel(theme); 38 | setFont(); 39 | } 40 | } 41 | 42 | public static void setFont() { 43 | FontContext.registerFont(getFontName(), Font.PLAIN, getDefaultFontSize()); 44 | } 45 | 46 | public static void setLookAndFeel(String theme) { 47 | // theme=NimbusLookAndFeel 48 | // theme=AcidLookAndFeel 49 | // theme=AlloyLookAndFeel 50 | // theme=BedouinLookAndFeel 51 | // theme=GlassLookAndFeel 52 | 53 | LookAndFeelManager.invokeLookAndFeel(theme); 54 | } 55 | 56 | public static String getFontName() { 57 | if (LocaleContext.getLocale() == LocaleContext.LOCALE_ZH_CN) { 58 | return FONT_NAME_ZH_CN; 59 | } else { 60 | return FONT_NAME_EN_US; 61 | } 62 | } 63 | 64 | public static int getDefaultFontSize() { 65 | String fontName = getFontName(); 66 | if (fontName.equals(FONT_NAME_ZH_CN)) { 67 | return FONT_MIDDLE_SIZE_ZH_CN; 68 | } else { 69 | return FONT_MIDDLE_SIZE_EN_US; 70 | } 71 | } 72 | 73 | public static int getSmallFontSize() { 74 | String fontName = getFontName(); 75 | if (fontName.equals(FONT_NAME_ZH_CN)) { 76 | return FONT_SMALL_SIZE_ZH_CN; 77 | } else { 78 | return FONT_SMALL_SIZE_EN_US; 79 | } 80 | } 81 | 82 | public static int getMiddleFontSize() { 83 | String fontName = getFontName(); 84 | if (fontName.equals(FONT_NAME_ZH_CN)) { 85 | return FONT_MIDDLE_SIZE_ZH_CN; 86 | } else { 87 | return FONT_MIDDLE_SIZE_EN_US; 88 | } 89 | } 90 | 91 | public static int getLargeFontSize() { 92 | String fontName = getFontName(); 93 | if (fontName.equals(FONT_NAME_ZH_CN)) { 94 | return FONT_LARGE_SIZE_ZH_CN; 95 | } else { 96 | return FONT_LARGE_SIZE_EN_US; 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/icon/ConsoleIconFactory.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.icon; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import javax.swing.ImageIcon; 13 | 14 | import com.nepxion.swing.icon.IconFactory; 15 | 16 | public class ConsoleIconFactory extends IconFactory { 17 | private static String iconPath; 18 | 19 | public static void initialize(String iconPath) { 20 | ConsoleIconFactory.iconPath = iconPath; 21 | } 22 | 23 | public static ImageIcon getContextIcon(String iconName) { 24 | return getIcon(iconPath + iconName); 25 | } 26 | 27 | public static String getIconPath() { 28 | return iconPath; 29 | } 30 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/locale/ConsoleLocaleFactory.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.locale; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.Locale; 13 | 14 | import com.nepxion.util.locale.LocaleManager; 15 | 16 | public class ConsoleLocaleFactory { 17 | public static final Class BUNDLE_CLASS = ConsoleLocaleFactory.class; 18 | 19 | private static String localePath; 20 | 21 | public static void initialize(String localePath) { 22 | ConsoleLocaleFactory.localePath = localePath; 23 | } 24 | 25 | public static String getString(String key) { 26 | return LocaleManager.getString(BUNDLE_CLASS, key); 27 | } 28 | 29 | public static String getString(String key, Locale locale) { 30 | return LocaleManager.getString(BUNDLE_CLASS, key, locale); 31 | } 32 | 33 | public static String getLocalePath() { 34 | return localePath; 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/BorderUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Color; 13 | import java.awt.Font; 14 | 15 | import javax.swing.BorderFactory; 16 | import javax.swing.border.Border; 17 | import javax.swing.border.TitledBorder; 18 | 19 | import com.nepxion.discovery.console.desktop.common.context.ConsoleUIContext; 20 | import com.nepxion.swing.separator.JBasicSeparator; 21 | 22 | public class BorderUtil { 23 | public static JBasicSeparator createSeparator() { 24 | JBasicSeparator separator = new JBasicSeparator(JBasicSeparator.HORIZONTAL, JBasicSeparator.LOWERED_STYLE, -1); 25 | separator.setBrightColor(new Color(197, 196, 198)); 26 | separator.setDarkColor(new Color(153, 152, 154)); 27 | 28 | return separator; 29 | } 30 | 31 | public static Border createTitledBorder(String title) { 32 | return BorderFactory.createTitledBorder(null, title, TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font(ConsoleUIContext.getFontName(), Font.PLAIN, ConsoleUIContext.getLargeFontSize()), new Color(64, 0, 0)); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/ButtonUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.Enumeration; 13 | 14 | import javax.swing.AbstractAction; 15 | import javax.swing.AbstractButton; 16 | import javax.swing.ButtonGroup; 17 | 18 | import com.nepxion.swing.button.JBasicButton; 19 | import com.nepxion.swing.button.JClassicButton; 20 | import com.nepxion.swing.lookandfeel.LookAndFeelManager; 21 | 22 | public class ButtonUtil { 23 | public static AbstractButton createButton(AbstractAction action) { 24 | return LookAndFeelManager.isNimbusLookAndFeel() ? new JClassicButton(action) : new JBasicButton(action); 25 | } 26 | 27 | public static String getRationButtonName(ButtonGroup buttonGroup) { 28 | for (Enumeration enumeration = buttonGroup.getElements(); enumeration.hasMoreElements();) { 29 | AbstractButton button = enumeration.nextElement(); 30 | if (button.isSelected()) { 31 | return button.getName(); 32 | } 33 | } 34 | 35 | return null; 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/ComboBoxUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.Collections; 13 | import java.util.List; 14 | 15 | import javax.swing.DefaultComboBoxModel; 16 | 17 | import org.apache.commons.lang3.SystemUtils; 18 | 19 | import com.nepxion.swing.combobox.JBasicComboBox; 20 | import com.nepxion.swing.completion.JAutoCompletion; 21 | import com.nepxion.swing.searchable.JSearchableFactory; 22 | 23 | public class ComboBoxUtil { 24 | public static void installSearchable(JBasicComboBox comboBox) { 25 | if (SystemUtils.IS_OS_WINDOWS) { 26 | JSearchableFactory.installSearchable(comboBox); 27 | } 28 | } 29 | 30 | public static void installlAutoCompletion(JBasicComboBox comboBox) { 31 | if (SystemUtils.IS_OS_WINDOWS) { 32 | JAutoCompletion autoCompletion = new JAutoCompletion(comboBox); 33 | autoCompletion.setStrict(false); 34 | } 35 | } 36 | 37 | @SuppressWarnings("unchecked") 38 | public static void setSortableModel(JBasicComboBox comboBox, List value) { 39 | Collections.sort(value); 40 | 41 | comboBox.setModel(new DefaultComboBoxModel<>(value.toArray())); 42 | } 43 | 44 | public static String getSelectedValue(JBasicComboBox comboBox) { 45 | return comboBox.getSelectedItem() != null ? comboBox.getSelectedItem().toString().trim() : null; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/DimensionUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Component; 13 | import java.awt.Dimension; 14 | 15 | public class DimensionUtil { 16 | public static Component addSize(Component Component, int width, int height) { 17 | Component.setPreferredSize(new Dimension(Component.getPreferredSize().width + width, Component.getPreferredSize().height + height)); 18 | 19 | return Component; 20 | } 21 | 22 | public static Component addWidth(Component Component, int width) { 23 | Component.setPreferredSize(new Dimension(Component.getPreferredSize().width + width, Component.getPreferredSize().height)); 24 | 25 | return Component; 26 | } 27 | 28 | public static Component addHeight(Component Component, int height) { 29 | Component.setPreferredSize(new Dimension(Component.getPreferredSize().width, Component.getPreferredSize().height + height)); 30 | 31 | return Component; 32 | } 33 | 34 | public static Component setWidth(Component component, int width) { 35 | component.setPreferredSize(new Dimension(width, component.getPreferredSize().height)); 36 | 37 | return component; 38 | } 39 | 40 | public static Component setHeight(Component component, int height) { 41 | component.setPreferredSize(new Dimension(component.getPreferredSize().width, height)); 42 | 43 | return component; 44 | } 45 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/ListUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.Collections; 13 | import java.util.List; 14 | import java.util.Vector; 15 | 16 | import javax.swing.BorderFactory; 17 | import javax.swing.ImageIcon; 18 | 19 | import org.apache.commons.lang3.SystemUtils; 20 | 21 | import com.nepxion.swing.list.BasicListModel; 22 | import com.nepxion.swing.list.JBasicList; 23 | import com.nepxion.swing.renderer.list.ElementListCellRenderer; 24 | import com.nepxion.swing.searchable.JSearchableFactory; 25 | 26 | public class ListUtil { 27 | public static void installSearchable(JBasicList list) { 28 | if (SystemUtils.IS_OS_WINDOWS) { 29 | JSearchableFactory.installSearchable(list); 30 | } 31 | } 32 | 33 | @SuppressWarnings("unchecked") 34 | public static void setModel(JBasicList list, List value, ImageIcon imageIcon) { 35 | Vector vector = new Vector(value); 36 | 37 | list.setModel(new BasicListModel(vector)); 38 | list.setCellRenderer(new ElementListCellRenderer(list, BorderFactory.createEmptyBorder(0, 5, 0, 0), imageIcon, 22)); 39 | } 40 | 41 | public static void setSortableModel(JBasicList list, List value, ImageIcon imageIcon) { 42 | Collections.sort(value); 43 | 44 | setModel(list, value, imageIcon); 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/common/util/TextFieldUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.common.util; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.event.FocusEvent; 13 | import java.awt.event.FocusListener; 14 | 15 | import org.apache.commons.lang3.StringUtils; 16 | 17 | import com.nepxion.swing.textfield.JBasicTextField; 18 | 19 | public class TextFieldUtil { 20 | public static JBasicTextField setTip(JBasicTextField textField, String tip) { 21 | textField.setText(tip); 22 | textField.addFocusListener(new FocusListener() { 23 | @Override 24 | public void focusGained(FocusEvent e) { 25 | String text = textField.getText().trim(); 26 | if (StringUtils.equals(text, tip)) { 27 | textField.setText(""); 28 | } 29 | } 30 | 31 | @Override 32 | public void focusLost(FocusEvent e) { 33 | String text = textField.getText().trim(); 34 | if (StringUtils.isBlank(text)) { 35 | textField.setText(tip); 36 | } 37 | } 38 | }); 39 | 40 | return textField; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/AbstractTopology.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import twaver.DataBoxEvent; 13 | import twaver.DataBoxListener; 14 | import twaver.Generator; 15 | 16 | import java.awt.Color; 17 | import java.awt.Dimension; 18 | import java.awt.event.ActionEvent; 19 | import java.awt.event.HierarchyEvent; 20 | import java.util.List; 21 | 22 | import javax.swing.BorderFactory; 23 | import javax.swing.JPanel; 24 | 25 | import org.apache.commons.lang3.StringUtils; 26 | 27 | import com.nepxion.cots.twaver.element.TElementManager; 28 | import com.nepxion.cots.twaver.element.TLink; 29 | import com.nepxion.cots.twaver.element.TNode; 30 | import com.nepxion.cots.twaver.graph.TGraphBackground; 31 | import com.nepxion.cots.twaver.graph.TLayoutType; 32 | import com.nepxion.discovery.console.cache.ConsoleCache; 33 | import com.nepxion.discovery.console.controller.ConsoleController; 34 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 35 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 36 | import com.nepxion.discovery.console.desktop.common.swing.dialog.JExceptionDialog; 37 | import com.nepxion.discovery.console.desktop.common.util.DimensionUtil; 38 | import com.nepxion.discovery.console.desktop.workspace.panel.CacheSetPanel; 39 | import com.nepxion.discovery.console.desktop.workspace.panel.LayouterSetPanel; 40 | import com.nepxion.discovery.console.desktop.workspace.panel.SetManagePanel; 41 | import com.nepxion.discovery.console.desktop.workspace.topology.BasicTopology; 42 | import com.nepxion.discovery.console.desktop.workspace.topology.NodeLocation; 43 | import com.nepxion.discovery.console.desktop.workspace.topology.NodeUI; 44 | import com.nepxion.discovery.console.entity.Instance; 45 | import com.nepxion.swing.action.JSecurityAction; 46 | import com.nepxion.swing.handle.HandleManager; 47 | import com.nepxion.swing.listener.DisplayAbilityListener; 48 | import com.nepxion.swing.locale.SwingLocale; 49 | import com.nepxion.swing.optionpane.JBasicOptionPane; 50 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 51 | import com.nepxion.swing.textarea.JBasicTextArea; 52 | 53 | public abstract class AbstractTopology extends BasicTopology { 54 | private static final long serialVersionUID = 1L; 55 | 56 | protected NodeLocation nodeLocation = new NodeLocation(415, 100, 250, 60); 57 | 58 | protected TGraphBackground background; 59 | 60 | protected JPanel operationBar = new JPanel(); 61 | 62 | protected JBasicTextArea resultTextArea; 63 | protected JBasicScrollPane resultScrollPane; 64 | 65 | public AbstractTopology() { 66 | initializeTopology(); 67 | // initializeListener(); 68 | 69 | setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); 70 | } 71 | 72 | public void initializeTopology() { 73 | background = graph.getGraphBackground(); 74 | 75 | graph.setElementStateOutlineColorGenerator(new Generator() { 76 | public Object generate(Object object) { 77 | return null; 78 | } 79 | }); 80 | 81 | dataBox.addDataBoxListener(new DataBoxListener() { 82 | @Override 83 | public void elementAdded(DataBoxEvent arg0) { 84 | executeLayout(); 85 | } 86 | 87 | @Override 88 | public void elementRemoved(DataBoxEvent arg0) { 89 | executeLayout(); 90 | } 91 | 92 | @Override 93 | public void elementsCleared(DataBoxEvent arg0) { 94 | executeLayout(); 95 | } 96 | }); 97 | } 98 | 99 | public void initializeListener() { 100 | addHierarchyListener(new DisplayAbilityListener() { 101 | public void displayAbilityChanged(HierarchyEvent e) { 102 | SetManagePanel setManagePanel = SetManagePanel.getInstance(); 103 | LayouterSetPanel layouterSetPanel = setManagePanel.getLayouterSetPanel(); 104 | int xOffset = layouterSetPanel.getXOffset(); 105 | int yOffset = layouterSetPanel.getYOffset(); 106 | int xGap = layouterSetPanel.getXGap(); 107 | int yGap = layouterSetPanel.getYGap(); 108 | 109 | showLayoutBar(xOffset, yOffset, xGap, yGap); 110 | toggleLayoutBar(); 111 | 112 | removeHierarchyListener(this); 113 | } 114 | }); 115 | } 116 | 117 | public abstract void initializeOperationBar(); 118 | 119 | public JPanel getOperationBar() { 120 | return operationBar; 121 | } 122 | 123 | public TNode addNode(String name, NodeUI nodeUI) { 124 | TNode node = createNode(name, nodeUI, nodeLocation, 0); 125 | 126 | dataBox.addElement(node); 127 | 128 | return node; 129 | } 130 | 131 | @SuppressWarnings("unchecked") 132 | public TLink addLink(TNode fromNode, TNode toNode, Color linkFlowingColor) { 133 | List links = TElementManager.getLinks(dataBox); 134 | for (TLink link : links) { 135 | if (link.getFrom() == fromNode && link.getTo() == toNode) { 136 | return link; 137 | } 138 | } 139 | 140 | TLink link = createLink(fromNode, toNode, linkFlowingColor != null); 141 | if (linkFlowingColor != null) { 142 | link.putLinkToArrowColor(Color.yellow); 143 | link.putLinkFlowing(true); 144 | link.putLinkFlowingColor(linkFlowingColor); 145 | link.putLinkFlowingWidth(3); 146 | } 147 | 148 | dataBox.addElement(link); 149 | 150 | return link; 151 | } 152 | 153 | public void showResult(Object result) { 154 | if (resultTextArea == null) { 155 | resultTextArea = new JBasicTextArea(); 156 | resultTextArea.setLineWrap(true); 157 | 158 | resultScrollPane = new JBasicScrollPane(resultTextArea); 159 | resultScrollPane.setMaximumSize(new Dimension(800, 600)); 160 | DimensionUtil.addHeight(resultScrollPane, 20); 161 | } 162 | 163 | resultTextArea.setText(result.toString()); 164 | 165 | JBasicOptionPane.showOptionDialog(HandleManager.getFrame(this), resultScrollPane, ConsoleLocaleFactory.getString("execute_result"), JBasicOptionPane.DEFAULT_OPTION, JBasicOptionPane.PLAIN_MESSAGE, ConsoleIconFactory.getSwingIcon("banner/edit.png"), new Object[] { SwingLocale.getString("close") }, null, true); 166 | } 167 | 168 | public void executeLayout() { 169 | SetManagePanel setManagePanel = SetManagePanel.getInstance(); 170 | LayouterSetPanel layouterSetPanel = setManagePanel.getLayouterSetPanel(); 171 | int xOffset = layouterSetPanel.getXOffset(); 172 | int yOffset = layouterSetPanel.getYOffset(); 173 | int xGap = layouterSetPanel.getXGap(); 174 | int yGap = layouterSetPanel.getYGap(); 175 | 176 | layouter.doLayout(TLayoutType.HIERARCHIC_LAYOUT_TYPE, xOffset, yOffset, xGap, yGap); 177 | } 178 | 179 | public JSecurityAction createSetAction() { 180 | JSecurityAction action = new JSecurityAction(ConsoleLocaleFactory.getString("set_text"), ConsoleIconFactory.getSwingIcon("config.png"), ConsoleLocaleFactory.getString("set_tooltip")) { 181 | private static final long serialVersionUID = 1L; 182 | 183 | public void execute(ActionEvent e) { 184 | SetManagePanel setManagePanel = SetManagePanel.getInstance(); 185 | CacheSetPanel cacheSetPanel = setManagePanel.getCacheSetPanel(); 186 | cacheSetPanel.setInitialModel(); 187 | 188 | JBasicOptionPane.showOptionDialog(HandleManager.getFrame(AbstractTopology.this), setManagePanel, ConsoleLocaleFactory.getString("set_text"), JBasicOptionPane.DEFAULT_OPTION, JBasicOptionPane.PLAIN_MESSAGE, ConsoleIconFactory.getSwingIcon("banner/deploy.png"), new Object[] { SwingLocale.getString("close") }, null, true); 189 | 190 | executeLayout(); 191 | } 192 | }; 193 | 194 | return action; 195 | } 196 | 197 | public JSecurityAction createLayoutAction() { 198 | JSecurityAction action = new JSecurityAction(ConsoleLocaleFactory.getString("layout_text"), ConsoleIconFactory.getSwingIcon("layout.png"), ConsoleLocaleFactory.getString("layout_tooltip")) { 199 | private static final long serialVersionUID = 1L; 200 | 201 | public void execute(ActionEvent e) { 202 | executeLayout(); 203 | } 204 | }; 205 | 206 | return action; 207 | } 208 | 209 | public List getServiceIds(boolean isGateway) { 210 | try { 211 | if (isGateway) { 212 | return ConsoleCache.getGateways(); 213 | } else { 214 | return ConsoleCache.getRealServices(); 215 | } 216 | } catch (Exception e) { 217 | JExceptionDialog.traceException(HandleManager.getFrame(this), ConsoleLocaleFactory.getString("operation_failure"), e); 218 | } 219 | 220 | return null; 221 | } 222 | 223 | public List getInstances(String serviceId) { 224 | if (StringUtils.isBlank(serviceId)) { 225 | return null; 226 | } 227 | 228 | try { 229 | return ConsoleController.getInstanceList(serviceId); 230 | } catch (Exception e) { 231 | JExceptionDialog.traceException(HandleManager.getFrame(this), ConsoleLocaleFactory.getString("operation_failure"), e); 232 | } 233 | 234 | return null; 235 | } 236 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/BlueGreenCreatePanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import javax.swing.ButtonGroup; 13 | import javax.swing.JPanel; 14 | 15 | import com.nepxion.discovery.common.entity.BlueGreenRouteType; 16 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 17 | import com.nepxion.discovery.console.desktop.common.util.ButtonUtil; 18 | import com.nepxion.discovery.console.desktop.workspace.type.TypeLocale; 19 | import com.nepxion.swing.label.JBasicLabel; 20 | import com.nepxion.swing.layout.filed.FiledLayout; 21 | import com.nepxion.swing.layout.table.TableLayout; 22 | import com.nepxion.swing.radiobutton.JBasicRadioButton; 23 | 24 | public class BlueGreenCreatePanel extends StrategyCreatePanel { 25 | private static final long serialVersionUID = 1L; 26 | 27 | protected ButtonGroup blueGreenRouteButtonGroup; 28 | protected JPanel blueGreenRoutePanel; 29 | 30 | public BlueGreenCreatePanel() { 31 | blueGreenRoutePanel = new JPanel(); 32 | blueGreenRoutePanel.setLayout(new FiledLayout(FiledLayout.ROW, FiledLayout.FULL, 10)); 33 | blueGreenRouteButtonGroup = new ButtonGroup(); 34 | BlueGreenRouteType[] blueGreenRouteTypes = BlueGreenRouteType.values(); 35 | for (int i = 0; i < blueGreenRouteTypes.length; i++) { 36 | BlueGreenRouteType blueGreenRouteType = blueGreenRouteTypes[i]; 37 | 38 | JBasicRadioButton blueGreenRouteRadioButton = new JBasicRadioButton(TypeLocale.getDescription(blueGreenRouteType), TypeLocale.getDescription(blueGreenRouteType)); 39 | blueGreenRouteRadioButton.setName(blueGreenRouteType.toString()); 40 | blueGreenRoutePanel.add(blueGreenRouteRadioButton); 41 | blueGreenRouteButtonGroup.add(blueGreenRouteRadioButton); 42 | 43 | if (i == 0) { 44 | blueGreenRouteRadioButton.setSelected(true); 45 | } 46 | } 47 | 48 | add(new JBasicLabel(ConsoleLocaleFactory.getString("route_text")), "0, 10"); 49 | add(blueGreenRoutePanel, "1, 10"); 50 | } 51 | 52 | @Override 53 | public double[] getLayoutRow() { 54 | return new double[] { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED }; 55 | } 56 | 57 | public BlueGreenRouteType getBlueGreenRouteType() { 58 | String rationButtonName = ButtonUtil.getRationButtonName(blueGreenRouteButtonGroup); 59 | 60 | return BlueGreenRouteType.fromString(rationButtonName); 61 | } 62 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/CacheSetPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | import java.awt.event.ActionEvent; 14 | import java.awt.event.ItemEvent; 15 | import java.awt.event.ItemListener; 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | import javax.swing.BorderFactory; 20 | import javax.swing.Box; 21 | import javax.swing.JPanel; 22 | 23 | import com.nepxion.discovery.console.cache.ConsoleCache; 24 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 25 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 26 | import com.nepxion.discovery.console.desktop.common.util.ListUtil; 27 | import com.nepxion.discovery.console.desktop.workspace.type.SetType; 28 | import com.nepxion.swing.action.JSecurityAction; 29 | import com.nepxion.swing.button.JClassicButton; 30 | import com.nepxion.swing.checkbox.JBasicCheckBox; 31 | import com.nepxion.swing.icon.IconFactory; 32 | import com.nepxion.swing.list.JBasicList; 33 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 34 | import com.nepxion.swing.tabbedpane.JBasicTabbedPane; 35 | 36 | public class CacheSetPanel extends SetPanel { 37 | private static final long serialVersionUID = 1L; 38 | 39 | protected CacheListPanel groupCacheListPanel; 40 | protected CacheListPanel gatewayCacheListPanel; 41 | protected CacheListPanel serviceCacheListPanel; 42 | 43 | public CacheSetPanel() { 44 | super(SetType.CACHE); 45 | 46 | groupCacheListPanel = new CacheListPanel() { 47 | private static final long serialVersionUID = 1L; 48 | 49 | @Override 50 | public List getInitialValue() { 51 | return ConsoleCache.getCachedGroups(); 52 | } 53 | 54 | @Override 55 | public List getRefreshValue() { 56 | return ConsoleCache.refreshGroups(); 57 | } 58 | }; 59 | 60 | gatewayCacheListPanel = new CacheListPanel() { 61 | private static final long serialVersionUID = 1L; 62 | 63 | @Override 64 | public List getInitialValue() { 65 | return ConsoleCache.getCachedGateways(); 66 | } 67 | 68 | @Override 69 | public List getRefreshValue() { 70 | return ConsoleCache.refreshGateways(); 71 | } 72 | }; 73 | 74 | serviceCacheListPanel = new CacheListPanel() { 75 | private static final long serialVersionUID = 1L; 76 | 77 | @Override 78 | public List getInitialValue() { 79 | return ConsoleCache.getCachedServices(); 80 | } 81 | 82 | @Override 83 | public List getRefreshValue() { 84 | return ConsoleCache.refreshServices(); 85 | } 86 | }; 87 | 88 | JBasicCheckBox enableCacheCheckBox = new JBasicCheckBox(ConsoleLocaleFactory.getString("cache_enable"), ConsoleCache.isCacheEnabled()); 89 | enableCacheCheckBox.addItemListener(new ItemListener() { 90 | public void itemStateChanged(ItemEvent e) { 91 | ConsoleCache.setCacheEnabled(enableCacheCheckBox.isSelected()); 92 | } 93 | }); 94 | 95 | JPanel cacheToolBar = new JPanel(); 96 | cacheToolBar.setLayout(new BorderLayout()); 97 | cacheToolBar.add(new JClassicButton(createRefreshCacheAction()), BorderLayout.WEST); 98 | cacheToolBar.add(Box.createHorizontalGlue(), BorderLayout.CENTER); 99 | cacheToolBar.add(enableCacheCheckBox, BorderLayout.EAST); 100 | 101 | JBasicTabbedPane cacheTabbedPane = new JBasicTabbedPane(); 102 | cacheTabbedPane.addTab(ConsoleLocaleFactory.getString("group_list_cache"), groupCacheListPanel, ConsoleLocaleFactory.getString("group_list_cache")); 103 | cacheTabbedPane.addTab(ConsoleLocaleFactory.getString("gateway_list_cache"), gatewayCacheListPanel, ConsoleLocaleFactory.getString("gateway_list_cache")); 104 | cacheTabbedPane.addTab(ConsoleLocaleFactory.getString("service_list_cache"), serviceCacheListPanel, ConsoleLocaleFactory.getString("service_list_cache")); 105 | 106 | setLayout(new BorderLayout(0, 5)); 107 | setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); 108 | add(cacheTabbedPane, BorderLayout.CENTER); 109 | add(cacheToolBar, BorderLayout.SOUTH); 110 | } 111 | 112 | public abstract class CacheListPanel extends JPanel { 113 | private static final long serialVersionUID = 1L; 114 | 115 | protected JBasicList cacheList; 116 | 117 | public CacheListPanel() { 118 | cacheList = new JBasicList(); 119 | 120 | setLayout(new BorderLayout()); 121 | setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0)); 122 | add(new JBasicScrollPane(cacheList), BorderLayout.CENTER); 123 | 124 | setInitialModel(); 125 | } 126 | 127 | public JBasicList getCacheList() { 128 | return cacheList; 129 | } 130 | 131 | public void setInitialModel() { 132 | List initialValue = getInitialValue(); 133 | 134 | setModel(initialValue); 135 | } 136 | 137 | public void setRefreshModel() { 138 | List refreshValue = getRefreshValue(); 139 | 140 | setModel(refreshValue); 141 | } 142 | 143 | public void setModel(List value) { 144 | if (value != null) { 145 | ListUtil.setSortableModel(cacheList, value, IconFactory.getSwingIcon("component/view.png")); 146 | } else { 147 | ListUtil.setSortableModel(cacheList, new ArrayList(), IconFactory.getSwingIcon("component/view.png")); 148 | } 149 | } 150 | 151 | public abstract List getInitialValue(); 152 | 153 | public abstract List getRefreshValue(); 154 | } 155 | 156 | public void setInitialModel() { 157 | groupCacheListPanel.setInitialModel(); 158 | gatewayCacheListPanel.setInitialModel(); 159 | serviceCacheListPanel.setInitialModel(); 160 | } 161 | 162 | public void setRefreshModel() { 163 | groupCacheListPanel.setRefreshModel(); 164 | gatewayCacheListPanel.setRefreshModel(); 165 | serviceCacheListPanel.setRefreshModel(); 166 | } 167 | 168 | public JSecurityAction createRefreshCacheAction() { 169 | JSecurityAction action = new JSecurityAction(ConsoleLocaleFactory.getString("refresh_cache"), ConsoleIconFactory.getSwingIcon("netbean/rotate_16.png"), ConsoleLocaleFactory.getString("refresh_cache")) { 170 | private static final long serialVersionUID = 1L; 171 | 172 | public void execute(ActionEvent e) { 173 | setRefreshModel(); 174 | } 175 | }; 176 | 177 | return action; 178 | } 179 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/CreatePanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.event.ItemEvent; 13 | import java.util.Enumeration; 14 | 15 | import javax.swing.AbstractButton; 16 | import javax.swing.ButtonGroup; 17 | import javax.swing.JPanel; 18 | 19 | import org.apache.commons.lang3.StringUtils; 20 | 21 | import com.nepxion.discovery.common.entity.DeployType; 22 | import com.nepxion.discovery.common.entity.SubscriptionType; 23 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 24 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 25 | import com.nepxion.discovery.console.desktop.common.util.ButtonUtil; 26 | import com.nepxion.discovery.console.desktop.workspace.type.TypeLocale; 27 | import com.nepxion.swing.label.JBasicLabel; 28 | import com.nepxion.swing.layout.filed.FiledLayout; 29 | import com.nepxion.swing.layout.table.TableLayout; 30 | import com.nepxion.swing.radiobutton.JBasicRadioButton; 31 | import com.nepxion.swing.shrinkbar.JShrinkShortcut; 32 | 33 | public class CreatePanel extends SubscriptionPanel { 34 | private static final long serialVersionUID = 1L; 35 | 36 | protected JShrinkShortcut deployParameterShrinkShortcut; 37 | protected ButtonGroup deployButtonGroup; 38 | protected JPanel deployPanel; 39 | 40 | public CreatePanel() { 41 | deployParameterShrinkShortcut = new JShrinkShortcut(); 42 | deployParameterShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("deploy_parameter_text")); 43 | deployParameterShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 44 | deployParameterShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("deploy_parameter_text")); 45 | 46 | deployPanel = new JPanel(); 47 | deployPanel.setLayout(new FiledLayout(FiledLayout.ROW, FiledLayout.FULL, 10)); 48 | deployButtonGroup = new ButtonGroup(); 49 | DeployType[] deployTypes = DeployType.values(); 50 | for (int i = 0; i < deployTypes.length; i++) { 51 | DeployType deployType = deployTypes[i]; 52 | 53 | JBasicRadioButton deployRadioButton = new JBasicRadioButton(TypeLocale.getDescription(deployType), TypeLocale.getDescription(deployType)); 54 | deployRadioButton.setName(deployType.toString()); 55 | deployPanel.add(deployRadioButton); 56 | deployButtonGroup.add(deployRadioButton); 57 | 58 | if (i == 0) { 59 | deployRadioButton.setSelected(true); 60 | } 61 | } 62 | 63 | add(deployParameterShrinkShortcut, "0, 5, 1, 5"); 64 | add(new JBasicLabel(ConsoleLocaleFactory.getString("deploy_text")), "0, 6"); 65 | add(deployPanel, "1, 6"); 66 | } 67 | 68 | @Override 69 | public double[] getLayoutRow() { 70 | return new double[] { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED }; 71 | } 72 | 73 | @Override 74 | public void subscriptionRadioButtonItemStateChanged(ItemEvent e) { 75 | super.subscriptionRadioButtonItemStateChanged(e); 76 | 77 | JBasicRadioButton radioButton = (JBasicRadioButton) e.getItem(); 78 | 79 | if (StringUtils.equals(radioButton.getName(), SubscriptionType.GLOBAL.toString())) { 80 | if (deployButtonGroup != null) { 81 | for (Enumeration enumeration = deployButtonGroup.getElements(); enumeration.hasMoreElements();) { 82 | AbstractButton button = enumeration.nextElement(); 83 | button.setEnabled(!radioButton.isSelected()); 84 | 85 | // 全局配置下,处理为非域网关模式 86 | if (StringUtils.equals(button.getName(), DeployType.NON_DOMAIN_GATEWAY.toString())) { 87 | button.setSelected(true); 88 | } 89 | } 90 | } 91 | } 92 | } 93 | 94 | public DeployType getDeployType() { 95 | String rationButtonName = ButtonUtil.getRationButtonName(deployButtonGroup); 96 | 97 | return DeployType.fromString(rationButtonName); 98 | } 99 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/GrayCreatePanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public class GrayCreatePanel extends StrategyCreatePanel { 13 | private static final long serialVersionUID = 1L; 14 | 15 | public GrayCreatePanel() { 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/InspectorConfirmPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Dimension; 13 | import java.util.List; 14 | 15 | import javax.swing.JPanel; 16 | 17 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 18 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 19 | import com.nepxion.discovery.console.desktop.common.util.ListUtil; 20 | import com.nepxion.swing.icon.IconFactory; 21 | import com.nepxion.swing.layout.table.TableLayout; 22 | import com.nepxion.swing.list.JBasicList; 23 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 24 | import com.nepxion.swing.shrinkbar.JShrinkShortcut; 25 | import com.nepxion.swing.textfield.JBasicTextField; 26 | 27 | public class InspectorConfirmPanel extends JPanel { 28 | private static final long serialVersionUID = 1L; 29 | 30 | protected JBasicTextField urlTextField; 31 | protected JBasicList serviceIdList; 32 | 33 | public InspectorConfirmPanel() { 34 | JShrinkShortcut urlShrinkShortcut = new JShrinkShortcut(); 35 | urlShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("inspector_url")); 36 | urlShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 37 | urlShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("inspector_url")); 38 | 39 | urlTextField = new JBasicTextField(); 40 | 41 | JShrinkShortcut serviceIdShrinkShortcut = new JShrinkShortcut(); 42 | serviceIdShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("inspector_services")); 43 | serviceIdShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 44 | serviceIdShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("inspector_services")); 45 | 46 | serviceIdList = new JBasicList(); 47 | JBasicScrollPane serviceIdScrollPane = new JBasicScrollPane(serviceIdList); 48 | serviceIdScrollPane.setPreferredSize(new Dimension(580, 340)); 49 | 50 | double[][] size = { 51 | { TableLayout.FILL }, 52 | { TableLayout.PREFERRED, TableLayout.PREFERRED, 10, TableLayout.PREFERRED, TableLayout.FILL } 53 | }; 54 | 55 | TableLayout tableLayout = new TableLayout(size); 56 | tableLayout.setHGap(0); 57 | tableLayout.setVGap(5); 58 | 59 | setLayout(tableLayout); 60 | add(urlShrinkShortcut, "0, 0"); 61 | add(urlTextField, "0, 1"); 62 | add(serviceIdShrinkShortcut, "0, 3"); 63 | add(serviceIdScrollPane, "0, 4"); 64 | } 65 | 66 | public String getUrl() { 67 | return urlTextField.getText().trim(); 68 | } 69 | 70 | public void setUrl(String url) { 71 | urlTextField.setText(url); 72 | } 73 | 74 | public void setServiceIds(List serviceIds) { 75 | ListUtil.setModel(serviceIdList, serviceIds, IconFactory.getSwingIcon("component/view.png")); 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/InspectorParameterPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | import java.awt.event.ActionEvent; 14 | import java.util.ArrayList; 15 | import java.util.LinkedHashMap; 16 | import java.util.List; 17 | import java.util.Map; 18 | import java.util.UUID; 19 | 20 | import javax.swing.BorderFactory; 21 | import javax.swing.DefaultComboBoxModel; 22 | import javax.swing.JPanel; 23 | 24 | import org.apache.commons.lang3.StringUtils; 25 | 26 | import com.nepxion.discovery.common.entity.ParameterType; 27 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 28 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 29 | import com.nepxion.discovery.console.desktop.common.util.DimensionUtil; 30 | import com.nepxion.swing.action.JSecurityAction; 31 | import com.nepxion.swing.button.JClassicButton; 32 | import com.nepxion.swing.combobox.JBasicComboBox; 33 | import com.nepxion.swing.container.ContainerManager; 34 | import com.nepxion.swing.element.ElementNode; 35 | import com.nepxion.swing.handle.HandleManager; 36 | import com.nepxion.swing.label.JBasicLabel; 37 | import com.nepxion.swing.layout.filed.FiledLayout; 38 | import com.nepxion.swing.layout.table.TableLayout; 39 | import com.nepxion.swing.locale.SwingLocale; 40 | import com.nepxion.swing.optionpane.JBasicOptionPane; 41 | import com.nepxion.swing.textfield.JBasicTextField; 42 | 43 | public class InspectorParameterPanel extends JPanel { 44 | private static final long serialVersionUID = 1L; 45 | 46 | protected ParameterBar parameterBar; 47 | 48 | public InspectorParameterPanel() { 49 | parameterBar = new ParameterBar(); 50 | 51 | setLayout(new FiledLayout(FiledLayout.COLUMN, FiledLayout.FULL, 10)); 52 | add(parameterBar); 53 | } 54 | 55 | public Map getHeaderMap() { 56 | return parameterBar.getMap(ParameterType.HEADER); 57 | } 58 | 59 | public Map getParameterMap() { 60 | return parameterBar.getMap(ParameterType.PARAMETER); 61 | } 62 | 63 | public Map getCookieMap() { 64 | return parameterBar.getMap(ParameterType.COOKIE); 65 | } 66 | 67 | public class ParameterBar extends JPanel { 68 | private static final long serialVersionUID = 1L; 69 | 70 | protected int initialParameterItemCount = 1; 71 | protected List parameterItems = new ArrayList(); 72 | 73 | protected JPanel parameterItemBar; 74 | 75 | public ParameterBar() { 76 | parameterItemBar = new JPanel(); 77 | 78 | double[][] size = { 79 | { TableLayout.FILL }, 80 | { TableLayout.PREFERRED } 81 | }; 82 | 83 | TableLayout tableLayout = new TableLayout(size); 84 | tableLayout.setHGap(0); 85 | tableLayout.setVGap(5); 86 | 87 | JPanel parameterBar = new JPanel(); 88 | parameterBar.setLayout(tableLayout); 89 | 90 | setLayout(new BorderLayout()); 91 | setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); 92 | add(parameterItemBar, BorderLayout.CENTER); 93 | add(parameterBar, BorderLayout.SOUTH); 94 | 95 | for (int i = 0; i < initialParameterItemCount; i++) { 96 | parameterItems.add(new ParameterItem(UUID.randomUUID().toString())); 97 | } 98 | layoutParameterItems(); 99 | } 100 | 101 | public void layoutParameterItems() { 102 | parameterItemBar.removeAll(); 103 | 104 | double[] row = new double[parameterItems.size()]; 105 | for (int i = 0; i < row.length; i++) { 106 | row[i] = TableLayout.PREFERRED; 107 | } 108 | double[][] size = { 109 | { TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED, TableLayout.PREFERRED }, 110 | row 111 | }; 112 | 113 | TableLayout tableLayout = new TableLayout(size); 114 | tableLayout.setHGap(0); 115 | tableLayout.setVGap(5); 116 | 117 | int index = 0; 118 | 119 | parameterItemBar.setLayout(tableLayout); 120 | for (ParameterItem parameterItem : parameterItems) { 121 | parameterItemBar.add(parameterItem.parameterComboBox, "0, " + index); 122 | parameterItemBar.add(parameterItem.keyTextField, "1, " + index); 123 | parameterItemBar.add(new JBasicLabel("="), "2, " + index); 124 | parameterItemBar.add(parameterItem.valueTextField, "3, " + index); 125 | parameterItemBar.add(parameterItem.addButton, "4, " + index); 126 | parameterItemBar.add(parameterItem.removeButton, "5, " + index); 127 | 128 | index++; 129 | } 130 | 131 | ContainerManager.update(parameterItemBar); 132 | } 133 | 134 | public Map getMap(ParameterType parameterType) { 135 | Map map = new LinkedHashMap(); 136 | 137 | for (ParameterItem parameterItem : parameterItems) { 138 | ElementNode elementNode = (ElementNode) parameterItem.parameterComboBox.getSelectedItem(); 139 | ParameterType type = (ParameterType) elementNode.getUserObject(); 140 | if (type == parameterType) { 141 | String key = parameterItem.keyTextField.getText().trim(); 142 | String value = parameterItem.valueTextField.getText().trim(); 143 | if (StringUtils.isNotBlank(key) && StringUtils.isNotBlank(value)) { 144 | map.put(key, value); 145 | } 146 | } 147 | } 148 | 149 | return map; 150 | } 151 | 152 | public ParameterItem getParameterItem(String uuid) { 153 | for (ParameterItem parameterItem : parameterItems) { 154 | if (StringUtils.equals(parameterItem.uuid, uuid)) { 155 | return parameterItem; 156 | } 157 | } 158 | 159 | return null; 160 | } 161 | 162 | public class ParameterItem { 163 | protected JBasicComboBox parameterComboBox = new JBasicComboBox(); 164 | protected JBasicTextField keyTextField = new JBasicTextField(); 165 | protected JBasicTextField valueTextField = new JBasicTextField(); 166 | protected JClassicButton addButton = new JClassicButton(createAddParameterItemAction()); 167 | protected JClassicButton removeButton = new JClassicButton(createRemoveParameterItemAction()); 168 | 169 | protected String uuid; 170 | 171 | @SuppressWarnings("unchecked") 172 | public ParameterItem(String uuid) { 173 | this.uuid = uuid; 174 | 175 | List parameterElementNodes = new ArrayList(); 176 | ParameterType[] parameterTypes = ParameterType.values(); 177 | for (int i = 0; i < parameterTypes.length; i++) { 178 | ParameterType parameterType = parameterTypes[i]; 179 | parameterElementNodes.add(new ElementNode(parameterType.toString(), parameterType.toString(), null, parameterType.toString(), parameterType)); 180 | } 181 | 182 | parameterComboBox.setModel(new DefaultComboBoxModel<>(parameterElementNodes.toArray())); 183 | 184 | addButton.setName(uuid); 185 | removeButton.setName(uuid); 186 | 187 | DimensionUtil.setWidth(addButton, 30); 188 | DimensionUtil.setWidth(removeButton, 30); 189 | } 190 | } 191 | 192 | public JSecurityAction createAddParameterItemAction() { 193 | JSecurityAction action = new JSecurityAction(ConsoleIconFactory.getSwingIcon("add.png"), ConsoleLocaleFactory.getString("add_parameter_item")) { 194 | private static final long serialVersionUID = 1L; 195 | 196 | public void execute(ActionEvent e) { 197 | JClassicButton addButton = (JClassicButton) e.getSource(); 198 | String uuid = addButton.getName(); 199 | 200 | ParameterItem parameterItem = getParameterItem(uuid); 201 | if (parameterItem == null) { 202 | return; 203 | } 204 | 205 | parameterItems.add(parameterItems.indexOf(parameterItem) + 1, new ParameterItem(UUID.randomUUID().toString())); 206 | layoutParameterItems(); 207 | } 208 | }; 209 | 210 | return action; 211 | } 212 | 213 | public JSecurityAction createRemoveParameterItemAction() { 214 | JSecurityAction action = new JSecurityAction(ConsoleIconFactory.getSwingIcon("delete.png"), ConsoleLocaleFactory.getString("remove_parameter_item")) { 215 | private static final long serialVersionUID = 1L; 216 | 217 | public void execute(ActionEvent e) { 218 | if (parameterItems.size() < 2) { 219 | JBasicOptionPane.showMessageDialog(HandleManager.getFrame(InspectorParameterPanel.this), ConsoleLocaleFactory.getString("parameter_one_at_least"), SwingLocale.getString("warning"), JBasicOptionPane.WARNING_MESSAGE); 220 | 221 | return; 222 | } 223 | 224 | JClassicButton removeButton = (JClassicButton) e.getSource(); 225 | String uuid = removeButton.getName(); 226 | 227 | ParameterItem parameterItem = getParameterItem(uuid); 228 | if (parameterItem == null) { 229 | return; 230 | } 231 | 232 | parameterItems.remove(parameterItem); 233 | layoutParameterItems(); 234 | } 235 | }; 236 | 237 | return action; 238 | } 239 | } 240 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/LayouterSetPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | 14 | import javax.swing.BorderFactory; 15 | import javax.swing.JPanel; 16 | 17 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 18 | import com.nepxion.discovery.console.desktop.common.util.DimensionUtil; 19 | import com.nepxion.discovery.console.desktop.workspace.type.SetType; 20 | import com.nepxion.swing.label.JBasicLabel; 21 | import com.nepxion.swing.layout.table.TableLayout; 22 | import com.nepxion.swing.tabbedpane.JBasicTabbedPane; 23 | import com.nepxion.swing.textfield.number.JNumberTextField; 24 | 25 | public class LayouterSetPanel extends SetPanel { 26 | private static final long serialVersionUID = 1L; 27 | 28 | private static final String X_OFFSET = "50"; 29 | private static final String Y_OFFSET = "100"; 30 | private static final String X_GAP = "250"; 31 | private static final String Y_GAP = "60"; 32 | 33 | private JNumberTextField xOffsetTextField; 34 | private JNumberTextField yOffsetTextField; 35 | private JNumberTextField xGapTextField; 36 | private JNumberTextField yGapTextField; 37 | 38 | public LayouterSetPanel() { 39 | super(SetType.LAYOUTER); 40 | 41 | xOffsetTextField = new JNumberTextField(4, 0, 0, 10000); 42 | yOffsetTextField = new JNumberTextField(4, 0, 0, 10000); 43 | xGapTextField = new JNumberTextField(4, 0, 0, 10000); 44 | yGapTextField = new JNumberTextField(4, 0, 0, 10000); 45 | 46 | xOffsetTextField.setText(X_OFFSET); 47 | yOffsetTextField.setText(Y_OFFSET); 48 | xGapTextField.setText(X_GAP); 49 | yGapTextField.setText(Y_GAP); 50 | 51 | double[][] size = { 52 | { TableLayout.PREFERRED, TableLayout.FILL }, 53 | { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } 54 | }; 55 | 56 | TableLayout tableLayout = new TableLayout(size); 57 | tableLayout.setHGap(5); 58 | tableLayout.setVGap(5); 59 | 60 | JPanel layouterPanel = new JPanel(); 61 | layouterPanel.setLayout(tableLayout); 62 | layouterPanel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0)); 63 | layouterPanel.add(DimensionUtil.addWidth(new JBasicLabel(ConsoleLocaleFactory.getString("x_offset")), 5), "0, 0"); 64 | layouterPanel.add(xOffsetTextField, "1, 0"); 65 | layouterPanel.add(DimensionUtil.addWidth(new JBasicLabel(ConsoleLocaleFactory.getString("y_offset")), 5), "0, 1"); 66 | layouterPanel.add(yOffsetTextField, "1, 1"); 67 | layouterPanel.add(DimensionUtil.addWidth(new JBasicLabel(ConsoleLocaleFactory.getString("x_gap")), 5), "0, 2"); 68 | layouterPanel.add(xGapTextField, "1, 2"); 69 | layouterPanel.add(DimensionUtil.addWidth(new JBasicLabel(ConsoleLocaleFactory.getString("y_gap")), 5), "0, 3"); 70 | layouterPanel.add(yGapTextField, "1, 3"); 71 | 72 | JBasicTabbedPane layouterTabbedPane = new JBasicTabbedPane(); 73 | layouterTabbedPane.addTab(ConsoleLocaleFactory.getString("layouter_parameter"), layouterPanel, ConsoleLocaleFactory.getString("layouter_parameter")); 74 | 75 | setLayout(new BorderLayout(0, 5)); 76 | setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); 77 | add(layouterTabbedPane, BorderLayout.CENTER); 78 | } 79 | 80 | public int getXOffset() { 81 | return Integer.parseInt(xOffsetTextField.getText()); 82 | } 83 | 84 | public int getYOffset() { 85 | return Integer.parseInt(yOffsetTextField.getText()); 86 | } 87 | 88 | public int getXGap() { 89 | return Integer.parseInt(xGapTextField.getText()); 90 | } 91 | 92 | public int getYGap() { 93 | return Integer.parseInt(yGapTextField.getText()); 94 | } 95 | 96 | public void setXOffset(int xOffset) { 97 | xOffsetTextField.setText(String.valueOf(xOffset)); 98 | } 99 | 100 | public void setYOffset(int yOffset) { 101 | yOffsetTextField.setText(String.valueOf(yOffset)); 102 | } 103 | 104 | public void setXGap(int xGap) { 105 | xGapTextField.setText(String.valueOf(xGap)); 106 | } 107 | 108 | public void setYGap(int yGap) { 109 | yGapTextField.setText(String.valueOf(yGap)); 110 | } 111 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/MultiPreviewPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | 14 | import javax.swing.BorderFactory; 15 | import javax.swing.JPanel; 16 | 17 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 18 | import com.nepxion.swing.tabbedpane.JBasicTabbedPane; 19 | 20 | public class MultiPreviewPanel extends JPanel { 21 | private static final long serialVersionUID = 1L; 22 | 23 | protected PreviewPanel partialPreviewPanel; 24 | protected PreviewPanel globalPreviewPanel; 25 | 26 | public MultiPreviewPanel() { 27 | partialPreviewPanel = new PreviewPanel(); 28 | partialPreviewPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); 29 | 30 | globalPreviewPanel = new PreviewPanel(); 31 | globalPreviewPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); 32 | 33 | JBasicTabbedPane previewTabbedPane = new JBasicTabbedPane(); 34 | previewTabbedPane.addTab(ConsoleLocaleFactory.getString("partial_config"), partialPreviewPanel, ConsoleLocaleFactory.getString("partial_config")); 35 | previewTabbedPane.addTab(ConsoleLocaleFactory.getString("global_config"), globalPreviewPanel, ConsoleLocaleFactory.getString("global_config")); 36 | 37 | setLayout(new BorderLayout()); 38 | add(previewTabbedPane, BorderLayout.CENTER); 39 | } 40 | 41 | public PreviewPanel getPartialPreviewPanel() { 42 | return partialPreviewPanel; 43 | } 44 | 45 | public PreviewPanel getGlobalPreviewPanel() { 46 | return globalPreviewPanel; 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/OpenPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Dimension; 13 | import java.awt.event.ActionEvent; 14 | import java.io.File; 15 | import java.io.FileInputStream; 16 | import java.io.InputStream; 17 | import java.util.Arrays; 18 | import java.util.List; 19 | 20 | import javax.swing.JPanel; 21 | 22 | import org.apache.commons.io.IOUtils; 23 | import org.apache.commons.lang3.StringUtils; 24 | 25 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 26 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 27 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 28 | import com.nepxion.discovery.console.desktop.common.swing.dialog.JExceptionDialog; 29 | import com.nepxion.discovery.console.desktop.workspace.processor.ReleaseProcessor; 30 | import com.nepxion.swing.action.JSecurityAction; 31 | import com.nepxion.swing.button.JClassicButton; 32 | import com.nepxion.swing.handle.HandleManager; 33 | import com.nepxion.swing.layout.filed.FiledLayout; 34 | import com.nepxion.swing.layout.table.TableLayout; 35 | import com.nepxion.swing.locale.SwingLocale; 36 | import com.nepxion.swing.optionpane.JBasicOptionPane; 37 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 38 | import com.nepxion.swing.selector.file.JFileFilter; 39 | import com.nepxion.swing.selector.file.JFileSelector; 40 | import com.nepxion.swing.shrinkbar.JShrinkShortcut; 41 | import com.nepxion.swing.textarea.JBasicTextArea; 42 | 43 | public class OpenPanel extends CreatePanel { 44 | private static final long serialVersionUID = 1L; 45 | 46 | protected JBasicTextArea configTextArea; 47 | 48 | protected ReleaseProcessor releaseProcessor; 49 | 50 | public OpenPanel(ReleaseProcessor releaseProcessor) { 51 | this.releaseProcessor = releaseProcessor; 52 | 53 | JPanel toolBar = new JPanel(); 54 | toolBar.setLayout(new FiledLayout(FiledLayout.ROW, FiledLayout.FULL, 10)); 55 | toolBar.add(new JClassicButton(createOpenRemoteAction())); 56 | toolBar.add(new JClassicButton(createOpenLocalAction())); 57 | 58 | JShrinkShortcut previewShrinkShortcut = new JShrinkShortcut(); 59 | previewShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("config_content_text")); 60 | previewShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 61 | previewShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("config_content_text")); 62 | 63 | configTextArea = new JBasicTextArea(); 64 | JBasicScrollPane configTextAreaScrollPane = new JBasicScrollPane(configTextArea); 65 | configTextAreaScrollPane.setPreferredSize(new Dimension(660, 340)); 66 | 67 | add(toolBar, "0, 8, 1, 8"); 68 | add(previewShrinkShortcut, "0, 10, 1, 10"); 69 | add(configTextAreaScrollPane, "0, 11, 1, 11"); 70 | } 71 | 72 | @Override 73 | public double[] getLayoutRow() { 74 | return new double[] { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.FILL }; 75 | } 76 | 77 | public String getConfig() { 78 | return configTextArea.getText().trim(); 79 | } 80 | 81 | public JSecurityAction createOpenRemoteAction() { 82 | JSecurityAction action = new JSecurityAction(ConsoleLocaleFactory.getString("open_config_remote_text"), ConsoleIconFactory.getSwingIcon("theme/folder/query.png"), ConsoleLocaleFactory.getString("open_config_remote_text")) { 83 | private static final long serialVersionUID = 1L; 84 | 85 | public void execute(ActionEvent e) { 86 | String group = getValidGroup(); 87 | if (StringUtils.isEmpty(group)) { 88 | JBasicOptionPane.showMessageDialog(HandleManager.getFrame(OpenPanel.this), ConsoleLocaleFactory.getString("group_not_null"), SwingLocale.getString("warning"), JBasicOptionPane.WARNING_MESSAGE); 89 | 90 | return; 91 | } 92 | 93 | String gatewayId = getValidGatewayId(); 94 | if (StringUtils.isEmpty(gatewayId)) { 95 | JBasicOptionPane.showMessageDialog(HandleManager.getFrame(OpenPanel.this), ConsoleLocaleFactory.getString("service_id_not_null"), SwingLocale.getString("warning"), JBasicOptionPane.WARNING_MESSAGE); 96 | 97 | return; 98 | } 99 | 100 | String config = releaseProcessor.getConfig(group, gatewayId); 101 | configTextArea.setText(config); 102 | configTextArea.setCaretPosition(0); 103 | } 104 | }; 105 | 106 | return action; 107 | } 108 | 109 | public JSecurityAction createOpenLocalAction() { 110 | JSecurityAction action = new JSecurityAction(ConsoleLocaleFactory.getString("open_config_local_text"), ConsoleIconFactory.getSwingIcon("theme/folder/folder_import.png"), ConsoleLocaleFactory.getString("open_config_local_text")) { 111 | private static final long serialVersionUID = 1L; 112 | 113 | public void execute(ActionEvent e) { 114 | List filterWords = Arrays.asList(new String[] { "xml" }); 115 | String filterDescription = ConsoleLocaleFactory.getString("config_file_text") + "(*.xml)"; 116 | JFileFilter fileFilter = new JFileFilter(filterWords, filterDescription); 117 | 118 | JFileSelector fileSelector = new JFileSelector(HandleManager.getFrame(OpenPanel.this), ConsoleLocaleFactory.getString("open_config_local_text")); 119 | fileSelector.setFileFilter(fileFilter); 120 | File file = fileSelector.openFile(); 121 | if (file == null) { 122 | return; 123 | } 124 | 125 | String config = null; 126 | InputStream inputStream = null; 127 | try { 128 | inputStream = new FileInputStream(file); 129 | config = IOUtils.toString(inputStream, DiscoveryConstant.ENCODING_UTF_8); 130 | } catch (Exception ex) { 131 | JExceptionDialog.traceException(HandleManager.getFrame(OpenPanel.this), ConsoleLocaleFactory.getString("operation_failure"), ex); 132 | } finally { 133 | if (inputStream != null) { 134 | IOUtils.closeQuietly(inputStream); 135 | } 136 | } 137 | 138 | configTextArea.setText(config); 139 | configTextArea.setCaretPosition(0); 140 | } 141 | }; 142 | 143 | return action; 144 | } 145 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/PreviewPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Dimension; 13 | 14 | import javax.swing.JPanel; 15 | 16 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 17 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 18 | import com.nepxion.swing.layout.table.TableLayout; 19 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 20 | import com.nepxion.swing.shrinkbar.JShrinkShortcut; 21 | import com.nepxion.swing.textarea.JBasicTextArea; 22 | import com.nepxion.swing.textfield.JBasicTextField; 23 | 24 | public class PreviewPanel extends JPanel { 25 | private static final long serialVersionUID = 1L; 26 | 27 | protected JBasicTextField keyTextField; 28 | protected JBasicTextArea configTextArea; 29 | 30 | public PreviewPanel() { 31 | JShrinkShortcut keyShrinkShortcut = new JShrinkShortcut(); 32 | keyShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("config_key_text")); 33 | keyShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 34 | keyShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("config_key_text")); 35 | 36 | keyTextField = new JBasicTextField(); 37 | 38 | JShrinkShortcut contentShrinkShortcut = new JShrinkShortcut(); 39 | contentShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("config_content_text")); 40 | contentShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 41 | contentShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("config_content_text")); 42 | 43 | configTextArea = new JBasicTextArea(); 44 | JBasicScrollPane configTextAreaScrollPane = new JBasicScrollPane(configTextArea); 45 | configTextAreaScrollPane.setPreferredSize(new Dimension(660, 340)); 46 | 47 | double[][] size = { 48 | { TableLayout.FILL }, 49 | { TableLayout.PREFERRED, TableLayout.PREFERRED, 10, TableLayout.PREFERRED, TableLayout.FILL } 50 | }; 51 | 52 | TableLayout tableLayout = new TableLayout(size); 53 | tableLayout.setHGap(0); 54 | tableLayout.setVGap(5); 55 | 56 | setLayout(tableLayout); 57 | add(keyShrinkShortcut, "0, 0"); 58 | add(keyTextField, "0, 1"); 59 | add(contentShrinkShortcut, "0, 3"); 60 | add(configTextAreaScrollPane, "0, 4"); 61 | } 62 | 63 | public void setKey(String key) { 64 | keyTextField.setText(key); 65 | } 66 | 67 | public void setConfig(String config) { 68 | configTextArea.setText(config); 69 | configTextArea.setCaretPosition(0); 70 | } 71 | 72 | public String getConfig() { 73 | return configTextArea.getText().trim(); 74 | } 75 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/ResetPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public class ResetPanel extends SubscriptionPanel { 13 | private static final long serialVersionUID = 1L; 14 | 15 | public ResetPanel() { 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/SetManagePanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.BorderLayout; 13 | import java.awt.Dimension; 14 | import java.awt.event.ItemEvent; 15 | import java.awt.event.ItemListener; 16 | import java.util.ArrayList; 17 | import java.util.List; 18 | 19 | import javax.swing.BorderFactory; 20 | import javax.swing.ButtonGroup; 21 | import javax.swing.JPanel; 22 | import javax.swing.JSplitPane; 23 | 24 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 25 | import com.nepxion.discovery.console.desktop.workspace.type.SetType; 26 | import com.nepxion.discovery.console.desktop.workspace.type.TypeLocale; 27 | import com.nepxion.swing.button.JBasicToggleButton; 28 | import com.nepxion.swing.buttonbar.JBasicButtonBar; 29 | import com.nepxion.swing.container.ContainerManager; 30 | import com.nepxion.swing.scrollpane.JBasicScrollPane; 31 | import com.nepxion.swing.style.button.lite.JGlassLiteButtonStyle; 32 | import com.nepxion.swing.style.button.lite.LiteButtonUI; 33 | import com.nepxion.swing.style.buttonbar.ButtonBarUI; 34 | 35 | public class SetManagePanel extends JPanel { 36 | private static final long serialVersionUID = 1L; 37 | 38 | protected static SetManagePanel setManagePanel; 39 | 40 | public static SetManagePanel getInstance() { 41 | if (setManagePanel == null) { 42 | setManagePanel = new SetManagePanel(); 43 | } 44 | 45 | return setManagePanel; 46 | } 47 | 48 | private CacheSetPanel cacheSetPanel; 49 | private LayouterSetPanel layouterSetPanel; 50 | 51 | private SetManagePanel() { 52 | cacheSetPanel = new CacheSetPanel(); 53 | layouterSetPanel = new LayouterSetPanel(); 54 | 55 | List setPanelList = new ArrayList(); 56 | setPanelList.add(cacheSetPanel); 57 | setPanelList.add(layouterSetPanel); 58 | 59 | JPanel container = new JPanel(); 60 | container.setLayout(new BorderLayout()); 61 | 62 | JBasicButtonBar buttonBar = new JBasicButtonBar(JBasicButtonBar.VERTICAL); 63 | buttonBar.setUI(new ButtonBarUI(new LiteButtonUI(new JGlassLiteButtonStyle()))); 64 | 65 | ButtonGroup buttonGroup = new ButtonGroup(); 66 | 67 | int index = 0; 68 | for (SetType setType : SetType.values()) { 69 | JBasicToggleButton toggleButton = new JBasicToggleButton(TypeLocale.getDescription(setType), ConsoleIconFactory.getSwingIcon(setType.getIcon()), TypeLocale.getDescription(setType)); 70 | toggleButton.setName(setType.toString()); 71 | toggleButton.addItemListener(new ItemListener() { 72 | @Override 73 | public void itemStateChanged(ItemEvent e) { 74 | if (toggleButton.isSelected()) { 75 | container.removeAll(); 76 | 77 | for (SetPanel setPanel : setPanelList) { 78 | if (setPanel.getSetType() == SetType.fromString(toggleButton.getName())) { 79 | container.add(setPanel, BorderLayout.CENTER); 80 | ContainerManager.update(container); 81 | 82 | break; 83 | } 84 | } 85 | } 86 | } 87 | }); 88 | 89 | buttonBar.add(toggleButton); 90 | buttonGroup.add(toggleButton); 91 | 92 | if (index == 0) { 93 | toggleButton.setSelected(true); 94 | } 95 | 96 | index++; 97 | } 98 | 99 | JPanel buttonPanel = new JPanel(); 100 | buttonPanel.setLayout(new BorderLayout()); 101 | buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); 102 | buttonPanel.add(new JBasicScrollPane(buttonBar), BorderLayout.CENTER); 103 | 104 | JSplitPane splitPane = new JSplitPane(); 105 | splitPane.setDividerLocation(120); 106 | splitPane.setLeftComponent(buttonPanel); 107 | splitPane.setRightComponent(container); 108 | 109 | setLayout(new BorderLayout()); 110 | setPreferredSize(new Dimension(600, 500)); 111 | add(splitPane, BorderLayout.CENTER); 112 | } 113 | 114 | public CacheSetPanel getCacheSetPanel() { 115 | return cacheSetPanel; 116 | } 117 | 118 | public LayouterSetPanel getLayouterSetPanel() { 119 | return layouterSetPanel; 120 | } 121 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/SetPanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import javax.swing.JPanel; 13 | 14 | import com.nepxion.discovery.console.desktop.workspace.type.SetType; 15 | 16 | public class SetPanel extends JPanel { 17 | private static final long serialVersionUID = 1L; 18 | 19 | protected SetType setType; 20 | 21 | public SetPanel(SetType setType) { 22 | this.setType = setType; 23 | } 24 | 25 | public SetType getSetType() { 26 | return setType; 27 | } 28 | 29 | public void setSetType(SetType setType) { 30 | this.setType = setType; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/panel/StrategyCreatePanel.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.panel; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import javax.swing.ButtonGroup; 13 | import javax.swing.JPanel; 14 | 15 | import com.nepxion.discovery.console.desktop.common.icon.ConsoleIconFactory; 16 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 17 | import com.nepxion.discovery.console.desktop.common.util.ButtonUtil; 18 | import com.nepxion.discovery.console.desktop.workspace.type.StrategyType; 19 | import com.nepxion.discovery.console.desktop.workspace.type.TypeLocale; 20 | import com.nepxion.swing.label.JBasicLabel; 21 | import com.nepxion.swing.layout.filed.FiledLayout; 22 | import com.nepxion.swing.layout.table.TableLayout; 23 | import com.nepxion.swing.radiobutton.JBasicRadioButton; 24 | import com.nepxion.swing.shrinkbar.JShrinkShortcut; 25 | 26 | public class StrategyCreatePanel extends CreatePanel { 27 | private static final long serialVersionUID = 1L; 28 | 29 | protected ButtonGroup strategyButtonGroup; 30 | protected JPanel strategyPanel; 31 | 32 | public StrategyCreatePanel() { 33 | JShrinkShortcut releaseShrinkShortcut = new JShrinkShortcut(); 34 | releaseShrinkShortcut.setTitle(ConsoleLocaleFactory.getString("release_parameter_text")); 35 | releaseShrinkShortcut.setIcon(ConsoleIconFactory.getSwingIcon("stereo/paste_16.png")); 36 | releaseShrinkShortcut.setToolTipText(ConsoleLocaleFactory.getString("release_parameter_text")); 37 | 38 | strategyPanel = new JPanel(); 39 | strategyPanel.setLayout(new FiledLayout(FiledLayout.ROW, FiledLayout.FULL, 10)); 40 | strategyButtonGroup = new ButtonGroup(); 41 | StrategyType[] strategyTypes = StrategyType.values(); 42 | for (int i = 0; i < strategyTypes.length; i++) { 43 | StrategyType strategyType = strategyTypes[i]; 44 | JBasicRadioButton strategyRadioButton = new JBasicRadioButton(TypeLocale.getDescription(strategyType), TypeLocale.getDescription(strategyType)); 45 | strategyRadioButton.setName(strategyType.toString()); 46 | strategyPanel.add(strategyRadioButton); 47 | strategyButtonGroup.add(strategyRadioButton); 48 | 49 | if (i == 0) { 50 | strategyRadioButton.setSelected(true); 51 | } 52 | } 53 | 54 | add(releaseShrinkShortcut, "0, 8, 1, 8"); 55 | add(new JBasicLabel(ConsoleLocaleFactory.getString("strategy_text")), "0, 9"); 56 | add(strategyPanel, "1, 9"); 57 | } 58 | 59 | @Override 60 | public double[] getLayoutRow() { 61 | return new double[] { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED, 0, TableLayout.PREFERRED, TableLayout.PREFERRED }; 62 | } 63 | 64 | public StrategyType getStrategyType() { 65 | String rationButtonName = ButtonUtil.getRationButtonName(strategyButtonGroup); 66 | 67 | return StrategyType.fromString(rationButtonName); 68 | } 69 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/AbstractReleaseProcessor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.common.entity.FormatType; 13 | import com.nepxion.discovery.common.entity.RuleEntity; 14 | import com.nepxion.discovery.console.controller.ConsoleController; 15 | 16 | public abstract class AbstractReleaseProcessor implements ReleaseProcessor { 17 | @Override 18 | public RuleEntity parseConfig(String config) { 19 | return ReleaseProcessorFactory.getXmlConfigParser().parse(config); 20 | } 21 | 22 | @Override 23 | public String deparseConfig(RuleEntity ruleEntity) { 24 | return ReleaseProcessorFactory.getXmlConfigDeparser().deparse(ruleEntity); 25 | } 26 | 27 | @Override 28 | public String getConfig(String group, String serviceId) { 29 | return ConsoleController.remoteConfigView(group, serviceId); 30 | } 31 | 32 | @Override 33 | public String saveConfig(String group, String serviceId, String config) { 34 | return ConsoleController.remoteConfigUpdate(group, serviceId, config, FormatType.XML_FORMAT); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/ReleaseProcessor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import twaver.TDataBox; 13 | 14 | import com.nepxion.discovery.common.entity.RuleEntity; 15 | 16 | public interface ReleaseProcessor { 17 | void fromConfig(RuleEntity ruleEntity, TDataBox dataBox) throws Exception; 18 | 19 | String toConfig(RuleEntity ruleEntity, TDataBox dataBox); 20 | 21 | RuleEntity parseConfig(String config); 22 | 23 | String deparseConfig(RuleEntity ruleEntity); 24 | 25 | String getConfig(String group, String serviceId); 26 | 27 | String saveConfig(String group, String serviceId, String config); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/ReleaseProcessorFactory.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.plugin.framework.parser.xml.XmlConfigDeparser; 13 | import com.nepxion.discovery.plugin.framework.parser.xml.XmlConfigParser; 14 | 15 | public class ReleaseProcessorFactory { 16 | private static XmlConfigParser xmlConfigParser = new XmlConfigParser(); 17 | private static XmlConfigDeparser xmlConfigDeparser = new XmlConfigDeparser(); 18 | 19 | public static XmlConfigParser getXmlConfigParser() { 20 | return xmlConfigParser; 21 | } 22 | 23 | public static XmlConfigDeparser getXmlConfigDeparser() { 24 | return xmlConfigDeparser; 25 | } 26 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/ReleaseProcessorUtil.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.util.List; 13 | 14 | import org.apache.commons.collections4.CollectionUtils; 15 | import org.apache.commons.lang3.StringUtils; 16 | 17 | import com.nepxion.discovery.common.entity.BlueGreenRouteType; 18 | import com.nepxion.discovery.common.entity.ElementType; 19 | import com.nepxion.discovery.common.entity.RuleEntity; 20 | import com.nepxion.discovery.common.entity.StrategyConditionBlueGreenEntity; 21 | import com.nepxion.discovery.common.entity.StrategyConditionGrayEntity; 22 | import com.nepxion.discovery.common.entity.StrategyReleaseEntity; 23 | import com.nepxion.discovery.common.entity.StrategyRouteEntity; 24 | import com.nepxion.discovery.console.desktop.workspace.type.ReleaseType; 25 | import com.nepxion.discovery.console.desktop.workspace.type.StrategyType; 26 | import com.nepxion.discovery.plugin.framework.parser.xml.XmlConfigConstant; 27 | 28 | public class ReleaseProcessorUtil { 29 | public static ReleaseType getReleaseType(RuleEntity ruleEntity) { 30 | StrategyReleaseEntity strategyReleaseEntity = ruleEntity.getStrategyReleaseEntity(); 31 | if (strategyReleaseEntity == null) { 32 | return null; 33 | } 34 | 35 | List strategyConditionBlueGreenEntityList = strategyReleaseEntity.getStrategyConditionBlueGreenEntityList(); 36 | if (CollectionUtils.isNotEmpty(strategyConditionBlueGreenEntityList)) { 37 | return ReleaseType.BLUE_GREEN; 38 | } 39 | 40 | List strategyConditionGrayEntityList = strategyReleaseEntity.getStrategyConditionGrayEntityList(); 41 | if (CollectionUtils.isNotEmpty(strategyConditionGrayEntityList)) { 42 | return ReleaseType.GRAY; 43 | } 44 | 45 | return null; 46 | } 47 | 48 | @SuppressWarnings("incomplete-switch") 49 | public static StrategyType getStrategyType(RuleEntity ruleEntity) { 50 | StrategyReleaseEntity strategyReleaseEntity = ruleEntity.getStrategyReleaseEntity(); 51 | if (strategyReleaseEntity == null) { 52 | return null; 53 | } 54 | 55 | List strategyRouteEntityList = strategyReleaseEntity.getStrategyRouteEntityList(); 56 | for (StrategyRouteEntity strategyRouteEntity : strategyRouteEntityList) { 57 | switch (strategyRouteEntity.getType()) { 58 | case VERSION: 59 | return StrategyType.VERSION; 60 | case REGION: 61 | return StrategyType.REGION; 62 | } 63 | } 64 | 65 | return null; 66 | } 67 | 68 | public static String getStrategyBlueConditionId() { 69 | return ElementType.BLUE + "-" + XmlConfigConstant.CONDITION_ELEMENT_NAME; 70 | } 71 | 72 | public static String getStrategyGreenConditionId() { 73 | return ElementType.GREEN + "-" + XmlConfigConstant.CONDITION_ELEMENT_NAME; 74 | } 75 | 76 | public static String getStrategyBlueRouteId(StrategyType strategyType) { 77 | return ElementType.BLUE + "-" + strategyType + "-" + XmlConfigConstant.ROUTE_ELEMENT_NAME; 78 | } 79 | 80 | public static String getStrategyGreenRouteId(StrategyType strategyType) { 81 | return ElementType.GREEN + "-" + strategyType + "-" + XmlConfigConstant.ROUTE_ELEMENT_NAME; 82 | } 83 | 84 | public static String getStrategyGrayConditionId() { 85 | return ElementType.GRAY + "-" + XmlConfigConstant.CONDITION_ELEMENT_NAME; 86 | } 87 | 88 | public static String getStrategyGrayRouteId(StrategyType strategyType) { 89 | return ElementType.GRAY + "-" + strategyType + "-" + XmlConfigConstant.ROUTE_ELEMENT_NAME; 90 | } 91 | 92 | public static String getStrategyStableRouteId(StrategyType strategyType) { 93 | return ElementType.STABLE + "-" + strategyType + "-" + XmlConfigConstant.ROUTE_ELEMENT_NAME; 94 | } 95 | 96 | public static StrategyConditionBlueGreenEntity getStrategyConditionBlueGreenEntity(RuleEntity ruleEntity, String strategyConditionBlueGreenId) { 97 | StrategyReleaseEntity strategyReleaseEntity = ruleEntity.getStrategyReleaseEntity(); 98 | List strategyConditionBlueGreenEntityList = strategyReleaseEntity.getStrategyConditionBlueGreenEntityList(); 99 | for (StrategyConditionBlueGreenEntity strategyConditionBlueGreenEntity : strategyConditionBlueGreenEntityList) { 100 | String conditionId = strategyConditionBlueGreenEntity.getId(); 101 | if (StringUtils.equals(conditionId, strategyConditionBlueGreenId)) { 102 | return strategyConditionBlueGreenEntity; 103 | } 104 | } 105 | 106 | return null; 107 | } 108 | 109 | public static StrategyConditionGrayEntity getStrategyConditionGrayEntity(RuleEntity ruleEntity, String strategyConditionGrayId) { 110 | StrategyReleaseEntity strategyReleaseEntity = ruleEntity.getStrategyReleaseEntity(); 111 | List strategyConditionGrayEntityList = strategyReleaseEntity.getStrategyConditionGrayEntityList(); 112 | for (StrategyConditionGrayEntity strategyConditionGrayEntity : strategyConditionGrayEntityList) { 113 | String conditionId = strategyConditionGrayEntity.getId(); 114 | if (StringUtils.equals(conditionId, strategyConditionGrayId)) { 115 | return strategyConditionGrayEntity; 116 | } 117 | } 118 | 119 | return null; 120 | } 121 | 122 | public static StrategyRouteEntity getStrategyRouteEntity(RuleEntity ruleEntity, String strategyRouteId) { 123 | StrategyReleaseEntity strategyReleaseEntity = ruleEntity.getStrategyReleaseEntity(); 124 | List strategyRouteEntityList = strategyReleaseEntity.getStrategyRouteEntityList(); 125 | for (StrategyRouteEntity strategyRouteEntity : strategyRouteEntityList) { 126 | String routeId = strategyRouteEntity.getId(); 127 | if (StringUtils.equals(routeId, strategyRouteId)) { 128 | return strategyRouteEntity; 129 | } 130 | } 131 | 132 | return null; 133 | } 134 | 135 | public static BlueGreenRouteType getBlueGreenRouteType(RuleEntity ruleEntity, StrategyType strategyType) { 136 | String greenConditionId = getStrategyGreenConditionId(); 137 | StrategyConditionBlueGreenEntity strategyConditionGreenEntity = getStrategyConditionBlueGreenEntity(ruleEntity, greenConditionId); 138 | 139 | String greenRouteId = getStrategyGreenRouteId(strategyType); 140 | StrategyRouteEntity strategyRouteGreenEntity = getStrategyRouteEntity(ruleEntity, greenRouteId); 141 | 142 | if (strategyConditionGreenEntity != null && strategyRouteGreenEntity != null) { 143 | return BlueGreenRouteType.BLUE_GREEN_BASIC; 144 | } else { 145 | return BlueGreenRouteType.BLUE_BASIC; 146 | } 147 | } 148 | 149 | public static boolean isEmptyStrategy(RuleEntity ruleEntity) { 150 | return ruleEntity.getStrategyEntity() == null && ruleEntity.getStrategyReleaseEntity() == null; 151 | } 152 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/strategy/AbstractStrategyReleaseProcessor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor.strategy; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.console.desktop.workspace.processor.AbstractReleaseProcessor; 13 | import com.nepxion.discovery.console.desktop.workspace.type.StrategyType; 14 | 15 | public abstract class AbstractStrategyReleaseProcessor extends AbstractReleaseProcessor implements StrategyReleaseProcessor { 16 | protected StrategyType strategyType; 17 | 18 | @Override 19 | public StrategyType getStrategyType() { 20 | return strategyType; 21 | } 22 | 23 | @Override 24 | public void setStrategyType(StrategyType strategyType) { 25 | this.strategyType = strategyType; 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/processor/strategy/StrategyReleaseProcessor.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.processor.strategy; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.console.desktop.workspace.processor.ReleaseProcessor; 13 | import com.nepxion.discovery.console.desktop.workspace.type.StrategyType; 14 | 15 | public interface StrategyReleaseProcessor extends ReleaseProcessor { 16 | StrategyType getStrategyType(); 17 | 18 | void setStrategyType(StrategyType strategyType); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/LinkUI.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.topology; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import java.awt.Color; 13 | 14 | public class LinkUI { 15 | public static final Color BLACK = new Color(52, 53, 54); 16 | public static final Color YELLOW = new Color(185, 175, 29); 17 | public static final Color GRAY = new Color(112, 112, 112); 18 | public static final Color BLUE = new Color(4, 144, 217); 19 | public static final Color GREEN = new Color(13, 164, 176); 20 | public static final Color ORANGE = new Color(224, 98, 13); 21 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/NodeImageType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.topology; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public enum NodeImageType { 13 | SERVICE_GROUP, 14 | GATEWAY_GROUP, 15 | SERVICE, 16 | SERVICE_BLACK, 17 | SERVICE_YELLOW, 18 | SERVICE_GRAY, 19 | SERVICE_BLUE, 20 | SERVICE_GREEN, 21 | SERVICE_ORANGE, 22 | GATEWAY, 23 | GATEWAY_BLACK, 24 | GATEWAY_YELLOW, 25 | GATEWAY_GRAY, 26 | GATEWAY_BLUE, 27 | GATEWAY_GREEN, 28 | GATEWAY_ORANGE 29 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/NodeLocation.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.topology; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public class NodeLocation { 13 | private int startX; 14 | private int startY; 15 | private int horizontalGap; 16 | private int verticalGap; 17 | 18 | public NodeLocation(int startX, int startY, int horizontalGap, int verticalGap) { 19 | this.startX = startX; 20 | this.startY = startY; 21 | this.horizontalGap = horizontalGap; 22 | this.verticalGap = verticalGap; 23 | } 24 | 25 | public int getStartX() { 26 | return startX; 27 | } 28 | 29 | public void setStartX(int startX) { 30 | this.startX = startX; 31 | } 32 | 33 | public int getStartY() { 34 | return startY; 35 | } 36 | 37 | public void setStartY(int startY) { 38 | this.startY = startY; 39 | } 40 | 41 | public int getHorizontalGap() { 42 | return horizontalGap; 43 | } 44 | 45 | public void setHorizontalGap(int horizontalGap) { 46 | this.horizontalGap = horizontalGap; 47 | } 48 | 49 | public int getVerticalGap() { 50 | return verticalGap; 51 | } 52 | 53 | public void setVerticalGap(int verticalGap) { 54 | this.verticalGap = verticalGap; 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/topology/NodeSizeType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.topology; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public enum NodeSizeType { 13 | LARGE, 14 | MIDDLE, 15 | SMALL 16 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/AuthorityType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import org.apache.commons.lang3.StringUtils; 13 | 14 | public enum AuthorityType { 15 | STRATEGY("strategy"), 16 | REGISTER("register"), 17 | DISCOVERY("discovery"); 18 | 19 | private String value; 20 | 21 | private AuthorityType(String value) { 22 | this.value = value; 23 | } 24 | 25 | public String getValue() { 26 | return value; 27 | } 28 | 29 | public String getCapitalizeValue() { 30 | return StringUtils.capitalize(value); 31 | } 32 | 33 | public static AuthorityType fromString(String value) { 34 | for (AuthorityType type : AuthorityType.values()) { 35 | if (type.getValue().equalsIgnoreCase(value)) { 36 | return type; 37 | } 38 | } 39 | 40 | throw new IllegalArgumentException("No matched type with value=" + value); 41 | } 42 | 43 | @Override 44 | public String toString() { 45 | return value; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/DimensionType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 13 | 14 | public enum DimensionType { 15 | VERSION(DiscoveryConstant.VERSION, "V"), 16 | REGION(DiscoveryConstant.REGION, "R"), 17 | ENVIRONMENT(DiscoveryConstant.ENVIRONMENT, "E"), 18 | ZONE(DiscoveryConstant.ZONE, "Z"), 19 | ADDRESS(DiscoveryConstant.ADDRESS, "H"), 20 | GROUP(DiscoveryConstant.GROUP, "G"); 21 | 22 | private String value; 23 | private String key; 24 | 25 | private DimensionType(String value, String key) { 26 | this.value = value; 27 | this.key = key; 28 | } 29 | 30 | public String getValue() { 31 | return value; 32 | } 33 | 34 | public String getKey() { 35 | return key; 36 | } 37 | 38 | public static DimensionType fromString(String value) { 39 | for (DimensionType type : DimensionType.values()) { 40 | if (type.getValue().equalsIgnoreCase(value)) { 41 | return type; 42 | } 43 | } 44 | 45 | throw new IllegalArgumentException("No matched type with value=" + value); 46 | } 47 | 48 | @Override 49 | public String toString() { 50 | return value; 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/FeatureType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public enum FeatureType { 13 | INSPECTOR("inspector"); 14 | 15 | private String value; 16 | 17 | private FeatureType(String value) { 18 | this.value = value; 19 | } 20 | 21 | public String getValue() { 22 | return value; 23 | } 24 | 25 | public static FeatureType fromString(String value) { 26 | for (FeatureType type : FeatureType.values()) { 27 | if (type.getValue().equalsIgnoreCase(value)) { 28 | return type; 29 | } 30 | } 31 | 32 | throw new IllegalArgumentException("No matched type with value=" + value); 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return value; 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/ProtocolType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public enum ProtocolType { 13 | HTTP("http://"), 14 | HTTPS("https://"); 15 | 16 | private String value; 17 | 18 | private ProtocolType(String value) { 19 | this.value = value; 20 | } 21 | 22 | public String getValue() { 23 | return value; 24 | } 25 | 26 | public static ProtocolType fromString(String value) { 27 | for (ProtocolType type : ProtocolType.values()) { 28 | if (type.getValue().equalsIgnoreCase(value)) { 29 | return type; 30 | } 31 | } 32 | 33 | throw new IllegalArgumentException("No matched type with value=" + value); 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return value; 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/ReleaseType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 13 | 14 | public enum ReleaseType { 15 | BLUE_GREEN(DiscoveryConstant.BLUE_GREEN), 16 | GRAY(DiscoveryConstant.GRAY), 17 | DATABASE_BLUE_GREEN("database-blue-green"), 18 | MESSAGE_QUEUE_BLUE_GREEN("message-queue-blue-green"); 19 | 20 | private String value; 21 | 22 | private ReleaseType(String value) { 23 | this.value = value; 24 | } 25 | 26 | public String getValue() { 27 | return value; 28 | } 29 | 30 | public static ReleaseType fromString(String value) { 31 | for (ReleaseType type : ReleaseType.values()) { 32 | if (type.getValue().equalsIgnoreCase(value)) { 33 | return type; 34 | } 35 | } 36 | 37 | throw new IllegalArgumentException("No matched type with value=" + value); 38 | } 39 | 40 | @Override 41 | public String toString() { 42 | return value; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/SetType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | public enum SetType { 13 | CACHE("cache", "stereo/network_32.png"), 14 | LAYOUTER("layouter", "stereo/movie_32.png"); 15 | 16 | private String value; 17 | private String icon; 18 | 19 | private SetType(String value, String icon) { 20 | this.value = value; 21 | this.icon = icon; 22 | } 23 | 24 | public String getValue() { 25 | return value; 26 | } 27 | 28 | public String getIcon() { 29 | return icon; 30 | } 31 | 32 | public static SetType fromString(String value) { 33 | for (SetType type : SetType.values()) { 34 | if (type.getValue().equalsIgnoreCase(value)) { 35 | return type; 36 | } 37 | } 38 | 39 | throw new IllegalArgumentException("No matched type with value=" + value); 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return value; 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/StrategyType.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import org.apache.commons.lang3.StringUtils; 13 | 14 | import com.nepxion.discovery.common.constant.DiscoveryConstant; 15 | 16 | public enum StrategyType { 17 | VERSION(DiscoveryConstant.VERSION), 18 | REGION(DiscoveryConstant.REGION); 19 | 20 | private String value; 21 | 22 | private StrategyType(String value) { 23 | this.value = value; 24 | } 25 | 26 | public String getValue() { 27 | return value; 28 | } 29 | 30 | public String getCapitalizeValue() { 31 | return StringUtils.capitalize(value); 32 | } 33 | 34 | public static StrategyType fromString(String value) { 35 | for (StrategyType type : StrategyType.values()) { 36 | if (type.getValue().equalsIgnoreCase(value)) { 37 | return type; 38 | } 39 | } 40 | 41 | throw new IllegalArgumentException("No matched type with value=" + value); 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | return value; 47 | } 48 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/desktop/workspace/type/TypeLocale.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.desktop.workspace.type; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.common.entity.BlueGreenRouteType; 13 | import com.nepxion.discovery.common.entity.DeployType; 14 | import com.nepxion.discovery.common.entity.ElementType; 15 | import com.nepxion.discovery.common.entity.PortalType; 16 | import com.nepxion.discovery.common.entity.SubscriptionType; 17 | import com.nepxion.discovery.console.desktop.common.locale.ConsoleLocaleFactory; 18 | 19 | public class TypeLocale { 20 | public static String getDescription(ReleaseType releaseType) { 21 | return getDescription(releaseType, "_release"); 22 | } 23 | 24 | public static String getDescription(AuthorityType authorityType) { 25 | return getDescription(authorityType, "_authority"); 26 | } 27 | 28 | public static String getDescription(StrategyType strategyType) { 29 | return getDescription(strategyType, "_strategy"); 30 | } 31 | 32 | public static String getDescription(SubscriptionType subscriptionType) { 33 | return getDescription(subscriptionType, "_subscription"); 34 | } 35 | 36 | public static String getDescription(DeployType deployType) { 37 | return getDescription(deployType, "_deploy"); 38 | } 39 | 40 | public static String getDescription(BlueGreenRouteType blueGreenRouteType) { 41 | return getDescription(blueGreenRouteType, "_route"); 42 | } 43 | 44 | public static String getDescription(ElementType elementType) { 45 | return getDescription(elementType, "_element"); 46 | } 47 | 48 | public static String getDescription(FeatureType featureType) { 49 | return getDescription(featureType, "_feature"); 50 | } 51 | 52 | public static String getDescription(SetType setType) { 53 | return getDescription(setType, "_set"); 54 | } 55 | 56 | public static String getDescription(PortalType portalType) { 57 | return getDescription(portalType, "_portal"); 58 | } 59 | 60 | public static String getDescription(DimensionType dimensionType) { 61 | return getDescription(dimensionType, "_dimension"); 62 | } 63 | 64 | public static String getName(Object type) { 65 | return ConsoleLocaleFactory.getString(type.toString()); 66 | } 67 | 68 | public static String getDescription(Object type, String suffix) { 69 | return ConsoleLocaleFactory.getString(type + suffix); 70 | } 71 | } -------------------------------------------------------------------------------- /src/main/java/com/nepxion/discovery/console/entity/Instance.java: -------------------------------------------------------------------------------- 1 | package com.nepxion.discovery.console.entity; 2 | 3 | /** 4 | *

Title: Nepxion Discovery

5 | *

Description: Nepxion Discovery

6 | *

Copyright: Copyright (c) 2017-2050

7 | *

Company: Nepxion

8 | * @author Haojun Ren 9 | * @version 1.0 10 | */ 11 | 12 | import com.nepxion.discovery.common.entity.InstanceEntity; 13 | 14 | public class Instance extends InstanceEntity { 15 | private static final long serialVersionUID = -3381928574242229614L; 16 | 17 | private String dynamicVersion; 18 | private String rule; 19 | private String dynamicRule; 20 | 21 | public String getDynamicVersion() { 22 | return dynamicVersion; 23 | } 24 | 25 | public void setDynamicVersion(String dynamicVersion) { 26 | this.dynamicVersion = dynamicVersion; 27 | } 28 | 29 | public String getRule() { 30 | return rule; 31 | } 32 | 33 | public void setRule(String rule) { 34 | this.rule = rule; 35 | } 36 | 37 | public String getDynamicRule() { 38 | return dynamicRule; 39 | } 40 | 41 | public void setDynamicRule(String dynamicRule) { 42 | this.dynamicRule = dynamicRule; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/10.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/11.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/12.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/13.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/14.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/15.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/17.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/18.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/19.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/2.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/3.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/4.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/5.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/6.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/7.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/8.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/load/9.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/logo.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_24.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/close_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_24.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/flat/open_favorite_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_20.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_24.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/close_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_20.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_24.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_16.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_20.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_24.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/open_favorite_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/close.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/close.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/open.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/open.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/open_favorite.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/navigator/stereo/plus/open_favorite.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_discovery.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_other.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_register.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_strategy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/authority_strategy.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blacklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blacklist.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/blue_green_2.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/database_blue_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/database_blue_green.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/gray_2.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/inspector.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/inspector_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/inspector_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/message_queue_blue_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/message_queue_blue_green.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_discovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_discovery.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_other.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_other.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_register.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_strategy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/authority_strategy.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blacklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blacklist.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green_2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/blue_green_2.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/database_blue_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/database_blue_green.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_1.ico -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/gray_2.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/inspector.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/inspector_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/inspector_1.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/message_queue_blue_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/outlook/stereo/plus/message_queue_blue_green.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/selector.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_black_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_blue_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_gray_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_green_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_group_80.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_orange_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/gateway_yellow_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_black_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_blue_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_gray_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_green_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_group_80.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_orange_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_32.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_48.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/icon/topology/service_yellow_64.png -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/locale/Locale.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | @echo ============================================================= 3 | @echo $ $ 4 | @echo $ Encoding localizer $ 5 | @echo $ $ 6 | @echo $ $ 7 | @echo $ $ 8 | @echo $ Nepxion Technologies All Right Reserved $ 9 | @echo $ Copyright(C) 2015 $ 10 | @echo $ $ 11 | @echo ============================================================= 12 | @echo. 13 | @echo off 14 | 15 | @rem ====================================== 16 | @rem DOS Batch file to invoke the Swing UI 17 | @rem ====================================== 18 | 19 | @title Encoding localizer 20 | @color 0a 21 | 22 | rem if "%JAVA_HOME%"=="" goto noJava 23 | 24 | if "%JAVA_HOME%"=="" set JAVA_HOME=D:\JDK1.6.0 25 | 26 | %JAVA_HOME%\bin\native2ascii -encoding gbk Locale.properties Locale_zh_CN.properties -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/locale/Locale.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nepxion/DiscoveryDesktop/e18590243433005ddf209de49cfc564e1e83f5dd/src/main/resources/com/nepxion/discovery/console/desktop/common/locale/Locale.properties -------------------------------------------------------------------------------- /src/main/resources/com/nepxion/discovery/console/desktop/common/locale/Locale_en_US.properties: -------------------------------------------------------------------------------- 1 | url=Console Url -------------------------------------------------------------------------------- /src/main/resources/config/console.properties: -------------------------------------------------------------------------------- 1 | url=http://localhost:6001/ -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } --- [%15.15t] %-40.40logger{39} : %msg%n 8 | 9 | UTF-8 10 | 11 | 12 | log/discovery-%d{yyyy-MM-dd}.%i.log 13 | 50MB 14 | 15 | 16 | INFO 17 | 18 | 19 | true 20 | 21 | 22 | 23 | 0 24 | 512 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | %d{yyyy-MM-dd HH:mm:ss.SSS} %levelColor(%5p) %magenta(${PID:- }) --- [%15.15t] %cyan(%-40.40logger{39}) : %msg%n 34 | 35 | 36 | 37 | INFO 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | --------------------------------------------------------------------------------