Skip to content

Commit 410f01d

Browse files
Putting a little work...
1 parent cd8238e commit 410f01d

9 files changed

Lines changed: 99 additions & 0 deletions

File tree

.classpath

100755100644
File mode changed.

.gitignore

100755100644
File mode changed.

.project

100755100644
File mode changed.

.settings/org.eclipse.jdt.core.prefs

100755100644
File mode changed.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# DaticalDB4Go
22
Datical DB Plugin for Go
3+
4+
5+
http://www.go.cd/documentation/developer/writing_go_plugins/overview.html

plugin.xml

100755100644
File mode changed.

pom.xml

100755100644
File mode changed.

resources/views/task.template.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<div class="form_item_block">
2+
<label>Datical DB Command:<span class="asterisk">*</span>
3+
</label> <input type="daticalDBCommand" ng-model="DaticalDBCommand"
4+
ng-required="true"> </input>
5+
<!-- TODO: need to validate the format of the Command -->
6+
<!--
7+
<span class="form_error" ng-show="GOINPUTNAME[Url].$error.url">Incorrect url format.</span>
8+
<span class="form_error" ng-show="GOINPUTNAME[Url].$error.server">{{ GOINPUTNAME[Url].$error.server }}</span>
9+
-->
10+
</div>
11+
12+
<div class="form_item_block">
13+
<label>Datical DB JDBC Drivers Directory:<span class="asterisk">*</span></label>
14+
<input type="daticalDBJDBCDriverDir" ng-model="DaticalDBJDBCDriverDir" ng-required="true">
15+
</input>
16+
<!-- TODO: need to validate the format of the Directory -->
17+
<!--
18+
<span class="form_error" ng-show="GOINPUTNAME[Url].$error.url">Incorrect url format.</span>
19+
<span class="form_error" ng-show="GOINPUTNAME[Url].$error.server">{{ GOINPUTNAME[Url].$error.server }}</span>
20+
-->
21+
</div>
22+
23+
<div class="form_item_block">
24+
<label>Datical DB Action:<span class="asterisk">*</span></label>
25+
<select ng-model="DaticalDBAction" ng-required="true">
26+
<option value="forecast">Forecast</option>
27+
<option value="snapshot">Snapshot</option>
28+
<option value="deploy">Deploy</option>
29+
<option value="status">Status</option>
30+
<option value="statusDetails">Status (Detailed)</option>
31+
<option value="checkdrivers">Check Drivers</option>
32+
<option value="checkRules">Check Rules</option>
33+
<option value="diffChangelog">Generate Change Log from Differences</option>
34+
<option value="diff">Generate Report from Differences</option>
35+
<option value="history">History</option>
36+
<option value="rollback">Rollback</option>
37+
<option value="deploy-autoRollback">Deploy with Auto Rollback</option>
38+
<option value="newProject">Create Datical Project</option>
39+
<option value="newDbDef">Create New Database Definition</option>
40+
<option value="installLicense">Install License</option>
41+
<option value="setProperty">Set Property</option>
42+
<option value="groovyCreateProject">Create Datical Project</option>
43+
<option value="groovyBaseline">Baseline Datical Project</option>
44+
<option value="groovyConvertSQL">Convert SQL</option>
45+
</select>
46+
</div>
47+
48+
<div class="form_item_block">
49+
<label>Parameters</label> <input type="text" ng-model="daticalDBServer">
50+
</input>
51+
</div>
52+
53+
<div class="form_item_block">
54+
<label>Project Dir</label>
55+
<input type="text" ng-model="daticalDBProjectDir"></input>
56+
</div>
57+
58+
<div class="form_item_block">
59+
<label>Export SQL:</label>
60+
<div class="checkbox_row">
61+
<input id="exportSQLYes" type="radio" ng-model="ExportSQL" value="yes">
62+
<label for="exportSQLYes">Yes</label>
63+
<input id="exportSQLNo" type="radio" ng-model="ExportSQL" value="no">
64+
<label for="exportSQLNo">No</label>
65+
</div>
66+
</div>
67+
68+
<div class="form_item_block">
69+
<label>Export Rollback SQL:</label>
70+
<div class="checkbox_row">
71+
<input id="exportRollbackSQLYes" type="radio"
72+
ng-model="ExportRollbackSQL" value="yes"> <label
73+
for="exportRollbackSQLYes">Yes</label> <input
74+
id="exportRollbackSQLNo" type="radio" ng-model="ExportRollbackSQL"
75+
value="no"> <label for="exportRollbackSQLNo">No</label>
76+
</div>
77+
</div>

src/com/datical/integration/go/DaticalDB4Go.java

100755100644
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
package com.datical.integration.go;
22

33
import com.thoughtworks.go.plugin.api.annotation.Extension;
4+
import com.thoughtworks.go.plugin.api.annotation.Load;
5+
import com.thoughtworks.go.plugin.api.annotation.UnLoad;
6+
import com.thoughtworks.go.plugin.api.info.PluginContext;
47
import com.thoughtworks.go.plugin.api.info.PluginDescriptor;
58
import com.thoughtworks.go.plugin.api.info.PluginDescriptorAware;
69

10+
import com.thoughtworks.go.plugin.api.logging.Logger;
11+
712
@Extension
813
public class DaticalDB4Go implements PluginDescriptorAware {
14+
15+
Logger logger;
16+
917
public void setPluginDescriptor(PluginDescriptor descriptor) {
1018
}
19+
20+
@Load
21+
public void onLoad(PluginContext context) {
22+
logger.info("Plugin loaded.");
23+
}
24+
25+
@UnLoad
26+
public void onUnload(PluginContext context) {
27+
logger.info("Plugin unloaded.");
28+
29+
}
1130
}

0 commit comments

Comments
 (0)