Skip to content

Commit 4dabd78

Browse files
committed
2 parents b41d400 + c72f237 commit 4dabd78

11 files changed

+526
-0
lines changed

csp/index.csp.xml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Export generator="Cache" version="25">
3+
<CSP name="index.csp" application="/csp/sqlkpi/" default="1"><![CDATA[
4+
<html>
5+
<head>
6+
7+
<!-- Put your page Title here -->
8+
<title> Cache Server Page </title>
9+
10+
<script src=".\libs\js\jquery-3.1.1.min.js"></script>
11+
<script src=".\libs\js\angular.min.js"></script>
12+
<!-- Latest compiled and minified CSS -->
13+
<link rel="stylesheet" href=".\libs\css\bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
14+
15+
<!-- Optional theme -->
16+
<link rel="stylesheet" href=".\libs\css\bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
17+
18+
<!-- Latest compiled and minified JavaScript -->
19+
<script src=".\libs\js\bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
20+
21+
<link rel="stylesheet" href=".\src\css\main.css">
22+
<script src=".\src\js\myApp.js"></script>
23+
</head>
24+
25+
<body ng-app="myApp" ng-controller="myCtrl">
26+
27+
<nav class="navbar navbar-inverse">
28+
<div class="container">
29+
<div class="navbar-header">
30+
<a class="navbar-brand" href="#">SQLKPI</a>
31+
</div>
32+
</div>
33+
</nav>
34+
<div class="row">
35+
<div class="col-sm-2"></div>
36+
37+
<div class="col-sm-8">
38+
<div class="row">
39+
<h3>ExecuteSQL</h3>
40+
<div class="form-group">
41+
<label >SQL:</label>
42+
<input type="text" class="form-control" ng-model="execute.sql">
43+
44+
<button type="button" class="btn btn-primary pull-right" ng-click="executeSQL(execute.sql)">Execute SQL</button>
45+
</div>
46+
</div>
47+
<div class="row">
48+
<h3>GenerateKPI</h3>
49+
<div class="form-group">
50+
<label>SQL:</label>
51+
<input type="text" class="form-control" ng-model="generate.sql">
52+
53+
<label>Name:</label>
54+
<input type="text" class="form-control" ng-model="generate.name">
55+
56+
<label>Class:</label>
57+
<input type="text" class="form-control" ng-model="generate.className">
58+
<button type="button" class="btn btn-primary pull-right" ng-click="generateKPI(generate.sql, generate.name, generate.className)">Generate KPI</button>
59+
</div>
60+
</div>
61+
</div>
62+
63+
<div class="col-sm-2"></div>
64+
</div>
65+
66+
67+
68+
</body>
69+
</html>
70+
71+
]]></CSP>
72+
</Export>

csp/libs/css/bootstrap-theme.min.css.map.xml

+5
Large diffs are not rendered by default.

csp/libs/css/bootstrap-theme.min.css.xml

+10
Large diffs are not rendered by default.

csp/libs/css/bootstrap.min.css.map.xml

+5
Large diffs are not rendered by default.

csp/libs/css/bootstrap.min.css.xml

+10
Large diffs are not rendered by default.

csp/libs/js/angular.min.js.xml

+328
Large diffs are not rendered by default.

csp/libs/js/bootstrap.min.js.xml

+11
Large diffs are not rendered by default.

csp/libs/js/jquery-3.1.1.min.js.xml

+9
Large diffs are not rendered by default.

csp/src/css/main.css.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Export generator="Cache" version="25">
3+
<CSP name="src/css/main.css" application="/csp/sqlkpi/" default="1"><![CDATA[
4+
.mainApp {
5+
padding: 50px 30px 50px 80px;
6+
background-color: pink;
7+
}
8+
9+
.btn {
10+
margin-top: 8px;
11+
}]]></CSP>
12+
</Export>

csp/src/js/myApp.js.xml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Export generator="Cache" version="25">
3+
<CSP name="src/js/myApp.js" application="/csp/sqlkpi/" default="1"><![CDATA[
4+
var app = angular.module('myApp', []);
5+
6+
7+
app.controller('myCtrl', function($scope, $http) {
8+
window.s = $scope
9+
10+
var baseURL = "http://localhost:57772/rest/sqlkpi";
11+
12+
$scope.executeSQL = function (sql) {
13+
console.log("Executing SQL: Start.");
14+
executeSQLPOST(sql);
15+
16+
}
17+
$scope.generateKPI = function (sql, name, className) {
18+
console.log("Executing SQL: Start.");
19+
console.log(sql);
20+
generateKPIPOST(sql, name, className);
21+
22+
}
23+
24+
getTest = function () {
25+
$http.get(baseURL + '/test').
26+
then(function (response) {
27+
console.log(response);
28+
}, function myError(response){
29+
console.log("error " + response);
30+
});
31+
};
32+
33+
executeSQLPOST = function (sql) {
34+
var params = {SQL: sql};
35+
$http.post(baseURL + '/sql', params).
36+
then(function (response) {
37+
console.log(response);
38+
}, function myError(response){
39+
console.log(response);
40+
});
41+
};
42+
43+
generateKPIPOST = function (sql, name, className) {
44+
var params = {SQL: qwe, Name: name, Class: className};
45+
$http.post(baseURL + '/generateKPI', params).
46+
then(function (response) {
47+
console.log(response);
48+
}, function myError(response){
49+
console.log(response);
50+
});
51+
};
52+
});
53+
]]></CSP>
54+
</Export>

sc-list.txt

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
<cspapp>/index.csp
2+
<cspapp>/libs/css/bootstrap-theme.min.css
3+
<cspapp>/libs/css/bootstrap-theme.min.css.map
4+
<cspapp>/libs/css/bootstrap.min.css
5+
<cspapp>/libs/css/bootstrap.min.css.map
6+
<cspapp>/libs/js/angular.min.js
7+
<cspapp>/libs/js/bootstrap.min.js
8+
<cspapp>/libs/js/jquery-3.1.1.min.js
9+
<cspapp>/src/css/main.css
10+
<cspapp>/src/js/myApp.js
111
SQLKPI.pkg

0 commit comments

Comments
 (0)