Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lepdou
committed
Mar 22, 2016
1 parent
26b171f
commit a93c46d
Showing
40 changed files
with
11,338 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
server: | ||
port: 80 | ||
port: 8080 | ||
|
||
spring: | ||
application: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ddd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/**service module 定义*/ | ||
var appService = angular.module('app.service', ['ngResource']); | ||
|
||
/** page module 定义*/ | ||
//项目主页 | ||
var application_module = angular.module('application', ['ngResource', 'ui.router', 'app.service']); | ||
//创建项目页面 | ||
var create_app_module = angular.module('create_app', ['ngResource', 'app.service']); | ||
|
||
|
||
/**router*/ | ||
application_module.config(['$stateProvider', | ||
function ($stateProvider) { | ||
$stateProvider | ||
.state('config', { | ||
templateUrl: '../../views/app/config.html', | ||
controller: 'AppConfigController' | ||
}).state('info', { | ||
templateUrl: '../../views/app/info.html', | ||
controller: 'AppInfoController' | ||
}).state('setting', { | ||
templateUrl: '../../views/app/setting.html' | ||
}); | ||
}]).run(function ($state) { | ||
$state.go('config'); | ||
}); | ||
|
||
|
||
|
||
|
21 changes: 21 additions & 0 deletions
21
apollo-portal/src/main/resources/static/scripts/controller/CreateAppController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
create_app_module.controller('CreateAppController', ['$scope', '$window', 'AppService', function ($scope, $window, AppService) { | ||
|
||
//todo 便于测试,后续删掉 | ||
$scope.app = { | ||
appId: 1001, | ||
name: 'lepdou', | ||
ownerPhone: '1111', | ||
ownerMail: 'qqq@qq.com', | ||
owner: 'le' | ||
}; | ||
|
||
$scope.save = function(){ | ||
AppService.add($scope.app).then(function(result){ | ||
$window.location.href = '/views/app/index.html?#appid=' + result.appId; | ||
|
||
},function(result){ | ||
alert('添加失败!'); | ||
}); | ||
}; | ||
|
||
}]); |
95 changes: 95 additions & 0 deletions
95
apollo-portal/src/main/resources/static/scripts/controller/app/AppConfigController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
|
||
application_module.controller("AppConfigController", ["$scope", '$state', '$location', 'AppService', | ||
function ($scope, $state, $location, AppService) { | ||
|
||
//model定义 | ||
$scope.env = { | ||
fat: false, | ||
uat: true, | ||
product: false | ||
|
||
}; | ||
|
||
//mock data | ||
$scope.config = { | ||
baseConfigs: [ | ||
{ | ||
key: 'pageSize', | ||
value: 10, | ||
lastUpdateTime: '2016-01-14' | ||
}, | ||
{ | ||
key: 'pageCount', | ||
value: 20, | ||
lastUpdateTime: '2016-01-14' | ||
} | ||
], | ||
overrideConfigs: [ | ||
{ | ||
project: 'cat', | ||
configs: [ | ||
{ | ||
key: 'pageSize', | ||
value: 10, | ||
lastUpdateTime: '2016-01-14' | ||
}, | ||
{ | ||
key: 'pageCount', | ||
value: 20, | ||
lastUpdateTime: '2016-01-14' | ||
} | ||
] | ||
}, | ||
{ | ||
project: 'hermas', | ||
configs: [ | ||
{ | ||
key: 'pageSize', | ||
value: 20, | ||
lastUpdateTime: '2016-01-14' | ||
}, | ||
{ | ||
key: 'pageCount', | ||
value: 30, | ||
lastUpdateTime: '2016-01-14' | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
|
||
$scope.switchEnv = function (env) { | ||
clearEnvNav(); | ||
if ('fat' == env) { | ||
switchToFat(); | ||
} else if ('uat' == env) { | ||
switchToUat(); | ||
} else if ('product' == env) { | ||
switchToProduct(); | ||
} | ||
|
||
}; | ||
|
||
function switchToFat() { | ||
$scope.env.fat = true; | ||
} | ||
|
||
function switchToUat() { | ||
$scope.env.uat = true; | ||
} | ||
|
||
function switchToProduct() { | ||
$scope.env.product = true; | ||
} | ||
|
||
function clearEnvNav() { | ||
$scope.env = { | ||
fat: false, | ||
uat: false, | ||
product: false | ||
|
||
}; | ||
} | ||
|
||
|
||
}]); |
11 changes: 11 additions & 0 deletions
11
apollo-portal/src/main/resources/static/scripts/controller/app/AppInfoController.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
application_module.controller("AppInfoController", ["$scope", '$state', '$location', 'AppService', | ||
function ($scope, $state, $location, AppService) { | ||
$scope.appId = $location.$$url.split("=")[1]; | ||
|
||
AppService.load($scope.appId).then(function (result) { | ||
$scope.app = result; | ||
}, function(result){ | ||
alert("加载出错"); | ||
}); | ||
|
||
}]); |
34 changes: 34 additions & 0 deletions
34
apollo-portal/src/main/resources/static/scripts/services/AppService.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
appService.service('AppService', ['$resource', '$q', function ($resource, $q) { | ||
var app_resource = $resource('/apps/:appId', {}, { | ||
load_app: { | ||
method: 'GET', | ||
isArray: false | ||
}, | ||
add_app: { | ||
method: 'POST', | ||
url: '/apps' | ||
} | ||
}); | ||
return { | ||
add: function add(app) { | ||
var d = $q.defer(); | ||
app_resource.add_app({}, app, function (result) { | ||
d.resolve(result); | ||
}, function (result) { | ||
d.reject(result); | ||
}); | ||
return d.promise; | ||
}, | ||
load: function load(appId) { | ||
var d = $q.defer(); | ||
app_resource.load_app({ | ||
appId: appId | ||
}, function (result) { | ||
d.resolve(result); | ||
}, function (result) { | ||
d.reject(result); | ||
}); | ||
return d.promise; | ||
} | ||
} | ||
}]); |
66 changes: 66 additions & 0 deletions
66
apollo-portal/src/main/resources/static/styles/common-style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
body { | ||
color: #797979; | ||
background: #f1f2f7; | ||
padding: 0px !important; | ||
margin: 0px !important; | ||
font-size: 13px; | ||
padding-bottom:50px; | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
min-height: 550px; | ||
} | ||
|
||
.footer { | ||
height: 50px; | ||
width: 100%; | ||
background: #F6F6F6; | ||
padding-top: 10px; | ||
} | ||
|
||
/*panel*/ | ||
.panel-heading { | ||
font-size: 16px; | ||
background-color: #f5f5f5; | ||
padding: 5px 20px; | ||
} | ||
|
||
/*sec-panel*/ | ||
.sec-panel { | ||
padding-left: 5%; | ||
} | ||
|
||
.sec-panel .panel-heading { | ||
font-size: 14px; | ||
height: 28px; | ||
padding: 5px 20px; | ||
} | ||
|
||
table th { | ||
text-align: center; | ||
} | ||
|
||
.app { | ||
background-color: #f5f5f5; | ||
} | ||
|
||
.app .tab-content { | ||
background-color: #ffffff; | ||
} | ||
|
||
#config-info { | ||
padding: 20px 0px; | ||
} | ||
|
||
#config-info .nav { | ||
background-color: #f5f5f5; | ||
} | ||
|
||
#config-info .config-info-container { | ||
padding: 20px 20px; | ||
} | ||
|
||
#config-info nav { | ||
margin-top: -20px; | ||
} |
9 changes: 9 additions & 0 deletions
9
apollo-portal/src/main/resources/static/vendor/angular/angular-cookies.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
apollo-portal/src/main/resources/static/vendor/angular/angular-resource.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
apollo-portal/src/main/resources/static/vendor/angular/angular-route.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
apollo-portal/src/main/resources/static/vendor/angular/angular-strap.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.