Skip to content

Commit

Permalink
Zowe Suite v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot authored Nov 8, 2019
2 parents 807c92a + 719f78b commit 124faad
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 84 deletions.
4 changes: 2 additions & 2 deletions pluginDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"descriptionDefault": "Sample App Showcasing React Adapter",
"isSingleWindowApp": true,
"defaultWindowStyle": {
"width": 800,
"height": 450
"width": 900,
"height": 420
}
},
"dataServices": [
Expand Down
83 changes: 39 additions & 44 deletions webClient/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions webClient/src/App-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var styles = {

iframeButton :{
borderRadius: "4px",
margin: "0px 4px 0px 4px",
margin: "0px 0px 0px 4px",
fontWeight: "700"
},

Expand All @@ -84,7 +84,9 @@ var styles = {
border: "1px solid grey",
backgroundColor: "white",
height: "18px",
width: "96%"
width: "96%",
marginTop: "3px",
fontSize: "small"
},

disableEffect :{
Expand Down Expand Up @@ -116,6 +118,14 @@ var styles = {

dataserviceTestPanel :{
borderLeft: "outset"
},

paddingRight8 :{
paddingRight: "8px"
},

paddingLeft3 :{
paddingLeft: "3px"
}
};
/*
Expand Down
31 changes: 16 additions & 15 deletions webClient/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ class App extends React.Component<any, any> {
actionType: "Launch",
appTarget: "PluginCreate",
parameters:
`{"type":"connect",
"connectionSettings":{
"host":"localhost",
"port":23,
"deviceType":5,
"alternateHeight":60,
"alternateWidth":132,
"oiaEnabled": true,
"security": {
"type":0
}
}}`,
`{ "type":"connect",
"connectionSettings":{
"host":"localhost",
"port":23,
"deviceType":5,
"alternateHeight":60,
"alternateWidth":132,
"oiaEnabled": true,
"security": {
"type":0
}
}
}`,
appId: "org.zowe.terminal.tn3270",
status: 'status_will_appear_here',
helloText: "",
Expand Down Expand Up @@ -169,7 +170,7 @@ class App extends React.Component<any, any> {
});
}).catch(e => {
this.log.warn(`Error on getting defaults, e=${e}`);
this.setState({status: 'Error getting defaults'});
this.setState({status: this.t('Error_getting_defaults')});
});
}

Expand Down Expand Up @@ -200,14 +201,14 @@ class App extends React.Component<any, any> {
this.log.info(`Saved App ID with HTTP status=${res.status}`);
}).catch(e => {
this.log.warn(`Error on saving App ID, e=${e}`);
this.setState({status: 'Error saving App ID'});
this.setState({status: this.t('Error_saving_App_ID')});
});
} else {
this.log.warn(`Error on saving parameters, response status=${res.status}`);
}
}).catch(e => {
this.log.warn(`Error on saving parameters, e=${e}`);
this.setState({status: 'Error saving parameters'});
this.setState({status: this.t('Error_saving_parameters')});
});
}

Expand Down
15 changes: 8 additions & 7 deletions webClient/src/SamplePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SamplePage extends React.Component<any, any> {
<div style={mergeStyles(styles.appComponent, styles.iframeFont, styles.testPanelContainer)}>
<div style={mergeStyles(styles.testPanel, styles.pluginTestPanel)}>
<div style={styles.bottom10}>
<span style={styles.biggerBoldText}>{t('plugin_request_test')}</span>
<span style={mergeStyles(styles.biggerBoldText, styles.paddingRight8)}>{t('plugin_request_test')}</span>
{/* Tests the sending of requests to other plugins. Defaults to send a message
to itself (and responding) to show more parts of the API */}
<button style={mergeStyles(styles.iframeButton, styles.shadowed)} type="button" onClick={this.props.sendAppRequest}>{t('send_app_request')}</button>
Expand All @@ -47,17 +47,17 @@ class SamplePage extends React.Component<any, any> {
</div>
<div>
{/* Action types are used to determine what sort of Action is being taken on whatever App instance is the target. Launch simply creates a new instance with the context you provide, but Message can be used to communicate with an already open Instance to drive some action */}
<label style={styles.boldText}>{t('action_type')}</label>
<label style={mergeStyles(styles.boldText, styles.paddingRight8)} >{t('action_type')}</label>
<input type="radio" value="Launch" name="actionType" checked={this.props.actionType == "Launch"} onChange={this.props.handleActionTypeChange}/>
<label htmlFor="actionLaunch">{t('launch')}</label>
<label htmlFor="actionLaunch" style={styles.paddingRight8} >{t('launch')}</label>
<input type="radio" value="Message" name="actionType" checked={this.props.actionType == "Message"} onChange={this.props.handleActionTypeChange}/>
<label htmlFor="actionMessage">{t('message')}</label>
</div>
{/* App target modes are used to determine which instance of an App should be communicated with. You can create a new instance to send the Action to, or you could reuse an existing instance that is open. */}
<div>
<label style={styles.boldText}>{t('app_target_mode')}</label>
<label style={mergeStyles(styles.boldText, styles.paddingRight8)}>{t('app_target_mode')}</label>
<input type="radio" value="PluginCreate" name="targetMode" checked={this.props.appTarget == "PluginCreate"} onChange={this.props.handleAppTargetChange}/>
<label htmlFor="targetCreate">{t('create_new')}</label>
<label htmlFor="targetCreate" style={styles.paddingRight8}>{t('create_new')}</label>
<input type="radio" value="PluginFindAnyOrCreate" name="targetMode" checked={this.props.appTarget == "PluginFindAnyOrCreate"} onChange={this.props.handleAppTargetChange}/>
<label htmlFor="targetReuse">{t('reuse_any_open')}</label>
</div>
Expand All @@ -68,8 +68,9 @@ class SamplePage extends React.Component<any, any> {
<textarea style={mergeStyles(styles.iframeInput, styles.inputCorner, styles.inputText, styles.shadowed)} rows={10} cols={50} defaultValue={this.props.parameters} onChange={this.props.handleParameterChange}></textarea>
</div>
<div style={styles.hundredWidth}>
<span>{t('app_status_or_message')}</span>
<p style={mergeStyles(styles.displayText, styles.shadowed, styles.disableEffect)} id="status">{this.props.status}</p>
<span
>{t('app_status_or_message')}</span>
<p style={mergeStyles(styles.displayText, styles.shadowed, styles.disableEffect, styles.paddingLeft3)} id="status">{this.props.status}</p>
</div>
</div>
</div>
Expand Down
39 changes: 26 additions & 13 deletions webClient/src/assets/i18n/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ const en = {
no_or_empty_message_received_from_client: "No Or Empty Message Received from Client",
empty_reply_from_server: "Empty Reply from Server",
could_not_find_app_with_id_provided: "Could not find app with ID provided",
status_will_appear_here: "Status will appear here",
request_succeeded: "App request succeeded"
request_succeeded: "App request succeeded",
Error_getting_defaults: "Error getting defaults",
Error_saving_App_ID: "Error saving App ID",
Error_saving_parameters: "Error saving parameters"
}
}

Expand Down Expand Up @@ -62,6 +64,9 @@ const ru = {
could_not_find_app_with_id_provided: "Не удалось найти приложение с указанным идентификатором",
status_will_appear_here: "Статус появится здесь",
request_succeeded: "Запрос приложения выполнен успешно",
Error_getting_defaults: "Error getting defaults",
Error_saving_App_ID: "Error saving App ID",
Error_saving_parameters: "Error saving parameters"
}
}

Expand Down Expand Up @@ -92,8 +97,10 @@ const ja = {
no_or_empty_message_received_from_client: "クライアントから受信したメッセージがない、あるいは空です。",
empty_reply_from_server: "サーバーからの応答が空です。",
could_not_find_app_with_id_provided: "指定されたIDのアプリケーションが見つかりませんでした。",
status_will_appear_here: "スタータスをここに表示",
request_succeeded: "アプリケーション・リクエストが成功しました"
request_succeeded: "アプリケーション・リクエストが成功しました",
Error_getting_defaults: "Error getting defaults",
Error_saving_App_ID: "Error saving App ID",
Error_saving_parameters: "Error saving parameters"
}
}

Expand Down Expand Up @@ -124,8 +131,10 @@ const zh = {
no_or_empty_message_received_from_client: "从客户端收到空消息",
empty_reply_from_server: "服务器没有回复",
could_not_find_app_with_id_provided: "无法找到对应ID的应用",
status_will_appear_here: "状态显示",
request_succeeded: "应用请求成功"
request_succeeded: "应用请求成功",
Error_getting_defaults: "Error getting defaults",
Error_saving_App_ID: "Error saving App ID",
Error_saving_parameters: "Error saving parameters"
}
}

Expand All @@ -134,7 +143,7 @@ const fr = {
action_type: "Type d'Action",
app_request_succeeded: "La requête a réussie",
app_request_test: "Test de requête",
app_status_or_message: "Statu de l'Application ou Message",
app_status_or_message: "Etat courant de l'Application ou Message",
app_target_mode: "Mode d'Utilisation de l'Application",
application_identifier: "Identité de l'Application",
close: "Fermer",
Expand All @@ -152,12 +161,14 @@ const fr = {
save_to_server: "Sauvegarder sur le Serveur",
send_app_request: "Envoyer la Requête Application",
server_replied_with: "Réponse du Serveur",
status_will_appear_here: "Le statu apparait ici",
status_will_appear_here: "Les détails apparaissent ici",
no_or_empty_message_received_from_client: "Pas de réponse du client",
empty_reply_from_server: "La réponse du serveur est vide",
could_not_find_app_with_id_provided: "L'ID fourni n'appartient pas à une application existante",
status_will_appear_here: "Le statu apparait ici",
request_succeeded: "Demande à l’application réussie"
could_not_find_app_with_id_provided: "L'identifiant fourni n'appartient pas à une application existante",
request_succeeded: "Demande à l’application réussie",
Error_getting_defaults: "Erreur lors de l'obtention des valeurs par défaut",
Error_saving_App_ID: "Erreur lors de l'enregistrement de l'identifiant de l'application",
Error_saving_parameters: "Erreur lors de la sauvegarde des paramètres"
}
}

Expand Down Expand Up @@ -188,8 +199,10 @@ const de = {
no_or_empty_message_received_from_client: "Keine/Leere Nachricht vom Client erhalten",
empty_reply_from_server: "Leere Antwort von Server erhalten",
could_not_find_app_with_id_provided: "Anwendung mit angegebener Kennung wurde nicht gefunden",
status_will_appear_here: "Der Status wird hier angezeigt",
request_succeeded: "Anfrage erfolgreich abgeschlossen"
request_succeeded: "Anfrage erfolgreich abgeschlossen",
Error_getting_defaults: "Error getting defaults",
Error_saving_App_ID: "Error saving App ID",
Error_saving_parameters: "Error saving parameters"
}
}

Expand Down
2 changes: 1 addition & 1 deletion webClient/src/assets/i18n/pluginDefinition.i18n.fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"samplereact": "Exemple d'application React",
"samplereact": "Exemple d'Application React",
"SampleReactPluginDescription": "Exemple montrant les capacités d'application React"
}

0 comments on commit 124faad

Please sign in to comment.