├── .gitignore ├── .travis.yml ├── Aries ├── Aries │ ├── __init__.py │ ├── ldap_client.py │ ├── settings.py │ ├── sumSpace.py │ ├── urls.py │ ├── views.py │ └── wsgi.py ├── codis │ ├── __init__.py │ ├── admin.py │ ├── models.py │ ├── rests.py │ ├── urls.py │ └── views.py ├── hdfs │ ├── __init__.py │ ├── admin.py │ ├── compress │ │ ├── compress.sh │ │ └── line2line.pl │ ├── function.py │ ├── hadoop-run.sh │ ├── libs │ │ ├── __init__.py │ │ ├── custom_decorator.py │ │ ├── ftp_operator.py │ │ ├── hdfs_operator.py │ │ └── test.py │ ├── merge │ │ ├── compress.jar │ │ └── merge.sh │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── rests.py │ ├── service.py │ ├── tools.py │ └── urls.py ├── kd_agent │ ├── __init__.py │ ├── models.py │ ├── toolsmanager.py │ ├── urls.py │ └── views.py ├── manage.py ├── middleware │ └── middleware.py ├── openstack │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── common.py │ ├── middleware │ │ ├── __init__.py │ │ ├── common │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── common_api.py │ │ │ ├── key.yaml │ │ │ ├── setting.conf │ │ │ ├── sqlite.db │ │ │ └── urls.py │ │ ├── db │ │ │ ├── __init__.py │ │ │ └── db.py │ │ ├── flavor │ │ │ ├── __init__.py │ │ │ └── flavor.py │ │ ├── image │ │ │ ├── __init__.py │ │ │ └── image.py │ │ ├── login │ │ │ ├── __init__.py │ │ │ └── login.py │ │ ├── network │ │ │ └── __init__.py │ │ ├── test │ │ │ ├── __init__.py │ │ │ ├── test_api.py │ │ │ ├── test_module.py │ │ │ └── web_test.py │ │ ├── user │ │ │ ├── __init__.py │ │ │ └── user.py │ │ ├── vm │ │ │ ├── __init__.py │ │ │ └── vm.py │ │ └── volume │ │ │ ├── __init__.py │ │ │ └── volume.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── rests.py │ ├── service.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── static │ ├── admin │ │ ├── css │ │ │ ├── admin-inlines.css │ │ │ ├── base.css │ │ │ ├── changelists.css │ │ │ ├── dashboard.css │ │ │ ├── forms.css │ │ │ ├── ie.css │ │ │ ├── login.css │ │ │ ├── overrides.css │ │ │ ├── rtl.css │ │ │ └── widgets.css │ │ ├── img │ │ │ ├── changelist-bg.gif │ │ │ ├── changelist-bg_rtl.gif │ │ │ ├── default-bg-reverse.gif │ │ │ ├── default-bg.gif │ │ │ ├── deleted-overlay.gif │ │ │ ├── gis │ │ │ │ ├── move_vertex_off.png │ │ │ │ └── move_vertex_on.png │ │ │ ├── icon-no.gif │ │ │ ├── icon-unknown.gif │ │ │ ├── icon-yes.gif │ │ │ ├── icon_addlink.gif │ │ │ ├── icon_alert.gif │ │ │ ├── icon_calendar.gif │ │ │ ├── icon_changelink.gif │ │ │ ├── icon_clock.gif │ │ │ ├── icon_deletelink.gif │ │ │ ├── icon_error.gif │ │ │ ├── icon_searchbox.png │ │ │ ├── icon_success.gif │ │ │ ├── inline-delete-8bit.png │ │ │ ├── inline-delete.png │ │ │ ├── inline-restore-8bit.png │ │ │ ├── inline-restore.png │ │ │ ├── inline-splitter-bg.gif │ │ │ ├── nav-bg-grabber.gif │ │ │ ├── nav-bg-reverse.gif │ │ │ ├── nav-bg-selected.gif │ │ │ ├── nav-bg.gif │ │ │ ├── selector-icons.gif │ │ │ ├── selector-search.gif │ │ │ ├── sorting-icons.gif │ │ │ ├── tooltag-add.png │ │ │ └── tooltag-arrowright.png │ │ └── js │ │ │ ├── LICENSE-JQUERY.txt │ │ │ ├── SelectBox.js │ │ │ ├── SelectFilter2.js │ │ │ ├── actions.js │ │ │ ├── actions.min.js │ │ │ ├── admin │ │ │ ├── DateTimeShortcuts.js │ │ │ └── RelatedObjectLookups.js │ │ │ ├── calendar.js │ │ │ ├── collapse.js │ │ │ ├── collapse.min.js │ │ │ ├── core.js │ │ │ ├── generic-lookup.js │ │ │ ├── inlines.js │ │ │ ├── inlines.min.js │ │ │ ├── jquery-1.9.1.min.js │ │ │ ├── jquery-migrate-1.2.1.min.js │ │ │ ├── jquery.init.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.sortable.js │ │ │ ├── prepopulate.js │ │ │ ├── prepopulate.min.js │ │ │ ├── related-widget-wrapper.js │ │ │ ├── timeparse.js │ │ │ └── urlify.js │ ├── aries │ │ ├── 0.7412f03033698af3bdc4.js │ │ ├── 10.7412f03033698af3bdc4.js │ │ ├── 11.7412f03033698af3bdc4.js │ │ ├── 12.7412f03033698af3bdc4.js │ │ ├── 13.7412f03033698af3bdc4.js │ │ ├── 14.7412f03033698af3bdc4.js │ │ ├── 15.7412f03033698af3bdc4.js │ │ ├── 16.7412f03033698af3bdc4.js │ │ ├── 17.7412f03033698af3bdc4.js │ │ ├── 18.7412f03033698af3bdc4.js │ │ ├── 19.7412f03033698af3bdc4.js │ │ ├── 2.7412f03033698af3bdc4.js │ │ ├── 20.7412f03033698af3bdc4.js │ │ ├── 21.7412f03033698af3bdc4.js │ │ ├── 22.7412f03033698af3bdc4.js │ │ ├── 23.7412f03033698af3bdc4.js │ │ ├── 24.7412f03033698af3bdc4.js │ │ ├── 25.7412f03033698af3bdc4.js │ │ ├── 26.7412f03033698af3bdc4.js │ │ ├── 27.7412f03033698af3bdc4.js │ │ ├── 3.7412f03033698af3bdc4.js │ │ ├── 4.7412f03033698af3bdc4.js │ │ ├── 5.7412f03033698af3bdc4.js │ │ ├── 6.7412f03033698af3bdc4.js │ │ ├── 7.7412f03033698af3bdc4.js │ │ ├── 8.7412f03033698af3bdc4.js │ │ ├── 9.7412f03033698af3bdc4.js │ │ ├── app.7412f03033698af3bdc4.js │ │ └── files │ │ │ ├── 02d321edc6e03aea1675001899d8f479.png │ │ │ ├── 0a657e5577ff33b189823cbfe2c060e5.png │ │ │ ├── 1504ed9b7b74c4e2526311d836be0fd0.png │ │ │ ├── 1dc35d25e61d819a9c357074014867ab.ttf │ │ │ ├── 2430021c72362a9a5252b993edf4d488.png │ │ │ ├── 25a32416abee198dd821b0b17a198a8f.eot │ │ │ ├── 260c9c6535065674bb5e59a73f894abb.png │ │ │ ├── 40ce7c17b5dbf5841176e2d2848a8f7b.jpg │ │ │ ├── 448c34a56d699c29117adc64c43affeb.woff2 │ │ │ ├── 4c4bf0a13eae5c7cdb109f91f8563f77.png │ │ │ ├── 4f88ef172e7bc7e98e24fc7df5a05c4b.png │ │ │ ├── 5a379c46656d7a393c8f1ab293e46def.png │ │ │ ├── 5f78e86f895f5a5cc1472cc57db154c5.png │ │ │ ├── 6c56b94fd0540844a7118cdff565b0ae.png │ │ │ ├── 8965662a4348c548189b97493c21a19e.png │ │ │ ├── 89889688147bd7575d6327160d64e760.svg │ │ │ ├── 8f88d990024975797f96ce7648dacd2f.png │ │ │ ├── 94b34ff5224ba38210d67623bb1a1504.png │ │ │ ├── 9c3460386bcab110e4a59f986dd889d2.png │ │ │ ├── a1a2d01bcd034270a3bc92176edfb66c.png │ │ │ ├── a259626daec7f20068719c966ab2c582.png │ │ │ ├── a5e723d05ad9289a376a0ada1fccb030.png │ │ │ ├── b9848d479d7dadd6089f5a249158ffb2.png │ │ │ ├── bbfbf2e8eaa8ebbce8524769ac0a5bc0.png │ │ │ ├── c8ddf1e5e5bf3682bc7bebf30f394148.woff │ │ │ ├── c95bbe6612720337c01020f29eda3384.png │ │ │ ├── d5267b8db2498e44bd567bd12e07576b.png │ │ │ ├── d5422321c4f6feed4081891051f9a6b2.png │ │ │ ├── d5461fddf4aaf2b40128f210436a7d9c.png │ │ │ ├── d7c639084f684d66a1bc66855d193ed8.svg │ │ │ ├── dd0baa69a69937600dc3bf035f3873c4.png │ │ │ ├── e18bbf611f2a2e43afc071aa2f4e1512.ttf │ │ │ ├── e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2 │ │ │ ├── f0aa0566b9f39334bd886d27d6a4cfe1.png │ │ │ ├── f4769f9bdb7466be65088239c12046d1.eot │ │ │ └── fa2772327f55d8198301fdb8bcfc8158.woff │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ ├── images │ │ ├── bitbug_favicon_blue.ico │ │ └── bitbug_favicon_whit.ico │ ├── rest_framework │ │ ├── css │ │ │ ├── bootstrap-tweaks.css │ │ │ ├── bootstrap.min.css │ │ │ ├── default.css │ │ │ └── prettify.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ ├── glyphicons-halflings.png │ │ │ └── grid.png │ │ └── js │ │ │ ├── ajax-form.js │ │ │ ├── bootstrap.min.js │ │ │ ├── csrf.js │ │ │ ├── default.js │ │ │ ├── jquery-1.11.3.min.js │ │ │ └── prettify-min.js │ └── user_auth │ │ ├── css │ │ └── login.css │ │ └── js │ │ ├── login.js │ │ └── v1 │ │ ├── 1.3d98f9883136c4ef3d97.js │ │ ├── 10.3d98f9883136c4ef3d97.js │ │ ├── 11.3d98f9883136c4ef3d97.js │ │ ├── 12.3d98f9883136c4ef3d97.js │ │ ├── 13.3d98f9883136c4ef3d97.js │ │ ├── 14.3d98f9883136c4ef3d97.js │ │ ├── 2.3d98f9883136c4ef3d97.js │ │ ├── 3.3d98f9883136c4ef3d97.js │ │ ├── 4.3d98f9883136c4ef3d97.js │ │ ├── 5.3d98f9883136c4ef3d97.js │ │ ├── 6.3d98f9883136c4ef3d97.js │ │ ├── 7.3d98f9883136c4ef3d97.js │ │ ├── 8.3d98f9883136c4ef3d97.js │ │ ├── 9.3d98f9883136c4ef3d97.js │ │ ├── app.3d98f9883136c4ef3d97.js │ │ └── files │ │ ├── 1dc35d25e61d819a9c357074014867ab.ttf │ │ ├── 25a32416abee198dd821b0b17a198a8f.eot │ │ ├── 40ce7c17b5dbf5841176e2d2848a8f7b.jpg │ │ ├── 448c34a56d699c29117adc64c43affeb.woff2 │ │ ├── 6c56b94fd0540844a7118cdff565b0ae.png │ │ ├── 89889688147bd7575d6327160d64e760.svg │ │ ├── 8f88d990024975797f96ce7648dacd2f.png │ │ ├── 94b34ff5224ba38210d67623bb1a1504.png │ │ ├── b9848d479d7dadd6089f5a249158ffb2.png │ │ ├── c8ddf1e5e5bf3682bc7bebf30f394148.woff │ │ ├── d7c639084f684d66a1bc66855d193ed8.svg │ │ ├── e18bbf611f2a2e43afc071aa2f4e1512.ttf │ │ ├── e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2 │ │ ├── f4769f9bdb7466be65088239c12046d1.eot │ │ └── fa2772327f55d8198301fdb8bcfc8158.woff └── user_auth │ ├── __init__.py │ ├── admin.py │ ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20160630_1237.py │ └── __init__.py │ ├── models.py │ ├── rests.py │ ├── service.py │ ├── templates │ └── index │ │ └── index.html │ ├── urls.py │ └── views.py ├── Dockerfile ├── README.md ├── docker-k8s ├── README.MD ├── k8s_config │ ├── sirius-rc-hlg.yaml │ ├── sirius-rc-lugu.yaml │ ├── sirius-rc.yaml │ └── sirius-svc.yaml └── script │ ├── changejs.sh │ └── start_script.sh ├── hadoop ├── core-site.xml ├── hadoop-policy.xml ├── hdfs-site.xml ├── log4j.properties └── yarn-site.xml ├── package ├── Aries │ ├── README.md │ ├── bin │ │ └── theme.js │ ├── build.sh │ ├── data │ │ └── test.json │ ├── index.tpl │ ├── package.json │ ├── server.js │ ├── src │ │ ├── App.jsx │ │ ├── App.less │ │ ├── env.js │ │ ├── functions │ │ │ ├── CalcManage │ │ │ │ ├── CalcManageDataRequester │ │ │ │ │ └── requester.js │ │ │ │ ├── ClusterInfo │ │ │ │ │ ├── index.jsx │ │ │ │ │ ├── index.less │ │ │ │ │ ├── ingressinfo.jsx │ │ │ │ │ ├── poddetail.jsx │ │ │ │ │ ├── poddetail.less │ │ │ │ │ ├── podinfo.jsx │ │ │ │ │ ├── rcinfo.jsx │ │ │ │ │ └── serviceinfo.jsx │ │ │ │ ├── CreateCluster │ │ │ │ │ ├── CC1 │ │ │ │ │ │ └── index.jsx │ │ │ │ │ ├── CC2 │ │ │ │ │ │ └── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── MyTask │ │ │ │ │ ├── Graph.jsx │ │ │ │ │ ├── Graph.less │ │ │ │ │ ├── Liebiao.jsx │ │ │ │ │ ├── Liebiao.less │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Overview │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ └── UrlConf │ │ │ │ │ └── index.jsx │ │ │ ├── Codis │ │ │ │ ├── CodisCloudDataRequester │ │ │ │ │ └── requester.js │ │ │ │ ├── CodisInfo │ │ │ │ │ ├── ObjectLog.jsx │ │ │ │ │ ├── ObjectPic.jsx │ │ │ │ │ ├── ObjectProxy.jsx │ │ │ │ │ ├── ObjectRow.jsx │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Conf │ │ │ │ │ └── CodisConf.js │ │ │ │ └── HostInfo │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ ├── HDFS │ │ │ │ ├── Capacity │ │ │ │ │ ├── Manager.jsx │ │ │ │ │ ├── Monitor.jsx │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Conf │ │ │ │ │ └── HdfsConf.js │ │ │ │ ├── Myfile │ │ │ │ │ ├── Head.jsx │ │ │ │ │ ├── MyTable.jsx │ │ │ │ │ ├── Navigate.jsx │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Service │ │ │ │ │ ├── Bottom.jsx │ │ │ │ │ ├── Head.jsx │ │ │ │ │ ├── Manager.jsx │ │ │ │ │ ├── Monitor.jsx │ │ │ │ │ ├── Top.jsx │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Share │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── ShareCenter │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── ShowShare │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── Tool │ │ │ │ │ └── hdfsTool.js │ │ │ │ └── Trash │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ ├── Login │ │ │ │ ├── bg.jpg │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ ├── NotFound │ │ │ │ └── index.jsx │ │ │ ├── Openstack │ │ │ │ ├── Conf │ │ │ │ │ └── Openstackconf.js │ │ │ │ ├── data_request │ │ │ │ │ └── request.js │ │ │ │ ├── flavors │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── images │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ ├── instances │ │ │ │ │ ├── extend.jsx │ │ │ │ │ ├── extend.less │ │ │ │ │ ├── index.jsx │ │ │ │ │ ├── index.less │ │ │ │ │ ├── instanses_tabs.jsx │ │ │ │ │ ├── jquery.min.js │ │ │ │ │ └── model_list.jsx │ │ │ │ ├── project │ │ │ │ │ ├── index.jsx │ │ │ │ │ └── index.less │ │ │ │ └── volumes │ │ │ │ │ ├── backup.jsx │ │ │ │ │ ├── index.jsx │ │ │ │ │ ├── index.less │ │ │ │ │ ├── snapshot.jsx │ │ │ │ │ ├── volumes_create.jsx │ │ │ │ │ ├── volumes_delete.jsx │ │ │ │ │ └── volumes_model_list.jsx │ │ │ ├── Overview │ │ │ │ ├── OverviewConf.js │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ └── UserAuth │ │ │ │ ├── Conf │ │ │ │ └── UserAuthConf.js │ │ │ │ └── SpaceList │ │ │ │ ├── SpaceManager.jsx │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ ├── index.js │ │ ├── pace.js │ │ ├── pace.less │ │ ├── public │ │ │ ├── AutoLayout │ │ │ │ ├── index.jsx │ │ │ │ └── readme.md │ │ │ ├── Conf │ │ │ │ └── Conf.js │ │ │ ├── DynamicTable │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ ├── Graph │ │ │ │ ├── Graph.js │ │ │ │ ├── Graph.less │ │ │ │ └── img │ │ │ │ │ ├── background.png │ │ │ │ │ ├── network │ │ │ │ │ ├── acceptDeleteIcon.png │ │ │ │ │ ├── addNodeIcon.png │ │ │ │ │ ├── backIcon.png │ │ │ │ │ ├── connectIcon.png │ │ │ │ │ ├── cross.png │ │ │ │ │ ├── cross2.png │ │ │ │ │ ├── deleteIcon.png │ │ │ │ │ ├── downArrow.png │ │ │ │ │ ├── editIcon.png │ │ │ │ │ ├── leftArrow.png │ │ │ │ │ ├── minus.png │ │ │ │ │ ├── plus.png │ │ │ │ │ ├── rightArrow.png │ │ │ │ │ ├── upArrow.png │ │ │ │ │ └── zoomExtends.png │ │ │ │ │ └── timeline │ │ │ │ │ └── delete.png │ │ │ ├── HDFS_Share │ │ │ │ └── cancle_share_blue.png │ │ │ ├── NavigationInPage │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ ├── ResourceMonitorEchart │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ ├── TabBar │ │ │ │ ├── bars.png │ │ │ │ └── picture.png │ │ │ ├── Task │ │ │ │ ├── index.jsx │ │ │ │ └── index.less │ │ │ ├── Template │ │ │ │ └── Echarts │ │ │ │ │ ├── EchartsUtil.js │ │ │ │ │ ├── common.js │ │ │ │ │ ├── pie.js │ │ │ │ │ └── pieSubarea.js │ │ │ ├── Toolkit │ │ │ │ └── index.js │ │ │ ├── auth.js │ │ │ ├── bfd.png │ │ │ └── logo.png │ │ └── router.jsx │ └── webpack.config.js ├── k8s_config │ ├── sirius-ingress.yaml │ ├── sirius-rc.yaml │ └── sirius-svc.yaml ├── kubectl_linux_1_2_4 └── kubectl_osx_1_2_4 ├── readme ├── bdmsTask.png ├── codisHost.png ├── codisInfo.png ├── hdfsCloud.png ├── k8sDesc.png ├── k8sMonitor.png ├── login.png ├── overView.png └── spaceList.png ├── requirements.txt └── sbin ├── Aries-env.sh ├── Aries.sh ├── Aries.xml ├── Aries.yaml ├── Aries.yaml.k8s └── buildDocker.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows: 2 | Thumbs.db 3 | ehthumbs.db 4 | Desktop.ini 5 | 6 | # Python: 7 | *.py[cod] 8 | *.pyc 9 | .idea/ 10 | *.so 11 | *.egg 12 | *.egg-info 13 | dist 14 | build 15 | 16 | # My configurations: 17 | db.ini 18 | deploy_key_rsa 19 | log/ 20 | *.log 21 | *.zip 22 | *.rar 23 | .svn 24 | 25 | 26 | .DS_Store 27 | .com.apple.timemachine.supported 28 | node_modules/ 29 | build/ 30 | dist/ 31 | 32 | .eslintrc 33 | index.ejs 34 | index.jsp 35 | Aries.xml 36 | #Aries.sh 37 | env.js 38 | index.js 39 | webpack.config.js 40 | Aries/static/aries/ 41 | index.html 42 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6.3" 4 | install: 5 | - cd ./package/Aries 6 | - npm install 7 | script: 8 | - npm run build -------------------------------------------------------------------------------- /Aries/Aries/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/Aries/__init__.py -------------------------------------------------------------------------------- /Aries/Aries/ldap_client.py: -------------------------------------------------------------------------------- 1 | #-*- coding: UTF-8 -*- 2 | import sys,ldap,os 3 | os.environ.setdefault("DJANGO_SETTINGS_MODULE","settings") 4 | LDAP_HOST = 'ldap://172.24.3.170:389' 5 | #BASE_DN = 'uid=administrator,ou=wiki,dc=bfdabc,dc=com' 6 | BASE_DN = 'ou=temp,dc=baifendian,dc=com' 7 | #用户验证,根据传递来的用户名和密码,搜索LDAP,返回boolean值 8 | def ldap_get_vaild1(username=None,passwd=None): 9 | try: 10 | #conn=ldap.initialize(LDAP_HOST) 11 | conn=ldap.initialize(LDAP_HOST) 12 | conn.protocol_version = ldap.VERSION3 13 | conn.set_option(ldap.OPT_REFERRALS, 0) 14 | print conn 15 | conn.simple_bind_s('uid=%s,%s' % (username, BASE_DN),passwd) 16 | newEntry = conn.search_s("uid=%s,%s" 17 | % (username, 18 | BASE_DN), 19 | ldap.SCOPE_BASE) 20 | #attrlist=['uid']) 21 | return newEntry 22 | except Exception as e: 23 | print e 24 | print "用户名或密码错误,请重新登录!" 25 | 26 | 27 | #ldap_get_vaild(username="administrator",passwd="redhat") 28 | def ldap_get_vaild(username=None,passwd=None): 29 | from django_auth_ldap.backend import LDAPBackend 30 | auth = LDAPBackend() 31 | user = auth.authenticate(username=username,password=passwd) 32 | return user 33 | 34 | 35 | if __name__ == "__main__": 36 | print ldap_get_vaild(username="yatis2",passwd="1234ymf,./") 37 | # print ldap_get_vaild1(username="yatis2",passwd="1234ymf,./") 38 | -------------------------------------------------------------------------------- /Aries/Aries/sumSpace.py: -------------------------------------------------------------------------------- 1 | #encoding=utf-8 2 | from user_auth.models import * 3 | from django.conf import settings 4 | from hdfs.tools import * 5 | import sys 6 | import threading 7 | import traceback 8 | import time 9 | import json 10 | reload(sys) 11 | sys.setdefaultencoding('utf-8') 12 | hdfs_logger = logging.getLogger("hdfs_log") 13 | 14 | def sumSpace(operator='du'): 15 | hdfs_logger.info("##########sumSpace count start.") 16 | spaces = Space.objects.all() 17 | for space in spaces: 18 | path = space.address 19 | exec_user = space.exec_user 20 | operator = "du" 21 | args = [path] 22 | name = space.name 23 | capacity = eval(space.capacity) 24 | try: 25 | exitCode,data = run_hadoop(user_name=exec_user,operator=operator,args=args) 26 | except Exception,e: 27 | hdfs_logger.error(traceback.format_exc()) 28 | else: 29 | if exitCode != 0: 30 | hdfs_logger.info("path:{0}.".format(path)) 31 | continue 32 | else: 33 | capacity["used"] = int(data)/1024.0/1024/1024 34 | hdfs_logger.info("spaceName:{0}, path:{1}, capacity:{2}".format(name,path,capacity)) 35 | space.capacity = capacity 36 | space.save() 37 | hdfs_logger.info("###########sumSpace count end.") 38 | 39 | def set_interval(func, sec): 40 | def func_wrapper(): 41 | set_interval(func, sec) 42 | func() 43 | t = threading.Timer(sec, func_wrapper) 44 | t.start() 45 | return t 46 | 47 | def run(pollTime): 48 | set_interval(sumSpace,pollTime) 49 | -------------------------------------------------------------------------------- /Aries/Aries/urls.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | from django.contrib import admin 3 | from rest_framework.urlpatterns import format_suffix_patterns 4 | from django.conf.urls import patterns,url,include 5 | import settings 6 | from django.contrib import admin 7 | admin.autodiscover() 8 | import views 9 | urlpatterns = [ 10 | #url(r'^admin/', include(admin.site.urls)), 11 | url(r'^admin/', views.permission_check), 12 | url(r'^v1/user_auth/', include('user_auth.urls')), 13 | url(r'^v1/hdfs/', include('hdfs.urls')), 14 | url(r'^v1/codis/', include('codis.urls')), 15 | url(r'^v1/k8s/', include('kd_agent.urls')), 16 | url(r'^v1/openstack/', include('openstack.urls')), 17 | url(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes': True}), 18 | url(r'^$',views.login), 19 | url(r'^login$',views.login), 20 | url(r'^logout$',views.logout), 21 | url(r'^UserAuth/.*$',views.index), 22 | url(r'^CloudService/.*$',views.index), 23 | url(r'^CloudContainer/.*$',views.index), 24 | url(r'^CloudHost/.*$',views.index) 25 | ] 26 | 27 | # 可浏览式登录API 28 | urlpatterns += patterns('', 29 | url(r'^api-auth/',include('rest_framework.urls',namespace='rest_framework')), 30 | ) 31 | -------------------------------------------------------------------------------- /Aries/Aries/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Aries project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Aries.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Aries/codis/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/codis/__init__.py -------------------------------------------------------------------------------- /Aries/codis/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Aries/codis/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | class Host(models.Model): 6 | host_id = models.AutoField(primary_key=True) 7 | host_ip = models.CharField(max_length=30) 8 | host_user = models.CharField(default='root',max_length=20) 9 | host_pass = models.CharField(default='123',max_length=20) 10 | memory_total = models.IntegerField(default=0) 11 | codis_home = models.CharField(default='/root/',max_length=100) 12 | memory_used = models.IntegerField(default=0) 13 | 14 | class Codis(models.Model): 15 | codis_id = models.AutoField(primary_key=True) 16 | product_id = models.CharField(unique=True,default='-',max_length=25) 17 | key_num = models.IntegerField(default=0) 18 | memory_total = models.IntegerField(default=0) 19 | memory_used = models.IntegerField(default=0) 20 | dashboard_port = models.IntegerField(default=0) 21 | available = models.CharField(max_length=10) 22 | dashboard_proxy_addr = models.CharField(max_length=120,default='http://0.0.0.0') 23 | dashboard_ip = models.CharField(max_length=30,default='') 24 | server_memory = models.IntegerField(default=0) 25 | 26 | class Proxy(models.Model): 27 | proxy_id = models.AutoField(primary_key=True) 28 | codis = models.ForeignKey(Codis) 29 | host = models.ForeignKey(Host) 30 | proxy_ip = models.CharField(max_length=30) 31 | proxy_port = models.IntegerField() 32 | http_ip = models.CharField(max_length=30) 33 | http_port = models.IntegerField() 34 | 35 | class Servers(models.Model): 36 | server_id = models.AutoField(primary_key=True) 37 | codis = models.ForeignKey(Codis) 38 | host = models.ForeignKey(Host) 39 | server_ip = models.CharField(max_length=30) 40 | role = models.CharField(default='master',max_length=10) 41 | server_port = models.IntegerField(default=0) 42 | 43 | -------------------------------------------------------------------------------- /Aries/codis/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns,url 2 | from rest_framework.urlpatterns import format_suffix_patterns 3 | import rests,views 4 | urlpatterns=patterns('codis.views', 5 | url(r'^$', 'api_root'), 6 | url(r'^rebalance/$', rests.AutoReblanceApi.as_view(), name="rebalance"), 7 | url(r'^getallcodisinfo/$', rests.GetAllCodisInfo.as_view(), name="allcodisinfo"), 8 | url(r'^serverinfo/$', rests.ServerInfo.as_view(), name="serverinfo"), 9 | url(r'^proxyinfo/$', rests.ProxyInfo.as_view(), name="proxyinfo"), 10 | url(r'^hosts/$', rests.HostInfo.as_view(), name="hosts"), 11 | url(r'^codis/$', rests.CodisInfo.as_view(), name="codis"), 12 | url(r'^codislog/$', rests.CodisLog.as_view(), name="codis-log"), 13 | url(r'^deleteproxy/$', rests.DeleteProxy.as_view(), name="deleteproxy"), 14 | url(r'^codisoverview/$', rests.CodisOverview.as_view(), name="codisoverview"), 15 | ) 16 | #urlpatterns = format_suffix_patterns(urlpatterns) 17 | -------------------------------------------------------------------------------- /Aries/codis/views.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | from models import * 3 | #from serializers import * 4 | from django.db.models import Q 5 | from django.http import HttpResponse 6 | from rest_framework.views import APIView 7 | from rest_framework.response import Response 8 | from rest_framework.request import Request 9 | from rest_framework import renderers 10 | from rest_framework.decorators import api_view 11 | from rest_framework.reverse import reverse 12 | import logging 13 | ac_logger = logging.getLogger("access_log") 14 | from django.contrib.auth.models import User 15 | from django.shortcuts import render,render_to_response 16 | from django.http import HttpResponseRedirect 17 | import json 18 | 19 | @api_view(('GET',)) 20 | def api_root(request, format=None): 21 | return Response({ 22 | 'hosts': reverse('hosts', request=request, format=format), 23 | 'codis': reverse('codis', request=request, format=format), 24 | 'codislog': reverse('codis-log', request=request, format=format), 25 | 'allcodisinfo': reverse('allcodisinfo', request=request, format=format), 26 | 'rebalance': reverse('rebalance', request=request, format=format), 27 | 'proxyinfo': reverse('proxyinfo', request=request, format=format), 28 | 'serverinfo': reverse('serverinfo', request=request, format=format), 29 | }) 30 | 31 | 32 | -------------------------------------------------------------------------------- /Aries/hdfs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/hdfs/__init__.py -------------------------------------------------------------------------------- /Aries/hdfs/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Aries/hdfs/compress/compress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | HADOOP_HOME=$1 3 | shift 4 | if [ $# -eq 1 ];then 5 | SOURCE=$1 6 | TARGET="${SOURCE}_tmp" 7 | elif [ $# -eq 2 ]; then 8 | SOURCE=$1 9 | TARGET=$2 10 | else 11 | echo "请输入需要压缩的hdfs路径" 12 | exit 0 13 | fi 14 | 15 | echo "hdfs 压缩前目录: ${SOURCE}" 16 | echo "hdfs 压缩后目录: ${TARGET}" 17 | 18 | if ! hadoop fs -test -d $SOURCE ;then 19 | echo "${SOURCE} directory is not exist! compress end" 20 | exit 0 21 | fi 22 | 23 | source_size=`hadoop fs -dus $SOURCE|awk '{print $1}'` 24 | if [ "$source_size" == "0" ];then 25 | echo $SOURCE" size 0 , compress end" 26 | exit 0 27 | fi 28 | if ! hadoop fs -test -d $TARGET ;then 29 | hadoop fs -mkdir -p $TARGET 30 | echo "mkdir ${TARGET} success! " 31 | fi 32 | 33 | if hadoop fs -ls $SOURCE'/*.bz2';then 34 | echo $SOURCE"/*.bz2 exists , compress end" 35 | exit 0 36 | fi 37 | 38 | per=`hadoop fs -ls $SOURCE|tail -1|awk '{print $3":"$4}'` 39 | PWD=$(cd $(dirname $0);pwd) 40 | JAR=$HADOOP_HOME/share/hadoop/tools/lib/hadoop-streaming-2.6.0.jar 41 | 42 | hadoop version 43 | hadoop fs -rm -R $TARGET 44 | hadoop jar $JAR -D mapred.min.split.size=$[1024*1024*1024] \ 45 | -D mapred.output.compress=true \ 46 | -D mapred.output.compression.codec=org.apache.hadoop.io.compress.BZip2Codec \ 47 | -D mapred.job.name=log_compress \ 48 | -D mapred.reduce.tasks=0 \ 49 | -mapper ${PWD}/line2line.pl \ 50 | -file ${PWD}/line2line.pl \ 51 | -input $SOURCE \ 52 | -output $TARGET \ 53 | 54 | if ! hadoop fs -ls $TARGET'/_SUCCESS';then 55 | echo "compress fail" 56 | exit 1 57 | fi 58 | 59 | if [ "${SOURCE}_tmp" = "${TARGET}" ]; then 60 | hadoop fs -rmr ${SOURCE} 61 | hadoop fs -rmr "${TARGET}/_SUCCESS" 62 | echo "rm ${SOURCE}" 63 | hadoop fs -mv ${TARGET} ${SOURCE} 64 | echo "mv ${TARGET} ${SOURCE}" 65 | fi 66 | #hadoop fs -rmr ${SOURCE} 67 | hadoop fs -chown -R "$per" "$SOURCE" 68 | echo "compress success!" 69 | -------------------------------------------------------------------------------- /Aries/hdfs/compress/line2line.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | while(my $line=){ 3 | print $line; 4 | } 5 | -------------------------------------------------------------------------------- /Aries/hdfs/hadoop-run.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/bash 2 | #HADOOP_HOME=/opt/hadoop/hadoop 3 | #NAMENODE_PATH="hdfs://172.24.100.44:8020" 4 | HADOOP_HOME=$1 5 | shift 6 | NAMENODE_PATH=$1 7 | shift 8 | BASE_PATH=$(pwd) 9 | operator=$1 10 | shift 11 | base_command="${HADOOP_HOME}/bin/hadoop fs" 12 | case $operator in mv|cp|rmr|ls|put|get|du|chmod|chown|compress) 13 | target_path=$1 14 | 15 | if [ "$operator" = "du" ] ; then 16 | #统计某个目录下面的所有文件或文件夹的大小 17 | $base_command -$operator $target_path |awk '{print $1}' |awk '{sum += $1};END {print sum}'|grep '^[0-9]' 18 | elif [ "$operator" = "compress" ] ; then 19 | #启动压缩程序 20 | echo " merge............ " 21 | sh ${BASE_PATH}/merge/merge.sh $HADOOP_HOME $NAMENODE_PATH $@ 22 | echo " merge complete! " 23 | echo " compress......... " 24 | sh ${BASE_PATH}/compress/compress.sh $HADOOP_HOME $@ 25 | echo " compress complete! " 26 | else 27 | $base_command -$operator $@ 28 | fi 29 | esac 30 | -------------------------------------------------------------------------------- /Aries/hdfs/libs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/hdfs/libs/__init__.py -------------------------------------------------------------------------------- /Aries/hdfs/libs/custom_decorator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.http import JsonResponse 4 | 5 | 6 | def check_request_method(method=None): 7 | def _wrapper(func): 8 | def _warpper2(request, *args, **kwargs): 9 | if request.method != method: 10 | return JsonResponse({ 11 | "code": 405, 12 | "msg": "method not allow" 13 | }, safe=False) 14 | return func(request, *args, **kwargs) 15 | return _warpper2 16 | return _wrapper 17 | -------------------------------------------------------------------------------- /Aries/hdfs/libs/ftp_operator.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- coding: utf-8 -*- 3 | from ftplib import FTP_TLS 4 | import socket 5 | import ssl 6 | 7 | class FTPOperator(FTP_TLS): 8 | def __init__(self,ftp_server,username,password,port,timeout=10,acct='', keyfile=None,certfile=None,): 9 | FTP_TLS.__init__(self, '', '','', acct, keyfile, certfile, timeout) 10 | self.ftp_server = ftp_server 11 | self.username = username 12 | self.password = password 13 | self.port = port 14 | self.timeout = timeout 15 | self.ftp = None 16 | 17 | def connect(self): 18 | self.sock = socket.create_connection((self.ftp_server, self.port), self.timeout) 19 | self.af = self.sock.family 20 | self.sock = ssl.wrap_socket(self.sock, self.keyfile, self.certfile,ssl_version=ssl.PROTOCOL_TLSv1) 21 | self.file = self.sock.makefile('rb') 22 | self.welcome = self.getresp() 23 | self.login(self.username,self.password) 24 | FTP_TLS.prot_p(self) 25 | return self.welcome 26 | 27 | def download_file(self,remotePath,localPath,bufsize=1024): 28 | bufsize = bufsize 29 | fp = open(localPath,'wb') 30 | self.retrbinary('RETR ' + remotePath,fp.write,bufsize) 31 | fp.close() 32 | self.quit() 33 | 34 | def upload_file(self,remotePath,localPath,bufsize=1024): 35 | bufsize = bufsize 36 | file_handler = open(localPath,'rb') 37 | self.storbinary('STOR %s' %remotePath,file_handler,bufsize) 38 | file_handler.close() 39 | self.quit() 40 | 41 | if __name__ == "__main__": 42 | ftp_operator = FTPOperator( 43 | ftp_server="117.121.7.29", 44 | username="pan.lu", 45 | password="iXp8Qt2T", 46 | port=990, 47 | timeout=10, 48 | acct="", 49 | keyfile=None, 50 | certfile=None 51 | ) 52 | ftp_operator.connect() 53 | #ftp_operator.download_file(src_path, local_file) 54 | -------------------------------------------------------------------------------- /Aries/hdfs/libs/test.py: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/python 2 | # -*- coding: utf-8 -*- 3 | from ftplib import FTP_TLS 4 | import socket 5 | import ssl 6 | class tyFTP(FTP_TLS): 7 | def __init__(self, host='', user='', passwd='', acct='', keyfile=None, 8 | certfile=None, timeout=60): 9 | FTP_TLS.__init__(self, host, user, passwd, acct, keyfile, certfile, timeout) 10 | def connect(self, host='', port=0, timeout=-999): 11 | '''Connect to host. Arguments are: 12 | - host: hostname to connect to (string, default previous host) 13 | - port: port to connect to (integer, default previous port) 14 | ''' 15 | if host != '': 16 | self.host = host 17 | if port > 0: 18 | self.port = port 19 | if timeout != -999: 20 | self.timeout = timeout 21 | try: 22 | self.sock = socket.create_connection((self.host, self.port), self.timeout) 23 | self.af = self.sock.family 24 | #add this line!!! 25 | self.sock = ssl.wrap_socket(self.sock, self.keyfile, self.certfile,ssl_version=ssl.PROTOCOL_TLSv1) 26 | #add end 27 | self.file = self.sock.makefile('rb') 28 | self.welcome = self.getresp() 29 | except Exception as e: 30 | print '服务异常',e 31 | return self.welcome 32 | 33 | server = tyFTP() 34 | server.connect(host="117.121.7.29", port=990) 35 | server.login(user="mingfang.yang", passwd="") 36 | server.prot_p() 37 | print server.pwd() 38 | server.retrlines('LIST') 39 | #print server.retrbinary("RETR /text.txt",open("text",'wb').write) 40 | -------------------------------------------------------------------------------- /Aries/hdfs/merge/compress.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/hdfs/merge/compress.jar -------------------------------------------------------------------------------- /Aries/hdfs/merge/merge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | HADOOP_HOME=$1 3 | shift 4 | NAMENODE_PATH=$1 5 | shift 6 | PWD=$(cd $(dirname $0);pwd) 7 | if [ $# -eq 1 ];then 8 | SOURCE_PATH=$1 9 | TARGET_PATH="${SOURCE_PATH}_tmp" 10 | elif [ $# -eq 2 ]; then 11 | SOURCE_PATH=$1 12 | TARGET_PATH=$2 13 | elif [ $# -eq 3 ];then 14 | SOURCE_PATH=$1 15 | TARGET_PATH=$2 16 | NAMENODE_PATH=$3 17 | else 18 | echo "请输入需要压缩的hdfs路径" 19 | exit 0 20 | fi 21 | 22 | if ! hadoop fs -test -d ${SOURCE_PATH} ;then 23 | echo "${SOURCE_PATH} directory is not exist! merge end" 24 | exit 0 25 | fi 26 | 27 | if hadoop fs -ls ${SOURCE_PATH}'/_SUCCESS';then 28 | echo "rm ${SOURCE_PATH}/_SUCCESS" 29 | hadoop fs -rmr ${SOURCE_PATH}'/_SUCCESS' 30 | fi 31 | 32 | if hadoop fs -ls ${SOURCE_PATH}'/*.bz2';then 33 | echo "merge *.bz2" 34 | TARGET_PATH_TMP="${TARGET_PATH}/data.bz2" 35 | else 36 | echo "merge *.txt" 37 | TARGET_PATH_TMP="${TARGET_PATH}/data.txt" 38 | fi 39 | echo ${SOURCE_PATH} 40 | echo ${TARGET_PATH} 41 | hadoop jar merge/compress.jar dp.bfd.hdfs.compress.HDFSCopyMerge "${NAMENODE_PATH}" "${SOURCE_PATH}/*" "${NAMENODE_PATH}" "${TARGET_PATH_TMP}" 42 | if [ $? -ne 0 ];then 43 | echo "merge fail" 44 | exit 1 45 | fi 46 | if [ "${SOURCE_PATH}_tmp" = "${TARGET_PATH}" ]; then 47 | hadoop fs -rmr ${SOURCE_PATH} 48 | echo "rm ${SOURCE_PATH}" 49 | hadoop fs -mv ${TARGET_PATH} ${SOURCE_PATH} 50 | echo "mv ${TARGET_PATH} ${SOURCE_PATH}" 51 | fi 52 | echo "merge success!" 53 | -------------------------------------------------------------------------------- /Aries/hdfs/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/hdfs/migrations/__init__.py -------------------------------------------------------------------------------- /Aries/hdfs/urls.py: -------------------------------------------------------------------------------- 1 | from rest_framework.urlpatterns import format_suffix_patterns 2 | from django.conf.urls import patterns,url,include 3 | import rests 4 | urlpatterns = format_suffix_patterns(patterns('hdfs.rests', 5 | url('^overview/$', rests.Overview.as_view(), name='overview' ), 6 | url('^state/$', rests.HostState.as_view(), name='HostState-list' ), 7 | url('^relation/(?P.+)/$', rests.Relation.as_view(), name='relation-info'), 8 | url('^hostinfo/(?P.+)/$', rests.HostInfo.as_view(), name='Host-info'), 9 | url('^operator/$', rests.OperateService.as_view(), name='operate'), 10 | url(r'^(?P[\w|\-.\d-]+)/(?P[A-Z]+)/(?P[A-Z]+)/$', rests.OperateComponent.as_view(),name="operate-component"), 11 | url(r'^capacity/(?P.*)/$',rests.capacityRecovery.as_view()), 12 | url(r'^share/(?P.*)/$',rests.share.as_view()), 13 | url(r'^upload/(?P.*)/$',rests.upload), 14 | url(r'^(?P.*)/$',rests.pathOp.as_view()), 15 | )) 16 | 17 | 18 | -------------------------------------------------------------------------------- /Aries/kd_agent/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/kd_agent/__init__.py -------------------------------------------------------------------------------- /Aries/kd_agent/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | -------------------------------------------------------------------------------- /Aries/kd_agent/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, url 2 | 3 | from kd_agent import views 4 | 5 | urlpatterns = patterns('', 6 | 7 | url(r'^api/namespaces/(?P\w{1,64})/k8soverview$',views.get_k8soverview_info), 8 | url(r'^api/namespaces/(?P\w{1,64})/pods$',views.get_pod_list), 9 | url(r'^api/namespaces/(?P\w{1,64})/services$',views.get_service_list), 10 | url(r'^api/namespaces/(?P\w{1,64})/replicationcontrollers$',views.get_rc_list), 11 | url(r'^apis/extensions/v1beta1/namespaces/(?P\w{1,64})/ingresses$',views.get_ingress_list ), 12 | 13 | url(r'^api/namespaces/(?P\w{1,64})/pods/downloadjson$',views.download_pod_json), 14 | url(r'^api/namespaces/(?P\w{1,64})/services/downloadjson$',views.download_service_json), 15 | url(r'^api/namespaces/(?P\w{1,64})/replicationcontrollers/downloadjson$',views.download_rc_json), 16 | url(r'^apis/extensions/v1beta1/namespaces/(?P\w{1,64})/ingresses/downloadjson$',views.download_ingress_json ), 17 | 18 | url(r'^api/namespaces/mytaskgraph$', views.get_mytask_graph), 19 | url(r'^download/$', views.download), 20 | url(r'^api/namespaces/mytasklist/getoldrecords', views.mytask_get_old_records), 21 | url(r'^api/namespaces/mytasklist/checkhasnewrecords', views.mytask_check_has_new_records), 22 | url(r'^api/namespaces/mytasklist/getnewrecords', views.mytask_get_new_records), 23 | 24 | url(r'^api/namespaces/(?P\w{1,64})/podsummary/cpu/(?P\d{1,5})',views.get_namespace_cpu_info ), 25 | url(r'^api/namespaces/(?P\w{1,64})/podsummary/memory/(?P\d{1,5})',views.get_namespace_memory_info ), 26 | url(r'^api/namespaces/(?P\w{1,64})/podsummary/network/(?P\d{1,5})',views.get_namespace_network_info ), 27 | url(r'^api/namespaces/(?P\w{1,64})/podsummary/filesystem/(?P\d{1,5})',views.get_namespace_filesystem_info ), 28 | 29 | url(r'^api/namespaces/(?P\w{1,64})/poddetail/cpu/(?P\d{1,5})',views.get_poddetail_cpu_info ), 30 | url(r'^api/namespaces/(?P\w{1,64})/poddetail/memory/(?P\d{1,5})',views.get_poddetail_memory_info ), 31 | url(r'^api/namespaces/(?P\w{1,64})/poddetail/network/(?P\d{1,5})',views.get_poddetail_network_info ), 32 | url(r'^api/namespaces/(?P\w{1,64})/poddetail/filesystem/(?P\d{1,5})',views.get_poddetail_filesystem_info ), 33 | 34 | url(r'^api/dashboard/taskinfo', views.dashboard_taskinfo ), 35 | 36 | ) 37 | -------------------------------------------------------------------------------- /Aries/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Aries.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /Aries/middleware/middleware.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | from django.shortcuts import render_to_response 3 | from django.http import HttpResponse 4 | import json 5 | class UserSessionMiddleware(object): 6 | def process_request(self, request): 7 | path = request.path 8 | print path 9 | response = HttpResponse() 10 | res = {} 11 | if path.startswith('/static/') or path == "/login": 12 | # static file type or /login 13 | return None 14 | if not request.user.is_authenticated(): 15 | if path.startswith('/v1/'): 16 | # api type 17 | res["code"] = 401 18 | res["data"] = "sesson failure!" 19 | response.write(json.dumps(res)) 20 | return response 21 | else: 22 | # other 23 | user = "" 24 | user = json.dumps(user) 25 | return render_to_response('index/index.html', locals()) 26 | -------------------------------------------------------------------------------- /Aries/openstack/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Aries/openstack/apps.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals 2 | 3 | from django.apps import AppConfig 4 | 5 | 6 | class WebConfig(AppConfig): 7 | name = 'web' 8 | -------------------------------------------------------------------------------- /Aries/openstack/middleware/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/common/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/common/key.yaml: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | ssh_authorized_keys: 3 | - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyd0G51Arcq4Pn/bnuitdHGGBQp8RpRW9YavVx7sOiIfqhbbA7ZIQiXN8zNRMryoQjvQIhP47sLZy7XjPX/5nRD/gJT9TuP/h4yUNssWwlpeB4tdKUriMD30dgsAJ5ZPiz40zMXNjf4DHeKBnOSsm15bFXnS31S1cJ/rwVmnfPDPeU9yrkfijfZiU0hNQoOwOzD9nF8beFhRBV9tfTQYdRTu4ZBbBcVPby60Twh13uM/vTgzBLJZHyhOiK8equ0q1EdA3DnY+EO0FGDqM8UETFoezm5Ne5NYN929oW9GpwkjLKQ5S9lQImAh3QgGDG3Ick78TtbEdEnNT0xfzJKY7tQ== root@bjlg-49p15-master01 4 | - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAoxmQlYni9Aq+Dex1H1WRfnEByVbqAvQBTu+Vg1HYDzbHaqeqMMt2IP5gTU3TC7auJnqdaLXdCdX4jIlDDiBQIshPyAV8OC6QCLeNgj5WTb+6d7GxPsKabYJU8E7xrHb18Ss7tnC/EPQRcVMJTQuQfxXpab7Gtijd/e41SwhkH0oiuO+rnP1rCK+6IUV4G1vssRHwp63p8Ak0/kLzREDWZoPStWkaMKWyhYMwzUU9+n+8VlswNJocIAbRyoSY4xsIMnETIXFCH194QY/DOqpsiRHcOsCzkjeVEeldUhnq4wbcX1RZD8Aydxd2pnVqyaGwM7R9JG0piJVN4nqTxdR72w== root@bjlg-49p16-om04 5 | -------------------------------------------------------------------------------- /Aries/openstack/middleware/common/setting.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | IP_keystone=192.168.190.11 3 | PORT_keystone=5000 4 | IP_nova=192.168.190.11 5 | PORT_nova=8774 6 | IP_cinder=192.168.190.11 7 | PORT_cinder=8776 -------------------------------------------------------------------------------- /Aries/openstack/middleware/common/sqlite.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/common/sqlite.db -------------------------------------------------------------------------------- /Aries/openstack/middleware/common/urls.py: -------------------------------------------------------------------------------- 1 | version_token = "v3" 2 | version_nova = "v2.1" 3 | version_cinder = "v2" 4 | 5 | common_nova = "/%s/{project_id}/"%version_nova 6 | common_cinder = "/%s/{project_id}/"%version_cinder 7 | 8 | #login 9 | url_get_token = "/%s/auth/tokens"%version_token 10 | url_project_id = "/%s/auth/projects"%version_token 11 | 12 | #flavor 13 | url_flavor_list = common_nova + "flavors" 14 | url_flavor_action = common_nova + "flavors/{flavor_id}" 15 | url_flavor_list_detail = common_nova + "flavors/detail" 16 | 17 | #image 18 | url_image_list = common_nova + "images" 19 | url_image_action = common_nova + "images/{image_id}" 20 | url_image_list_detail = common_nova + "images/detail" 21 | 22 | #vm 23 | url_vm_list = url_vm_create = common_nova + "servers" 24 | url_vm_action = common_nova + "servers/{vm_id}" 25 | url_vm_list_detail = common_nova + "servers/detail" 26 | url_vm_control_action = common_nova + "servers/{vm_id}/action" 27 | 28 | #volume 29 | url_volume_list = url_volume_create = common_nova + "os-volumes" 30 | url_volume_action = common_nova + "os-volumes/{volume_id}" 31 | url_volume_list_detail = common_nova + "os-volumes/detail" 32 | url_volume_extend = common_cinder + "volumes/{volume_id}/action" 33 | url_volume_change = common_cinder + "volumes/{volume_id}" 34 | 35 | #volumes_snap 36 | url_volume_snap_list = url_volume_snap_create = common_nova + "os-snapshots" 37 | url_volume_snap_list_detail = common_nova + "os-snapshots/detail" 38 | url_volume_snap_action = common_nova + "os-snapshots/{snapshot_id}" 39 | url_volume_snap_change = common_cinder + "snapshots/{snapshot_id}" 40 | 41 | #volume_attach 42 | url_volume_attach_list =url_volume_attach_create = common_nova + "servers/{vm_id}/os-volume_attachments" 43 | url_volume_attach_action = common_nova + "servers/{vm_id}/os-volume_attachments/{attach_id}" 44 | 45 | #volume_backup 46 | url_volume_backup_list = url_volume_backup_create = common_cinder + "backups" 47 | url_volume_backup_list_detail = common_cinder + "backups/detail" 48 | url_volume_backup_action = common_cinder + "backups/{backup_id}" 49 | url_volume_backup_restore = common_cinder + "backups/{backup_id}/restore" 50 | 51 | #common api 52 | url_keypairs = common_nova + "os-keypairs" 53 | url_az_info = common_nova + "os-aggregates" 54 | url_hv_info = common_nova + "os-hypervisors/detail" 55 | url_domain_info = "/%s/domains"%version_token 56 | url_role_info = "/%s/roles"%version_token 57 | 58 | #user api 59 | url_user_common = "/%s/users"%version_token 60 | url_user_action = "/%s/users/{user_id}"%version_token 61 | url_user_project = "/%s/users/{user_id}/projects"%version_token 62 | url_project_member = "/%s/role_assignments"%version_token 63 | url_project_user_action = "/%s/projects/{project_id}/users/{user_id}/roles/{role_id}"%version_token 64 | url_project_user_del = "/%s/projects/{project_id}/users/{user_id}/roles/{role_id}"%version_token 65 | url_project_list = "/%s/projects"%version_token -------------------------------------------------------------------------------- /Aries/openstack/middleware/db/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/db/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/db/db.py: -------------------------------------------------------------------------------- 1 | # coding:utf-8 2 | from openstack.middleware.common.common import plog, dlog 3 | import MySQLdb 4 | 5 | 6 | class Db: 7 | def __init__(self,db_host,db_user,db_password,db_name): 8 | self.db_name = db_name 9 | self.host = db_host 10 | self.user = db_user 11 | self.password = db_password 12 | 13 | @plog("Db.connect_mysql") 14 | def conn_mysql(self): 15 | self.conn = MySQLdb.connect(host=self.host,user=self.user,passwd=self.password,db=self.db_name ,charset="utf8") 16 | self.command = self.conn.cursor() 17 | 18 | @plog("Db.exec_cmd") 19 | def exec_cmd(self, cmd): 20 | ''' 21 | :param cmd: 22 | :return:2 表示操作的表不存在 23 | ''' 24 | ret = 0 25 | self.conn_mysql() 26 | cmd = cmd.encode("utf8") 27 | try: 28 | self.command.execute(cmd) 29 | self.conn.commit() 30 | ret = self.command.fetchall() 31 | self.command.close() 32 | self.conn.close() 33 | except MySQLdb.ProgrammingError,err: 34 | dlog("Db.exec_cmd faild err:%s"%err,lever="ERROR") 35 | if err.args[0] == 1146: 36 | ret = 2 37 | return ret 38 | 39 | -------------------------------------------------------------------------------- /Aries/openstack/middleware/flavor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/flavor/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/image/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/image/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/login/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/login/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/network/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/network/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/test/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/user/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/user/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/vm/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/vm/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/middleware/volume/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/middleware/volume/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/openstack/migrations/__init__.py -------------------------------------------------------------------------------- /Aries/openstack/models.py: -------------------------------------------------------------------------------- 1 | #-*- coding: UTF-8 -*- 2 | 3 | from __future__ import unicode_literals 4 | 5 | from django.db import models 6 | 7 | class DbVmSnap(models.Model): 8 | image_name = models.CharField(max_length=100) 9 | vm_id = models.CharField(max_length=100) 10 | parent_name = models.CharField(max_length=100,null=True) 11 | image_id = models.CharField(max_length=100) 12 | status = models.IntegerField() 13 | time = models.DateTimeField() 14 | 15 | -------------------------------------------------------------------------------- /Aries/openstack/urls.py: -------------------------------------------------------------------------------- 1 | """management URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.9/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url 17 | from django.contrib import admin 18 | from openstack.views import instances,volumes,images,flavors,instances_log 19 | import rests 20 | 21 | 22 | urlpatterns = [ 23 | url(r'^admin/', admin.site.urls), 24 | url(r'^bfddashboard/instances/$',instances,name='instances'), 25 | url(r'^volumes/$', volumes, name='volumes'), 26 | url(r'^flavors/$', flavors, name='flavors'), 27 | url(r'^images/$', images, name='images'), 28 | url(r'^volumes_post/$',rests.volumes.as_view(),name="volumes_port"), 29 | url(r'^project/$',rests.project.as_view(),name="project"), 30 | url(r'^search/$',rests.search.as_view(),name="search"), 31 | url(r'^home/overview/$',rests.overview.as_view(),name="home"), 32 | url(r'^instances_post/$',rests.instances.as_view(),name='instances_post'), 33 | url(r'^instances_log/(?P\S*)/(?P\d*)/$',instances_log,name="instances_log"), 34 | url(r'^monitor/$',rests.monitor.as_view(),name="monitor"), 35 | ] 36 | -------------------------------------------------------------------------------- /Aries/static/admin/css/admin-inlines.css: -------------------------------------------------------------------------------- 1 | .sortable-placeholder {border: 1px dashed #ccc;} 2 | .drag-handler {margin-right:5px;} -------------------------------------------------------------------------------- /Aries/static/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | } 25 | 26 | ul.actionlist li { 27 | overflow: hidden; 28 | text-overflow: ellipsis; 29 | -o-text-overflow: ellipsis; 30 | } 31 | -------------------------------------------------------------------------------- /Aries/static/admin/css/ie.css: -------------------------------------------------------------------------------- 1 | /* IE 6 & 7 */ 2 | 3 | /* Proper fixed width for dashboard in IE6 */ 4 | 5 | .dashboard #content { 6 | *width: 768px; 7 | } 8 | 9 | .dashboard #content-main { 10 | *width: 535px; 11 | } 12 | 13 | /* IE 6 ONLY */ 14 | 15 | /* Keep header from flowing off the page */ 16 | 17 | #container { 18 | _position: static; 19 | } 20 | 21 | /* Put the right sidebars back on the page */ 22 | 23 | .colMS #content-related { 24 | _margin-right: 0; 25 | _margin-left: 10px; 26 | _position: static; 27 | } 28 | 29 | /* Put the left sidebars back on the page */ 30 | 31 | .colSM #content-related { 32 | _margin-right: 10px; 33 | _margin-left: -115px; 34 | _position: static; 35 | } 36 | 37 | .form-row { 38 | _height: 1%; 39 | } 40 | 41 | /* Fix right margin for changelist filters in IE6 */ 42 | 43 | #changelist-filter ul { 44 | _margin-right: -10px; 45 | } 46 | 47 | /* IE ignores min-height, but treats height as if it were min-height */ 48 | 49 | .change-list .filtered { 50 | _height: 400px; 51 | } 52 | 53 | /* IE doesn't know alpha transparency in PNGs */ 54 | 55 | .inline-deletelink { 56 | background: transparent url(../img/inline-delete-8bit.png) no-repeat; 57 | } 58 | 59 | /* IE7 doesn't support inline-block */ 60 | .change-list ul.toplinks li { 61 | zoom: 1; 62 | *display: inline; 63 | } 64 | -------------------------------------------------------------------------------- /Aries/static/admin/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | body.login { 4 | background: #eee; 5 | } 6 | 7 | .login #container { 8 | background: white; 9 | border: 1px solid #ccc; 10 | width: 28em; 11 | min-width: 300px; 12 | margin-left: auto; 13 | margin-right: auto; 14 | margin-top: 100px; 15 | } 16 | 17 | .login #content-main { 18 | width: 100%; 19 | } 20 | 21 | .login form { 22 | margin-top: 1em; 23 | } 24 | 25 | .login .form-row { 26 | padding: 4px 0; 27 | float: left; 28 | width: 100%; 29 | } 30 | 31 | .login .form-row label { 32 | padding-right: 0.5em; 33 | line-height: 2em; 34 | font-size: 1em; 35 | clear: both; 36 | color: #333; 37 | } 38 | 39 | .login .form-row #id_username, .login .form-row #id_password { 40 | clear: both; 41 | padding: 6px; 42 | width: 100%; 43 | -webkit-box-sizing: border-box; 44 | -moz-box-sizing: border-box; 45 | box-sizing: border-box; 46 | } 47 | 48 | .login span.help { 49 | font-size: 10px; 50 | display: block; 51 | } 52 | 53 | .login .submit-row { 54 | clear: both; 55 | padding: 1em 0 0 9.4em; 56 | } 57 | 58 | .login .password-reset-link { 59 | text-align: center; 60 | } 61 | -------------------------------------------------------------------------------- /Aries/static/admin/css/overrides.css: -------------------------------------------------------------------------------- 1 | /* overrides to default admin style */ 2 | 3 | a:active, 4 | a:focus { 5 | outline: none; 6 | } 7 | .sidebar-nav { 8 | padding: 9px 0; 9 | } 10 | .form-group input[type=text] { 11 | -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ 12 | -moz-box-sizing: border-box; /* Firefox, other Gecko */ 13 | box-sizing: border-box; /* Opera/IE 8+ */ 14 | height: 28px; 15 | } 16 | .form-group select { 17 | -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ 18 | -moz-box-sizing: border-box; /* Firefox, other Gecko */ 19 | box-sizing: border-box; /* Opera/IE 8+ */ 20 | } 21 | .controls > p { 22 | padding-top: 5px; 23 | } 24 | .selector .selector-filter label { 25 | display: none; 26 | } 27 | .selector h2 { 28 | font-size: 100%; 29 | margin: 0; 30 | } 31 | .checkbox{ 32 | padding-bottom: 5px; 33 | } 34 | .checkbox label { 35 | margin-bottom: -20px; 36 | } 37 | .checkbox .help-block { 38 | margin-top: 0; 39 | } 40 | 41 | fieldset.collapse { 42 | height: inherit; 43 | } 44 | .add-row { 45 | margin-bottom: 20px; 46 | } 47 | legend a:hover { 48 | text-decoration: none; 49 | } 50 | 51 | .wide label { 52 | width: auto !important; 53 | } 54 | 55 | /* change_list actions */ 56 | .actions select { 57 | margin-top: 5px; 58 | } 59 | 60 | /* change_list table display */ 61 | th.action-checkbox-column { 62 | width: 1.5em; 63 | text-align:center; 64 | } 65 | 66 | td.action-checkbox { 67 | text-align:center; 68 | } 69 | 70 | .tooltip.in {opacity: 1} /* Hard to see against black text otherwise */ 71 | 72 | #_changelist {clear: both;} 73 | 74 | .scrollable-dropdown-menu { 75 | overflow-x: hidden; 76 | max-height: 322px; 77 | } 78 | 79 | .scrollable-dropdown-menu li form a { 80 | clear: both; 81 | color: #333; 82 | display: block; 83 | font-weight: normal; 84 | line-height: 1.42857; 85 | padding: 3px 20px; 86 | white-space: nowrap; 87 | } 88 | 89 | #content-main { 90 | clear: both; 91 | } 92 | 93 | @media (min-width: 768px) { 94 | .form-horizontal .control-label { 95 | text-align: left; 96 | } 97 | } 98 | @media (min-width: 970px) { 99 | .form-horizontal .control-label { 100 | text-align: right; 101 | } 102 | } 103 | 104 | /* bootstrap 3.2 change */ 105 | .checkbox input[type="checkbox"] { 106 | position: static; 107 | float: left; 108 | margin-left: 0px; 109 | margin-right: 5px; 110 | } 111 | 112 | /* admin/css/forms.css makes labels too small */ 113 | .control-label label { 114 | font-size: 14px; 115 | } 116 | 117 | @media (min-width: 768px) { 118 | .navbar-nav.navbar-right:last-child { 119 | margin-right: 0px; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /Aries/static/admin/img/changelist-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/changelist-bg.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/changelist-bg_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/changelist-bg_rtl.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/default-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/default-bg-reverse.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/default-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/default-bg.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/deleted-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/deleted-overlay.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/gis/move_vertex_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/gis/move_vertex_off.png -------------------------------------------------------------------------------- /Aries/static/admin/img/gis/move_vertex_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/gis/move_vertex_on.png -------------------------------------------------------------------------------- /Aries/static/admin/img/icon-no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon-no.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon-unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon-unknown.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon-yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon-yes.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_addlink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_addlink.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_alert.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_calendar.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_changelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_changelink.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_clock.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_deletelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_deletelink.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_error.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_searchbox.png -------------------------------------------------------------------------------- /Aries/static/admin/img/icon_success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/icon_success.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/inline-delete-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/inline-delete-8bit.png -------------------------------------------------------------------------------- /Aries/static/admin/img/inline-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/inline-delete.png -------------------------------------------------------------------------------- /Aries/static/admin/img/inline-restore-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/inline-restore-8bit.png -------------------------------------------------------------------------------- /Aries/static/admin/img/inline-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/inline-restore.png -------------------------------------------------------------------------------- /Aries/static/admin/img/inline-splitter-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/inline-splitter-bg.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/nav-bg-grabber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/nav-bg-grabber.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/nav-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/nav-bg-reverse.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/nav-bg-selected.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/nav-bg-selected.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/nav-bg.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/selector-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/selector-icons.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/selector-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/selector-search.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/sorting-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/sorting-icons.gif -------------------------------------------------------------------------------- /Aries/static/admin/img/tooltag-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/tooltag-add.png -------------------------------------------------------------------------------- /Aries/static/admin/img/tooltag-arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/admin/img/tooltag-arrowright.png -------------------------------------------------------------------------------- /Aries/static/admin/js/LICENSE-JQUERY.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 John Resig, http://jquery.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Aries/static/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready(function() { 3 | // Add anchor tag for Show/Hide link 4 | $("fieldset.collapse").each(function(i, elem) { 5 | // Don't hide if fields in this fieldset have errors 6 | if ($(elem).find("div.errors").length == 0) { 7 | $(elem).addClass("collapsed").find("h2").first().append(' (' + gettext("Show") + 9 | ')'); 10 | } 11 | }); 12 | // Add toggle to anchor tag 13 | $("fieldset.collapse a.collapse-toggle").click(function(ev) { 14 | if ($(this).closest("fieldset").hasClass("collapsed")) { 15 | // Show 16 | $(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]); 17 | } else { 18 | // Hide 19 | $(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]); 20 | } 21 | return false; 22 | }); 23 | }); 24 | })(django.jQuery); 25 | -------------------------------------------------------------------------------- /Aries/static/admin/js/collapse.min.js: -------------------------------------------------------------------------------- 1 | (function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){a(b).find("div.errors").length==0&&a(b).addClass("collapsed").find("h2").first().append(' ('+gettext("Show")+")")});a("fieldset.collapse a.collapse-toggle").click(function(){a(this).closest("fieldset").hasClass("collapsed")?a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]):a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", 2 | [a(this).attr("id")]);return false})})})(django.jQuery); 3 | -------------------------------------------------------------------------------- /Aries/static/admin/js/jquery.init.js: -------------------------------------------------------------------------------- 1 | /* Puts the included jQuery into our own namespace using noConflict and passing 2 | * it 'true'. This ensures that the included jQuery doesn't pollute the global 3 | * namespace (i.e. this preserves pre-existing values for both window.$ and 4 | * window.jQuery). 5 | */ 6 | var django = django || {}; 7 | django.jQuery = jQuery.noConflict(true); 8 | -------------------------------------------------------------------------------- /Aries/static/admin/js/prepopulate.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.prepopulate = function(dependencies, maxLength) { 3 | /* 4 | Depends on urlify.js 5 | Populates a selected field with the values of the dependent fields, 6 | URLifies and shortens the string. 7 | dependencies - array of dependent fields ids 8 | maxLength - maximum length of the URLify'd string 9 | */ 10 | return this.each(function() { 11 | var prepopulatedField = $(this); 12 | 13 | var populate = function () { 14 | // Bail if the field's value has been changed by the user 15 | if (prepopulatedField.data('_changed')) { 16 | return; 17 | } 18 | 19 | var values = []; 20 | $.each(dependencies, function(i, field) { 21 | field = $(field); 22 | if (field.val().length > 0) { 23 | values.push(field.val()); 24 | } 25 | }); 26 | prepopulatedField.val(URLify(values.join(' '), maxLength)); 27 | }; 28 | 29 | prepopulatedField.data('_changed', false); 30 | prepopulatedField.change(function() { 31 | prepopulatedField.data('_changed', true); 32 | }); 33 | 34 | if (!prepopulatedField.val()) { 35 | $(dependencies.join(',')).keyup(populate).change(populate).focus(populate); 36 | } 37 | }); 38 | }; 39 | })(django.jQuery); 40 | -------------------------------------------------------------------------------- /Aries/static/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.prepopulate=function(e,g){return this.each(function(){var a=b(this),d=function(){if(!a.data("_changed")){var f=[];b.each(e,function(h,c){c=b(c);c.val().length>0&&f.push(c.val())});a.val(URLify(f.join(" "),g))}};a.data("_changed",false);a.change(function(){a.data("_changed",true)});a.val()||b(e.join(",")).keyup(d).change(d).focus(d)})}})(django.jQuery); 2 | -------------------------------------------------------------------------------- /Aries/static/admin/js/related-widget-wrapper.js: -------------------------------------------------------------------------------- 1 | django.jQuery(function($){ 2 | function updateLinks() { 3 | var $this = $(this); 4 | var siblings = $this.nextAll('.change-related, .delete-related'); 5 | if (!siblings.length) return; 6 | var value = $this.val(); 7 | if (value) { 8 | siblings.each(function(){ 9 | var elm = $(this); 10 | elm.attr('href', elm.attr('data-href-template').replace('__fk__', value)); 11 | }); 12 | } else siblings.removeAttr('href'); 13 | } 14 | var container = $(document); 15 | container.on('change', '.related-widget-wrapper select', updateLinks); 16 | container.find('.related-widget-wrapper select').each(updateLinks); 17 | container.on('click', '.related-widget-wrapper-link', function(event){ 18 | if (this.href) { 19 | showRelatedObjectPopup(this); 20 | } 21 | event.preventDefault(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /Aries/static/admin/js/timeparse.js: -------------------------------------------------------------------------------- 1 | var timeParsePatterns = [ 2 | // 9 3 | { re: /^\d{1,2}$/i, 4 | handler: function(bits) { 5 | if (bits[0].length == 1) { 6 | return '0' + bits[0] + ':00'; 7 | } else { 8 | return bits[0] + ':00'; 9 | } 10 | } 11 | }, 12 | // 13:00 13 | { re: /^\d{2}[:.]\d{2}$/i, 14 | handler: function(bits) { 15 | return bits[0].replace('.', ':'); 16 | } 17 | }, 18 | // 9:00 19 | { re: /^\d[:.]\d{2}$/i, 20 | handler: function(bits) { 21 | return '0' + bits[0].replace('.', ':'); 22 | } 23 | }, 24 | // 3 am / 3 a.m. / 3am 25 | { re: /^(\d+)\s*([ap])(?:.?m.?)?$/i, 26 | handler: function(bits) { 27 | var hour = parseInt(bits[1]); 28 | if (hour == 12) { 29 | hour = 0; 30 | } 31 | if (bits[2].toLowerCase() == 'p') { 32 | if (hour == 12) { 33 | hour = 0; 34 | } 35 | return (hour + 12) + ':00'; 36 | } else { 37 | if (hour < 10) { 38 | return '0' + hour + ':00'; 39 | } else { 40 | return hour + ':00'; 41 | } 42 | } 43 | } 44 | }, 45 | // 3.30 am / 3:15 a.m. / 3.00am 46 | { re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i, 47 | handler: function(bits) { 48 | var hour = parseInt(bits[1]); 49 | var mins = parseInt(bits[2]); 50 | if (mins < 10) { 51 | mins = '0' + mins; 52 | } 53 | if (hour == 12) { 54 | hour = 0; 55 | } 56 | if (bits[3].toLowerCase() == 'p') { 57 | if (hour == 12) { 58 | hour = 0; 59 | } 60 | return (hour + 12) + ':' + mins; 61 | } else { 62 | if (hour < 10) { 63 | return '0' + hour + ':' + mins; 64 | } else { 65 | return hour + ':' + mins; 66 | } 67 | } 68 | } 69 | }, 70 | // noon 71 | { re: /^no/i, 72 | handler: function(bits) { 73 | return '12:00'; 74 | } 75 | }, 76 | // midnight 77 | { re: /^mid/i, 78 | handler: function(bits) { 79 | return '00:00'; 80 | } 81 | } 82 | ]; 83 | 84 | function parseTimeString(s) { 85 | for (var i = 0; i < timeParsePatterns.length; i++) { 86 | var re = timeParsePatterns[i].re; 87 | var handler = timeParsePatterns[i].handler; 88 | var bits = re.exec(s); 89 | if (bits) { 90 | return handler(bits); 91 | } 92 | } 93 | return s; 94 | } 95 | -------------------------------------------------------------------------------- /Aries/static/aries/27.7412f03033698af3bdc4.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([27],{912:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=u(a);t["default"]=l["default"].createClass({displayName:"NotFound",render:function(){return l["default"].createElement("div",{className:"not-found"},l["default"].createElement("p",null,"您访问的页面不存在"))}})}}); -------------------------------------------------------------------------------- /Aries/static/aries/files/02d321edc6e03aea1675001899d8f479.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/02d321edc6e03aea1675001899d8f479.png -------------------------------------------------------------------------------- /Aries/static/aries/files/0a657e5577ff33b189823cbfe2c060e5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/0a657e5577ff33b189823cbfe2c060e5.png -------------------------------------------------------------------------------- /Aries/static/aries/files/1504ed9b7b74c4e2526311d836be0fd0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/1504ed9b7b74c4e2526311d836be0fd0.png -------------------------------------------------------------------------------- /Aries/static/aries/files/1dc35d25e61d819a9c357074014867ab.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/1dc35d25e61d819a9c357074014867ab.ttf -------------------------------------------------------------------------------- /Aries/static/aries/files/2430021c72362a9a5252b993edf4d488.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/2430021c72362a9a5252b993edf4d488.png -------------------------------------------------------------------------------- /Aries/static/aries/files/25a32416abee198dd821b0b17a198a8f.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/25a32416abee198dd821b0b17a198a8f.eot -------------------------------------------------------------------------------- /Aries/static/aries/files/260c9c6535065674bb5e59a73f894abb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/260c9c6535065674bb5e59a73f894abb.png -------------------------------------------------------------------------------- /Aries/static/aries/files/40ce7c17b5dbf5841176e2d2848a8f7b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/40ce7c17b5dbf5841176e2d2848a8f7b.jpg -------------------------------------------------------------------------------- /Aries/static/aries/files/448c34a56d699c29117adc64c43affeb.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/448c34a56d699c29117adc64c43affeb.woff2 -------------------------------------------------------------------------------- /Aries/static/aries/files/4c4bf0a13eae5c7cdb109f91f8563f77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/4c4bf0a13eae5c7cdb109f91f8563f77.png -------------------------------------------------------------------------------- /Aries/static/aries/files/4f88ef172e7bc7e98e24fc7df5a05c4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/4f88ef172e7bc7e98e24fc7df5a05c4b.png -------------------------------------------------------------------------------- /Aries/static/aries/files/5a379c46656d7a393c8f1ab293e46def.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/5a379c46656d7a393c8f1ab293e46def.png -------------------------------------------------------------------------------- /Aries/static/aries/files/5f78e86f895f5a5cc1472cc57db154c5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/5f78e86f895f5a5cc1472cc57db154c5.png -------------------------------------------------------------------------------- /Aries/static/aries/files/6c56b94fd0540844a7118cdff565b0ae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/6c56b94fd0540844a7118cdff565b0ae.png -------------------------------------------------------------------------------- /Aries/static/aries/files/8965662a4348c548189b97493c21a19e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/8965662a4348c548189b97493c21a19e.png -------------------------------------------------------------------------------- /Aries/static/aries/files/8f88d990024975797f96ce7648dacd2f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/8f88d990024975797f96ce7648dacd2f.png -------------------------------------------------------------------------------- /Aries/static/aries/files/94b34ff5224ba38210d67623bb1a1504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/94b34ff5224ba38210d67623bb1a1504.png -------------------------------------------------------------------------------- /Aries/static/aries/files/9c3460386bcab110e4a59f986dd889d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/9c3460386bcab110e4a59f986dd889d2.png -------------------------------------------------------------------------------- /Aries/static/aries/files/a1a2d01bcd034270a3bc92176edfb66c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/a1a2d01bcd034270a3bc92176edfb66c.png -------------------------------------------------------------------------------- /Aries/static/aries/files/a259626daec7f20068719c966ab2c582.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/a259626daec7f20068719c966ab2c582.png -------------------------------------------------------------------------------- /Aries/static/aries/files/a5e723d05ad9289a376a0ada1fccb030.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/a5e723d05ad9289a376a0ada1fccb030.png -------------------------------------------------------------------------------- /Aries/static/aries/files/b9848d479d7dadd6089f5a249158ffb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/b9848d479d7dadd6089f5a249158ffb2.png -------------------------------------------------------------------------------- /Aries/static/aries/files/bbfbf2e8eaa8ebbce8524769ac0a5bc0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/bbfbf2e8eaa8ebbce8524769ac0a5bc0.png -------------------------------------------------------------------------------- /Aries/static/aries/files/c8ddf1e5e5bf3682bc7bebf30f394148.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/c8ddf1e5e5bf3682bc7bebf30f394148.woff -------------------------------------------------------------------------------- /Aries/static/aries/files/c95bbe6612720337c01020f29eda3384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/c95bbe6612720337c01020f29eda3384.png -------------------------------------------------------------------------------- /Aries/static/aries/files/d5267b8db2498e44bd567bd12e07576b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/d5267b8db2498e44bd567bd12e07576b.png -------------------------------------------------------------------------------- /Aries/static/aries/files/d5422321c4f6feed4081891051f9a6b2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/d5422321c4f6feed4081891051f9a6b2.png -------------------------------------------------------------------------------- /Aries/static/aries/files/d5461fddf4aaf2b40128f210436a7d9c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/d5461fddf4aaf2b40128f210436a7d9c.png -------------------------------------------------------------------------------- /Aries/static/aries/files/dd0baa69a69937600dc3bf035f3873c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/dd0baa69a69937600dc3bf035f3873c4.png -------------------------------------------------------------------------------- /Aries/static/aries/files/e18bbf611f2a2e43afc071aa2f4e1512.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/e18bbf611f2a2e43afc071aa2f4e1512.ttf -------------------------------------------------------------------------------- /Aries/static/aries/files/e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2 -------------------------------------------------------------------------------- /Aries/static/aries/files/f0aa0566b9f39334bd886d27d6a4cfe1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/f0aa0566b9f39334bd886d27d6a4cfe1.png -------------------------------------------------------------------------------- /Aries/static/aries/files/f4769f9bdb7466be65088239c12046d1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/f4769f9bdb7466be65088239c12046d1.eot -------------------------------------------------------------------------------- /Aries/static/aries/files/fa2772327f55d8198301fdb8bcfc8158.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/aries/files/fa2772327f55d8198301fdb8bcfc8158.woff -------------------------------------------------------------------------------- /Aries/static/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Aries/static/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Aries/static/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Aries/static/images/bitbug_favicon_blue.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/images/bitbug_favicon_blue.ico -------------------------------------------------------------------------------- /Aries/static/images/bitbug_favicon_whit.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/images/bitbug_favicon_whit.ico -------------------------------------------------------------------------------- /Aries/static/rest_framework/css/default.css: -------------------------------------------------------------------------------- 1 | 2 | /* The navbar is fixed at >= 980px wide, so add padding to the body to prevent 3 | content running up underneath it. */ 4 | 5 | h1 { 6 | font-weight: 300; 7 | } 8 | 9 | h2, h3 { 10 | font-weight: 300; 11 | } 12 | 13 | .resource-description, .response-info { 14 | margin-bottom: 2em; 15 | } 16 | 17 | .version:before { 18 | content: "v"; 19 | opacity: 0.6; 20 | padding-right: 0.25em; 21 | } 22 | 23 | .version { 24 | font-size: 70%; 25 | } 26 | 27 | .format-option { 28 | font-family: Menlo, Consolas, "Andale Mono", "Lucida Console", monospace; 29 | } 30 | 31 | .button-form { 32 | float: right; 33 | margin-right: 1em; 34 | } 35 | 36 | td.nested { 37 | padding: 0 !important; 38 | } 39 | 40 | td.nested > table { 41 | margin: 0; 42 | } 43 | 44 | form select, form input, form textarea { 45 | width: 90%; 46 | } 47 | 48 | form select[multiple] { 49 | height: 150px; 50 | } 51 | 52 | /* To allow tooltips to work on disabled elements */ 53 | .disabled-tooltip-shield { 54 | position: absolute; 55 | top: 0; 56 | right: 0; 57 | bottom: 0; 58 | left: 0; 59 | } 60 | 61 | .errorlist { 62 | margin-top: 0.5em; 63 | } 64 | 65 | pre { 66 | overflow: auto; 67 | word-wrap: normal; 68 | white-space: pre; 69 | font-size: 12px; 70 | } 71 | 72 | .page-header { 73 | border-bottom: none; 74 | padding-bottom: 0px; 75 | } 76 | 77 | #filtersModal form input[type=submit] { 78 | width: auto; 79 | } 80 | 81 | #filtersModal .modal-body h2 { 82 | margin-top: 0 83 | } 84 | -------------------------------------------------------------------------------- /Aries/static/rest_framework/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .prettyprint .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 20px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /Aries/static/rest_framework/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Aries/static/rest_framework/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Aries/static/rest_framework/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Aries/static/rest_framework/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /Aries/static/rest_framework/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /Aries/static/rest_framework/img/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/rest_framework/img/grid.png -------------------------------------------------------------------------------- /Aries/static/rest_framework/js/csrf.js: -------------------------------------------------------------------------------- 1 | function getCookie(name) { 2 | var cookieValue = null; 3 | if (document.cookie && document.cookie != '') { 4 | var cookies = document.cookie.split(';'); 5 | for (var i = 0; i < cookies.length; i++) { 6 | var cookie = jQuery.trim(cookies[i]); 7 | // Does this cookie string begin with the name we want? 8 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 9 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 10 | break; 11 | } 12 | } 13 | } 14 | return cookieValue; 15 | } 16 | 17 | function csrfSafeMethod(method) { 18 | // these HTTP methods do not require CSRF protection 19 | return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); 20 | } 21 | 22 | function sameOrigin(url) { 23 | // test that a given url is a same-origin URL 24 | // url could be relative or scheme relative or absolute 25 | var host = document.location.host; // host + port 26 | var protocol = document.location.protocol; 27 | var sr_origin = '//' + host; 28 | var origin = protocol + sr_origin; 29 | // Allow absolute or scheme relative URLs to same origin 30 | return (url == origin || url.slice(0, origin.length + 1) == origin + '/') || 31 | (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') || 32 | // or any other URL that isn't scheme relative or absolute i.e relative. 33 | !(/^(\/\/|http:|https:).*/.test(url)); 34 | } 35 | 36 | var csrftoken = getCookie('csrftoken'); 37 | 38 | $.ajaxSetup({ 39 | beforeSend: function(xhr, settings) { 40 | if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) { 41 | // Send the token to same-origin, relative URLs only. 42 | // Send the token only if the method warrants CSRF protection 43 | // Using the CSRFToken value acquired earlier 44 | xhr.setRequestHeader("X-CSRFToken", csrftoken); 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /Aries/static/rest_framework/js/default.js: -------------------------------------------------------------------------------- 1 | function getCookie(c_name) 2 | { 3 | // From http://www.w3schools.com/js/js_cookies.asp 4 | var c_value = document.cookie; 5 | var c_start = c_value.indexOf(" " + c_name + "="); 6 | if (c_start == -1) { 7 | c_start = c_value.indexOf(c_name + "="); 8 | } 9 | if (c_start == -1) { 10 | c_value = null; 11 | } else { 12 | c_start = c_value.indexOf("=", c_start) + 1; 13 | var c_end = c_value.indexOf(";", c_start); 14 | if (c_end == -1) { 15 | c_end = c_value.length; 16 | } 17 | c_value = unescape(c_value.substring(c_start,c_end)); 18 | } 19 | return c_value; 20 | } 21 | 22 | // JSON highlighting. 23 | prettyPrint(); 24 | 25 | // Bootstrap tooltips. 26 | $('.js-tooltip').tooltip({ 27 | delay: 1000, 28 | container: 'body' 29 | }); 30 | 31 | // Deal with rounded tab styling after tab clicks. 32 | $('a[data-toggle="tab"]:first').on('shown', function (e) { 33 | $(e.target).parents('.tabbable').addClass('first-tab-active'); 34 | }); 35 | $('a[data-toggle="tab"]:not(:first)').on('shown', function (e) { 36 | $(e.target).parents('.tabbable').removeClass('first-tab-active'); 37 | }); 38 | 39 | $('a[data-toggle="tab"]').click(function(){ 40 | document.cookie="tabstyle=" + this.name + "; path=/"; 41 | }); 42 | 43 | // Store tab preference in cookies & display appropriate tab on load. 44 | var selectedTab = null; 45 | var selectedTabName = getCookie('tabstyle'); 46 | 47 | if (selectedTabName) { 48 | selectedTabName = selectedTabName.replace(/[^a-z-]/g, ''); 49 | } 50 | 51 | if (selectedTabName) { 52 | selectedTab = $('.form-switcher a[name=' + selectedTabName + ']'); 53 | } 54 | 55 | if (selectedTab && selectedTab.length > 0) { 56 | // Display whichever tab is selected. 57 | selectedTab.tab('show'); 58 | } else { 59 | // If no tab selected, display rightmost tab. 60 | $('.form-switcher a:first').tab('show'); 61 | } 62 | 63 | $(window).load(function(){ 64 | $('#errorModal').modal('show'); 65 | }); 66 | -------------------------------------------------------------------------------- /Aries/static/user_auth/js/login.js: -------------------------------------------------------------------------------- 1 | $("#login-button").click(function(event){ 2 | event.preventDefault(); 3 | $('form').fadeOut(500); 4 | $('.wrapper').addClass('form-success'); 5 | }); 6 | 7 | -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/11.3d98f9883136c4ef3d97.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([11],{10:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var u=l(1),n=a(u);l(22),t["default"]=n["default"].createClass({displayName:"Task",render:function(){return n["default"].createElement("div",{className:"public-task"},n["default"].createElement("h3",null,"业务逻辑中复用的组件"),n["default"].createElement("p",null,"为了防止 css 冲突,className 以 `public-` 开头"))}})},21:function(e,t,l){t=e.exports=l(2)(),t.push([e.id,"",""])},22:function(e,t,l){var a=l(21);"string"==typeof a&&(a=[[e.id,a,""]]);l(3)(a,{});a.locals&&(e.exports=a.locals)},485:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var u=l(1),n=a(u),r=l(10),s=a(r);l(707),t["default"]=n["default"].createClass({displayName:"Other",render:function(){return n["default"].createElement("div",{className:"function-data-moduleA"},n["default"].createElement("h1",null,"ModuleA"),n["default"].createElement(s["default"],null))}})},575:function(e,t,l){t=e.exports=l(2)(),t.push([e.id,"",""])},707:function(e,t,l){var a=l(575);"string"==typeof a&&(a=[[e.id,a,""]]);l(3)(a,{});a.locals&&(e.exports=a.locals)}}); -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/12.3d98f9883136c4ef3d97.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([12],{10:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var u=l(1),n=a(u);l(22),t["default"]=n["default"].createClass({displayName:"Task",render:function(){return n["default"].createElement("div",{className:"public-task"},n["default"].createElement("h3",null,"业务逻辑中复用的组件"),n["default"].createElement("p",null,"为了防止 css 冲突,className 以 `public-` 开头"))}})},21:function(e,t,l){t=e.exports=l(2)(),t.push([e.id,"",""])},22:function(e,t,l){var a=l(21);"string"==typeof a&&(a=[[e.id,a,""]]);l(3)(a,{});a.locals&&(e.exports=a.locals)},476:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var u=l(1),n=a(u),s=l(10),r=a(s);l(706),t["default"]=n["default"].createClass({displayName:"ModuleA",render:function(){return n["default"].createElement("div",{className:"function-data-moduleA"},n["default"].createElement("h1",null,"ModuleA"),n["default"].createElement(r["default"],null))}})},572:function(e,t,l){t=e.exports=l(2)(),t.push([e.id,"",""])},706:function(e,t,l){var a=l(572);"string"==typeof a&&(a=[[e.id,a,""]]);l(3)(a,{});a.locals&&(e.exports=a.locals)}}); -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/13.3d98f9883136c4ef3d97.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([13],{10:function(e,t,l){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=l(1),n=u(a);l(22),t["default"]=n["default"].createClass({displayName:"Task",render:function(){return n["default"].createElement("div",{className:"public-task"},n["default"].createElement("h3",null,"业务逻辑中复用的组件"),n["default"].createElement("p",null,"为了防止 css 冲突,className 以 `public-` 开头"))}})},21:function(e,t,l){t=e.exports=l(2)(),t.push([e.id,"",""])},22:function(e,t,l){var u=l(21);"string"==typeof u&&(u=[[e.id,u,""]]);l(3)(u,{});u.locals&&(e.exports=u.locals)},477:function(e,t,l){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=l(1),n=u(a),r=l(10),d=u(r);t["default"]=n["default"].createClass({displayName:"ModuleB",render:function(){return n["default"].createElement("div",null,n["default"].createElement("h1",null,"ModuleB"),n["default"].createElement(d["default"],null))}})}}); -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/14.3d98f9883136c4ef3d97.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([14],{501:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=u(a);t["default"]=l["default"].createClass({displayName:"NotFound",render:function(){return l["default"].createElement("div",{className:"not-found"},l["default"].createElement("p",null,"您访问的页面不存在"))}})}}); -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/1dc35d25e61d819a9c357074014867ab.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/1dc35d25e61d819a9c357074014867ab.ttf -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/25a32416abee198dd821b0b17a198a8f.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/25a32416abee198dd821b0b17a198a8f.eot -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/40ce7c17b5dbf5841176e2d2848a8f7b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/40ce7c17b5dbf5841176e2d2848a8f7b.jpg -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/448c34a56d699c29117adc64c43affeb.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/448c34a56d699c29117adc64c43affeb.woff2 -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/6c56b94fd0540844a7118cdff565b0ae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/6c56b94fd0540844a7118cdff565b0ae.png -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/8f88d990024975797f96ce7648dacd2f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/8f88d990024975797f96ce7648dacd2f.png -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/94b34ff5224ba38210d67623bb1a1504.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/94b34ff5224ba38210d67623bb1a1504.png -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/b9848d479d7dadd6089f5a249158ffb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/b9848d479d7dadd6089f5a249158ffb2.png -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/c8ddf1e5e5bf3682bc7bebf30f394148.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/c8ddf1e5e5bf3682bc7bebf30f394148.woff -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/e18bbf611f2a2e43afc071aa2f4e1512.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/e18bbf611f2a2e43afc071aa2f4e1512.ttf -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2 -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/f4769f9bdb7466be65088239c12046d1.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/f4769f9bdb7466be65088239c12046d1.eot -------------------------------------------------------------------------------- /Aries/static/user_auth/js/v1/files/fa2772327f55d8198301fdb8bcfc8158.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/static/user_auth/js/v1/files/fa2772327f55d8198301fdb8bcfc8158.woff -------------------------------------------------------------------------------- /Aries/user_auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/user_auth/__init__.py -------------------------------------------------------------------------------- /Aries/user_auth/admin.py: -------------------------------------------------------------------------------- 1 | # Register your models here. 2 | from user_auth.models import Account,Role,Space,SpaceUserRole 3 | from django.contrib import admin 4 | class AccountAdmin(admin.ModelAdmin): 5 | list_display=('id','name','password','email','is_active') 6 | 7 | class RoleAdmin(admin.ModelAdmin): 8 | list_display=('id','name','is_active') 9 | 10 | class SpaceAdmin(admin.ModelAdmin): 11 | list_display=('id','name','create_time','is_active') 12 | 13 | class SpaceUserRoleAdmin(admin.ModelAdmin): 14 | list_display=('id','user','space','role','permission') 15 | 16 | admin.site.register(Account,AccountAdmin) 17 | admin.site.register(Role,RoleAdmin) 18 | admin.site.register(Space,SpaceAdmin) 19 | admin.site.register(SpaceUserRole,SpaceUserRoleAdmin) 20 | -------------------------------------------------------------------------------- /Aries/user_auth/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Account', 15 | fields=[ 16 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 17 | ('name', models.CharField(default=b'', max_length=100)), 18 | ('password', models.CharField(default=b'', max_length=512)), 19 | ('email', models.EmailField(max_length=254)), 20 | ('is_active', models.IntegerField(blank=True)), 21 | ], 22 | ), 23 | migrations.CreateModel( 24 | name='Role', 25 | fields=[ 26 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 27 | ('name', models.CharField(default=b'', max_length=100)), 28 | ('is_active', models.IntegerField(blank=True)), 29 | ], 30 | ), 31 | migrations.CreateModel( 32 | name='Space', 33 | fields=[ 34 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 35 | ('name', models.CharField(default=b'', max_length=100)), 36 | ('create_time', models.DateTimeField(auto_now_add=True)), 37 | ('title', models.CharField(default=b'', max_length=512)), 38 | ('is_active', models.IntegerField(blank=True)), 39 | ], 40 | ), 41 | migrations.CreateModel( 42 | name='SpaceUserRole', 43 | fields=[ 44 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 45 | ('pemission', models.IntegerField()), 46 | ('role', models.ForeignKey(to='user_auth.Role')), 47 | ('space', models.ForeignKey(to='user_auth.Space')), 48 | ('user', models.ForeignKey(to='user_auth.Account')), 49 | ], 50 | ), 51 | migrations.AddField( 52 | model_name='account', 53 | name='role', 54 | field=models.ForeignKey(to='user_auth.Role'), 55 | ), 56 | ] 57 | -------------------------------------------------------------------------------- /Aries/user_auth/migrations/0002_auto_20160630_1237.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('user_auth', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.RemoveField( 15 | model_name='spaceuserrole', 16 | name='pemission', 17 | ), 18 | migrations.AddField( 19 | model_name='account', 20 | name='ftp_password', 21 | field=models.CharField(default=b'', max_length=512), 22 | ), 23 | migrations.AddField( 24 | model_name='space', 25 | name='address', 26 | field=models.CharField(default=b'', max_length=512), 27 | ), 28 | migrations.AddField( 29 | model_name='space', 30 | name='capacity', 31 | field=models.IntegerField(default=0, blank=True), 32 | ), 33 | migrations.AddField( 34 | model_name='spaceuserrole', 35 | name='permission', 36 | field=models.IntegerField(null=True), 37 | ), 38 | ] 39 | -------------------------------------------------------------------------------- /Aries/user_auth/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/Aries/user_auth/migrations/__init__.py -------------------------------------------------------------------------------- /Aries/user_auth/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | # Create your models here. 3 | class Role(models.Model): 4 | name = models.CharField(default='',max_length=100) 5 | is_active = models.IntegerField(blank=True) 6 | def __unicode__(self): 7 | return self.name 8 | 9 | class Account(models.Model): 10 | name = models.CharField(default='',max_length=100) 11 | password = models.CharField(default='',max_length=512) 12 | email = models.EmailField() 13 | role = models.ForeignKey(Role) 14 | is_active = models.IntegerField(blank=True) 15 | ftp_password = models.CharField(default='',max_length=512) 16 | cur_space = models.CharField(default='',max_length=512) 17 | def __unicode__(self): 18 | return self.name 19 | 20 | class Space(models.Model): 21 | name = models.CharField(default='',max_length=100) 22 | create_time = models.DateTimeField(auto_now_add=True) 23 | title = models.CharField(default='',max_length=512) 24 | capacity = models.CharField(default='',max_length=512) 25 | address = models.CharField(default='',max_length=512) 26 | is_active = models.IntegerField(blank=True) 27 | exec_user = models.CharField(default='',max_length=512) 28 | def __unicode__(self): 29 | return self.name 30 | 31 | class SpaceUserRole(models.Model): 32 | user = models.ForeignKey(Account) 33 | space = models.ForeignKey(Space) 34 | role = models.ForeignKey(Role) 35 | permission = models.IntegerField(null=True) 36 | 37 | -------------------------------------------------------------------------------- /Aries/user_auth/templates/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | {% load staticfiles %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 百分点云中心 11 | 12 | 13 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Aries/user_auth/urls.py: -------------------------------------------------------------------------------- 1 | from rest_framework.urlpatterns import format_suffix_patterns 2 | from rest_framework_jsonp.renderers import JSONPRenderer 3 | from django.conf.urls import patterns,url,include 4 | import views 5 | import rests 6 | urlpatterns = format_suffix_patterns(patterns('user_auth.views', 7 | url(r'^$', 'api_root'), 8 | url(r'^overview/$',rests.overview.as_view(),name="overview"), 9 | ## space 10 | url(r'^spaces/$',rests.spaceList.as_view(),name="space-list"), 11 | url(r'^spaces/info/(?P[0-9]+)/$',rests.spaceInfo.as_view(),name="space-info"), 12 | url(r'^spaces/member/(?P[0-9]+)/$',rests.spaceMember.as_view(),name='space-member'), 13 | ## role 14 | url(r'^roles/',rests.roleList.as_view(),name="role-list"), 15 | url(r'^user/(?P[\w-]+)/$',rests.userList.as_view(),name="user-list") 16 | )) 17 | -------------------------------------------------------------------------------- /Aries/user_auth/views.py: -------------------------------------------------------------------------------- 1 | #encoding=utf8 2 | from rest_framework.response import Response 3 | from rest_framework.decorators import api_view 4 | from rest_framework.reverse import reverse 5 | import logging 6 | ac_logger = logging.getLogger("access_log") 7 | 8 | 9 | @api_view(('GET',)) 10 | def api_root(request, format=None): 11 | return Response({ 12 | 'spaces': reverse('space-list', request=request, format=format), 13 | 'roles': reverse('role-list', request=request, format=format), 14 | }) 15 | 16 | 17 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.baifendian.com/sjx/sirius_base 2 | MAINTAINER jingxia.sun 3 | 4 | ENV SIRIUS_PATH /opt/Sirius 5 | RUN mkdir -p /opt/Sirius 6 | ADD . /opt/Sirius 7 | 8 | RUN rm -rf /opt/hadoop/etc/hadoop/* 9 | ADD ./hadoop /opt/hadoop/etc/hadoop 10 | 11 | RUN mkdir -p /opt/bfdhadoop/tmp/data && \ 12 | mkdir /opt/bfdhadoop/dfs.namenode.dir && \ 13 | mkdir /opt/bfdhadoop/dfs.datanode.dir && \ 14 | mkdir /opt/bfdhadoop/journal && \ 15 | mkdir -p /opt/bfdhadoop/yarn_dir/local-dirs && \ 16 | mkdir -p /opt/bfdhadoop/yarn_dir/log-dirs && \ 17 | mkdir -p /opt/bfdhadoop/yarn_dir/log-aggregation && \ 18 | mkdir -p /tmp/mr_history/tmp /tmp/mr_history/done && \ 19 | cd /root && \ 20 | source /etc/profile 21 | 22 | RUN cd $SIRIUS_PATH/package/Aries && \ 23 | rm -rf node_modules && \ 24 | npm install && \ 25 | sh build.sh 26 | 27 | RUN mkdir -p $SIRIUS_PATH/log &&\ 28 | mkdir -p $SIRIUS_PATH/download 29 | 30 | RUN adduser hadoop && \ 31 | adduser bre && \ 32 | adduser bae && \ 33 | adduser openstack 34 | 35 | VOLUME ["/opt/Sirius/log"] 36 | VOLUME ["/opt/Sirius/download"] 37 | RUN chmod +x $SIRIUS_PATH/sbin/Aries.sh &&\ 38 | chmod +x $SIRIUS_PATH/docker-k8s/script/start_script.sh 39 | EXPOSE 10086 40 | #CMD /opt/Sirius/sbin/Aries.sh start >>/opt/Sirius/log/uwsgi.log 41 | CMD sh $SIRIUS_PATH/docker-k8s/script/start_script.sh 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docker-k8s/README.MD: -------------------------------------------------------------------------------- 1 | 2 | 1. k8s_config目录包含三个文件,分别用于创建svc以及rc、ingress 3 | k8s使用: 4 | ```Bash 5 | kubectl create -f sirius-svc.yaml 6 | kubectl create -f sirius-rc.yaml 7 | kubectl create -f sirius-ingress.yaml 8 | ``` 9 | 10 | 11 | 2. 需要修改的文件如下: 12 | 1. Sirius/sbin目录下Aries.xml文件 13 | ```Bash 14 | 删除该行: UWSGI_LOG_DIR 15 | ``` 16 | 17 | 2. Sirius/package/Aries目录下webpack.config.js文件 18 | ```Bash 19 | 注释掉该行: publicPath: ((isProduction ? env.basePath : '') + '/build/').replace(/\/\//, '/') 20 | 取消该行注释:publicPath: ((isProduction ? env.basePath : '') + '/static/aries/').replace(/\/\//, '/') 21 | ``` 22 | 3.Sirius/sbin/目录下,将Aries.yaml文件替换成Aries.yaml.k8s(k8s专用配置文件) 23 | 24 | 3. docker镜像制作 25 | 26 | ```Bash 27 | $ docker build -t docker.baifendian.com/sjx/sirius:1 . 28 | $ docker push docker.baifendian.com/sjx/sirius_lugu:latest 29 | ``` 30 | 31 | 4. 访问 32 | ```Bash 33 | 浏览器访问 sirius.bfdcloud.com 34 | ``` 35 | -------------------------------------------------------------------------------- /docker-k8s/k8s_config/sirius-svc.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: sirius 5 | spec: 6 | selector: 7 | name: sirius 8 | ports: 9 | - name: http 10 | protocol: TCP 11 | port: 8888 12 | targetPort: 10086 13 | externalIPs: 14 | - 192.168.48.21 15 | - 192.168.48.22 16 | -------------------------------------------------------------------------------- /docker-k8s/script/changejs.sh: -------------------------------------------------------------------------------- 1 | FROM_FILE="/opt/Sirius/package/Aries/index.jsp" 2 | TO_FILE="/opt/Sirius/Aries/user_auth/templates/index/index.html" 3 | str1=`cat $FROM_FILE | grep "app.*.js"` 4 | str2=${str1##*"app."} 5 | str3=${str2%%".js"*} 6 | app_name="app."$str3".js" 7 | sed -i "s/app.*.js/$app_name/g" $TO_FILE 8 | 9 | -------------------------------------------------------------------------------- /hadoop/core-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | fs.defaultFS 4 | hdfs://HDFS_DFS_NAMESERVICES 5 | 6 | 7 | hadoop.tmp.dir 8 | CORE_HADOOP_TMP_DIR 9 | 10 | 11 | ha.zookeeper.quorum 12 | CORE_HA_ZOOKEEPER_QUORUM 13 | 14 | 15 | -------------------------------------------------------------------------------- /hadoop/hdfs-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | dfs.client.failover.proxy.provider.HDFS_DFS_NAMESERVICES 4 | org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider 5 | 6 | 7 | 8 | dfs.nameservices 9 | HDFS_DFS_NAMESERVICES 10 | nameservices逻辑名 11 | Comma-separated list of nameservices. 12 | as same as fs.defaultFS in core-site.xml. 13 | 14 | 15 | 16 | dfs.ha.namenodes.HDFS_DFS_NAMESERVICES 17 | nn1,nn2 18 | 19 | 20 | dfs.namenode.rpc-address.HDFS_DFS_NAMESERVICES.nn1 21 | HDFS_DFS_NAMENODE_RPC_ADDRESS_NN1 22 | 23 | 24 | 25 | dfs.namenode.rpc-address.HDFS_DFS_NAMESERVICES.nn2 26 | HDFS_DFS_NAMENODE_RPC_ADDRESS_NN2 27 | 28 | RPC address for nomenode2 of hadoop-test 29 | 30 | 31 | 32 | dfs.namenode.http-address.HDFS_DFS_NAMESERVICES.nn1 33 | HDFS_DFS_NAMENODE_HTTP_ADDRESS_NN1 34 | Hdfs HA: dfs.namenode.http-address.[nameservice ID] http 通信地址 35 | The address and the base port where the dfs namenode1 web ui will listen 36 | on. 37 | 38 | 39 | 40 | dfs.namenode.http-address.HDFS_DFS_NAMESERVICES.nn2 41 | HDFS_DFS_NAMENODE_HTTP_ADDRESS_NN2 42 | 43 | The address and the base port where the dfs namenode2 web ui will listen 44 | on. 45 | 46 | 47 | 48 | dfs.namenode.servicerpc-address.HDFS_DFS_NAMESERVICES.n1 49 | HDFS_DFS_NAMENODE_SERVICERPC_ADDRESS_N1 50 | 51 | 52 | dfs.namenode.servicerpc-address.HDFS_DFS_NAMESERVICES.n2 53 | HDFS_DFS_NAMENODE_SERVICERPC_ADDRESS_N2 54 | 55 | 56 | -------------------------------------------------------------------------------- /hadoop/yarn-site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | yarn.resourcemanager.cluster-id 4 | YARN_YARN_RESOURCEMANAGER_CLUSTER_ID 5 | 集群名称,确保HA选举时对应的集群 6 | 7 | 8 | yarn.resourcemanager.ha.rm-ids 9 | rm1,rm2 10 | 11 | 12 | yarn.resourcemanager.ha.id 13 | rm1 14 | 15 | 16 | yarn.resourcemanager.recovery.enabled 17 | true 18 | 19 | 20 | yarn.resourcemanager.store.class 21 | org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore 22 | 23 | 24 | yarn.resourcemanager.zk-address 25 | YARN_YARN_RESOURCEMANAGER_ZK_ADDRESS 26 | 27 | 28 | yarn.resourcemanager.address.rm1 29 | YARN_YARN_RESOURCEMANAGER_ADDRESS_RM1 30 | 31 | 32 | yarn.resourcemanager.scheduler.address.rm1 33 | YARN_YARN_RESOURCEMANAGER_SCHEDULER_ADDRESS_RM1 34 | 35 | 36 | yarn.resourcemanager.webapp.https.address.rm1 37 | YARN_YARN_RESOURCEMANAGER_WEBAPP_HTTPS_ADDRESS_RM1 38 | 39 | 40 | yarn.resourcemanager.webapp.address.rm1 41 | YARN_YARN_RESOURCEMANAGER_WEBAPP_ADDRESS_RM1 42 | 43 | 44 | yarn.resourcemanager.resource-tracker.address.rm1 45 | YARN_YARN_RESOURCEMANAGER_RESOURCE_TRACKER_ADDRESS_RM1 46 | 47 | 48 | yarn.resourcemanager.admin.address.rm1 49 | YARN_YARN_RESOURCEMANAGER_ADMIN_ADDRESS_RM1 50 | 51 | 52 | yarn.resourcemanager.address.rm2 53 | YARN_YARN_RESOURCEMANAGER_ADDRESS_RM2 54 | 55 | 56 | yarn.resourcemanager.scheduler.address.rm2 57 | YARN_YARN_RESOURCEMANAGER_SCHEDULER_ADDRESS_RM2 58 | 59 | 60 | yarn.resourcemanager.webapp.https.address.rm2 61 | YARN_YARN_RESOURCEMANAGER_WEBAPP_HTTPS_ADDRESS_RM2 62 | 63 | 64 | yarn.resourcemanager.webapp.address.rm2 65 | YARN_YARN_RESOURCEMANAGER_WEBAPP_ADDRESS_RM2 66 | 67 | 68 | yarn.resourcemanager.resource-tracker.address.rm2 69 | YARN_YARN_RESOURCEMANAGER_RESOURCE_TRACKER_ADDRESS_RM2 70 | 71 | 72 | yarn.resourcemanager.admin.address.rm2 73 | YARN_YARN_RESOURCEMANAGER_ADMIN_ADDRESS_RM2 74 | 75 | 76 | -------------------------------------------------------------------------------- /package/Aries/README.md: -------------------------------------------------------------------------------- 1 | # XXX 系统 2 | 3 | ## 本地开发环境安装 4 | 5 | ```sh 6 | $ git clone 7 | 8 | # 安装依赖包 9 | $ npm install 10 | 11 | $ npm start 12 | ``` 13 | 14 | ## 部署测试/上线 15 | 16 | 参考 [http://ui.baifendian.com/workflow](http://ui.baifendian.com/workflow) 第三部分 -------------------------------------------------------------------------------- /package/Aries/bin/theme.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 自动换肤,改变 bfd-bootstrap、bfd-ui、App.less 的色值 3 | * node bin/theme.js -#42a5f5:#ff7043 -#2196f3:#ff5722 -#1e88e5:#f4511e 4 | * 自定义颜色替换规则,语法:-原颜色:目标颜色,支持多个,空格隔开 5 | * 6 | * package.json 已定义快捷方式, npm run theme 执行任务 7 | */ 8 | 9 | 'use strict' 10 | 11 | var fs = require('fs') 12 | var path = require('path') 13 | 14 | var option = process.argv.slice(2) 15 | var colorRule = {} 16 | var sourceColors = [] 17 | option.forEach(function(item) { 18 | item = item.slice(1).split(':') 19 | colorRule[item[0]] = item[1] 20 | sourceColors.push(item[0]) 21 | }) 22 | 23 | var sheets = [] 24 | sheets.push(path.join(__dirname, '../node_modules/bfd-bootstrap/lib/dist/bfd-bootstrap.min.css')) 25 | sheets.push(path.join(__dirname, '../src/App.less')) 26 | sheets.push(path.join(__dirname, '../src/functions/Login/index.less')) 27 | 28 | function pushSheet(dir) { 29 | fs.readdirSync(dir).forEach(function(item) { 30 | var _dir = path.join(dir, item) 31 | if (fs.statSync(_dir).isDirectory()) { 32 | pushSheet(_dir) 33 | } else { 34 | if (path.extname(item) === '.less') { 35 | sheets.push(_dir) 36 | } 37 | } 38 | }) 39 | } 40 | pushSheet(path.join(__dirname, '../node_modules/bfd-ui/lib')) 41 | 42 | var reg = new RegExp(sourceColors.join('|'), 'gi') 43 | sheets.forEach(function(sheet) { 44 | var content = fs.readFileSync(sheet, 'utf-8') 45 | content = content.replace(reg, function(match) { 46 | return colorRule[match] 47 | }) 48 | fs.writeFileSync(sheet, content) 49 | }) -------------------------------------------------------------------------------- /package/Aries/build.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | npm run build 3 | HOME=`dirname $(cd "$(dirname "$0")"; pwd)` 4 | echo $HOME 5 | indexHome="$HOME/../Aries/user_auth/templates/index/" 6 | echo $indexHome 7 | staticHome="$HOME/../Aries/static/aries/" 8 | echo $staticHome 9 | buildHome="$HOME/Aries/build/" 10 | echo $buildHome 11 | echo "rm -rf ${staticHome}/*" 12 | echo ${buildHome} 13 | echo "mv ${buildHome}/* ${staticHome}" 14 | echo "mv ${HOME}/Aries/index.html ${indexHome}" 15 | if [ -n "${staticHome}" ];then 16 | rm -rf ${staticHome}/* 17 | fi 18 | if [ -n "${buildHome}" ];then 19 | mv ${buildHome}/* ${staticHome} 20 | fi 21 | if [ -n "${HOME}" ];then 22 | mv ${HOME}/Aries/index.html ${indexHome} 23 | fi 24 | -------------------------------------------------------------------------------- /package/Aries/data/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 200, 3 | "data": [{ 4 | "x": 234, 5 | "y": 55, 6 | "date": "01-01" 7 | }, { 8 | "x": 499, 9 | "y": 122, 10 | "date": "01-02" 11 | }, { 12 | "x": 1067, 13 | "y": 500, 14 | "date": "01-03" 15 | }, { 16 | "x": 500, 17 | "y": 800, 18 | "date": "01-04" 19 | }, { 20 | "x": 340, 21 | "y": 201, 22 | "date": "01-05" 23 | }] 24 | } -------------------------------------------------------------------------------- /package/Aries/index.tpl: -------------------------------------------------------------------------------- 1 | 2 | <# if (isProduction) { #> 3 | {% load staticfiles %} 4 | <# } #> 5 | 6 | 7 | 8 | 9 | 10 | <# if (isProduction) { #> 11 | 12 | <# } #> 13 | <# if (isProduction) { #> 14 | 15 | <# } #> 16 | 百分点云中心 17 | 18 | 19 | <# if (isProduction) { #> 20 | 25 | <# }#> 26 |
27 | <# if (isProduction) { #> 28 | 29 | <# } else{ #> 30 | 31 | <# } #> 32 | 33 | 34 | -------------------------------------------------------------------------------- /package/Aries/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "lint": "eslint --ext .jsx,.js src || true", 4 | "build": "cross-env NODE_ENV=production webpack -p --progress --colors --bail", 5 | "start": "node-dev server.js", 6 | "theme": "node bin/theme.js -#ff7043:#42a5f5 -#ff5722:#55a8fd -#f4511e:#1e88e5" 7 | }, 8 | "dependencies": { 9 | "antd": "^1.8.0", 10 | "bfd-bootstrap": "0.0.22", 11 | "bfd-ui": "^1.3.0", 12 | "echarts": "^3.2.3", 13 | "js-cookie": "^2.1.2", 14 | "less": "^2.7.1", 15 | "less-loader": "^2.2.3", 16 | "react-copy-to-clipboard": "^4.2.2", 17 | "react-markdown": "^2.4.2", 18 | "uuid": "^2.0.2", 19 | "vis": "^4.16.1" 20 | }, 21 | "devDependencies": { 22 | "autoprefixer": "^6.3.6", 23 | "babel-cli": "^6.3.17", 24 | "babel-loader": "^6.2.0", 25 | "babel-plugin-antd": "^0.4.1", 26 | "babel-plugin-transform-runtime": "~6.4.3", 27 | "babel-preset-es2015": "^6.3.13", 28 | "babel-preset-react": "^6.3.13", 29 | "babel-preset-stage-0": "^6.3.13", 30 | "cross-env": "^1.0.8", 31 | "ejs": "^2.4.1", 32 | "eslint": "^1.10.3", 33 | "eslint-loader": "^1.3.0", 34 | "eslint-plugin-react": "^4.2.3", 35 | "express": "^4.13.3", 36 | "install": "^0.8.1", 37 | "node-dev": "^3.1.0", 38 | "npm": "^3.9.5", 39 | "postcss-loader": "^0.8.2", 40 | "rimraf": "^2.5.2", 41 | "underscore": "^1.8.3", 42 | "webpack": "^1.12.9", 43 | "webpack-dev-middleware": "^1.4.0", 44 | "webpack-livereload-plugin": "^0.8.1" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /package/Aries/server.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var path = require('path') 3 | var webpack = require('webpack') 4 | var webpackDevMiddleware = require('webpack-dev-middleware') 5 | var WebpackConfig = require('./webpack.config') 6 | 7 | var app = express() 8 | 9 | app.use(express.static(__dirname)) 10 | 11 | app.use(webpackDevMiddleware(webpack(WebpackConfig), { 12 | publicPath: '/build/', 13 | stats: { 14 | colors: true 15 | } 16 | })) 17 | 18 | app.set('views', path.join(__dirname)) 19 | app.set('view engine', 'ejs') 20 | 21 | app.get('/data/:name.json', function(req, res) { 22 | res.sendFile(path.join(__dirname, 'data/' + req.params.name + '.json')) 23 | }) 24 | 25 | app.get('*', function(req, res) { 26 | res.render('index', { 27 | user: JSON.stringify({ 28 | name: '管理员', 29 | type: 1 30 | }), 31 | now: Date.now() 32 | }) 33 | }) 34 | 35 | var port = process.argv.slice(2)[0] || 9000 36 | 37 | app.listen(port, function () { 38 | console.log('Server listening on http://localhost:' + port + ', Ctrl+C to stop') 39 | }) 40 | -------------------------------------------------------------------------------- /package/Aries/src/App.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | } 4 | 5 | #wrapper { 6 | position: relative; 7 | min-height: 100%; 8 | animation: fade .25s cubic-bezier(.455,.03,.515,.955); 9 | } 10 | 11 | #header { 12 | background-color: #55a8fd; 13 | height: 50px; 14 | line-height: 50px; 15 | padding: 0 20px; 16 | color: #fff; 17 | a { 18 | color: #fff; 19 | } 20 | .logo { 21 | margin: 0; 22 | font-size: 20px; 23 | .glyphicon { 24 | margin-right: 1em; 25 | } 26 | &:hover, 27 | &:focus { 28 | text-decoration: none; 29 | } 30 | } 31 | 32 | .select-color{ 33 | color: black; 34 | margin-left: 10px; 35 | } 36 | } 37 | 38 | #body { 39 | > .sidebar { 40 | padding: 0; 41 | } 42 | > .content { 43 | padding: 20px; 44 | margin-bottom: 20px; 45 | > div { 46 | animation: fade .25s cubic-bezier(.455,.03,.515,.955); 47 | } 48 | } 49 | } 50 | 51 | @keyframes fade { 52 | 0% { 53 | opacity: 0; 54 | } 55 | } 56 | 57 | #footer { 58 | position: absolute; 59 | bottom: 0; 60 | left: 0; 61 | width: 100%; 62 | padding: 0 20px; 63 | height: 40px; 64 | line-height: 40px; 65 | font-size: 12px; 66 | background-color: #333; 67 | //background-color: #55a8fd; 68 | color: #fff; 69 | a { 70 | color: #fff; 71 | } 72 | .logo { 73 | margin-right: 60px; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /package/Aries/src/env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 开发环境、线上环境的不同配置 3 | */ 4 | 5 | var env = {} 6 | 7 | if (process.env.NODE_ENV === 'production') { 8 | 9 | /** 10 | * 线上环境 11 | */ 12 | 13 | // 数据接口基础 URL ajax 14 | env.baseUrl = '/' 15 | 16 | // 页面根路径 地址栏 17 | env.basePath = '/' 18 | 19 | } else { 20 | 21 | /** 22 | * 开发环境 23 | */ 24 | 25 | // 数据接口基础 URL 26 | env.baseUrl = 'http://172.24.3.64:10086/'; 27 | 28 | // 页面根路径 29 | env.basePath = '/' 30 | 31 | } 32 | 33 | module.exports = env 34 | -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/ClusterInfo/serviceinfo.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import Button from 'bfd/Button' 4 | 5 | import ClusterCommonInfo from './index.jsx' 6 | import CMDR from '../CalcManageDataRequester/requester.js' 7 | import CalcManageConf from '../UrlConf' 8 | import './index.less' 9 | 10 | export default React.createClass({ 11 | 12 | getInitialState: function () { 13 | return { dataTableDataArr:[] } 14 | }, 15 | 16 | checkToRequestData(){ 17 | // 如果当前保存的namespace与实时获取的namespace相同,则不再重新请求 18 | // 否则,重新请求数据 19 | let curNameSpace = CMDR.getCurNameSpace(this) 20 | if ( this.curNameSpace !== curNameSpace ){ 21 | CMDR.getServiceList( curNameSpace,(executedData)=>{ 22 | this.setState ({ 'dataTableDataArr':executedData }) 23 | } ) 24 | this.curNameSpace = curNameSpace 25 | } 26 | }, 27 | 28 | // 当namespace切换的时候,将会强制调用这个render函数 29 | render: function() { 30 | let dataTableConfigDict = { 31 | // 表格信息 32 | column: [{ title:'Name', key:'Name', order:true }, 33 | { title:'ClusterIP', key:'ClusterIP', order:true }, 34 | { title:'ExternalIP', key:'ExternalIP', order:true }, 35 | { title:'Ports', key:'Ports', order:true }, 36 | { title:'CreationTime', key:'CreationTime', order:true }, 37 | { title:'Selector', key:'Selector', order:true }, 38 | { 39 | title:'Json', 40 | key:'', 41 | render:(varNotUse,item) => { 42 | let downloadUrl = CMDR.getServiceJsonDownloadUrl( CMDR.getCurNameSpace(this),item['Name'] ) 43 | let aLabelID = 'ALabel'+item['Name'] 44 | return ( 45 |
46 | 47 | 48 |
49 | ) 50 | }, 51 | order:false, 52 | }], 53 | showPage:'false' 54 | } 55 | let navigationKey = 'ServiceInfo' 56 | let spaceName = CalcManageConf.getCurSpace(this); 57 | let rootDivClassName = 'ServiceInfoChildRootDiv' 58 | let defaultDetailText = [['请选择Service']] 59 | 60 | this.checkToRequestData() 61 | 62 | return ( 63 | 69 | ) 70 | } 71 | }); 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/CreateCluster/index.less: -------------------------------------------------------------------------------- 1 | div.mdRootDiv > div.Big > .mdChildDiv { 2 | h1 { 3 | font-size: 23px; 4 | margin: .67em 0; 5 | } 6 | h2 { 7 | font-size: 20px; 8 | line-height: 22px; 9 | margin-bottom: 10px; 10 | margin-top: 20px; 11 | } 12 | h3 { 13 | font-size: 17px; 14 | line-height: 18.7px; 15 | margin-bottom: 10px; 16 | margin-top: 20px; 17 | } 18 | h4{ 19 | font-size: 16px; 20 | font-weight: normal; 21 | font-family: inherit; 22 | line-height: 1.1; 23 | margin-bottom: 10px; 24 | margin-top: 10px; 25 | } 26 | 27 | p { 28 | margin: 0 0 10px; 29 | } 30 | ul { 31 | margin-bottom: 10px; 32 | margin-top: 0; 33 | display: block; 34 | -webkit-margin-start: 0px; 35 | -webkit-margin-end: 0px; 36 | -webkit-padding-start: 40px; 37 | } 38 | li { 39 | display: list-item; 40 | text-align: -webkit-match-parent; 41 | list-style: none; 42 | } 43 | pre { 44 | display: block; 45 | padding: 9.5px; 46 | margin: 0 0 10px; 47 | line-height: 1.42857143; 48 | color: #333; 49 | word-break: break-all; 50 | word-wrap: break-word; 51 | background-color: #f5f5f5; 52 | border-radius: 4px; 53 | } 54 | code { 55 | padding: 2px 4px; 56 | } 57 | pre code { 58 | padding: 0; 59 | font-size: inherit; 60 | color: inherit; 61 | white-space: pre-wrap; 62 | background-color: transparent; 63 | border-radius: 0; 64 | } 65 | ol { 66 | margin-top: 0; 67 | margin-bottom: 10px; 68 | -webkit-margin-start: 0px; 69 | -webkit-margin-end: 0px; 70 | -webkit-padding-start: 40px; 71 | } 72 | } 73 | 74 | div.mdRootDiv > div.Big { 75 | overflow-x: hidden; 76 | overflow-y: scroll; 77 | padding-right: 18px; 78 | } 79 | -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/MyTask/Graph.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import './Graph.less' 4 | import Graph from 'public/Graph/Graph' 5 | import { Tag } from 'antd' 6 | import Button from 'bfd-ui/lib/Button' 7 | 8 | import CMDR from '../CalcManageDataRequester/requester.js' 9 | 10 | const TabGraph = React.createClass({ 11 | getInitialState: function () { 12 | return { 13 | 'data': { 14 | 'nodes':[], 15 | 'edges':[] 16 | } 17 | } 18 | }, 19 | 20 | componentDidMount:function(){ 21 | CMDR.getMytaskGraph( this,this.xhrCallback ) 22 | }, 23 | 24 | xhrCallback:(_this,executedData) => { 25 | _this.setState ( { 26 | 'data': executedData, 27 | }) 28 | }, 29 | render() { 30 | if ( this.height !== this.props.height ){ 31 | setTimeout( ()=>{ 32 | let graphPanel = ReactDOM.findDOMNode( this.refs.Graph2Name ) 33 | graphPanel.childNodes[0].style.height = (this.props.height - 50) + 'px' 34 | } ) 35 | this.height = this.props.height 36 | } 37 | /** 38 | let data = { 39 | nodes: [ 40 | {id: 1, label: 'taskf', color:'#97C2FC', shape: 'dot',shapeProperties: {},size: 15}, 41 | {id: 2, label: 'task 2', color:'#6E6EFD'}, 42 | {id: 3, label: 'task 3', color:'#C2FABC'}, 43 | {id: 4, label: 'task 4', color:'#C2FABC'}, 44 | {id: 5, label: 'task 5', color:'#C2FABC'}, 45 | {id: 6, label: 'task 6', color:'#C2FABC'}, 46 | {id: 7, label: 'task 7', color:'#C2FABC'}, 47 | {id: 8, label: 'task 8', color:'#FF0000'}, 48 | {id: 9, label: 'task 9', color:'#9D9D9D'}, 49 | {id: 10, label: 'task 10', color:'#FFA807'} 50 | ], 51 | edges: [ 52 | {from: '1', to: 2}, 53 | {from: '1', to: 3}, 54 | {from: 1, to: 4}, 55 | {from: 2, to: 5}, 56 | {from: 3, to: 6}, 57 | {from: 4, to: 7}, 58 | {from: 6, to: 10}, 59 | {from: 8, to: 9}, 60 | {from: 9, to: 10}, 61 | {from: 3, to: 8}, 62 | {from: 3, to: 9}, 63 | ] 64 | };*/ 65 | 66 | return ( 67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 |    提示:A指向B 表示B依赖A 76 |
77 |
78 | 79 |
80 |
81 | ) 82 | } 83 | }) 84 | 85 | export default TabGraph 86 | -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/MyTask/Graph.less: -------------------------------------------------------------------------------- 1 | div.Graph2Name:hover{ 2 | cursor:pointer; 3 | }; 4 | 5 | div.GraphName > div.btn-name > button.btn-1 { 6 | background-color: #A9A9A9 ; 7 | border-radius:20px; 8 | }; 9 | 10 | div.GraphName > div.btn-name > button.btn-2 { 11 | background-color: #2db7f5; 12 | border-radius:20px; 13 | }; 14 | 15 | div.GraphName > div.btn-name > button.btn-3 { 16 | background-color: #0000FF; 17 | border-radius:20px; 18 | }; 19 | 20 | div.GraphName > div.btn-name > button.btn-4 { 21 | background-color: #87d068; 22 | border-radius:20px; 23 | }; 24 | 25 | div.GraphName > div.btn-name > button.btn-5 { 26 | background-color: #f50; 27 | border-radius:20px; 28 | }; 29 | 30 | div.GraphName > div.btn-name > button.btn-6 { 31 | background-color: #fa0; 32 | border-radius:20px; 33 | }; 34 | 35 | div.Graph2Name { 36 | padding-top: 15px; 37 | }; 38 | 39 | div.Graph2Name div.vis-network > canvas { 40 | background-image: url(~public/Graph/img/background.png); 41 | background-repeat: repeat; 42 | }; 43 | 44 | div.Graph2Name div.vis-network { 45 | border:1px solid rgb(226,236,243); 46 | } -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/Overview/index.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | div.MyCalcManagerOverviewChildRootDiv > table.EchartFatherDiv{ 5 | width: 100%; 6 | > tbody { 7 | display: block; 8 | overflow-y: auto; 9 | overflow-x: hidden; 10 | > tr{ 11 | width: 100%; 12 | display: block; 13 | 14 | > td{ 15 | width: 50%; 16 | display: inline-block; 17 | } 18 | } 19 | 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /package/Aries/src/functions/CalcManage/UrlConf/index.jsx: -------------------------------------------------------------------------------- 1 | import conf from 'public/Conf/Conf' 2 | const CalcManageConf={ 3 | //从location中获取cur_space 4 | getCurSpace(_this){ 5 | return conf.getCurSpace(_this); 6 | }, 7 | //获取URL配置.使用所有的模版的公共变量作为函数参数,里面可以直接渲染所有模版变量. 8 | getUrlData({moduleName="HDFS",pageName='',type='',spaceName='',relativePath='',targetPath='',hostName='',componentName='',operator='',shareId=''}){ 9 | /* 10 | let str = 'return ' + '`Hello ${name}!`'; 11 | let func = new Function('name', str); 12 | func('Jack') 13 | */ 14 | return conf.getUrlData({ moduleName : moduleName, pageName : pageName, type : type, 15 | spaceName : spaceName, relativePath : relativePath, targetPath : targetPath, 16 | hostName : hostName, componentName : componentName, operator : operator, 17 | shareId : shareId 18 | }); 19 | }, 20 | //直接获取面包屑数据的接口 21 | getNavigationData({moduleName="K8sMonitor",pageName="",type="",spaceName=""}){ 22 | return conf.getNavigationData({ moduleName : moduleName, pageName : pageName, 23 | type : type, spaceName : spaceName}); 24 | }, 25 | } 26 | 27 | export default CalcManageConf; 28 | -------------------------------------------------------------------------------- /package/Aries/src/functions/Codis/CodisInfo/ObjectLog.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './index.less' 3 | 4 | const ObjectLog = React.createClass({ 5 | render: function () { 6 | return ( 7 |
8 | {this.props.log} 9 |
10 | ) 11 | } 12 | }) 13 | 14 | export default ObjectLog -------------------------------------------------------------------------------- /package/Aries/src/functions/Codis/CodisInfo/ObjectRow.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './index.less' 3 | 4 | const ObjectRow = React.createClass({ 5 | 6 | render: function(){ 7 | var server = this.props.serverlist.servers 8 | var doms = []; 9 | for (var i = 0; i < server.length; i++) { 10 | doms.push( 11 | 12 | {server[i].addr} 13 | {server[i].type} 14 | {server[i].used_mem} / {server[i].maxmemory} 15 | {server[i].key_info} 16 |
17 | 18 | ); 19 | } 20 | return ( 21 |
22 |
23 | group_{this.props.serverlist.id} 24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {doms} 38 | 39 |
Addr Type Mem Used Keys
40 |
41 |
42 | ) 43 | } 44 | }) 45 | 46 | export default ObjectRow -------------------------------------------------------------------------------- /package/Aries/src/functions/Codis/Conf/CodisConf.js: -------------------------------------------------------------------------------- 1 | import conf from 'public/Conf/Conf' 2 | const CodisConf={ 3 | //从location中获取cur_space 4 | getCurSpace(_this){ 5 | return conf.getCurSpace(_this); 6 | }, 7 | //直接获取面包屑数据的接口 8 | getNavigationData({moduleName="Codis",pageName="",type="",spaceName=""}){ 9 | return conf.getNavigationData({ moduleName : moduleName, pageName : pageName, 10 | type : type, spaceName : spaceName}); 11 | }, 12 | } 13 | 14 | export default CodisConf; 15 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Capacity/Manager.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import Slider from 'bfd-ui/lib/Slider' 5 | import xhr from 'bfd-ui/lib/xhr' 6 | import message from 'bfd-ui/lib/message' 7 | 8 | const TabManager = React.createClass({ 9 | handleSlid(value,spaceName){ 10 | console.log(`slid:${value}, spaceName:${spaceName}`); 11 | let upsetUrl = this.props.getUrlData({ type : "UPSET", 12 | spaceName : spaceName 13 | }); 14 | xhr({type: 'PUT',url: upsetUrl,data:{"capacity":value}, 15 | success: data => { 16 | message.success(data); 17 | //刷新配额管理 18 | this.props.refreshCapacity(); 19 | } 20 | }); 21 | }, 22 | render:function(){ 23 | let sliderData = this.props.sliderData.map((slider,i)=>{ 24 | return
25 |
26 | {slider.name}{this.handleSlid(value,slider.name)}} /> 28 |
29 |
30 | }); 31 | return
{sliderData}
32 | } 33 | }); 34 | 35 | export default TabManager 36 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Capacity/Monitor.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import Percentage from 'bfd-ui/lib/Percentage' 5 | 6 | const TabMonitor = React.createClass({ 7 | render: function() { 8 | let percentage = this.props.percentData.map((value,index)=>{ 9 | let percen = 0; 10 | try{ 11 | percen = value.used_capacity/value.total_capacity*100; 12 | percen = percen.toFixed(2); 13 | if(isNaN(percen)){ 14 | percen = 0; 15 | } 16 | }catch(err) 17 | { 18 | console.log(err); 19 | percen = 0; 20 | } 21 | console.log(`percen: ${percen}`); 22 | return
23 | 24 |
25 |
26 | }); 27 | return ( 28 |
29 | {percentage} 30 |
31 | ); 32 | } 33 | }); 34 | export default TabMonitor 35 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Capacity/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import { Tabs, TabList, Tab, TabPanel } from 'bfd-ui/lib/Tabs' 5 | import TabManager from './Manager' 6 | import TabMonitor from './Monitor' 7 | import Fetch from 'bfd-ui/lib/Fetch' 8 | import HdfsConf from '../Conf/HdfsConf' 9 | import NavigationInPage from 'public/NavigationInPage' 10 | import auth from 'public/auth' 11 | 12 | export default React.createClass({ 13 | sliderDataSccuess(data){ 14 | let percentData = data; 15 | let slider_data=data.map((d,index)=>{ 16 | return { 17 | "name":d.name, 18 | "value":d.total_capacity, 19 | "start":0, 20 | "end":d.plan_capacity, 21 | } 22 | }); 23 | this.setState({sliderData:slider_data,percentData:percentData}); 24 | }, 25 | getInitialState: function() { 26 | return { 27 | sliderData:[], 28 | percentData:[], 29 | random:0, 30 | }; 31 | }, 32 | refreshCapacity(){ 33 | //通过产生随机数的方式,刷新配额管理. 34 | let random = parseInt(Math.random()*100000); 35 | this.setState({random:random}); 36 | }, 37 | requestArgs:{ 38 | pageName:"Capacity", 39 | type:"", 40 | spaceName:"", 41 | }, 42 | getUrlData({type="",spaceName=""}){ 43 | this.requestArgs.type = type; 44 | this.requestArgs.spaceName = spaceName; 45 | return HdfsConf.getUrlData(this.requestArgs); 46 | }, 47 | render() { 48 | let spaceName = HdfsConf.getCurSpace(this); 49 | let sumUrl = this.getUrlData({ type : "SUM", 50 | }); 51 | return ( 52 |
53 | 54 |
55 | 56 | 57 | 配额监控 58 | {auth.user.is_supper == 1 ?[ 59 | 配额管理 60 | ]:null} 61 | 62 | 63 | {auth.user.is_supper == 1 ?[ 64 | 65 | ]:null} 66 | 67 |
68 |
69 | 70 | 71 |
72 |
73 | ) 74 | } 75 | }) 76 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Capacity/index.less: -------------------------------------------------------------------------------- 1 | .bottom{ 2 | margin-top: 10px; 3 | } 4 | 5 | .text-border { 6 | border: none; 7 | } 8 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Conf/HdfsConf.js: -------------------------------------------------------------------------------- 1 | import conf from 'public/Conf/Conf' 2 | const HdfsConf={ 3 | //从location中获取cur_space 4 | getCurSpace(_this){ 5 | return conf.getCurSpace(_this); 6 | }, 7 | //获取URL配置.使用所有的模版的公共变量作为函数参数,里面可以直接渲染所有模版变量. 8 | getUrlData({moduleName="HDFS",pageName='',type='',spaceName='',relativePath='',targetPath='',hostName='',componentName='',operator='',shareId=''}){ 9 | /* 10 | let str = 'return ' + '`Hello ${name}!`'; 11 | let func = new Function('name', str); 12 | func('Jack') 13 | */ 14 | return conf.getUrlData({ moduleName : moduleName, pageName : pageName, type : type, 15 | spaceName : spaceName, relativePath : relativePath, targetPath : targetPath, 16 | hostName : hostName, componentName : componentName, operator : operator, 17 | shareId : shareId 18 | }); 19 | }, 20 | //直接获取面包屑数据的接口 21 | getNavigationData({moduleName="HDFS",pageName="",type="",spaceName=""}){ 22 | return conf.getNavigationData({ moduleName : moduleName, pageName : pageName, 23 | type : type, spaceName : spaceName}); 24 | }, 25 | } 26 | 27 | export default HdfsConf; 28 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Myfile/Head.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import Upload from 'bfd-ui/lib/Upload' 5 | import xhr from 'bfd-ui/lib/xhr' 6 | import message from 'bfd-ui/lib/message' 7 | import Button from 'bfd/Button' 8 | 9 | const Head = React.createClass({ 10 | source_path:"", 11 | uploading:{ 12 | 0:function(){ 13 | let width_px = 400 * (this.state.uploadNumber/100.0); 14 | let percen = `${this.state.uploadNumber}%`; 15 | let progress_bar =
16 |
17 | 18 | {percen} 19 | 20 |
21 |
22 | return
{progress_bar}
23 | }, //上传中的状态 24 | 1:()=>{return null} 25 | }, 26 | handleComplete(data){ 27 | //上传完成处理 28 | this.setState({isUploading:1,uploadNumber:0}) 29 | message.success(data,2) 30 | let random = Math.floor(Math.random()*10000000000); 31 | this.props.updateRandom(random); 32 | }, 33 | handleUploading(data){ 34 | console.log(`process: ${data}`); 35 | if(Number(data)==100){ 36 | this.setState({isUploading:1,uploadNumber:0}); 37 | }else{ 38 | this.setState({isUploading:0,uploadNumber:data}); 39 | } 40 | }, 41 | changeAddess(path){ 42 | console.log(path); 43 | this.source_path = path; 44 | }, 45 | mkdir(){ 46 | this.props.addTableData(); 47 | }, 48 | getInitialState:function(){ 49 | return { 50 | uploadNumber:0, //当前上传百分比 51 | isUploading:1, //是否是上传中 52 | } 53 | }, 54 | render() { 55 | let uploadUrl = this.props.getUrlData({ type : "UPLOAD", 56 | relativePath : this.props.cur_path, 57 | spaceName : this.props.cur_space 58 | }); 59 | let props={ 60 | action:uploadUrl, 61 | multiple: false, 62 | onComplete: this.handleComplete, 63 | onUplading: this.handleUploading, 64 | showFileList: false, 65 | } 66 | 67 | return ( 68 |
69 |
70 | 71 |
72 |
73 | 74 |
75 | {this.uploading[this.state.isUploading].call(this)} 76 |
77 | ) 78 | } 79 | }) 80 | 81 | export default Head 82 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Myfile/Navigate.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | 5 | const Navigate = React.createClass({ 6 | skip(path){ 7 | this.props.updateSkipUrl(path); 8 | }, 9 | listManager:{ 10 | 0:function(){ 11 | return
12 | 全部文件 13 | 已全部加载, 共{this.props.num}个 14 |
15 | }, 16 | 1:function(){ 17 | var ret = []; 18 | var full_path =`${this.props.cur_path}`; 19 | var dirs = full_path.split("/").filter((item)=>{return item!=""}); 20 | var last_path = "/"+dirs.slice(0,dirs.length-1).join("/"); 21 | var head = 22 | {this.skip(last_path)}}>返回上一级 | 23 | {this.skip("/")}}>全部文件 > 24 | 25 | ret.push(head); 26 | var len = dirs.length; 27 | var cur_path=""; 28 | if(len>3){ 29 | ret.push( ... > ) 30 | } 31 | dirs.forEach((dir,i)=>{ 32 | cur_path = `${cur_path}/${dir}`; 33 | var cur_path1 = cur_path; 34 | if(len<=3){ 35 | if(i==(dirs.length-1)){ 36 | ret.push({dir} ) 37 | }else{ 38 | ret.push({this.skip(cur_path1)}} >{dir} > ) 39 | } 40 | }else{ 41 | if(i>(len-4)){ 42 | if(i==(dirs.length-1)){ 43 | ret.push({dir} ) 44 | }else{ 45 | ret.push({this.skip(cur_path1)}} >{dir} > ) 46 | } 47 | } 48 | } 49 | }); 50 | return
{ret} 已全部加载, 共{this.props.num}个
; 51 | } 52 | }, 53 | getInitialState: function() { 54 | return { 55 | is_first:0, 56 | }; 57 | }, 58 | render(){ 59 | return
60 | {this.listManager[this.props.is_first].call(this)} 61 |
62 | } 63 | }); 64 | 65 | export default Navigate; 66 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Myfile/index.less: -------------------------------------------------------------------------------- 1 | .hdfs-myfile{ 2 | a:hover{ 3 | cursor:pointer; 4 | } 5 | .upload-modal{ 6 | position: fixed; 7 | top: 0; 8 | right: 0; 9 | bottom: -1px; 10 | left: 0; 11 | opacity: .5; 12 | z-index: 1040; 13 | background-color: #000; 14 | .bfd-spinner{ 15 | position: absolute; 16 | top: 45%; 17 | right: 50%; 18 | } 19 | .progress-bar{ 20 | z-index: 1041; 21 | position: absolute; 22 | top: 40%; 23 | left: 40%; 24 | .progress{ 25 | height: 20px; 26 | background: #ebebeb; 27 | border-radius: 10px; 28 | width: 400px; 29 | > span { 30 | margin: 0px; 31 | height: 20px; 32 | min-width: 0px; 33 | float: left; 34 | text-align: right; 35 | border: 1px solid; 36 | border-color: #bfbfbf #b3b3b3 #9e9e9e; 37 | color: #000; 38 | } 39 | .green{ 40 | background: #42a5f6; 41 | border-color: #78b337 #6ba031; 42 | border-radius: 10px; 43 | } 44 | 45 | } 46 | 47 | } 48 | } 49 | .head{ 50 | .table-div{ 51 | display: inline; 52 | margin-right: 20px; 53 | } 54 | span{ 55 | margin:20px; 56 | } 57 | .tree-div{ 58 | border-bottom: 1px solid #eff3f8; 59 | padding: 10px; 60 | height: 250px; 61 | overflow: scroll; 62 | } 63 | .btn-div{ 64 | margin-top:10px; 65 | } 66 | .filelist{ 67 | display: none; 68 | } 69 | } 70 | 71 | .navigate{ 72 | .div-margin{ 73 | margin-top:10px; 74 | } 75 | .list-tips{ 76 | position: absolute; 77 | right: 20px; 78 | top: 100; 79 | } 80 | } 81 | 82 | .mytable{ 83 | .default-link{ 84 | color: #666666; 85 | text-decoration:none; 86 | } 87 | .a-link{ 88 | color: #42a5f5; 89 | 90 | } 91 | .table-div{ 92 | display: inline; 93 | span{ 94 | i{ 95 | font-size: 1.2em; // 文件 or 文件夹 图标 96 | } 97 | } 98 | } 99 | .table-div-icon{ 100 | display: inline; 101 | width: 250px; 102 | a{ 103 | color: #999; 104 | i{ 105 | font-size: 1.3em; // 操作图标 106 | } 107 | } 108 | a:hover{ 109 | color: #06c; 110 | } 111 | } 112 | .tree-div{ 113 | border-bottom: 1px solid #eff3f8; 114 | padding: 10px; 115 | height: 250px; 116 | overflow: scroll; 117 | } 118 | .div-margin{ 119 | margin-top:10px; 120 | } 121 | .div-float{ 122 | float: right; 123 | } 124 | 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Service/Head.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | 5 | const Head = React.createClass({ 6 | statusFilter(status){ 7 | this.props.statusFilter(status); 8 | }, 9 | render:function(){ 10 | return
11 |
{this.statusFilter("healthy")}}>
健康
12 |
{this.statusFilter("except")}}>
异常
13 |
{this.statusFilter("select")}}>
当前
14 |
{this.statusFilter("all")}}>
全部
15 |
16 | } 17 | }); 18 | 19 | export default Head; 20 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Service/Monitor.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import Percentage from 'bfd-ui/lib/Percentage' 5 | 6 | const TabMonitor = React.createClass({ 7 | render: function() { 8 | return ( 9 |
10 |
11 | 12 |
13 |
14 |
15 | ); 16 | } 17 | }); 18 | export default TabMonitor 19 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Service/Top.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import TextOverflow from 'bfd-ui/lib/TextOverflow' 5 | 6 | const Top = React.createClass({ 7 | switchContainer(hostname){ 8 | this.props.updateData(hostname); 9 | }, 10 | container:{ 11 | healthy:function(hostname){return
{this.switchContainer(hostname)}} className="container healthy"> 12 |

{hostname}

13 |
}, 14 | except:function(hostname){return
{this.switchContainer(hostname)}} className="container except"> 15 |

{hostname}

16 |
}, 17 | select:function(hostname){return
{this.switchContainer(hostname)}} className="container select"> 18 |

{hostname}

19 |
} 20 | }, 21 | render:function(){ 22 | let selectHost = this.props.selectHost; 23 | let containers = this.props.data.map((container)=>{ 24 | //遍历的时候处理是否选中 25 | console.log(container.hostname+"----"+this.props.selectHost); 26 | if(container.hostname == this.props.selectHost){ 27 | return this.container["select"].call(this,container.hostname); 28 | }else{ 29 | return this.container[container.status].call(this,container.hostname); 30 | } 31 | }); 32 | return
33 |
34 | {containers} 35 |
36 |
37 | } 38 | }); 39 | 40 | export default Top; 41 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Service/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Task from 'public/Task' 3 | import './index.less' 4 | import { Tabs, TabList, Tab, TabPanel } from 'bfd-ui/lib/Tabs' 5 | import TabManager from './Manager' 6 | import TabMonitor from './Monitor' 7 | import HdfsConf from '../Conf/HdfsConf' 8 | import NavigationInPage from 'public/NavigationInPage' 9 | 10 | export default React.createClass({ 11 | requestArgs:{ 12 | pageName:"Service", 13 | type:"", 14 | hostName:"", 15 | componentName:"", 16 | operator:"", 17 | }, 18 | getUrlData({type="",hostName="",componentName="",operator=""}){ 19 | //直接设置 20 | this.requestArgs.type = type; 21 | this.requestArgs.hostName = hostName; 22 | this.requestArgs.componentName = componentName; 23 | this.requestArgs.operator = operator; 24 | return HdfsConf.getUrlData(this.requestArgs); 25 | }, 26 | render() { 27 | let spaceName = HdfsConf.getCurSpace(this); 28 | return ( 29 |
30 | 32 |
33 | 34 | 35 | 服务监控 36 | 服务管理 37 | 38 | 39 | 40 | 41 |
42 |
43 | ) 44 | } 45 | }) 46 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Share/index.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/functions/HDFS/Share/index.less -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/ShareCenter/index.less: -------------------------------------------------------------------------------- 1 | .function-trash-list-tips { 2 | position: absolute; 3 | right: 20px; 4 | top: 100; 5 | } 6 | 7 | .function-trash-table-div{ 8 | display: inline; 9 | } 10 | 11 | .function-trash-table-div-float{ 12 | position: relative;; 13 | left: 500px; 14 | } 15 | 16 | .function-trash-myfile_margin{ 17 | margin-left: 300px; 18 | margin-right: 10px; 19 | } 20 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/ShowShare/index.less: -------------------------------------------------------------------------------- 1 | .hdfs-myfile{ 2 | a:hover{ 3 | cursor:pointer; 4 | } 5 | 6 | .head{ 7 | .table-div{ 8 | display: inline; 9 | margin-right: 20px; 10 | } 11 | span{ 12 | margin:20px; 13 | } 14 | .tree-div{ 15 | border-bottom: 1px solid #eff3f8; 16 | padding: 10px; 17 | height: 250px; 18 | overflow: scroll; 19 | } 20 | .btn-div{ 21 | margin-top:10px; 22 | } 23 | } 24 | 25 | .navigate{ 26 | .div-margin{ 27 | margin-top:10px; 28 | } 29 | .list-tips{ 30 | position: absolute; 31 | right: 20px; 32 | top: 100; 33 | } 34 | } 35 | 36 | .mytable{ 37 | .table-div{ 38 | display: inline; 39 | } 40 | .table-div-icon{ 41 | display: inline; 42 | width: 250px; 43 | } 44 | .tree-div{ 45 | border-bottom: 1px solid #eff3f8; 46 | padding: 10px; 47 | height: 250px; 48 | overflow: scroll; 49 | } 50 | .div-margin{ 51 | margin-top:10px; 52 | } 53 | .div-float{ 54 | float: right; 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Tool/hdfsTool.js: -------------------------------------------------------------------------------- 1 | import xhr from 'bfd-ui/lib/xhr' 2 | 3 | const hdfsTool = { 4 | /** 5 | xhr 代理. 6 | **/ 7 | xhrProxy(type,url,dataParam,_callback,_beforeSend,_afterSend){ 8 | //请求前回调 9 | _beforeSend(); 10 | xhr({ 11 | type: type, 12 | url:url, 13 | data:dataParam, 14 | success:data => { 15 | //成功的回调 16 | _callback(data); 17 | }, 18 | complete:data =>{ 19 | //完成后回调 20 | _afterSend(); 21 | 22 | } 23 | }) 24 | }, 25 | } 26 | 27 | export default hdfsTool; 28 | -------------------------------------------------------------------------------- /package/Aries/src/functions/HDFS/Trash/index.less: -------------------------------------------------------------------------------- 1 | .hdfs-myfile{ 2 | a:hover{ 3 | cursor:pointer; 4 | } 5 | 6 | .head{ 7 | .table-div{ 8 | display: inline; 9 | margin-right: 20px; 10 | } 11 | span{ 12 | margin:20px; 13 | } 14 | .tree-div{ 15 | border-bottom: 1px solid #eff3f8; 16 | padding: 10px; 17 | height: 250px; 18 | overflow: scroll; 19 | } 20 | .btn-div{ 21 | margin-top:10px; 22 | } 23 | } 24 | 25 | .navigate{ 26 | .div-margin{ 27 | margin-top:10px; 28 | } 29 | .list-tips{ 30 | position: absolute; 31 | right: 20px; 32 | top: 100; 33 | } 34 | } 35 | 36 | .mytable{ 37 | .table-div{ 38 | display: inline; 39 | } 40 | .table-div-icon{ 41 | display: inline; 42 | width: 250px; 43 | } 44 | .tree-div{ 45 | border-bottom: 1px solid #eff3f8; 46 | padding: 10px; 47 | height: 250px; 48 | overflow: scroll; 49 | } 50 | .div-margin{ 51 | margin-top:10px; 52 | } 53 | .div-float{ 54 | float: right; 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /package/Aries/src/functions/Login/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/functions/Login/bg.jpg -------------------------------------------------------------------------------- /package/Aries/src/functions/Login/index.less: -------------------------------------------------------------------------------- 1 | .login { 2 | background-color: #333; 3 | min-height: 100%; 4 | background: #333 url(./bg.jpg) no-repeat; 5 | background-size: cover; 6 | position: relative; 7 | .body { 8 | position: relative; 9 | padding-bottom: 90px; 10 | min-height: 500px; 11 | .bfd-form { 12 | position: absolute; 13 | left: 50%; 14 | top: 50%; 15 | transform: translate(-50%, -50%); 16 | padding: 20px; 17 | width: 360px; 18 | border-radius: 2px; 19 | box-shadow: 1px 1px 3px rgba(0, 0, 0, .2); 20 | background-color: #fff; 21 | .logo { 22 | position: absolute; 23 | left: 50%; 24 | top: -120px; 25 | transform: translate(-50%, 0); 26 | text-align: center; 27 | white-space: nowrap; 28 | color: #fff; 29 | } 30 | .bfd-form-input { 31 | display: block; 32 | margin-right: 0; 33 | } 34 | button { 35 | width: 100%; 36 | } 37 | } 38 | } 39 | .footer { 40 | height: 50px; 41 | padding: 10px 50px; 42 | position: absolute; 43 | width: 100%; 44 | bottom: 0; 45 | background: #333; 46 | .logo { 47 | width: 160px; 48 | height: 100%; 49 | background: url('~public/bfd.png') no-repeat center bottom; 50 | text-decoration: none; 51 | } 52 | .pull-right { 53 | text-align: right; 54 | position: absolute; 55 | bottom: 10px; 56 | right: 0; 57 | .links { 58 | color: #fff; 59 | //margin-bottom: 5px; 60 | } 61 | .copyright { 62 | color: #fff; 63 | } 64 | } 65 | a { 66 | color: #fff; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /package/Aries/src/functions/NotFound/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default React.createClass({ 4 | render() { 5 | return ( 6 |
7 |

您访问的页面不存在

8 |
9 | ) 10 | } 11 | }) -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/Conf/Openstackconf.js: -------------------------------------------------------------------------------- 1 | import conf from 'public/Conf/Conf' 2 | const Openstackconf = { 3 | //从location中获取cur_space 4 | getCurSpace(_this) { 5 | return conf.getCurSpace(_this); 6 | }, 7 | //直接获取面包屑数据的接口 8 | getNavigationData({ 9 | moduleName = "Instances", 10 | pageName = "", 11 | type = "", 12 | spaceName = "" 13 | }) { 14 | return conf.getNavigationData({ 15 | moduleName: moduleName, 16 | pageName: pageName, 17 | type: type, 18 | spaceName: spaceName 19 | }); 20 | }, 21 | getNavigationDatav({ 22 | moduleName = "Volumes", 23 | pageName = "", 24 | type = "", 25 | spaceName = "" 26 | }) { 27 | return conf.getNavigationData({ 28 | moduleName: moduleName, 29 | pageName: pageName, 30 | type: type, 31 | spaceName: spaceName 32 | }); 33 | }, 34 | getNavigationDatap({ 35 | moduleName = "Project", 36 | pageName = "", 37 | type = "", 38 | spaceName = "" 39 | }) { 40 | return conf.getNavigationData({ 41 | moduleName: moduleName, 42 | pageName: pageName, 43 | type: type, 44 | spaceName: spaceName 45 | }); 46 | }, 47 | } 48 | 49 | export default Openstackconf; -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/flavors/index.less: -------------------------------------------------------------------------------- 1 | .function-data-moduleA { 2 | } 3 | 4 | .test_test1 { 5 | float: left; 6 | } 7 | 8 | .test_test { 9 | float: right; 10 | } 11 | 12 | .host_operation { 13 | min-width: 140px !important; 14 | } 15 | 16 | .dropdown-menu { 17 | min-width: 100px !important; 18 | width: 140px; 19 | } 20 | 21 | .ant-btn { 22 | border-radius: 3px; 23 | padding: 5px 15px; 24 | } 25 | 26 | .DataTableFatherDiv_flavors { 27 | padding-top: 13px; 28 | padding-left: 20px; 29 | padding-right: 6px; 30 | border: 1px solid rgba(100, 100, 100, 0.2); 31 | margin-top: 5px; 32 | } 33 | 34 | .DataTableFatherDiv_flavors table { 35 | th, td { 36 | font-family: '微软雅黑'; 37 | font-size: 12px; 38 | color: #666666; 39 | } 40 | thead { 41 | tr { 42 | display: block; 43 | width: 100%; 44 | th { 45 | width: 20%; 46 | display: inline-block; 47 | border-bottom: 3px solid #DDEEFD; 48 | } 49 | } 50 | 51 | } 52 | tbody { 53 | display: block; 54 | width: 100%; 55 | overflow-x: hidden; 56 | overflow-y: auto; 57 | height: 400px; 58 | tr { 59 | display: block; 60 | width: 100%; 61 | border-bottom: 1px solid #EFF3F8; 62 | td { 63 | width: 20%; 64 | display: inline-block; 65 | border-top: 0px; 66 | } 67 | } 68 | 69 | } 70 | } -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/images/index.less: -------------------------------------------------------------------------------- 1 | .function-data-moduleA { 2 | } 3 | 4 | .test_test1 { 5 | float: left; 6 | } 7 | 8 | .test_test { 9 | float: right; 10 | } 11 | 12 | .host_operation { 13 | min-width: 140px !important; 14 | } 15 | 16 | .dropdown-menu { 17 | min-width: 100px !important; 18 | width: 140px; 19 | } 20 | 21 | .ant-btn { 22 | border-radius: 3px; 23 | padding: 5px 15px; 24 | } 25 | 26 | .DataTableFatherDiv_images { 27 | padding-top: 13px; 28 | padding-left: 20px; 29 | padding-right: 6px; 30 | border: 1px solid rgba(100, 100, 100, 0.2); 31 | margin-top: 5px; 32 | } 33 | 34 | .DataTableFatherDiv_images table { 35 | th, td { 36 | font-family: '微软雅黑'; 37 | font-size: 12px; 38 | color: #666666; 39 | } 40 | thead { 41 | tr { 42 | display: block; 43 | width: 100%; 44 | th { 45 | width: 16.6%; 46 | display: inline-block; 47 | border-bottom: 3px solid #DDEEFD; 48 | } 49 | } 50 | 51 | } 52 | tbody { 53 | display: block; 54 | width: 100%; 55 | overflow-x: hidden; 56 | overflow-y: auto; 57 | height: 400px; 58 | tr { 59 | display: block; 60 | width: 100%; 61 | border-bottom: 1px solid #EFF3F8; 62 | td { 63 | width: 16.6%; 64 | display: inline-block; 65 | border-top: 0px; 66 | } 67 | } 68 | 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/instances/extend.less: -------------------------------------------------------------------------------- 1 | .left_host { 2 | margin-top: 10px !important; 3 | } 4 | 5 | .left_type { 6 | text-align: right; 7 | padding-right: 11px; 8 | height: 30px; 9 | line-height: 30px 10 | } 11 | 12 | .left_hostname div { 13 | width: 160px; 14 | } 15 | 16 | .antd_class button{ 17 | /* border-radius: 3px !important; 18 | padding: 5px 10px !important;*/ 19 | background-color: #42a5f5 !important; 20 | border-color:#42a5f5 !important; 21 | } 22 | 23 | .left_cpu { 24 | height: 30px; 25 | line-height: 30px 26 | } 27 | 28 | .disk_left { 29 | height: 24px; 30 | line-height: 36px; 31 | } 32 | 33 | .disk_left i { 34 | cursor: pointer; 35 | font-size: 14px; 36 | } 37 | 38 | .disk_span { 39 | color: red; 40 | font-size: 18px; 41 | font-weight: bold; 42 | } 43 | 44 | .disk_create div { 45 | width: inherit !important; 46 | margin-left: 0px !important; 47 | } 48 | 49 | .disk_create { 50 | font-size: 14px !important; 51 | } 52 | 53 | .disk_create div span { 54 | height: 30px; 55 | line-height: 33px; 56 | font-size: 5px; 57 | } 58 | 59 | .right_host { 60 | float: right; 61 | width: 203px; 62 | background-color: #ffffff; 63 | color: #000000; 64 | } 65 | 66 | .right_host h4 { 67 | 68 | } 69 | 70 | .border_right { 71 | border-bottom: 2px solid #E8E8E8; 72 | } 73 | 74 | .create_host { 75 | 76 | } 77 | 78 | .bfd-modal__modal-dialog { 79 | width: 800px; 80 | } 81 | 82 | .bfd-search_input input { 83 | width: 145px; 84 | height: 30px; 85 | } 86 | 87 | .type_property { 88 | position: absolute; 89 | right: 233px; 90 | width: 100px; 91 | } -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/instances/index.less: -------------------------------------------------------------------------------- 1 | .function-data-moduleA { 2 | } 3 | 4 | .test_test1 { 5 | float: left; 6 | } 7 | 8 | .test_test { 9 | float: right; 10 | } 11 | 12 | .create_host { 13 | margin: 81px 0px 0px 0px; 14 | } 15 | 16 | .host_operation { 17 | min-width: 140px !important; 18 | } 19 | 20 | .dropdown-menu { 21 | min-width: 100px !important; 22 | width: 140px; 23 | } 24 | 25 | .class_extend { 26 | right: 20px; 27 | position: absolute; 28 | top: 37px; 29 | } 30 | 31 | .class_extend input { 32 | width: 170px !important; 33 | } 34 | 35 | .class_extend button { 36 | height: 30px !important; 37 | } 38 | 39 | .ant-btn { 40 | border-radius: 1px !important; 41 | padding: 5px 7px !important; 42 | } 43 | 44 | fieldset.test { 45 | padding: 10px; 46 | margin: 10px; 47 | width: 270px; 48 | color: #333; 49 | border: #06c solid 1px; 50 | } 51 | 52 | legend { 53 | color: #06c; 54 | padding: 5px 10px; 55 | font-weight: 800; 56 | border-bottom: 0px solid #d9d9d9; 57 | } 58 | 59 | .select_disk { 60 | padding-left: 283px; 61 | float: left; 62 | padding-top: 5px 63 | } 64 | 65 | .DataTableFatherDiv_instances { 66 | padding-top: 13px; 67 | padding-left: 20px; 68 | padding-right: 6px; 69 | border: 1px solid rgba(100, 100, 100, 0.2); 70 | margin-top: 5px; 71 | } 72 | 73 | .DataTableFatherDiv_instances table { 74 | thead tr th, tbody tr td { 75 | width: 14.2%; 76 | } 77 | } 78 | 79 | .DataTableFatherDiv_instances table { 80 | th, td { 81 | font-family: '微软雅黑'; 82 | font-size: 12px; 83 | color: #666666; 84 | } 85 | thead { 86 | tr { 87 | display: block; 88 | width: 100%; 89 | th { 90 | display: inline-block; 91 | border-bottom: 3px solid #DDEEFD; 92 | } 93 | } 94 | 95 | } 96 | tbody { 97 | display: block; 98 | width: 100%; 99 | overflow-x: hidden; 100 | overflow-y: auto; 101 | height: 200px; 102 | tr { 103 | display: block; 104 | width: 100%; 105 | border-bottom: 1px solid #EFF3F8; 106 | td { 107 | display: inline-block; 108 | border-top: 0px; 109 | } 110 | } 111 | 112 | } 113 | } 114 | 115 | .create_host button{ 116 | margin-left: 100px; 117 | } 118 | 119 | .openstack_button_s { 120 | margin-top: 10px; 121 | } 122 | 123 | .openstack_button_s button{ 124 | margin: 0px 0px 0px 100px; 125 | width: 70px; 126 | font-size: 14px; 127 | } 128 | 129 | .openstack_button_si{ 130 | margin-top: 80px; 131 | } 132 | .openstack_button_si button{ 133 | margin: 0px 0px 0px 100px; 134 | width: 70px; 135 | font-size: 14px; 136 | } 137 | 138 | .openstack_button_c { 139 | margin: 0px 0px 0px 100px; 140 | } -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/project/index.less: -------------------------------------------------------------------------------- 1 | .DataTableFatherDiv_project { 2 | padding-top: 13px; 3 | padding-left: 20px; 4 | padding-right: 6px; 5 | border: 1px solid rgba(100, 100, 100, 0.2); 6 | margin-top: 5px; 7 | } 8 | 9 | /* 10 | .DataTableFatherDiv_project table { 11 | thead tr th,tbody tr td { 12 | width: 25%; 13 | } 14 | } 15 | .DataTableFatherDiv_project table { 16 | th,td{ 17 | font-size: 12px; 18 | color:#666666; 19 | } 20 | thead{ 21 | tr{ 22 | display: block; 23 | width: 100%; 24 | th{ 25 | display: inline-block; 26 | border-bottom: 3px solid #DDEEFD; 27 | } 28 | } 29 | 30 | } 31 | tbody { 32 | display: block; 33 | width: 100%; 34 | overflow-x: hidden; 35 | overflow-y: auto; 36 | height: 30px; 37 | tr{ 38 | display: block; 39 | width: 100%; 40 | border-bottom: 1px solid #EFF3F8; 41 | td{ 42 | display: inline-block; 43 | border-top: 0px; 44 | } 45 | } 46 | 47 | } 48 | }*/ -------------------------------------------------------------------------------- /package/Aries/src/functions/Openstack/volumes/index.less: -------------------------------------------------------------------------------- 1 | .function-data-moduleA { 2 | } 3 | 4 | .test_test1 { 5 | float: left; 6 | } 7 | 8 | .test_test { 9 | float: right; 10 | } 11 | 12 | .ant-btn { 13 | border-radius: 1px !important; 14 | padding: 5px 7px !important; 15 | } 16 | 17 | .DataTableFatherDiv_t { 18 | padding-top: 13px; 19 | padding-left: 20px; 20 | padding-right: 20px; 21 | border: 1px solid rgba(100, 100, 100, 0.2); 22 | } 23 | 24 | .DataTableFatherDiv_t table { 25 | thead tr th, tbody tr td { 26 | width: 11.1111%; 27 | } 28 | } 29 | 30 | .DataTableFatherDiv_t table { 31 | th, td { 32 | font-family: '微软雅黑'; 33 | font-size: 12px; 34 | color: #666666; 35 | } 36 | thead { 37 | tr { 38 | display: block; 39 | width: 100%; 40 | 41 | th { 42 | display: inline-block; 43 | border-bottom: 3px solid #DDEEFD; 44 | padding-right: 20px 45 | } 46 | } 47 | 48 | } 49 | tbody { 50 | display: block; 51 | width: 100%; 52 | overflow-x: hidden; 53 | overflow-y: auto; 54 | height: 400px; 55 | tr { 56 | display: block; 57 | width: 100%; 58 | border-bottom: 1px solid #EFF3F8; 59 | td { 60 | display: inline-block; 61 | border-top: 0px; 62 | } 63 | } 64 | 65 | } 66 | } 67 | 68 | .DataTableFatherDiv_backup { 69 | padding-top: 13px; 70 | padding-left: 20px; 71 | padding-right: 6px; 72 | border: 1px solid rgba(100, 100, 100, 0.2); 73 | margin-top: 5px; 74 | } 75 | 76 | .DataTableFatherDiv_backup table { 77 | thead tr th, tbody tr td { 78 | width: 16.6666%; 79 | } 80 | } 81 | 82 | .DataTableFatherDiv_backup table { 83 | th, td { 84 | font-family: '微软雅黑'; 85 | font-size: 12px; 86 | color: #666666; 87 | } 88 | thead { 89 | tr { 90 | display: block; 91 | width: 100%; 92 | th { 93 | display: inline-block; 94 | border-bottom: 3px solid #DDEEFD; 95 | } 96 | } 97 | 98 | } 99 | tbody { 100 | display: block; 101 | /*width: 100%;*/ 102 | overflow-x: hidden; 103 | overflow-y: auto; 104 | height: 80px; 105 | tr { 106 | display: block; 107 | width: 100%; 108 | border-bottom: 1px solid #EFF3F8; 109 | td { 110 | display: inline-block; 111 | border-top: 0px; 112 | } 113 | } 114 | 115 | } 116 | } 117 | 118 | .bfd-modal__modal-dialog { 119 | width: 800px !important; 120 | } 121 | 122 | 123 | .antd_class button{ 124 | /* border-radius: 3px !important; 125 | padding: 5px 10px !important;*/ 126 | background-color: #42a5f5 !important; 127 | border-color:#42a5f5 !important; 128 | } 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /package/Aries/src/functions/Overview/index.less: -------------------------------------------------------------------------------- 1 | .overview { 2 | div.container-div{ 3 | width: 185px; 4 | height: 165px; 5 | float: left; 6 | position: relative; 7 | min-height: 1px; 8 | margin: 0 auto; 9 | margin-right: 10px; 10 | margin-bottom: 10px; 11 | border: 1px solid #ddd; 12 | &:hover{ 13 | cursor: move; 14 | .container-body{ 15 | display: none; 16 | } 17 | .diagram-div{ 18 | display: none; 19 | } 20 | .chart-hover{ 21 | display: block; 22 | //z-index: 100; 23 | } 24 | } 25 | .diagram-div{ 26 | width: 185px; 27 | height: 130px; 28 | } 29 | 30 | .container-head{ 31 | padding: 8px 5px 5px 5px; 32 | font-weight: bold; 33 | text-align: left; 34 | color: #000; 35 | font-size: 15px; 36 | } 37 | 38 | .container-body{ 39 | font-size: 35px; 40 | text-align: center; 41 | color: #5ab400; 42 | font-weight: bold; 43 | padding-top: 30px; 44 | } 45 | 46 | .chart-hover{ 47 | /* 48 | position: absolute; 49 | top: 0; 50 | left:0; 51 | right: 0; 52 | bottom: 0; 53 | opacity: 0; 54 | transition: 0.1s all ease-in-out; 55 | */ 56 | background-color: #fff; 57 | display: none; 58 | width: 100%; 59 | padding: 8px 5px 5px 5px; 60 | font-weight: bold; 61 | text-align: center;; 62 | color: #000; 63 | font-size: 15px; 64 | transition: 0.1s all ease-in-out; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /package/Aries/src/functions/UserAuth/Conf/UserAuthConf.js: -------------------------------------------------------------------------------- 1 | import conf from 'public/Conf/Conf' 2 | const UserAuthConf = { 3 | //从location中获取cur_space 4 | getCurSpace(_this){ 5 | return conf.getCurSpace(_this); 6 | }, 7 | //获取URL配置 8 | getUrlData({moduleName="UserAuth",pageName="",type="",spaceName="",spaceId=""}){ 9 | return conf.getUrlData({ moduleName : moduleName, pageName : pageName, type : type, 10 | spaceName : spaceName, spaceId : spaceId 11 | }); 12 | }, 13 | //直接获取面包屑数据的接口使用hdfs里面的即可 14 | getNavigationData({moduleName="UserAuth",pageName="",type="",spaceName=""}){ 15 | return conf.getNavigationData({ moduleName : moduleName, pageName : pageName, 16 | type : type, spaceName : spaceName}); 17 | } 18 | } 19 | 20 | export default UserAuthConf; 21 | -------------------------------------------------------------------------------- /package/Aries/src/functions/UserAuth/SpaceList/index.less: -------------------------------------------------------------------------------- 1 | .bottom{ 2 | margin-top: 10px; 3 | } 4 | .spaceManager{ 5 | .modelDiv{ 6 | height: 300px; 7 | border-bottom: 1px solid #D4D4D4; 8 | } 9 | .Button-Div{ 10 | margin-top: 10px; 11 | .left-Button{ 12 | margin-right: 20%; 13 | margin-left: 25%; 14 | } 15 | } 16 | .add-Button{ 17 | margin-top: 10px; 18 | position: relative; 19 | left: 85%; 20 | display: inline-block; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /package/Aries/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 整个应用的入口,所有资源的根源 3 | */ 4 | 5 | import xhr from 'bfd/xhr' 6 | import message from 'bfd/message' 7 | import auth from 'public/auth' 8 | import router from './router' 9 | import env from './env' 10 | import pace from './pace' 11 | import './pace.less' 12 | 13 | pace.start() 14 | 15 | /** 16 | * cookie升级 17 | */ 18 | function getCookie(name) { 19 | var cookieValue = null; 20 | if (document.cookie && document.cookie !== '') { 21 | var cookies = document.cookie.split(';'); 22 | for (var i = 0; i < cookies.length; i++) { 23 | var cookie = cookies[i].trim(); 24 | // Does this cookie string begin with the name we want? 25 | if (cookie.substring(0, name.length + 1) === (name + '=')) { 26 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 27 | break; 28 | } 29 | } 30 | } 31 | return cookieValue; 32 | } 33 | 34 | /** 35 | * AJAX 全局配置,比如请求失败、会话过期的全局处理。参考 bfd-ui AJAX 请求组件 36 | */ 37 | //xhr.baseUrl = env.baseUrl + '/' 38 | xhr.baseUrl = env.baseUrl 39 | xhr.header = { 40 | "X-CSRFToken": getCookie('csrftoken') 41 | } 42 | //xhr.baseUrl = 'http://172.24.3.64:10086/v1' 43 | xhr.success = (res, option) => { 44 | console.log(res); 45 | if (typeof res !== 'object' ) { 46 | try{ 47 | res = JSON.parse(res); 48 | }catch(err){ 49 | console.log(err); 50 | message.danger(option.url + ': response data should be JSON') 51 | return 52 | } 53 | } 54 | switch (res.code) { 55 | case 200: 56 | option.success && option.success(res.data) 57 | break 58 | case 401: 59 | auth.destroy() 60 | router.history.replaceState({ 61 | referrer: router.state.location.pathname 62 | }, '/login') 63 | break 64 | default: 65 | message.danger(res.data || 'unknown error') 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /package/Aries/src/pace.less: -------------------------------------------------------------------------------- 1 | .pace { 2 | -webkit-pointer-events: none; 3 | pointer-events: none; 4 | 5 | -webkit-user-select: none; 6 | -moz-user-select: none; 7 | user-select: none; 8 | } 9 | 10 | .pace-inactive { 11 | display: none; 12 | } 13 | 14 | .pace .pace-progress { 15 | background: #ececec; 16 | position: fixed; 17 | z-index: 2000; 18 | top: 0; 19 | right: 100%; 20 | width: 100%; 21 | height: 2px; 22 | } -------------------------------------------------------------------------------- /package/Aries/src/public/DynamicTable/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Toolkit from 'public/Toolkit/index.js' 3 | import './index.less' 4 | 5 | 6 | var DynamicTableLine = React.createClass({ 7 | render: function (){ 8 | let restTdNumber = this.props.maxTdNumberInOneline - this.props.oneLineKeys.length 9 | if (restTdNumber < 0){ 10 | restTdNumber = 0 11 | } 12 | for (let i = 0 ; i < restTdNumber ; i ++){ 13 | this.props.oneLineKeys.push( '' ) 14 | } 15 | return( 16 | 17 | {this.props.oneLineKeys.map( (lineText) => { 18 | // 首先计算空格的个数 19 | let spaceNumber = 0 20 | for ( let i = 0 ; i < lineText.length ; i ++ ){ 21 | if (lineText[i] !== ' ') 22 | break 23 | spaceNumber += 1 24 | } 25 | 26 | // 然后根据每个空格向右偏移 15px ,即可渲染出来较为方便查看的显示 27 | return ( 28 | 29 |
30 | {lineText} 31 |
32 | 33 | ) 34 | })} 35 | 36 | ) 37 | } 38 | }) 39 | 40 | 41 | /** 42 | * 动态生成table 43 | * 如: 44 | * dynamicTableTextArray = [ 45 | * [1,2,3], 46 | * [4,5], 47 | * [6] 48 | * ] 49 | * 它将生成以下节点: 50 | * 51 | * 52 | * 53 | * 54 | * 55 | * 56 | * 57 | * 58 | * 59 | * 60 | * 61 | * 62 | * 63 | * 64 | * 65 | * 66 | * 67 | * 68 | *
123
45
6
69 | * 注意,它会保证每行的td个数相同,没有提供数据的会以 填充 70 | * 71 | * */ 72 | var DynamicTable = React.createClass({ 73 | render:function (){ 74 | let maxTdNumberInOneline = 0 75 | for (let i = 0 ; i < this.props.dynamicTableTextArray.length ; i ++){ 76 | let l = this.props.dynamicTableTextArray[i].length 77 | if (maxTdNumberInOneline < l){ 78 | maxTdNumberInOneline = l 79 | } 80 | } 81 | 82 | let styleDict = {} 83 | this.props.dynamicTableHeight && (styleDict['height'] = this.props.dynamicTableHeight+'px') 84 | 85 | return ( 86 |
87 | 88 | 89 | {this.props.dynamicTableTextArray.map((keysInOneLine) => { 90 | return 93 | })} 94 | 95 |
96 |
97 | ) 98 | } 99 | }) 100 | 101 | export default DynamicTable 102 | 103 | -------------------------------------------------------------------------------- /package/Aries/src/public/DynamicTable/index.less: -------------------------------------------------------------------------------- 1 | 2 | div.DynamicTableClass > table tr td{ 3 | font-size: 12; 4 | color:#666666; 5 | 6 | padding-right: 40px; 7 | padding-top: 0px; 8 | padding-bottom: 4px; 9 | } -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/Graph.js: -------------------------------------------------------------------------------- 1 | var vis = require('vis'); 2 | var React = require('react'); 3 | var uuid = require('uuid'); 4 | import './Graph.less'; 5 | 6 | var Graph = React.createClass({ 7 | getDefaultProps: function() { 8 | return { 9 | graph: {}, 10 | identifier: uuid.v4(), 11 | style: { 12 | width: "100%", 13 | 14 | } 15 | }; 16 | }, 17 | 18 | render: function() { 19 | return React.createElement("div", { 20 | onDoubleClick: this.changeMode, 21 | id: this.props.identifier, 22 | style: this.props.style 23 | }, this.props.identifier); 24 | }, 25 | 26 | changeMode: function() { 27 | this.updateGraph() 28 | }, 29 | 30 | componentDidMount: function() { 31 | this.updateGraph(); 32 | }, 33 | 34 | componentDidUpdate: function() { 35 | this.updateGraph(); 36 | }, 37 | 38 | updateGraph: function() { 39 | // Container 40 | var container = document.getElementById(this.props.identifier); 41 | 42 | // Options 43 | var options = { 44 | nodes: { 45 | shape: 'dot', 46 | scaling: { 47 | min: 10, 48 | max: 30 49 | }, 50 | font: { 51 | size: 30, 52 | face: 'Tahoma' 53 | } 54 | }, 55 | edges: { 56 | width: 0.15, 57 | color: { 58 | inherit: 'from' 59 | }, 60 | smooth: { 61 | type: 'continuous' 62 | }, 63 | arrows: "to", 64 | }, 65 | interaction: { 66 | dragNodes: true, 67 | navigationButtons: true, 68 | keyboard: true, 69 | }, 70 | physics: { 71 | stabilization: false, 72 | barnesHut: { 73 | gravitationalConstant: -60000, 74 | springConstant: 0.0008, 75 | springLength: 800, 76 | } 77 | }, 78 | interaction: { 79 | tooltipDelay: 200, 80 | dragNodes: true, 81 | navigationButtons: true, 82 | hideEdgesOnDrag: true 83 | } 84 | }; 85 | var network = new vis.Network(container, this.props.graph, options); 86 | } 87 | 88 | }); 89 | module.exports = Graph; -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/background.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/acceptDeleteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/acceptDeleteIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/addNodeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/addNodeIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/backIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/backIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/connectIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/connectIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/cross.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/cross2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/cross2.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/deleteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/deleteIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/downArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/downArrow.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/editIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/editIcon.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/leftArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/leftArrow.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/minus.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/plus.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/rightArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/rightArrow.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/upArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/upArrow.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/network/zoomExtends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/network/zoomExtends.png -------------------------------------------------------------------------------- /package/Aries/src/public/Graph/img/timeline/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/Graph/img/timeline/delete.png -------------------------------------------------------------------------------- /package/Aries/src/public/HDFS_Share/cancle_share_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/HDFS_Share/cancle_share_blue.png -------------------------------------------------------------------------------- /package/Aries/src/public/NavigationInPage/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Toolkit from 'public/Toolkit/index.js' 3 | import './index.less' 4 | 5 | 6 | /** 7 | * this.props.headText string 8 | * this.props.naviTexts array 9 | * 它的每项都是一个object(字典类型),需要包含两个key:url、text 10 | * url是将链接的页面 11 | * text是将要显示的文本 12 | * 13 | 使用方法: 14 | export default React.createClass({ 15 | let headText = '我的任务' 16 | let navigationTexts = [{ 17 | 'url':'http://www.baidu.com/', 18 | 'text':'百度' 19 | },{ 20 | 'url':'http://www.google.com/', 21 | 'text':'谷歌' 22 | },{ 23 | 'url':'http://www.qq.com/', 24 | 'text':'qq' 25 | }] 26 | return ( 27 |
28 | 29 |
30 | ); 31 | } 32 | }); 33 | */ 34 | 35 | var NavigationInPage = React.createClass({ 36 | 37 | render: function (){ 38 | let lastPropNaviText = this.props.naviTexts[ this.props.naviTexts.length-1 ] 39 | let theRestPropNaviTexts = this.props.naviTexts.slice( 0,this.props.naviTexts.length-1 ) 40 | return( 41 |
42 | {theRestPropNaviTexts.map( (urlInfo) => { 43 | return ( 44 |
45 | {urlInfo['text']} 46 |  >  47 |
48 | ) 49 | })} 50 | {lastPropNaviText['text']} 51 | 54 |
55 | ) 56 | } 57 | }) 58 | 59 | export default NavigationInPage -------------------------------------------------------------------------------- /package/Aries/src/public/NavigationInPage/index.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | div.NavigationInPageRootDiv{ 4 | padding-top: 10px; 5 | } 6 | 7 | div.NavigationInPageRootDiv > div.NaviTextDiv{ 8 | display: inline-block; 9 | } 10 | 11 | div.NavigationInPageRootDiv > div.NaviTextDiv > * { 12 | color:#999999; 13 | font-size: 12px; 14 | } 15 | 16 | div.NavigationInPageHeadTextDiv{ 17 | display: none; 18 | } -------------------------------------------------------------------------------- /package/Aries/src/public/ResourceMonitorEchart/index.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | // 为了动态设置 ButtonGroup 的样式(加载数据时相关按钮不可点击),因此需要手动添加一个属性,规避设置Button为disabled之后,鼠标移上去还是可以高亮 4 | .bfd-btn--minor[disabled]{ 5 | background-color: #eceff1; 6 | border-color: #eceff1; 7 | color: #9e9e9e; 8 | cursor: not-allowed; 9 | } 10 | 11 | table.TooltipTable td.SpaceTdDistraction { 12 | width: 10px; 13 | } 14 | 15 | table.ResourceMonitorEchart { 16 | width: 100%; 17 | > tbody { 18 | width: 100%; 19 | 20 | // 使得按钮靠右显示 21 | > tr:nth-child(1) > td{ 22 | text-align: right; 23 | padding-right: 100px; 24 | padding-top: 40px; 25 | padding-bottom: 10px; 26 | } 27 | > tr:nth-child(2) > td > *{ 28 | height: 300px; 29 | } 30 | 31 | } 32 | 33 | 34 | 35 | 36 | 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /package/Aries/src/public/TabBar/bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/TabBar/bars.png -------------------------------------------------------------------------------- /package/Aries/src/public/TabBar/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/TabBar/picture.png -------------------------------------------------------------------------------- /package/Aries/src/public/Task/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import './index.less' 3 | 4 | export default React.createClass({ 5 | render() { 6 | return ( 7 |
8 |

业务逻辑中复用的组件

9 |

为了防止 css 冲突,className 以 `public-` 开头

10 |
11 | ) 12 | } 13 | }) -------------------------------------------------------------------------------- /package/Aries/src/public/Task/index.less: -------------------------------------------------------------------------------- 1 | .public-task { 2 | 3 | } -------------------------------------------------------------------------------- /package/Aries/src/public/Template/Echarts/EchartsUtil.js: -------------------------------------------------------------------------------- 1 | import pieSubarea from './pieSubarea' 2 | import pie from './pie' 3 | /* 4 | *echarts数据渲染工具类 5 | */ 6 | const EchartsUtil = { 7 | /* 8 | * 渲染echarts中的数据. 9 | * type: 图表类型. echartsType中的key集合 10 | * data: 模版中对应的值 11 | */ 12 | renderOptionData(type,data){ 13 | let tempData = ""; 14 | switch(type.toLocaleLowerCase()){ 15 | case "pie": 16 | tempData = pie.renderOption(data); 17 | break; 18 | case "piesubarea": 19 | tempData = pieSubarea.renderOption(data); 20 | break; 21 | default: 22 | console.log("不包含对应的echarts 模版数据: "+type); 23 | } 24 | return tempData; 25 | }, 26 | } 27 | 28 | export default EchartsUtil; 29 | -------------------------------------------------------------------------------- /package/Aries/src/public/Template/Echarts/common.js: -------------------------------------------------------------------------------- 1 | const common = { 2 | /* 3 | * 递归替换 json(or string) 对象的每个value中的模版变量. 4 | * 示例: 5 | * temp: {id:1,name:{n1:"${t1}", n2:{nn2:"${date.month}",nn3:"${date.day}"}}} 6 | * args: {t1:1,date:{month:2, day:3}} 7 | * 返回: {id:1,name:{ n1:1, n2:{nn2:2,nn3:3}} 8 | * 9 | */ 10 | tempPreHandler(temp,args){ 11 | if(typeof(temp) != "object"){ 12 | //替换字符串中的变量 13 | temp = common.tempVariReplace(temp, args); 14 | return temp; 15 | } 16 | //遍历args对象,找到模版变量,然后直接替换模版变量 "${item}" 17 | Object.keys(temp).forEach(function(item, index){ 18 | let jsonValue = temp[item]; 19 | if(typeof(jsonValue) == "object"){ 20 | temp[item] = common.tempPreHandler(jsonValue,args); 21 | }else{ 22 | temp[item] = common.tempVariReplace(jsonValue,args); 23 | return temp 24 | } 25 | }); 26 | return temp; 27 | }, 28 | /* 29 | * 替换单个模版字符串 30 | * 示例 31 | * jsonValue : "abc_${date.month}" 32 | * args: {date:{ month:1}} 33 | * 返回: "abc_1" 34 | */ 35 | tempVariReplace(jsonValue, args){ 36 | let reg = /\${[\w|.]+}/g; 37 | //只替换字符串模版 38 | let tempVari = typeof(jsonValue) == "string" ? jsonValue.match(reg): null; 39 | tempVari != null && tempVari.forEach((tempVariName,index)=>{ 40 | //模版变量变量名 41 | let regStr = `/\\${tempVariName}/g`; 42 | let reg = eval(regStr); 43 | //模版变量变量值 44 | let name = /\${([\w|.]+)}/.exec(tempVariName)[1]; 45 | let names =name.split("."); 46 | let tempVarValue = common.getObjectAttr(names,args); 47 | jsonValue = jsonValue.replace(reg, JSON.stringify(tempVarValue)); 48 | }) 49 | try{ 50 | jsonValue = JSON.parse(jsonValue); 51 | }catch(err){ 52 | //console.log(`${jsonValue} is not object`); 53 | } 54 | return jsonValue; 55 | }, 56 | /* 57 | * 取出 json 中 指定属性的值 58 | * 示例 59 | * arr: ["date","month"] 60 | * obj: {"date":{"month":1}} 61 | * 返回: 1 62 | */ 63 | getObjectAttr(arr, obj){ 64 | let value = obj; 65 | if(typeof(obj) != "object"){ 66 | return value; 67 | } 68 | arr.forEach((item,index)=>{ 69 | value = value[item]; 70 | }); 71 | return value; 72 | }, 73 | } 74 | 75 | export default common; 76 | -------------------------------------------------------------------------------- /package/Aries/src/public/Template/Echarts/pie.js: -------------------------------------------------------------------------------- 1 | import common from './common' 2 | import echarts from 'echarts' 3 | // echarts 百分比饼图模版数据 4 | const pie = { 5 | getOption(){ 6 | return { 7 | legend: { 8 | orient: 'vertical', 9 | left: 'left', 10 | }, 11 | series : [ 12 | { 13 | type: 'pie', 14 | radius : ['50%', '80%'], 15 | center: ['50%','50%'], 16 | hoverAnimation:false, 17 | label: { 18 | normal: { 19 | show: true, 20 | formatter: function(params){return params.percent.toFixed(0)+"%"}, 21 | } 22 | }, 23 | itemStyle: { 24 | normal: { 25 | borderColor: "#ddd", 26 | borderWidth: 2, 27 | color : 28 | new echarts.graphic.RadialGradient(0.5, 0.5, 0.5, [{ 29 | offset: 0.6, color: 'red' // 0% 处的颜色 30 | }, { 31 | offset: 1, color: 'red' // 100% 处的颜色 32 | }], false 33 | ) 34 | 35 | } 36 | }, 37 | data:[ 38 | { 39 | value:"${used}", 40 | label: { 41 | normal: { 42 | position: "center", 43 | textStyle: { 44 | color: 'red', 45 | fontSize: 25, 46 | fontStyle: 'normal', 47 | fontWeight: 'bold', 48 | fontFamily: "Helvetica Neue" 49 | 50 | } 51 | } 52 | } 53 | }, 54 | { 55 | value:"${nonUsed}", 56 | tooltip: { 57 | show: false 58 | }, 59 | itemStyle: { 60 | normal: { 61 | color: '#fff' 62 | } 63 | }, 64 | } 65 | ] 66 | } 67 | ] 68 | } 69 | }, 70 | //渲染option的函数 71 | renderOption(data){ 72 | if(data.nonUsed == 0 && data.used == 0){ 73 | data.nonUsed = 1; 74 | } 75 | let option = common.tempPreHandler(this.getOption(),data); 76 | return option; 77 | } 78 | } 79 | 80 | export default pie; 81 | -------------------------------------------------------------------------------- /package/Aries/src/public/Template/Echarts/pieSubarea.js: -------------------------------------------------------------------------------- 1 | import common from './common' 2 | //echarts 饼图分区模版数据 3 | const pieSubarea = { 4 | getOption(){ 5 | return { 6 | legend: { 7 | orient: 'vertical', 8 | x: 'left', 9 | }, 10 | hoverAnimation:false, 11 | series: [{ 12 | type: 'pie', 13 | center: ['50%','50%'], 14 | radius: ['50%', '80%'], 15 | data: "${data}" 16 | }] 17 | } 18 | }, 19 | formatterData(data){ 20 | return data.map((item,index)=>{ 21 | return { 22 | value: item.value, 23 | name: item.name, 24 | label: { 25 | normal: { 26 | show: false 27 | } 28 | }, 29 | labelLine: { 30 | normal: { 31 | show: false 32 | } 33 | } 34 | } 35 | }); 36 | }, 37 | //渲染option的函数 38 | renderOption(data){ 39 | data = this.formatterData(data); 40 | let option = common.tempPreHandler(this.getOption(),{data:data}); 41 | return option; 42 | } 43 | } 44 | 45 | export default pieSubarea; 46 | -------------------------------------------------------------------------------- /package/Aries/src/public/auth.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 用户会话信息,auth.user = window.user 3 | * auth 作为模块供其他模块使用 4 | */ 5 | 6 | const auth = { 7 | 8 | isLoggedIn() { 9 | return !!auth.user 10 | }, 11 | 12 | register(user) { 13 | auth.user = user 14 | }, 15 | 16 | destroy() { 17 | auth.user = null 18 | } 19 | } 20 | 21 | if (process.env.NODE_ENV !== 'production') { 22 | window.user = { 23 | name: 'pan.lu', 24 | type: 1, 25 | cur_space:"hadoop" 26 | } 27 | } 28 | 29 | auth.register(window.user) 30 | 31 | export default auth 32 | -------------------------------------------------------------------------------- /package/Aries/src/public/bfd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/bfd.png -------------------------------------------------------------------------------- /package/Aries/src/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/Aries/src/public/logo.png -------------------------------------------------------------------------------- /package/k8s_config/sirius-ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: sirius 5 | namespace: default 6 | spec: 7 | tls: 8 | - hosts: 9 | - sirius.bfdcloud.com 10 | rules: 11 | - host: sirius.bfdcloud.com 12 | http: 13 | paths: 14 | - backend: 15 | serviceName: sirius 16 | servicePort: 10086 17 | path: / 18 | -------------------------------------------------------------------------------- /package/k8s_config/sirius-rc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ReplicationController 3 | metadata: 4 | name: sirius 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | name: sirius 11 | service: sirius 12 | spec: 13 | containers: 14 | - name: sirius 15 | image: docker.baifendian.com/lupan/sirius_lugu:1 16 | ports: 17 | - containerPort: 10086 18 | volumeMounts: 19 | - mountPath: /opt/Sirius/log 20 | name: siriuslog 21 | - mountPath: /opt/Siurs/download 22 | name: siriusdownload 23 | imagePullSecrets: 24 | - name: docker-registry-sys 25 | volumes: 26 | - emptyDir: {} 27 | name: siriuslog 28 | - emptyDir: {} 29 | name: siriusdownload 30 | imagePullSecrets: 31 | - name: docker-registry-sys 32 | nodeSelector: 33 | kubernetes.io/hostname: 192.168.49.46 34 | -------------------------------------------------------------------------------- /package/k8s_config/sirius-svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: sirius 5 | labels: 6 | service: sirius 7 | spec: 8 | type: NodePort 9 | ports: 10 | - port: 10086 11 | targetPort: 10086 12 | # nodePort: 31041 13 | selector: 14 | name: sirius 15 | -------------------------------------------------------------------------------- /package/kubectl_linux_1_2_4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/kubectl_linux_1_2_4 -------------------------------------------------------------------------------- /package/kubectl_osx_1_2_4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/package/kubectl_osx_1_2_4 -------------------------------------------------------------------------------- /readme/bdmsTask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/bdmsTask.png -------------------------------------------------------------------------------- /readme/codisHost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/codisHost.png -------------------------------------------------------------------------------- /readme/codisInfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/codisInfo.png -------------------------------------------------------------------------------- /readme/hdfsCloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/hdfsCloud.png -------------------------------------------------------------------------------- /readme/k8sDesc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/k8sDesc.png -------------------------------------------------------------------------------- /readme/k8sMonitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/k8sMonitor.png -------------------------------------------------------------------------------- /readme/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/login.png -------------------------------------------------------------------------------- /readme/overView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/overView.png -------------------------------------------------------------------------------- /readme/spaceList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baifendian/Sirius/d570ac9df0f8ee4771e4b4a47037566d0d5ce6bd/readme/spaceList.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | djangorestframework==3.3.2 2 | django-admin-bootstrapped==2.1.0 3 | django-auth-ldap==1.2.1 4 | django-bootstrap-tags==1.2.0 5 | Django==1.8.6 6 | djangorestframework-jsonp==1.0.2 7 | requests==2.10.0 8 | redis==2.10.3 9 | paramiko==1.7.7.1 10 | pycrypto==2.6 11 | kazoo==2.2.1 12 | supervisor==3.2.0 13 | pyyaml==3.12 14 | -------------------------------------------------------------------------------- /sbin/Aries-env.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | #The reserved environment variable configuration script. 2016.11.10 3 | export JAVA_HOME=/opt/java 4 | export HADOOP_HOME=/opt/hadoop 5 | export HADOOP_DEV_HOME=${HADOOP_HOME} 6 | export HADOOP_PREFIX=${HADOOP_HOME} 7 | export PATH=$PATH:$HADOOP_DEV_HOME/bin:${JAVA_HOME}/bin:$PATH 8 | export PATH=$PATH:$HADOOP_DEV_HOME/sbin:/bin 9 | export HADOOP_MAPARED_HOME=${HADOOP_DEV_HOME} 10 | export HADOOP_COMMON_HOME=${HADOOP_DEV_HOME} 11 | export HADOOP_HDFS_HOME=${HADOOP_DEV_HOME} 12 | export YARN_HOME=${HADOOP_DEV_HOME} 13 | export HADOOP_YARN_HOME=${HADOOP_DEV_HOME} 14 | export HADOOP_CLIENT_CONF_DIR=${HADOOP_DEV_HOME}/etc/hadoop 15 | export HADOOP_CONF_DIR=${HADOOP_DEV_HOME}/etc/hadoop 16 | export HDFS_CONF_DIR=${HADOOP_DEV_HOME}/etc/hadoop 17 | export YARN_CONF_DIR=${HADOOP_DEV_HOME}/etc/hadoop 18 | export CLASSPATH=".:$JAVA_HOME/lib:":$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 19 | export PATH="$JAVA_HOME/:$HADOOP_PREFIX/bin:$PATH" 20 | export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_PREFIX}/lib/native 21 | export HADOOP_VERSION=2.6.0 22 | export HADOOP_OPTS="-Djava.library.path=$HADOOP_PREFIX/lib/native" 23 | #export HADOOP_CLASSPATH=/opt/hadoop/tez-0.5.2/lib/*:/opt/hadoop/tez-0.5.2 24 | -------------------------------------------------------------------------------- /sbin/Aries.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source $HOME/sbin/Aries-env.sh 3 | 4 | HOME=`dirname $(cd "$(dirname "$0")"; pwd)` 5 | HDFS_DOWNLOAD_DIR="$HOME/download/" 6 | mkdir -p $HDFS_DOWNLOAD_DIR 7 | 8 | LOG_BASE_DIR="$HOME/log" 9 | mkdir -p $LOG_BASE_DIR 10 | echo "$LOG_BASE_DIR/uwsgi.log" 11 | PYTHON_PATH="$HOME/Aries" 12 | UWSGI_LOG="$LOG_BASE_DIR/uwsgi.log" 13 | sed -i "s#PYTHON_PATH_XML#$PYTHON_PATH#g" $HOME/sbin/Aries.xml 14 | sed -i "s#UWSGI_LOG_DIR#$UWSGI_LOG#g" $HOME/sbin/Aries.xml 15 | 16 | cd $HOME 17 | echo $HOME 18 | while getopts "h" Option 19 | do 20 | case $Option in 21 | h) echo "Version: `cat $HOME/VERSION`" 22 | echo "Usage: $0 " 23 | exit 24 | ;; 25 | esac 26 | done 27 | shift $(($OPTIND - 1)) 28 | 29 | case $1 in 30 | start) /opt/Python-2.7/bin/uwsgi --python-path $HOME --pidfile $LOG_BASE_DIR/uwsgi.pid -x $HOME/sbin/Aries.xml ;; 31 | reload) /opt/Python-2.7/bin/uwsgi --reload $LOG_BASE_DIR/uwsgi.pid;; 32 | stop) /opt/Python-2.7/bin/uwsgi --stop $LOG_BASE_DIR/uwsgi.pid; rm -f $LOG_BASE_DIR/uwsgi.pid;; 33 | esac 34 | -------------------------------------------------------------------------------- /sbin/Aries.xml: -------------------------------------------------------------------------------- 1 | 2 | PYTHON_PATH_XML 3 | Aries.wsgi 4 | 5 | 100 6 | 100 7 | 2 8 | UWSGI_LOG_DIR 9 | 0.0.0.0:10086 10 | 11 | 12 | -------------------------------------------------------------------------------- /sbin/Aries.yaml: -------------------------------------------------------------------------------- 1 | SHARE_PROXY_BASE_URI: "http://172.24.3.64:10086" 2 | REST_BASE_URI: "172.24.3.64:10012" 3 | 4 | DATABASES: 5 | default: 6 | ENGINE: django.db.backends.mysql 7 | NAME: aries 8 | HOST: 172.24.3.64 9 | PORT: 3306 10 | USER: root 11 | PASSWORD: baifendian 12 | kd_agent_bdms: 13 | ENGINE: django.db.backends.mysql # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 14 | NAME: bdms_web10010 # Or path to database file if using sqlite3. 15 | USER: bdms # Not used with sqlite3. 16 | PASSWORD: bdms # Not used with sqlite3. 17 | HOST: 172.24.100.40 # Set to empty string for localhost. Not used with sqlite3. 18 | PORT: 3306 # Set to empty string for default. Not used with sqlite3. 19 | 20 | AUTH_LDAP: 21 | SERVER_URI: 'ldap://192.168.49.241:389' 22 | USER_DN_TEMPLATE: 'uid=%(user)s,ou=mrbs,dc=baifendian,dc=com' 23 | BIND_AS_AUTHENTICATING_USER: True 24 | CACHE_GROUPS: True 25 | GROUP_CACHE_TIMEOUT: 3600 26 | USER_ATTR_MAP: 27 | username: "givenName" 28 | password: "password" 29 | 30 | AMBARI: 31 | AMBARI_URL: "http://172.24.3.64:8080/api/v1/clusters/hlg_ambari/" 32 | HDFS_URL: "http://172.24.3.156:50070/webhdfs/v1/" 33 | HADOOP_CLIENT: "hlg3p64-lupan" 34 | AMBARI_USER: "admin" 35 | AMBARI_PASSWORD: "admin" 36 | 37 | 38 | K8S: 39 | K8S_IP: '172.24.3.150' 40 | K8S_PORT: 8080 41 | INFLUXDB_IP: 'k8sinfluxapi.k8s.baifendian.com' 42 | INFLUXDB_PORT: 80 43 | INFLUXDB_DATABASE: 'k8s' 44 | 45 | BDMS: 46 | IP: '172.24.100.40' 47 | PORT: '10001' 48 | USERNAME: 'aiping.liang' 49 | PASSWORD: 'aiping.liang' 50 | 51 | 52 | WEBHDFS: 53 | HOSTS: 54 | - 172.24.3.65:50070 55 | - 172.24.3.66:50070 56 | PORT: 50070 57 | PATH: "/webhdfs/v1" 58 | USER: "hadoop" 59 | TIMEOUT: 10 60 | MAX_TRIES: 2 61 | RETRY_DELAY: 3 62 | CLIENTHDFS: 63 | HADOOP_HOME: '/opt/hadoop/hadoop' 64 | NAMENODE_PATH: 'hdfs://172.24.100.44:8020' 65 | 66 | CODIS: 67 | CODIS_REST_URL: 'http://192.168.49.127:8888' 68 | OPENTSDB_URL: 'http://192.168.40.140:9999' 69 | 70 | OPENSTACK: 71 | IP_KEYSTONE: "192.168.190.11" 72 | PORT_KEYSTONE: 5000 73 | IP_NOVA: "192.168.190.11" 74 | PORT_NOVA: 8774 75 | IP_CINDER: "192.168.190.11" 76 | PORT_CINDER: 8776 77 | MONITOR_URL: 'http://172.24.4.33:4242/api/query' 78 | 79 | WHITELIST: 80 | WHITELIST_IP: 81 | - "192." 82 | - "10." 83 | -------------------------------------------------------------------------------- /sbin/Aries.yaml.k8s: -------------------------------------------------------------------------------- 1 | SHARE_PROXY_BASE_URI: k8s_SHARE_PROXY_BASE_URI 2 | REST_BASE_URI: k8s_REST_BASE_URI 3 | 4 | DATABASES: 5 | default: 6 | ENGINE: k8s_DATABASES_DEFAULT_ENGINE 7 | NAME: k8s_DATABASES_DEFAULT_NAME 8 | HOST: k8s_DATABASES_DEFAULT_HOST 9 | PORT: k8s_DATABASES_DEFAULT_PORT 10 | USER: k8s_DATABASES_DEFAULT_USER 11 | PASSWORD: k8s_DATABASES_DEFAULT_PASSWORD 12 | kd_agent_bdms: 13 | ENGINE: k8s_DATABASES_BDMS_ENGINE # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 14 | NAME: k8s_DATABASES_BDMS_NAME # Or path to database file if using sqlite3. 15 | USER: k8s_DATABASES_BDMS_USER # Not used with sqlite3. 16 | PASSWORD: k8s_DATABASES_BDMS_PASSWORD # Not used with sqlite3. 17 | HOST: k8s_DATABASES_BDMS_HOST # Set to empty string for localhost. Not used with sqlite3. 18 | PORT: k8s_DATABASES_BDMS_PORT # Set to empty string for default. Not used with sqlite3. 19 | 20 | AUTH_LDAP: 21 | SERVER_URI: k8s_LDAP_SERVER_URI 22 | USER_DN_TEMPLATE: k8s_LDAP_DN 23 | BIND_AS_AUTHENTICATING_USER: k8s_LDAP_BIND 24 | CACHE_GROUPS: k8s_LDAP_CACHE_GROUPS 25 | GROUP_CACHE_TIMEOUT: k8s_LDAP_GROUP_CACHE_TIMEOUT 26 | USER_ATTR_MAP: 27 | username: k8s_LDAP_USER_ATTR_MAP_USERNAME 28 | password: k8s_LDAP_USER_ATTR_MAP_PASSWORD 29 | 30 | AMBARI: 31 | AMBARI_URL: k8s_AMBARI_URL 32 | HDFS_URL: k8s_AMBARI_HDFS_URL 33 | HADOOP_CLIENT: k8s_AMBARI_HADOOP_CLIENT 34 | AMBARI_PASSWORD: k8s_AMBARI_PASSWORD 35 | AMBARI_USER: k8s_AMBARI_USER 36 | 37 | 38 | K8S: 39 | K8S_IP: k8s_K8S_IP 40 | K8S_PORT: k8s_K8S_PORT 41 | INFLUXDB_IP: k8s_K8S_INFLUXDB_IP 42 | INFLUXDB_PORT: k8s_K8S_INFLUXDB_PORT 43 | INFLUXDB_DATABASE: k8s_K8S_INFLUXDB_DATABASE 44 | 45 | BDMS: 46 | IP: k8s_BDMS_IP 47 | PORT: k8s_BDMS_PORT 48 | USERNAME: k8s_BDMS_USERNAME 49 | PASSWORD: k8s_BDMS_PASSWORD 50 | 51 | WEBHDFS: 52 | HOSTS: k8s_WEBHDFS_HOSTS 53 | PORT: k8s_WEBHDFS_PORT 54 | PATH: k8s_WEBHDFS_PATH 55 | USER: k8s_WEBHDFS_USER 56 | TIMEOUT: k8s_WEBHDFS_TIMEOUT 57 | MAX_TRIES: k8s_WEBHDFS_MAX_TRIES 58 | RETRY_DELAY: k8s_WEBHDFS_RETRY_DELAY 59 | CLIENTHDFS: 60 | HADOOP_HOME: k8s_HADOOP_HOME 61 | NAMENODE_PATH: k8s_NAMENODE_PATH 62 | 63 | CODIS: 64 | CODIS_REST_URL: k8s_CODIS_REST_URL 65 | OPENTSDB_URL: k8s_CODIS_OPENTSDB_URL 66 | 67 | OPENSTACK: 68 | IP_KEYSTONE: k8s_OPENSTACK_IP_KEYSTONE 69 | PORT_KEYSTONE: k8s_OPENSTACK_PORT_KEYSTONE 70 | IP_NOVA: k8s_OPENSTACK_IP_NOVA 71 | PORT_NOVA: k8s_OPENSTACK_PORT_NOVA 72 | IP_CINDER: k8s_OPENSTACK_IP_CINDER 73 | PORT_CINDER: k8s_OPENSTACK_PORT_CINDER 74 | MONITOR_URL: k8s_OPENSTACK_MONITOR_URL 75 | 76 | WHITELIST: 77 | WHITELIST_IP: 78 | - "192." 79 | - "10." 80 | -------------------------------------------------------------------------------- /sbin/buildDocker.sh: -------------------------------------------------------------------------------- 1 | #/usr/bin/bash 2 | version=$1 3 | if [ ! $version ] ; then 4 | echo "please input current sirius version!" 5 | echo "thanks! bye!" 6 | exit 1 7 | fi 8 | mv Aries.yaml.k8s Aries.yaml 9 | sed -i '/daemonize/d' Aries.xml 10 | cd .. 11 | docker build -t docker.baifendian.com/lupan/sirius_lugu:${version} . 12 | docker push docker.baifendian.com/lupan/sirius_lugu:${version} 13 | --------------------------------------------------------------------------------