Skip to content

Commit 933dd09

Browse files
committed
removed logs comments and reverted back config
1 parent 0ff39cf commit 933dd09

File tree

6 files changed

+12
-115
lines changed

6 files changed

+12
-115
lines changed

app/pods/components/problem-explanation/component.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,9 @@ export default Component.extend({
88
init() {
99
this._super(...arguments);
1010
let contest = this.get('contest');
11-
// if (contest) {
12-
13-
// if (contest.allowedLanguages) {
14-
// console.log('Allowed languages:', contest.allowedLanguages);
15-
// } else {
16-
// console.log('No allowed languages found for the contest');
17-
// }
18-
// } else {
19-
// console.log('Contest object is undefined');
20-
// }
2111
},
22-
2312
jsonToTable(data) {
2413
const table = jsonToTable(data);
25-
// console.log('jsonToTable output:', table);
2614
return table;
2715
}
2816
});

app/pods/components/problem-explanation/template.hbs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,31 @@
11

2-
{{log problem}}
2+
33
<div class="py-4">
44
<p>{{markdown-to-html problem.details.description}}</p>
55

66
<div class="extra-bold">Input Format</div>
7-
{{#if (includes contest.allowedLanguages "mysql")}}
8-
<pre>{{json-to-table problem.details.input_format}}</pre>
9-
{{else}}
10-
<p>{{problem.details.input_format}}</p>
11-
{{/if}}
7+
8+
<pre>{{problem.details.input_format}}</pre>
9+
1210

1311
<div class="extra-bold">Constraints</div>
1412
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
1513
<p>{{markdown-to-html problem.details.constraints}}</p>
1614
</div>
1715

1816
<div class="extra-bold">Output Format</div>
19-
{{#if (includes contest.allowedLanguages "mysql")}}
20-
<pre>{{json-to-table problem.details.output_format}}</pre>
21-
{{else}}
22-
<p>{{problem.details.output_format}}</p>
23-
{{/if}}
24-
25-
17+
<pre>{{problem.details.output_format}}</pre>
2618
<div class="extra-bold">Sample Input</div>
2719
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
28-
{{#if (includes contest.allowedLanguages "mysql")}}
29-
<pre>{{json-to-table problem.details.sample_input}}</pre>
30-
{{else}}
31-
<p>{{problem.details.sample_input}}</p>
32-
{{/if}}
33-
20+
<pre>{{ problem.details.sample_input}}</pre>
3421
</div>
3522

3623
<div class="extra-bold">Sample Output</div>
3724
<div class="bg-grey br-5 w-60 px-4 py-2 my-2">
3825
{{#if (includes contest.allowedLanguages "mysql")}}
3926
<pre>{{json-to-table problem.details.sample_output}}</pre>
4027
{{else}}
41-
<p>{{problem.details.sample_output}}</p>
28+
<pre>{{problem.details.sample_output}}</pre>
4229
{{/if}}
4330

4431
</div>

app/pods/components/run-result/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { computed } from '@ember/object';
44
export default class RunResultComponent extends Component {
55
didRender() {
66
this.element.scrollIntoView({behavior: "smooth", block: "end" })
7-
// console.log('run')
7+
88
}
99

1010
@computed('judgeResult')
1111
get output() {
12-
// console.log('res',this)
12+
1313
if (this.judgeResult.data){
1414
return window.atob(this.judgeResult.data.output)
1515
} else if (this.judgeResult.error) {
Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,12 @@
11
import Component from '@ember/component';
22
import { computed } from '@ember/object';
33
import { jsonToTable } from '../../../util/json-to-table';
4-
// const data = {
5-
// "meta": {},
6-
// "data": {
7-
// "type": "submissions",
8-
// "id": "7298192",
9-
// "attributes": {
10-
// "id": 7298192,
11-
// "solution": {
12-
// "source": "U0VMRUNUIGUubmFtZSBBUyAiRW1wbG95ZWUiIEZST00gRW1wbG95ZWUgYXMgZQpJTk5FUiBKT0lOIEVtcGxveWVlIGFzIG0KT04gZS5tYW5hZ2VySWQgPSBtLmlkCldIRVJFIGUuc2FsYXJ5ID4gbS5zYWxhcnk7"
13-
// },
14-
// "submit-at": "2025-02-19T09:00:58.477Z",
15-
// "language": "mysql",
16-
// "score": 0,
17-
// "result": -1,
18-
// "judge-result": {
19-
// "id": 116,
20-
// "code": 0,
21-
// "time": 1.22,
22-
// "stderr": "",
23-
// "stdout": "W3siRW1wbG95ZWUiOiJKb2UifV0K",
24-
// "scenario": "run"
25-
// },
26-
// "explanation": null,
27-
// "is-top-submission": false,
28-
// "plagiarism-detected": false,
29-
// "created-at": "2025-02-19T09:00:58.478Z"
30-
// },
31-
// "relationships": {
32-
// "user": { "data": { "type": "users", "id": "241321" } },
33-
// "content": { "data": { "type": "contents", "id": "1747" } },
34-
// "contest": { "data": null },
35-
// "badge": { "data": null }
36-
// }
37-
// }
38-
// };
4+
395
export default Component.extend({
40-
// judgeResult: null,
41-
// allowedLanguages: null,
426

437
didRender() {
448
this._super(...arguments);
459
this.element.scrollIntoView({ behavior: "smooth", block: "end" });
46-
47-
// this.set('judgeResult', data.data.attributes['judge-result']);
48-
// this.set('allowedLanguages', this.get('allowedLanguages'));
49-
// console.log('judgeResult:', this.get('judgeResult'));
50-
// console.log('Allowed Languages:', this.allowedLanguages);
5110
},
5211

5312
isRunning: computed('judgeResult', function() {
@@ -84,7 +43,6 @@ export default Component.extend({
8443

8544
jsonToTable(data) {
8645
const table = jsonToTable(data);
87-
// console.log('jsonToTable output:', table);
8846
return table;
8947
}
9048
});

app/pods/components/submission-result/test.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

config/environment.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = function (environment) {
55
modulePrefix: "hackerblocks",
66
podModulePrefix: "hackerblocks/pods",
77
environment,
8-
rootURL: "/",
8+
rootURL: "/app",
99
locationType: "auto",
1010
"ember-simple-auth-token": {
1111
identificationField: "code",
@@ -52,8 +52,7 @@ module.exports = function (environment) {
5252
// ENV.APP.LOG_VIEW_LOOKUPS = true;
5353
ENV.nuxtPublicUrl = "http://localhost:8081"
5454
// ENV.publicUrl = 'http://test.hackerblocks/app/';
55-
// ENV.publicUrl = "http://localhost:4200/app";
56-
ENV.publicUrl = "http://localhost:4200";
55+
ENV.publicUrl = "http://localhost:4200/app";
5756
// ENV.apiHost = 'http://test.hackbackend';
5857
ENV.apiHost = "http://localhost:3000";
5958
ENV.oneauthURL = "http://localhost:3838";

0 commit comments

Comments
 (0)