Merge branch 'Web_Manager_Develope' of https://git.trustie.net/fhx569287825/aggregation-platform into Web_Manager_Develope

This commit is contained in:
Linda 2016-12-19 09:56:32 +08:00
commit db6799ce4f
41 changed files with 1888 additions and 1249 deletions

View File

@ -26,6 +26,7 @@ declare module Configs {
brick: Array<Brick>;
status: boolean;
editable: boolean;
hot: boolean;
}
interface Brick {
ip: Array<string>;

View File

@ -27,6 +27,7 @@ declare module Configs {
status: boolean;
path: string;
editable?: boolean;
hot?: number;
}
function formatVolumes(volumes: Array<volume>): void;
/**

View File

@ -12,6 +12,7 @@ declare module Developer {
priorTableSize: number;
keyQuery: any;
volumeType: number;
totlePage: number;
createParamData(): {
currentPageNum: number;
dataType: any;

View File

@ -223,7 +223,7 @@ declare module Kubernetes {
function getOracleStatus(labels: any): number;
function getExtractStatus(labels: any): number;
function getOracleName(replicas: any): string;
function extractDataToOracle($http: any, selectedReplicationControllers: any, targetOracle: Configs.oracleParam, fn?: (data, status) => void): void;
function extractDataToOracle($http: any, url: any, selectedReplicationControllers: any, targetOracle: Configs.oracleParam, fn?: (data, status) => void): void;
function checkoutOracleIsRunning(rc: any): boolean;
function replicasIsCreated(replicationcontrollers: Array<any>, name: string): boolean;
function loadConfigs(): {
@ -250,4 +250,5 @@ declare module Kubernetes {
function create_locadEffect(msg: any): void;
function createSuccessInfo(icon: string, msg: string): void;
function removeMask(): void;
function checkRCIsExtracting(selected: Array<any>): boolean;
}

View File

@ -67,7 +67,7 @@ declare module Kubernetes {
**/
function checkForExtract(replicationControllers: Array<any>): any[];
function checkIsStartSuccess(replicationControllers: Array<any>): any[];
function checkForMigration(replicationControllers: Array<KubePod>, transferTasks: Array<any>, selectItem: Array<any>): string;
function checkForMigration(replicationControllers: Array<KubePod>, transferTasks: Array<any>, selectItem: Array<any>, type: string): string;
function eliminateChechBoxClick(): void;
function alreadyExitInFolder(selectedItems: Array<any>, selectNode: any): boolean;
}

View File

@ -3,6 +3,10 @@
/// <reference path="systemHelpers.d.ts" />
/// <reference path="systemServices.d.ts" />
/// <reference path="../../configs/ts/configsUtils.d.ts" />
/// <reference path="../../kubernetes/ts/kubernetesHelpers.d.ts" />
/// <reference path="../../configs/ts/customAlert.d.ts" />
/// <reference path="../../configs/ts/configsDataService.d.ts" />
/// <reference path="../../kubernetes/ts/term.d.ts" />
declare module System {
var SystemVerificationController: ng.IModule;
}

View File

@ -272,420 +272,6 @@ legend {
top: 48%;
}
/* This is for the 'Overview' page with all the rows of boxes */
.service-view-rectangle {
position: relative;
margin-left: 0;
margin-right: 0px;
margin-bottom: 15px;
margin-top: 0;
background-color: #fafafa;
border-width: 1px;
border-style: solid;
border-color: #eeeeee;
}
.service-view-rectangle .service-view-header {
margin-top: 5px;
margin-bottom: 5px;
line-height: 20px;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-box {
background-color: #eeeeee;
display: inline-block;
font-size: smaller;
}
.service-view-rectangle .service-view-header-delete .red {
opacity: 0.5;
transition: opacity 1s;
font-size: larger;
}
.service-view-rectangle .service-view-header-delete:hover .red {
opacity: 1;
}
.service-view-rectangle .service-view-icon img {
width: 32px;
height: 32px;
margin-right: 6px;
}
.service-view-rectangle .service-view-name {
font-size: larger;
font-weight: bold;
}
.service-view-rectangle .service-view-detail-header {
padding-top: 5px;
padding-bottom: 5px;
line-height: 20px;
}
.service-view-rectangle .service-view-detail-rectangle {
background-color: #eeeeee;
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-rectangle .value {
font-weight: bold;
}
.service-view-rectangle .service-view-detail-pod-summary,
.service-view-rectangle .service-view-detail-pod-summary-expand {
display: inline-block;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 20px;
padding-right: 20px;
margin-right: 8px;
margin-bottom: 8px;
background-color: #ffffff;
}
.service-view-rectangle .service-view-detail-pod-summary table td,
.service-view-rectangle .service-view-detail-pod-summary-expand table td {
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-pod-status,
.service-view-rectangle .service-view-detail-pod-connect {
line-height: 36px;
padding-right: 20px;
}
.service-view-rectangle .service-view-detail-pod-status i,
.service-view-rectangle .service-view-detail-pod-connect i {
font-size: 36px;
display: inline-block;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-expand {
color: #a0a0a0;
font-size: 18px;
padding-right: 0px;
}
.kubernetes-view .filter-header {
margin-bottom: 1em;
}
/* This is all for the diagram, not the 'Overview' page */
.kubernetes-overview {
width: 100%;
height: 100%;
display: table;
table-layout: fixed;
}
.kubernetes-overview-row {
display: table-row;
}
.kubernetes-overview-cell {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 0;
}
.service-wrapper {
display: block;
vertical-align: middle;
}
.kubernetes-node {
margin-left: auto;
margin-right: auto;
cursor: pointer;
text-align: center;
vertical-align: middle;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
transition: background 0.5s;
z-index: 1000;
}
.kubernetes-host-container {
margin-top: 5px;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
text-align: center;
max-width: 600px;
min-width: 300px;
padding: 0;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.kubernetes-pod-node {
display: block;
margin: 0;
padding: 0;
min-height: 48px;
line-height: 48px;
border-radius: 0;
border: 1px solid transparent;
border-top: 1px solid #d4d4d4;
box-shadow: none;
vertical-align: middle;
}
.css-table {
display: table;
width: 100%;
height: 100%;
}
.css-table-row {
display: table-row;
}
.css-table-row .pod-status-cell {
text-align: left;
padding-left: 5px;
padding-right: 5px;
}
.css-table-row .pod-status-cell i {
margin-left: 3px;
margin-right: 3px;
}
.css-table-row .pod-status-cell .clickable {
width: auto !important;
}
.css-table-cell {
display: table-cell;
vertical-align: middle;
}
.kubernetes-pod-node i {
font-size: 24px;
}
.kubernetes-overview-services {
width: 200px;
}
.kubernetes-service-node {
display: block;
margin-bottom: 10px;
width: 200px;
min-height: 66px;
padding: 0;
line-height: 48px;
}
.kubernetes-service-node .node-body {
display: inline;
padding-left: 10px;
line-height: 64px;
font-size: 20px;
float: left;
}
.kubernetes-service-node .node-header {
display: inline;
float: right;
}
.node-header {
padding-right: 10px;
white-space: nowrap;
line-height: 64px;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-replicationController-node {
border-radius: 64px;
display: block;
width: 64px;
height: 64px;
padding: 7px;
font-weight: bold;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-overview-cell .app-icon-medium {
width: 48px;
height: 48px;
}
.kubernetes-replicationController-node img {
width: 64px;
}
.kubernetes-node:hover,
.kubernetes-node.hovered {
background: #ddddff;
}
.pod-status-cell {
width: 80px;
line-height: 20px;
}
.pod-label-cell {
float: right;
text-align: right;
min-height: 48px;
}
.pod-label-cell .ngCellText {
white-space: normal;
}
.pod-log-lines * {
padding-left: 5px;
padding-right: 5px;
font-family: monospace;
margin: 0;
line-height: 14px;
}
.pod-log-lines * .black {
color: #222;
}
.pod-log-lines * .red {
color: #f22;
}
.pod-log-lines * .green {
color: #2f2;
}
.pod-log-lines * .yellow {
color: #ff2;
}
.pod-log-lines * .blue {
color: #22f;
}
.pod-log-lines * .purple {
color: #f2f;
}
.pod-log-lines * .cyan {
color: #2dd;
}
.pod-log-lines * .white {
color: #ddd;
}
.top-bottom-middle {
line-height: 34px;
}
.terminal-window {
position: fixed;
bottom: 0;
background: white;
border: 1px solid #d4d4d4;
overflow: hidden;
z-index: 1040;
}
.terminal-window .resize-dot {
width: 16px;
height: 16px;
border: 1px solid #d4d4d4;
background: white;
position: absolute;
bottom: 10px;
right: 10px;
cursor: nwse-resize;
border-radius: 8px;
z-index: 10000;
}
.terminal-window.minimized .resize-dot,
.terminal-window.maximized .resize-dot {
display: none;
}
.terminal-window.minimized .terminal-title,
.terminal-window.maximized .terminal-title {
cursor: inherit;
}
.terminal-window .terminal-body {
overflow: auto;
}
.terminal-window .terminal-body .terminal-wrapper > .terminal * {
font-family: 'DroidSansMonoRegular';
}
.terminal-window .terminal-title {
cursor: move;
border-bottom: 1px solid #d4d4d4;
}
.terminal-window .terminal-title > h5 {
display: inline-block;
margin-left: 5px;
}
.terminal-window .terminal-title > i {
font-size: 16px;
margin-right: 5px;
margin-top: 7px;
}
kubernetes-container-terminal .terminal-wrapper {
display: block !important;
}
kubernetes-container-terminal .terminal-actions {
position: absolute !important;
}
.pod-log-window .scroll-indicator {
position: absolute;
bottom: 0;
line-height: 32px;
left: 20px;
right: 20px;
background-color: #ffffff;
border-top: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
border-right: 1px solid #d4d4d4;
border-radius: 4px 4px 0 0;
cursor: pointer;
z-index: 10000;
opacity: 0.7;
}
.pod-log-window .terminal-body {
overflow-y: auto;
overflow-x: hidden;
}
.layout-pf.layout-pf-fixed .container-pf-nav-pf-vertical {
margin-left: 170px;
}
.nav-pf-vertical {
width: auto;
min-width: 170px;
}
.nav-pf-vertical .list-group > .list-group-item > a {
width: auto;
}
.nav-pf-vertical > .list-group > .list-group-item > a .fa,
.nav-pf-vertical > .list-group > .list-group-item > a .glyphicon,
.nav-pf-vertical > .list-group > .list-group-item > a .pficon {
line-height: 25px;
margin-right: 3px;
}
.nav-pf-vertical > .list-group > .list-group-item > a img {
max-height: 16px;
max-width: 16px;
margin-right: 10px;
}
.navbar-tab-vertical {
height: 70px;
width: 100%;
display: block;
background: #1d1d1d;
border-color: #1d1d1d;
}
.navbar-tab-horizontal {
height: 100%;
width: 100px;
display: block;
background: #1d1d1d;
border-color: #1d1d1d;
}
.gesture {
cursor: pointer;
}
.navbar-lf {
width: 200px;
min-height: 800px;
background: #1d1d1d;
position: absolute;
left: 0;
top: 0px;
}
.navbar-lf-menu {
display: block;
text-decoration: none;
}
.log-img {
width: "66";
height: "21";
alt: "logo";
}
.fl {
float: left;
}
a.logo {
display: block;
width: 130px;
padding: 20px 0 0 40px;
}
.content-margin {
margin-left: 170px;
}
.environment-row a {
color: black;
}
@ -1164,3 +750,417 @@ a:hover.data_file_btn {
margin-left: -15px;
background: url(../img/icons2.gif) -6px 9px no-repeat;
}
/* This is for the 'Overview' page with all the rows of boxes */
.service-view-rectangle {
position: relative;
margin-left: 0;
margin-right: 0px;
margin-bottom: 15px;
margin-top: 0;
background-color: #fafafa;
border-width: 1px;
border-style: solid;
border-color: #eeeeee;
}
.service-view-rectangle .service-view-header {
margin-top: 5px;
margin-bottom: 5px;
line-height: 20px;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-box {
background-color: #eeeeee;
display: inline-block;
font-size: smaller;
}
.service-view-rectangle .service-view-header-delete .red {
opacity: 0.5;
transition: opacity 1s;
font-size: larger;
}
.service-view-rectangle .service-view-header-delete:hover .red {
opacity: 1;
}
.service-view-rectangle .service-view-icon img {
width: 32px;
height: 32px;
margin-right: 6px;
}
.service-view-rectangle .service-view-name {
font-size: larger;
font-weight: bold;
}
.service-view-rectangle .service-view-detail-header {
padding-top: 5px;
padding-bottom: 5px;
line-height: 20px;
}
.service-view-rectangle .service-view-detail-rectangle {
background-color: #eeeeee;
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-rectangle .value {
font-weight: bold;
}
.service-view-rectangle .service-view-detail-pod-summary,
.service-view-rectangle .service-view-detail-pod-summary-expand {
display: inline-block;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 20px;
padding-right: 20px;
margin-right: 8px;
margin-bottom: 8px;
background-color: #ffffff;
}
.service-view-rectangle .service-view-detail-pod-summary table td,
.service-view-rectangle .service-view-detail-pod-summary-expand table td {
padding-left: 10px;
padding-right: 10px;
}
.service-view-rectangle .service-view-detail-pod-status,
.service-view-rectangle .service-view-detail-pod-connect {
line-height: 36px;
padding-right: 20px;
}
.service-view-rectangle .service-view-detail-pod-status i,
.service-view-rectangle .service-view-detail-pod-connect i {
font-size: 36px;
display: inline-block;
vertical-align: middle;
}
.service-view-rectangle .service-view-detail-pod-expand {
color: #a0a0a0;
font-size: 18px;
padding-right: 0px;
}
.kubernetes-view .filter-header {
margin-bottom: 1em;
}
/* This is all for the diagram, not the 'Overview' page */
.kubernetes-overview {
width: 100%;
height: 100%;
display: table;
table-layout: fixed;
}
.kubernetes-overview-row {
display: table-row;
}
.kubernetes-overview-cell {
display: table-cell;
text-align: center;
vertical-align: middle;
padding: 0;
}
.service-wrapper {
display: block;
vertical-align: middle;
}
.kubernetes-node {
margin-left: auto;
margin-right: auto;
cursor: pointer;
text-align: center;
vertical-align: middle;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
transition: background 0.5s;
z-index: 1000;
}
.kubernetes-host-container {
margin-top: 5px;
margin-bottom: 5px;
margin-left: auto;
margin-right: auto;
text-align: center;
max-width: 600px;
min-width: 300px;
padding: 0;
border: 1px solid #d4d4d4;
background: white;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.kubernetes-pod-node {
display: block;
margin: 0;
padding: 0;
min-height: 48px;
line-height: 48px;
border-radius: 0;
border: 1px solid transparent;
border-top: 1px solid #d4d4d4;
box-shadow: none;
vertical-align: middle;
}
.css-table {
display: table;
width: 100%;
height: 100%;
}
.css-table-row {
display: table-row;
}
.css-table-row .pod-status-cell {
text-align: left;
padding-left: 5px;
padding-right: 5px;
}
.css-table-row .pod-status-cell i {
margin-left: 3px;
margin-right: 3px;
}
.css-table-row .pod-status-cell .clickable {
width: auto !important;
}
.css-table-cell {
display: table-cell;
vertical-align: middle;
}
.kubernetes-pod-node i {
font-size: 24px;
}
.kubernetes-overview-services {
width: 200px;
}
.kubernetes-service-node {
display: block;
margin-bottom: 10px;
width: 200px;
min-height: 66px;
padding: 0;
line-height: 48px;
}
.kubernetes-service-node .node-body {
display: inline;
padding-left: 10px;
line-height: 64px;
font-size: 20px;
float: left;
}
.kubernetes-service-node .node-header {
display: inline;
float: right;
}
.node-header {
padding-right: 10px;
white-space: nowrap;
line-height: 64px;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-replicationController-node {
border-radius: 64px;
display: block;
width: 64px;
height: 64px;
padding: 7px;
font-weight: bold;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
}
.kubernetes-overview-cell .app-icon-medium {
width: 48px;
height: 48px;
}
.kubernetes-replicationController-node img {
width: 64px;
}
.kubernetes-node:hover,
.kubernetes-node.hovered {
background: #ddddff;
}
.pod-status-cell {
width: 80px;
line-height: 20px;
}
.pod-label-cell {
float: right;
text-align: right;
min-height: 48px;
}
.pod-label-cell .ngCellText {
white-space: normal;
}
.pod-log-lines * {
padding-left: 5px;
padding-right: 5px;
font-family: monospace;
margin: 0;
line-height: 14px;
}
.pod-log-lines * .black {
color: #222;
}
.pod-log-lines * .red {
color: #f22;
}
.pod-log-lines * .green {
color: #2f2;
}
.pod-log-lines * .yellow {
color: #ff2;
}
.pod-log-lines * .blue {
color: #22f;
}
.pod-log-lines * .purple {
color: #f2f;
}
.pod-log-lines * .cyan {
color: #2dd;
}
.pod-log-lines * .white {
color: #ddd;
}
.top-bottom-middle {
line-height: 34px;
}
.terminal-window {
position: fixed;
bottom: 0;
background: white;
border: 1px solid #d4d4d4;
overflow: hidden;
z-index: 1040;
}
.terminal-window .resize-dot {
width: 16px;
height: 16px;
border: 1px solid #d4d4d4;
background: white;
position: absolute;
bottom: 10px;
right: 10px;
cursor: nwse-resize;
border-radius: 8px;
z-index: 10000;
}
.terminal-window.minimized .resize-dot,
.terminal-window.maximized .resize-dot {
display: none;
}
.terminal-window.minimized .terminal-title,
.terminal-window.maximized .terminal-title {
cursor: inherit;
}
.terminal-window .terminal-body {
overflow: auto;
}
.terminal-window .terminal-body .terminal-wrapper > .terminal * {
font-family: 'DroidSansMonoRegular';
}
.terminal-window .terminal-title {
cursor: move;
border-bottom: 1px solid #d4d4d4;
}
.terminal-window .terminal-title > h5 {
display: inline-block;
margin-left: 5px;
}
.terminal-window .terminal-title > i {
font-size: 16px;
margin-right: 5px;
margin-top: 7px;
}
kubernetes-container-terminal .terminal-wrapper {
display: block !important;
}
kubernetes-container-terminal .terminal-actions {
position: absolute !important;
}
.pod-log-window .scroll-indicator {
position: absolute;
bottom: 0;
line-height: 32px;
left: 20px;
right: 20px;
background-color: #ffffff;
border-top: 1px solid #d4d4d4;
border-left: 1px solid #d4d4d4;
border-right: 1px solid #d4d4d4;
border-radius: 4px 4px 0 0;
cursor: pointer;
z-index: 10000;
opacity: 0.7;
}
.pod-log-window .terminal-body {
overflow-y: auto;
overflow-x: hidden;
}
.layout-pf.layout-pf-fixed .container-pf-nav-pf-vertical {
margin-left: 170px;
}
.nav-pf-vertical {
width: auto;
min-width: 170px;
}
.nav-pf-vertical .list-group > .list-group-item > a {
width: auto;
}
.nav-pf-vertical > .list-group > .list-group-item > a .fa,
.nav-pf-vertical > .list-group > .list-group-item > a .glyphicon,
.nav-pf-vertical > .list-group > .list-group-item > a .pficon {
line-height: 25px;
margin-right: 3px;
}
.nav-pf-vertical > .list-group > .list-group-item > a img {
max-height: 16px;
max-width: 16px;
margin-right: 10px;
}
.navbar-tab-vertical {
height: 70px;
width: 100%;
display: block;
background: #1d1d1d;
border-color: #1d1d1d;
}
.navbar-tab-horizontal {
height: 100%;
width: 100px;
display: block;
background: #1d1d1d;
border-color: #1d1d1d;
}
.gesture {
cursor: pointer;
}
.navbar-lf {
width: 200px;
min-height: 800px;
background: #1d1d1d;
position: absolute;
left: 0;
top: 0px;
}
.navbar-lf-menu {
display: block;
text-decoration: none;
}
.log-img {
width: "66";
height: "21";
alt: "logo";
}
.fl {
float: left;
}
a.logo {
display: block;
width: 130px;
padding: 20px 0 0 40px;
}
.content-margin {
margin-left: 170px;
}

File diff suppressed because one or more lines are too long

View File

@ -155,20 +155,20 @@
</li>
</ul>
</nav>
<div class="sj_content_position clear" style="margin-top:70px;">
<ul>
<div class="sj_content_position clear" style="margin-top:50px;">
<!--<ul>
<li class="sj_icons_home"></li>
<li>当前位置:</li>
<li><a href="#">数据汇总</a> <span>&gt;</span></li>
<li><a href="#">社保系统</a><span>&gt;</span></li>
<li><a href="#">批次A</a></li>
</ul>
</ul>-->
</div>
<platform-sub-tabs-outlet></platform-sub-tabs-outlet>
<div id="main" class="container-fluid container-pf-nav-pf-vertical container-pf-nav-pf-vertical-with-secondary content-margin" ng-controller="HawtioNav.ViewController" hawtio-main-outlet>
<div class="row" ng-class="getClass()">
<hawtio-breadcrumbs-outlet></hawtio-breadcrumbs-outlet>
</div>
<hawtio-breadcrumbs-outlet></hawtio-breadcrumbs-outlet>
</div>
<div class="row" ng-class="getClass()">
<div ng-include src="viewPartial">
</div>

View File

@ -28,7 +28,9 @@
<span class="">云路径:{{volume.path}}</span>
</th>
<th class="no-fade table-header sj_table_td02">
<span class=""></span>
<span class="">存储类型:</span>
<span ng-show="{{volume.hot==0}}">热区</span>
<span ng-show="{{volume.hot==1}}">冷区</span>
</th>
<th class="no-fade table-header">
<span class="">已用&nbsp;{{volume.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{{volume.formatTotalSize}}</span>
@ -59,7 +61,7 @@
<span class="sj_table_td02">存储路径:{{row.path}}</span>
</td>
<td>
<span class="">已用&nbsp;{{row.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;{{row.formatAllSize}}</span>
<span class="">已用&nbsp;{{row.formatUsedSize}}&nbsp;&nbsp;/&nbsp;&nbsp;可用&nbsp;{{row.formatAllSize}}</span>
</td>
<td></td>
</tr>

View File

@ -105,6 +105,15 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">标准表汇总库</label>
<div class="col-sm-10 sj_form_input">
<select class="form-control" ng-model="tableForm.type">
<option value=0 ng-selected="tableForm.type==0" selected></option>
<option value=1 ng-selected="tableForm.type==1"></option>
</select>
</div>
</div>
<div class="form-group" style="margin-left:140px;">
<button class="btn sj_btn_blue" type='submit' style="color:#fff;" >
<span class="glyphicon glyphicon-save "></span> 保存

View File

@ -40,10 +40,6 @@
<th>
<input type="text" class="sj_txt_box02 mr5" name="volumePath" ng-model="ngDialogData.path" ng-disabled="!{{ngDialogData.editable}}" ng-pattern="/^(\/[a-z0-9A-Z _\-.%]+)+$/" required="required" />
</th>
<!--<th>
<button ng-show="ngDialogData.status" class="sj_btn_red fl" ng-click="stopVolume(ngDialogData)">停止</button>
<button ng-hide="ngDialogData.status" class="sj_btn_blue fl" ng-click="startVolume(ngDialogData)">启动</button>
</th> -->
</tr>
<tr ng-repeat="row in ngDialogData.brick">
<th class="new_left">
@ -88,8 +84,11 @@
</th>
<!--<th>
<button class="sj_btn_grey mr5" ng-click="cancel()">取消</button>
</th>
<!--<th colspan="5">&nbsp;{{message}}</th>-->
</th> -->
<th colspan="5" ng-show="!ngDialogData.name">
<span>是否为热区</span>
<input type="checkbox" checked="checked" name="hot" ng-model="ngDialogData.hot"/>
</th>
</tr>
</tbody>
</table>
@ -239,7 +238,7 @@
<button class="btn pull-right sj_btn_blue " ng-click="replace()">
替换
</button>
<button class="sj_btn_grey mr5 fr" ng-click="cancel()">取消</button>
<button class="sj_btn_grey mr5 fr" ng-click="cancel()">保留</button>
</div>
</div>
</script>
@ -414,6 +413,16 @@
</div>
</script>
<script type="text/ng-template" id="uploadErrorInfo.html">
<div class="container-fluid">
<div class="row">
<span class="col-md-5"">错误信息:</span>
</div>
<div class="row" ng-repeat="info in ngDialogData">
<span>{{info}}</span>
</div>
</div>
</script>
<div ng-controller="Kubernetes.TopLevel">
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>

View File

@ -147,12 +147,14 @@ module Configs{
editable: block.editable || false
});
});
return {
name: volume.name,
path: volume.path,
brick: brick,
status: volume.status,
editable: volume.editable || false
editable: volume.editable || false,
hot: volume.hot == 0 ? true : false
}
}
@ -169,7 +171,8 @@ module Configs{
path: string
brick: Array<Brick>;
status: boolean;
editable: boolean
editable: boolean,
hot: boolean
}
export interface Brick{

View File

@ -29,7 +29,8 @@ module Configs{
folder?: Array<any>; //volume的文件
status: boolean;
path: string;
editable?: boolean
editable?: boolean,
hot?: number
}
//字节大小转换成字符大小
@ -103,7 +104,7 @@ module Configs{
//this.updateCodeInfo();
}
public updateVolumeData(){
var result=null;
var result=null;
$.ajax({
async: false,
type : "POST",

View File

@ -151,9 +151,10 @@ module Configs{
export function FileInputPlugin(fn: Function, isMultiple?:boolean){
var inputObj = document.createElement('input');
inputObj.setAttribute('id','myFileInput');
inputObj.setAttribute('type','file');
inputObj.setAttribute("style",'visibility:hidden');
inputObj.setAttribute('id', 'myFileInput');
inputObj.setAttribute('type', 'file');
inputObj.setAttribute("style", 'visibility:hidden');
inputObj.setAttribute("accept", "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
if(isMultiple)
inputObj.setAttribute("multiple", "multiple");
document.body.appendChild(inputObj);

View File

@ -35,7 +35,7 @@ module Configs{
}
}
function get_width() {
function get_width() {
return (document.body.clientWidth + document.body.scrollLeft);
}

View File

@ -31,14 +31,15 @@ module Configs{
status: false,
editable: true
}],
editable: true
editable: true,
hot: true
},
className: 'ngdialog-theme-default'
});
}
$scope.editRow = (volume) => {
var fVolume = formatVolume(volume);
var fVolume = formatVolume(volume);
ngDialog.open({
template: 'newDialog.html',
width: 1005,
@ -126,7 +127,9 @@ module Configs{
ip.push(brick["ip"][key]);
brick["ip"] = ip.join("\.");
}
});
});
data.hot = data.hot == true ? 0 : 1;
var spinner;

View File

@ -45,7 +45,12 @@ module Configs{
{
field: "suffix",
displayName: "表后缀"
},
},
{
field: "type",
displayName: "标准表汇总库",
cellTemplate: $templateCache.get("strandColumn.html")
},
{
field: "entity",
displayName: "操作",
@ -67,7 +72,8 @@ module Configs{
$scope.add= true;
$scope.edit = false;
$scope.tableForm = {};
$scope.tableForm["id"]=0;
$scope.tableForm["id"]=0;
$scope.tableForm["type"]=0;
}
$scope.cancel = () => {

View File

@ -67,7 +67,8 @@ module Configs{
}
$scope.onSubmit = (entity) => {
$scope.onSubmit = (entity) => {
console.log(entity);
if($scope.volumeForm.$valid){
$scope.$emit('update', entity);
$scope.closeThisDialog();
@ -103,14 +104,14 @@ module Configs{
if(typeof FileReader == 'undefined'){
throw "浏览器不支持FileReader读取文件";
}else{
Configs.FileInputPlugin((file) =>{
$scope.enable = true;
Configs.FileInputPlugin((file) =>{
if(typeof typeof FileReader == 'undefined')
throw "浏览器不支持FileReader读取文件";
else{
var fr = new FileReader();
fr.onloadend = (e) =>{
$scope.new_content = e.target["result"];
$scope.enable = true;
}
fr.onloadstart = () =>{
@ -153,14 +154,14 @@ module Configs{
$scope.content = "";
$scope.title = shareInit($scope.ngDialogData);
$scope.sqlFileUpload = () =>{
Configs.FileInputPlugin((file) =>{
$scope.enable = true;
if(typeof typeof FileReader == 'undefined')
Configs.FileInputPlugin((file) =>{
if(typeof FileReader == 'undefined')
throw "浏览器不支持FileReader读取文件";
else{
var fr = new FileReader();
fr.onloadend = (e) =>{
$scope.content = e.target["result"];
$scope.enable = true;
}
fr.onloadstart = () =>{
@ -230,7 +231,15 @@ module Configs{
}
$scope.cancel = () => {
$scope.closeThisDialog();
//$scope.closeThisDialog();
$scope.$emit("replace", {
url: "/java/console/api/filePackage/handleSqlFile",
item: $scope.ngDialogData.item,
content: $scope.content,
opt: "delete",
type: $scope.ngDialogData.type
});
$scope.closeThisDialog();
}
}]);

View File

@ -8,7 +8,7 @@
<li role="presentation" ng-repeat="item in navbarItems" class="{{item.class}}"><a href="#" ng-click="selectBatchItem(item)">{{item.label}}</a></li>
</ul>
<div class="fr sj_searchbox">
<input type="text" class="sj_search_input" ng-model="keyQuery" placeholder="请选择或输入关键字,多关键字请用空格隔开" onkeydown="if(event.keyCode==13){searchButton.click()}"/>
<input type="text" class="sj_search_input" ng-model="keyQuery" placeholder="请选择或输入关键字,多关键字请用空格隔开" onkeydown="if(event.keyCode==13){searchButton.click()}" />
<a href="#" class="sj_search_btn" id="searchButton" ng-click="search()"></a>
</div>
</div>
@ -30,19 +30,19 @@
<i class="glyphicon glyphicon-export"></i> 迁移
</button>
<span class="pull-right">&nbsp;</span>
<button class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="createOracleService(id || tableConfig.selectedItems)">
<button ng-show="isShow" class="btn pull-right sj_btn_grey " ng-disabled="!id && tableConfig.selectedItems.length == 0" ng-click="createOracleService(id || tableConfig.selectedItems)">
<i class="glyphicon glyphicon-play-circle"></i> 启动
</button>
</div>
<ul class="fr sj_table_bottom">
<li class="mr5 ">当前显示1~{{model.data.length}}行,共{{model.data.length}}行。</li>
<li class="mr5 ">每页显示
<select ng-options="value for value in pageSizeChoses" ng-change="selectAction()" ng-model="options.currentTableSize"></select>
</li>
<li class="mr5 ">当前显示{{(model.paramOptions.currentPageNum-1)*20 + 1}}~{{(model.paramOptions.currentPageNum-1)*20 + model.data.length}}行,共{{model.paramOptions.totalSize}}行,</li>
<!--<li class="mr5 ">每页显示
<select ng-options="value for value in pageSizeChoses" ng-cha=nge="selectAction()" ng-model="options.currentTableSize"></select>
</li>-->
<li class="mr5 ">当前页码</li>
<li>
<div class="hawtio-pager clearfix">
<label>{{options.currentPageNum}} / {{options.getPageSizeNum()}}</label>
<label>{{model.paramOptions.currentPageNum}} / {{model.paramOptions.totlePage}}</label>
<div class=btn-group>
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="first()"><i class="fa fa-fast-backward"></i></button>
<button class="btn sj_btn_grey" ng-disabled="isEmptyOrFirst()" ng-click="previous()"><i class="fa fa-step-backward"></i></button>
@ -65,7 +65,7 @@
<label class="col-sm-3 control-label sj_contro_label" for="selectedItem ">
请选择迁移集群
</label>
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" title="name of the new namespace " id="selectedItem " ng-options="x.name for x in volumes " />
<select ng-model="migrationClick.selectedItem " class="col-sm-3 sj_modal_select" id="selectedItem " ng-options="x.name for x in volumes " />
</div>
<div class="form-group">
<div class="col-sm-12 alert alert-warning" ng-show="!volumes || volumes.length == 0">

View File

@ -11,7 +11,8 @@ module Developer{
public totalSize = null;
public priorTableSize = 20;
public keyQuery = null;
public volumeType = 1;
public volumeType = 1;
public totlePage = 1;
public createParamData(){
var extendValue =["cityName", "districtName", "dataVersion", "systemName", "dataYear"];
@ -33,8 +34,9 @@ module Developer{
return result;
}
public getPageSizeNum(){
var num = Math.ceil(this.totalSize/this.currentTableSize);
public getPageSizeNum(){
var num = Math.ceil(this.totalSize/this.currentTableSize);
console.log(this.totalSize);
if(num < this.currentPageNum)
num = this.currentPageNum;
return num;
@ -49,6 +51,9 @@ module Developer{
year: year
}
}
function createAlias(cityName:string, districtName:string, systemName:string, version:string, year:string){
return cityName + "_" + districtName + "_" + systemName + "_" + year + "_版本" + version;
}
function createKey(regionalismCode, systemId, version){
return regionalismCode + "-" + systemId + "-" + version;
}
@ -59,6 +64,15 @@ module Developer{
return result;
}
function createItemsAlias(items: Array<any>){
var result = [];
angular.forEach(items, (item) => {
item.alias = createAlias(item.cityName, item.districtName, item.systemName, item.dataVersion, item.year);
result.push(item);
});
return result;
}
function populateLabel(item){
var result = item
result["labels"] = createLabel(item.cityName, item.districtName, item.systemName, item.dataVersion, item.year);
@ -106,22 +120,25 @@ module Developer{
function formatTask(items:Array<any>){
var result = [];
angular.forEach(items, (item) => {
result.push({
id: item.id,
_key: item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion,
name: item.cityName+ "-" + item.districtName,
systemName: item.systemName,
status: item.completeStatus,
process: item.rate,
from: item.dataPath,
to: item.dstPath,
labels:{
dataType: item.dataType,
batch: "批次"+item.submittedBatch,
dataVersion: "版本"+item.dataVersion,
dataYear: item.year
}
});
var tmp_batch="";
if(item.submittedBatch.indexOf("批次")==-1){
tmp_batch="批次"+item.submittedBatch;
}else{
tmp_batch=item.submittedBatch;
}
item["_key"] = item.regionalismCode + "-" + item.systemCode + "-" + item.dataVersion;
item["name"] = item.cityName+ "-" + item.districtName;
item["status"] = item.completeStatus;
item["from"] = item.dataPath;
item["process"] = item.rate;
item["to"] = item.dstPath;
item["labels"] ={
dataType: item.dataType,
batch: tmp_batch,
dataVersion: "版本"+item.dataVersion,
dataYear: item.year
}
result.push(item);
});
return result;
}
@ -144,9 +161,10 @@ module Developer{
url : "/java/console/api/data.json",
dataType : 'json',
data: createParamData(paramOptions),
success : function(data) {
success : function(data) {
result = data.data;
paramOptions.totalSize=data.length;
paramOptions.totalSize = data.length;
paramOptions.totlePage = data.page.totlePage;
}
});
return result;
@ -166,6 +184,7 @@ module Developer{
this.data = populateKeys(this.data);
this.data = populateNames(this.data);
this.data = populateLabels(this.data);
this.data = createItemsAlias(this.data);
}
//更新用户选择参数

View File

@ -68,6 +68,6 @@ module Developer {
if(status === 200)
console.log("删除成功");
});
});
});
}]);
}

View File

@ -13,13 +13,12 @@ module Developer {
export var WorkspacesController = controller("WorkspacesController", ["$scope", "KubernetesModel", "DataModel", "ConfigsModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL", "$element", "ngDialog",
($scope, KubernetesModel: Kubernetes.KubernetesModelService, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService, KubernetesState, $templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL, $element, ngDialog) => {
$scope.model=DataModel;
$scope.replicasModel = KubernetesModel;
init($scope, $location, $routeParams);
$scope.replicasModel = KubernetesModel;
$scope.options = DataModel.paramOptions;
$scope.pageSizeChoses = DataModel.paramOptions.pagerSizeOption;
var result = getDataType($location)
$scope.options.dataType = result["dataType"];
$scope.options.volumeType = result["volumeType"];
var result = getDataType($location);
$scope.treeOptions = {
nodeChildren: "childNodes",
@ -65,6 +64,10 @@ module Developer {
return field.systemCode;
}
},
{
field: "dataBaseType",
displayName: '数据库类型',
},
{
field: "labels",
displayName: '数据标签',
@ -82,7 +85,7 @@ module Developer {
field: "extractStatus",
displayName: '汇总状态',
cellTemplate: $templateCache.get("dataExtractTemplate.html")
}
}
],
sortInfo: {
sortBy: "_key",
@ -90,28 +93,33 @@ module Developer {
}
};
init($scope, $location, $routeParams);
$scope.model.paramOptions.dataType = result["dataType"];
$scope.model.paramOptions.volumeType = result["volumeType"];
$scope.$on("dataLabelFilterUpdate", ($event, text, key) => {
$scope.keyQuery += " " + text;
})
$scope.selectBatchItem = (item)=> {
$scope.selectBatchItem = (item)=> {
$scope.navbarItems.forEach((nav) =>{
nav.class="";
});
item.class="active";
$scope.model.updateParamOption("currentPageNum", 1);
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
$scope.model.updateParamOption("dataBatch", item.alias);
}
$scope.isEmptyOrFirst = () => {
var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum();
var length =$scope.model.paramOptions.totlePage;
return length <= 0 || idx <= 1;
}
$scope.isEmptyOrLast = () =>{
var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum();
var length =$scope.model.paramOptions.totlePage;
return length < 1 || idx >= length;
}
@ -125,7 +133,7 @@ module Developer {
$scope.last = () =>{
var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum();
var length =$scope.model.paramOptions.totlePage;
if(idx < length){
Kubernetes.eliminateChechBoxClick();
$scope.model.updateParamOption("currentPageNum", length);
@ -134,7 +142,7 @@ module Developer {
$scope.previous = () => {
var idx = $scope.model.getParamOption("currentPageNum");
var length =$scope.options.getPageSizeNum();
var length =$scope.model.paramOptions.totlePage;
if(idx > 1){
Kubernetes.eliminateChechBoxClick();
$scope.model.updateParamOption("currentPageNum", idx-1);
@ -142,7 +150,7 @@ module Developer {
}
$scope.next = () =>{
var length =$scope.options.getPageSizeNum();
var length =$scope.model.paramOptions.totlePage;
var idx = $scope.model.getParamOption("currentPageNum");
if(idx < length){
Kubernetes.eliminateChechBoxClick();
@ -150,8 +158,8 @@ module Developer {
}
}
$scope.$watch('options', (newValue, oldValue) => {
if(newValue){
$scope.$watch('model.paramOptions', (newValue, oldValue) => {
if(newValue){
if(newValue.currentTableSize !== oldValue.currentTableSize)
$scope.options.priorTableSize = oldValue.currentTableSize;
else
@ -162,6 +170,8 @@ module Developer {
}, true);
$scope.search = () => {
//$scope.model.initParamOptions();
$scope.model.paramOptions.currentPageNum = 1;
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
}
@ -175,7 +185,7 @@ module Developer {
/*
使
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems);
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems, "manager");
if(message != ""){
Configs.customAlert("提示", "操作失败:" + message + ",不能删除!", '',null, 0, "error");
return;
@ -183,7 +193,7 @@ module Developer {
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
collection: selected,
index: 'id',
index: 'alias',
onClose: (result:boolean) => {
var idColl = [];
if (result) {
@ -223,6 +233,7 @@ module Developer {
,$http:发生http异步请求url;
*/
if(Kubernetes.alreadyExitInFolder($scope.tableConfig.selectedItems, $scope.selectNode)){
migrationClick.close();
Configs.customAlert("提示", "操作失败:" + "数据已在当前目录!", '',null, 0, "error");
@ -250,10 +261,16 @@ module Developer {
},
open: (selected) =>{
var migrationClick = $scope.migrationClick;
ConfigsModel.updateVolumeData();
if(ConfigsModel.cluster!=null)
$scope.volumes = ConfigsModel.cluster;
/*
使
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems);
*/
var message = Kubernetes.checkForMigration($scope.replicasModel.replicationControllers, $scope.model.transferTasks , $scope.tableConfig.selectedItems, "manager");
if(message == ""){
if($scope.volumes && $scope.volumes instanceof Array && $scope.volumes.length >0)
@ -269,10 +286,18 @@ module Developer {
}
};
$scope.createOracleService = (items) =>{
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
$scope.createOracleService = (items) =>{
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
for (var i = 0; i < items.length; ++i) {
// code...
if(items[i].dataBaseType != 'ORACLE'){
Configs.customAlert("提示", "操作失败: 非ORACLE数据不需要挂载启动", '', null, 0, "error");
return;
}
}
if(exitedItems.length == 0){
angular.forEach(items,(item)=>{
angular.forEach(items,(item)=>{
console.log(item);
var isExited = Kubernetes.checkForExit($scope.replicasModel.replicationControllers, item);
if(!isExited){
Kubernetes.createRC({
@ -287,7 +312,8 @@ module Developer {
districtName: item.districtName,
systemName: item.systemName,
id: item.id+"",
year: item.year
year: item.year,
checkoutFlag: item.checkoutFlag
},
path: item.dataPath+"app/",
isTarget: "false",
@ -310,9 +336,9 @@ module Developer {
}
}
function init($scope,$location,$routeParams){
//$scope.model.updateModel();
function init($scope,$location,$routeParams){
$scope.keyQuery = "";
$scope.model.initParamOptions();
$scope.model.updateParamOption("keyQuery", $scope.keyQuery);
if(ConfigsModel.cluster!=null)
$scope.volumes = ConfigsModel.cluster;
@ -339,14 +365,27 @@ module Developer {
title: "查看批次B的数据",
class: "",
alias: "B"
}]
}];
if(!($location.path().indexOf("hot") > -1)){
$scope.tableConfig.columnDefs.splice(7,0,{
field: "existHotData",
displayName: '是否已在热区',
cellTemplate: $templateCache.get("isExistHot.html")
});
}
}
function getDataType($location){
var path = $location.path();
var dataType;
var volumeType;
var subPath = path.split("/");
var subPath = path.split("/");
if(path.indexOf("hot") > -1)
$scope.isShow = true;
else
$scope.isShow = false;
switch (subPath[subPath.length -1]) {
case "financial":
dataType = "财政";
@ -364,7 +403,7 @@ module Developer {
break;
default:
volumeType = 1
}
}
return {
"dataType": dataType,
"volumeType": volumeType

View File

@ -5,9 +5,7 @@
</script>
<script type="text/ng-template" id="idTemplate.html">
<div class="ngCellText nowrap">
<a href="" title="View details for {{row.entity.metadata.name || row.entity.name}}">
<!--<img class="app-icon-small" ng-src="{{row.entity.$iconUrl}}" ng-show="row.entity.$iconUrl">-->
<strong>{{row.entity.$oracleName || row.entity.name}}</strong></a>
<strong>{{row.entity.$oracleName || row.entity.name}}</strong>
</div>
</script>
<script type="text/ng-template" id="selectorTemplate.html">
@ -34,20 +32,20 @@
<a ng-show="row.entity.$podCounters.podsLink" title="pods status">
<span ng-show="row.entity.$extractStatus === 0" class="badge badge-info"> 待汇总</span>
<div ng-show="row.entity.$extractStatus === 1">
<span class="badge badge-success" > 汇总中</span>
<span class="badge badge-success"> 汇总中</span>
<span ng-include="'oracleLogTemplate.html'"></span>
</div>
<div ng-show="row.entity.$extractStatus === 2">
<span class="badge" > 已完成</span>
<span class="badge"> 已完成</span>
<span ng-include="'oracleLogTemplate.html'"></span>
</div>
</div>
</a>
</div>
</script>
<script type="text/ng-template" id="labelTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Labels">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="label in labels track by $index" class="pod-label badge" ng-class="labelClass(label.key)" ng-click="handleClick(entity, label.key, label)" title="{{label.key}}"><span class="glyphicon glyphicon-tag"/> {{label.title}}</span>
<span ng-repeat="label in labels track by $index" class="pod-label badge" ng-class="labelClass(label.key)" ng-click="handleClick(entity, label.key, label)"><span class="glyphicon glyphicon-tag"/> {{label.title}}</span>
</div>
</script>
<script type="text/ng-template" id="eventSourceTemplate.html">
@ -59,7 +57,7 @@
<script type="text/ng-template" id="dataLabelsTemplate.html">
<div class="ngCellText" ng-init="labels=row.entity.labels" ng-controller="Kubernetes.DataLabels">
<p ng-show="data"><strong>Labels</strong></p>
<span ng-repeat="(key, value) in labels track by $index" class="pod-label badge" ng-class="labelClass(key)" ng-click="labelClick(entity, key, value)" title="{{key}}"><span class="glyphicon glyphicon-tag"/> {{value}}</span>
<span ng-repeat="(key, value) in labels track by $index" class="pod-label badge" ng-class="labelClass(key)" ng-click="labelClick(entity, key, value)"><span class="glyphicon glyphicon-tag"/> {{value}}</span>
</div>
</script>
<script type="text/ng-template" id="hostTemplate.html">
@ -213,9 +211,12 @@
</script>
<script type="text/ng-template" id="taskEdit.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.TaskEdit">
<button class="btn sj_btn" ng-click="showDeleteOne.open(entity)">
<button class="btn sj_btn" ng-click="showDeleteOne.open(entity)" ng-disabled="entity.status == 1 || entity.status == 0">
<span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;删除
</button>
<button class="btn sj_btn" ng-click="showCancelOne.open(entity)" ng-disabled="entity.process == 100 || entity.status = 3">
<span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;取消
</button>
<div hawtio-confirm-dialog="showDeleteOne.show" title="是否删除任务?" ok-button-text="确认" cancel-button-text="取消" on-cancel="showDeleteOne.onCancelled()" on-ok="showDeleteOne.onOk()">
<div class="dialog-body">
<p>
@ -223,6 +224,13 @@
</p>
</div>
</div>
<div hawtio-confirm-dialog="showCancelOne.show" title="是否取消任务?" ok-button-text="确认" cancel-button-text="取消" on-cancel="showCancelOne.onCancelled()" on-ok="showCancelOne.onOk()">
<div class="dialog-body">
<p>
是否取消:{{entity.name}}-{{entity.systemName}} 任务?
</p>
</div>
</div>
</div>
</script>
<!-- 迁移进度条 -->
@ -242,7 +250,7 @@
<div ng-show="entity.status == 0">
<sapn class="glyphicon glyphicon-minus"> 待迁移
</div>
<div ng-show="entity.status == 1">
<div ng-show="entity.status == 1">
<span class="glyphicon glyphicon-transfer"> 迁移中
</div>
<div ng-show="entity.status == 2">
@ -261,19 +269,40 @@
<script type="text/ng-template" id="dataExtractTemplate.html">
<div class="ngCellText" ng-init="entity=row.entity">
<span ng-show="entity.extractStatus == 0" class="badge badge-info"> 待汇总</span>
<span ng-show="entity.extractStatus == 1" class="badge badge-success"> 汇总中</span>
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
</div>
<span ng-show="entity.extractStatus == 1" class="badge badge-success"> 汇总中</span>
<span ng-show="entity.extractStatus == 2" class="badge"> 已完成</span>
</div>
</script>
<script type="text/ng-template" id="loadingMask.html">
<div class="custom-alert">
<div class="custom-alert">
<div id="loading">
<span ng-bind="ngDialogData.msg" />
</div>
</div>
</div>
</script>
<script type="text/ng-template" id="dataCheckStatus.html">
<div class="ngCellText" ng-init="entity=row.entity">
<span ng-show="entity.metadata.annotations.checkoutFlag == 0">未校验</span>
<span ng-show="entity.metadata.annotations.checkoutFlag == 1">已校验</span>
<span ng-show="entity.metadata.annotations.checkoutFlag == 2">校验中</span>
</div>
</script>
<script type="text/ng-template" id="strandColumn.html">
<div class="ngCellText" ng-init="entity=row.entity">
<div ng-show="true" title="是否是标准表汇总库">
<span ng-show="entity.type == 0">&nbsp;</span>
<span ng-show="entity.type == 1">&nbsp;</span>
</div>
</div>
</script>
<script type="text/ng-template" id="isExistHot.html">
<div class="ngCellText" ng-init="entity=row.entity">
<div ng-show="true" title="是否是标准表汇总库">
<span ng-show="entity.existHotData == 0">&nbsp;</span>
<span ng-show="entity.existHotData == 1">&nbsp;</span>
</div>
</div>
</script>
<div ng-controller="Kubernetes.TopLevel">
<div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
<div class="row kubernetes-view" ng-view></div>

View File

@ -4,7 +4,7 @@
<span class="fa fa-caret-down"></span>
</div>
<div class="terminal-title" ng-mousedown="mouseDown($event)" ng-mouseup="mouseUp($event)" ng-mousemove="mouseMove($event)">
<h5 class="top-bottom-middle">{{containerName}}的汇总日志</h5>
<h5 class="top-bottom-middle">{{containerName}}的抽取日志</h5>
<i class="fa fa-remove pull-right clickable" title="Close and exit this log" ng-click="close()"></i>
<i class="fa fa-square-o pull-right clickable" title="Maximize this log" ng-click="maximize($event)"></i>
<i class="fa fa-sort-desc pull-right clickable" ng-hide="maximized()" title="Minimize this log" ng-click="minimize($event)"></i>

View File

@ -61,7 +61,14 @@
ng-click="extractClick.open(id || tableConfig.selectedItems)">
<i class="glyphicon glyphicon-cloud-download"></i> 汇总
</button>
<!--<span ng-include="'runButton.html'"></span>-->
<span class="pull-right">&nbsp;</span>
<button ng-show="model.fetched"
ng-disabled="!id && tableConfig.selectedItems.length == 0"
class="btn btn-success pull-right sj_btn_grey"
ng-click="extractOracle(id || tableConfig.selectedItems)">
<i class="glyphicon glyphicon-cloud-download"></i> 抽取
</button>
</div>
</div>
<div class="row">

View File

@ -1816,7 +1816,7 @@ module Kubernetes {
return annotation["cityName"] + "-" + annotation["districtName"] + "-" + annotation["systemName"];
}
export function extractDataToOracle($http, selectedReplicationControllers, targetOracle: Configs.oracleParam, fn?:(data, status) => void){
export function extractDataToOracle($http, url, selectedReplicationControllers, targetOracle: Configs.oracleParam, fn?:(data, status) => void){
//console.log(targetReplicationController.length);
var answer = targetOracle && true;
var inneedOracle = [];
@ -1836,7 +1836,7 @@ module Kubernetes {
var spinner;
$.ajax({
type: "POST",
url: UrlHelpers.join("/java/console/api/oracle", targetOracle.id+"", "extract"),
url: UrlHelpers.join(url, targetOracle.id+"", "extract"),
timeout: 8000,
dataType: 'json',
//async: false,
@ -1851,7 +1851,7 @@ module Kubernetes {
complete: (XMLHttpRequest, textStatus) => {
if(XMLHttpRequest.status == 200){
//spinner.spin();
Kubernetes.createSuccessInfo("success", "连接汇总库成功,即将执行汇总操作!");
Kubernetes.createSuccessInfo("success", "连接汇总库成功,即将执行汇总或抽取操作!");
setTimeout("Kubernetes.removeMask()", 1500);
}
else{
@ -1950,4 +1950,16 @@ module Kubernetes {
//document.body.removeChild(result);
}
export function checkRCIsExtracting(selected:Array<any>){
var answer = false;
for(var i = 0; i < selected.length; i++){
var label = getLabels(selected[i]);
if(label.isExtract == 1){
answer = true;
break;
}
}
return answer;
}
}

View File

@ -359,6 +359,10 @@ module Kubernetes {
replicationController.$oracleStatus = getOracleStatus(getLabels(replicationController));
replicationController.$extractStatus = getExtractStatus(getLabels(replicationController));
//
var annotation = getAnnotations(replicationController);
var label = getLabels(replicationController);
replicationController.$alias = annotation.cityName + "_" + annotation.districtName + "_" + annotation.systemName + "_" + annotation.year + "_" + label.version;
var selectedPods = replicationController.$pods;
replicationController.connectTo = selectedPods.map((pod) => {

View File

@ -49,7 +49,7 @@ module Kubernetes {
$scope.openLogs = (entity) => {
log.debug("Open logs: ", entity);
TerminalService.newTerminal($interval, entity.metadata.selfLink, entity.$oracleName, entity,$templateCache.get(UrlHelpers.join(templatePath, 'logShell.html')));
TerminalService.newTerminal($interval, entity.metadata.selfLink, entity.$oracleName, entity, "/java/console/api/oracle/extract/log?rcName=" + getName(entity), $templateCache.get(UrlHelpers.join(templatePath, 'logShell.html')));
}
});

View File

@ -66,6 +66,11 @@ module Kubernetes {
{ field: '$extractStatus',
displayName: '数据汇总状态',
cellTemplate: $templateCache.get("dataSummaryTemplate.html")
},
{
field: '$checkStatus',
displayName: '检验状态',
cellTemplate: $templateCache.get("dataCheckStatus.html")
}
],
sortInfo: {
@ -86,7 +91,7 @@ module Kubernetes {
if(extractItems.length == 0){
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
collection: selected,
index: 'metadata.name',
index: '$alias',
onClose: (result:boolean) => {
if (result) {
function deleteSelected(selected:Array<KubePod>, next:KubePod) {
@ -151,7 +156,7 @@ module Kubernetes {
if(extractItems.length == 0){
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
collection: selected,
index: 'metadata.name',
index: '$alias',
onClose: (result:boolean) => {
if (result) {
function stopSelected(selected:Array<KubePod>, next:KubePod) {
@ -205,6 +210,50 @@ module Kubernetes {
startSelected(selected, selected.shift());
};
/**
**/
$scope.extractOracle = (selected) =>{
var answer = false;
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
if(ConfigsModel.oracleParam[i].type == 1){
answer = true
break;
}
}
if(answer == false){
/**
**/
Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '',null, 0, "error");
return;
}
// 检查数据库是否已启动
var result = checkIsStartSuccess(selected);
if(result.length > 0){
Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据库,请先启动服务", '',null, 0, "error");
return;
}
var answer = false;
var selectedItem = null;
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
if(ConfigsModel.oracleParam[i].type == 1){
selectedItem = ConfigsModel.oracleParam[i];
answer = true
break;
}
}
if(answer == false){
/**
**/
Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '',null, 0, "error");
return;
}
Kubernetes.extractDataToOracle($http, "/java/console/api/oracle/standardextract", selected, selectedItem);
}
$scope.extractClick = {
items: null,
selectedItem: {name: "当前没有可用的汇总库"},
@ -212,7 +261,7 @@ module Kubernetes {
onOk: () => {
var extractClick = $scope.extractClick;
extractClick.items = $scope.tableConfig.selectedItems;
Kubernetes.extractDataToOracle($http, extractClick.items, extractClick.selectedItem);
Kubernetes.extractDataToOracle($http, "/java/console/api/oracle", extractClick.items, extractClick.selectedItem);
//extractClick.selectedItem = $scope.filterReplicationControllers[0] || "";
extractClick.dialog.close();
},
@ -222,9 +271,17 @@ module Kubernetes {
extractClick.selectedItem = $scope.configs.oracleParam[0];
var result = checkIsStartSuccess($scope.tableConfig.selectedItems);
if(result.length >0){
Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据,请先启动服务", '',null, 0, "error");
Configs.customAlert("提示", "操作失败:选择服务中存在未启动的数据,请先启动服务", '',null, 0, "error");
return;
}
}
/**
**/
if(checkRCIsExtracting(selected)){
Configs.customAlert("提示", "操作失败:选择的数据库中有正在执行汇总的数据库,请勿重复执行汇总操作", '',null, 0, "error");
return;
}
extractClick.dialog.open();
/*extractData.selectedItem = $scope.filterReplicationControllers[0] || "";
extractData.items = selected;*/

View File

@ -118,7 +118,7 @@ module Kubernetes {
item: null,
open: (entity) => {
if(entity.status == 1)
Configs.customAlert("提示", "操作失败: 正在迁移的任务,不能迁移", '',null, 0, "error");
Configs.customAlert("提示", "操作失败: 正在迁移的任务,不能删除", '',null, 0, "error");
else{
var showDeleteOne = $scope.showDeleteOne;
showDeleteOne.show = true;
@ -135,9 +135,29 @@ module Kubernetes {
showDeleteOne.item = null;
}
};
/*$scope.deleteRow = (entity) =>{
$scope.$emit('deleteRow', entity);
}*/
$scope.showCancelOne = {
show: false,
item: null,
open: (entity) => {
/*if(entity.status == 1)
Configs.customAlert("提示", "操作失败: 正在迁移的任务,不能删除!", '',null, 0, "error");
else{*/
var showCancelOne = $scope.showCancelOne;
showCancelOne.show = true;
showCancelOne.item = entity;
//}
},
onOk: () => {
var showCancelOne = $scope.showCancelOne;
$scope.$emit('deleteRow', showCancelOne.item);
},
onCancel: ()=>{
var showCancelOne = $scope.showCancelOne;
showCancelOne.show = false;
showCancelOne.item = null;
}
};
}]);
export var LoadMask = controller('LoadMask', ['$scope', ($scope) => {

View File

@ -43,7 +43,7 @@ module Kubernetes {
},
terminals: {},
httpTask: {},
newTerminal: ($interval, podLink, containerName, entity, template = defaultTemplate) => {
newTerminal: ($interval, podLink, containerName, entity, url ,template = defaultTemplate) => {
var terminalId = UrlHelpers.join(podLink, containerName);
if (terminalId in self.terminals) {
log.debug("Already a terminal with id: ", terminalId);
@ -51,7 +51,7 @@ module Kubernetes {
return terminalId;
}
var scope = $rootScope.$new();
getLogs(entity, scope);
getLogs(entity, scope, url);
scope.podLink = podLink;
scope.containerName = containerName;
scope.id = terminalId;
@ -61,7 +61,7 @@ module Kubernetes {
return terminalId;
}else{
self.httpTask[terminalId] = $interval(() =>{
getLogs(entity, scope);
getLogs(entity, scope, url);
},2000);
}
var el = $($compile(template)(scope));
@ -300,13 +300,13 @@ module Kubernetes {
};
});
function getLogs(rc, scope){
function getLogs(rc, scope, url){
var xhr= new XMLHttpRequest();
xhr.onreadystatechange = () => {
if(xhr.readyState == 4){
if (xhr.status == 200){
if(xhr.responseText !="" && xhr.responseText !=null){
var logObject = JSON.parse(xhr.responseText);
var logObject = JSON.parse(xhr.responseText);
scope.logs = logObject[getName(rc)];
}else{
scope.logs = "当前没有可以查看的日志信息";
@ -319,7 +319,8 @@ module Kubernetes {
}
}
}
xhr.open("POST", "/java/console/api/oracle/extract/log?rcName=" + getName(rc),false);
xhr.open("POST", url, false);
//xhr.open("POST", "/java/console/api/oracle/extract/log?rcName=" + getName(rc),false);
xhr.send(null);
}
}

View File

@ -240,18 +240,6 @@ module Kubernetes {
return trueValue;
}
/*
,oracle
export function checkForMigration(replicationControllers:Array<KubePod>, selectItem:Array<any>){
var result = [];
angular.forEach(selectItem, (item) => {
if(checkForExit(replicationControllers, item))
result.push(item);
});
return result;
} */
export function checkForExit(replicationControllers:Array<KubePod>, selectItem){
for(var index in replicationControllers) {
var replicas = replicationControllers[index];
@ -282,9 +270,12 @@ module Kubernetes {
function checkForExitTask(transferTasks:Array<any>, selectItem){
for(var index in transferTasks){
var task = transferTasks[index];
if(task["_key"] == selectItem["_key"] && (task["status"] == "1" || task["status"] == "0") && selectItem["year"] == task.labels.dataYear){
return true;
var task = transferTasks[index];
if(task["_key"] == selectItem["_key"] && selectItem["year"] == task.labels.dataYear ){
if(task.status == 2 || task.status == 3)
return false;
else
return true;
}
}
return false;
@ -316,31 +307,51 @@ module Kubernetes {
/*
使
*/
export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>){
var message = "";
export function checkForMigration(replicationControllers:Array<KubePod>, transferTasks: Array<any>, selectItem:Array<any>, type:string){
var message = "";
for (var index in selectItem) {
var item = selectItem[index];
var id = null;
if(type == 'manager')
id = item.id;
if(type == 'verify')
id = item.dataId
/*
*/
for(i in transferTasks){
/*if(transferTasks[i]["_key"] == item["_key"] && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0") && item["year"] == transferTasks[i].labels.dataYear){
message = "数据正在迁移"
return message;
}*/
if(transferTasks[i].fkid == id && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0")){
message = "数据正在迁移"
return message;
}
}
/**
*/
if(item["mark"] == 1)
continue;
/*
使
*/
for (var i in replicationControllers) {
var labels = getLabels(replicationControllers[i]);
if(getName(replicationControllers[i]) == item._key && getAnnotationValueBykey(replicationControllers[i],"year") == item["year"] && labels.version == item.labels.version){
if(getName(replicationControllers[i]) == item._key && getAnnotationValueBykey(replicationControllers[i],"year") == item["year"]){
message = "数据正在使用";
return message;
}
}
/*
*/
for(i in transferTasks){
if(transferTasks[i]["_key"] == item["_key"] && (transferTasks[i]["status"] == "1" || transferTasks[i]["status"] == "0") && item["year"] == transferTasks[i].labels.dataYear && item.labels.version == transferTasks[i].labels.dataVersion){
message = "数据正在迁移"
return message;
}
}
}
return message;
}

View File

@ -160,10 +160,10 @@ module Navigation {
class="{{breadcrumb.active ? 'active' : ''}}"
ng-class="$last ? 'dropdown' : ''"
>
<a ng-show="breadcrumb.href" href="{{breadcrumb.href}}">{{label(breadcrumb)}}</a>
<span ng-hide="breadcrumb.href">{{label(breadcrumb)}}</span>
<a ng-show="false" href="{{breadcrumb.href}}"></a>
<span ng-hide="true">{{label(breadcrumb)}}</span>
</li>
<li ng-show="pageTitle">
<li ng-show="false">
<span ng-bind="pageTitle"></span>
</li>
</ol>

View File

@ -18,7 +18,7 @@
</button>
</div>
<div ng-show="true">
<div class="col-md-12" style="padding-left:0; padding-right:20px;">
<div class="col-md-12" style="padding-left:0px; padding-right:0px;">
<div ng-show="model.length == 0" class="alert alert-warning sj_alert-warning">
<span class="help-block">
当前没有可以查看的数据请点击Excel导入按钮导入Excel数据</span></div>

View File

@ -3,7 +3,7 @@
<div class="container-fluid sj_fluid">
<div class="mb10 clear">
<div class="row clear fl mr5 mt5">
<label>行政区划代码</label>
<label>地区:</label>
</div>
<div class="row clear fl">
<select class="form-control sj_select_box" ng-change="citySelect(x)" ng-model="x" ng-init="x='all'">
@ -11,12 +11,18 @@
<option ng-repeat="city in cities">{{city}}</option>
</select>
</div>
<div class="row clear fl mr5 mt5">
<label>&nbsp;</label>
</div>
<div class="row clear fl">
<select class="form-control sj_select_box" ng-change="countrySelect(y)" ng-model="y" ng-init="y='all'">
<option value="all">全部</option>
<option ng-repeat="country in countries">{{country.name}}</option>
</select>
</div>
<div class="row clear fl mr5 mt5">
<label>&nbsp;区/县&nbsp;&nbsp;&nbsp;状态</label>
</div>
<div class="row clear fl mr10">
<select class="form-control sj_select_box" ng-change="statusSelect(z)" ng-model="z" ng-init="z='all'">
<option value="all">全部</option>
@ -29,7 +35,7 @@
<!--</button> -->
</div>
<div class="row clear fr">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="quitFile()">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="quickFile()">
<i class="glyphicon glyphicon-save"></i> 一键归档
</button>
</div>

View File

@ -4,7 +4,7 @@
<div class="container-fluid sj_fluid ">
<div class="mb10 clear">
<div class="row clear fl mr5 mt5">
<label>行政区划代码</label>
<label>地区:</label>
</div>
<div class="row clear fl">
<select class="form-control sj_select_box" ng-change="citySelect(x)" ng-model="x" ng-init="x='all'">
@ -12,22 +12,33 @@
<option ng-repeat="city in cities">{{city}}</option>
</select>
</div>
<div class="row clear fl mr5 mt5">
<label>&nbsp;&nbsp;</label>
</div>
<div class="row clear fl mr10">
<select class="form-control sj_select_box" ng-change="countrySelect(y)" ng-model="y" ng-init="y='all'">
<option value="all">请选择区/县</option>
<option ng-repeat="country in countries">{{country.name}}</option>
</select>
</div>
<div class="row clear fl mr5 mt5">
<label>区/县&nbsp;</label>
</div>
<div class="row clear fr mr20">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="deleteRows()">
<i class="glyphicon glyphicon-save"></i> 删除
</button>
</div>
<div class="row clear fr mr5">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="checkSQLSERVER()">
<i class="glyphicon glyphicon-save"></i> 抽取
</button>
</div>
<div class="row clear fr mr5">
<button class="btn pull-right sj_btn_grey " ng-disabled="!checkable" ng-click="check()">
<i class="glyphicon glyphicon-save"></i> 校验
</button>
</div>
</div>
</div>
<div class="col-md-12 clear">
<table ng-show="tableData.length > 0" ng-table="tableParams" class="table table-condensed table-bordered table-striped table_sj_td_center">
@ -40,8 +51,26 @@
</td>
<td title="'验证结果'">{{row.checkResult}}</td>
<td title="'采集'">{{row.collection}}</td>
<td title="'支付信息标准表'">{{row.payResultLast}}</td>
<td title="'可执行标准表'">{{row.execResultLast}}</td>
<td title="'支付信息标准表'">
<span ng-show="row.payResultLast == 0">未校验</span>
<span ng-show="row.payResultLast == 1">不需校验</span>
<span ng-show="row.payResultLast == 2">校验中</span>
<span ng-show="row.payResultLast == 3">标准表存在</span>
<span ng-show="row.payResultLast == 4">标准表不存在</span>
<span ng-show="row.payResultLast == 5">待抽取</span>
<span ng-show="row.payResultLast == 6">正在抽取</span>
<span ng-show="row.payResultLast == 7">抽取完成</span>
</td>
<td title="'可执行标准表'">
<span ng-show="row.execResultLast == 0">未校验</span>
<span ng-show="row.execResultLast == 1">不需校验</span>
<span ng-show="row.execResultLast == 2">校验中</span>
<span ng-show="row.execResultLast == 3">标准表存在</span>
<span ng-show="row.execResultLast == 4">标准表不存在</span>
<span ng-show="row.execResultLast == 5">待抽取</span>
<span ng-show="row.execResultLast == 6">正在抽取</span>
<span ng-show="row.execResultLast == 7">抽取完成</span>
</td>
<td title="'市'">{{row.cityName}}</td>
<td title="'区/县'">{{row.districtName}}</td>
<td title="'行政区划代码'">{{row.areaCode}}</td>
@ -54,6 +83,16 @@
<td title="'联系人'">{{row.departmentManager}}</td>
<td title="'联系方式'">{{row.managerContacts}}</td>
<td title="'数据库类型'">{{row.dataBaseType}}</td>
<td title="'存储状态'">
<span ng-show="row.mark==0">热区</span>
<span ng-show="row.mark==1">冷区</span>
<span ng-show="row.mark==null"></span>
</td>
<td title="'抽取日志'">
<button class="btn sj_btn" ng-click="openLog(row)">
<span>查看日志</span>
</button>
</td>
</tr>
</table>
<div ng-hide="tableData.length > 0" class="col-sm-12 alert alert-warning sj_alert-warning">

View File

@ -11,97 +11,65 @@ module System{
shareInit($scope);
$scope.cities = classifyCity(SystemModel.regionalismInfo);
$scope.status = [{id: 0, label: "有缺失"}, {id: 1, label: "正常"}, {id: 2, label:"待归档"}, {id: 3, label: "待审核"}];
$scope.status = [{id: 0, label: "有缺失"}, {id: 1, label: "正常"}, {id: 2, label:"待归档"}, {id: 3, label: "待审核"}];
$scope.cityFilter = $scope.model = SystemModel.sqlInfo;
SystemModel.updateSqlInfo();
$scope.model = SystemModel.sqlInfo;
$scope.checkboxes = {
checked: false,
items: {}
};
$scope.optionsFilter= {
x: "all",
y: "all",
z: "all"
}
$scope.tableParams = new NgTableParams({count: 25}, {
counts: [25, 50, 100],
dataset: $scope.model
});
$scope.citySelect = (x) => {
if($scope.z != 'all'){
$scope.statusFilter = [];
angular.forEach($scope.model, (item) => {
if($scope.status[item.sysStatus].label == $scope.z)
$scope.statusFilter.push(item)
});
}else
$scope.statusFilter = $scope.model;
if(x != 'all'){
$scope.countries = classifyCountry(SystemModel.regionalismInfo, x); //获取当前市下所有区县
$scope.cityFilter = [];
angular.forEach($scope.statusFilter, (item) => {
if(x == item.cityName)
$scope.cityFilter.push(item);
});
}else{
$scope.countries=[];
$scope.y = 'all';
$scope.cityFilter = $scope.statusFilter;
}
$scope.countryFilter = $scope.cityFilter;
$scope.tableParams.settings({
dataset: $scope.cityFilter
});
$scope.optionsFilter.x = x;
$scope.optionsFilter.y = $scope.y = "all";
if(x != "all"){
$scope.countries = classifyCountry(SystemModel.regionalismInfo, x); //获取当前市下所有区县
}else{
$scope.countries = [];
}
}
$scope.countrySelect = (y) => {
if(y != 'all'){
$scope.countryFilter = [];
angular.forEach($scope.cityFilter, (item) => {
if(item.districtName == y)
$scope.countryFilter.push(item);
});
}else
$scope.countryFilter = $scope.cityFilter
$scope.tableParams.settings({
dataset: $scope.countryFilter
});
$scope.countrySelect = (y) => {
$scope.optionsFilter.y = y;
}
$scope.statusSelect = (z) => {
var tmp = [];
if($scope.x == 'all')
tmp = $scope.model;
else
tmp = $scope.countryFilter ;
var result = [];
if(z != 'all'){
angular.forEach(tmp, (item) => {
if($scope.status[item.sysStatus].label == z)
result.push(item);
});
$scope.tableParams.settings({
dataset: result
});
}else{
$scope.tableParams.settings({
dataset: tmp
});
}
$scope.optionsFilter.z = z;
}
$scope.$watch(() =>{
return $scope.optionsFilter;
}, (value) =>{
shareUpdate($scope.model, value);
}, true);
$scope.quickCheck = () => {
updateSqlStatus("/java/console/api/filePackage/totalVerifySqlFile");
}
$scope.quitFile = () => {
$scope.quickFile = () => {
updateSqlStatus("/java/console/api/filePackage/totalOnholeSqlFile");
}
$scope.help = () => {
ngDialog.open({
template: 'statusHelp.html',
width: 900,
height: 600,
width: 600,
height: 370,
closeByDocument: false,
className: 'ngdialog-theme-default'
});
@ -116,201 +84,194 @@ module System{
});
});
// watch for data checkboxes
$scope.$watch(function() {
return $scope.checkboxes.items;
}, function(values) {
$scope.checkable = false;
for(var index in values){
if(values[index] == true){
$scope.checkable = true;
break;
}
}
var checked = 0, unchecked = 0,
total = $scope.model.length;
angular.forEach($scope.model, function(item) {
checked += ($scope.checkboxes.items[item.id]) || 0;
unchecked += Number((!$scope.checkboxes.items[item.id])) || 0;
});
if ((unchecked == 0) || (checked == 0)) {
$scope.checkboxes.checked = (checked == total);
}
// grayed checkbox
angular.element($element[0].getElementsByClassName("select-all")).prop("indeterminate", (checked != 0 && unchecked != 0));
}, true);
// watch for data checkboxes
$scope.$watch(function() {
return $scope.checkboxes.items;
}, function(values) {
$scope.checkable = false;
for(var index in values){
if(values[index] == true){
$scope.checkable = true;
break;
}
}
var checked = 0, unchecked = 0,
total = $scope.model.length;
angular.forEach($scope.model, function(item) {
checked += ($scope.checkboxes.items[item.id]) || 0;
unchecked += Number((!$scope.checkboxes.items[item.id])) || 0;
});
if ((unchecked == 0) || (checked == 0)) {
$scope.checkboxes.checked = (checked == total);
}
angular.element($element[0].getElementsByClassName("select-all")).prop("indeterminate", (checked != 0 && unchecked != 0));
}, true);
//查看
$scope.viewSql = (selected, type) => {
ngDialog.open({
template: 'sqlView.html',
controller:'Configs.SqlViewController',
width: 1000,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.viewSql = (selected, type) => {
ngDialog.open({
template: 'sqlView.html',
controller:'Configs.SqlViewController',
width: 1000,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
//上传
$scope.addSql = (selected, type) => {
ngDialog.open({
template: 'sqlAdd.html',
controller:'Configs.SqlAddController',
width: 600,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.addSql = (selected, type) => {
ngDialog.open({
template: 'sqlAdd.html',
controller:'Configs.SqlAddController',
width: 600,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.verifySql = (selected, type) => {
ngDialog.open({
template: 'sqlVerification.html',
controller:'Configs.sqlVerificationController',
width: 1000,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.moveSql = (selected, type) => {
ngDialog.open({
template: 'sqlMove.html',
controller:'Configs.sqlMoveController',
width: 600,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.$on('onOk', (event, data) => {
Configs.create_mask(); //创建遮罩层
Kubernetes.create_locadEffect("正在更新文件,请稍等!"); //创建数据加载效果层
var target = document.getElementById('loading')
var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
$http({
url: "/java/console/api/filePackage/handleSqlFile",
method: "POST",
params: {type: data.type, opt: data.opt},
data: JSON.stringify({
item: data.item,
content: data.content
})
}).success((data,header,config,status) => {
$("#load").remove();
Kubernetes.removeMask();
shareUpdate(data);
}).error((data,header,config,status) => {
});
//审核
$scope.verifySql = (selected, type) => {
ngDialog.open({
template: 'sqlVerification.html',
controller:'Configs.sqlVerificationController',
width: 1000,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
$scope.$on("replace", (event, data) => {
$http({
url: "/java/console/api/filePackage/handleSqlFile",
method: "POST",
params: {type: data.type, opt: data.opt},
data: JSON.stringify({
item: data.item,
content: data.content
})
}).success((data,header,config,status) => {
shareUpdate(data);
}).error((data,header,config,status) => {
Configs.customAlert("提示", "脚本替换或归档失败!", '',null, 0, "error");
})
});
//替换
$scope.moveSql = (selected, type) => {
ngDialog.open({
template: 'sqlMove.html',
controller:'Configs.sqlMoveController',
width: 600,
height: 600,
scope: $scope,
closeByDocument : false,
data: {type: type, item: selected },
className: 'ngdialog-theme-default'
});
}
function shareUpdate (data){
$scope.filterResult = $scope.model = SystemModel.sqlInfo = data.data;
var result = [];
if($scope.x != "all"){
angular.forEach($scope.filterResult, (item) => {
if(item.cityName == $scope.x)
result.push(item);
});
$scope.filterResult = result;
result = [];
}
$scope.$on('onOk', (event, data) => {
Configs.create_mask(); //创建遮罩层
Kubernetes.create_locadEffect("正在更新文件,请稍等!"); //创建数据加载效果层
var target = document.getElementById('loading')
var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
$http({
url: "/java/console/api/filePackage/handleSqlFile",
method: "POST",
params: {type: data.type, opt: data.opt},
data: JSON.stringify({
item: data.item,
content: data.content
})
}).success((data,header,config,status) => {
$("#load").remove();
Kubernetes.removeMask();
$scope.model = SystemModel.sqlInfo = data.data;
shareUpdate($scope.model, $scope.optionsFilter);
}).error((data,header,config,status) => {
$("#load").remove();
Kubernetes.removeMask();
});
});
if($scope.y != "all"){
angular.forEach($scope.filterResult, (item) => {
if(item.districtName == $scope.y)
result.push(item);
});
$scope.filterResult = result;
result = [];
}
$scope.$on("replace", (event, data) => {
$http({
url: "/java/console/api/filePackage/handleSqlFile",
method: "POST",
params: {type: data.type, opt: data.opt},
data: JSON.stringify({
item: data.item,
content: data.content
})
}).success((data,header,config,status) => {
$scope.model = SystemModel.sqlInfo = data.data;
shareUpdate($scope.model, $scope.optionsFilter);
}).error((data,header,config,status) => {
Configs.customAlert("提示", "脚本替换或归档失败!", '',null, 0, "error");
});
});
$scope.tableParams.settings({
dataset: $scope.filterResult
});
}
function shareUpdate (data, value){
var filter = data, result = [];
if(value.x != "all"){
angular.forEach(filter, (item) => {
if(item.cityName == value.x)
result.push(item);
});
filter = result;
result = [];
}
function updateSqlStatus(url: string) {
var items = [];
if($scope.model && $scope.model.length > 0){
angular.forEach($scope.model, (item) => {
if($scope.checkboxes.items[item.id])
items.push(item);
if(value.y != "all"){
angular.forEach(filter, (item) => {
if(item.districtName == value.y)
result.push(item);
});
}
filter = result;
result = [];
}
if(items.length <= 0)
return;
if(value.z != "all"){
angular.forEach(filter, (item) =>{
if($scope.status[item.sysStatus].label == value.z)
result.push(item);
});
filter = result;
result = [];
}
$scope.tableParams.settings({
dataset: filter
});
$http({
url: url,
method: 'POST',
data: JSON.stringify(items)
}).success(function(data,header,config,status){
var result = data.data, filter;
if($scope.z != 'all'){
result = [];
angular.forEach(data.data, (item) =>{
if($scope.status[item.sysStatus].label == $scope.z)
result.push(item);
});
}
filter = result;
$scope.checkboxes = {
checked: false,
items: {}
};
}
if($scope.x != 'all'){
filter = [];
var tmp = [];
angular.forEach(result, (item) => {
if($scope.x == item.cityName)
tmp.push(item);
});
function updateSqlStatus(url: string) {
var items = [];
if($scope.model && $scope.model.length > 0){
angular.forEach($scope.model, (item) => {
if($scope.checkboxes.items[item.id])
items.push(item);
});
}
if(items.length <= 0)
return;
Configs.create_mask(); //创建遮罩层
Kubernetes.create_locadEffect("正在更新文件,请稍等!"); //创建数据加载效果层
filter = tmp;
if($scope.y != 'all'){
filter = [];
angular.forEach(tmp, (item) => {
if($scope.y == item.districtName)
filter.push(item);
});
}
}
$scope.tableParams.settings({
dataset: filter
});
//响应成功
}).error(function(data,header,config,status){
//处理响应失败
});
}
$http({
url: url,
method: 'POST',
data: JSON.stringify(items)
}).success(function(data,header,config,status){
$scope.model = SystemModel.sqlInfo = data.data;
shareUpdate($scope.model, $scope.optionsFilter);
$("#load").remove();
Kubernetes.removeMask();
//响应成功
}).error(function(data,header,config,status){
//处理响应失败
$("#load").remove();
Kubernetes.removeMask();
Configs.customAlert("提示", "一键审核或归档失败!", '',null, 0, "error");
});
}
}])
}

View File

@ -11,7 +11,7 @@ module System{
shareInit($scope);
$scope.modelServices = SystemModel;
//$scope.modelServices.updateExcelInfo();
$scope.modelServices.updateExcelInfo();
$scope.model = SystemModel.systemInfoList;
// 表头显示的信息
@ -93,22 +93,28 @@ module System{
data: JSON.stringify(fileNameList),
contentType: "application/json; charset=utf-8",
complete: (XMLHttpRequest, textStatus) =>{
$("#load").remove();
Kubernetes.removeMask();
if(XMLHttpRequest.status == 200){
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功", '',null, 0, "success");
}else{
Configs.customAlert("提示", "操作失败: 本次excel文件录入失败", '',null, 0, "error");
}
},
success : (data) =>{
$("#load").remove();
Kubernetes.removeMask();
$scope.model = SystemModel.systemInfoList = data.data;
$scope.tableParams.settings({
dataset: $scope.model
});
});
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data.area + "个行政区划、" + data.system + "个信息系统,更新了" + data.update + "个信息系统", '',null, 0, "success");
},
error: (MLHttpRequest, textStatus, errorThrown) =>{
//Configs.customAlert("提示", "操作失败: 本次excel文件录入失败, " + textStatus, '',null, 0, "error");
error: (XMLHttpRequest, textStatus, errorThrown) =>{
$("#load").remove();
Kubernetes.removeMask();
if(XMLHttpRequest["responseJSON"].err && XMLHttpRequest["responseJSON"].err instanceof Array)
ngDialog.open({
template: 'uploadErrorInfo.html',
width: 790,
closeByDocument: false,
data: XMLHttpRequest["responseJSON"].err,
className: 'ngdialog-theme-default'
});
}
});
});
@ -124,81 +130,7 @@ module System{
element.outerHTML = element.outerHTML;
}
}, true);
}
$scope.upLoadExcelFiles = (files) =>{
var fileNameList = []; //获取文件名列表
angular.forEach(files, (file) => {
fileNameList.push(file.name);
});
Configs.create_mask();
Kubernetes.create_locadEffect("正在上传文件...");
var target = document.getElementById('loading');
var spinner = new Spinner(Kubernetes.loadConfigs()).spin(target);
var r = new Resumable({
target:'/java/console/api/fileOperation/file/upload',
chunkSize:1*1024*1024,
simultaneousUploads:4,
testChunks: false,
throttleProgressCallbacks:1,
method: "octet"
/*headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
}*/
});
if(!r.support){
throw "当前浏览器不支持Resumable.js文件上传";
}else{
angular.forEach(files, (file) => {
r.addFile(file);
})
r.on('fileAdded', function(file){
r.upload();
});
r.on('complete', function(){
$('#loadmsg').html("所以文件上传完毕,正在读取文件中的数据,此过程时间可能会较长,请稍等...");
$.ajax({
type: "POST",
url: UrlHelpers.join("/java/console/api/fileOperation/importExcel"),
timeout: 8000 * fileNameList.length,
dataType: 'json',
data: JSON.stringify(fileNameList),
contentType: "application/json; charset=utf-8",
complete: (XMLHttpRequest, textStatus) =>{
$("#load").remove();
Kubernetes.removeMask();
if(XMLHttpRequest.status == 200){
Configs.customAlert("提示", "操作成功: 本次excel文件录入成功", '',null, 0, "success");
}else{
Configs.customAlert("提示", "操作失败: 本次excel文件录入失败", '',null, 0, "error");
}
},
success : (data) =>{
$scope.model = SystemModel.systemInfoList = data.data;
$scope.tableParams.settings({
dataset: $scope.model
});
},
error: (MLHttpRequest, textStatus, errorThrown) =>{
//Configs.customAlert("提示", "操作失败: 本次excel文件录入失败, " + textStatus, '',null, 0, "error");
}
});
});
r.on('fileProgress', function(file){
$('#loadmsg').html("上传文件:" + file.fileName + " " + Math.floor(r.progress()*100) + '%');
//Kubernetes.create_locadEffect("上传文件:" + file.name + " " + Math.floor(r.progress()*100) + '%'); //创建数据加载效果层
});
//解决不同重复选择相同文件
var element = document.getElementById("file-uploads");
element.outerHTML = element.outerHTML;
}
}
}
//excel下载
$scope.downLoadExcelFile = () =>{
@ -220,9 +152,9 @@ module System{
function booleanChoose(){
return [{id: '是', title: '是'}, {id: '否', title: '否'}];
}
// 数据库类型选择条件oracle/sqlServer
// 数据库类型选择条件oracle/sql Server
function databaseType(){
return [{id: 'oracle', title: 'ORACLE'}, {id: 'sqlServer', title: 'SQLSERVER'}];
return [{id: 'oracle', title: 'ORACLE'}, {id: 'sql Server', title: 'SQL SERVER'}];
}
//level选择条件

View File

@ -39,6 +39,13 @@ module System{
HawtioNav.add(systemTab);
}]);
_module.filter("customFilter", () => {
return (input, subString) => {
var repx = new RegExp(subString + "$");
return input.replace(repx, "");
}
});
// 加载模块
hawtioPluginLoader.addModule(pluginName);
}

View File

@ -3,9 +3,13 @@
/// <reference path="systemHelpers.ts"/>
/// <reference path="systemServices.ts"/>
/// <reference path="../../configs/ts/configsUtils.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
/// <reference path="../../configs/ts/customAlert.ts"/>
/// <reference path="../../configs/ts/configsDataService.ts"/>
/// <reference path="../../kubernetes/ts/term.ts"/>
module System{
export var SystemVerificationController = controller('SystemVerificationController', ['$scope', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', '$element', ($scope, $location, $http, $templateCache, Upload, NgTableParams, ngDialog, SystemModel, $element) => {
export var SystemVerificationController = controller('SystemVerificationController', ['$scope', '$interval', '$location', '$http', '$templateCache', 'Upload', 'NgTableParams', 'ngDialog', 'SystemModel', '$element', '$timeout', 'ConfigsModel', 'DataModel', 'TerminalService', 'KubernetesModel', ($scope, $interval, $location, $http, $templateCache, Upload, NgTableParams, ngDialog, SystemModel, $element, $timeout, ConfigsModel, DataModel, TerminalService, KubernetesModel) => {
shareInit($scope);
$scope.cities = classifyCity(SystemModel.regionalismInfo);
$scope.model = SystemModel;
@ -20,7 +24,9 @@ module System{
dataset: $scope.tableData
});
$scope.citySelect = (x) =>{
$scope.citySelect = (x) =>{
$scope.countries=[];
$scope.y = "all";
if(x != 'all'){
$scope.countries = classifyCountry(SystemModel.regionalismInfo, x);
$http({
@ -36,8 +42,8 @@ module System{
throw "请求失败"
});
}else{
$scope.countries=[];
$scope.y = "all";
//$scope.countries=[];
//$scope.y = "all";
$scope.tableData = null;
$scope.checkboxes = {
checked: false,
@ -63,50 +69,233 @@ module System{
}
}
$scope.checkSQLSERVER = () => {
/**
**
**/
var answer = false;
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
if(ConfigsModel.oracleParam[i].type == 1){
answer = true
break;
}
}
if(answer == false){
/**
**/
Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '',null, 0, "error");
return;
}
var selectedItems = [];
if($scope.tableData && $scope.tableData.length > 0){
for (var i = 0; i < $scope.tableData.length; ++i) {
var item = $scope.tableData[i];
if($scope.checkboxes.items[item.id]){
if(item.collection == '否'){
/*
**
code
*/
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
return;
}7
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
if(item.dataBaseType == 'ORACLE'){
Configs.customAlert("提示", "操作失败:ORACLE数据请在服务集群界面中抽取标准表", '',null, 0, "error");
return;
}
selectedItems.push(item);
}
}
$http({
url: "/java/console/api/checkout/extractList",
method: "POST",
data: selectedItems
}).success((data, header, config, status) => {
//console.log(data);
}).error((data, header, config, status) => {
throw "请求失败"
});
}
}
$scope.deleteRows = () =>{
var filter = [];
if($scope.tableData && $scope.tableData.length > 0){
angular.forEach($scope.tableData, (item) => {
if($scope.checkboxes.items[item.id])
if($scope.checkboxes.items[item.id]){
item["index"] = item.cityName + "_" + item.districtName + "_" + item.sysName + "_" + item.year + "_版本" + item.dataVersion;
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
filter.push(item);
});
$http({
url: "/java/console/api/checkout/deleteList",
method: "POST",
data: filter
}).success((data, header, config, status) => {
$scope.tableData = data.data;
var result = [];
if($scope.y != 'all'){
angular.forEach($scope.tableData, (item) =>{
if(item.districtName == $scope.y)
result.push(item);
});
}else{
result = $scope.tableData;
}
}
});
}
//检查数据是否存在
for(var i = 0; i < filter.length; i++){
if(filter[i].collection == '否'){
Configs.customAlert("提示", "操作失败:部分数据不存在,无法删除", '',null, 0, "error");
return;
}
}
$scope.tableParams.settings({
dataset: result
});
}).error((data, header, config, status) => {
throw "请求失败"
});
}
//检查数据是否已启动 //检查数据是否在迁移
var message = Kubernetes.checkForMigration(KubernetesModel.replicationControllers, DataModel.transferTasks, filter, "verify");
if(message != ""){
Configs.customAlert("提示", "操作失败:部分数据" + message +",无法删除", '',null, 0, "error");
return
}
UI.multiItemConfirmActionDialog(<UI.MultiItemConfirmActionOptions>{
collection: filter,
index: 'index',
onClose: (result:boolean) => {
if(result){
$http({
url: "/java/console/api/checkout/deleteList",
method: "POST",
data: filter
}).success((data, header, config, status) => {
$scope.tableData = data.data;
var result = [];
if($scope.y != 'all'){
angular.forEach($scope.tableData, (item) =>{
if(item.districtName == $scope.y)
result.push(item);
});
}else{
result = $scope.tableData;
}
$scope.tableParams.settings({
dataset: result
});
}).error((data, header, config, status) => {
throw "请求失败"
});
}
},
title: '是否需要删除采集数据?',
action: '以下采集数据文件将会被删除:',
okText: '删除',
okClass: 'btn-danger sj_btn_cir',
custom: "该删除操作将会彻底删除数据文件,是否删除,请确认!",
customClass: "alert alert-warning sj_alert-warning",
cancelText: "取消",
cancelClass: 'sj_btn_grey'
}).open();
}
$scope.check = () => {
var filter = [];
//var sqlServerDB = [];
var oracleDB = [];
var selectedItems = [];
/**
**
**/
var answer = false;
for (var i = 0; i < ConfigsModel.oracleParam.length; ++i) {
if(ConfigsModel.oracleParam[i].type == 1){
answer = true
break;
}
}
if(answer == false){
/**
**/
Configs.customAlert("提示", "操作失败:没有配置默认的标准表汇总库", '',null, 0, "error");
return;
}
if($scope.tableData && $scope.tableData.length > 0){
angular.forEach($scope.tableData, (item) => {
if($scope.checkboxes.items[item.id])
filter.push(item);
});
for (var i = 0; i < $scope.tableData.length; ++i) {
var item = $scope.tableData[i];
if($scope.checkboxes.items[item.id]){
if(item.collection == '否'){
/*
**
code
*/
Configs.customAlert("提示", "操作失败:选择的系统存在没有数据的系统", '',null, 0, "error");
return;
}
/**
*/
if(item.payResultLast == 1){
Configs.customAlert("提示", "操作失败:选择的系统存在不需要校验的系统", '',null, 0, "error");
return;
}
/**
*/
if(item.mark == 1 && item.dataBaseType == 'ORACLE'){
Configs.customAlert("提示", "操作失败:选择的系统的数据存储在冷区,请先将数据迁移到热区再检验!", '',null, 0, "error");
return
}
item["_key"] = item.areaCode + "-" + item.sysCode + "-" + item.dataVersion;
selectedItems.push(item);
if(item.dataBaseType == 'ORACLE'){
oracleDB.push(item);
}
}
}
/*
*/
var exited = Kubernetes.checkForCreateOracle(DataModel.transferTasks, selectedItems);
if(exited.length > 0 ){
Configs.customAlert("提示", "操作失败: 正在迁移的数据不能执行校验操作!", '', null, 0, "error");
return;
}
/*
Oracle数据oracle数据
*/
if(oracleDB.length > 0){
angular.forEach(oracleDB, (item) =>{
Kubernetes.createRC({
name: item._key,
labels: {
system: item.sysCode.toString(),
version: item.dataVersion.toString(),
region: item.areaCode.toString()
},
annotations: {
cityName: item.cityName,
districtName: item.districtName,
systemName: item.sysName,
id: item.dataId+"",
year: item.year,
checkoutFlag: item.checkoutFlag
},
path: item.path+"app/",
isTarget: "false",
isExtract: item.extractStatus
}, (rc) =>{
//Kubernetes.connectOracle($http, $timeout, "/java/console/api/connectOracle", "create", rc, 0);
});
});
$timeout(() => {
$location.path('/kubernetes/namespace/default/replicationControllers');
}, 500);
}
$http({
url: "/java/console/api/checkout/checkList",
method: "POST",
data: filter
}).success((data, header, config, status) => {
data: selectedItems
}).success((data, header, config, status) => {
$scope.tableData = data.data;
var result = [];
if($scope.y != 'all'){
@ -120,10 +309,10 @@ module System{
$scope.tableParams.settings({
dataset: result
});
});
}).error((data, header, config, status) => {
throw "请求失败"
});
});
}
}
// watch for check all checkbox
@ -200,5 +389,12 @@ module System{
Configs.customAlert("提示", "操作失败:发生请求失败,不能删除!", '',null, 0, "error");
});
});
$scope.openLog = (entity) => {
var name = entity.areaCode + "_" + entity.sysCode + "_" + entity.dataVersion
var containerName = entity.cityName + "-" + entity.districtName + "-" + entity.sysName + "-版本" + entity.dataVersion;
entity["name"] = name;
TerminalService.newTerminal($interval, entity.id+"", containerName, entity, "/java/console/api/standardextract/log?rcName=" + name, $templateCache.get(UrlHelpers.join(Kubernetes.templatePath, 'logShell.html')));
}
}]);
}