Skip to content

Commit ddc07ba

Browse files
authored
Merge pull request #187 from gani0325/oss22
Help button complete !!!
2 parents f126071 + c23a56d commit ddc07ba

File tree

15 files changed

+955
-9
lines changed

15 files changed

+955
-9
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 5
6+
}

Untitled.ipynb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "0da90d57",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": []
10+
}
11+
],
12+
"metadata": {
13+
"kernelspec": {
14+
"display_name": "Python 3 (ipykernel)",
15+
"language": "python",
16+
"name": "python3"
17+
},
18+
"vp": {
19+
"vp_config_version": "1.0.0",
20+
"vp_menu_width": 273,
21+
"vp_note_display": false,
22+
"vp_note_width": 0,
23+
"vp_position": {
24+
"width": 278
25+
},
26+
"vp_section_display": true,
27+
"vp_signature": "VisualPython"
28+
}
29+
},
30+
"nbformat": 4,
31+
"nbformat_minor": 5
32+
}

css/component/popupComponent.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@
129129
height: 50px;
130130
border-top: 0.25px solid var(--border-gray-color);
131131
}
132+
133+
/* 220919 */
132134
.vp-popup-codeview-box,
133-
.vp-popup-dataview-box {
135+
.vp-popup-dataview-box,
136+
.vp-popup-helpview-box {
134137
display: none;
135138
width: 100%;
136139
height: 100px;
@@ -155,6 +158,13 @@
155158
margin-top: 9px;
156159
margin-left: 10px;
157160
}
161+
162+
/* 220919 */
163+
.vp-popup-button[data-type="help"] {
164+
float: left;
165+
margin-top: 9px;
166+
margin-left: 10px;
167+
}
158168
.vp-popup-button[data-type="cancel"] {
159169
float: right;
160170
background-color: #E4E4E4;

data/help_data.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"Import" : "this is import help",
3+
"File" : "this is file help",
4+
"Bind" : "this is bind help",
5+
"try" : "this is try help",
6+
"Subset" : "this is subset help"
7+
}

data/libraries.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3063,6 +3063,20 @@
30633063
"color": 4,
30643064
"icon": "apps/apps_profiling.svg"
30653065
}
3066+
},
3067+
{
3068+
"id" : "apps_sample",
3069+
"type" : "function",
3070+
"level": 1,
3071+
"name" : "Sample App",
3072+
"tag" : "SAMPLE,OSSCA,APPS",
3073+
"path" : "visualpython - apps - sample",
3074+
"desc" : "Sample app for OSSCA",
3075+
"file" : "m_apps/SampleApp2.js",
3076+
"apps" : {
3077+
"color": 4,
3078+
"icon": "apps/apps_white.svg"
3079+
}
30663080
}
30673081
]
30683082
},
201 Bytes
Binary file not shown.
199 Bytes
Binary file not shown.

html/component/popupComponent.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Note : popup component
77
License : GNU GPLv3 with Visual Python special exception
88
Date : 2021. 12. 01
9-
Change Date :
9+
Change Date : 2021. 09. 25
1010
-->
1111
<!-- use body tag to strip comments out on requirejs/text plugin -->
1212
<body>
@@ -80,10 +80,21 @@
8080
<div class="vp-popup-codeview-box vp-close-on-blur vp-scrollbar">
8181
<textarea name="code"></textarea>
8282
</div>
83+
84+
85+
<!-- Help view box -->
86+
<div class="vp-popup-helpview-box vp-close-on-blur vp-scrollbar">
87+
<textarea name="help"></textarea>
88+
</div>
89+
90+
8391
<!-- Button box -->
8492
<div class="vp-popup-button-box">
8593
<button type="button" class="vp-button vp-popup-button" data-type="code">Code view</button>
8694
<button type="button" class="vp-button vp-popup-button" data-type="data">Data view</button>
95+
<!-- 220919 -->
96+
<button type="button" class="vp-button vp-popup-button vp-popup-help" data-type="help" title="test">Help</button>
97+
8798

8899
<div class="vp-popup-runadd-box">
89100
<button type="button" class="vp-button activated vp-popup-button" data-type="run" title="Save to block & Run cell">Run</button>

html/m_ml/OrderInfo.html

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<body>
2+
<div class="vp-grid-box">
3+
<div class="vp-grid-border-box">
4+
<div class="vp-grid-col-95">
5+
<label for="modelType" class="vp-orange-text">Model Type</label>
6+
<select id="modelType" class="vp-select vp-state">
7+
<option value="rgs">Regression</option>
8+
<option value="clf">Classfication</option>
9+
<option value="cls">Clustering</option>
10+
</select>
11+
</div>
12+
<div class="vp-grid-col-95 vp-upper-box rgs clf">
13+
<label for="targetData" class="vp-orange-text">Target Data</label>
14+
<input type="text" class="vp-input vp-state" id="targetData" placeholder="Input target data" value="y_test"/>
15+
</div>
16+
<div class="vp-grid-col-95 vp-upper-box rgs clf">
17+
<label for="predictData" class="vp-orange-text">Predict Data</label>
18+
<input type="text" class="vp-input vp-state" id="predictData" placeholder="Input predict data" value="pred"/>
19+
</div>
20+
<div class="vp-grid-col-95 vp-upper-box cls">
21+
<label for="clusteredIndex" class="vp-orange-text">Clustered Index</label>
22+
<input type="text" class="vp-input vp-state" id="clusteredIndex" placeholder="Input predict data" value="clusters"/>
23+
</div>
24+
</div>
25+
<div class="vp-grid-border-box">
26+
<label for="featureData">Evaluation Metrics</label>
27+
<div class="vp-grid-box vp-eval-box vp-eval-rgs">
28+
<label><input type="checkbox" id="r_squared" class="vp-state" checked><span>R squared</span></label>
29+
<label><input type="checkbox" id="mae" class="vp-state"><span>Mean Absolute Error</span></label>
30+
<label><input type="checkbox" id="mape" class="vp-state"><span>Mean Absolute Percentage Error</span></label>
31+
<label><input type="checkbox" id="rmse" class="vp-state" checked><span>Root Mean Squared Error</span></label>
32+
<label><input type="checkbox" id="scatter_plot" class="vp-state"><span>Scatter plot</span></label>
33+
</div>
34+
<div class="vp-grid-box vp-eval-box vp-eval-clf">
35+
<label><input type="checkbox" id="confusion_matrix" class="vp-state" checked><span>Confusion Matrix</span></label>
36+
<label><input type="checkbox" id="report" class="vp-state" checked><span>Report (Accuracy/Precision/Recall/F1-score)</span></label>
37+
<label class="vp-gray-text vp-italic">* You can select individually</span></label>
38+
<label><input type="checkbox" id="accuracy" class="vp-state"><span>Accuracy</span></label>
39+
<label><input type="checkbox" id="precision" class="vp-state"><span>Precision</span></label>
40+
<label><input type="checkbox" id="recall" class="vp-state"><span>Recall</span></label>
41+
<label><input type="checkbox" id="f1_score" class="vp-state"><span>F1-scorev</label>
42+
<!-- <hr style="margin: 5px;"/> -->
43+
<!-- <label><input type="checkbox" id="roc_curve" class="vp-eval-check vp-state" data-type="roc-auc"><span>ROC Curve</span></label>
44+
<label><input type="checkbox" id="auc" class="vp-eval-check vp-state" data-type="roc-auc"><span>AUC</span></label> -->
45+
<!-- <div class="vp-grid-col-95">
46+
<label for="model" class="vp-orange-text">Model</label>
47+
<select id="model" class="vp-select vp-state vp-ev-model roc-auc">
48+
</select>
49+
</div> -->
50+
</div>
51+
<div class="vp-grid-box vp-eval-box vp-eval-cls">
52+
<label><input type="checkbox" id="silhouetteScore" class="vp-eval-check vp-state" data-type="silhouette" checked><span>Silhouette score</span></label>
53+
<div class="vp-grid-col-95">
54+
<label for="featureData2" class="vp-orange-text">Feature Data</label>
55+
<input type="text" class="vp-input vp-state vp-ev-model silhouette" id="featureData2" placeholder="Input feature data" value="X"/>
56+
</div>
57+
<hr style="margin: 5px;"/>
58+
<label><input type="checkbox" id="ari" class="vp-eval-check vp-state" data-type="ari-nmi"><span>ARI (Adjusted Random Score)</span></label>
59+
<label><input type="checkbox" id="nmi" class="vp-eval-check vp-state" data-type="ari-nmi"><span>NMI (Normalized Mutual Information)</span></label>
60+
<div class="vp-grid-col-95">
61+
<label for="targetData2" class="vp-orange-text">Target Data</label>
62+
<input type="text" class="vp-input vp-state vp-ev-model ari-nmi" id="targetData2" placeholder="Input target data" value="y"/>
63+
</div>
64+
</div>
65+
</div>
66+
</div>
67+
</body>

js/board/HelpView.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Project Name : Visual Python
3+
* Description : GUI-based Python code generator
4+
* File Name : HelpView.js
5+
* Author : Black Logic
6+
* Note : Render Help view
7+
* License : GNU GPLv3 with Visual Python special exception
8+
* Date : 2021. 09. 13
9+
* Change Date :
10+
*/
11+
12+
//============================================================================
13+
// [CLASS] HelpView
14+
//============================================================================
15+
define([
16+
'../com/component/PopupComponent'
17+
], function(PopupComponent) {
18+
'use strict';
19+
20+
/**
21+
* @class HelpView
22+
* @constructor
23+
*/
24+
class HelpView extends PopupComponent {
25+
_init() {
26+
super._init();
27+
28+
this.config.footer = false;
29+
this.config.sizeLevel = 1;
30+
31+
this.state = {
32+
helpview: '',
33+
...this.state
34+
}
35+
36+
this._addCodemirror('helpview', this.wrapSelector('#helpview'), "readonly");
37+
}
38+
39+
templateForBody() {
40+
return `<textarea id="helpview">${this.state.helpview}</textarea>`;
41+
}
42+
}
43+
44+
return HelpView;
45+
46+
});

0 commit comments

Comments
 (0)