Skip to content

Commit

Permalink
Merge pull request #83 from rekcurd/feature/renewal-dashboard-frontend
Browse files Browse the repository at this point in the history
Merged
  • Loading branch information
keigohtr authored Apr 25, 2019
2 parents 2d034bb + aa57b23 commit 1a1f862
Show file tree
Hide file tree
Showing 99 changed files with 7,658 additions and 5,912 deletions.
2 changes: 1 addition & 1 deletion e2e_test/apis/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_post(self):
with open(POSITIVE_MODEL_PATH, 'rb') as f:
response = self.client.post(
f'/api/projects/{TEST_PROJECT_ID}/applications/{TEST_APPLICATION_ID}/models',
data={'file': (f, model_name), 'description': 'A model always return positive labels.'})
data={'filepath': (f, model_name), 'description': 'A model always return positive labels.'})
self.assertEqual(200, response.status_code)

# Use `ls` to see the model exists or not
Expand Down
4 changes: 3 additions & 1 deletion e2e_test/apis/test_service_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def test_post(self):
response = self.client.delete(self.__DELETE_URL)
self.assertEqual(200, response.status_code)

display_name = "test"
container = WorkerConfiguration.deployment['spec']['template']['spec']['containers'][0]
service_level = WorkerConfiguration.deployment['metadata']['namespace']
container_image = container['image']
Expand All @@ -65,7 +66,8 @@ def test_post(self):

response = self.client.post(
self.__URL,
data={'service_level': service_level, 'container_image': container_image,
data={'display_name': display_name,
'service_level': service_level, 'container_image': container_image,
'service_model_assignment': service_model_assignment,
'resource_request_cpu': resource_request_cpu, 'resource_request_memory': resource_request_memory,
'service_git_url': service_git_url, 'service_git_branch': service_git_branch,
Expand Down
7 changes: 4 additions & 3 deletions e2e_test/apis/test_service_routing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
from e2e_test.base import (
BaseTestCase, TEST_PROJECT_ID, TEST_APPLICATION_ID, TEST_SERVICE_ID
)
Expand All @@ -12,9 +13,9 @@ def test_get(self):

def test_patch(self):
service_level = "development"
service_ids = [TEST_SERVICE_ID]
service_weights = [100]
service_weights = [{'service_id': TEST_SERVICE_ID, 'service_weight': 100}]
response = self.client.patch(
self.__URL,
data={'service_level': service_level, 'service_ids': service_ids, 'service_weights': service_weights})
data=json.dumps({'service_level': service_level, 'service_weights': service_weights}),
content_type='application/json')
self.assertEqual(200, response.status_code)
12 changes: 0 additions & 12 deletions frontend/configs/config.json

This file was deleted.

1 change: 0 additions & 1 deletion frontend/configs/webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export default {

plugins: [
new webpack.DefinePlugin({
REACT_APP_CONFIG: JSON.stringify(require('./config.json')),
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development'),
API_HOST: JSON.stringify(process.env.API_HOST || 'http://localhost'),
Expand Down
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.11",
"express": "^4.16.3",
"formik": "^1.5.1",
"html-webpack-plugin": "3.0.7",
"node-sass": "^4.9.0",
"react": "^16.4.1",
Expand All @@ -34,15 +35,14 @@
"react-router-dom": "^4.3.1",
"reactstrap": "^6.1.0",
"redux": "^4.0.0",
"redux-form": "^7.4.2",
"redux-thunk": "^2.3.0",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"ts-loader": "^4.4.1",
"typescript": "^2.9.2",
"webpack": "^4.12.1",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.4",
"webpack-merge": "^4.1.3"
"webpack-merge": "^4.1.3",
"yup": "^0.27.0"
}
}
Loading

0 comments on commit 1a1f862

Please sign in to comment.