aboutsummaryrefslogtreecommitdiffstats
path: root/standalone/src/main/assembly/resources
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-05-22 20:38:13 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-05-22 20:38:19 +0800
commitdc2700619b3a2063ce143d8bbee0c3a809947209 (patch)
tree9dcf176017ebb676b8b5cf98a0a17de19ebba780 /standalone/src/main/assembly/resources
parent6f2e84fe6337e457e7503fc8d7fc80528a11b416 (diff)
fix alarm and performance analysis bug
Change-Id: Idf0e7eed078e9e4de65529f94aa05786276d0d40 Issue-ID: USECASEUI-119 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
Diffstat (limited to 'standalone/src/main/assembly/resources')
-rw-r--r--standalone/src/main/assembly/resources/bin/initDB.sh6
-rw-r--r--standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql127
2 files changed, 74 insertions, 59 deletions
diff --git a/standalone/src/main/assembly/resources/bin/initDB.sh b/standalone/src/main/assembly/resources/bin/initDB.sh
index 6683960c..b9504926 100644
--- a/standalone/src/main/assembly/resources/bin/initDB.sh
+++ b/standalone/src/main/assembly/resources/bin/initDB.sh
@@ -15,15 +15,21 @@
# limitations under the License.
#
+echo "initDB.sh 1"
DIRNAME=`dirname $0`
+echo "initDB.sh 2"
HOME=`cd $DIRNAME/; pwd`
+echo "initDB.sh 3"
user=$1
password=$2
port=$3
host=$4
+echo "initDB.sh 4"
echo "start create usecase-ui db"
sql_path=$HOME/../
+echo "initDB.sh 5"
mysql -u$user -p$password -P$port -h$host <$sql_path/dbscripts/mysql/usecase-ui-createdb.sql
+echo "initDB.sh 6"
sql_result=$?
if [ $sql_result != 0 ] ; then
echo "failed to create usecase-ui database"
diff --git a/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql b/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
index 1acf5833..2730887d 100644
--- a/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
+++ b/standalone/src/main/assembly/resources/dbscripts/mysql/usecase-ui-createobj.sql
@@ -17,93 +17,102 @@
use uui;
SET FOREIGN_KEY_CHECKS=0;
+
-- ----------------------------
--- Table structure for alarms_additionalinformation
+-- Table structure for `alarms_additionalinformation`
-- ----------------------------
DROP TABLE IF EXISTS `alarms_additionalinformation`;
CREATE TABLE `alarms_additionalinformation` (
- `name` varchar(500),
- `value` varchar(500),
- `eventId` varchar(500),
- `createTime` datetime,
- `updateTime` datetime,
- `id` int(10) NOT NULL auto_increment,
+ `id` int(10) NOT NULL AUTO_INCREMENT,
+ `headerId` varchar(100) NOT NULL,
+ `name` varchar(500) DEFAULT NULL,
+ `value` varchar(500) DEFAULT NULL,
+ `sourceId` varchar(500) DEFAULT NULL,
+ `startEpochMicrosec` varchar(500) DEFAULT NULL,
+ `lastEpochMicroSec` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE `alarms_additionalinformation` ADD INDEX `alarms_additionalinformation_index` (`headerId`, `sourceId`);
+
-- ----------------------------
--- Table structure for alarms_commoneventheader
+-- Table structure for `alarms_commoneventheader`
-- ----------------------------
DROP TABLE IF EXISTS `alarms_commoneventheader`;
CREATE TABLE `alarms_commoneventheader` (
- `version` varchar(500),
- `eventName` varchar(500),
- `domain` varchar(500),
- `eventId` varchar(500),
- `eventType` varchar(500),
+ `id` varchar(100) NOT NULL,
+ `version` varchar(500) DEFAULT NULL,
+ `eventName` varchar(500) DEFAULT NULL,
+ `domain` varchar(500) DEFAULT NULL,
+ `eventId` varchar(500) DEFAULT NULL,
+ `eventType` varchar(500) DEFAULT NULL,
`nfcNamingCode` varchar(500) DEFAULT NULL,
`nfNamingCode` varchar(500) DEFAULT NULL,
- `sourceId` varchar(500),
- `sourceName` varchar(500),
- `reportingEntityId` varchar(500),
- `reportingEntityName` varchar(500),
- `priority` varchar(50),
- `startEpochMicrosec` varchar(500),
- `lastEpochMicroSec` varchar(500),
- `sequence` varchar(500),
- `faultFieldsVersion` varchar(500),
- `eventServrity` varchar(500),
- `eventSourceType` varchar(500),
- `eventCategory` varchar(500),
- `alarmCondition` varchar(500),
- `specificProblem` varchar(500),
- `vfStatus` varchar(500),
- `alarmInterfaceA` varchar(500),
- `status` varchar(50),
- `createTime` datetime,
- `updateTime` datetime,
- `id` int(10) NOT NULL auto_increment,
+ `sourceId` varchar(500) DEFAULT NULL,
+ `sourceName` varchar(500) DEFAULT NULL,
+ `reportingEntityId` varchar(500) DEFAULT NULL,
+ `reportingEntityName` varchar(500) DEFAULT NULL,
+ `priority` varchar(50) DEFAULT NULL,
+ `startEpochMicrosec` varchar(500) DEFAULT NULL,
+ `lastEpochMicroSec` varchar(500) DEFAULT NULL,
+ `startEpochMicrosecCleared` varchar(255) DEFAULT NULL,
+ `lastEpochMicroSecCleared` varchar(255) DEFAULT NULL,
+ `sequence` varchar(500) DEFAULT NULL,
+ `faultFieldsVersion` varchar(500) DEFAULT NULL,
+ `eventServrity` varchar(500) DEFAULT NULL,
+ `eventSourceType` varchar(500) DEFAULT NULL,
+ `eventCategory` varchar(500) DEFAULT NULL,
+ `alarmCondition` varchar(500) DEFAULT NULL,
+ `specificProblem` varchar(500) DEFAULT NULL,
+ `vfStatus` varchar(500) DEFAULT NULL,
+ `alarmInterfaceA` varchar(500) DEFAULT NULL,
+ `status` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE `alarms_commoneventheader` ADD INDEX `alarms_commoneventheader_index` (`sourceId`);
+
-- ----------------------------
--- Table structure for performance_additionalinformation
+-- Table structure for `performance_additionalinformation`
-- ----------------------------
DROP TABLE IF EXISTS `performance_additionalinformation`;
CREATE TABLE `performance_additionalinformation` (
- `name` varchar(500),
- `value` varchar(500),
- `eventId` varchar(500),
- `createTime` datetime,
- `updateTime` datetime,
- `id` int(10) NOT NULL auto_increment,
+ `id` int(10) NOT NULL AUTO_INCREMENT,
+ `headerId` varchar(100) NOT NULL,
+ `name` varchar(500) DEFAULT NULL,
+ `value` varchar(500) DEFAULT NULL,
+ `sourceId` varchar(500) DEFAULT NULL,
+ `startEpochMicrosec` varchar(500) DEFAULT NULL,
+ `lastEpochMicroSec` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE `performance_additionalinformation` ADD INDEX `performance_additionalinformation_index` (`headerId`, `sourceId`);
+
-- ----------------------------
--- Table structure for performance_commoneventheader
+-- Table structure for `performance_commoneventheader`
-- ----------------------------
DROP TABLE IF EXISTS `performance_commoneventheader`;
CREATE TABLE `performance_commoneventheader` (
- `version` varchar(500),
- `eventName` varchar(500),
- `domain` varchar(500),
- `eventId` varchar(500),
- `eventType` varchar(500),
+ `id` varchar(100) NOT NULL,
+ `version` varchar(500) DEFAULT NULL,
+ `eventName` varchar(500) DEFAULT NULL,
+ `domain` varchar(500) DEFAULT NULL,
+ `eventId` varchar(500) DEFAULT NULL,
+ `eventType` varchar(500) DEFAULT NULL,
`nfcNamingCode` varchar(500) DEFAULT NULL,
`nfNamingCode` varchar(500) DEFAULT NULL,
- `sourceId` varchar(500),
- `sourceName` varchar(500),
- `reportingEntityId` varchar(500),
- `reportingEntityName` varchar(500),
- `priority` varchar(50),
- `startEpochMicrosec` varchar(500),
- `lastEpochMicroSec` varchar(500),
- `sequence` varchar(500),
- `measurementsForVfScalingVersion` varchar(500),
- `measurementInterval` varchar(500),
- `createTime` datetime,
- `updateTime` datetime,
- `id` int(10) NOT NULL auto_increment,
+ `sourceId` varchar(500) DEFAULT NULL,
+ `sourceName` varchar(500) DEFAULT NULL,
+ `reportingEntityId` varchar(500) DEFAULT NULL,
+ `reportingEntityName` varchar(500) DEFAULT NULL,
+ `priority` varchar(50) DEFAULT NULL,
+ `startEpochMicrosec` varchar(500) DEFAULT NULL,
+ `lastEpochMicroSec` varchar(500) DEFAULT NULL,
+ `sequence` varchar(500) DEFAULT NULL,
+ `measurementsForVfScalingVersion` varchar(500) DEFAULT NULL,
+ `measurementInterval` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ALTER TABLE `performance_commoneventheader` ADD INDEX `performance_commoneventheader_index` (`sourceId`);
+