Commit 99d616dd authored by 薛智杰's avatar 薛智杰

Merge branch 'kewei' into 'master'

Kewei



See merge request !8
parents 0182552f 404e3e0d
......@@ -15,6 +15,22 @@ export function fetchK8sdetail(query) {
})
}
export function redeployClusterService(data) {
return request({
url: '/k8s/service/redeploy',
method: 'post',
data
})
}
export function deleteClusterService(data) {
return request({
url: '/k8s/service/delete',
method: 'post',
data
})
}
export function fetchUserrepository(data) {
return request({
url: '/k8s/repository',
......@@ -30,12 +46,14 @@ export function fetchTaglist(data) {
data
})
}
export function getType() {
return request({
url: '/proconfig/get_type',
method: 'get'
})
}
export function CreateCluService(data) {
return request({
url: '/k8s/service/create',
......@@ -43,6 +61,15 @@ export function CreateCluService(data) {
data
})
}
export function modifyCluService(data) {
return request({
url: '/k8s/service/modifyImage',
method: 'post',
data
})
}
export function fetchServiceDetails(data) {
return request({
url: '/k8s/service/details',
......@@ -50,3 +77,11 @@ export function fetchServiceDetails(data) {
data
})
}
export function fetchServiceInstance(data) {
return request({
url: '/k8s/service/instance',
method: 'post',
data
})
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552477586785" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3934" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M529.075399 43.512003c-248.28683 0-449.583438 201.302749-449.583438 449.624371 0 248.295016 201.296609 449.594695 449.583438 449.594695 248.281713 0 449.63665-201.301725 449.63665-449.594695C978.711026 244.814752 777.357112 43.512003 529.075399 43.512003zM314.646702 623.211894c0 23.065322-10.725272 34.600029-32.175817 34.600029-11.762905 0-22.720468-0.345877-32.868595-1.038656-0.923022-6.919597-2.306532-15.109116-4.151553-24.564465 11.763928 1.845021 21.913079 2.768043 30.446429 2.768043 9.457396 0 14.186094-4.728698 14.186094-14.186094l0-79.577407-48.437176 0c0.691755 53.05331-8.880251 93.53121-28.717042 121.441886-5.073552-6.688329-11.418051-13.148461-19.029402-19.37528 15.45397-23.759123 23.180955-57.434084 23.180955-101.028974L217.080595 342.617242l97.566106 0L314.646702 623.211894zM519.124769 662.654208c-28.371164-13.264095-52.359508-29.755698-72.079642-49.477878-17.644869 17.415648-38.403658 32.756031-62.163805 46.016033-4.381797-7.611352-9.109472-15.22168-14.184047-22.833031 23.065322-11.764951 43.016723-25.834388 59.738569-42.211381-22.491247-28.832675-37.366026-63.546292-44.515866-104.141872l-16.260335 0 0 171.953304-26.296923 0L343.36272 344.002798l170.916694 0c-1.153266 18.682501-2.076288 33.444716-2.768043 44.284599-1.846044 35.752272-20.064988 53.281507-54.66604 52.590775-9.455349-0.232291-24.332175-0.691755-44.630477-1.385557-1.384533-8.995885-2.882654-18.105357-4.498454-27.331485 17.068747 2.074242 32.406061 3.345188 46.016033 3.806699 19.836791 0.691755 30.560016-8.765641 32.175817-28.372188 0.690732-5.995551 1.266853-12.571317 1.728364-19.720134L369.660666 367.875508l0 99.643418L515.664971 467.518926l0 20.411889c-9.228175 40.481993-26.063609 75.712379-50.631144 105.698321 19.953448 18.913768 44.6315 33.619702 74.156954 44.112684C531.350209 646.968971 524.660856 655.273101 519.124769 662.654208zM835.356061 608.6789c-3.690042 32.521694-23.065322 48.89971-58.125839 49.130977-13.607926 0.231267-34.021861-0.231267-61.240783-1.385557-1.384533-8.53335-3.112897-18.104333-5.188162-28.716019 26.524097 2.305509 48.438199 3.575432 65.736167 3.804652 19.6045-0.460488 30.448476-10.378371 32.521694-29.753651 2.075265-17.298991 3.576455-35.752272 4.498454-55.357795L698.22996 546.401508c-12.225439 55.473429-55.242162 95.721085-128.937604 120.749108-5.305843-7.612375-10.956539-15.33936-16.95209-23.180955 66.197678-21.451568 105.411795-53.974285 117.633141-97.568153l-95.836719 0 0-24.564465 100.683097 0c1.613754-11.187807 3.000334-23.642466 4.152577-37.367049l28.025287 0c-1.499144 13.723559-2.99931 26.179242-4.613064 37.367049l139.545196 0C839.622224 563.126424 837.432349 592.07371 835.356061 608.6789zM723.602837 461.461977c-45.784766 19.490913-101.143585 34.885532-166.072363 46.188972-3.922333-7.150864-8.651031-15.22168-14.186094-24.218588 57.778938-8.880251 107.946524-21.449521 150.502759-37.712927-26.293853-16.030092-47.28391-35.001165-63.082734-56.914244-17.877159 21.219277-37.712927 40.884153-59.393715 58.989509-6.92062-7.381108-13.264095-13.608949-19.030425-18.683525 42.441625-33.672914 73.925686-70.348208 94.453209-110.020766l25.947975 11.070126c-5.188162 8.534374-10.607592 16.838503-16.261359 24.911366l187.178053 0 0 23.179932c-21.452591 26.064632-50.745754 48.841382-87.995123 68.332295 38.749536 14.069437 84.880179 22.776749 138.508587 26.119891-7.380084 10.381441-13.837146 20.068058-19.37528 29.061896C814.709835 493.810732 764.313028 480.375745 723.602837 461.461977z" p-id="3935"></path><path d="M241.646084 452.986955l48.437176 0 0 66.775846-48.437176 0 0-66.775846Z" p-id="3936"></path><path d="M241.646084 365.108488l48.437176 0 0 66.428945-48.437176 0 0-66.428945Z" p-id="3937"></path><path d="M652.212904 377.909026c18.567891 22.258956 42.441625 40.59558 71.617108 55.011918 33.332153-15.569604 60.894905-33.907251 82.807984-55.011918L652.212904 377.909026z" p-id="3938"></path><path d="M409.678078 490.00915c7.150864 33.214473 19.836791 61.46898 38.174438 84.764546 19.029402-24.102954 32.521694-52.357462 40.479947-84.764546L409.678078 490.00915z" p-id="3939"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552477249925" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1173" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M519.620465 0c-103.924093 0-188.511256 82.467721-192.083349 185.820279H85.015814A48.91386 48.91386 0 0 0 36.101953 234.686512a48.91386 48.91386 0 0 0 48.913861 48.866232h54.010046V831.345116c0 102.852465 69.822512 186.844279 155.909954 186.844279h439.200744c86.087442 0 155.909953-83.491721 155.909954-186.844279V284.100465h48.91386a48.91386 48.91386 0 0 0 48.913861-48.890046 48.91386 48.91386 0 0 0-48.913861-48.866233h-227.756651A191.559442 191.559442 0 0 0 519.620465 0z m-107.234232 177.080558c3.548279-49.771163 46.627721-88.540279 99.851907-88.540279 53.224186 0 96.327442 38.745302 99.351813 88.540279h-199.20372z m-111.997024 752.044651c-30.981953 0-65.083535-39.15014-65.083535-95.041488V287.744h575.488v546.839814c0 55.915163-34.077767 95.041488-65.059721 95.041488H300.389209v-0.500093z" fill="#D81E06" p-id="1174"></path><path d="M368.116093 796.814884c24.361674 0 44.27014-21.670698 44.27014-48.818605v-278.623256c0-27.147907-19.908465-48.818605-44.27014-48.818604-24.33786 0-44.27014 21.670698-44.27014 48.818604v278.623256c0 27.147907 19.360744 48.818605 44.293954 48.818605z m154.933581 0c24.361674 0 44.293953-21.670698 44.293954-48.818605v-278.623256c0-27.147907-19.932279-48.818605-44.293954-48.818604-24.33786 0-44.27014 21.670698-44.270139 48.818604v278.623256c0 27.147907 19.932279 48.818605 44.293953 48.818605z m132.810419 0c24.33786 0 44.27014-21.670698 44.27014-48.818605v-278.623256c0-27.147907-19.932279-48.818605-44.27014-48.818604s-44.27014 21.670698-44.27014 48.818604v278.623256c0 27.147907 19.360744 48.818605 44.27014 48.818605z" fill="#D81E06" p-id="1175"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552477636306" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5320" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M828.5 886.3H238.4c-9.9 0-18-8.1-18-18v-4c0-9.9 8.1-18 18-18h590.1c9.9 0 18 8.1 18 18v4c0 9.9-8.1 18-18 18zM828.5 684.6H238.4c-9.9 0-18-8.1-18-18v-4c0-9.9 8.1-18 18-18h590.1c9.9 0 18 8.1 18 18v4c0 9.9-8.1 18-18 18zM409 449.5H230.2c-17.6 0-32-14.4-32-32V238.7c0-17.6 14.4-32 32-32H409c17.6 0 32 14.4 32 32v178.8c0 17.6-14.4 32-32 32z m-170.8-40H401V246.7H238.2v162.8zM822.4 437.5H552.9c-11 0-20-9-20-20s9-20 20-20h269.5c11 0 20 9 20 20s-9 20-20 20zM822.4 269.5H552.9c-11 0-20-9-20-20s9-20 20-20h269.5c11 0 20 9 20 20s-9 20-20 20z" fill="#888888" p-id="5321"></path><path d="M884.4 1024H182.5c-46.3 0-83.9-37.7-83.9-83.9V91.9C98.6 45.7 136.3 8 182.5 8h701.9c46.3 0 83.9 37.7 83.9 83.9V940c0 46.3-37.7 84-83.9 84zM182.5 48c-24.2 0-43.9 19.7-43.9 43.9V940c0 24.2 19.7 43.9 43.9 43.9h701.9c24.2 0 43.9-19.7 43.9-43.9V91.9c0-24.2-19.7-43.9-43.9-43.9H182.5z" fill="#888888" p-id="5322"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552480455549" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1217" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 985.6c-185.6 0-358.4-108.8-435.2-281.6-6.4-12.8 0-32 12.8-38.4 12.8-6.4 32 0 38.4 12.8 64 153.6 217.6 249.6 377.6 249.6 166.4 0 313.6-96 377.6-249.6 6.4-12.8 25.6-19.2 38.4-12.8 12.8 6.4 19.2 25.6 12.8 38.4-64 172.8-236.8 281.6-422.4 281.6zM102.4 371.2h-12.8c-12.8-12.8-19.2-25.6-12.8-44.8C147.2 153.6 320 38.4 512 38.4s358.4 115.2 435.2 288c6.4 12.8 0 32-12.8 38.4-12.8 6.4-32 0-38.4-12.8-64-153.6-217.6-249.6-384-249.6s-313.6 102.4-384 256c0 6.4-12.8 12.8-25.6 12.8z" p-id="1218"></path><path d="M70.4 627.2L0 364.8h38.4l38.4 172.8c0 19.2 6.4 38.4 6.4 51.2 6.4-25.6 12.8-44.8 12.8-51.2l51.2-179.2H192l38.4 134.4c6.4 32 19.2 64 19.2 89.6 0-6.4 6.4-25.6 12.8-51.2l38.4-166.4h32L262.4 627.2h-32l-57.6-198.4c0-19.2-6.4-25.6-6.4-32 0 12.8-6.4 19.2-6.4 32l-57.6 198.4h-32zM416 627.2L345.6 364.8H384l38.4 172.8c0 19.2 6.4 38.4 6.4 51.2 6.4-25.6 12.8-44.8 12.8-51.2l51.2-179.2h44.8L576 492.8c6.4 32 19.2 64 19.2 89.6 0-6.4 6.4-25.6 6.4-51.2l38.4-166.4h32l-64 262.4H576l-57.6-198.4c0-19.2-6.4-25.6-6.4-32 0 12.8-6.4 19.2-6.4 32L448 627.2h-32zM755.2 627.2l-70.4-262.4h38.4l38.4 172.8c6.4 19.2 12.8 38.4 12.8 51.2 6.4-25.6 12.8-44.8 12.8-51.2l51.2-179.2h44.8l38.4 134.4c6.4 32 19.2 64 19.2 89.6 6.4-19.2 6.4-38.4 12.8-57.6l38.4-166.4h32l-70.4 262.4h-32l-57.6-198.4c-6.4-19.2-6.4-25.6-6.4-32 0 12.8-6.4 19.2-6.4 32l-57.6 198.4h-38.4z" p-id="1219"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552477605248" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4674" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M962.074 490.554L647.271 355.638l125.831-89.881c-65.56-69.108-157.968-112.493-260.747-112.493-174.244 0-319.503 123.884-352.634 288.369l-83.949-34.777C123.56 209.825 300.628 63.32 512.355 63.32c132.973 0 252.063 58.09 334.393 149.833l115.326-82.375v359.776z m-710.47 269.773c65.556 69.108 157.973 112.488 260.752 112.488 174.918 0 320.546-124.873 352.931-290.307l83.868 35.874c-47.481 197.458-224.77 344.377-436.799 344.377-132.973 0-252.068-58.086-334.398-149.828l-115.322 82.37V535.525L377.44 670.441l-125.836 89.886z" p-id="4675"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552548812180" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3147" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M819.940976 956.940698 204.592167 956.940698c-14.145162 0-25.611308-11.466146-25.611308-25.611308l0-839.111083c0-14.145162 11.467169-25.611308 25.611308-25.611308l615.347786 0c14.145162 0 25.611308 11.467169 25.611308 25.611308l0 839.111083C845.552284 945.474552 834.086138 956.940698 819.940976 956.940698zM230.203474 905.71706l564.125171 0L794.328645 117.829616 230.203474 117.829616 230.203474 905.71706z" p-id="3148" fill="#f4ea2a"></path><path d="M708.060863 464.35077 320.433498 464.35077c-14.145162 0-25.611308-11.467169-25.611308-25.611308s11.467169-25.611308 25.611308-25.611308l387.626341 0c14.145162 0 25.611308 11.467169 25.611308 25.611308S722.206024 464.35077 708.060863 464.35077z" p-id="3149" fill="#f4ea2a"></path><path d="M708.060863 320.607972 320.433498 320.607972c-14.145162 0-25.611308-11.467169-25.611308-25.611308s11.467169-25.611308 25.611308-25.611308l387.626341 0c14.145162 0 25.611308 11.467169 25.611308 25.611308S722.206024 320.607972 708.060863 320.607972z" p-id="3150" fill="#f4ea2a"></path><path d="M708.060863 608.093569 320.433498 608.093569c-14.145162 0-25.611308-11.466146-25.611308-25.611308s11.467169-25.611308 25.611308-25.611308l387.626341 0c14.145162 0 25.611308 11.466146 25.611308 25.611308S722.206024 608.093569 708.060863 608.093569z" p-id="3151" fill="#f4ea2a"></path><path d="M708.060863 751.836367 320.433498 751.836367c-14.145162 0-25.611308-11.466146-25.611308-25.611308s11.467169-25.611308 25.611308-25.611308l387.626341 0c14.145162 0 25.611308 11.466146 25.611308 25.611308S722.206024 751.836367 708.060863 751.836367z" p-id="3152" fill="#f4ea2a"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552477674874" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5942" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M495.7 313.1c-16.6 0-30 13.4-30 30v182.6c0 3.3 0.5 6.4 1.5 9.3 2.1 14.5 14.6 25.7 29.7 25.7h182.6c16.6 0 30-13.4 30-30s-13.4-30-30-30H525.7V343.1c0-16.6-13.4-30-30-30z" p-id="5943"></path><path d="M857.3 366.1c-18.9-44.6-45.9-84.7-80.3-119.1-34.4-34.4-74.5-61.4-119.1-80.3-46.2-19.5-95.3-29.5-145.9-29.5-44.8 0-88.7 7.8-130.3 23.3-40.3 14.9-77.4 36.6-110.4 64.3-47.2 39.6-83.8 90.2-106.6 146.6l-16.1-30c-7.8-14.6-26-20.1-40.6-12.2-14.6 7.8-20.1 26-12.2 40.6l51.1 95.1c0.3 0.6 0.7 1.2 1.1 1.8 0.2 0.4 0.5 0.7 0.7 1.1 0.1 0.2 0.3 0.4 0.4 0.7 5.8 7.9 14.8 12.2 24.2 12.2 4.8 0 9.7-1.2 14.2-3.6 0 0 0.1 0 0.1-0.1l95-51c14.6-7.8 20.1-26 12.2-40.6-7.8-14.6-26-20.1-40.6-12.2l-32.5 17.5c19.3-46.1 49.5-87.4 88.3-120 27.7-23.3 58.9-41.4 92.7-54 35-13 71.8-19.5 109.5-19.5 84.1 0 163.1 32.7 222.5 92.2s92.2 138.5 92.2 222.5-32.9 163.2-92.4 222.6-138.4 92.2-222.5 92.2-163.1-32.7-222.5-92.2c-11.7-11.7-30.7-11.7-42.4 0s-11.7 30.7 0 42.4c34.4 34.4 74.5 61.4 119.1 80.3 46.2 19.5 95.3 29.5 145.9 29.5s99.7-9.9 145.9-29.5c44.6-18.9 84.7-45.9 119.1-80.3 34.4-34.4 61.4-74.5 80.3-119.1 19.5-46.2 29.5-95.3 29.5-145.9s-10.1-99.5-29.6-145.8z" p-id="5944"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552479225214" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7684" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M48.872727 446.836364C23.272727 446.836364 0 425.890909 0 397.963636v-349.090909C0 20.945455 20.945455 0 48.872727 0h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H48.872727zM623.709091 446.836364c-25.6 0-48.872727-20.945455-48.872727-48.872728v-349.090909c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c27.927273 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H623.709091zM48.872727 1024C20.945455 1024 0 1003.054545 0 975.127273V623.709091c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H48.872727zM623.709091 1024c-25.6 0-48.872727-20.945455-48.872727-48.872727V623.709091c0-25.6 20.945455-48.872727 48.872727-48.872727h351.418182c25.6 0 48.872727 20.945455 48.872727 48.872727v351.418182c0 25.6-20.945455 48.872727-48.872727 48.872727H623.709091z" p-id="7685"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1552548744377" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2049" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M909.7 132.6v620H114.3v-620h795.4m50-50H64.3v720h895.5v-720h-0.1zM317.9 208.3L150.8 407.4l0.2 0.2 167.1 199.2 38.3-32.1-140.3-167.3 140.2-167-38.4-32.1z m389 0l-38.3 32.1 140.2 167-140.4 167.3 38.3 32.1 167.1-199.2 0.2-0.2-167.1-199.1z m-143.5 1.2l-149 403.4 46.9 17.3 149-403.4-46.9-17.3zM957 855.8H67v50h890v-50z" fill="#13227a" p-id="2050"></path></svg>
\ No newline at end of file
......@@ -2,11 +2,11 @@
<div>
<div class="shadow-content">
<div class="warn-content">
<svg-icon icon-class="table" />
<svg-icon icon-class="service"/>
基础服务
<div style="float: right;min-width: 300px;overflow: hidden">
<el-button type="warning" size="mini" round @click="getRepository('base')">新增服务</el-button>
<el-button type="warning" size="mini" round>刷新状态</el-button>
<el-button type="warning" size="mini" round @click="refresh">刷新状态</el-button>
<el-dropdown>
<el-button type="warning" size="mini" round>
更多操作
......@@ -52,7 +52,7 @@
点击
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>详细信息</el-dropdown-item>
<el-dropdown-item @click.native="getServiceDetails(scope.row)">详细信息</el-dropdown-item>
<el-dropdown-item>重置服务</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -62,12 +62,11 @@
</div>
<div v-for="(item,index) in typeList" :key="index" class="shadow-content">
<div class="warn-content">
<svg-icon icon-class="table" />
<svg-icon icon-class="service"/>
{{ item._id }}服务
<div style="float: right">
<el-button type="warning" size="mini" round @click="getRepository(item._id)">新增服务</el-button>
<el-button type="warning" size="mini" round>刷新状态</el-button>
<el-button type="warning" size="mini" round>重置所有UI服务</el-button>
<el-button type="warning" size="mini" round @click="refresh">刷新状态</el-button>
</div>
</div>
<el-table
......@@ -94,6 +93,17 @@
<el-table-column
prop="status"
label="运行状态"/>
<el-table-column
label="调试状态">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="控制台" placement="top">
<el-button type="primary" icon="el-icon-tickets" circle @click="linkShell(scope.row)"/>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="日志" placement="top">
<el-button type="success" icon="el-icon-time" circle @click="linkLog(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="更多" width="80" fixed="right">
<template slot-scope="scope">
<el-dropdown>
......@@ -101,8 +111,12 @@
点击
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="getServiceDetails(scope.row)">详细信息</el-dropdown-item>
<el-dropdown-item>重置服务</el-dropdown-item>
<el-dropdown-item @click.native="getServiceDetails(scope.row)"><svg-icon icon-class="detail"/>
详细信息</el-dropdown-item>
<el-dropdown-item @click.native="updateService(scope.row)"><svg-icon icon-class="f5"/>更新服务</el-dropdown-item>
<el-dropdown-item @click.native="updateDomain(scope.row)"><svg-icon icon-class="doamin"/>更新域名</el-dropdown-item>
<el-dropdown-item @click.native="restartService(scope.row)"><svg-icon icon-class="restart"/>重置服务</el-dropdown-item>
<el-dropdown-item style="color: red" @click.native="deleteService(scope.row) "><svg-icon icon-class="delete"/>删除服务</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
......@@ -115,14 +129,20 @@
:title="title">
<el-alert
:closable="false"
title="警告提示的文案"
title="温馨提醒"
type="warning"
description="文字说明文字说明文字说明文字说明文字说明文字说明"
description="该操作会创建这个服务最新的master版本。"
/>
<p class="title-sub">选择服务</p>
<el-row :gutter="20">
<el-col :span="14">
<el-select v-model="reponame" clearable filterable class="elSelect" placeholder="请选择服务,支持模糊搜索" @change="getTag">
<el-select
v-model="reponame"
clearable
filterable
class="elSelect"
placeholder="请选择服务,支持模糊搜索"
@change="getTag">
<el-option
v-for="(item,index) in options"
:key="index"
......@@ -148,6 +168,42 @@
<el-button type="primary" @click="CreateClusterService">确 定</el-button>
</span>
</el-dialog>
<!--更新服务的弹框-->
<el-dialog
:visible.sync="updateDialog"
title="更新服务">
<el-alert
:closable="false"
title="温馨提醒"
type="warning"
description="警告:该操作会将会更新这个服务为指定版本,在这个pod上做的所有操作将会丢失。"
/>
<p class="title-sub">选择服务</p>
<el-row :gutter="20">
<el-col :span="14">
<el-input
v-model="rename"
:disabled="true"
placeholder="请输入内容"/>
</el-col>
</el-row>
<p class="title-sub">选择镜像</p>
<el-row :gutter="20">
<el-col :span="14">
<el-select v-model="tagName" filterable clearable class="elSelect" placeholder="请选择镜像,支持模糊搜索">
<el-option
v-for="(item,index) in tagOptions"
:key="index"
:label="item.tagName"
:value="item.tagName"/>
</el-select>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="updateDialog = false">取 消</el-button>
<el-button type="primary" @click="updateClusterService()">确 定</el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="centerDialogVisible"
title="详细信息"
......@@ -170,9 +226,14 @@ import {
fetchTaglist,
getType,
CreateCluService,
fetchServiceDetails
fetchServiceDetails,
modifyCluService,
fetchServiceInstance,
deleteClusterService,
redeployClusterService
} from '@/api/docker'
import JsonEditor from '@/components/JsonEditor'
export default {
components: { JsonEditor },
data() {
......@@ -196,7 +257,9 @@ export default {
formInline: {
user: '',
region: ''
}
},
updateDialog: false,
rename: ''
}
},
created() {
......@@ -213,6 +276,13 @@ export default {
this.array2Object(servicelist)
})
},
refresh() {
this.getServicelist()
this.$message({
message: '状态已刷新',
type: 'success'
})
},
getRepository(type) {
this.type = type
this.reponame = ''
......@@ -235,7 +305,12 @@ export default {
CreateClusterService() {
const self = this
const image = `${this.server}/${this.reponame}:${this.tagName}`
CreateCluService({ serviceName: this.reponame.split('/')[1], namespace: this.namespace, image: image, type: this.type }).then(res => {
CreateCluService({
serviceName: this.reponame.split('/')[1],
namespace: this.namespace,
image: image,
type: this.type
}).then(res => {
if (res.data.code === '0000') {
this.$message({
message: res.data.data,
......@@ -263,6 +338,103 @@ export default {
this.value = res.data.data.service
})
},
updateService(value) {
this.tagName = ''
this.updateDialog = true
this.rename = value.serviceName
this.tagOptions = []
fetchTaglist({ reponame: 'qa-' + value.userLabels.type + '/' + this.rename }).then(res => {
if (res.data.data.tagCount) {
this.tagOptions = res.data.data.tagInfo
this.server = res.data.data.server
}
})
},
updateClusterService() {
const image = `${this.server}/${this.rename}:${this.tagName}`
const self = this
modifyCluService({ serviceName: this.rename, image: image, namespace: this.namespace }).then(res => {
if (res.data.code === '0000') {
this.$message({
message: '更新成功',
type: 'success',
duration: 1000,
onClose() {
self.updateDialog = false
self.getServicelist()
}
})
} else {
this.$message({
message: res.data.msg,
type: 'error'
})
}
})
},
restartService(data) {
redeployClusterService({ namespace: data.namespace, serviceName: data.serviceName }).then(res => {
if (res.data.code === '0000') {
this.$message({
type: 'success',
message: '服务重部署成功!'
})
} else {
this.$message({
type: 'error',
message: res.data.msg
})
}
})
},
updateDomain() {
alert('更新域名')
},
deleteService(data) {
this.$confirm('此操作将永久此服务, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteClusterService({ serviceName: data.serviceName, namespace: data.namespace }).then((res) => {
if (res.data.code === '0000') {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getServicelist()
} else {
this.$message({
type: 'error',
message: res.data.msg
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
linkShell(scopeData) {
fetchServiceInstance({ serviceName: scopeData.serviceName, namespace: scopeData.namespace }).then(res => {
const podName = res.data.data.instances[0].name
window.open(`http://172.30.220.24:9600/static/terminal.html?namespace=${scopeData.namespace}&pod=${podName}`, '_blank')
})
},
linkLog(scopeData) {
let path = ''
if (scopeData.userLabels.type === 'ui') {
path = '/usr/local/openresty/nginx/logs/access.log /usr/local/openresty/nginx/logs/error.log'
} else {
path = `/home/quant_group/logs/${scopeData.serviceName}.log`
}
fetchServiceInstance({ serviceName: scopeData.serviceName, namespace: scopeData.namespace }).then(res => {
const podName = res.data.data.instances[0].name
window.open(`http://172.30.220.24:9600/static/logs.html?namespace=${scopeData.namespace}&pod=${podName}&paths=${path}`, '_blank')
})
},
array2Object(original) { // 将数组转成对象存储
this.FormatTabledata = {}
original.forEach((item, index) => {
......@@ -281,11 +453,12 @@ export default {
}
</script>
<style scoped>
.title-sub{
.title-sub {
margin-top: 30px;
font-size: 15px;
}
.elSelect{
.elSelect {
width: 100%;
}
......
......@@ -33,13 +33,13 @@
<el-table-column
prop="description"
label="描述信息"/>
<el-table-column label="操作" min-width="100px">
<template slot-scope="scope">
<el-button type="infos" size="mini">备份</el-button>
<el-button size="mini" type="primary">挂起</el-button>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
<!--<el-table-column label="操作" min-width="100px">-->
<!--<template slot-scope="scope">-->
<!--<el-button type="infos" size="mini">备份</el-button>-->
<!--<el-button size="mini" type="primary">挂起</el-button>-->
<!--<el-button size="mini" type="danger">删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
</div>
</div>
......@@ -61,7 +61,12 @@ export default {
methods: {
fetchK8sList() {
fetchKubernetesList().then(res => {
this.tableData = res.data.data.namespaces
const exculde = ['default', 'kube-system']
this.tableData = res.data.data.namespaces.filter((item) => {
if (!exculde.includes(item.name)) {
return item
}
})
})
setTimeout(() => {
this.listLoading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment