v3.0。beta版本,完成了数据导出前端,数据尚未绑定,导出功能不可用

This commit is contained in:
lili 2018-04-02 09:07:39 +08:00
parent 4218595a3a
commit 3ac9da8ad2
12 changed files with 1563 additions and 1303 deletions

View File

@ -9,6 +9,7 @@ declare module Configs {
static UPDATE: string;
static PUT: string;
static MOVE: string;
static CREATE_DATABASE: string;
static EXTRACT: string;
}
function createOracleInfo(array: Array<any>, id: number): {

2
defs.d.ts vendored
View File

@ -77,7 +77,6 @@
/// <reference path="d.ts/kubernetes/ts/sharedControllers.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/tabs.d.ts"/>
/// <reference path="d.ts/kubernetes/ts/templates.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/systemHelpers.d.ts"/>
/// <reference path="d.ts/system/ts/systemPlugin.d.ts"/>
/// <reference path="d.ts/system/ts/regionalismCodeSearch.d.ts"/>
@ -86,3 +85,4 @@
/// <reference path="d.ts/system/ts/systemCodeSearch.d.ts"/>
/// <reference path="d.ts/system/ts/systemList.d.ts"/>
/// <reference path="d.ts/system/ts/systemVerification.d.ts"/>
/// <reference path="d.ts/navigation/ts/navigationPlugin.d.ts"/>

File diff suppressed because one or more lines are too long

View File

@ -18,6 +18,9 @@
<button class="btn sj_btn_green mb10" style="color:#fff;" ng-click="create()">
<span class="glyphicon glyphicon-plus"></span> 添加
</button>
<button class="btn sj_btn_green mb10" style="color:#fff;" ng-click="createGatherDababase()">
<span class="glyphicon glyphicon-plus"></span> 创建汇总库
</button>
</div>
</div>
<hr>
@ -27,30 +30,28 @@
<div class="col-md-6 col-md-offset-1 ">
<form class="form-horizontal" novalidate="novalidate" name="validForm" ng-submit="onSubmit(tableForm)">
<div class="form-group">
<label class="col-sm-2 control-label">名称</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="20" required="required" ng-focus="tableForm.name" placeholder="请输入2-20个字符的数据名称"/>
<label class="col-sm-3 control-label">名称</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.name" name="orcName" ng-minlength="2" ng-maxlength="20" required="required" ng-focus="tableForm.name" placeholder="请输入2-20个字符的数据名称" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcName.$invalid && submitted">
<span role="alert" ng-show="validForm.orcName.$error.required">名称不能为空</span>
<span role="alert" ng-show="!validForm.orcName.$error.required && validForm.orcName.$invalid">请输入2-20个字符的数据名称</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">是否创建汇总库</label>
<div class="col-sm-10 sj_form_input ">
<!-- <div class="form-group" ng-show="add">
<label class="col-sm-3 control-label">是否创建汇总库</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.isCreateGatherOracle">
<option value=1 ng-selected="tableForm.isCreateGatherOracle==1" selected></option>
<option value=0 ng-selected="tableForm.isCreateGatherOracle==0" ></option>
<option value=1 ng-selected="tableForm.isCreateGatherOracle==1"></option>
<option value=0 ng-selected="tableForm.isCreateGatherOracle==0" selected></option>
</select>
</div>
</div>
<div ng-switch = "tableForm.isCreateGatherOracle">
<div ng-switch-when = "0">
</div> -->
<div class="form-group">
<label class="col-sm-2 control-label">IP</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.ip" name="orcIP" ng-pattern="/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/" required="required" ng-focus="tableForm.ip" placeholder="oracle的IP,例如0.0.0.0"/>
<label class="col-sm-3 control-label">IP</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.ip" name="orcIP" ng-pattern="/((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d)))\.){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))/" required="required" ng-focus="tableForm.ip" placeholder="oracle的IP,例如0.0.0.0" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcIP.$invalid && submitted">
<span role="alert" ng-show="validForm.orcIP.$error.required">IP不能为空</span>
<span role="alert" ng-show="validForm.orcIP.$error.pattern">请输入正确的IP地址</span>
@ -58,33 +59,31 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">端口号</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.port" name="orcPort" ng-pattern="/^([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/" required="required" ng-focus="tableForm.port" placeholder="oracle的的端口,1~65535"/>
<label class="col-sm-3 control-label">端口号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.port" name="orcPort" ng-pattern="/^([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/" required="required" ng-focus="tableForm.port" placeholder="oracle的的端口,1~65535" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPort.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPort.$error.required">端口号不能为空</span>
<span role="alert" ng-show="validForm.orcPort.$error.pattern">端口号必须为1~65535的数字</span>
</div>
</div>
</div>
</div>
</div>
<div ng-switch = "tableForm.isCreateGatherOracle">
<div ng-switch-when = "1">
<!-- <div ng-switch="tableForm.isCreateGatherOracle">
<div ng-switch-when="1">
<div class="form-group ">
<label class="col-sm-2 control-label">开始时间</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="orcStartTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcStartTime.$invalid && submitted">
<span role="alert" ng-show="validForm.orcStartTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="validForm.orcStartTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
<label class="col-sm-3 control-label">开始时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="startTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.startTime.$invalid && submitted">
<span role="alert" ng-show="validForm.startTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="validForm.startTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">结束时间</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.endTime" name="orcEndTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.endTime" placeholder="结束时间,格式为yyyy-MM 例如2018-02"/>
<label class="col-sm-3 control-label">结束时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.endTime" name="orcEndTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.endTime" placeholder="结束时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcEndTime.$invalid && submitted">
<span role="alert" ng-show="validForm.orcEndTime.$error.required">结束时间不能为空</span>
<span role="alert" ng-show="validForm.orcEndTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
@ -92,28 +91,38 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">联系人</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="orcContact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcContact.$invalid && submitted">
<span role="alert" ng-show="validForm.orcContact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="validForm.orcContact.$error.pattern">联系人为有效联系人</span>
<label class="col-sm-3 control-label">联系人</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="contact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.contact.$invalid && submitted">
<span role="alert" ng-show="validForm.contact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="validForm.contact.$error.pattern">联系人为有效联系人</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">联系方式</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="orcPhone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式"/>
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPhone.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPhone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="validForm.orcPhone.$error.pattern">手机号必须为有效的手机号码</span>
<label class="col-sm-3 control-label">联系方式</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="phone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.phone.$invalid && submitted">
<span role="alert" ng-show="validForm.phone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="validForm.phone.$error.pattern">手机号必须为有效的手机号码</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">编码方式</label>
<div class="col-sm-10 sj_form_input ">
<label class="col-sm-3 control-label">数据版本号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.dataVersion" name="dataVersion" ng-pattern="/^[1-9]\d*$/" required="required" ng-focus="tableForm.phone" placeholder="数据版本号" ng-init="tableForm.dataVersion=1" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.phone.$invalid && submitted">
<span role="alert" ng-show="validForm.phone.$error.required">版本号不能为空</span>
<span role="alert" ng-show="validForm.dataVersion.$error.pattern">数据版本号必须为正整数</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.encoding">
<option value=0 ng-selected="tableForm.encoding==GBK" selected>GBK</option>
<option value=1 ng-selected="tableForm.encoding==UTF8">UTF8</option>
@ -121,11 +130,11 @@
</div>
</div>
</div>
</div>
</div> -->
<div class="form-group">
<label class="col-sm-2 control-label">用戶名</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.user" name="orcUser" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.user" placeholder="oracle的用户名2-15个字母、数字或下划线"/>
<label class="col-sm-3 control-label">用戶名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.user" name="orcUser" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.user" placeholder="oracle的用户名2-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcUser.$invalid && submitted">
<span role="alert" ng-show="validForm.orcUser.$error.required">用户名不能为空</span>
<span role="alert" ng-show="validForm.orcUser.$error.pattern">用户名必须为2-15个字母、数字或下划线</span>
@ -133,9 +142,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">密码</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.password" name="orcPassword" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.password" placeholder="oracle的密码,2-15个字母、数字或下划线"/>
<label class="col-sm-3 control-label">密码</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.password" name="orcPassword" ng-pattern="/^\w{2,15}$/" required="required" ng-focus="tableForm.password" placeholder="oracle的密码,2-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcPassword.$invalid && submitted">
<span role="alert" ng-show="validForm.orcPassword.$error.required">密码不能为空</span>
<span role="alert" ng-show="validForm.orcPassword.$error.pattern">密码必须为2-15个字母、数字或下划线</span>
@ -143,9 +152,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">服务名</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.databaseName" name="orcService" ng-pattern="/^[a-zA-Z]{1,10}$/" required="required" ng-focus="tableForm.databaseName" placeholder="oracle的实例名,1-10个字母,例如ORCL"/>
<label class="col-sm-3 control-label">服务名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.databaseName" name="orcService" ng-pattern="/^[a-zA-Z]{1,10}$/" required="required" ng-focus="tableForm.databaseName" placeholder="oracle的实例名,1-10个字母,例如ORCL" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcService.$invalid && submitted">
<span role="alert" ng-show="validForm.orcService.$error.required">服务名不能为空</span>
<span role="alert" ng-show="validForm.orcService.$error.pattern">服务名必须为1-10个字母</span>
@ -153,9 +162,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表空间名</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.tableName" name="orcTable" ng-pattern="/^\w{1,15}$/" required="required" ng-focus="tableForm.tableName" placeholder="oracle的表空间名,1-15个字母、数字或下划线"/>
<label class="col-sm-3 control-label">表空间名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.tableName" name="orcTable" ng-pattern="/^\w{1,15}$/" required="required" ng-focus="tableForm.tableName" placeholder="oracle的表空间名,1-15个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcTable.$invalid && submitted">
<span role="alert" ng-show="validForm.orcTable.$error.required">表空间名不能为空</span>
<span role="alert" ng-show="validForm.orcTable.$error.pattern">表空间名必须为1-15个字母、数字或下划线</span>
@ -163,9 +172,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">表后缀名</label>
<div class="col-sm-10 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.suffix" name="orcSuffix" ng-pattern="/^\w{1,10}$/" required="required" ng-focus="tableForm.suffix" placeholder="汇总生成新表的后缀名,1-10个字母、数字或下划线"/>
<label class="col-sm-3 control-label">表后缀名</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.suffix" name="orcSuffix" ng-pattern="/^\w{1,10}$/" required="required" ng-focus="tableForm.suffix" placeholder="汇总生成新表的后缀名,1-10个字母、数字或下划线" />
<div class="system-info-danger-red-char form-error" ng-show="validForm.orcSuffix.$invalid && submitted">
<span role="alert" ng-show="validForm.orcSuffix.$error.required">表后缀名不能为空</span>
<span role="alert" ng-show="validForm.orcSuffix.$error.pattern">表后缀名必须为1-10个字母、数字或下划线</span>
@ -173,16 +182,16 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">标准表汇总库</label>
<div class="col-sm-10 sj_form_input ">
<label class="col-sm-3 control-label">标准表汇总库</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="tableForm.type">
<option value=0 ng-selected="tableForm.type==0" selected></option>
<option value=0 ng-selected="tableForm.type==0" ng-init="tableForm.type==0"></option>
<option value=1 ng-selected="tableForm.type==1"></option>
</select>
</div>
</div>
<div class="form-group" style="margin-left:145px;">
<button class="btn sj_btn_blue" type='submit' style="color:#fff; margin-right:30px;" >
<button class="btn sj_btn_blue" type='submit' style="color:#fff; margin-right:30px;">
<span class="glyphicon glyphicon-save "></span> 保存
</button>
<button class="btn sj_btn_grey" ng-click='cancel()'>
@ -193,33 +202,121 @@
</div>
</div>
<hr>
<hr>
<div class="row " style="padding-top:10px;" ng-show="tableForm && createDatabase">
<h3 class="mb10" ng-show="createDatabase">填写创建汇总库信息:</h3>
<div class="col-md-6 col-md-offset-1 ">
<form class="form-horizontal" novalidate="novalidate" name="createDatabaseForm" ng-submit="onSubmitCreateDatabase(tableForm)">
<div class="form-group" ng-show="0">
<label class="col-sm-3 control-label">汇总库系统名称</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control " type="text" ng-model="tableForm.systemName" name="systemName" ng-minlength="2" ng-maxlength="20" required="required" ng-focus="tableForm.systemName" ng-init="tableForm.systemName='汇总库'" placeholder="请输入2-20个字符的汇总库系统名称" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.systemName.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.systemName.$error.required">汇总库系统名称不能为空</span>
<span role="alert" ng-show="!createDatabaseForm.systemName.$error.required && createDatabaseForm.systemName.$invalid">请输入2-20个字符的汇总库系统名称</span>
</div>
</div>
</div>
<div class="form-group ">
<label class="col-sm-3 control-label">开始时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.startTime" name="startTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.startTime" placeholder="开始时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.startTime.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.startTime.$error.required">开始时间不能为空</span>
<span role="alert" ng-show="createDatabaseForm.startTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">结束时间</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.endTime" name="endTime" ng-pattern="/^([0-9]{4})-(0?[1-9]|1[0-2])$/" required="required" ng-focus="tableForm.endTime" placeholder="结束时间,格式为yyyy-MM 例如2018-02" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.endTime.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.endTime.$error.required">结束时间不能为空</span>
<span role="alert" ng-show="createDatabaseForm.endTime.$error.pattern">格式为yyyy-MM 例如2018-02</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.contact" name="contact" ng-pattern="" required="required" ng-focus="tableForm.contact" placeholder="联系人" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.contact.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.contact.$error.required">联系人不能为空</span>
<span role="alert" ng-show="createDatabaseForm.contact.$error.pattern">联系人为有效联系人</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.phone" name="phone" ng-pattern="/^[1][3,4,5,7,8][0-9]{9}$/" required="required" ng-focus="tableForm.phone" placeholder="联系方式" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.phone.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.phone.$error.required">联系方式不能为空</span>
<span role="alert" ng-show="createDatabaseForm.phone.$error.pattern">手机号必须为有效的手机号码</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数据版本号</label>
<div class="col-sm-9 sj_form_input">
<input class="system-info-danger-input form-control" type="text" ng-model="tableForm.dataVersion" name="dataVersion" ng-pattern="/^[1-9]\d*$/" required="required" ng-focus="tableForm.dataVersion" placeholder="数据版本号" ng-init="tableForm.dataVersion=1" />
<div class="system-info-danger-red-char form-error" ng-show="createDatabaseForm.dataVersion.$invalid && submittedCreateDatabase">
<span role="alert" ng-show="createDatabaseForm.dataVersion.$error.required">版本号不能为空</span>
<span role="alert" ng-show="createDatabaseForm.dataVersion.$error.pattern">数据版本号必须为正整数</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">编码方式</label>
<div class="col-sm-9 sj_form_input ">
<select class="form-control " ng-model="createDatabaseForm.encoding">
<option value="GBK" ng-selected="createDatabaseForm.encoding==GBK" selected>GBK</option>
<option value="UTF8" ng-selected="createDatabaseForm.encoding==UTF8">UTF8</option>
</select>
</div>
</div>
<div class="form-group" style="margin-left:145px;">
<button class="btn sj_btn_blue" type='submit' style="color:#fff; margin-right:30px;">
<span class="glyphicon glyphicon-save "></span> 保存
</button>
<button class="btn sj_btn_grey" ng-click='cancelCreateDatabase()'>
<span class="glyphicon glyphicon-remove "></span> 取消
</button>
</div>
</form>
</div>
</div>
<hr>
</div>
</div>
</div>
<style>
.form-horizontal input::-webkit-input-placeholder{
.form-horizontal input::-webkit-input-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style:normal;
}
.form-horizontal input::-moz-placeholder{
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style:normal;
}
.form-horizontal input:-moz-placeholder{
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style:normal;
}
.form-horizontal input:-ms-input-placeholder{
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style:normal;
}
font-style: normal;
}
.form-horizontal input::-moz-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
.form-horizontal input:-moz-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
.form-horizontal input:-ms-input-placeholder {
font-family: "微软雅黑";
font-size: 12px;
line-height: 28px;
font-style: normal;
}
</style>

View File

@ -87,7 +87,7 @@
</th> -->
<th colspan="5" ng-show="ngDialogData.editable">
<span>是否为热区</span>
<input type="checkbox" checked="checked" name="hot" ng-model="ngDialogData.hot"/>
<input type="checkbox" checked="checked" name="hot" ng-model="ngDialogData.hot" />
</th>
</tr>
</tbody>
@ -370,21 +370,21 @@
<div class="sj_new_box05">
<h2 class="sj_popup_h2 mb10 mt10">帮助</h2>
<table class="sj_new_table02 mb10" cellpadding="0" cellspacing="0">
<thead >
<thead>
<tr class="sj_popup_toptxt ">
<th >操作</th>
<th >归档脚本</th>
<th >新版版本</th>
<th >详细说明</th>
<th>操作</th>
<th>归档脚本</th>
<th>新版版本</th>
<th>详细说明</th>
</tr>
</thead>
<tbody>
<tr >
<tr>
<td class="sj_popup_txtbold">审核</td>
<td class="sj_popup_txtbold"></td>
<td class="sj_popup_txtbold"></td>
<td class=" sj_popup_midtxt">保留:删除新版脚本文件,保留现有归档脚本
<br/>替换:新版脚本文件移动并覆盖原有归档脚本</td>
<br/>替换:新版脚本文件移动并覆盖原有归档脚本</td>
</tr>
<tr>
<td class="sj_popup_txtbold">上传</td>
@ -411,17 +411,16 @@
<p>一键审核:待审核状态的所有脚本文件,后台一次性全部替换</p>
</div>
</div>
</script>
<script type="text/ng-template" id="uploadErrorInfo.html">
<div class="container-fluid ">
<h2 class="sj_popup_h2 mb10 fb ml15">错误信息:</h2>
<div class=" mb10" style="height:400px;overflow-y:auto;">
<table class="sj_new_table02 mb10 ml15" cellpadding="0" cellspacing="0">
<thead >
<thead>
<tr class="sj_popup_toptxt ">
<th >文件名</th>
<th >错误描述</th>
<th>文件名</th>
<th>错误描述</th>
</tr>
</thead>
<tbody>
@ -441,39 +440,37 @@
<ul class="mb10" style="height:400px;overflow-y:auto;">
<li class="cl export-li">
<label class="export-label">
<input type="checkbox" ng-model="flag" class="fl" ng-click="selectAll(flag)"/>
<input type="checkbox" ng-model="flag" class="fl" ng-click="selectAll(flag)" />
<span class="ml5 mt5 fl sj_over_hid">全选</span>
</label>
</li>
<li class="cl export-li" ng-repeat = "item in data">
<li class="cl export-li" ng-repeat="item in data">
<label class="export-label">
<input type="checkbox" id = {{item.id}} ng-checked="ischeckedId(item.id)" ng-click="selectId(item.id,$event,idList)" class="fl" />
<span class="ml5 mt5 fl sj_over_hid ">{{item.cityName}}_{{item.districtName}}_{{item.systemName}}_{{item.endYear}}_{{item.submittedBatch}}</span>
<input type="checkbox" id={{item.id}} ng-checked="ischeckedId(item.id) " ng-click="selectId(item.id,$event,idList) " class="fl " />
<span class="ml5 mt5 fl sj_over_hid ">{{item.cityName}}_{{item.districtName}}_{{item.systemName}}_{{item.endYear}}_{{item.submittedBatch}}_{{item.dataVersion}}</span>
</label>
</li>
</ul>
</div>
<div class="sj_table_td05 sj-border-black mt10 padding20 border-left-none fl">
<h3 class="mb10">选择导出数据类型</h3>
<ul class="mb10" style="height:400px;overflow-y:auto;">
<li class="cl export-li" ng-repeat = "item in export">
<div class="sj_table_td05 sj-border-black mt10 padding20 border-left-none fl ">
<h3 class="mb10 ">选择导出数据类型</h3>
<ul class="mb10 " style="height:400px;overflow-y:auto; ">
<li class="cl export-li " ng-repeat="item in export ">
<label class="export-label">
<input type="checkbox" class="fl" id="{{item.type}}" ng-checked="ischeckedType(item.type)" ng-click="selectType(item.type,$event,typeList)"/>
<span class="ml5 mt5 fl sj_over_hid">{{item.exportName}}</span>
<input type="checkbox" id={{item.type}} ng-checked="ischeckedType(item.type) " ng-click="selectType(item.type,$event,typeList) " class="fl " />
<span class="ml5 mt5 fl sj_over_hid " style="width: 150px;">{{item.exportName}}</span>
<select class="ml5 mt5 fl sj_over_hid" style="width: 200px;" ng-show="item.exportName=='汇总库' " ng-init="selectGatherOracleName=gatherOracles[0].name" ng-model="selectGatherOracleName" ng-options="one.name for one in gatherOracles">
</select>
</label>
</li>
</ul>
</div>
<button class="sj_btn_blue mt20 fr" ng-click="onsubmit(idList,typeList)">保存</button>
<button class="sj_btn_grey mt20 mr5 fr" ng-click="cancel()">取消</button>
<button class="sj_btn_blue mt20 fr " ng-click="onsubmit(idList,typeList) ">保存</button>
<button class="sj_btn_grey mt20 mr5 fr " ng-click="cancel() ">取消</button>
</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>
<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>
</div>
</div>

View File

@ -3,17 +3,18 @@
/// <reference path="configsDataService.ts"/>
/// <reference path="../../developer/ts/developerNavigation.ts"/>
/// <reference path="../../developer/ts/dataManagerHelper.ts"/>
module Configs{
export class OperateType{
public static get DELETE():string {return "delete"}
public static get UPDATE():string {return "update"}
public static get PUT():string{return "put"}
public static get MOVE():string{return "move"}
public static get EXTRACT():string{return "extract"}
module Configs {
export class OperateType {
public static get DELETE(): string { return "delete" }
public static get UPDATE(): string { return "update" }
public static get PUT(): string { return "put" }
public static get MOVE(): string { return "move" }
public static get CREATE_DATABASE(): string { return "createDatabase" }
public static get EXTRACT(): string { return "extract" }
}
_module.controller('Configs.MenuItemController',['$scope', '$location', ($scope, $location) => {
$scope.menuItem=[{
_module.controller('Configs.MenuItemController', ['$scope', '$location', ($scope, $location) => {
$scope.menuItem = [{
icon: "glyphicon glyphicon-cloud-upload",
label: "数据管理配置",
title: "配置数据存储信息",
@ -24,20 +25,21 @@ module Configs{
label: "服务集群配置",
title: "配置服务集群信息",
href: UrlHelpers.join(context, "/kube-cluster/setting")
}]
}
]
}]);
function createConfigBreadcrumbs($scope, $location, $routeParams){
function createConfigBreadcrumbs($scope, $location, $routeParams) {
var url = $location.url();
var label, title;
switch (url) {
case "/config/gluster-fs/setting":
label = "数据管理配置";
title= "配置数据存储信息";
title = "配置数据存储信息";
break;
case "/config/kube-cluster/setting":
label = "服务集群配置";
title= "配置服务集群信息";
title = "配置服务集群信息";
break;
default:
break;
@ -45,21 +47,21 @@ module Configs{
return Developer.activateCurrent([{
href: url,
label: label,//item.label,
title: title//item.title
label: label, //item.label,
title: title //item.title
}]);
}
export function createOracleInfo(array:Array<any>, id:number){
var result ={"id": id};
export function createOracleInfo(array: Array < any > , id: number) {
var result = { "id": id };
angular.forEach(array, (arr) => {
result[arr.field] = arr.value;
});
return result;
}
export function shareInit($scope, $location, $routeParams){
$scope. subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
export function shareInit($scope, $location, $routeParams) {
$scope.subTabConfig = Developer.createCurrentSubNavBar($scope, $location, $routeParams);
$scope.mask = true;
/**
@ -75,18 +77,18 @@ module Configs{
$("#mask").css("zIndex", 1000);
}
export function createNewObejct(array:Array<any>, obj){
var result =[];
if(obj){
angular.forEach(array, (arr) =>{
export function createNewObejct(array: Array < any > , obj) {
var result = [];
if (obj) {
angular.forEach(array, (arr) => {
result.push({
field: arr.field,
name: arr.displayName,
value: obj[arr.field]
});
});
}else{
angular.forEach(array, (arr) =>{
} else {
angular.forEach(array, (arr) => {
result.push({
field: arr.field,
name: arr.displayName,
@ -97,10 +99,10 @@ module Configs{
return result;
}
export function oracleInfoOperate($http, url:string, operate:string, resource, fn?: (data, status)=>void ){
if(resource === null)
export function oracleInfoOperate($http, url: string, operate: string, resource, fn ? : (data, status) => void) {
if (resource === null)
throw "不能操作空资源对象";
if(angular.isArray(resource)){
if (angular.isArray(resource)) {
var ids = [];
angular.forEach(resource, (item) => {
var id = item["id"] || item["name"] || item["_id"] || item["_key"];
@ -109,22 +111,21 @@ module Configs{
$http({
method: "POST",
dataType: 'json',
url: UrlHelpers.join(url, operate+"s"),
url: UrlHelpers.join(url, operate + "s"),
data: ids,
}).success((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
}).error((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
}).then(function successCallback(response) {
if (angular.isFunction(fn))
fn(response.data, response.header);
}, function errorCallback(response) {
fn(response.data, response.header);
});
}else{
} else {
var id = resource["id"] || resource["name"] || resource["_id"] || resource["_key"];
var RESTfulUrl=url;
if(id == "undefined"){
var RESTfulUrl = url;
if (typeof(id) == "undefined") {
RESTfulUrl = UrlHelpers.join(url, operate);
}else{
RESTfulUrl = UrlHelpers.join(url, id+"", operate);
} else {
RESTfulUrl = UrlHelpers.join(url, id + "", operate);
}
$http({
@ -132,37 +133,42 @@ module Configs{
dataType: 'json',
url: RESTfulUrl,
data: JSON.stringify(resource),
}).success((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
// console.log("success");
// console.log(data + "_." + header + "_.." + config + "_..." + status);
// console.log("success");
}).error((data,header,config,status) => {
if(angular.isFunction(fn))
fn(data, header);
}).then(function successCallback(response) {
if (angular.isFunction(fn))
fn(response.data, response.status);
}, function errorCallback(response) {
fn(response.data, response.status);
});
// success((data,header,config,status) => {
// if(angular.isFunction(fn))
// fn(data, header);
// // console.log("success");
// // console.log(data + "_." + header + "_.." + config + "_..." + status);
// // console.log("success");
// }).error((data,header,config,status) => {
// if(angular.isFunction(fn))
// fn(data, header);
// });
}
}
export function createConfigHelperNavBar($scope, $location, $routeParams){
return Developer.activateCurrent([
{
export function createConfigHelperNavBar($scope, $location, $routeParams) {
return Developer.activateCurrent([{
href: UrlHelpers.join(context, "regionalism-code/searching"),
label: "行政区划检索",
title: "检索行政区划代码"
},
{
href: UrlHelpers.join(context,"system-code/searching"),
href: UrlHelpers.join(context, "system-code/searching"),
label: "系统编码检索",
title: "检索系统编码"
}
]);
}
export function formatVolume(volume: volume): formatedVolume{
var brick:Array<Brick> = [];
angular.forEach(volume.brick, (block:Block) => {
export function formatVolume(volume: volume): formatedVolume {
var brick: Array < Brick > = [];
angular.forEach(volume.brick, (block: Block) => {
brick.push({
ip: block.ip.split("."),
status: block.status,
@ -181,25 +187,25 @@ module Configs{
}
}
export function volumesFormat(volumes: Array<volume>): Array<formatedVolume>{
var result:Array<formatedVolume> = [];
export function volumesFormat(volumes: Array < volume > ): Array < formatedVolume > {
var result: Array < formatedVolume > = [];
angular.forEach(volumes, (volume) => {
result.push(formatVolume(volume));
});
return result;
}
export interface formatedVolume{
export interface formatedVolume {
name: string
path: string
brick: Array<Brick>;
brick: Array < Brick > ;
status: boolean;
editable: boolean,
hot: boolean
}
export interface Brick{
ip: Array<string>;
export interface Brick {
ip: Array < string > ;
status: boolean;
path: string;
editable: boolean

View File

@ -3,21 +3,21 @@
/// <reference path="configsHelper.ts"/>
/// <reference path="configsUtils.ts"/>
module Configs{
module Configs {
export var KubeController = controller('KubeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout","ConfigsModel","DataModel",
($scope, $templateCache:ng.ITemplateCacheService, $location, $routeParams, $http, $timeout, ConfigsModel, DataModel) => {
$scope.model= ConfigsModel;
export var KubeController = controller('KubeController', ["$scope", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "ConfigsModel", "DataModel", "$modal",
($scope, $templateCache: ng.ITemplateCacheService, $location, $routeParams, $http, $timeout, ConfigsModel, DataModel, $modal) => {
$scope.model = ConfigsModel;
$scope.model.updateOracleParam();
$scope.submitted = false;
$scope.submittedCreateDatabase = false;
$scope.DataModel = DataModel;
console.log(ConfigsModel.oracleParam);
console.log("Configs00000000");
$scope.tableConfig={
$scope.tableConfig = {
data: 'model.oracleParam',
selectedItems: [],
columnDefs: [{
@ -56,12 +56,14 @@ module Configs{
field: "type",
displayName: "标准表汇总库",
cellTemplate: $templateCache.get("strandColumn.html")
},
{
field: "entity",
displayName: "操作",
cellTemplate: $templateCache.get("tableEdit.html")
}],
}
],
enableRowClickSelection: false,
showSelectionCheckbox: false,
multiSelect: false,
@ -73,104 +75,155 @@ module Configs{
shareInit($scope, $location, $routeParams);
$scope.create = () =>{
$scope.create = () => {
$scope.submitted = false;
$scope.add= true;
$scope.add = true;
$scope.edit = false;
$scope.createDatabase = false;
$scope.tableForm = {};
$scope.tableForm["id"]=0;
$scope.tableForm["type"]=0;
$scope.tableForm["name"]='';
$scope.tableForm["ip"]='';
$scope.tableForm["port"]='';
$scope.tableForm["user"]='';
$scope.tableForm["password"]='';
$scope.tableForm["databaseName"]='';
$scope.tableForm["tableName"]='';
$scope.tableForm["suffix"]='';
$scope.tableForm["id"] = 0;
$scope.tableForm["type"] = 0;
$scope.tableForm["name"] = '';
$scope.tableForm["ip"] = '';
$scope.tableForm["port"] = '';
$scope.tableForm["user"] = '';
$scope.tableForm["password"] = '';
$scope.tableForm["databaseName"] = '';
$scope.tableForm["tableName"] = '';
$scope.tableForm["suffix"] = '';
$scope.tableForm["startTime"]='';
$scope.tableForm["endTime"]='';
$scope.tableForm["contact"]='';
$scope.tableForm["phone"]='';
$scope.tableForm["isCreateGatherOracle"]=1;
}
$scope.createGatherDababase = () => {
$scope.submittedCreateDatabase = false;
$scope.add = false;
$scope.edit = false;
$scope.createDatabase = true;
$scope.tableForm = {};
$scope.tableForm["dataVersion"] = 1;
$scope.tableForm["systemName"] = '汇总库';
$scope.tableForm["startTime"] = '';
$scope.tableForm["endTime"] = '';
$scope.tableForm["contact"] = '';
$scope.tableForm["phone"] = '';
$scope.tableForm["encoding"] = 'UTF8';
}
$scope.cancel = () => {
$scope.tableForm =null;
$scope.tableForm = null;
$scope.add = false;
$scope.edit = false;
$scope.submitted = false;
}
$scope.cancelCreateDatabase = () => {
$scope.tableForm = null;
$scope.createDatabase = false;
$scope.submittedCreateDatabase = false;
}
$scope.onSubmit = (oracle) => {
if($scope.tableForm["name"]=='请输入2-20个字符的数据名称')
$scope.tableForm["name"]='';
if($scope.tableForm["ip"]=='oracle的IP,例如0.0.0.0')
$scope.tableForm["ip"]='';
if($scope.tableForm["port"]=='oracle的的端口,1~65535')
$scope.tableForm["port"]='';
if($scope.tableForm["user"]=='oracle的用户名2-15个字母、数字或下划线')
$scope.tableForm["user"]='';
if($scope.tableForm["password"]=='oracle的密码,2-15个字母、数字或下划线')
$scope.tableForm["password"]='';
if($scope.tableForm["databaseName"]=='oracle的实例名,1-10个字母,例如ORCL')
$scope.tableForm["databaseName"]='';
if($scope.tableForm["tableName"]=='oracle的表空间名,1-15个字母、数字或下划线')
$scope.tableForm["tableName"]='';
if($scope.tableForm["suffix"]=='汇总生成新表的后缀名,1-10个字母、数字或下划线')
$scope.tableForm["suffix"]='';
if ($scope.tableForm["name"] == '请输入2-20个字符的数据名称')
$scope.tableForm["name"] = '';
if ($scope.tableForm["ip"] == 'oracle的IP,例如0.0.0.0')
$scope.tableForm["ip"] = '';
if ($scope.tableForm["port"] == 'oracle的的端口,1~65535')
$scope.tableForm["port"] = '';
if ($scope.tableForm["user"] == 'oracle的用户名2-15个字母、数字或下划线')
$scope.tableForm["user"] = '';
if ($scope.tableForm["password"] == 'oracle的密码,2-15个字母、数字或下划线')
$scope.tableForm["password"] = '';
if ($scope.tableForm["databaseName"] == 'oracle的实例名,1-10个字母,例如ORCL')
$scope.tableForm["databaseName"] = '';
if ($scope.tableForm["tableName"] == 'oracle的表空间名,1-15个字母、数字或下划线')
$scope.tableForm["tableName"] = '';
if ($scope.tableForm["suffix"] == '汇总生成新表的后缀名,1-10个字母、数字或下划线')
$scope.tableForm["suffix"] = '';
if($scope.tableForm["startTime"]=='开始时间,格式为yyyy-MM 例如2018-02')
$scope.tableForm["startTime"]='';
if($scope.tableForm["endTime"]=='结束时间,格式为yyyy-MM 例如2018-02')
$scope.tableForm["endTime"]='';
if($scope.tableForm["contact"]=='联系人')
$scope.tableForm["contact"]='';
if($scope.tableForm["phone"]=='联系方式')
$scope.tableForm["phone"]='';
if($scope.validForm.$valid && $scope.validForm.$dirty){
if ($scope.validForm.$valid && $scope.validForm.$dirty) {
$scope.edit = false;
$scope.add = false
console.log(oracle);
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.UPDATE, oracle, (result, status) => {
console.log(oracle);
if(status===200){
if (status == 200) {
$scope.model.updateOracleParam();
}else{
throw "资源请求失败";
Configs.customAlert("提示", "汇总库更新成功", '', null, 0, "success");
} else if (status == 400) {
console.log(result);
Configs.customAlert("提示", "汇总库更新失败,名称不能重复", '', null, 0, "error");
} else {
console.log(result);
Configs.customAlert("提示", "汇总库配置失败: 系统异常!", '', null, 0, "error");
}
});
}else{
} else {
$scope.submitted = true;
}
}
$scope.$on("editRow", (event, data) =>{
$scope.onSubmitCreateDatabase = (oracle) => {
if ($scope.tableForm["systemName"] == '请输入2-20个字符的汇总库系统名称')
$scope.tableForm["systemName"] = '';
if ($scope.tableForm["startTime"] == '开始时间,格式为yyyy-MM 例如2018-02')
$scope.tableForm["startTime"] = '';
if ($scope.tableForm["endTime"] == '结束时间,格式为yyyy-MM 例如2018-02')
$scope.tableForm["endTime"] = '';
if ($scope.tableForm["contact"] == '联系人')
$scope.tableForm["contact"] = '';
if ($scope.tableForm["phone"] == '联系方式')
$scope.tableForm["phone"] = '';
if ($scope.createDatabaseForm.$valid && $scope.createDatabaseForm.$dirty) {
$scope.createDatabase = false;
console.log(oracle);
Configs.customAlert("提示", "准备创建汇总库,请稍后前往数据管理页面查看创建的汇总库", '', null, 0, "success");
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.CREATE_DATABASE, oracle, (result, status) => {
if (status === 200) {
Configs.customAlert("提示", "汇总库创建成功,请前往数据管理页面中启动创建的汇总库并查看参数在配置服务集群", '', null, 0, "success");
} else {
console.log(result);
Configs.customAlert("提示", "汇总库创建失败!\n" + result.msg, '', null, 0, "error");
}
});
} else {
$scope.submittedCreateDatabase = true;
}
}
$scope.$on("editRow", (event, data) => {
$scope.submitted = false;
$scope.tableForm = deepCopy(data);
$scope.edit = true;
$scope.add = false;
$scope.createDatabase = false;
//$scope.rowId = data.id
//createNewObejct($scope.tableConfig.columnDefs, data);
//removeElementsByValue($scope.tableForm, [{key: "name", value: "序号"},{key: "name", value: "连接状态"},{key: "name", value: "操作"}]);
}) ;
});
$scope.$on("deleteRow", (event, data) =>{
$scope.$on("deleteRow", (event, data) => {
oracleInfoOperate($http, "/java/console/api/oracle", OperateType.DELETE, data, (result, status) => {
if(status===200){
console.log("准备更新");
if (status == 200) {
$scope.model.updateOracleParam();
}else{
throw "资源请求失败";
Configs.customAlert("提示", "汇总库删除成功", '', null, 0, "success");
} else {
console.log(result);
Configs.customAlert("提示", "汇总库配置失败: 系统异常!", '', null, 0, "error");
}
});
//removeElementByValue($scope.model, data._id, "_id");
});
}]);
}
]);
}

View File

@ -5,13 +5,13 @@
/// <reference path="../../configs/ts/customAlert.ts"/>
/// <reference path="../../kubernetes/ts/kubernetesHelpers.ts"/>
module Configs{
module Configs {
export var TableEdit = controller('TableEdit', ['$scope', ($scope) => {
$scope.editRow = (entity)=>{
$scope.editRow = (entity) => {
$scope.$emit('editRow', entity);
}
$scope.deleteRowOne ={
$scope.deleteRowOne = {
show: false,
item: null,
open: (entity) => {
@ -35,13 +35,13 @@ module Configs{
$scope.submitted = false;
$scope.status = $scope.ngDialogData.status;
$scope. cancel = () =>{
$scope.cancel = () => {
$scope.closeThisDialog();
$scope.submitted = false;
}
$scope.deleteBrock = (volume:volume, brock) => {
if(volume.brick.length>1)
$scope.deleteBrock = (volume: volume, brock) => {
if (volume.brick.length > 1)
deleteBrock(volume, brock);
else
$scope.showMessage = true;
@ -52,76 +52,76 @@ module Configs{
ip: "", //存储块的机器ip地址
path: "", //存储块路径
status: false, //存储块的状态
editable:true
editable: true
};
addBrock(volume, block);
$scope.showMessage = false;
}
$scope.stopVolume = (volume) =>{
$scope.stopVolume = (volume) => {
volume.status = false;
}
$scope.startVolume = (volume) =>{
$scope.startVolume = (volume) => {
volume.status = true;
}
$scope.onSubmit = (entity) => {
console.log(entity);
if($scope.volumeForm.$valid){
if ($scope.volumeForm.$valid) {
$scope.$emit('update', entity);
$scope.closeThisDialog();
}else{
} else {
$scope.submitted = true;
}
}
}]);
export var SystemInfoController = controller('SystemInfoController', ['$scope', ($scope) =>{
}]);
export var SystemInfoController = controller('SystemInfoController', ['$scope', ($scope) => {}]);
export var SqlViewController = controller('SqlViewController', ['$scope', '$http', ($scope, $http) =>{
export var SqlViewController = controller('SqlViewController', ['$scope', '$http', ($scope, $http) => {
$scope.title = shareInit($scope.ngDialogData);
$scope.content = "";
getSqlContent();
function getSqlContent(){
function getSqlContent() {
$http({
url: "/java/console/api/filePackage/readSqlFile",
method:'POST',
params: {type: $scope.ngDialogData.type},
method: 'POST',
params: { type: $scope.ngDialogData.type },
data: JSON.stringify($scope.ngDialogData.item)
}).success(function(data,header,config,status){
}).success(function(data, header, config, status) {
$scope.old_content = data.data1;
//响应成功
}).error(function(data,header,config,status){
}).error(function(data, header, config, status) {
//处理响应失败
$scope.old_content = "获取脚本内容失败"
});
}
$scope.upLoadSqlFile = () => {
if(typeof FileReader == 'undefined'){
if (typeof FileReader == 'undefined') {
throw "浏览器不支持FileReader读取文件";
}else{
Configs.FileInputPlugin((file) =>{
if(typeof typeof FileReader == 'undefined')
} else {
Configs.FileInputPlugin((file) => {
if (typeof typeof FileReader == 'undefined')
throw "浏览器不支持FileReader读取文件";
else{
else {
var fr = new FileReader();
fr.onloadend = (e) =>{
fr.onloadend = (e) => {
$scope.new_content = e.target["result"];
$scope.enable = true;
}
fr.onloadstart = () =>{
$scope.$apply(() =>{
fr.onloadstart = () => {
$scope.$apply(() => {
$scope.content = "正在读取数据请稍等...";
});
$scope.content = "正在读取数据请稍等...";
}
fr.readAsText(file[0],"GBK");
fr.readAsText(file[0], "GBK");
}
});
}
@ -129,11 +129,11 @@ module Configs{
$scope.onOk = () => {
$scope.enable = false;
if(null == $scope.new_content || $scope.new_content == ""){
if (null == $scope.new_content || $scope.new_content == "") {
console.log("上传的内容不能为空");
$scope.closeThisDialog();
}else{
$scope.$emit("onOk",{
} else {
$scope.$emit("onOk", {
url: "/java/console/api/filePackage/handleSqlFile",
item: $scope.ngDialogData.item,
content: $scope.new_content,
@ -153,37 +153,36 @@ module Configs{
export var SqlAddController = controller('SqlAddController', ['$scope', '$http', ($scope, $http) => {
$scope.content = "";
$scope.title = shareInit($scope.ngDialogData);
$scope.sqlFileUpload = () =>{
Configs.FileInputPlugin((file) =>{
if(typeof FileReader == 'undefined')
$scope.sqlFileUpload = () => {
Configs.FileInputPlugin((file) => {
if (typeof FileReader == 'undefined')
throw "浏览器不支持FileReader读取文件";
else{
else {
var fr = new FileReader();
fr.onloadend = (e) =>{
fr.onloadend = (e) => {
$scope.content = e.target["result"];
$scope.enable = true;
}
fr.onloadstart = () =>{
$scope.$apply(() =>{
fr.onloadstart = () => {
$scope.$apply(() => {
$scope.content = "正在读取数据请稍等...";
});
$scope.content = "正在读取数据请稍等...";
}
fr.readAsText(file[0],"GBK");
fr.readAsText(file[0], "GBK");
}
});
}
$scope.onOk = () => {
$scope.enable = false;
if(null ==$scope.content || $scope.content == ""){
if (null == $scope.content || $scope.content == "") {
console.log("上传的内容不能为空");
$scope.closeThisDialog();
}
else{
$scope.$emit("onOk",{
} else {
$scope.$emit("onOk", {
url: "/java/console/api/filePackage/handleSqlFile",
item: $scope.ngDialogData.item,
content: $scope.content,
@ -214,17 +213,18 @@ module Configs{
});
$scope.closeThisDialog();
}
function getSqlContent(){
function getSqlContent() {
$http({
url: "/java/console/api/filePackage/readSqlFile",
method:'POST',
params: {type: $scope.ngDialogData.type},
method: 'POST',
params: { type: $scope.ngDialogData.type },
data: JSON.stringify($scope.ngDialogData.item)
}).success(function(data,header,config,status){
}).success(function(data, header, config, status) {
$scope.standard = data.data1;
$scope.unnormal = data.data2;
//响应成功
}).error(function(data,header,config,status){
}).error(function(data, header, config, status) {
//处理响应失败
$scope.unnormal = $scope.standard = "获取脚本内容失败";
});
@ -261,16 +261,16 @@ module Configs{
$scope.closeThisDialog();
}
function getSqlContent(){
function getSqlContent() {
$http({
url: "/java/console/api/filePackage/readSqlFile",
method:'POST',
params: {type: $scope.ngDialogData.type},
method: 'POST',
params: { type: $scope.ngDialogData.type },
data: JSON.stringify($scope.ngDialogData.item)
}).success(function(data,header,config,status){
}).success(function(data, header, config, status) {
$scope.content = data.data2;
//响应成功
}).error(function(data,header,config,status){
}).error(function(data, header, config, status) {
//处理响应失败
$scope.content = "获取脚本内容失败";
});
@ -280,14 +280,13 @@ module Configs{
export var sysVerUpdateController = controller('sysVerUpdateController', ['$scope', '$http', ($scope, $http) => {
$scope.checkboxItmes = [];
$scope.click = ($event, name) => {
if($event.target.checked){
if($scope.checkboxItmes.indexOf(name) == -1)
if ($event.target.checked) {
if ($scope.checkboxItmes.indexOf(name) == -1)
$scope.checkboxItmes.push(name)
}
else{
for(var i= 0; i < $scope.checkboxItmes.length; i++){
if($scope.checkboxItmes[i] === name){
$scope.checkboxItmes.splice(i,1);
} else {
for (var i = 0; i < $scope.checkboxItmes.length; i++) {
if ($scope.checkboxItmes[i] === name) {
$scope.checkboxItmes.splice(i, 1);
break;
}
}
@ -309,78 +308,78 @@ module Configs{
$scope.closeThisDialog();
}
function getData(){
function getData() {
$http({
url: "/java/console/api/checkout/findDetails",
method:'POST',
method: 'POST',
data: JSON.stringify($scope.ngDialogData)
}).success(function(data,header,config,status){
}).success(function(data, header, config, status) {
$scope.data1 = data.data1;
$scope.data2 = data.data2;
//响应成功
}).error(function(data,header,config,status){
}).error(function(data, header, config, status) {
//处理响应失败
$scope.content = "获取脚本内容失败";
});
}
}]);
export var dataExportController = controller("dataExportController", ['$scope', '$http', 'DataModel', 'ConfigsModel', ($scope, $http, DataModel:Developer.DataModelService, ConfigsModel:Configs.ConfigsModelService ) => {
export var dataExportController = controller("dataExportController", ['$scope', '$http', 'DataModel', 'ConfigsModel', ($scope, $http, DataModel: Developer.DataModelService, ConfigsModel: Configs.ConfigsModelService) => {
$scope.model = DataModel;
$scope.data = DataModel.data;
$scope.export = [{"type":1,"exportName":"原始数据"},{"type":2,"exportName":"汇总库"},{"type":3,"exportName":"标准表抽取脚本"}];
$scope.gatherOracles=ConfigsModel.oracleParam;
$scope.export = [{ "type": 1, "exportName": "原始数据" }, { "type": 2, "exportName": "汇总库" }, { "type": 3, "exportName": "标准表抽取脚本" }];
$scope.idList = [];
$scope.typeList= [];
$scope.typeList = [];
$scope.flag = false;
$scope.ischeckedId = function(id){
return $scope.idList.indexOf(id)>=0;
$scope.ischeckedId = function(id) {
return $scope.idList.indexOf(id) >= 0;
}
$scope.selectId = function(id, event){
$scope.selectId = function(id, event) {
var action = event.target;
if(action.checked){
if($scope.idList.indexOf(id) == -1){
if (action.checked) {
if ($scope.idList.indexOf(id) == -1) {
$scope.idList.push(id);
return $scope.idList;
}
}else{
} else {
var idx = $scope.idList.indexOf(id);
if(idx != -1){
$scope.idList.splice(idx,1);
if (idx != -1) {
$scope.idList.splice(idx, 1);
return $scope.idList;
}
}
}
$scope.ischeckedType = function(type){
return $scope.typeList.indexOf(type)>=0;
$scope.ischeckedType = function(type) {
return $scope.typeList.indexOf(type) >= 0;
}
$scope.selectType = function(type, event){
$scope.selectType = function(type, event) {
var action = event.target;
if(action.checked){
if($scope.typeList.indexOf(type) == -1){
if (action.checked) {
if ($scope.typeList.indexOf(type) == -1) {
$scope.typeList.push(type);
return $scope.typeList;
}
}else{
} else {
var idx = $scope.typeList.indexOf(type);
if(idx != -1){
$scope.typeList.splice(idx,1);
if (idx != -1) {
$scope.typeList.splice(idx, 1);
return $scope.typeList;
}
}
}
$scope.selectAll = function(flag){
if($scope.flag){
$scope.selectAll = function(flag) {
if ($scope.flag) {
flag = false;
angular.forEach($scope.data, function(item, index){
angular.forEach($scope.data, function(item, index) {
$scope.idList.push(item.id);
});
return $scope.idList;
}else{
} else {
flag = true;
$scope.idList = [];
return $scope.idList;
@ -391,26 +390,49 @@ module Configs{
$scope.closeThisDialog();
}
$scope.onsubmit = (idList , typeList) => {
$http({
url: "/oracle/exportData",
method:'POST',
data: idList,typeList,
}).success(function(data,header,config,status){
console.log(data + "__" + header);
}).error(function(data,header,config,status){
console.log("获取脚本内容失败");
$scope.onsubmit = (idList, typeList) => {
if (!idList.length) {
Configs.customAlert("提示", "请选择需要导出的数据", '', null, 0, "error");
return;
}
if (!typeList.length) {
Configs.customAlert("提示", "请选择需要导出的类型", '', null, 0, "error");
return;
}
var formData = {};
formData['idList'] = idList;
formData['typeList'] = typeList;
$.ajax({
async: false,
type: "POST",
contentType: "application/x-www-form-urlencoded",
url: UrlHelpers.join("/java/console/api/oracle/exportData"),
dataType: 'json',
data: { "idList": idList, "typeList": typeList },
// data: { "idList": idList, "typeList": typeList },
// data: JSON.stringify(formData),
success: (data) => {
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data, '', null, 0, "success");
},
error: (data) => {
Configs.customAlert("提示", "操作成功: 本次合计新增了" + data, '', null, 0, "error");
}
});
$scope.closeThisDialog();
}
}]);
function shareInit(ngDialogData) {
var title = "";
if(ngDialogData.type != 'undefined'){
if (ngDialogData.type != 'undefined') {
switch (ngDialogData.type) {
case "userTableStatus" :
case "userTableStatus":
title = "UserTablespace";
break;
case "ckPayStatus":

View File

@ -296,7 +296,6 @@ module Developer {
console.log("selected");
var exitedItems = Kubernetes.checkForCreateOracle($scope.model.transferTasks, items);
console.log(items);
console.log(12313132);
for (var i = 0; i < items.length; ++i) {
// code...
if (items[i].dataBaseType != 'ORACLE') {

View File

@ -233,7 +233,6 @@
</div>
</div>
</script>
<script type="text/ng-template" id="taskRecordEdit.html">
<div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.TaskRecordEdit">
<button class="btn sj_btn" style="border:0;background:none;" ng-click="showDeleteOne.open(entity)" ng-disabled="entity.status == 1 || entity.status == 0">
@ -260,7 +259,6 @@
<div style="position:relative;text-align:right;width:100%;height:15px;line-height:90%">
<span>{{entity.process}}%</span>
</div>
<!-- <div ng-show="entity.status ===3" class="progress-bar progress-bar-danger active sj_progress_bar" role="progressbar" aria-valuenow="{{entity.process}}" aria-valuemin="30" aria-valuemax="100" style="width: 100%" title="{{entity.process}}%">
<span class="sj_progress_font">{{entity.process}}%</span>
</div> -->
@ -319,12 +317,34 @@
</script>
<script type="text/ng-template" id="isExistHot.html">
<div class="ngCellText" ng-init="entity=row.entity">
<div ng-show="true" title="是否是标准表汇总库">
<div ng-show="true" title="是否在热区">
<span ng-show="entity.existHotData == 0">&nbsp;</span>
<span ng-show="entity.existHotData == 1">&nbsp;</span>
</div>
</div>
</script>
<script type="text/ng-template" id="modal.html">
<div>
<div class="modal-header">
<h3 class="modal-title" align="center">
标题信息
</h3>
</div>
<div class="modal-body">
<div align="center">
{{data}}
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="ok()">
确认
</button>
<button class="btn btn-warning" ng-click="cancel()">
退出
</button>
</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,10 +4,9 @@
module Kubernetes {
export var ReplicationControllerController = controller("ReplicationControllerController",
["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
export var ReplicationControllerController = controller("ReplicationControllerController", ["$scope", "KubernetesModel", "KubernetesState", "$templateCache", "$location", "$routeParams", "$http", "$timeout", "KubernetesApiURL",
($scope, KubernetesModel: Kubernetes.KubernetesModelService, KubernetesState,
$templateCache:ng.ITemplateCacheService, $location:ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
$templateCache: ng.ITemplateCacheService, $location: ng.ILocationService, $routeParams, $http, $timeout, KubernetesApiURL) => {
$scope.kubernetes = KubernetesState;
$scope.model = KubernetesModel;
@ -53,5 +52,6 @@ module Kubernetes {
}
Core.$apply($scope);
}
}]);
}
]);
}

View File

@ -166,6 +166,7 @@ module System {
});
}
//boolean选择条件是/否
function booleanChoose() {
return [{ id: '是', title: '是' }, { id: '否', title: '否' }];